agent-inspect 1.4.0 → 1.6.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 +63 -0
- package/README.md +34 -6
- package/docs/ADAPTERS.md +6 -0
- package/docs/API.md +132 -9
- package/docs/ARCHITECTURE.md +4 -0
- package/docs/CLI.md +98 -5
- package/docs/DIFF.md +8 -0
- package/docs/EXPORTS.md +13 -0
- package/docs/GETTING-STARTED.md +19 -1
- package/docs/KNOWN-ISSUES.md +8 -1
- package/docs/LIMITATIONS.md +13 -2
- package/docs/LOGS.md +22 -0
- package/docs/SCHEMA.md +19 -7
- package/docs/SCREENSHOTS.md +190 -9
- package/package.json +71 -1
- package/packages/cli/dist/index.cjs +7121 -3986
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +7122 -3987
- package/packages/cli/dist/index.mjs.map +1 -1
- package/packages/core/dist/advanced.cjs +2258 -0
- package/packages/core/dist/advanced.cjs.map +1 -0
- package/packages/core/dist/advanced.d.cts +254 -0
- package/packages/core/dist/advanced.d.ts +254 -0
- package/packages/core/dist/advanced.mjs +11 -0
- package/packages/core/dist/advanced.mjs.map +1 -0
- package/packages/core/dist/chunk-57S5D6HR.mjs +655 -0
- package/packages/core/dist/chunk-57S5D6HR.mjs.map +1 -0
- package/packages/core/dist/chunk-6QSLZCBJ.mjs +743 -0
- package/packages/core/dist/chunk-6QSLZCBJ.mjs.map +1 -0
- package/packages/core/dist/chunk-6SZPTECC.mjs +342 -0
- package/packages/core/dist/chunk-6SZPTECC.mjs.map +1 -0
- package/packages/core/dist/chunk-74XZ6N7Q.mjs +409 -0
- package/packages/core/dist/chunk-74XZ6N7Q.mjs.map +1 -0
- package/packages/core/dist/chunk-7TGZLWEE.mjs +35 -0
- package/packages/core/dist/chunk-7TGZLWEE.mjs.map +1 -0
- package/packages/core/dist/chunk-BT7CATSD.mjs +497 -0
- package/packages/core/dist/chunk-BT7CATSD.mjs.map +1 -0
- package/packages/core/dist/chunk-E5F2LQCX.mjs +83 -0
- package/packages/core/dist/chunk-E5F2LQCX.mjs.map +1 -0
- package/packages/core/dist/chunk-EDTQHZPM.mjs +88 -0
- package/packages/core/dist/chunk-EDTQHZPM.mjs.map +1 -0
- package/packages/core/dist/chunk-HR7G62IE.mjs +785 -0
- package/packages/core/dist/chunk-HR7G62IE.mjs.map +1 -0
- package/packages/core/dist/chunk-HY7H3CQM.mjs +127 -0
- package/packages/core/dist/chunk-HY7H3CQM.mjs.map +1 -0
- package/packages/core/dist/chunk-S4YWKV4G.mjs +48 -0
- package/packages/core/dist/chunk-S4YWKV4G.mjs.map +1 -0
- package/packages/core/dist/chunk-TFLPUZ56.mjs +1571 -0
- package/packages/core/dist/chunk-TFLPUZ56.mjs.map +1 -0
- package/packages/core/dist/chunk-TZISEVLQ.mjs +390 -0
- package/packages/core/dist/chunk-TZISEVLQ.mjs.map +1 -0
- package/packages/core/dist/chunk-U2BGPESY.mjs +150 -0
- package/packages/core/dist/chunk-U2BGPESY.mjs.map +1 -0
- package/packages/core/dist/chunk-VTIB5MDK.mjs +304 -0
- package/packages/core/dist/chunk-VTIB5MDK.mjs.map +1 -0
- package/packages/core/dist/chunk-VU6O5QAH.mjs +99 -0
- package/packages/core/dist/chunk-VU6O5QAH.mjs.map +1 -0
- package/packages/core/dist/chunk-Y56BPA3B.mjs +990 -0
- package/packages/core/dist/chunk-Y56BPA3B.mjs.map +1 -0
- package/packages/core/dist/chunk-YWAOOXLR.mjs +475 -0
- package/packages/core/dist/chunk-YWAOOXLR.mjs.map +1 -0
- package/packages/core/dist/diff.cjs +993 -0
- package/packages/core/dist/diff.cjs.map +1 -0
- package/packages/core/dist/diff.d.cts +82 -0
- package/packages/core/dist/diff.d.ts +82 -0
- package/packages/core/dist/diff.mjs +5 -0
- package/packages/core/dist/diff.mjs.map +1 -0
- package/packages/core/dist/exporters.cjs +1228 -0
- package/packages/core/dist/exporters.cjs.map +1 -0
- package/packages/core/dist/exporters.d.cts +114 -0
- package/packages/core/dist/exporters.d.ts +114 -0
- package/packages/core/dist/exporters.mjs +6 -0
- package/packages/core/dist/exporters.mjs.map +1 -0
- package/packages/core/dist/index.cjs +5542 -2218
- package/packages/core/dist/index.cjs.map +1 -1
- package/packages/core/dist/index.d.cts +113 -908
- package/packages/core/dist/index.d.ts +113 -908
- package/packages/core/dist/index.mjs +1048 -5403
- package/packages/core/dist/index.mjs.map +1 -1
- package/packages/core/dist/inspect-event-Des4JDHo.d.cts +41 -0
- package/packages/core/dist/inspect-event-Des4JDHo.d.ts +41 -0
- package/packages/core/dist/log-config-BnH8Ykcb.d.cts +33 -0
- package/packages/core/dist/log-config-C1GcJPIM.d.ts +33 -0
- package/packages/core/dist/logs.cjs +1007 -0
- package/packages/core/dist/logs.cjs.map +1 -0
- package/packages/core/dist/logs.d.cts +138 -0
- package/packages/core/dist/logs.d.ts +138 -0
- package/packages/core/dist/logs.mjs +6 -0
- package/packages/core/dist/logs.mjs.map +1 -0
- package/packages/core/dist/persisted-inspect-event-0kaRADsp.d.cts +56 -0
- package/packages/core/dist/persisted-inspect-event-DiFto0K2.d.ts +56 -0
- package/packages/core/dist/persisted.cjs +1055 -0
- package/packages/core/dist/persisted.cjs.map +1 -0
- package/packages/core/dist/persisted.d.cts +111 -0
- package/packages/core/dist/persisted.d.ts +111 -0
- package/packages/core/dist/persisted.mjs +7 -0
- package/packages/core/dist/persisted.mjs.map +1 -0
- package/packages/core/dist/readers.cjs +2590 -0
- package/packages/core/dist/readers.cjs.map +1 -0
- package/packages/core/dist/readers.d.cts +80 -0
- package/packages/core/dist/readers.d.ts +80 -0
- package/packages/core/dist/readers.mjs +9 -0
- package/packages/core/dist/readers.mjs.map +1 -0
- package/packages/core/dist/types-DB8jB6Jg.d.cts +232 -0
- package/packages/core/dist/types-tSix7tfv.d.ts +232 -0
- package/packages/core/dist/writers.cjs +997 -0
- package/packages/core/dist/writers.cjs.map +1 -0
- package/packages/core/dist/writers.d.cts +62 -0
- package/packages/core/dist/writers.d.ts +62 -0
- package/packages/core/dist/writers.mjs +9 -0
- package/packages/core/dist/writers.mjs.map +1 -0
package/docs/KNOWN-ISSUES.md
CHANGED
|
@@ -12,6 +12,13 @@ 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
|
+
## Readers and `open`
|
|
16
|
+
|
|
17
|
+
- **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.
|
|
18
|
+
- `agent-inspect open` requires `--run <run-id>` when input contains multiple runs. It does not pick an arbitrary run silently.
|
|
19
|
+
- Format detection is conservative. Use `--format agent-inspect-jsonl`, `--format openinference-json`, or `--format otlp-json` for known local inputs.
|
|
20
|
+
- Standards JSON readers summarize bounded prompt/output-like attributes; they do not make raw prompt/output capture a default AgentInspect behavior.
|
|
21
|
+
|
|
15
22
|
## Integrations
|
|
16
23
|
|
|
17
24
|
- **Vendor sinks** (hosted dashboards, Langfuse/Braintrust/New Relic/Datadog native uploads, OTLP gRPC streaming, etc.) are **not implemented** in the core packages described here.
|
|
@@ -31,7 +38,7 @@ AgentInspect is **local-first** and **CLI-first**. These behaviors are intention
|
|
|
31
38
|
|
|
32
39
|
## Cost / tokens
|
|
33
40
|
|
|
34
|
-
- **Token counting** and **cost calculation** are **not** core features.
|
|
41
|
+
- **Token counting** and **cost calculation** are **not** core features. Token usage fields (`input`, `output`, `total`, `cached`) are displayed only when supplied by user code, fixtures, or adapters.
|
|
35
42
|
|
|
36
43
|
## Confidence labels
|
|
37
44
|
|
package/docs/LIMITATIONS.md
CHANGED
|
@@ -16,8 +16,16 @@ This document states what AgentInspect **does not** provide today. It complement
|
|
|
16
16
|
## Persisted event model (v1.2.0 foundation)
|
|
17
17
|
|
|
18
18
|
- **v0.2 is not the default persisted trace file format.** `inspectRun()` / `step()` still write `schemaVersion: "0.1"` JSONL.
|
|
19
|
-
- **
|
|
20
|
-
- **v0.2
|
|
19
|
+
- **Dual-format inspection is a read path, not a write migration.** `list`, `view`, `timeline`, `stats`, `search`, `diff`, `export`, `what`, and `report` read v0.1/v0.2 trace files through normalization where applicable. `logs` and `tail` remain structured-log ingestion commands, not v0.2 writers.
|
|
20
|
+
- **Default write path remains v0.1.** v0.2 fixtures and converters are available for adapters and migration testing, but AgentInspect does not automatically rewrite traces.
|
|
21
|
+
|
|
22
|
+
## Runtime writers and universal readers (v1.6)
|
|
23
|
+
|
|
24
|
+
- **Experimental APIs:** `agent-inspect/writers`, `agent-inspect/readers`, and `createInspector()` are available for local adoption, but their experimental contracts may be refined in v1.x.
|
|
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
|
+
- **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
|
+
- **Conservative detection:** `agent-inspect open` does not silently accept arbitrary JSON. Unsupported or ambiguous inputs produce errors/warnings rather than guessed traces.
|
|
28
|
+
- **Large inputs:** reader inputs are bounded and read into local memory. This is not a database index or production log warehouse.
|
|
21
29
|
|
|
22
30
|
## LangChain streaming (v1.3.0)
|
|
23
31
|
|
|
@@ -47,6 +55,7 @@ This document states what AgentInspect **does not** provide today. It complement
|
|
|
47
55
|
## Economics
|
|
48
56
|
|
|
49
57
|
- **No cost engine**: no pricing tables, invoice-grade usage, or provider billing reconciliation.
|
|
58
|
+
- **Token usage is supplied metadata only**: AgentInspect may display `input`, `output`, `total`, and `cached` counts when callers/adapters provide them; core does not count tokens or infer provider billing.
|
|
50
59
|
|
|
51
60
|
## Local observability commands (v1.4.0)
|
|
52
61
|
|
|
@@ -54,6 +63,8 @@ This document states what AgentInspect **does not** provide today. It complement
|
|
|
54
63
|
- **`search`** is deterministic exact/contains matching only — no semantic or fuzzy search.
|
|
55
64
|
- **`stats`** is local file aggregation — not production fleet analytics.
|
|
56
65
|
|
|
66
|
+
Visual demos: [SCREENSHOTS.md](./SCREENSHOTS.md) · [CLI.md](./CLI.md)
|
|
67
|
+
|
|
57
68
|
## Scale
|
|
58
69
|
|
|
59
70
|
- Designed for **developer machines** and **inner-loop debugging**, not petabyte log warehouses.
|
package/docs/LOGS.md
CHANGED
|
@@ -7,8 +7,30 @@ AgentInspect can parse **existing logs** (line-delimited JSON, and best-effort l
|
|
|
7
7
|
- **Production-shaped playbook**: `docs/LOGGING-PLAYBOOK.md` (pino, log4js, NestJS recipes)
|
|
8
8
|
- **Field mapping and redaction**: `docs/API.md` (log ingest APIs) and `docs/SCHEMA.md`
|
|
9
9
|
- **Safety constraints**: JSON logs first-class; log4js best-effort; no `eval`; no JavaScript object-literal parsing as a log interchange format (see `SECURITY.md`)
|
|
10
|
+
- **Visual demos**: [SCREENSHOTS.md](./SCREENSHOTS.md#use-existing-logs)
|
|
10
11
|
|
|
11
12
|
Notes:
|
|
12
13
|
- Log parsing APIs are documented as **experimental** in `docs/API.md`.
|
|
13
14
|
- Log-derived events include **confidence labels**; AgentInspect is conservative about inferring parent/child structure.
|
|
14
15
|
|
|
16
|
+
### JSON logs → tree (visual pending)
|
|
17
|
+
|
|
18
|
+
Animated demo is **pending re-record** — a staging capture showed tool/LLM summary counts that did not match displayed events. Use the canonical command below; see [assets/demos/RECORDING.md](./assets/demos/RECORDING.md).
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
agent-inspect logs fixtures/logs/minimal-success.json.log \
|
|
22
|
+
--format json \
|
|
23
|
+
--run-id-key runId \
|
|
24
|
+
--event-key event \
|
|
25
|
+
--timestamp-key timestamp
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Run: [examples/06-log-to-tree](../examples/06-log-to-tree/README.md)
|
|
29
|
+
|
|
30
|
+
### Live tail (visual pending)
|
|
31
|
+
|
|
32
|
+
`agent-inspect tail` updates a local tree as new log lines arrive. Recording guide: [RECORDING.md](./assets/demos/RECORDING.md).
|
|
33
|
+
|
|
34
|
+
### log4js (best-effort)
|
|
35
|
+
|
|
36
|
+
See [examples/recipes/log4js-json-layout](../examples/recipes/log4js-json-layout/README.md). Visual pending re-record.
|
package/docs/SCHEMA.md
CHANGED
|
@@ -129,7 +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`).
|
|
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`). `stats --correlation-id` and `--group-id` filter by these fields; `list` / `view` do not filter by correlation yet.
|
|
133
133
|
- Steps may include `metadata` on `step_started`.
|
|
134
134
|
- Manual traces intentionally avoid full prompt/output capture by default.
|
|
135
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`.
|
|
@@ -142,6 +142,8 @@ Unknown status must **not** be treated as success.
|
|
|
142
142
|
- Readers should ignore unknown fields where safe.
|
|
143
143
|
- Breaking schema changes require a major version.
|
|
144
144
|
|
|
145
|
+
**v1.5 vocabulary (kinds, token metadata, streaming attributes):** [TRACE-VOCABULARY-V1.5.md](./proposals/TRACE-VOCABULARY-V1.5.md)
|
|
146
|
+
|
|
145
147
|
## 8. Malformed lines
|
|
146
148
|
|
|
147
149
|
Manual trace reading:
|
|
@@ -208,8 +210,9 @@ v1.2.0 introduces a **source-agnostic persisted event model** as an experimental
|
|
|
208
210
|
| ----- | ---- |
|
|
209
211
|
| Default write format | Manual traces still use **`schemaVersion: "0.1"`** (`run_started`, `step_started`, `step_completed`, `run_completed`). |
|
|
210
212
|
| v0.2 role | Unified persisted shape for manual traces, log-derived events, adapter events, and future AI SDK / OTel mappings. |
|
|
211
|
-
| v0.2 file writing | **Not enabled by default**
|
|
212
|
-
| v0.1 compatibility | v0.2 does **not** replace v0.1 in
|
|
213
|
+
| v0.2 file writing | **Not enabled by default** — converters and fixtures only unless a caller writes v0.2 data explicitly. |
|
|
214
|
+
| v0.1 compatibility | v0.2 does **not** replace v0.1 in v1.x; existing `0.1` files remain canonical for manual writing and continue to be readable. |
|
|
215
|
+
| v0.2 read path | Inspection read paths normalize v0.1 and v0.2 JSONL for local CLI/API use. |
|
|
213
216
|
| Failures | Still **no** `step_failed`; use `status: "error"` on the persisted event. |
|
|
214
217
|
|
|
215
218
|
Canonical samples: `fixtures/traces-v0.2/*.jsonl` (validated by `pnpm fixtures:check`).
|
|
@@ -233,13 +236,22 @@ Canonical samples: `fixtures/traces-v0.2/*.jsonl` (validated by `pnpm fixtures:c
|
|
|
233
236
|
| `attributes` | no | Shallow metadata bag (redaction-ready) |
|
|
234
237
|
| `inputSummary` / `outputSummary` | no | Truncated previews when explicitly captured |
|
|
235
238
|
| `error` | no | `{ name?, message, code? }` when `status: "error"` |
|
|
236
|
-
| `tokenUsage` | no | `{ input?, output?, total? }` when known |
|
|
239
|
+
| `tokenUsage` | no | `{ input?, output?, total?, cached? }` when supplied/known |
|
|
237
240
|
| `trace` | no | Optional `{ traceId?, spanId?, parentSpanId? }` for future OTel alignment |
|
|
238
241
|
|
|
239
242
|
Programmatic helpers: see [API.md](./API.md) §11 (experimental persisted-event foundation).
|
|
240
243
|
|
|
241
|
-
## 15.
|
|
244
|
+
## 15. v1.6 local reader/writer compatibility
|
|
242
245
|
|
|
243
|
-
|
|
244
|
-
|
|
246
|
+
v1.6 adds experimental writer and reader surfaces without changing the stable manual trace schema:
|
|
247
|
+
|
|
248
|
+
- `inspectRun()` / `step()` continue to write `schemaVersion: "0.1"` JSONL by default.
|
|
249
|
+
- `createInspector()` can write explicit v0.2 `PersistedInspectEvent` rows when configured with a writer such as `fileWriter()` or `bufferedFileWriter()`.
|
|
250
|
+
- `agent-inspect/readers` and `agent-inspect open` read local AgentInspect JSONL, OpenInference JSON, and OTLP JSON inputs through compatibility adapters.
|
|
251
|
+
- 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
|
+
- Reader and writer APIs perform no network upload and do not mutate source files.
|
|
245
253
|
|
|
254
|
+
## 16. Migration notes
|
|
255
|
+
|
|
256
|
+
- Minor releases may add optional fields/events, but must keep existing v0.1 traces readable.
|
|
257
|
+
- v0.1 → v0.2 write migration guides are future work. v1.x inspection readers are dual-format; the default manual writer remains v0.1.
|
package/docs/SCREENSHOTS.md
CHANGED
|
@@ -1,14 +1,195 @@
|
|
|
1
|
-
|
|
1
|
+
# Visual demos
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Curated terminal recordings for AgentInspect **1.4.0**. They show what the local trace workbench captures and how to inspect it — without a hosted dashboard or vendor upload.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Synthetic output only:** demos use committed [fixtures](../fixtures/README.md), [examples](../examples/README.md), and recipes. No external LLM calls or API keys.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- [ ] Failed tool call / failed step rendering
|
|
9
|
-
- [ ] `agent-inspect logs` output (JSON logs)
|
|
10
|
-
- [ ] `agent-inspect diff` output
|
|
11
|
-
- [ ] Optional TUI (`agent-inspect view <run-id> --tui`)
|
|
7
|
+
**npm note:** GIFs live in `docs/assets/demos/` for GitHub documentation. They are **not** shipped in the `agent-inspect` npm tarball.
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
**Re-record guide:** [assets/demos/RECORDING.md](assets/demos/RECORDING.md)
|
|
10
|
+
**Maintainer audit:** [implementation/VISUAL-DEMO-AUDIT.md](implementation/VISUAL-DEMO-AUDIT.md)
|
|
14
11
|
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Start tracing
|
|
15
|
+
|
|
16
|
+
Manual `inspectRun` / `step` traces written as local JSONL.
|
|
17
|
+
|
|
18
|
+
### Quickstart (install → trace → view)
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
Run: [examples/00-quickstart-demo](../examples/00-quickstart-demo/README.md)
|
|
23
|
+
Also: [GETTING-STARTED.md](GETTING-STARTED.md)
|
|
24
|
+
|
|
25
|
+
### Nested execution tree
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+
|
|
29
|
+
Run: [examples/02-nested-steps](../examples/02-nested-steps/README.md)
|
|
30
|
+
Command: `agent-inspect view <run-id> --dir <trace-dir>`
|
|
31
|
+
|
|
32
|
+
### Parallel sibling steps
|
|
33
|
+
|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
Run: [examples/03-parallel-steps](../examples/03-parallel-steps/README.md)
|
|
37
|
+
|
|
38
|
+
### Error handling
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
Run: [examples/04-error-handling](../examples/04-error-handling/README.md)
|
|
43
|
+
|
|
44
|
+
### `observe()` wrapper
|
|
45
|
+
|
|
46
|
+

|
|
47
|
+
|
|
48
|
+
Run: [examples/05-observe-wrapper](../examples/05-observe-wrapper/README.md) · API: [API.md](API.md)
|
|
49
|
+
|
|
50
|
+
### Env-gated tracing (`maybeInspectRun`)
|
|
51
|
+
|
|
52
|
+

|
|
53
|
+
|
|
54
|
+
Docs: [GETTING-STARTED.md](GETTING-STARTED.md) · [API.md](API.md) (`maybeInspectRun`)
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Use existing logs
|
|
59
|
+
|
|
60
|
+
Turn structured logs you already emit into a **local** grouped timeline or tree.
|
|
61
|
+
|
|
62
|
+
### JSON logs → tree
|
|
63
|
+
|
|
64
|
+
**Status:** animated demo pending re-record (staging asset had summary-count mismatch).
|
|
65
|
+
**Command:**
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
agent-inspect logs ./your.json.log \
|
|
69
|
+
--format json \
|
|
70
|
+
--run-id-key runId \
|
|
71
|
+
--event-key event \
|
|
72
|
+
--timestamp-key timestamp
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Run: [examples/06-log-to-tree](../examples/06-log-to-tree/README.md) · [LOGS.md](LOGS.md) · [LOG-TO-TREE-QUICKSTART.md](LOG-TO-TREE-QUICKSTART.md)
|
|
76
|
+
|
|
77
|
+
### Live tail
|
|
78
|
+
|
|
79
|
+
**Status:** animated demo pending re-record.
|
|
80
|
+
**Command:** `agent-inspect tail <log-file> [mapping flags]` — see [LOGS.md](LOGS.md).
|
|
81
|
+
|
|
82
|
+
### log4js (best-effort)
|
|
83
|
+
|
|
84
|
+
**Status:** pending re-record. Documented in [LOGS.md](LOGS.md); recipe: [log4js-json-layout](../examples/recipes/log4js-json-layout/README.md).
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Inspect and compare
|
|
89
|
+
|
|
90
|
+
Read-only CLI over local JSONL traces.
|
|
91
|
+
|
|
92
|
+
### Chronological timeline (`--focus slow`)
|
|
93
|
+
|
|
94
|
+

|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
agent-inspect timeline <run-id> --dir fixtures/traces --focus slow
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Docs: [CLI.md](CLI.md) § timeline
|
|
101
|
+
|
|
102
|
+
### Local stats
|
|
103
|
+
|
|
104
|
+

|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
agent-inspect stats --dir fixtures/traces
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Filter by correlation: `agent-inspect stats --correlation-id <id>` or `--group-id <id>`.
|
|
111
|
+
Docs: [CLI.md](CLI.md) § stats
|
|
112
|
+
|
|
113
|
+
### Deterministic search
|
|
114
|
+
|
|
115
|
+

|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
agent-inspect search --dir fixtures/traces --status error --limit 5
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Docs: [CLI.md](CLI.md) § search
|
|
122
|
+
|
|
123
|
+
### Diff two runs
|
|
124
|
+
|
|
125
|
+

|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
agent-inspect diff minimal-success minimal-error --dir fixtures/traces
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Docs: [DIFF.md](DIFF.md)
|
|
132
|
+
|
|
133
|
+
### Markdown export
|
|
134
|
+
|
|
135
|
+

|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
agent-inspect export minimal-success --dir fixtures/traces --format markdown
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Docs: [EXPORTS.md](EXPORTS.md)
|
|
142
|
+
|
|
143
|
+
### HTML / OpenInference / OTLP
|
|
144
|
+
|
|
145
|
+
- **HTML:** rendered-report visual pending re-record; export command in [EXPORTS.md](EXPORTS.md).
|
|
146
|
+
- **OpenInference / OTLP JSON:** compatibility-oriented local formats — see prose and `--validate` in [EXPORTS.md](EXPORTS.md), not dedicated GIFs.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Integrations and optional UI
|
|
151
|
+
|
|
152
|
+
### LangChain persistence
|
|
153
|
+
|
|
154
|
+

|
|
155
|
+
|
|
156
|
+
Run: [examples/08-langchain-adapter](../examples/08-langchain-adapter/README.md) · [ADAPTERS.md](ADAPTERS.md)
|
|
157
|
+
|
|
158
|
+
Streaming metadata (`stream: true`) demo pending re-record until `chunkCount` / `streamDurationMs` are non-null.
|
|
159
|
+
|
|
160
|
+
### Optional TUI (`@agent-inspect/tui`)
|
|
161
|
+
|
|
162
|
+

|
|
163
|
+
|
|
164
|
+
Requires optional package: `pnpm add @agent-inspect/tui`
|
|
165
|
+
Command: `agent-inspect view <run-id> --tui`
|
|
166
|
+
Docs: [ADAPTERS.md](ADAPTERS.md)
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Safety and sharing
|
|
171
|
+
|
|
172
|
+
### Default metadata redaction
|
|
173
|
+
|
|
174
|
+

|
|
175
|
+
|
|
176
|
+
Profiles (`local` / `share` / `strict`) and export redaction: [SAFE-TRACE-SHARING.md](SAFE-TRACE-SHARING.md)
|
|
177
|
+
|
|
178
|
+
### Event size bounds
|
|
179
|
+
|
|
180
|
+
Described in [LIMITATIONS.md](LIMITATIONS.md) — no GIF (static explanation preferred).
|
|
181
|
+
|
|
182
|
+
### Correlation metadata
|
|
183
|
+
|
|
184
|
+
Described in [API.md](API.md) — optional `correlationId`, `requestId`, `decisionId`, `groupId` on `run_started`.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Planned checklist (completed items)
|
|
189
|
+
|
|
190
|
+
- [x] Basic trace tree (`inspectRun` + `step`)
|
|
191
|
+
- [x] Failed step rendering
|
|
192
|
+
- [x] `agent-inspect logs` output (JSON) — **re-record pending**
|
|
193
|
+
- [x] `agent-inspect diff` output
|
|
194
|
+
- [x] Optional TUI (`view --tui`)
|
|
195
|
+
- [x] `timeline`, `stats`, `search` (v1.4.0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-inspect",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Local-first execution-tree debugger for TypeScript AI agents",
|
|
@@ -25,6 +25,76 @@
|
|
|
25
25
|
"types": "./packages/core/dist/index.d.cts",
|
|
26
26
|
"default": "./packages/core/dist/index.cjs"
|
|
27
27
|
}
|
|
28
|
+
},
|
|
29
|
+
"./advanced": {
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./packages/core/dist/advanced.d.ts",
|
|
32
|
+
"default": "./packages/core/dist/advanced.mjs"
|
|
33
|
+
},
|
|
34
|
+
"require": {
|
|
35
|
+
"types": "./packages/core/dist/advanced.d.cts",
|
|
36
|
+
"default": "./packages/core/dist/advanced.cjs"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"./persisted": {
|
|
40
|
+
"import": {
|
|
41
|
+
"types": "./packages/core/dist/persisted.d.ts",
|
|
42
|
+
"default": "./packages/core/dist/persisted.mjs"
|
|
43
|
+
},
|
|
44
|
+
"require": {
|
|
45
|
+
"types": "./packages/core/dist/persisted.d.cts",
|
|
46
|
+
"default": "./packages/core/dist/persisted.cjs"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"./logs": {
|
|
50
|
+
"import": {
|
|
51
|
+
"types": "./packages/core/dist/logs.d.ts",
|
|
52
|
+
"default": "./packages/core/dist/logs.mjs"
|
|
53
|
+
},
|
|
54
|
+
"require": {
|
|
55
|
+
"types": "./packages/core/dist/logs.d.cts",
|
|
56
|
+
"default": "./packages/core/dist/logs.cjs"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"./exporters": {
|
|
60
|
+
"import": {
|
|
61
|
+
"types": "./packages/core/dist/exporters.d.ts",
|
|
62
|
+
"default": "./packages/core/dist/exporters.mjs"
|
|
63
|
+
},
|
|
64
|
+
"require": {
|
|
65
|
+
"types": "./packages/core/dist/exporters.d.cts",
|
|
66
|
+
"default": "./packages/core/dist/exporters.cjs"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"./diff": {
|
|
70
|
+
"import": {
|
|
71
|
+
"types": "./packages/core/dist/diff.d.ts",
|
|
72
|
+
"default": "./packages/core/dist/diff.mjs"
|
|
73
|
+
},
|
|
74
|
+
"require": {
|
|
75
|
+
"types": "./packages/core/dist/diff.d.cts",
|
|
76
|
+
"default": "./packages/core/dist/diff.cjs"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"./writers": {
|
|
80
|
+
"import": {
|
|
81
|
+
"types": "./packages/core/dist/writers.d.ts",
|
|
82
|
+
"default": "./packages/core/dist/writers.mjs"
|
|
83
|
+
},
|
|
84
|
+
"require": {
|
|
85
|
+
"types": "./packages/core/dist/writers.d.cts",
|
|
86
|
+
"default": "./packages/core/dist/writers.cjs"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"./readers": {
|
|
90
|
+
"import": {
|
|
91
|
+
"types": "./packages/core/dist/readers.d.ts",
|
|
92
|
+
"default": "./packages/core/dist/readers.mjs"
|
|
93
|
+
},
|
|
94
|
+
"require": {
|
|
95
|
+
"types": "./packages/core/dist/readers.d.cts",
|
|
96
|
+
"default": "./packages/core/dist/readers.cjs"
|
|
97
|
+
}
|
|
28
98
|
}
|
|
29
99
|
},
|
|
30
100
|
"bin": {
|