> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nora.my/llms.txt
> Use this file to discover all available pages before exploring further.

# 투명성

> Flow가 실제로 돈 정의 읽기 : 모델, 프롬프트, 툴, 데이터 소스, 메모리

블랙박스 해소: **실제로 어떤 정의로 돌았나?** 지원("이 에이전트가 실제로 본 프롬프트가 뭐야?"), 실행 전 assertion("기대한 모델이 걸려 있나?"), 관리자 UI에 "왜 이런 답이 나왔나" 패널을 심을 때 씁니다.

**PAT `read` 스코프**로 인증합니다.

## `resolve(slug)`

```ts theme={null}
const def = await nora.resolve("support");
// Flow의 에이전트별: {
//   model,          // resolve된 모델 id (routing · BYOK 존중)
//   mode,           // "api" | "internal" | "sdk"
//   workerKind,     // 실행 클래스
//   prompt,         // 렌더될 시스템 프롬프트 문자열
//   tools,          // 붙은 tool 블록과 유효 정책
//   dataSources,    // documents · memory · kg 붙임
//   memorySpaces,   // greenfield 메모리 스페이스 붙임
// }
```

Flow의 **모든 에이전트**에 대한 resolve된 정의를 돌려줍니다. 진입점만이 아닙니다. 기본으로 현재 게시 버전을 반영합니다. draft vs published 토글은 여기 없습니다(그건 CLI의 `nora flows versions`를 쓰세요).

## 흔한 패턴

### 실행 전 assertion

기대한 모델이 걸려 있지 않으면 실행에 돈 쓰기 전에 크게 실패:

```ts theme={null}
const def = await nora.resolve("support");
const entry = Object.values(def)[0];       // 첫 에이전트
if (entry.model !== "gpt-4o") {
  throw new Error(`support Flow drift: gpt-4o 기대했는데 ${entry.model}`);
}
```

### "이 답은 왜 이렇게 나왔지?" 지원 패널

관리자 UI의 트레이스 옆에 지금의 정의를 함께 띄워 지원 엔지니어가 에이전트가 실제로 본 프롬프트를 보게:

```ts theme={null}
const [trace, def] = await Promise.all([
  yourTraceLookup(traceId),
  nora.resolve(trace.flowSlug),
]);
render({
  answer: trace.output,
  prompt: def[trace.entryAgentId].prompt,
  tools: def[trace.entryAgentId].tools,
});
```

### drift 감사

resolve된 정의를 소스 오브 트루스에 스냅샷으로 남기고 스케줄로 diff 합니다. 예상 밖 변화가 있으면 누군가 변경 관리 밖에서 Flow를 편집했다는 신호입니다.

```ts theme={null}
const def = await nora.resolve("support");
fs.writeFileSync(`snapshots/support-${new Date().toISOString().slice(0,10)}.json`, JSON.stringify(def, null, 2));
```

## 스코프

`resolve`는 \*\*PAT `read`\*\*를 요구합니다. read 토큰은 프롬프트와 툴 설정을 노출할 수 있고, 여기엔 최종 사용자 PII나 자격증명이 들어 있을 수 있어 관리자용으로만 취급하세요. 브라우저 코드에는 절대 넘기지 마세요(SDK는 어차피 브라우저 초기화를 거절합니다. [개요](/ko/sdk/overview) 참고).
