agent-inspect 3.5.4 → 4.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 +4 -4
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/CLI.md +21 -0
- package/docs/COMPARE.md +35 -14
- package/docs/SAFE-TRACE-SHARING.md +1 -0
- package/docs/TECHNICAL-GUIDE.md +9 -7
- package/docs/WORKSPACE.md +96 -0
- package/docs/assets/readme-product-loop.svg +12 -17
- package/package.json +12 -1
- package/packages/cli/dist/index.cjs +698 -72
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +699 -73
- package/packages/cli/dist/index.mjs.map +1 -1
- package/packages/core/dist/exporters.cjs +4 -1
- package/packages/core/dist/exporters.cjs.map +1 -1
- package/packages/core/dist/exporters.mjs +4 -1
- package/packages/core/dist/exporters.mjs.map +1 -1
- package/packages/core/dist/workspace.cjs +483 -0
- package/packages/core/dist/workspace.cjs.map +1 -0
- package/packages/core/dist/workspace.d.cts +220 -0
- package/packages/core/dist/workspace.d.ts +220 -0
- package/packages/core/dist/workspace.mjs +461 -0
- package/packages/core/dist/workspace.mjs.map +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- dc4297b: Add the local trace workspace (v4.0): a project-local layout and manifest (`.agent-inspect/workspace.json`) with `workspace` CLI commands (`init`, `status`, `doctor`, `clean`, `path`) and a new experimental `agent-inspect/workspace` subpath export.
|
|
8
|
+
|
|
9
|
+
The workspace is additive and backward-compatible: existing trace directories keep working, existing `.agent-inspect` directories are adopted without rewrite, and trace files are never deleted. All manifest-derived paths are traversal-guarded, `workspace clean` is a dry-run by default, and there is no network I/O, daemon, or database dependency.
|
|
10
|
+
|
|
11
|
+
## 3.5.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 822da6c: Fix npm README images: use absolute raw GitHub SVG URLs with sanitize=true so the product-loop diagram and logos render on npmjs.com. Harden readme-product-loop.svg for sanitizer compatibility. Docs-only; no runtime API changes.
|
|
16
|
+
|
|
3
17
|
## 3.5.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<picture>
|
|
3
|
-
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/agent-inspect-logo-dark.svg">
|
|
4
|
-
<img src="docs/assets/agent-inspect-logo.svg" width="240" alt="AgentInspect">
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/rajudandigam/agent-inspect/main/docs/assets/agent-inspect-logo-dark.svg?sanitize=true">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/rajudandigam/agent-inspect/main/docs/assets/agent-inspect-logo.svg?sanitize=true" width="240" alt="AgentInspect">
|
|
5
5
|
</picture>
|
|
6
6
|
</p>
|
|
7
7
|
|
|
@@ -52,7 +52,7 @@ Install → one trace → one failure check → one share-safe artifact in under
|
|
|
52
52
|
Guide: [First trace in 5 minutes](https://agentinspect.vercel.app/docs/getting-started/) · [repo](docs/FIRST-TRACE-IN-5-MINUTES.md)
|
|
53
53
|
|
|
54
54
|
<p align="center">
|
|
55
|
-
<img src="docs/assets/readme-product-loop.svg" alt="Capture, inspect, check, redact — local JSONL only" width="720">
|
|
55
|
+
<img src="https://raw.githubusercontent.com/rajudandigam/agent-inspect/main/docs/assets/readme-product-loop.svg?sanitize=true" alt="Capture, inspect, check, redact — local JSONL only" width="720">
|
|
56
56
|
</p>
|
|
57
57
|
|
|
58
58
|
## Choose your path
|
|
@@ -153,7 +153,7 @@ See [Compare](https://agentinspect.vercel.app/docs/compare/).
|
|
|
153
153
|
|
|
154
154
|
## Install details
|
|
155
155
|
|
|
156
|
-
Current release: **3.5.
|
|
156
|
+
Current release: **3.5.5** (sixteen linked npm packages). Persisted trace schema **1.0**. Requires **Node.js >= 20**.
|
|
157
157
|
|
|
158
158
|
```bash
|
|
159
159
|
pnpm add agent-inspect
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
## Architecture
|
|
2
2
|
|
|
3
|
-
> **Adoption-focused overview:** see [TECHNICAL-GUIDE.md](./TECHNICAL-GUIDE.md) for a comprehensive technical guide (v3.5.
|
|
3
|
+
> **Adoption-focused overview:** see [TECHNICAL-GUIDE.md](./TECHNICAL-GUIDE.md) for a comprehensive technical guide (v3.5.5) suitable for blogs and outreach.
|
|
4
4
|
|
|
5
5
|
AgentInspect is a **local-first execution-tree debugger**: manual traces and log ingest produce inspectable step trees stored as JSONL on disk (default `.agent-inspect-runs/`), with a CLI for list/view/clean/logs/tail/export/diff workflows.
|
|
6
6
|
|
package/docs/CLI.md
CHANGED
|
@@ -29,6 +29,7 @@ Core commands:
|
|
|
29
29
|
- `migrate` — convert one local AgentInspect JSONL file to schema 1.0 with dry-run or explicit output
|
|
30
30
|
- `init` — scaffold local AgentInspect config and demo files (v3.1+)
|
|
31
31
|
- `doctor` — diagnose local setup without network or installs (v3.1+)
|
|
32
|
+
- `workspace` — manage a project-local trace workspace (`.agent-inspect/workspace.json`) (v4.0+)
|
|
32
33
|
- `check` — run deterministic local trace checks with stable JSON and exit codes
|
|
33
34
|
- `eval` — run deterministic local evals over existing traces
|
|
34
35
|
- `redact` — redact a local JSON/JSONL file or trace copy
|
|
@@ -808,6 +809,26 @@ Provider design gate:
|
|
|
808
809
|
- Provider prompts must ask for concise explanations from redacted facts only. They must not request, expose, or preserve raw chain-of-thought.
|
|
809
810
|
- Cloud provider behavior is never selected by default and must be reviewed before implementation. Local provider support must still be explicit and opt-in.
|
|
810
811
|
|
|
812
|
+
### 6.22 `workspace`
|
|
813
|
+
|
|
814
|
+
Manage a project-local trace workspace (`.agent-inspect/workspace.json`). Added in v4.0. Local-only; trace files are never deleted. See [WORKSPACE.md](WORKSPACE.md) for the full model.
|
|
815
|
+
|
|
816
|
+
```bash
|
|
817
|
+
agent-inspect workspace init [--project <name>] [--redaction-profile <local|share|strict>] [--dry-run] [--json]
|
|
818
|
+
agent-inspect workspace status [--json]
|
|
819
|
+
agent-inspect workspace doctor [--json]
|
|
820
|
+
agent-inspect workspace clean [--yes] [--json]
|
|
821
|
+
agent-inspect workspace path [--json]
|
|
822
|
+
```
|
|
823
|
+
|
|
824
|
+
- `init` — create or adopt a workspace and its standard folders (`runs/`, `reports/`, `artifacts/`, `bundles/`, `notes/`, `index/`). An existing `workspace.json` is adopted without rewrite; existing traces are preserved.
|
|
825
|
+
- `status` — read-only counts of traces, reports, artifacts, bundles, notes, plus index status.
|
|
826
|
+
- `doctor` — validate the manifest, folder permissions, trace readability, and index freshness. Exits non-zero when a check fails.
|
|
827
|
+
- `clean` — remove generated content (reports/artifacts/bundles/index). Dry-run by default; `--yes` deletes. Trace directories are never targeted.
|
|
828
|
+
- `path` — print resolved workspace paths.
|
|
829
|
+
|
|
830
|
+
All subcommands accept `--json` for deterministic output.
|
|
831
|
+
|
|
811
832
|
## 7. Optional TUI behavior
|
|
812
833
|
|
|
813
834
|
`view --tui` delegates to `@agent-inspect/tui` and requires an interactive terminal. If the package is not installed, the CLI prints a short install hint.
|
package/docs/COMPARE.md
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
# Compare AgentInspect
|
|
2
2
|
|
|
3
|
-
AgentInspect is a local-first
|
|
3
|
+
AgentInspect is a local-first trace workbench for TypeScript AI agents: capture runs as local JSONL, inspect and diff them from the CLI, gate them in CI, and redact before sharing. It is designed for the inner loop, not as a replacement for hosted observability, dataset evaluation, or production monitoring platforms. Those tools complement AgentInspect; this page maps where each fits.
|
|
4
4
|
|
|
5
5
|
**Docs site:** [https://agentinspect.vercel.app/docs/compare/](https://agentinspect.vercel.app/docs/compare/)
|
|
6
6
|
|
|
7
|
+
## Category comparison
|
|
8
|
+
|
|
9
|
+
| Dimension | AgentInspect | Hosted dashboards (LangSmith, Langfuse) | Eval platforms (Braintrust) | Production APM / OTel pipelines |
|
|
10
|
+
| --------- | ------------ | --------------------------------------- | --------------------------- | ------------------------------- |
|
|
11
|
+
| Where traces live | Local JSONL on your disk | Vendor or self-hosted backend | Vendor backend | Your collector + backend |
|
|
12
|
+
| Account / setup | None; `npm install` + CLI | Account or deployment | Account | SDK + collector + backend |
|
|
13
|
+
| Primary surface | CLI (`view`, `report`, `diff`, `check`), local viewer, in-repo VS Code extension | Web dashboards | Web dashboards, eval UI | Dashboards, alerting |
|
|
14
|
+
| Evals | Deterministic local heuristics and CI gates (`check`, `eval`, `circuit`, `guardrails`) | Platform evals | Datasets, scoring, regressions at scale | Not the focus |
|
|
15
|
+
| Retention / fleet view | Not the goal | Strong | Strong | Strong |
|
|
16
|
+
| Data sharing | Explicit `redact` + `scan` / `verify-safe` before you share a file | Team access controls | Team access controls | Org pipelines |
|
|
17
|
+
| Network behavior | No upload; everything stays local unless you share a file | Uploads traces by design | Uploads by design | Ships telemetry by design |
|
|
18
|
+
|
|
19
|
+
If you need hosted retention, fleet dashboards, dataset management, or org-wide pipelines, use one of those platforms alongside AgentInspect. Boundaries are listed in [LIMITATIONS.md](./LIMITATIONS.md); concrete inner-loop workflows in [USE-CASES.md](./USE-CASES.md).
|
|
20
|
+
|
|
7
21
|
## AgentInspect vs console.log
|
|
8
22
|
|
|
9
23
|
- **console.log is flat**: logs are a stream of lines without run grouping or step boundaries.
|
|
10
24
|
- **AgentInspect adds structure**: runs, nested steps, step types (tool/LLM), durations, status summaries, and local trace files you can inspect later.
|
|
11
25
|
- **console.log still matters**: use it for quick values or ad-hoc debugging inside a step.
|
|
12
|
-
- **
|
|
26
|
+
- **Existing structured logs work too**: the log ingest path parses JSON logs into trees without instrumentation ([LOGGING-PLAYBOOK.md](./LOGGING-PLAYBOOK.md)).
|
|
13
27
|
|
|
14
28
|
## AgentInspect vs LangSmith
|
|
15
29
|
|
|
@@ -17,7 +31,7 @@ LangSmith is a hosted/platform workflow for tracing, evaluation, and observabili
|
|
|
17
31
|
|
|
18
32
|
AgentInspect is local-first CLI debugging:
|
|
19
33
|
|
|
20
|
-
- Use AgentInspect to debug locally before
|
|
34
|
+
- Use AgentInspect to debug locally before or alongside LangSmith when iterating on agent logic; `@agent-inspect/langchain` captures LangChain callbacks locally.
|
|
21
35
|
- AgentInspect does not provide hosted dashboards, dataset/eval management workflows, or production tracing pipelines.
|
|
22
36
|
|
|
23
37
|
## AgentInspect vs Langfuse
|
|
@@ -26,7 +40,7 @@ Langfuse provides broader LLM observability (tracing, prompt management, dataset
|
|
|
26
40
|
|
|
27
41
|
AgentInspect focuses on local execution trees and CLI workflows:
|
|
28
42
|
|
|
29
|
-
- Complementary: use AgentInspect for quick local run understanding; use Langfuse for dashboards and longer-lived observability workflows.
|
|
43
|
+
- Complementary: use AgentInspect for quick local run understanding and PR/debug artifacts; use Langfuse for dashboards and longer-lived observability workflows.
|
|
30
44
|
- Not a replacement.
|
|
31
45
|
|
|
32
46
|
## AgentInspect vs Braintrust
|
|
@@ -35,7 +49,7 @@ Braintrust is strong for evals, regressions, datasets, and production AI quality
|
|
|
35
49
|
|
|
36
50
|
AgentInspect is lighter and local-first:
|
|
37
51
|
|
|
38
|
-
- Use AgentInspect to understand a single run locally and run deterministic trace checks/eval heuristics before sharing artifacts.
|
|
52
|
+
- Use AgentInspect to understand a single run locally and run deterministic trace checks (`check`, `@agent-inspect/eval` heuristics, `@agent-inspect/guardrails`, `@agent-inspect/circuit`) before sharing artifacts.
|
|
39
53
|
- Use Braintrust when you want repeatable evals, comparisons at scale, and production quality workflows.
|
|
40
54
|
|
|
41
55
|
## AgentInspect vs Phoenix / OpenInference
|
|
@@ -44,7 +58,7 @@ Phoenix and the OpenInference ecosystem are standards-oriented and useful for tr
|
|
|
44
58
|
|
|
45
59
|
AgentInspect can export **OpenInference-compatible JSON** and **OTLP JSON** as local files:
|
|
46
60
|
|
|
47
|
-
- Exports are **compatibility-oriented** and
|
|
61
|
+
- Exports are **compatibility-oriented** and experimental; validate them against your target backend or collector.
|
|
48
62
|
- AgentInspect does not claim that every backend will accept these exports without configuration.
|
|
49
63
|
|
|
50
64
|
## AgentInspect vs OpenTelemetry setup
|
|
@@ -53,9 +67,9 @@ OpenTelemetry is powerful, but setup can be heavier (SDK configuration, exporter
|
|
|
53
67
|
|
|
54
68
|
AgentInspect avoids SDK/collector setup for local debugging:
|
|
55
69
|
|
|
56
|
-
- Use AgentInspect when you want quick, local execution trees with no collector required.
|
|
70
|
+
- Use AgentInspect when you want quick, local execution trees with no collector required; no OTel SDK is added to the root package.
|
|
57
71
|
- Use OpenTelemetry when you need organization-wide production telemetry pipelines.
|
|
58
|
-
-
|
|
72
|
+
- Local OTLP JSON export can help bridge later, but AgentInspect is not an OpenTelemetry SDK replacement.
|
|
59
73
|
|
|
60
74
|
## Quick decision table
|
|
61
75
|
|
|
@@ -63,9 +77,12 @@ AgentInspect avoids SDK/collector setup for local debugging:
|
|
|
63
77
|
| --- | --- |
|
|
64
78
|
| Local agent debugging | Strong fit |
|
|
65
79
|
| No-account CLI tracing | Strong fit |
|
|
66
|
-
|
|
|
80
|
+
| Framework-native capture (AI SDK, OpenAI Agents, LangChain, MCP) | Good fit (optional adapter packages) |
|
|
81
|
+
| Deterministic local eval heuristics and CI gates | Good fit |
|
|
82
|
+
| Loop / retry / timeout analysis (`circuit`) | Good fit |
|
|
67
83
|
| Share-safe local redaction copy | Good fit |
|
|
68
|
-
|
|
|
84
|
+
| Existing structured logs to trees | Good fit |
|
|
85
|
+
| VS Code trace review (in-repo extension) | Good fit; Marketplace listing separate |
|
|
69
86
|
| Production dashboards | Not the goal |
|
|
70
87
|
| Hosted eval datasets | Not the goal |
|
|
71
88
|
| Prompt management | Not the goal |
|
|
@@ -74,12 +91,16 @@ AgentInspect avoids SDK/collector setup for local debugging:
|
|
|
74
91
|
|
|
75
92
|
## v3.5 positioning (local inner loop)
|
|
76
93
|
|
|
77
|
-
AgentInspect v3.5 is the **adoption release
|
|
94
|
+
AgentInspect v3.5 is the **adoption release**. The npm map is one core package (`agent-inspect`: APIs + CLI) plus optional packages that stay out of the root dependency graph: framework adapters (`ai-sdk`, `openai-agents`, `langchain`, `mcp`, `adapter-sdk`), CI and quality gates (`vitest`, `jest`, `eval`, `guardrails`, `circuit`, `harness`), and inspection surfaces (`viewer`, `tui`, `mcp-server`, `redact`). See the [package map](../README.md#package-map).
|
|
78
95
|
|
|
79
|
-
|
|
96
|
+
Use it when:
|
|
97
|
+
|
|
98
|
+
- You want **traces on disk** before or alongside hosted tools
|
|
80
99
|
- You need **CI gates** (`check`, `eval`, `circuit`) without a vendor account
|
|
81
100
|
- You want **metadata-only** defaults and explicit `redact` before sharing
|
|
82
101
|
|
|
83
102
|
Keep using LangSmith, Langfuse, Braintrust, Phoenix, or OTel when you need hosted retention, fleet dashboards, dataset management, or org-wide production pipelines. AgentInspect is complementary.
|
|
84
103
|
|
|
85
|
-
|
|
104
|
+
Before posting any exported trace to an issue, PR, or chat, follow [SAFE-TRACE-SHARING.md](./SAFE-TRACE-SHARING.md) and [SECURITY.md](../SECURITY.md): redaction is a key-based safeguard, and exports deserve a human review.
|
|
105
|
+
|
|
106
|
+
**Full adoption path:** [ADOPTION.md](./ADOPTION.md) · **Boundaries:** [LIMITATIONS.md](./LIMITATIONS.md) · **Scenarios:** [USE-CASES.md](./USE-CASES.md)
|
|
@@ -57,6 +57,7 @@ Replace sensitive data with clear placeholders such as `example.test`, `user@exa
|
|
|
57
57
|
- OpenInference / OTLP JSON exports: check attributes, span names, events, and resource metadata.
|
|
58
58
|
- Structured log ingest configs: confirm mapped keys do not pull in full request bodies, headers, raw prompts, or unbounded output fields.
|
|
59
59
|
- LangChain adapter traces: keep `capture: "metadata-only"` for shareable examples; review `capture: "preview"` traces carefully because previews can include prompt or output fragments.
|
|
60
|
+
- Third-party adapter packages: follow the [Adapter SDK privacy checklist](./ADAPTER-SDK-PRIVACY.md) before sharing adapter traces, examples, or registry submissions.
|
|
60
61
|
|
|
61
62
|
## When to use each profile
|
|
62
63
|
|
package/docs/TECHNICAL-GUIDE.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# AgentInspect Technical Guide
|
|
2
2
|
|
|
3
|
-
**Version:** 3.5.
|
|
4
|
-
|
|
5
|
-
**
|
|
3
|
+
**Version:** 3.5.5 · **Audience:** TypeScript agent developers, platform engineers, tech leads
|
|
4
|
+
|
|
5
|
+
**Purpose:** Source-of-truth technical overview for adoption content (blogs, articles, emails, demos).
|
|
6
|
+
|
|
7
|
+
**Status:** Grounded in shipped code and docs as of v3.5.5. Not a compliance or marketing guarantee.
|
|
6
8
|
|
|
7
9
|
---
|
|
8
10
|
|
|
@@ -107,9 +109,9 @@ flowchart LR
|
|
|
107
109
|
|
|
108
110
|
The root `agent-inspect` tarball ships core + CLI. Heavy optional deps stay in scoped packages.
|
|
109
111
|
|
|
110
|
-
### 4.2 Public package ecosystem (v3.5.
|
|
112
|
+
### 4.2 Public package ecosystem (v3.5.5)
|
|
111
113
|
|
|
112
|
-
Sixteen linked npm packages at **3.5.
|
|
114
|
+
Sixteen linked npm packages at **3.5.5**:
|
|
113
115
|
|
|
114
116
|
| Tier | Package | Purpose |
|
|
115
117
|
| ---- | ------- | ------- |
|
|
@@ -433,7 +435,7 @@ Daily workflow: capture → inspect → verify → share safely → scale. See [
|
|
|
433
435
|
|
|
434
436
|
## 16. Content creation appendix
|
|
435
437
|
|
|
436
|
-
Reuse these blocks in blogs, emails, and comments. All statements are accurate to v3.5.
|
|
438
|
+
Reuse these blocks in blogs, emails, and comments. All statements are accurate to v3.5.5; adjust version numbers when publishing.
|
|
437
439
|
|
|
438
440
|
### 16.1 Elevator pitches
|
|
439
441
|
|
|
@@ -523,4 +525,4 @@ Vitest reporter → upload artifact → `verify-safe` → reviewer workflow →
|
|
|
523
525
|
|
|
524
526
|
---
|
|
525
527
|
|
|
526
|
-
*AgentInspect v3.5.
|
|
528
|
+
*AgentInspect v3.5.5 — local-first trace workbench for TypeScript AI agents. MIT license.*
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Local trace workspace
|
|
2
|
+
|
|
3
|
+
The **workspace** turns a project's local AgentInspect output into one coherent, local-first workbench: traces, reports, artifacts, bundles, an optional index, and notes — described by a small manifest at `.agent-inspect/workspace.json`.
|
|
4
|
+
|
|
5
|
+
It is **opt-in and additive**. Existing trace directories keep working exactly as before; the workspace is a layout + config layer, not a schema change. Trace files are never deleted by workspace commands.
|
|
6
|
+
|
|
7
|
+
- **Added in:** v4.0.0
|
|
8
|
+
- **Stability:** experimental
|
|
9
|
+
- **Non-goals:** no daemon, no database dependency, no cloud sync, no default migration of existing traces.
|
|
10
|
+
|
|
11
|
+
## Quick start
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Create (or adopt) a workspace in the current project
|
|
15
|
+
agent-inspect workspace init --project my-agent
|
|
16
|
+
|
|
17
|
+
# See what's inside
|
|
18
|
+
agent-inspect workspace status
|
|
19
|
+
|
|
20
|
+
# Validate config, permissions, and index freshness
|
|
21
|
+
agent-inspect workspace doctor
|
|
22
|
+
|
|
23
|
+
# Preview generated content that could be cleaned (dry-run)
|
|
24
|
+
agent-inspect workspace clean
|
|
25
|
+
# Actually remove generated content (traces are always preserved)
|
|
26
|
+
agent-inspect workspace clean --yes
|
|
27
|
+
|
|
28
|
+
# Print resolved paths
|
|
29
|
+
agent-inspect workspace path
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
All commands accept `--json` for deterministic machine-readable output.
|
|
33
|
+
|
|
34
|
+
## Layout
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
.agent-inspect/
|
|
38
|
+
workspace.json
|
|
39
|
+
runs/ # JSONL traces
|
|
40
|
+
reports/ # generated reports
|
|
41
|
+
artifacts/ # CI artifacts
|
|
42
|
+
bundles/ # share-safe bundles
|
|
43
|
+
index/ # optional local index (v4.1+)
|
|
44
|
+
notes/ # decision notes
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Manifest: `workspace.json`
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"schemaVersion": "1.0",
|
|
52
|
+
"project": "my-agent",
|
|
53
|
+
"createdAt": "2026-07-08T00:00:00.000Z",
|
|
54
|
+
"traceDirs": ["runs"],
|
|
55
|
+
"reportsDir": "reports",
|
|
56
|
+
"artifactsDir": "artifacts",
|
|
57
|
+
"bundlesDir": "bundles",
|
|
58
|
+
"notesDir": "notes",
|
|
59
|
+
"redactionProfile": "share",
|
|
60
|
+
"index": { "enabled": false, "type": "none" }
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
All directory fields are relative to the `.agent-inspect` workspace directory and must resolve inside it (absolute paths and `..` traversal are rejected). `redactionProfile` sets the default share-safety posture used by later bundle/export flows.
|
|
65
|
+
|
|
66
|
+
## Adoption and compatibility
|
|
67
|
+
|
|
68
|
+
- **New project:** `workspace init` creates `workspace.json` and the standard folders.
|
|
69
|
+
- **Existing `.agent-inspect` directory:** detected and adopted without rewriting or moving existing traces. Top-level `*.jsonl` traces are preserved and included via a `"."` trace directory.
|
|
70
|
+
- **Existing manifest:** left untouched; missing folders are created.
|
|
71
|
+
- **No manifest:** existing commands continue to operate against explicit trace directories.
|
|
72
|
+
|
|
73
|
+
## Programmatic API
|
|
74
|
+
|
|
75
|
+
The same model is available on the `agent-inspect/workspace` subpath (experimental):
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
import {
|
|
79
|
+
createWorkspace,
|
|
80
|
+
getWorkspaceStatus,
|
|
81
|
+
readWorkspaceManifestFile,
|
|
82
|
+
resolveWorkspaceLocation,
|
|
83
|
+
} from "agent-inspect/workspace";
|
|
84
|
+
|
|
85
|
+
const result = await createWorkspace({ project: "my-agent" });
|
|
86
|
+
const status = await getWorkspaceStatus(result.location, result.manifest);
|
|
87
|
+
console.log(status.traceFiles, status.reports);
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Helpers are local-only, never perform network I/O, and never delete trace files.
|
|
91
|
+
|
|
92
|
+
## Safety
|
|
93
|
+
|
|
94
|
+
- Manifest parsing validates shape and bounds input size; invalid input is rejected with clear messages rather than throwing.
|
|
95
|
+
- All manifest-derived paths are resolved and confirmed to stay within the workspace directory.
|
|
96
|
+
- `workspace clean` is a dry-run by default and never targets trace directories.
|
|
@@ -1,31 +1,26 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 760 140" role="img" aria-label="AgentInspect product loop: capture, inspect, check, redact">
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="760" height="140" viewBox="0 0 760 140" role="img" aria-label="AgentInspect product loop: capture, inspect, check, redact">
|
|
2
|
+
<defs>
|
|
3
|
+
<marker id="arr" markerWidth="8" markerHeight="8" refX="6" refY="3" orient="auto">
|
|
4
|
+
<path d="M0,0 L6,3 L0,6 Z" fill="#64748b"/>
|
|
5
|
+
</marker>
|
|
6
|
+
</defs>
|
|
7
|
+
<rect width="760" height="140" fill="#ffffff"/>
|
|
8
|
+
<g font-family="ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif">
|
|
5
9
|
<rect x="16" y="28" width="150" height="72" rx="12" fill="#eef2ff" stroke="#6366f1" stroke-width="1.5"/>
|
|
6
10
|
<text x="91" y="58" text-anchor="middle" font-size="14" font-weight="600" fill="#312e81">Capture</text>
|
|
7
|
-
<text x="91" y="78" text-anchor="middle" font-size="11" fill="#475569">run
|
|
8
|
-
<!-- arrow -->
|
|
11
|
+
<text x="91" y="78" text-anchor="middle" font-size="11" fill="#475569">run, tools, adapters</text>
|
|
9
12
|
<path d="M174 64h28" stroke="#64748b" stroke-width="2" marker-end="url(#arr)"/>
|
|
10
|
-
<!-- Inspect -->
|
|
11
13
|
<rect x="210" y="28" width="150" height="72" rx="12" fill="#ecfdf5" stroke="#10b981" stroke-width="1.5"/>
|
|
12
14
|
<text x="285" y="58" text-anchor="middle" font-size="14" font-weight="600" fill="#064e3b">Inspect</text>
|
|
13
|
-
<text x="285" y="78" text-anchor="middle" font-size="11" fill="#475569">tree
|
|
15
|
+
<text x="285" y="78" text-anchor="middle" font-size="11" fill="#475569">tree, report, diff</text>
|
|
14
16
|
<path d="M368 64h28" stroke="#64748b" stroke-width="2" marker-end="url(#arr)"/>
|
|
15
|
-
<!-- Check -->
|
|
16
17
|
<rect x="404" y="28" width="150" height="72" rx="12" fill="#fff7ed" stroke="#f59e0b" stroke-width="1.5"/>
|
|
17
18
|
<text x="479" y="58" text-anchor="middle" font-size="14" font-weight="600" fill="#78350f">Check</text>
|
|
18
|
-
<text x="479" y="78" text-anchor="middle" font-size="11" fill="#475569">CI
|
|
19
|
+
<text x="479" y="78" text-anchor="middle" font-size="11" fill="#475569">CI, eval, stalls</text>
|
|
19
20
|
<path d="M562 64h28" stroke="#64748b" stroke-width="2" marker-end="url(#arr)"/>
|
|
20
|
-
<!-- Redact -->
|
|
21
21
|
<rect x="598" y="28" width="146" height="72" rx="12" fill="#f8fafc" stroke="#64748b" stroke-width="1.5"/>
|
|
22
22
|
<text x="671" y="58" text-anchor="middle" font-size="14" font-weight="600" fill="#0f172a">Redact</text>
|
|
23
23
|
<text x="671" y="78" text-anchor="middle" font-size="11" fill="#475569">share-safe artifact</text>
|
|
24
|
-
<text x="380" y="124" text-anchor="middle" font-size="12" fill="#64748b">local JSONL only
|
|
24
|
+
<text x="380" y="124" text-anchor="middle" font-size="12" fill="#64748b">local JSONL only - no account - no upload</text>
|
|
25
25
|
</g>
|
|
26
|
-
<defs>
|
|
27
|
-
<marker id="arr" markerWidth="8" markerHeight="8" refX="6" refY="3" orient="auto">
|
|
28
|
-
<path d="M0,0 L6,3 L0,6 Z" fill="#64748b"/>
|
|
29
|
-
</marker>
|
|
30
|
-
</defs>
|
|
31
26
|
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-inspect",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Trace, check, and safely share TypeScript AI-agent runs locally — no account, no upload, metadata-only by default",
|
|
@@ -115,6 +115,16 @@
|
|
|
115
115
|
"types": "./packages/core/dist/reporters.d.cts",
|
|
116
116
|
"default": "./packages/core/dist/reporters.cjs"
|
|
117
117
|
}
|
|
118
|
+
},
|
|
119
|
+
"./workspace": {
|
|
120
|
+
"import": {
|
|
121
|
+
"types": "./packages/core/dist/workspace.d.ts",
|
|
122
|
+
"default": "./packages/core/dist/workspace.mjs"
|
|
123
|
+
},
|
|
124
|
+
"require": {
|
|
125
|
+
"types": "./packages/core/dist/workspace.d.cts",
|
|
126
|
+
"default": "./packages/core/dist/workspace.cjs"
|
|
127
|
+
}
|
|
118
128
|
}
|
|
119
129
|
},
|
|
120
130
|
"bin": {
|
|
@@ -153,6 +163,7 @@
|
|
|
153
163
|
"docs/DESIGN-PARTNER-GUIDE.md",
|
|
154
164
|
"docs/DEMO-SCRIPT.md",
|
|
155
165
|
"docs/TECHNICAL-GUIDE.md",
|
|
166
|
+
"docs/WORKSPACE.md",
|
|
156
167
|
"docs/AI-SDK-ADOPTION.md",
|
|
157
168
|
"docs/OPENAI-AGENTS-LOCAL.md",
|
|
158
169
|
"docs/NESTJS.md",
|