agent-inspect 2.5.0 → 3.0.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 +31 -0
- package/SECURITY.md +18 -1
- package/docs/ADAPTERS.md +41 -0
- package/docs/CLI.md +18 -1
- package/docs/MIGRATION.md +24 -0
- package/package.json +2 -2
- package/packages/cli/dist/index.cjs +376 -116
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +375 -115
- package/packages/cli/dist/index.mjs.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- a1f743f: v3.0 extension contracts: `@agent-inspect/adapter-sdk` with registration, conformance, privacy helpers, transform/renderer contracts, optional rebuildable indexer, and community extension registry documentation. Linked major semver bump; persisted trace schema 1.0 unchanged.
|
|
8
|
+
|
|
9
|
+
## 2.6.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 57efe08: Release v2.6.0 with optional localhost viewer and read-only MCP server surfaces.
|
|
14
|
+
|
|
15
|
+
This train adds `@agent-inspect/viewer`, `agent-inspect serve`, `@agent-inspect/mcp-server` read-only trace tools, and defers IDE extension until post-v2.6 demand review. All optional surfaces are read-only with share-profile defaults.
|
|
16
|
+
|
|
3
17
|
## 2.5.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -438,6 +438,34 @@ await inspectRun("agent-with-mcp", async () => {
|
|
|
438
438
|
|
|
439
439
|
No-network recipe: [mcp-client-tracing](examples/recipes/mcp-client-tracing/). This is **not** an MCP server, gateway, or hosted broker — see [docs/ADAPTERS.md](docs/ADAPTERS.md).
|
|
440
440
|
|
|
441
|
+
### Local viewer (`@agent-inspect/viewer`)
|
|
442
|
+
|
|
443
|
+
Optional **localhost read-only** HTTP viewer. Start from the CLI:
|
|
444
|
+
|
|
445
|
+
```bash
|
|
446
|
+
pnpm add agent-inspect @agent-inspect/viewer
|
|
447
|
+
npx agent-inspect serve --dir ./.agent-inspect-runs
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
Binds `127.0.0.1` by default. Serves trace list, timeline, and check JSON from disk — no upload, no mutation. Recipe: [read-only viewer workflow](examples/recipes/read-only-mcp-server/) (also covers MCP server tools).
|
|
451
|
+
|
|
452
|
+
### Read-only MCP server (`@agent-inspect/mcp-server`)
|
|
453
|
+
|
|
454
|
+
Optional package exposing **read-only** MCP tools (`list_traces`, `read_trace`, `search_traces`, `run_checks`, `create_share_safe_report`, and analysis helpers) over a local trace directory. Distinct from `@agent-inspect/mcp` (client telemetry). Default redaction profile is `share`.
|
|
455
|
+
|
|
456
|
+
```bash
|
|
457
|
+
pnpm add agent-inspect @agent-inspect/mcp-server
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
```ts
|
|
461
|
+
import { runReadOnlyMcpServer } from "@agent-inspect/mcp-server";
|
|
462
|
+
|
|
463
|
+
// stdio MCP server — configure trace dir via AGENT_INSPECT_TRACE_DIR
|
|
464
|
+
await runReadOnlyMcpServer({ redactionProfile: "share" });
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
IDE extension is **deferred** — see [docs/IDE-SURFACES.md](docs/IDE-SURFACES.md).
|
|
468
|
+
|
|
441
469
|
### TUI viewer (`@agent-inspect/tui`)
|
|
442
470
|
|
|
443
471
|
Optional **Ink/React** package, installed separately. Use with an interactive terminal:
|
|
@@ -485,6 +513,9 @@ Reporter artifact behavior and API details are documented in [docs/API.md](docs/
|
|
|
485
513
|
| [examples/recipes/what-report-inspect](examples/recipes/what-report-inspect/) | `what` + `report` inspection |
|
|
486
514
|
| [examples/recipes/runtime-and-ingestion](examples/recipes/runtime-and-ingestion/) | v1.6 runtime writers + universal ingestion |
|
|
487
515
|
| [examples/recipes/mcp-client-tracing](examples/recipes/mcp-client-tracing) | v2.4 MCP client tool-call tracing |
|
|
516
|
+
| [examples/recipes/guardrails-basic](examples/recipes/guardrails-basic) | v2.5 deterministic guardrails |
|
|
517
|
+
| [examples/recipes/circuit-breaker-basic](examples/recipes/circuit-breaker-basic) | v2.5 circuit analyzers |
|
|
518
|
+
| [examples/recipes/read-only-mcp-server](examples/recipes/read-only-mcp-server) | v2.6 read-only MCP trace tools |
|
|
488
519
|
|
|
489
520
|
**Multi-run sessions:** set `sessionId` (and optional handoff/retry metadata) on `run_started`, then browse with `npx agent-inspect sessions` and `npx agent-inspect session <id> --timeline`. See [SESSIONS-AND-WORKFLOW-CAUSALITY](docs/proposals/SESSIONS-AND-WORKFLOW-CAUSALITY.md).
|
|
490
521
|
|
package/SECURITY.md
CHANGED
|
@@ -76,5 +76,22 @@ For a practical pre-share workflow, see `docs/SAFE-TRACE-SHARING.md`. For schema
|
|
|
76
76
|
|
|
77
77
|
- Prefer Node.js built-ins over new dependencies.
|
|
78
78
|
- Do not add vendor SDKs, OpenTelemetry SDKs, or framework dependencies to the main `agent-inspect` package.
|
|
79
|
-
- Keep optional integrations (`@agent-inspect/langchain`, `@agent-inspect/tui`) separate so users do not pull them in by default.
|
|
79
|
+
- Keep optional integrations (`@agent-inspect/langchain`, `@agent-inspect/tui`, `@agent-inspect/viewer`, `@agent-inspect/mcp-server`) separate so users do not pull them in by default.
|
|
80
|
+
|
|
81
|
+
## Optional surfaces (v2.6)
|
|
82
|
+
|
|
83
|
+
### Local viewer (`agent-inspect serve`)
|
|
84
|
+
|
|
85
|
+
- Binds **localhost by default** (`127.0.0.1`). Binding to all interfaces exposes local traces on the network.
|
|
86
|
+
- **Read-only** HTTP routes — no trace mutation APIs.
|
|
87
|
+
- Does not upload data. Review traces before sharing screenshots or exported copies.
|
|
88
|
+
|
|
89
|
+
### Read-only MCP server (`@agent-inspect/mcp-server`)
|
|
90
|
+
|
|
91
|
+
- Exposes **read-only** MCP tools over a configured trace directory.
|
|
92
|
+
- Default tool output redaction profile is **`share`** (not `local`).
|
|
93
|
+
- Does not invoke user agent tools or mutate traces.
|
|
94
|
+
- Configure via `AGENT_INSPECT_TRACE_DIR` and `AGENT_INSPECT_MCP_REDACTION_PROFILE` when documented.
|
|
95
|
+
|
|
96
|
+
IDE marketplace extension is **deferred** — see [docs/IDE-SURFACES.md](docs/IDE-SURFACES.md).
|
|
80
97
|
|
package/docs/ADAPTERS.md
CHANGED
|
@@ -453,6 +453,47 @@ Session navigation for multi-run workflows uses `agent-inspect sessions` / `sess
|
|
|
453
453
|
|
|
454
454
|
---
|
|
455
455
|
|
|
456
|
+
## Local viewer (`@agent-inspect/viewer`)
|
|
457
|
+
|
|
458
|
+
**Status:** optional package — v2.6.0 train.
|
|
459
|
+
|
|
460
|
+
Read-only localhost HTTP server for browsing traces on disk. Wired through `agent-inspect serve`.
|
|
461
|
+
|
|
462
|
+
| In scope | Out of scope |
|
|
463
|
+
| -------- | ------------ |
|
|
464
|
+
| `127.0.0.1` default bind | Cloud hosting or accounts |
|
|
465
|
+
| Trace list, timeline, check JSON routes | Trace mutation or replay |
|
|
466
|
+
| Reads through `agent-inspect/readers` | SQLite or remote fetch |
|
|
467
|
+
|
|
468
|
+
```bash
|
|
469
|
+
npm install agent-inspect @agent-inspect/viewer
|
|
470
|
+
npx agent-inspect serve --dir ./.agent-inspect-runs
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
---
|
|
474
|
+
|
|
475
|
+
## Read-only MCP server (`@agent-inspect/mcp-server`)
|
|
476
|
+
|
|
477
|
+
**Status:** optional package — v2.6.0 train.
|
|
478
|
+
|
|
479
|
+
Stdio MCP server exposing **read-only** tools (`list_traces`, `read_trace`, `search_traces`, `find_first_error`, `find_slowest_path`, `compare_runs`, `run_checks`, `create_share_safe_report`). Distinct from `@agent-inspect/mcp` (client telemetry).
|
|
480
|
+
|
|
481
|
+
| In scope | Out of scope |
|
|
482
|
+
| -------- | ------------ |
|
|
483
|
+
| Local trace directory tools | MCP client wrapping |
|
|
484
|
+
| `share` redaction default | Unredacted prompts by default |
|
|
485
|
+
| Bounded JSON responses | Tool invocation on user agents |
|
|
486
|
+
|
|
487
|
+
```ts
|
|
488
|
+
import { runReadOnlyMcpServer } from "@agent-inspect/mcp-server";
|
|
489
|
+
|
|
490
|
+
await runReadOnlyMcpServer({ redactionProfile: "share" });
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
Recipe: [examples/recipes/read-only-mcp-server](../examples/recipes/read-only-mcp-server/). IDE extension deferred: [IDE-SURFACES.md](./IDE-SURFACES.md).
|
|
494
|
+
|
|
495
|
+
---
|
|
496
|
+
|
|
456
497
|
## Future adapters (not shipped)
|
|
457
498
|
|
|
458
499
|
Direction only — see [ROADMAP.md](../ROADMAP.md):
|
package/docs/CLI.md
CHANGED
|
@@ -342,7 +342,24 @@ npx agent-inspect check trace.jsonl --circuit same-tool-repetition --circuit max
|
|
|
342
342
|
|
|
343
343
|
Recipe: [examples/recipes/deterministic-ci-checks](../examples/recipes/deterministic-ci-checks/README.md)
|
|
344
344
|
|
|
345
|
-
### 6.10 `
|
|
345
|
+
### 6.10 `serve`
|
|
346
|
+
|
|
347
|
+
Start the optional **localhost read-only** trace viewer (`@agent-inspect/viewer`). Reads traces from disk only; no upload or mutation.
|
|
348
|
+
|
|
349
|
+
```bash
|
|
350
|
+
agent-inspect serve [options]
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
Options:
|
|
354
|
+
|
|
355
|
+
- `--dir <path>`: trace directory to serve (default from `AGENT_INSPECT_TRACE_DIR` or `.agent-inspect-runs`)
|
|
356
|
+
- `--host <host>`: bind host (default `127.0.0.1`)
|
|
357
|
+
- `--port <number>`: bind port (default `7337`)
|
|
358
|
+
- `--open`: open a browser when host is localhost
|
|
359
|
+
|
|
360
|
+
Binding to `0.0.0.0` logs a warning — traces may be exposed on the network. Prefer `127.0.0.1` unless you accept that risk.
|
|
361
|
+
|
|
362
|
+
### 6.11 `eval`
|
|
346
363
|
|
|
347
364
|
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.
|
|
348
365
|
|
package/docs/MIGRATION.md
CHANGED
|
@@ -65,3 +65,27 @@ Nothing uploads by default. Manual metadata is redacted before disk by default,
|
|
|
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.
|
|
68
|
+
|
|
69
|
+
## Upgrading from 2.x to 3.0
|
|
70
|
+
|
|
71
|
+
v3.0 is a **linked npm major** for the public package family. **Persisted trace schema remains 1.0** — existing `.jsonl` files do not need rewriting.
|
|
72
|
+
|
|
73
|
+
### What changes
|
|
74
|
+
|
|
75
|
+
- New optional package [`@agent-inspect/adapter-sdk`](https://www.npmjs.com/package/@agent-inspect/adapter-sdk) for third-party adapter authoring (registration, conformance, privacy checklist, transform/renderer/indexer contracts).
|
|
76
|
+
- Community extension process documented in [COMMUNITY-EXTENSION-REGISTRY.md](./COMMUNITY-EXTENSION-REGISTRY.md).
|
|
77
|
+
- Extension interfaces are versioned in `@agent-inspect/adapter-sdk@3.x`; breaking extension API changes ship there, not in silent root patches.
|
|
78
|
+
|
|
79
|
+
### What stays the same
|
|
80
|
+
|
|
81
|
+
- Root imports (`inspectRun`, `step`, `observe`, `createInspector`, etc.) and subpath layout from v2.
|
|
82
|
+
- Local-first capture, metadata-only adapter defaults, and explicit migration via `agent-inspect migrate` for schema upgrades.
|
|
83
|
+
- Optional packages (`viewer`, `mcp-server`, adapters, reporters) remain opt-in peer dependencies.
|
|
84
|
+
|
|
85
|
+
### Upgrade steps
|
|
86
|
+
|
|
87
|
+
1. Bump linked dependencies together, e.g. `agent-inspect@^3.0.0` and matching `@agent-inspect/*` versions.
|
|
88
|
+
2. Re-run your trace/check CI after bump; no trace file migration is required for 2.6 → 3.0.
|
|
89
|
+
3. For new third-party adapters, use `@agent-inspect/adapter-sdk` and follow the community registry checklist.
|
|
90
|
+
|
|
91
|
+
See [V3-EXTENSION-CONTRACTS.md](./proposals/V3-EXTENSION-CONTRACTS.md) and [V3.0.0-RELEASE-READINESS.md](./implementation/release-trains/V3.0.0-RELEASE-READINESS.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-inspect",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Local-first execution-tree debugger for TypeScript AI agents",
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
},
|
|
179
179
|
"scripts": {
|
|
180
180
|
"clean": "pnpm -r exec -- rm -rf dist",
|
|
181
|
-
"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 && pnpm exec tsup --config tsup.mcp.config.ts && pnpm exec tsup --config tsup.guardrails.config.ts && pnpm exec tsup --config tsup.circuit.config.ts",
|
|
181
|
+
"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 && pnpm exec tsup --config tsup.mcp.config.ts && pnpm exec tsup --config tsup.guardrails.config.ts && pnpm exec tsup --config tsup.circuit.config.ts && pnpm exec tsup --config tsup.viewer.config.ts && pnpm exec tsup --config tsup.mcp-server.config.ts && pnpm exec tsup --config tsup.adapter-sdk.config.ts",
|
|
182
182
|
"typecheck": "tsc --noEmit",
|
|
183
183
|
"test": "vitest run",
|
|
184
184
|
"test:watch": "vitest",
|