agent-inspect 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -3
- package/README.md +6 -5
- package/docs/ADAPTERS.md +22 -1
- package/docs/API.md +11 -3
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/CLI.md +9 -1
- package/docs/EXPORTS.md +14 -0
- package/docs/LIMITATIONS.md +11 -0
- package/docs/SCHEMA.md +1 -0
- package/package.json +1 -1
- package/packages/cli/dist/index.cjs +271 -14
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +271 -14
- package/packages/cli/dist/index.mjs.map +1 -1
- package/packages/core/dist/index.cjs +315 -14
- package/packages/core/dist/index.cjs.map +1 -1
- package/packages/core/dist/index.d.cts +51 -3
- package/packages/core/dist/index.d.ts +51 -3
- package/packages/core/dist/index.mjs +313 -15
- package/packages/core/dist/index.mjs.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
3
|
+
## 1.3.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- 503d240: Correlation metadata, redaction profiles for share-safe exports, and LangChain streaming metadata support.
|
|
8
|
+
|
|
9
|
+
## 1.3.0 — Unreleased
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Added correlation metadata on `inspectRun` / `maybeInspectRun` (`correlationId`, `requestId`, `decisionId`, `groupId`) and `getCurrentCorrelationMetadata()`.
|
|
14
|
+
- Added redaction profiles (`local`, `share`, `strict`) for trace safety and share-safe exports.
|
|
15
|
+
- Added `redactionProfile` on `InspectRunOptions` and `ExportOptions`.
|
|
16
|
+
- Added `--redaction-profile` to `agent-inspect export`.
|
|
17
|
+
- Added LangChain streaming metadata support (`stream: true`) for token chunk counts and duration.
|
|
18
|
+
- Added bounded preview behavior for preview capture mode (`maxStreamPreviewChars`).
|
|
19
|
+
|
|
20
|
+
### Notes
|
|
21
|
+
|
|
22
|
+
- LangChain `capture: "metadata-only"` remains default; full stream text is not captured by default.
|
|
23
|
+
- LangChain streaming does not emit per-token JSONL events.
|
|
24
|
+
- Redaction profiles are key-based safeguards, not compliance-grade PII detection.
|
|
25
|
+
- Export redaction does not upload anywhere and does not mutate original traces.
|
|
26
|
+
- No vendor upload, hosted dashboard, or OTLP HTTP sink was added.
|
|
27
|
+
- Manual trace writing remains `schemaVersion: "0.1"`; v0.2 is not written by default.
|
|
28
|
+
|
|
29
|
+
## 1.2.0
|
|
8
30
|
|
|
9
|
-
|
|
31
|
+
Released **2026-06-11**. Changeset `5a7f785`.
|
|
10
32
|
|
|
11
33
|
### Added
|
|
12
34
|
|
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ agent-inspect gives those runs **structure**: an **execution tree** you can read
|
|
|
20
20
|
|
|
21
21
|
## Install
|
|
22
22
|
|
|
23
|
-
Current npm release: **1.
|
|
23
|
+
Current npm release: **1.2.0**.
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
26
|
npm install agent-inspect
|
|
@@ -159,12 +159,12 @@ Full flags and behavior: [docs/CLI.md](docs/CLI.md).
|
|
|
159
159
|
- See **which step dominated latency** in a multi-step planner or RAG pipeline.
|
|
160
160
|
- **Diff two runs** after a prompt, model, or routing change (see [diff examples](docs/DIFF.md)).
|
|
161
161
|
- Point **`logs`** / **`tail`** at existing job or service logs to get a **local execution view** without shipping data upstream.
|
|
162
|
-
- **Export** a run to Markdown for a PR, postmortem, or internal thread — then review before sharing.
|
|
162
|
+
- **Export** a run to Markdown for a PR, postmortem, or internal thread — use `--redaction-profile share` for share-safe copies, then review before sharing.
|
|
163
163
|
- Keep traces **on disk** while still using enterprise observability elsewhere.
|
|
164
164
|
|
|
165
165
|
## Stable foundation (AgentInspect 1.x)
|
|
166
166
|
|
|
167
|
-
**agent-inspect 1.x** (current: **1.
|
|
167
|
+
**agent-inspect 1.x** (current: **1.2.0**) stabilizes the **local debugging foundation**:
|
|
168
168
|
|
|
169
169
|
- Instrument a run with `inspectRun` and `step`
|
|
170
170
|
- Write **local JSONL traces** (`schemaVersion: "0.1"` — compatibility retained)
|
|
@@ -186,6 +186,7 @@ Pass `enabled: false` to `inspectRun` for a no-trace passthrough. Use `maybeInsp
|
|
|
186
186
|
- Optional **`@agent-inspect/langchain`** callback adapter
|
|
187
187
|
- Optional **`@agent-inspect/tui`** terminal viewer
|
|
188
188
|
- **Fixtures** and **recipes** for deterministic checks and adoption patterns
|
|
189
|
+
- **v1.2.0** — experimental persisted-event foundation (`PersistedInspectEvent`, converters, in-memory tree bridge) for future source-agnostic local inspection. Manual trace writing remains **`schemaVersion: "0.1"`**; v0.2 is **not written by default**; CLI behavior unchanged; no vendor upload.
|
|
189
190
|
|
|
190
191
|
**Honest boundaries:** programmatic log parsing, export, and diff APIs; LangChain and TUI programmatic surfaces; and OpenInference/OTLP JSON exports are **experimental or compatibility-oriented**. Nothing performs **vendor upload** by default.
|
|
191
192
|
|
|
@@ -193,7 +194,7 @@ Pass `enabled: false` to `inspectRun` for a no-trace passthrough. Use `maybeInsp
|
|
|
193
194
|
|
|
194
195
|
### LangChain callback adapter (`@agent-inspect/langchain`)
|
|
195
196
|
|
|
196
|
-
Optional package: official **LangChain.js callbacks** (`BaseCallbackHandler`), **metadata-oriented by default**, **no monkey-patching**, **no vendor sink**. The LangChain adapter ships with 1.x; its programmatic API remains experimental and may evolve independently of the stable core tracing API.
|
|
197
|
+
Optional package: official **LangChain.js callbacks** (`BaseCallbackHandler`), **metadata-oriented by default**, **no monkey-patching**, **no vendor sink**. Optional **`stream: true`** records chunk counts and stream duration **without storing full token text by default**. The LangChain adapter ships with 1.x; its programmatic API remains experimental and may evolve independently of the stable core tracing API.
|
|
197
198
|
|
|
198
199
|
```bash
|
|
199
200
|
pnpm add agent-inspect @agent-inspect/langchain @langchain/core
|
|
@@ -286,7 +287,7 @@ For a detailed comparison, see [Compare with other tools](docs/COMPARE.md).
|
|
|
286
287
|
- [Compare with other tools](docs/COMPARE.md)
|
|
287
288
|
- [Security](SECURITY.md)
|
|
288
289
|
- [Safe trace sharing checklist](docs/SAFE-TRACE-SHARING.md)
|
|
289
|
-
- [Changelog](CHANGELOG.md)
|
|
290
|
+
- [Changelog](CHANGELOG.md) — **upcoming [1.3.0](CHANGELOG.md#130--unreleased)** on `main` (not yet on npm): correlation metadata, share-safe export profiles, LangChain streaming metadata
|
|
290
291
|
- [Known issues](docs/KNOWN-ISSUES.md)
|
|
291
292
|
- [Limitations](docs/LIMITATIONS.md)
|
|
292
293
|
- [Screenshot checklist (planned assets)](docs/SCREENSHOTS.md)
|
package/docs/ADAPTERS.md
CHANGED
|
@@ -8,6 +8,7 @@ AgentInspect is framework-agnostic at its core, but can optionally integrate wit
|
|
|
8
8
|
- **In-memory by default** (`getEvents()` / `clear()`)
|
|
9
9
|
- **Optional JSONL persistence** (`persist: true`) maps callback lifecycle to schemaVersion `"0.1"` manual events (`run_started`, `step_started`, `step_completed`, `run_completed`) so `list` / `view` / `export` / `diff` work without a separate schema
|
|
10
10
|
- **Metadata-only capture by default**; `capture: "preview"` is opt-in with truncation
|
|
11
|
+
- **Optional streaming metadata** (`stream: true`) — chunk counts, timing, and bounded previews only; **no full token stream** captured by default
|
|
11
12
|
- **No monkey-patching**, **no vendor sinks**, **no network upload**
|
|
12
13
|
- **Interactive TUI** (optional): `@agent-inspect/tui`
|
|
13
14
|
- Documented as **experimental** in `docs/API.md`
|
|
@@ -36,7 +37,27 @@ npx agent-inspect list --dir ./.agent-inspect
|
|
|
36
37
|
npx agent-inspect view <run-id> --dir ./.agent-inspect
|
|
37
38
|
```
|
|
38
39
|
|
|
40
|
+
### LangChain streaming metadata (v1.3.0+)
|
|
41
|
+
|
|
42
|
+
When `stream: true` on `AgentInspectCallback`:
|
|
43
|
+
|
|
44
|
+
- `handleLLMNewToken` updates **in-memory streaming stats** only (no per-token JSONL lines).
|
|
45
|
+
- On LLM end/error, metadata such as `chunkCount`, `firstChunkAt`, `lastChunkAt`, `streamDurationMs`, and `streamedCharCount` attach to the LLM completion event.
|
|
46
|
+
- **`capture: "metadata-only"`** (default) does **not** store token text.
|
|
47
|
+
- **`capture: "preview"`** may include a **bounded** `streamPreview` via `maxStreamPreviewChars` (defaults to `maxPreviewChars`).
|
|
48
|
+
- With **`persist: true`**, streaming metadata is written on the LLM `step_started` metadata at completion time (deferred write for streaming LLM steps).
|
|
49
|
+
- Inspect persisted runs locally: `agent-inspect list`, `view`, `export --redaction-profile share`.
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
const callback = new AgentInspectCallback({
|
|
53
|
+
stream: true,
|
|
54
|
+
capture: "metadata-only",
|
|
55
|
+
persist: true,
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
39
59
|
See also:
|
|
40
60
|
- `docs/MIGRATION.md` (what changed from early versions)
|
|
41
|
-
- `docs/API.md` (LangChain adapter options: `persist`, `capture`, `traceDir`)
|
|
61
|
+
- `docs/API.md` (LangChain adapter options: `persist`, `capture`, `stream`, `traceDir`)
|
|
62
|
+
- `docs/SAFE-TRACE-SHARING.md` (review exports before sharing)
|
|
42
63
|
|
package/docs/API.md
CHANGED
|
@@ -26,16 +26,21 @@ import { inspectRun, maybeInspectRun, step, observe } from "agent-inspect";
|
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
- **`inspectRun(name, fn, options?)`**: wraps a workflow in a local JSONL trace (`run_started` / `run_completed`), prints terminal progress, and swallows instrumentation failures (user errors are re-thrown). **Traces by default** when `enabled` is omitted or `true`. Pass **`enabled: false`** to run `fn` with no trace file, no execution context, and no terminal output.
|
|
29
|
-
- **`redact`**: default `true` — redacts sensitive metadata keys before disk (`authorization`, `cookie`, `token`, `apiKey`, `password`, `secret`, `email`). Pass `false` to persist metadata as-is. Pass `{ rules?: RedactionRule[] }` for custom rules (defaults still apply).
|
|
29
|
+
- **`redact`**: default `true` — redacts sensitive metadata keys before disk (`authorization`, `cookie`, `token`, `apiKey`, `password`, `secret`, `email`). Pass `false` to persist metadata as-is. Pass `{ rules?: RedactionRule[] }` for custom rules (defaults still apply). **`redact: false` wins** over `redactionProfile` for trace writing.
|
|
30
|
+
- **`redactionProfile`**: optional preset — `local` (default), `share`, or `strict`. Adds extra key-based redaction and tighter metadata string bounds for trace writing. Key-based only — not compliance-grade DLP.
|
|
30
31
|
- **`maxMetadataValueLength`**: max string length for metadata values (default `2000`).
|
|
31
32
|
- **`maxPreviewLength`**: max string length for preview-like keys containing `preview` (default `500`).
|
|
32
33
|
- **`maxEventBytes`**: max UTF-8 bytes per serialized JSONL event (default `65536`). Oversized events are truncated; instrumentation never throws into user code.
|
|
34
|
+
- **Correlation metadata (v1.3.0+):** optional `correlationId`, `requestId`, `decisionId`, and `groupId` strings. When set, they are written on `run_started.metadata` (not on every step). Top-level correlation options override the same keys in `options.metadata`. Useful for eval cases, CI job IDs, request tracing, and future stats/cohort views. They are **metadata only** — they do not replace `runId`. Treat sensitive IDs as trace data before sharing exports.
|
|
33
35
|
- **`maybeInspectRun(name, fn, options?)`**: same as `inspectRun` when tracing is enabled; otherwise passthrough. Enablement: explicit **`options.enabled`** wins; when omitted, reads **`AGENT_INSPECT`** (`1`, `true`, `yes`, `on`, `enabled` — case-insensitive). Unset or other values disable tracing. Use in eval harnesses, CI, or jobs where tracing should be toggled by environment.
|
|
34
36
|
- **`isAgentInspectEnabled(value?)`**: returns whether a string (or `process.env.AGENT_INSPECT`) matches an enable token.
|
|
35
37
|
- **`step(name, fn, options?)`**: traces a named unit of work inside `inspectRun` (`step_started` / `step_completed`). Step `metadata` inherits the parent run's redaction and size-bound settings.
|
|
36
38
|
- **`step.llm(model, fn)`**: convenience wrapper (`type: "llm"`, `metadata.model`).
|
|
37
39
|
- **`step.tool(toolName, fn)`**: convenience wrapper (`type: "tool"`, `metadata.toolName`).
|
|
38
40
|
- **`observe(agent, options?)`**: proxy wrapper that traces top-level `run` / `execute` / `invoke` methods via `inspectRun`.
|
|
41
|
+
- **`getCurrentCorrelationMetadata()`**: returns active run correlation fields (`correlationId`, `requestId`, `decisionId`, `groupId`) inside `inspectRun` / `maybeInspectRun`; `undefined` outside a traced run or when none were set.
|
|
42
|
+
- **`RedactionProfile`**: `"local" | "share" | "strict"` — see `redactionProfile` on `InspectRunOptions` and `ExportOptions`.
|
|
43
|
+
- **`resolveRedactionProfile(profile?)`**: resolves profile extra keys and metadata caps (for advanced integrations).
|
|
39
44
|
|
|
40
45
|
## 3. Stable local inspection APIs
|
|
41
46
|
|
|
@@ -95,7 +100,8 @@ The CLI `tail` workflow is supported. The programmatic accumulator is experiment
|
|
|
95
100
|
|
|
96
101
|
Exports are **read-only**, **local-only**, and **compatibility-oriented**. They do not upload, stream, or integrate vendor SDKs.
|
|
97
102
|
|
|
98
|
-
- **`exportRunTree`**
|
|
103
|
+
- **`exportRunTree`**, **`redactRunTreeForExport`**
|
|
104
|
+
- **`ExportOptions.redactionProfile`**: `local` (default), `share`, or `strict` — applies key-based redaction to an exported copy without mutating the source tree.
|
|
99
105
|
- **`exportMarkdown`**, **`exportHtml`**
|
|
100
106
|
- **`exportOpenInference`** (OpenInference-compatible JSON)
|
|
101
107
|
- **`exportOtlpJson`** (OTLP JSON, experimental until verified per backend)
|
|
@@ -119,6 +125,8 @@ Diff is local and read-only. Programmatic diff surfaces are experimental until t
|
|
|
119
125
|
- **`runName`**: default `"langchain-agent"` for standalone persisted runs
|
|
120
126
|
- **`traceDir`**: defaults via `resolveTraceDir` / `AGENT_INSPECT_TRACE_DIR`
|
|
121
127
|
- **`capture`**: `"none"` | `"metadata-only"` (default) | `"preview"` (truncated previews, opt-in)
|
|
128
|
+
- **`stream`**: default `false` — when `true`, records streaming lifecycle metadata (`chunkCount`, `streamDurationMs`, etc.) on LLM end/error; does **not** capture full token text by default
|
|
129
|
+
- **`maxStreamPreviewChars`**: bounds `streamPreview` when `capture: "preview"` and `stream: true` (defaults to `maxPreviewChars`)
|
|
122
130
|
- **`redact`**: custom `RedactionRule[]` applied before disk (core defaults still apply via shared redactor)
|
|
123
131
|
- **`runId`**: optional id for standalone persisted runs
|
|
124
132
|
- In-memory **`getEvents()`** / **`clear()`** unchanged when `persist` is false
|
|
@@ -160,7 +168,7 @@ Related types: `PersistedInspectEvent`, `PersistedEventSourceType`, `PersistedEv
|
|
|
160
168
|
|
|
161
169
|
## 12. Deprecated APIs
|
|
162
170
|
|
|
163
|
-
No deprecated APIs are declared as of 1.
|
|
171
|
+
No deprecated APIs are declared as of 1.2.0.
|
|
164
172
|
|
|
165
173
|
## 13. Removal / deprecation policy
|
|
166
174
|
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -19,7 +19,7 @@ Root `agent-inspect` uses **conditional exports** for ESM/CJS TypeScript consume
|
|
|
19
19
|
- Manual traces use **`schemaVersion: "0.1"`** JSONL events (`run_started`, `step_started`, `step_completed`, `run_completed`).
|
|
20
20
|
- Failures use `step_completed` with `status: "error"` — there is no `step_failed` event.
|
|
21
21
|
- Log-derived runs use confidence labels (`explicit`, `correlated`, `heuristic`, `unknown`) and conservative tree-building rules.
|
|
22
|
-
- **v1.2.0 persisted-event foundation (
|
|
22
|
+
- **v1.2.0 persisted-event foundation (released):** source-agnostic `PersistedInspectEvent` helpers (`schemaVersion: "0.2"`) — types, validators, converters, and in-memory tree bridge. Existing **`TreeBuilder`** remains the canonical tree builder. v0.2 bridge works **in memory only**; storage dual-read and CLI integration are v1.3+ / post-foundation work. See [proposals/UNIFIED-PERSISTED-INSPECT-EVENT.md](./proposals/UNIFIED-PERSISTED-INSPECT-EVENT.md) and [implementation/V1.3.0-RELEASE-TRAIN.md](./implementation/V1.3.0-RELEASE-TRAIN.md).
|
|
23
23
|
|
|
24
24
|
See [SCHEMA.md](./SCHEMA.md) for field reference and [API.md](./API.md) for public surfaces (stable vs experimental).
|
|
25
25
|
|
package/docs/CLI.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# CLI (AgentInspect 1.
|
|
1
|
+
# CLI (AgentInspect 1.x)
|
|
2
2
|
|
|
3
3
|
This document describes the **stable CLI surface** of AgentInspect.
|
|
4
4
|
|
|
@@ -178,6 +178,14 @@ Options:
|
|
|
178
178
|
- `--include-attributes`: include bounded attributes (review before sharing)
|
|
179
179
|
- `--no-metadata`: omit summary/metadata sections
|
|
180
180
|
- `--no-errors`: omit error sections
|
|
181
|
+
- `--redaction-profile <profile>`: redaction profile for exported copies — `local` (default), `share`, or `strict`. Key-based safety only; review exports before sharing.
|
|
182
|
+
|
|
183
|
+
Examples:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
npx agent-inspect export <run-id> --format markdown --redaction-profile share
|
|
187
|
+
npx agent-inspect export <run-id> --format html --redaction-profile strict
|
|
188
|
+
```
|
|
181
189
|
|
|
182
190
|
### 6.7 `diff`
|
|
183
191
|
|
package/docs/EXPORTS.md
CHANGED
|
@@ -6,6 +6,20 @@ AgentInspect supports local-only exports from run trees and traces. Exports are
|
|
|
6
6
|
- **Schema + compatibility guarantees**: `docs/SCHEMA.md`
|
|
7
7
|
- **Safety / redaction notes**: `docs/CLI.md`, `SECURITY.md`, and `docs/SCHEMA.md` (redaction section)
|
|
8
8
|
|
|
9
|
+
## Share-safe exports (v1.3.0+)
|
|
10
|
+
|
|
11
|
+
Use `--redaction-profile share` (PRs, issues, internal threads) or `strict` (external sharing) when generating an export copy:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
agent-inspect export <run-id> --format markdown --redaction-profile share
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
- Profiles are **key-based** redaction presets — not compliance-grade PII detection.
|
|
18
|
+
- Export redaction operates on a **copy** of the run tree; original JSONL traces on disk are **not mutated**.
|
|
19
|
+
- **Review** every export before posting — especially when `--include-attributes` is set.
|
|
20
|
+
|
|
21
|
+
See [SAFE-TRACE-SHARING.md](./SAFE-TRACE-SHARING.md).
|
|
22
|
+
|
|
9
23
|
Notes:
|
|
10
24
|
- Export formats (Markdown/HTML/OpenInference/OTLP JSON) are documented as **experimental / compatibility-oriented** in `docs/API.md`.
|
|
11
25
|
- AgentInspect does **not** upload anywhere; exports write local strings/files only.
|
package/docs/LIMITATIONS.md
CHANGED
|
@@ -9,12 +9,22 @@ This document states what AgentInspect **does not** provide today. It complement
|
|
|
9
9
|
- **No vendor upload pipeline**: no built-in Langfuse/Braintrust/New Relic/Datadog direct exporters as live sinks.
|
|
10
10
|
- **No automatic universal instrumentation** of every framework: integration is explicit (manual traces, log ingest, optional adapters).
|
|
11
11
|
|
|
12
|
+
## Correlation metadata (v1.3.0 chunk 1)
|
|
13
|
+
|
|
14
|
+
- **No CLI filter/query** by `correlationId`, `requestId`, `decisionId`, or `groupId` yet — fields are written to `run_started.metadata` and available via persisted converters; list/view/export filtering is future work.
|
|
15
|
+
|
|
12
16
|
## Persisted event model (v1.2.0 foundation)
|
|
13
17
|
|
|
14
18
|
- **v0.2 is not the default persisted trace file format.** `inspectRun()` / `step()` still write `schemaVersion: "0.1"` JSONL.
|
|
15
19
|
- **CLI commands** (`list`, `view`, `export`, `diff`, `logs`, `tail`) still primarily operate on current v0.1 trace and log paths.
|
|
16
20
|
- **v0.2 read/write integration** (dual-format storage, CLI consumption) is future work — v1.2.0 ships in-memory converters and canonical fixtures only.
|
|
17
21
|
|
|
22
|
+
## LangChain streaming (v1.3.0)
|
|
23
|
+
|
|
24
|
+
- **Metadata-focused only** — `stream: true` records chunk counts, timing, and optional bounded previews; it is **not** a replay/cassette system.
|
|
25
|
+
- **No full token stream storage by default** — even with `stream: true`, `capture: "metadata-only"` does not persist raw streamed text.
|
|
26
|
+
- **No per-token JSONL events** — streaming does not emit one trace line per token.
|
|
27
|
+
|
|
18
28
|
## Data fidelity
|
|
19
29
|
|
|
20
30
|
- **No full prompt/output capture by default** for manual traces (by design: safety and PII risk).
|
|
@@ -23,6 +33,7 @@ This document states what AgentInspect **does not** provide today. It complement
|
|
|
23
33
|
|
|
24
34
|
## Trace safety bounds
|
|
25
35
|
|
|
36
|
+
- **Redaction profiles** (`local`, `share`, `strict`) are key-based presets — not compliance-grade PII detection. Review exports before sharing even with `--redaction-profile strict`.
|
|
26
37
|
- **Default metadata redaction** covers common sensitive keys only (exact key match, case-insensitive). Custom secret field names are not redacted unless you add rules via `redact: { rules: [...] }`.
|
|
27
38
|
- **Metadata truncation** applies to string values and nested structures; very large metadata may be replaced with a truncation marker when `maxEventBytes` is exceeded (default 64 KiB per JSONL line).
|
|
28
39
|
- **Redaction is not encryption.** Local trace files remain readable on disk; treat `.agent-inspect-runs/` like any developer artifact that may contain operational data.
|
package/docs/SCHEMA.md
CHANGED
|
@@ -129,6 +129,7 @@ Unknown status must **not** be treated as success.
|
|
|
129
129
|
## 6. Metadata policy
|
|
130
130
|
|
|
131
131
|
- Runs may include `metadata` on `run_started`.
|
|
132
|
+
- **Correlation metadata (v1.3.0+):** optional `correlationId`, `requestId`, `decisionId`, and `groupId` on `run_started.metadata` when passed via `inspectRun` / `maybeInspectRun` options. Event names remain unchanged (`run_started`, `step_started`, `step_completed`, `run_completed`). CLI list/view does not filter by correlation fields yet.
|
|
132
133
|
- Steps may include `metadata` on `step_started`.
|
|
133
134
|
- Manual traces intentionally avoid full prompt/output capture by default.
|
|
134
135
|
- **Redaction (default on):** before disk, `inspectRun` / `step` redact sensitive keys using the shared `Redactor` defaults (`authorization`, `cookie`, `token`, `apiKey`, `password`, `secret`, `email`). Opt out with `redact: false`.
|