agent-inspect 1.5.0 → 1.7.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 +41 -0
- package/README.md +14 -4
- package/docs/ADAPTER-CONFORMANCE.md +35 -0
- package/docs/ADAPTERS.md +79 -1
- package/docs/API.md +184 -10
- package/docs/ARCHITECTURE.md +4 -0
- package/docs/CLI.md +41 -12
- package/docs/KNOWN-ISSUES.md +11 -1
- package/docs/LIMITATIONS.md +19 -2
- package/docs/SCHEMA.md +17 -7
- package/package.json +23 -2
- package/packages/cli/dist/index.cjs +2449 -157
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +2450 -158
- package/packages/cli/dist/index.mjs.map +1 -1
- package/packages/core/dist/advanced.cjs +839 -18
- package/packages/core/dist/advanced.cjs.map +1 -1
- package/packages/core/dist/advanced.d.cts +98 -3
- package/packages/core/dist/advanced.d.ts +98 -3
- package/packages/core/dist/advanced.mjs +7 -4
- 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-QX3ZMPUF.mjs → chunk-74XZ6N7Q.mjs} +13 -55
- package/packages/core/dist/chunk-74XZ6N7Q.mjs.map +1 -0
- package/packages/core/dist/{chunk-QPAU2TPA.mjs → chunk-HR7G62IE.mjs} +4 -4
- package/packages/core/dist/{chunk-QPAU2TPA.mjs.map → chunk-HR7G62IE.mjs.map} +1 -1
- 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-Q6EPNB3V.mjs → chunk-TZISEVLQ.mjs} +34 -183
- 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-5EMIZZXD.mjs → chunk-Y56BPA3B.mjs} +87 -4
- package/packages/core/dist/chunk-Y56BPA3B.mjs.map +1 -0
- package/packages/core/dist/diff.d.cts +3 -2
- package/packages/core/dist/diff.d.ts +3 -2
- package/packages/core/dist/exporters.cjs.map +1 -1
- package/packages/core/dist/exporters.d.cts +3 -2
- package/packages/core/dist/exporters.d.ts +3 -2
- package/packages/core/dist/exporters.mjs +2 -2
- package/packages/core/dist/index.cjs +2975 -229
- package/packages/core/dist/index.cjs.map +1 -1
- package/packages/core/dist/index.d.cts +27 -6
- package/packages/core/dist/index.d.ts +27 -6
- package/packages/core/dist/index.mjs +113 -60
- package/packages/core/dist/index.mjs.map +1 -1
- package/packages/core/dist/{log-config-BzGmDYum.d.cts → inspect-event-Des4JDHo.d.cts} +1 -31
- package/packages/core/dist/{log-config-BzGmDYum.d.ts → inspect-event-Des4JDHo.d.ts} +1 -31
- 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.d.cts +3 -2
- package/packages/core/dist/logs.d.ts +3 -2
- package/packages/core/dist/logs.mjs +3 -3
- 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 +38 -40
- package/packages/core/dist/persisted.cjs.map +1 -1
- package/packages/core/dist/persisted.d.cts +6 -55
- package/packages/core/dist/persisted.d.ts +6 -55
- package/packages/core/dist/persisted.mjs +4 -2
- 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-CNbheSdk.d.cts → types-DB8jB6Jg.d.cts} +7 -1
- package/packages/core/dist/{types-Bkt7LS01.d.ts → types-tSix7tfv.d.ts} +7 -1
- 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/packages/core/dist/chunk-5EMIZZXD.mjs.map +0 -1
- package/packages/core/dist/chunk-Q6EPNB3V.mjs.map +0 -1
- package/packages/core/dist/chunk-QX3ZMPUF.mjs.map +0 -1
- package/packages/core/dist/chunk-XDBND27A.mjs +0 -975
- package/packages/core/dist/chunk-XDBND27A.mjs.map +0 -1
package/docs/KNOWN-ISSUES.md
CHANGED
|
@@ -12,9 +12,19 @@ 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.
|
|
25
|
+
- **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 scaffold-only in the v1.7 train. Runtime span mapping is not implemented, and the safe future path is `setTraceProcessors()` rather than `addTraceProcessor()`.
|
|
27
|
+
- **LangGraph support** is currently a documented boundary through `@agent-inspect/langchain`, not a dedicated package.
|
|
18
28
|
- **LangChain adapter** captures **metadata-oriented** signals by default; it does not replace full framework observability.
|
|
19
29
|
- **LangChain `stream: true`** records chunk counts and timing only — not a full token replay. Per-token JSONL events are not emitted.
|
|
20
30
|
- **Correlation metadata** (`correlationId`, `requestId`, `decisionId`, `groupId`) is written on `run_started` but **CLI list/view does not filter by correlation fields** yet.
|
|
@@ -31,7 +41,7 @@ AgentInspect is **local-first** and **CLI-first**. These behaviors are intention
|
|
|
31
41
|
|
|
32
42
|
## Cost / tokens
|
|
33
43
|
|
|
34
|
-
- **Token counting** and **cost calculation** are **not** core features.
|
|
44
|
+
- **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
45
|
|
|
36
46
|
## Confidence labels
|
|
37
47
|
|
package/docs/LIMITATIONS.md
CHANGED
|
@@ -16,8 +16,24 @@ 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
|
-
- **
|
|
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.
|
|
29
|
+
|
|
30
|
+
## Framework adapters (v1.7)
|
|
31
|
+
|
|
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
|
+
- **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 scaffold-only.** `@agent-inspect/openai-agents` documents the safe `setTraceProcessors()` boundary but does not map runtime spans yet and is not part of the v1.7 published package set.
|
|
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
|
+
- **No root/core adapter dependencies.** AI SDK, OpenAI Agents, LangGraph, OpenTelemetry, and LangChain remain outside the root/core runtime dependency graph.
|
|
21
37
|
|
|
22
38
|
## LangChain streaming (v1.3.0)
|
|
23
39
|
|
|
@@ -47,6 +63,7 @@ This document states what AgentInspect **does not** provide today. It complement
|
|
|
47
63
|
## Economics
|
|
48
64
|
|
|
49
65
|
- **No cost engine**: no pricing tables, invoice-grade usage, or provider billing reconciliation.
|
|
66
|
+
- **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
67
|
|
|
51
68
|
## Local observability commands (v1.4.0)
|
|
52
69
|
|
package/docs/SCHEMA.md
CHANGED
|
@@ -210,8 +210,9 @@ v1.2.0 introduces a **source-agnostic persisted event model** as an experimental
|
|
|
210
210
|
| ----- | ---- |
|
|
211
211
|
| Default write format | Manual traces still use **`schemaVersion: "0.1"`** (`run_started`, `step_started`, `step_completed`, `run_completed`). |
|
|
212
212
|
| v0.2 role | Unified persisted shape for manual traces, log-derived events, adapter events, and future AI SDK / OTel mappings. |
|
|
213
|
-
| v0.2 file writing | **Not enabled by default**
|
|
214
|
-
| 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. |
|
|
215
216
|
| Failures | Still **no** `step_failed`; use `status: "error"` on the persisted event. |
|
|
216
217
|
|
|
217
218
|
Canonical samples: `fixtures/traces-v0.2/*.jsonl` (validated by `pnpm fixtures:check`).
|
|
@@ -235,13 +236,22 @@ Canonical samples: `fixtures/traces-v0.2/*.jsonl` (validated by `pnpm fixtures:c
|
|
|
235
236
|
| `attributes` | no | Shallow metadata bag (redaction-ready) |
|
|
236
237
|
| `inputSummary` / `outputSummary` | no | Truncated previews when explicitly captured |
|
|
237
238
|
| `error` | no | `{ name?, message, code? }` when `status: "error"` |
|
|
238
|
-
| `tokenUsage` | no | `{ input?, output?, total? }` when known |
|
|
239
|
+
| `tokenUsage` | no | `{ input?, output?, total?, cached? }` when supplied/known |
|
|
239
240
|
| `trace` | no | Optional `{ traceId?, spanId?, parentSpanId? }` for future OTel alignment |
|
|
240
241
|
|
|
241
|
-
Programmatic helpers: see [API.md](./API.md) §
|
|
242
|
+
Programmatic helpers: see [API.md](./API.md) §13 (experimental persisted-event foundation).
|
|
242
243
|
|
|
243
|
-
## 15.
|
|
244
|
+
## 15. v1.6 local reader/writer compatibility
|
|
244
245
|
|
|
245
|
-
|
|
246
|
-
|
|
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.
|
|
247
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-inspect",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Local-first execution-tree debugger for TypeScript AI agents",
|
|
@@ -75,6 +75,26 @@
|
|
|
75
75
|
"types": "./packages/core/dist/diff.d.cts",
|
|
76
76
|
"default": "./packages/core/dist/diff.cjs"
|
|
77
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
|
+
}
|
|
78
98
|
}
|
|
79
99
|
},
|
|
80
100
|
"bin": {
|
|
@@ -99,6 +119,7 @@
|
|
|
99
119
|
"docs/EXPORTS.md",
|
|
100
120
|
"docs/DIFF.md",
|
|
101
121
|
"docs/ADAPTERS.md",
|
|
122
|
+
"docs/ADAPTER-CONFORMANCE.md",
|
|
102
123
|
"docs/COMPARE.md",
|
|
103
124
|
"docs/LOG-TO-TREE-QUICKSTART.md",
|
|
104
125
|
"docs/SCREENSHOTS.md"
|
|
@@ -137,7 +158,7 @@
|
|
|
137
158
|
},
|
|
138
159
|
"scripts": {
|
|
139
160
|
"clean": "pnpm -r exec -- rm -rf dist",
|
|
140
|
-
"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",
|
|
161
|
+
"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.openai-agents.config.ts",
|
|
141
162
|
"typecheck": "tsc --noEmit",
|
|
142
163
|
"test": "vitest run",
|
|
143
164
|
"test:watch": "vitest",
|