agent-inspect 1.9.0 → 2.1.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 +14 -0
- package/README.md +27 -10
- package/docs/ADAPTER-CONFORMANCE.md +1 -1
- package/docs/ADAPTERS.md +4 -0
- package/docs/API.md +76 -35
- package/docs/CLI.md +129 -11
- package/docs/COMPARE.md +5 -4
- package/docs/EXPORTS.md +1 -1
- package/docs/GETTING-STARTED.md +26 -7
- package/docs/KNOWN-ISSUES.md +15 -3
- package/docs/LIMITATIONS.md +9 -7
- package/docs/MIGRATION.md +8 -8
- package/docs/SCHEMA.md +29 -12
- package/package.json +2 -2
- package/packages/cli/dist/index.cjs +9808 -8624
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +9807 -8623
- package/packages/cli/dist/index.mjs.map +1 -1
- package/packages/core/dist/advanced.cjs +2047 -26
- package/packages/core/dist/advanced.cjs.map +1 -1
- package/packages/core/dist/advanced.d.cts +346 -196
- package/packages/core/dist/advanced.d.ts +346 -196
- package/packages/core/dist/advanced.mjs +628 -5
- package/packages/core/dist/advanced.mjs.map +1 -1
- package/packages/core/dist/checks.d.cts +1 -1
- package/packages/core/dist/checks.d.ts +1 -1
- package/packages/core/dist/chunk-2ZXEMWGK.mjs +549 -0
- package/packages/core/dist/chunk-2ZXEMWGK.mjs.map +1 -0
- package/packages/core/dist/{chunk-57S5D6HR.mjs → chunk-4JVGFNQH.mjs} +50 -6
- package/packages/core/dist/chunk-4JVGFNQH.mjs.map +1 -0
- package/packages/core/dist/{chunk-6QSLZCBJ.mjs → chunk-A4V2H3YU.mjs} +329 -163
- package/packages/core/dist/chunk-A4V2H3YU.mjs.map +1 -0
- package/packages/core/dist/{chunk-74XZ6N7Q.mjs → chunk-IZBJAZGF.mjs} +12 -4
- package/packages/core/dist/chunk-IZBJAZGF.mjs.map +1 -0
- package/packages/core/dist/{chunk-VTIB5MDK.mjs → chunk-NQZPZ2FN.mjs} +15 -10
- package/packages/core/dist/chunk-NQZPZ2FN.mjs.map +1 -0
- package/packages/core/dist/{chunk-TZISEVLQ.mjs → chunk-XUNJMAPD.mjs} +3 -3
- package/packages/core/dist/{chunk-TZISEVLQ.mjs.map → chunk-XUNJMAPD.mjs.map} +1 -1
- package/packages/core/dist/context-CSKnzpXR.d.cts +177 -0
- package/packages/core/dist/context-yv2VSDQF.d.ts +177 -0
- package/packages/core/dist/diff.d.cts +2 -2
- package/packages/core/dist/diff.d.ts +2 -2
- package/packages/core/dist/diff.mjs +473 -3
- package/packages/core/dist/diff.mjs.map +1 -1
- package/packages/core/dist/exporters.cjs +691 -0
- package/packages/core/dist/exporters.cjs.map +1 -1
- package/packages/core/dist/exporters.d.cts +24 -3
- package/packages/core/dist/exporters.d.ts +24 -3
- package/packages/core/dist/exporters.mjs +1113 -3
- package/packages/core/dist/exporters.mjs.map +1 -1
- package/packages/core/dist/index.cjs +1385 -8168
- package/packages/core/dist/index.cjs.map +1 -1
- package/packages/core/dist/index.d.cts +8 -350
- package/packages/core/dist/index.d.ts +8 -350
- package/packages/core/dist/index.mjs +18 -1478
- package/packages/core/dist/index.mjs.map +1 -1
- package/packages/core/dist/{log-config-DanPV3P9.d.cts → log-config-8aE5Kxtr.d.cts} +1 -1
- package/packages/core/dist/{log-config-BPHS4Sds.d.ts → log-config-DVimQJho.d.ts} +1 -1
- package/packages/core/dist/logs.d.cts +2 -2
- package/packages/core/dist/logs.d.ts +2 -2
- package/packages/core/dist/logs.mjs +785 -2
- package/packages/core/dist/logs.mjs.map +1 -1
- package/packages/core/dist/{persisted-inspect-event-Cw7TeYGr.d.ts → persisted-inspect-event-D-WpXeZX.d.ts} +14 -5
- package/packages/core/dist/{persisted-inspect-event-DHPfzUd8.d.cts → persisted-inspect-event-DHcHPUKv.d.cts} +14 -5
- package/packages/core/dist/persisted.cjs +11 -1
- package/packages/core/dist/persisted.cjs.map +1 -1
- package/packages/core/dist/persisted.d.cts +4 -4
- package/packages/core/dist/persisted.d.ts +4 -4
- package/packages/core/dist/persisted.mjs +150 -3
- package/packages/core/dist/persisted.mjs.map +1 -1
- package/packages/core/dist/readers.cjs +27 -10
- package/packages/core/dist/readers.cjs.map +1 -1
- package/packages/core/dist/readers.d.cts +1 -1
- package/packages/core/dist/readers.d.ts +1 -1
- package/packages/core/dist/readers.mjs +1580 -4
- package/packages/core/dist/readers.mjs.map +1 -1
- package/packages/core/dist/{types-Ap9uMdx_.d.ts → types-D-Y1kOU-.d.ts} +2 -2
- package/packages/core/dist/{types-B2-BU5CS.d.cts → types-DgMN3qow.d.cts} +2 -2
- package/packages/core/dist/writers.cjs +49 -3
- package/packages/core/dist/writers.cjs.map +1 -1
- package/packages/core/dist/writers.d.cts +1 -1
- package/packages/core/dist/writers.d.ts +1 -1
- package/packages/core/dist/writers.mjs +341 -4
- package/packages/core/dist/writers.mjs.map +1 -1
- package/packages/core/dist/chunk-57S5D6HR.mjs.map +0 -1
- package/packages/core/dist/chunk-6QSLZCBJ.mjs.map +0 -1
- package/packages/core/dist/chunk-6SZPTECC.mjs +0 -342
- package/packages/core/dist/chunk-6SZPTECC.mjs.map +0 -1
- package/packages/core/dist/chunk-74XZ6N7Q.mjs.map +0 -1
- package/packages/core/dist/chunk-HR7G62IE.mjs +0 -785
- package/packages/core/dist/chunk-HR7G62IE.mjs.map +0 -1
- package/packages/core/dist/chunk-TFLPUZ56.mjs +0 -1571
- package/packages/core/dist/chunk-TFLPUZ56.mjs.map +0 -1
- package/packages/core/dist/chunk-U2BGPESY.mjs +0 -150
- package/packages/core/dist/chunk-U2BGPESY.mjs.map +0 -1
- package/packages/core/dist/chunk-VTIB5MDK.mjs.map +0 -1
- package/packages/core/dist/chunk-Y56BPA3B.mjs +0 -990
- package/packages/core/dist/chunk-Y56BPA3B.mjs.map +0 -1
- package/packages/core/dist/chunk-YWAOOXLR.mjs +0 -475
- package/packages/core/dist/chunk-YWAOOXLR.mjs.map +0 -1
package/docs/CLI.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# CLI
|
|
1
|
+
# CLI
|
|
2
2
|
|
|
3
3
|
This document describes the **stable CLI surface** of AgentInspect.
|
|
4
4
|
|
|
@@ -26,7 +26,10 @@ Core commands:
|
|
|
26
26
|
- `tail` — live-tail logs into updating local trees
|
|
27
27
|
- `export` — export manual traces to Markdown/HTML/OpenInference/OTLP JSON (local only)
|
|
28
28
|
- `open` — read supported local trace files, directories, or stdin through the canonical reader pipeline
|
|
29
|
+
- `migrate` — convert one local AgentInspect JSONL file to schema 1.0 with dry-run or explicit output
|
|
29
30
|
- `check` — run deterministic local trace checks with stable JSON and exit codes
|
|
31
|
+
- `eval` — run deterministic local evals over existing traces
|
|
32
|
+
- `redact` — redact a local JSON/JSONL file or trace copy
|
|
30
33
|
- `scan` — best-effort local safety scan for trace capture risks
|
|
31
34
|
- `verify-safe` — best-effort local trace safety verification
|
|
32
35
|
- `artifacts` — create safe local CI trace artifact bundles and optional step summaries
|
|
@@ -57,6 +60,12 @@ Exception: `check` uses CI-oriented semantic exit codes:
|
|
|
57
60
|
- **3**: trace input could not be read
|
|
58
61
|
- **4**: unsupported or ambiguous trace format
|
|
59
62
|
|
|
63
|
+
Exception: `eval` uses local eval semantic exit codes:
|
|
64
|
+
|
|
65
|
+
- **0**: all selected eval rules passed
|
|
66
|
+
- **1**: eval ran and at least one error-severity rule failed
|
|
67
|
+
- **2**: invalid arguments, invalid config, unreadable input, unsupported input, ambiguous input, or run-selection errors
|
|
68
|
+
|
|
60
69
|
Exception: `scan` and `verify-safe` use local safety status exit codes:
|
|
61
70
|
|
|
62
71
|
- **0**: status is SAFE or SAFE WITH WARNINGS
|
|
@@ -78,6 +87,8 @@ Many commands support `--json` for scripting. JSON output is intended to be:
|
|
|
78
87
|
- Log-derived output includes **confidence** labels and avoids inventing parent-child relationships.
|
|
79
88
|
- Redaction defaults are conservative (e.g. `authorization`, `cookie`, `token`, `apiKey`, `password`, `secret`, `email`).
|
|
80
89
|
- Exported payloads are **redacted by default** unless explicitly configured otherwise.
|
|
90
|
+
- `eval` is deterministic and local-only. It does not replay agents, call model providers, upload traces, or create hosted datasets.
|
|
91
|
+
- `redact` writes or prints a redacted copy. It does not mutate source trace files.
|
|
81
92
|
- `scan` and `verify-safe` are best-effort local checks, not compliance, privacy, security, or regulatory certifications.
|
|
82
93
|
- `artifacts` renders structural summaries and check evidence only; it does not include raw prompt/output bodies, request/response bodies, headers, API keys, secrets, or full tool payloads.
|
|
83
94
|
|
|
@@ -243,7 +254,36 @@ cat packages/core/test/fixtures/openinference-basic.json | npx agent-inspect ope
|
|
|
243
254
|
|
|
244
255
|
When a directory or payload contains multiple runs, `open` lists the run ids and exits until you pass `--run <run-id>`.
|
|
245
256
|
|
|
246
|
-
### 6.8 `
|
|
257
|
+
### 6.8 `migrate`
|
|
258
|
+
|
|
259
|
+
Convert one local AgentInspect JSONL trace file to the stable schema 1.0 persisted contract. This command is local and non-destructive by default: it does not upload traces, run agents, mutate the input file, or overwrite originals.
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
agent-inspect migrate <input.jsonl> --to 1.0 --dry-run
|
|
263
|
+
agent-inspect migrate <input.jsonl> --to 1.0 --output <output.jsonl>
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Options:
|
|
267
|
+
|
|
268
|
+
- `--to 1.0`: required target schema version
|
|
269
|
+
- `--dry-run`: print deterministic counts and warnings without writing output
|
|
270
|
+
- `-o, --output <path>`: write migrated schema 1.0 JSONL to a separate file
|
|
271
|
+
- `--force`: accepted only for explicit output validation; input overwrite is still refused
|
|
272
|
+
|
|
273
|
+
Input support:
|
|
274
|
+
|
|
275
|
+
- v0.1 manual trace rows are converted to schema 1.0 persisted rows.
|
|
276
|
+
- v0.2 and v1.0 persisted rows are preserved/upgraded through the shared persisted contract.
|
|
277
|
+
- malformed JSON and unsupported schema rows are reported as line warnings.
|
|
278
|
+
|
|
279
|
+
Examples:
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
npx agent-inspect migrate fixtures/traces/minimal-success.jsonl --to 1.0 --dry-run
|
|
283
|
+
npx agent-inspect migrate fixtures/traces/minimal-success.jsonl --to 1.0 --output fixtures/traces/minimal-success.v1.jsonl
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### 6.9 `check`
|
|
247
287
|
|
|
248
288
|
Run deterministic checks against a local trace. This command is local and read-only: it does not rerun agents, call models, upload traces, or mutate input files.
|
|
249
289
|
|
|
@@ -292,7 +332,85 @@ npx agent-inspect check trace.jsonl --max-duration-ms 30000 --required-tool sear
|
|
|
292
332
|
|
|
293
333
|
Recipe: [examples/recipes/deterministic-ci-checks](../examples/recipes/deterministic-ci-checks/README.md)
|
|
294
334
|
|
|
295
|
-
### 6.
|
|
335
|
+
### 6.10 `eval`
|
|
336
|
+
|
|
337
|
+
Run deterministic local evals against an existing trace. This command reads through the same local reader pipeline as `open` and `check`; it does not rerun agents, call models, upload traces, mutate inputs, or create a hosted dataset.
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
agent-inspect eval <trace-path-or-run-id> [options]
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
Options:
|
|
344
|
+
|
|
345
|
+
- `--dir <path>`: trace directory for run-id lookup
|
|
346
|
+
- `--format <agent-inspect-jsonl|openinference-json|otlp-json>`: explicit trace input format
|
|
347
|
+
- `--run <run-id>`: select a run when input contains multiple runs
|
|
348
|
+
- `--config <path>`: eval config (`.json`, `.js`, `.mjs`, or `.cjs`); TypeScript configs are rejected until an explicit loader is approved
|
|
349
|
+
- `--json`: print deterministic JSON eval result
|
|
350
|
+
- `--markdown`: print deterministic Markdown eval summary
|
|
351
|
+
- `--require-success`: require the selected run to complete successfully
|
|
352
|
+
- `--required-tool <name>`: require a tool name (repeatable)
|
|
353
|
+
- `--forbid-tool <name>` / `--forbidden-tool <name>`: forbid a tool name (repeatable)
|
|
354
|
+
- `--max-duration-ms <number>`, `--max-depth <number>`, `--max-retries <number>`, `--max-total-tokens <number>`
|
|
355
|
+
- `--require-retrieval-before-generation`
|
|
356
|
+
- `--required-decision-metadata <key>`: require decision metadata (repeatable)
|
|
357
|
+
- `--context-overlap`, `--min-context-overlap <number>`, `--min-shared-terms <number>`
|
|
358
|
+
- `--quote-overlap`
|
|
359
|
+
- `--citation-presence`
|
|
360
|
+
- `--required-source-id <id>`: require a source id in context or citations (repeatable)
|
|
361
|
+
- `--min-answer-characters <number>`, `--max-answer-characters <number>`, `--min-answer-words <number>`, `--max-answer-words <number>`
|
|
362
|
+
- `--banned-phrase <text>`: ban unsupported-answer phrasing (repeatable)
|
|
363
|
+
|
|
364
|
+
Example config:
|
|
365
|
+
|
|
366
|
+
```json
|
|
367
|
+
{
|
|
368
|
+
"eval": {
|
|
369
|
+
"requireSuccess": true,
|
|
370
|
+
"requiredTools": ["searchDocs"],
|
|
371
|
+
"forbiddenTools": ["deleteAccount"],
|
|
372
|
+
"citationPresence": true,
|
|
373
|
+
"contextOverlap": { "minOverlap": 0.2 },
|
|
374
|
+
"requiredSourceIds": ["policy-30-day"]
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
Examples:
|
|
380
|
+
|
|
381
|
+
```bash
|
|
382
|
+
npx agent-inspect eval fixtures/traces-v0.2/manual-basic.jsonl --require-success --json
|
|
383
|
+
npx agent-inspect eval trace.jsonl --forbid-tool deleteAccount --markdown
|
|
384
|
+
npx agent-inspect eval trace.jsonl --config agent-inspect.eval.json --json
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
Recipes: [eval-local-checks](../examples/recipes/eval-local-checks/README.md) and [eval-ci-artifacts](../examples/recipes/eval-ci-artifacts/README.md).
|
|
388
|
+
|
|
389
|
+
### 6.11 `redact`
|
|
390
|
+
|
|
391
|
+
Redact a local JSON or JSONL trace/file. The command prints or writes a redacted copy and reports bounded findings; it does not mutate the source file or upload content.
|
|
392
|
+
|
|
393
|
+
```bash
|
|
394
|
+
agent-inspect redact <trace-or-file> [options]
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
Options:
|
|
398
|
+
|
|
399
|
+
- `--dir <path>`: trace directory for run-id lookup
|
|
400
|
+
- `--profile <local|share|strict>`: redaction profile (default `share`)
|
|
401
|
+
- `-o, --output <path>`: write redacted content to a file
|
|
402
|
+
- `--json`: print deterministic JSON wrapper with findings
|
|
403
|
+
|
|
404
|
+
Examples:
|
|
405
|
+
|
|
406
|
+
```bash
|
|
407
|
+
npx agent-inspect redact trace.jsonl --profile share --json
|
|
408
|
+
npx agent-inspect redact trace.jsonl --profile strict -o trace.share.jsonl
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
Recipe: [redact-share-safe-file](../examples/recipes/redact-share-safe-file/README.md).
|
|
412
|
+
|
|
413
|
+
### 6.12 `scan` and `verify-safe`
|
|
296
414
|
|
|
297
415
|
Run best-effort local safety verification for supported trace inputs. These commands are local and read-only: they do not rerun agents, call models, upload traces, mutate input files, or certify compliance.
|
|
298
416
|
|
|
@@ -331,7 +449,7 @@ npx agent-inspect verify-safe minimal-success --dir fixtures/traces
|
|
|
331
449
|
npx agent-inspect verify-safe trace.jsonl --max-string-length 8192 --json
|
|
332
450
|
```
|
|
333
451
|
|
|
334
|
-
### 6.
|
|
452
|
+
### 6.13 `artifacts`
|
|
335
453
|
|
|
336
454
|
Create deterministic local CI artifacts for supported trace inputs. This command is local and read-only for trace inputs: it does not rerun agents, call models, upload files, use GitHub APIs, or mutate repository state. It writes only to `--output-dir` and, when requested, a local step-summary file.
|
|
337
455
|
|
|
@@ -371,7 +489,7 @@ npx agent-inspect artifacts candidate.jsonl --baseline baseline.jsonl --output-d
|
|
|
371
489
|
|
|
372
490
|
Recipe and sample workflow: [examples/recipes/deterministic-ci-checks](../examples/recipes/deterministic-ci-checks/README.md)
|
|
373
491
|
|
|
374
|
-
### 6.
|
|
492
|
+
### 6.14 `diff`
|
|
375
493
|
|
|
376
494
|
Compare two manual trace runs. Diff is **local** and **read-only** (does not rerun agents).
|
|
377
495
|
|
|
@@ -435,7 +553,7 @@ Differences:
|
|
|
435
553
|
|
|
436
554
|
More examples, including timing-only and structure-only diffs, are in `docs/DIFF.md`.
|
|
437
555
|
|
|
438
|
-
### 6.
|
|
556
|
+
### 6.15 `timeline`
|
|
439
557
|
|
|
440
558
|
Chronological step list for one manual trace. Read-only; does not mutate JSONL files.
|
|
441
559
|
|
|
@@ -451,7 +569,7 @@ Options:
|
|
|
451
569
|
|
|
452
570
|

|
|
453
571
|
|
|
454
|
-
### 6.
|
|
572
|
+
### 6.16 `stats`
|
|
455
573
|
|
|
456
574
|
Local aggregate statistics over trace files in a directory. Read-only.
|
|
457
575
|
|
|
@@ -471,7 +589,7 @@ Options:
|
|
|
471
589
|
|
|
472
590
|
Use `--correlation-id` or `--group-id` to filter runs by `run_started` metadata (see [API.md](./API.md)).
|
|
473
591
|
|
|
474
|
-
### 6.
|
|
592
|
+
### 6.17 `search`
|
|
475
593
|
|
|
476
594
|
Deterministic search over local traces (substring / exact filters). No semantic search.
|
|
477
595
|
|
|
@@ -501,7 +619,7 @@ npx agent-inspect search --duration ">100ms" --json
|
|
|
501
619
|
|
|
502
620
|

|
|
503
621
|
|
|
504
|
-
### 6.
|
|
622
|
+
### 6.18 `what`
|
|
505
623
|
|
|
506
624
|
Concise human-readable summary of one local trace run. Read-only; accepts v0.1 manual JSONL and v0.2 persisted-event JSONL through the shared dual-format normalization path. Vocabulary: [TRACE-VOCABULARY-V1.5.md](./proposals/TRACE-VOCABULARY-V1.5.md).
|
|
507
625
|
|
|
@@ -530,7 +648,7 @@ Outcome: Completed successfully.
|
|
|
530
648
|
Slowest: plan (100ms, logic)
|
|
531
649
|
```
|
|
532
650
|
|
|
533
|
-
### 6.
|
|
651
|
+
### 6.19 `report`
|
|
534
652
|
|
|
535
653
|
Generate a local inspection report combining **what happened**, **timeline**, and **execution tree** sections. The command reads local v0.1 manual JSONL and v0.2 persisted-event JSONL through the shared dual-format normalization path without mutating them. Distinct from `export` (which targets shareable tree snapshots and standards formats).
|
|
536
654
|
|
|
@@ -555,7 +673,7 @@ Example:
|
|
|
555
673
|
npx agent-inspect report minimal-success --dir fixtures/traces --format html -o report.html
|
|
556
674
|
```
|
|
557
675
|
|
|
558
|
-
### 6.
|
|
676
|
+
### 6.20 `explain`
|
|
559
677
|
|
|
560
678
|
Explain a local trace using deterministic facts and local inference labels. This command reads through the same local reader pipeline as `open` / `check`; it does not call a model provider, upload traces, replay agents, or mutate input files.
|
|
561
679
|
|
package/docs/COMPARE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## Compare AgentInspect
|
|
2
2
|
|
|
3
|
-
AgentInspect is a local-first execution-tree debugger for TypeScript AI agents. It’s designed for inner-loop debugging and quick inspection — not as a replacement for hosted observability, evaluation, or production monitoring platforms.
|
|
3
|
+
AgentInspect is a local-first execution-tree debugger for TypeScript AI agents. It’s designed for inner-loop debugging, deterministic local eval heuristics, redaction, and quick inspection — not as a replacement for hosted observability, dataset evaluation, or production monitoring platforms.
|
|
4
4
|
|
|
5
5
|
## AgentInspect vs console.log
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@ LangSmith is a hosted/platform workflow for tracing, evaluation, and observabili
|
|
|
16
16
|
AgentInspect is local-first CLI debugging:
|
|
17
17
|
|
|
18
18
|
- Use AgentInspect to debug locally before/alongside LangSmith when iterating on agent logic.
|
|
19
|
-
- AgentInspect does not provide hosted dashboards, dataset/eval workflows, or production tracing pipelines.
|
|
19
|
+
- AgentInspect does not provide hosted dashboards, dataset/eval management workflows, or production tracing pipelines.
|
|
20
20
|
|
|
21
21
|
## AgentInspect vs Langfuse
|
|
22
22
|
|
|
@@ -33,7 +33,7 @@ Braintrust is strong for evals, regressions, datasets, and production AI quality
|
|
|
33
33
|
|
|
34
34
|
AgentInspect is lighter and local-first:
|
|
35
35
|
|
|
36
|
-
- Use AgentInspect to understand a single run locally.
|
|
36
|
+
- Use AgentInspect to understand a single run locally and run deterministic trace checks/eval heuristics before sharing artifacts.
|
|
37
37
|
- Use Braintrust when you want repeatable evals, comparisons at scale, and production quality workflows.
|
|
38
38
|
|
|
39
39
|
## AgentInspect vs Phoenix / OpenInference
|
|
@@ -61,9 +61,10 @@ AgentInspect avoids SDK/collector setup for local debugging:
|
|
|
61
61
|
| --- | --- |
|
|
62
62
|
| Local agent debugging | Strong fit |
|
|
63
63
|
| No-account CLI tracing | Strong fit |
|
|
64
|
+
| Deterministic local eval heuristics | Good fit |
|
|
65
|
+
| Share-safe local redaction copy | Good fit |
|
|
64
66
|
| Production dashboards | Not the goal |
|
|
65
67
|
| Hosted eval datasets | Not the goal |
|
|
66
68
|
| Prompt management | Not the goal |
|
|
67
69
|
| Standards-aligned local export | Partial (compatibility-oriented) |
|
|
68
70
|
| Full observability platform | Use a dedicated platform |
|
|
69
|
-
|
package/docs/EXPORTS.md
CHANGED
|
@@ -75,7 +75,7 @@ Experimental helpers (local-only):
|
|
|
75
75
|
- `exportMarkdown`, `exportHtml`, `exportOpenInference`, `exportOtlpJson`
|
|
76
76
|
- `validateExport`, `validateExportContent`
|
|
77
77
|
|
|
78
|
-
See [API.md](./API.md) §7.
|
|
78
|
+
Import these from `agent-inspect/exporters`. See [API.md](./API.md) §7.
|
|
79
79
|
|
|
80
80
|
## What not to share
|
|
81
81
|
|
package/docs/GETTING-STARTED.md
CHANGED
|
@@ -70,6 +70,7 @@ Use the root import for stable beginner APIs:
|
|
|
70
70
|
|
|
71
71
|
```ts
|
|
72
72
|
import {
|
|
73
|
+
createInspector,
|
|
73
74
|
observe,
|
|
74
75
|
inspectRun,
|
|
75
76
|
maybeInspectRun,
|
|
@@ -88,7 +89,7 @@ import { diffTraceEvents } from "agent-inspect/diff";
|
|
|
88
89
|
import { exportMarkdown } from "agent-inspect/exporters";
|
|
89
90
|
import { parseLogsToTrees } from "agent-inspect/logs";
|
|
90
91
|
import { traceEventsToPersistedInspectEvents } from "agent-inspect/persisted";
|
|
91
|
-
import {
|
|
92
|
+
import { createInspectorRuntime } from "agent-inspect/advanced";
|
|
92
93
|
```
|
|
93
94
|
|
|
94
95
|
### Always trace vs env-gated tracing
|
|
@@ -203,17 +204,34 @@ agent-inspect search --dir ./.agent-inspect --status error --limit 10
|
|
|
203
204
|
|
|
204
205
|
For CI artifact workflows, see [CI-ARTIFACTS.md](./CI-ARTIFACTS.md) and [github-actions-artifact recipe](../examples/recipes/github-actions-artifact/).
|
|
205
206
|
|
|
206
|
-
## 10.
|
|
207
|
+
## 10. Run local evals and redact share copies
|
|
208
|
+
|
|
209
|
+
After a trace exists, run deterministic eval checks without replaying the agent or calling a model provider:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
agent-inspect eval minimal-success --dir fixtures/traces --require-success --json
|
|
213
|
+
agent-inspect eval trace.jsonl --forbid-tool deleteAccount --citation-presence --json
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Before attaching a trace or JSON artifact to a PR, issue, or support thread, create a redacted local copy:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
agent-inspect redact trace.jsonl --profile share --json
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Recipes: [eval-local-checks](../examples/recipes/eval-local-checks/), [redact-share-safe-file](../examples/recipes/redact-share-safe-file/), and [eval-ci-artifacts](../examples/recipes/eval-ci-artifacts/).
|
|
223
|
+
|
|
224
|
+
## 11. Diff two runs
|
|
207
225
|
|
|
208
226
|
```bash
|
|
209
227
|
agent-inspect diff minimal-success minimal-error --dir fixtures/traces
|
|
210
228
|
```
|
|
211
229
|
|
|
212
|
-
##
|
|
230
|
+
## 12. Try recipes
|
|
213
231
|
|
|
214
232
|
See `examples/recipes/README.md`.
|
|
215
233
|
|
|
216
|
-
##
|
|
234
|
+
## 13. Optional framework adapters
|
|
217
235
|
|
|
218
236
|
See [ADAPTERS.md](./ADAPTERS.md) for AI SDK local telemetry, OpenAI Agents local-only processing, and LangChain callbacks.
|
|
219
237
|
|
|
@@ -227,7 +245,7 @@ pnpm add @agent-inspect/langchain
|
|
|
227
245
|
|
|
228
246
|
See [examples/08-langchain-adapter](../examples/08-langchain-adapter/README.md) and [docs/ADAPTERS.md](./ADAPTERS.md).
|
|
229
247
|
|
|
230
|
-
##
|
|
248
|
+
## 14. Optional TUI
|
|
231
249
|
|
|
232
250
|
`@agent-inspect/tui` is optional and **experimental**. The CLI can invoke it with:
|
|
233
251
|
|
|
@@ -235,16 +253,17 @@ See [examples/08-langchain-adapter](../examples/08-langchain-adapter/README.md)
|
|
|
235
253
|
agent-inspect view <runId> --tui
|
|
236
254
|
```
|
|
237
255
|
|
|
238
|
-
##
|
|
256
|
+
## 15. Safety notes
|
|
239
257
|
|
|
240
258
|
- Nothing uploads by default; core tracing, readers, checks, and exports are local-first.
|
|
259
|
+
- Eval and redaction commands read local inputs and do not call provider APIs or hosted services.
|
|
241
260
|
- Redaction is on by default for log-derived attributes, **manual trace metadata (before disk)**, and exports. Pass `redact: false` to opt out of manual metadata redaction.
|
|
242
261
|
- Export redaction shapes a local copy and does not mutate the source trace; review exported files before sharing.
|
|
243
262
|
- Persisted events are size-bounded by default (see `docs/API.md`).
|
|
244
263
|
- Confidence labels are required to keep attribution honest.
|
|
245
264
|
- AgentInspect is for local debugging, not production monitoring.
|
|
246
265
|
|
|
247
|
-
##
|
|
266
|
+
## 16. Next docs
|
|
248
267
|
|
|
249
268
|
- [docs/API.md](./API.md)
|
|
250
269
|
- [docs/CLI.md](./CLI.md)
|
package/docs/KNOWN-ISSUES.md
CHANGED
|
@@ -12,6 +12,12 @@ AgentInspect is **local-first** and **CLI-first**. These behaviors are intention
|
|
|
12
12
|
- **OpenInference** and **OTLP JSON** exports are **compatibility-oriented** and **experimental**. Validate against your target collector or backend before relying on them.
|
|
13
13
|
- Exports generate **strings/files locally** only—there is **no** automatic upload.
|
|
14
14
|
|
|
15
|
+
## Eval and redaction
|
|
16
|
+
|
|
17
|
+
- **`agent-inspect eval` is deterministic local eval, not hosted evaluation.** Built-in rules are structural checks and grounding heuristics over existing traces. They do not call model providers, manage datasets, replay agents, or perform semantic LLM judging.
|
|
18
|
+
- **TypeScript eval configs are not loaded by default.** Use `.json`, `.js`, `.mjs`, or `.cjs` until an explicit loader path is approved.
|
|
19
|
+
- **`agent-inspect redact` creates a local redacted copy.** It does not mutate source traces, encrypt files, or guarantee compliance-grade detection. Review the exact output before sharing.
|
|
20
|
+
|
|
15
21
|
## Readers and `open`
|
|
16
22
|
|
|
17
23
|
- **OpenInference** and **OTLP JSON** readers are **compatibility-oriented** and **experimental**. They normalize local JSON payloads into AgentInspect inspection trees and may warn on unsupported semantic fields.
|
|
@@ -23,7 +29,7 @@ AgentInspect is **local-first** and **CLI-first**. These behaviors are intention
|
|
|
23
29
|
|
|
24
30
|
- **Vendor sinks** (hosted dashboards, Langfuse/Braintrust/New Relic/Datadog native uploads, OTLP gRPC streaming, etc.) are **not implemented** in the core packages described here.
|
|
25
31
|
- **AI SDK adapter** (`@agent-inspect/ai-sdk`) is experimental and metadata-first. It depends on explicit AI SDK telemetry configuration and requires `recordInputs: false` / `recordOutputs: false` for the documented safe path.
|
|
26
|
-
- **OpenAI Agents JS adapter** (`@agent-inspect/openai-agents`) is experimental and
|
|
32
|
+
- **OpenAI Agents JS adapter** (`@agent-inspect/openai-agents`) is experimental and metadata-first. Runtime metadata mapping is local-only; the safe install path is `setTraceProcessors()` rather than `addTraceProcessor()`. The v1.9 package publication retry is pending maintainer-side npm auto-publish setup and is separate from v2 contract work.
|
|
27
33
|
- **LangGraph support** is currently a documented boundary through `@agent-inspect/langchain`, not a dedicated package.
|
|
28
34
|
- **LangChain adapter** captures **metadata-oriented** signals by default; it does not replace full framework observability.
|
|
29
35
|
- **LangChain `stream: true`** records chunk counts and timing only — not a full token replay. Per-token JSONL events are not emitted.
|
|
@@ -93,11 +99,17 @@ pnpm compat:smoke
|
|
|
93
99
|
- Fixture pattern: [test/consumer-fixtures/jest-cjs/](../../test/consumer-fixtures/jest-cjs/).
|
|
94
100
|
- Full Jest runner smoke in CI is a documented follow-up — root package does not ship Jest as a devDependency.
|
|
95
101
|
|
|
96
|
-
##
|
|
102
|
+
## v2 migration notes
|
|
103
|
+
|
|
104
|
+
- Advanced APIs no longer live on the root import in the v2 contract. Use `agent-inspect/readers`, `/writers`, `/checks`, `/diff`, `/exporters`, `/logs`, `/persisted`, and `/advanced`.
|
|
105
|
+
- The small root value API is `createInspector`, `inspectRun`, `maybeInspectRun`, `step`, `observe`, and `getCurrentCorrelationMetadata`.
|
|
106
|
+
- Use `agent-inspect migrate <trace.jsonl> --to 1.0 --dry-run` before writing migrated output. The command does not rewrite input files.
|
|
107
|
+
|
|
108
|
+
## v1.8/v1.9 adoption notes
|
|
97
109
|
|
|
98
|
-
- `@agent-inspect/vitest` and `@agent-inspect/jest` are private/unpublished until the v1.8 release-readiness gate completes. The [test reporter artifact recipe](../examples/recipes/test-reporter-artifacts/README.md) documents the intended config shape without requiring those packages.
|
|
99
110
|
- `agent-inspect artifacts --github-summary` writes a local step-summary file only. It does not call GitHub APIs, open PR comments, upload artifacts, or mutate repository state.
|
|
100
111
|
- Baseline checks compare normalized structural facts from explicit candidate and baseline inputs. They are useful for CI regression evidence, not replay or semantic eval scoring.
|
|
112
|
+
- v2.1 eval/redact adoption recipes are local and deterministic: [eval-local-checks](../examples/recipes/eval-local-checks/), [redact-share-safe-file](../examples/recipes/redact-share-safe-file/), and [eval-ci-artifacts](../examples/recipes/eval-ci-artifacts/).
|
|
101
113
|
|
|
102
114
|
### What to include in a bug report
|
|
103
115
|
|
package/docs/LIMITATIONS.md
CHANGED
|
@@ -15,13 +15,13 @@ This document states what AgentInspect **does not** provide today. It complement
|
|
|
15
15
|
|
|
16
16
|
## Persisted event model (v1.2.0 foundation)
|
|
17
17
|
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
18
|
+
- **Manual global tracing remains v0.1.** `inspectRun()` / `step()` still write `schemaVersion: "0.1"` JSONL for compatibility.
|
|
19
|
+
- **Persisted writer/runtime output targets schema 1.0.** `createInspector()` with built-in writers emits schema 1.0 persisted rows; v0.2 remains a readable compatibility foundation.
|
|
20
|
+
- **Migration is explicit, not automatic.** `agent-inspect migrate <input> --to 1.0 --dry-run` reports what would change, and `--output <file>` writes a separate file. AgentInspect does not rewrite old traces in place.
|
|
21
21
|
|
|
22
22
|
## Runtime writers and universal readers (v1.6)
|
|
23
23
|
|
|
24
|
-
- **
|
|
24
|
+
- **Subpath APIs:** `agent-inspect/writers`, `agent-inspect/readers`, and advanced helpers are available for local adoption from their owning subpaths. `createInspector()` is part of the small root API.
|
|
25
25
|
- **Explicit writer ownership:** `createInspector()` does not print terminal lifecycle output or implicitly choose a disk writer. Use `fileWriter()` / `bufferedFileWriter()` / custom writers when persistence is desired.
|
|
26
26
|
- **No standards upload:** OpenInference and OTLP JSON support is local read/export compatibility only. There is no OTLP gRPC/HTTP streaming sink, collector client, or hosted ingestion behavior.
|
|
27
27
|
- **Conservative detection:** `agent-inspect open` does not silently accept arbitrary JSON. Unsupported or ambiguous inputs produce errors/warnings rather than guessed traces.
|
|
@@ -31,7 +31,7 @@ This document states what AgentInspect **does not** provide today. It complement
|
|
|
31
31
|
|
|
32
32
|
- **AI SDK integration is explicit telemetry wiring.** Use `@agent-inspect/ai-sdk` through AI SDK `experimental_telemetry.integrations`; AgentInspect does not wrap providers, patch fetch, or enable telemetry globally.
|
|
33
33
|
- **AI SDK privacy settings are caller-owned.** Examples set `recordInputs: false` and `recordOutputs: false`; leaving those enabled in user code can cause the AI SDK telemetry layer to include richer data before AgentInspect receives events.
|
|
34
|
-
- **OpenAI Agents JS support is experimental
|
|
34
|
+
- **OpenAI Agents JS support is experimental.** `@agent-inspect/openai-agents` maps metadata-only runtime spans through the safe `setTraceProcessors()` boundary and does not capture raw payloads by default. The v1.9 package publication retry is a separate maintainer npm automation task, not part of the v2 contract work.
|
|
35
35
|
- **LangGraph support is a boundary decision, not a separate package.** Initial support is expected through `@agent-inspect/langchain` callbacks unless no-network fixtures prove a separate package is needed.
|
|
36
36
|
- **No root/core adapter dependencies.** AI SDK, OpenAI Agents, LangGraph, OpenTelemetry, and LangChain remain outside the root/core runtime dependency graph.
|
|
37
37
|
|
|
@@ -50,6 +50,7 @@ This document states what AgentInspect **does not** provide today. It complement
|
|
|
50
50
|
## Trace safety bounds
|
|
51
51
|
|
|
52
52
|
- **Redaction profiles** (`local`, `share`, `strict`) are key-based presets — not compliance-grade PII detection. Review exports before sharing even with `--redaction-profile strict`.
|
|
53
|
+
- **`@agent-inspect/redact` and `agent-inspect redact` create redacted copies.** They do not encrypt source traces, mutate originals, certify compliance, or guarantee every sensitive value is detected.
|
|
53
54
|
- **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: [...] }`.
|
|
54
55
|
- **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).
|
|
55
56
|
- **Redaction is not encryption.** Local trace files remain readable on disk; treat `.agent-inspect-runs/` like any developer artifact that may contain operational data.
|
|
@@ -57,14 +58,15 @@ This document states what AgentInspect **does not** provide today. It complement
|
|
|
57
58
|
## Checks, artifacts, and test reporters
|
|
58
59
|
|
|
59
60
|
- **Checks are deterministic local rules, not compliance certification.** `check`, `scan`, and `verify-safe` surface bounded findings and diagnostics over supported local inputs; they do not prove a trace is safe for every sharing context.
|
|
61
|
+
- **Eval is deterministic local heuristics.** `@agent-inspect/eval` and `agent-inspect eval` do not provide LLM-as-judge scoring, hosted datasets, replay, semantic grading, or production quality analytics.
|
|
60
62
|
- **Safe CI artifacts are structural summaries.** They avoid raw prompt/output/request/response/header/tool payload content by default, but teams should still review generated files before sharing.
|
|
61
|
-
- **Vitest/Jest reporters are optional
|
|
63
|
+
- **Vitest/Jest reporters are optional package surfaces.** Recipes document config patterns and explicit associations; package publication is controlled by release readiness and maintainer authorization.
|
|
62
64
|
|
|
63
65
|
## Execution semantics
|
|
64
66
|
|
|
65
67
|
- **No replay / fork** of past runs from traces alone.
|
|
66
68
|
- **No time-travel debugging** across arbitrary runtime state.
|
|
67
|
-
- **No multi-run statistical evaluation** built into core.
|
|
69
|
+
- **No multi-run statistical evaluation** built into core. v2.1 eval checks are per selected trace/run unless user code aggregates results.
|
|
68
70
|
|
|
69
71
|
## Economics
|
|
70
72
|
|
package/docs/MIGRATION.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Migration
|
|
2
2
|
|
|
3
|
-
AgentInspect
|
|
3
|
+
AgentInspect keeps stable global APIs and published imports working within each major version. Manual trace writing remains `schemaVersion: "0.1"` where documented, and v0.1/v0.2 traces remain readable.
|
|
4
4
|
|
|
5
5
|
## From older 1.x docs
|
|
6
6
|
|
|
@@ -17,6 +17,7 @@ Use the root import for stable beginner APIs:
|
|
|
17
17
|
|
|
18
18
|
```ts
|
|
19
19
|
import {
|
|
20
|
+
createInspector,
|
|
20
21
|
observe,
|
|
21
22
|
inspectRun,
|
|
22
23
|
maybeInspectRun,
|
|
@@ -35,17 +36,16 @@ import { diffTraceEvents } from "agent-inspect/diff";
|
|
|
35
36
|
import { exportMarkdown } from "agent-inspect/exporters";
|
|
36
37
|
import { parseLogsToTrees } from "agent-inspect/logs";
|
|
37
38
|
import { traceEventsToPersistedInspectEvents } from "agent-inspect/persisted";
|
|
38
|
-
import {
|
|
39
|
+
import { createInspectorRuntime } from "agent-inspect/advanced";
|
|
39
40
|
```
|
|
40
41
|
|
|
41
|
-
##
|
|
42
|
+
## Root and subpath imports
|
|
42
43
|
|
|
43
|
-
|
|
44
|
+
Keep beginner workflow APIs at the root and move advanced usage to subpaths.
|
|
44
45
|
|
|
45
|
-
|
|
|
46
|
+
| API area | Preferred import | Direction |
|
|
46
47
|
| --- | --- | --- |
|
|
47
|
-
| `inspectRun`, `maybeInspectRun`, `step`, `observe`, `getCurrentCorrelationMetadata` | `agent-inspect` | stays root |
|
|
48
|
-
| `createInspector` | `agent-inspect/advanced` | likely root and `/advanced` |
|
|
48
|
+
| `inspectRun`, `maybeInspectRun`, `step`, `observe`, `getCurrentCorrelationMetadata`, `createInspector` | `agent-inspect` | stays root |
|
|
49
49
|
| `createInspectorRuntime` | `agent-inspect/advanced` | `/advanced` |
|
|
50
50
|
| `openTrace`, `readTrace`, `detectTraceFormat` | `agent-inspect/readers` | `/readers` |
|
|
51
51
|
| `memoryWriter`, `fileWriter`, `bufferedFileWriter`, `compositeWriter`, `nullWriter` | `agent-inspect/writers` | `/writers` |
|
|
@@ -61,7 +61,7 @@ Nothing uploads by default. Manual metadata is redacted before disk by default,
|
|
|
61
61
|
|
|
62
62
|
## Compatibility notes
|
|
63
63
|
|
|
64
|
-
- Existing `inspectRun`, `maybeInspectRun`, `step`, `step.llm`, `step.tool`, `observe`, and `
|
|
64
|
+
- Existing `inspectRun`, `maybeInspectRun`, `step`, `step.llm`, `step.tool`, `observe`, `getCurrentCorrelationMetadata`, and `createInspector` imports remain valid.
|
|
65
65
|
- Root/core does not require optional adapter dependencies.
|
|
66
66
|
- Optional adapter APIs are experimental and package-scoped.
|
|
67
67
|
- No destructive migration is required for existing trace directories.
|
package/docs/SCHEMA.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
# Schema
|
|
1
|
+
# Schema
|
|
2
2
|
|
|
3
|
-
This document describes the **persisted
|
|
3
|
+
This document describes the **persisted AgentInspect JSONL schemas** and the **log-derived normalized model** used by AgentInspect.
|
|
4
4
|
|
|
5
5
|
## 1. Overview
|
|
6
6
|
|
|
7
7
|
AgentInspect has two related (but distinct) data models:
|
|
8
8
|
|
|
9
9
|
1. **Manual trace JSONL** (persisted): lines of `TraceEvent` written by `inspectRun()` / `step()`.
|
|
10
|
-
2. **
|
|
10
|
+
2. **Persisted InspectEvent JSONL** (persisted): schema 1.0 rows written by `createInspector()` / built-in writers and produced by explicit migration.
|
|
11
|
+
3. **Log-derived normalized model** (in-memory): `InspectEvent` / `InspectRunTree` built from structured logs or adapters.
|
|
11
12
|
|
|
12
13
|
Important: log-derived trees are **normalized views**, not the same persisted JSONL schema.
|
|
13
14
|
|
|
@@ -25,7 +26,7 @@ Manual trace events use:
|
|
|
25
26
|
|
|
26
27
|
- **`schemaVersion: "0.1"`**
|
|
27
28
|
|
|
28
|
-
Existing `0.1` traces remain readable across AgentInspect
|
|
29
|
+
Existing `0.1` traces remain readable across AgentInspect major versions covered by this migration path.
|
|
29
30
|
|
|
30
31
|
### 2.3 TraceEvent union
|
|
31
32
|
|
|
@@ -153,13 +154,13 @@ Manual trace reading:
|
|
|
153
154
|
|
|
154
155
|
## 9. Backward compatibility
|
|
155
156
|
|
|
156
|
-
- v0.1 JSONL traces remain readable
|
|
157
|
-
- No automatic migrations or rewriting of old files.
|
|
157
|
+
- v0.1, v0.2, and v1.0 AgentInspect JSONL traces remain readable.
|
|
158
|
+
- No automatic migrations or rewriting of old files. Use `agent-inspect migrate <input> --to 1.0 --dry-run` first, then `--output <file>` for explicit conversion.
|
|
158
159
|
|
|
159
160
|
## 10. Breaking change policy
|
|
160
161
|
|
|
161
162
|
- Breaking changes require a major version.
|
|
162
|
-
- Stable
|
|
163
|
+
- Stable policy: avoid removing stable fields/events within a major version; prefer additive extensions.
|
|
163
164
|
|
|
164
165
|
## 11. Log-derived InspectEvent model
|
|
165
166
|
|
|
@@ -241,18 +242,34 @@ Canonical samples: `fixtures/traces-v0.2/*.jsonl` (validated by `pnpm fixtures:c
|
|
|
241
242
|
|
|
242
243
|
Programmatic helpers: see [API.md](./API.md) §13 (experimental persisted-event foundation).
|
|
243
244
|
|
|
244
|
-
## 15.
|
|
245
|
+
## 15. Stable persisted InspectEvent schemaVersion "1.0"
|
|
245
246
|
|
|
246
|
-
|
|
247
|
+
Schema 1.0 is the v2 persisted InspectEvent contract. It evolves the v0.2 shape in place rather than introducing a third unrelated model.
|
|
248
|
+
|
|
249
|
+
| Topic | Rule |
|
|
250
|
+
| ----- | ---- |
|
|
251
|
+
| `schemaVersion` | `"1.0"` |
|
|
252
|
+
| Default writer target | `createInspector()` and built-in persisted writers emit schema 1.0 rows by default. |
|
|
253
|
+
| Manual helper compatibility | `inspectRun()` / `step()` global/manual tracing continues to write `schemaVersion: "0.1"` for compatibility. |
|
|
254
|
+
| Reader compatibility | AgentInspect readers accept v0.1, v0.2, v1.0, and mixed AgentInspect JSONL where safe, with warnings. |
|
|
255
|
+
| Unknown optional fields | Safe unknown optional fields on v1.0 rows are preserved where possible; unsupported fields are surfaced through warnings/diagnostics rather than fabricated into relationships. |
|
|
256
|
+
| Migration | `agent-inspect migrate <input> --to 1.0 --dry-run` is non-mutating; `--output <file>` writes a separate migrated file and refuses input overwrite. |
|
|
257
|
+
|
|
258
|
+
Canonical samples: `fixtures/traces-v1.0/*.jsonl` (validated by `pnpm fixtures:check`).
|
|
259
|
+
|
|
260
|
+
## 16. Local reader/writer compatibility
|
|
261
|
+
|
|
262
|
+
Local writer and reader surfaces do not change the stable manual trace schema:
|
|
247
263
|
|
|
248
264
|
- `inspectRun()` / `step()` continue to write `schemaVersion: "0.1"` JSONL by default.
|
|
249
|
-
- `createInspector()`
|
|
265
|
+
- `createInspector()` writes schema 1.0 `PersistedInspectEvent` rows when configured with a writer such as `fileWriter()` or `bufferedFileWriter()`.
|
|
250
266
|
- `agent-inspect/readers` and `agent-inspect open` read local AgentInspect JSONL, OpenInference JSON, and OTLP JSON inputs through compatibility adapters.
|
|
251
267
|
- OpenInference and OTLP JSON inputs are **not** a third AgentInspect persisted schema. They are local read formats normalized into inspection trees with warnings and unsupported-field reporting.
|
|
252
268
|
- Reader and writer APIs perform no network upload and do not mutate source files.
|
|
253
269
|
- v1.8 checks, safety verification, baseline comparison, safe CI artifacts, and reporter artifacts are report layers over existing trace inputs. They do not change manual trace writing, introduce a third persisted trace model, or embed raw prompt/output/request/response/header/tool payload content in their default structural outputs.
|
|
254
270
|
|
|
255
|
-
##
|
|
271
|
+
## 17. Migration notes
|
|
256
272
|
|
|
257
273
|
- Minor releases may add optional fields/events, but must keep existing v0.1 traces readable.
|
|
258
|
-
- v0.1 →
|
|
274
|
+
- v0.1/v0.2 → v1.0 migration is explicit and local-only through `agent-inspect migrate`; automatic in-place rewrite remains out of scope.
|
|
275
|
+
- The default manual writer remains v0.1; the persisted writer/runtime path targets schema 1.0.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-inspect",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Local-first execution-tree debugger for TypeScript AI agents",
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
},
|
|
169
169
|
"scripts": {
|
|
170
170
|
"clean": "pnpm -r exec -- rm -rf dist",
|
|
171
|
-
"build": "pnpm exec tsup --config tsup.core.config.ts && pnpm exec tsup --config tsup.cli.config.ts && pnpm exec tsup --config tsup.langchain.config.ts && pnpm exec tsup --config tsup.tui.config.ts && pnpm exec tsup --config tsup.ai-sdk.config.ts && pnpm exec tsup --config tsup.vitest.config.ts && pnpm exec tsup --config tsup.jest.config.ts && pnpm exec tsup --config tsup.openai-agents.config.ts && pnpm exec tsup --config tsup.harness.config.ts",
|
|
171
|
+
"build": "pnpm exec tsup --config tsup.core.config.ts && pnpm exec tsup --config tsup.cli.config.ts && pnpm exec tsup --config tsup.langchain.config.ts && pnpm exec tsup --config tsup.tui.config.ts && pnpm exec tsup --config tsup.ai-sdk.config.ts && pnpm exec tsup --config tsup.vitest.config.ts && pnpm exec tsup --config tsup.jest.config.ts && pnpm exec tsup --config tsup.openai-agents.config.ts && pnpm exec tsup --config tsup.harness.config.ts && pnpm exec tsup --config tsup.redact.config.ts && pnpm exec tsup --config tsup.eval.config.ts",
|
|
172
172
|
"typecheck": "tsc --noEmit",
|
|
173
173
|
"test": "vitest run",
|
|
174
174
|
"test:watch": "vitest",
|