agent-inspect 2.5.0 → 2.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 57efe08: Release v2.6.0 with optional localhost viewer and read-only MCP server surfaces.
8
+
9
+ 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.
10
+
3
11
  ## 2.5.0
4
12
 
5
13
  ### 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 `eval`
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-inspect",
3
- "version": "2.5.0",
3
+ "version": "2.6.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",
182
182
  "typecheck": "tsc --noEmit",
183
183
  "test": "vitest run",
184
184
  "test:watch": "vitest",