# prov.trace

prov.trace in the Node SDK: 7 methods. The trace methods.

## Methods

### [models](https://provenanceauth.com/docs/sdks/node/trace/models.md)

```ts
prov.trace.models(): Promise<TraceModel[]>
```

Public models + your account's private registry builds.

Calls `GET /v1/trace/models`.

### [check](https://provenanceauth.com/docs/sdks/node/trace/check.md)

```ts
prov.trace.check(params: TraceCheckParams): Promise<TraceCheckResult>
```

Allow | flag | block for a hosted traced inference or a sidecar reading, decided by the account's Trace rules at stage `completion` (request `thresholds` win for this check).

Calls `POST /v1/trace/check`.

### [assess](https://provenanceauth.com/docs/sdks/node/trace/assess.md)

```ts
prov.trace.assess(params: TraceAssessParams): Promise<TraceAssessment>
```

Assess an agent's action before it runs (`POST /v1/trace/assessments`); the raw call under.

### [guardTool](https://provenanceauth.com/docs/sdks/node/trace/guard-tool.md)

```ts
prov.trace.guardTool<R>(action: TraceActionInput, fn: () => R | Promise<R>, opts?: GuardToolOptions): Promise<GuardToolResult<R>>
```

Assess `action` and run `fn` only on `allow`; on `challenge` wait for the person (`waitForApproval`) or return the pending assessment; when Provenance can't answer, pay, send and delete never run, write is blocked and read runs unchecked (`onUnavailable` changes the last two), and an unchecked run is posted later as `unassessed`.

### [guard](https://provenanceauth.com/docs/sdks/node/trace/guard.md)

```ts
prov.trace.guard<R>(fn: (completion: TracedChatCompletion) => R | Promise<R>, opts?: TraceGuardOptions): (params: ChatCompletionParams) => Promise<R>
```

Wrap `fn` so it only ever sees a completion the account's Trace rules let through.

### [compare](https://provenanceauth.com/docs/sdks/node/trace/compare.md)

```ts
prov.trace.compare(a: string, b: string, params?: { pattern?: string }): Promise<TraceComparison>
```

Two runs of one prompt side by side (canary + activation delta).

Calls `GET /v1/trace/compare`.

### [health](https://provenanceauth.com/docs/sdks/node/trace/health.md)

```ts
prov.trace.health(): Promise<TraceHealth>
```

The configured trace backend + worker status.

Calls `GET /v1/trace/health`.
