agenticreplay 0.0.0-stage → 0.1.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/.dockerignore +11 -0
- package/.gitattributes +19 -0
- package/.github/workflows/ci.yml +146 -0
- package/.grok-plugin/plugin.json +12 -0
- package/.mcp.json +8 -0
- package/.prettierignore +4 -0
- package/.prettierrc.json +1 -0
- package/CONTRIBUTING.md +106 -0
- package/Dockerfile +30 -0
- package/LICENSE +201 -0
- package/MAINTAINERS.md +24 -0
- package/README.md +939 -2
- package/RELEASING.md +183 -0
- package/SECURITY.md +149 -0
- package/capture/CAPTURE-RUNBOOK.md +271 -0
- package/capture/CURSOR-HTTP2.md +226 -0
- package/capture/README.md +349 -0
- package/capture/capture-run.gif +0 -0
- package/capture/capture.mjs +1883 -0
- package/capture/fable-capture.gif +0 -0
- package/capture/fable-capture.mp4 +0 -0
- package/capture/muse-shim.mjs +114 -0
- package/capture/render-run.mjs +125 -0
- package/capture/render.mjs +228 -0
- package/companion-kiokuko-dsh.patch +7806 -0
- package/docs/agenticreplay-acceptance.md +135 -0
- package/docs/architecture.md +160 -0
- package/docs/chain-card.png +0 -0
- package/docs/compare-card.png +0 -0
- package/docs/demo-cli.gif +0 -0
- package/docs/demo-viewer.gif +0 -0
- package/docs/fidelity.md +16 -0
- package/docs/good-first-issues.md +78 -0
- package/docs/graph-card.png +0 -0
- package/docs/how-to/compare-models-on-the-same-failure.md +58 -0
- package/docs/how-to/debug-a-failing-agent-run.md +127 -0
- package/docs/how-to/why-did-my-agent-delete-my-file.md +92 -0
- package/docs/i18n/README.ar.md +597 -0
- package/docs/i18n/README.de.md +648 -0
- package/docs/i18n/README.es.md +642 -0
- package/docs/i18n/README.fr.md +649 -0
- package/docs/i18n/README.ja.md +608 -0
- package/docs/i18n/README.ko.md +598 -0
- package/docs/i18n/README.zh-CN.md +574 -0
- package/docs/integrations.md +628 -0
- package/docs/launch-path.md +215 -0
- package/docs/media/README.md +101 -0
- package/docs/media/sync-transcript.txt +18 -0
- package/docs/media/transcript.txt +29 -0
- package/docs/opencode-capture.md +137 -0
- package/docs/plugins.md +250 -0
- package/docs/proposals/action-graph-and-reasoning.md +354 -0
- package/docs/sync-card.png +0 -0
- package/docs/validation.md +52 -0
- package/docs/viewer-timeline.png +0 -0
- package/examples/traces/README.md +50 -0
- package/examples/traces/run_9f2c14a03b71/blobs/1b/1b694f32b8c582ace6b35ad64050e532fb3ee3ecc1a2763a82cf42ad0f2a3dd0 +10 -0
- package/examples/traces/run_9f2c14a03b71/blobs/51/517b5b8ec6c3b13121dbaec61784e2a024247c7c4efd9ba068b582ee57bd2764 +4 -0
- package/examples/traces/run_9f2c14a03b71/blobs/5b/5bba1bd069013d86363f69c00c1ae77c84c4e113aeeb7431c8141af4fed76860 +7 -0
- package/examples/traces/run_9f2c14a03b71/blobs/84/84247e7b385fd5f99a6728a509838e52ef963af92f44ef6eccbed6910de1438d +10 -0
- package/examples/traces/run_9f2c14a03b71/blobs/ac/ac9b4be9bdf7fe63c7b5135e2d14c4c0745a48771e733804869790590455f8e8 +7 -0
- package/examples/traces/run_9f2c14a03b71/events.jsonl +31 -0
- package/examples/traces/run_9f2c14a03b71/manifest.json +46 -0
- package/examples/traces/run_9f2c14a03b71/redactions.json +17 -0
- package/llms.txt +26 -0
- package/package.json +28 -4
- package/packages/adapters/fixtures/harness/claude-code.json +12 -0
- package/packages/adapters/fixtures/harness/codex.json +10 -0
- package/packages/adapters/fixtures/harness/cursor.json +10 -0
- package/packages/adapters/fixtures/harness/exec.json +10 -0
- package/packages/adapters/fixtures/harness/generic-openai.json +14 -0
- package/packages/adapters/fixtures/harness/goose.json +14 -0
- package/packages/adapters/fixtures/harness/grok.json +18 -0
- package/packages/adapters/fixtures/harness/hermes.json +10 -0
- package/packages/adapters/fixtures/harness/indexrag.json +21 -0
- package/packages/adapters/fixtures/harness/kilo.json +10 -0
- package/packages/adapters/fixtures/harness/mcode.json +10 -0
- package/packages/adapters/fixtures/harness/mimo.json +10 -0
- package/packages/adapters/fixtures/harness/node.json +22 -0
- package/packages/adapters/fixtures/harness/openclaw.json +21 -0
- package/packages/adapters/fixtures/harness/opencode.json +20 -0
- package/packages/adapters/fixtures/harness/qwen.json +20 -0
- package/packages/adapters/fixtures/harness/zcode.json +10 -0
- package/packages/adapters/package.json +29 -0
- package/packages/adapters/src/claude-code.ts +109 -0
- package/packages/adapters/src/codex.ts +135 -0
- package/packages/adapters/src/contract.ts +531 -0
- package/packages/adapters/src/cursor.ts +76 -0
- package/packages/adapters/src/detect.ts +132 -0
- package/packages/adapters/src/env.ts +118 -0
- package/packages/adapters/src/exec.ts +59 -0
- package/packages/adapters/src/generic-openai.ts +36 -0
- package/packages/adapters/src/goose.ts +87 -0
- package/packages/adapters/src/grok.ts +60 -0
- package/packages/adapters/src/hermes.ts +92 -0
- package/packages/adapters/src/index.ts +24 -0
- package/packages/adapters/src/indexrag.ts +254 -0
- package/packages/adapters/src/kilo.ts +39 -0
- package/packages/adapters/src/mcode.ts +392 -0
- package/packages/adapters/src/mcp-config.ts +84 -0
- package/packages/adapters/src/mimo.ts +44 -0
- package/packages/adapters/src/node.ts +71 -0
- package/packages/adapters/src/openclaw.ts +50 -0
- package/packages/adapters/src/opencode-api-bases.ts +200 -0
- package/packages/adapters/src/opencode-capture.ts +164 -0
- package/packages/adapters/src/opencode-catalog.ts +44 -0
- package/packages/adapters/src/opencode-config.ts +209 -0
- package/packages/adapters/src/opencode.ts +257 -0
- package/packages/adapters/src/qwen.ts +113 -0
- package/packages/adapters/src/registry.ts +121 -0
- package/packages/adapters/src/scaffold.ts +173 -0
- package/packages/adapters/src/session.ts +138 -0
- package/packages/adapters/src/zcode.ts +440 -0
- package/packages/adapters/test/adapters.test.ts +666 -0
- package/packages/adapters/test/contract.test.ts +601 -0
- package/packages/adapters/test/exec-adapter.test.ts +114 -0
- package/packages/adapters/test/harness-versions.test.ts +220 -0
- package/packages/adapters/test/indexrag.test.ts +192 -0
- package/packages/adapters/test/mcode.test.ts +678 -0
- package/packages/adapters/test/mcp-config.test.ts +118 -0
- package/packages/adapters/test/named-agents.test.ts +262 -0
- package/packages/adapters/test/node-adapter.test.ts +98 -0
- package/packages/adapters/test/opencode-capture.test.ts +137 -0
- package/packages/adapters/test/opencode-catalog.test.ts +178 -0
- package/packages/adapters/test/opencode-config.test.ts +63 -0
- package/packages/adapters/test/scaffold.test.ts +156 -0
- package/packages/adapters/test/session.test.ts +368 -0
- package/packages/adapters/test/zcode.test.ts +497 -0
- package/packages/adapters/tsconfig.json +16 -0
- package/packages/cli/README.md +92 -0
- package/packages/cli/package.json +51 -0
- package/packages/cli/quickstart/project/agent.mjs +128 -0
- package/packages/cli/quickstart/project/package.json +8 -0
- package/packages/cli/quickstart/project/src/schedule.js +41 -0
- package/packages/cli/quickstart/project/test/schedule.test.js +25 -0
- package/packages/cli/quickstart/responses.json +8 -0
- package/packages/cli/quickstart/trace/blobs/f7/f7c1592306093f65f441d2afd5f496b7635b7e18f5c15f55b11f71f0b552a118 +1 -0
- package/packages/cli/quickstart/trace/events.jsonl +28 -0
- package/packages/cli/quickstart/trace/fs/HEAD +1 -0
- package/packages/cli/quickstart/trace/fs/config +11 -0
- package/packages/cli/quickstart/trace/fs/description +1 -0
- package/packages/cli/quickstart/trace/fs/index +0 -0
- package/packages/cli/quickstart/trace/fs/info/exclude +11 -0
- package/packages/cli/quickstart/trace/fs/objects/02/33ebdbbb73bcf40bde830c1c0247770ff79a1e +0 -0
- package/packages/cli/quickstart/trace/fs/objects/1b/1f956f306fe2c66611dd9e280e7fd2dce1ecda +0 -0
- package/packages/cli/quickstart/trace/fs/objects/1c/c77eaef0608e088283cb62876b80be9473edce +0 -0
- package/packages/cli/quickstart/trace/fs/objects/20/0c1f7a4be93b037ff27cea57853a738fcbf744 +0 -0
- package/packages/cli/quickstart/trace/fs/objects/21/db957dce36dbbd1606f61034f293dd55030056 +0 -0
- package/packages/cli/quickstart/trace/fs/objects/34/522daa46d0e3f8db09ec7d874fa6f05cbcdabf +0 -0
- package/packages/cli/quickstart/trace/fs/objects/5a/beaaf5271dcc3a134a7abd451b24d3dd179c39 +0 -0
- package/packages/cli/quickstart/trace/fs/objects/6e/09705485d5039e582022ef6a67829d940a013a +0 -0
- package/packages/cli/quickstart/trace/fs/objects/74/d8ed3a71638b5935220ef5454fe33835ad8351 +0 -0
- package/packages/cli/quickstart/trace/fs/objects/9f/db6ace4a4410e535a2aef50e653e46a4c3694a +0 -0
- package/packages/cli/quickstart/trace/fs/objects/a4/371e26fb48bece62891a54e4374895fba69f0d +0 -0
- package/packages/cli/quickstart/trace/fs/objects/dc/ce73b49d570b895ff25fc4f219a7976e527a08 +0 -0
- package/packages/cli/quickstart/trace/fs/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 +0 -0
- package/packages/cli/quickstart/trace/fs/objects/f3/b5f9b41e53124ae9b7b299cac121680e5747fb +0 -0
- package/packages/cli/quickstart/trace/manifest.json +44 -0
- package/packages/cli/quickstart/trace/redactions.json +23 -0
- package/packages/cli/src/agent-spans.ts +752 -0
- package/packages/cli/src/api.ts +275 -0
- package/packages/cli/src/archive.ts +264 -0
- package/packages/cli/src/args.ts +207 -0
- package/packages/cli/src/attach.ts +178 -0
- package/packages/cli/src/capture-limits.ts +21 -0
- package/packages/cli/src/cli.ts +4 -0
- package/packages/cli/src/commands/attach.ts +441 -0
- package/packages/cli/src/commands/compare.ts +218 -0
- package/packages/cli/src/commands/doctor.ts +447 -0
- package/packages/cli/src/commands/gc.ts +372 -0
- package/packages/cli/src/commands/inspect.ts +482 -0
- package/packages/cli/src/commands/quickstart.ts +479 -0
- package/packages/cli/src/commands/record.ts +1069 -0
- package/packages/cli/src/commands/replay.ts +2289 -0
- package/packages/cli/src/commands/scrub.ts +865 -0
- package/packages/cli/src/commands/setup.ts +294 -0
- package/packages/cli/src/commands/sync.ts +1429 -0
- package/packages/cli/src/config.ts +182 -0
- package/packages/cli/src/exchange-events.ts +369 -0
- package/packages/cli/src/flags.ts +316 -0
- package/packages/cli/src/fs-events.ts +103 -0
- package/packages/cli/src/index.ts +17 -0
- package/packages/cli/src/main.ts +419 -0
- package/packages/cli/src/mcp-server.ts +314 -0
- package/packages/cli/src/mcp.ts +350 -0
- package/packages/cli/src/out.ts +350 -0
- package/packages/cli/src/rasterize.ts +205 -0
- package/packages/cli/src/serial.ts +38 -0
- package/packages/cli/src/share-card.ts +514 -0
- package/packages/cli/src/snapshot.ts +80 -0
- package/packages/cli/src/tls-capture.ts +688 -0
- package/packages/cli/src/upstream.ts +75 -0
- package/packages/cli/src/version.ts +21 -0
- package/packages/cli/test/agent-spans-drain.test.ts +157 -0
- package/packages/cli/test/agent-spans-race.test.ts +97 -0
- package/packages/cli/test/agent-spans.test.ts +1032 -0
- package/packages/cli/test/api.test.ts +178 -0
- package/packages/cli/test/archive.test.ts +143 -0
- package/packages/cli/test/args.test.ts +164 -0
- package/packages/cli/test/attach-command.test.ts +356 -0
- package/packages/cli/test/attach.test.ts +198 -0
- package/packages/cli/test/capture-oracle.test.ts +160 -0
- package/packages/cli/test/capture-warning.test.ts +215 -0
- package/packages/cli/test/chain-card.test.ts +190 -0
- package/packages/cli/test/claude-capture.test.ts +242 -0
- package/packages/cli/test/compare.test.ts +329 -0
- package/packages/cli/test/config-permission-failure.test.ts +41 -0
- package/packages/cli/test/config.test.ts +239 -0
- package/packages/cli/test/declared-inside-replay.test.ts +170 -0
- package/packages/cli/test/doctor.test.ts +276 -0
- package/packages/cli/test/e2e.test.ts +1230 -0
- package/packages/cli/test/exchange-events.test.ts +345 -0
- package/packages/cli/test/failure-lines.test.ts +47 -0
- package/packages/cli/test/fixtures/deaf-agent.mjs +11 -0
- package/packages/cli/test/fixtures/embedding-agent.mjs +32 -0
- package/packages/cli/test/fixtures/fake-agent.mjs +114 -0
- package/packages/cli/test/fixtures/fake-model.mjs +105 -0
- package/packages/cli/test/fixtures/gateway-agent.mjs +20 -0
- package/packages/cli/test/fixtures/ide-parent.mjs +34 -0
- package/packages/cli/test/fixtures/mcp-agent.mjs +64 -0
- package/packages/cli/test/fixtures/proxy-call.mjs +105 -0
- package/packages/cli/test/fixtures/responses-agent.mjs +82 -0
- package/packages/cli/test/fixtures/responses-model.mjs +94 -0
- package/packages/cli/test/fixtures/tls-agent.mjs +35 -0
- package/packages/cli/test/fixtures/vercel-agent.mjs +81 -0
- package/packages/cli/test/flag-values.test.ts +162 -0
- package/packages/cli/test/flags.test.ts +313 -0
- package/packages/cli/test/fork-provenance.test.ts +224 -0
- package/packages/cli/test/fork-tls.test.ts +190 -0
- package/packages/cli/test/gateway-e2e.test.ts +110 -0
- package/packages/cli/test/gc.test.ts +531 -0
- package/packages/cli/test/generated-esm.test.ts +87 -0
- package/packages/cli/test/graph-card.test.ts +249 -0
- package/packages/cli/test/graph-command.test.ts +258 -0
- package/packages/cli/test/grok-bot-e2e.test.ts +349 -0
- package/packages/cli/test/inspect.test.ts +412 -0
- package/packages/cli/test/intercept-failures.test.ts +74 -0
- package/packages/cli/test/json-only.test.ts +88 -0
- package/packages/cli/test/json-output.test.ts +221 -0
- package/packages/cli/test/list-gateway.test.ts +770 -0
- package/packages/cli/test/mcp-capture.test.ts +498 -0
- package/packages/cli/test/mcp-server.test.ts +315 -0
- package/packages/cli/test/nested-repo-replay.test.ts +972 -0
- package/packages/cli/test/no-credential-in-attrs.test.ts +255 -0
- package/packages/cli/test/opencode-capture.test.ts +422 -0
- package/packages/cli/test/opencode-catalog-capture.test.ts +175 -0
- package/packages/cli/test/out.test.ts +491 -0
- package/packages/cli/test/pinned-fetch.test.ts +154 -0
- package/packages/cli/test/prompt-scrub.test.ts +132 -0
- package/packages/cli/test/publish-order.test.ts +87 -0
- package/packages/cli/test/quickstart.test.ts +579 -0
- package/packages/cli/test/rasterize.test.ts +86 -0
- package/packages/cli/test/record-detection.test.ts +156 -0
- package/packages/cli/test/record-teardown.test.ts +203 -0
- package/packages/cli/test/replay-putback.test.ts +242 -0
- package/packages/cli/test/replay-spill.test.ts +116 -0
- package/packages/cli/test/replay-teardown.test.ts +143 -0
- package/packages/cli/test/replay-trace.test.ts +199 -0
- package/packages/cli/test/replay-transport.test.ts +113 -0
- package/packages/cli/test/reset-roots.test.ts +67 -0
- package/packages/cli/test/responses-e2e.test.ts +119 -0
- package/packages/cli/test/retrieval-context.test.ts +168 -0
- package/packages/cli/test/review-regressions.test.ts +168 -0
- package/packages/cli/test/route-decision.test.ts +134 -0
- package/packages/cli/test/run-dir-sidecars.test.ts +779 -0
- package/packages/cli/test/scrub.test.ts +936 -0
- package/packages/cli/test/serial.test.ts +65 -0
- package/packages/cli/test/setup.test.ts +535 -0
- package/packages/cli/test/share-card.test.ts +135 -0
- package/packages/cli/test/shell-capture.test.ts +184 -0
- package/packages/cli/test/shell-frames-drain.test.ts +91 -0
- package/packages/cli/test/snapshot-retry.test.ts +54 -0
- package/packages/cli/test/support-claims.test.ts +127 -0
- package/packages/cli/test/sync-credentials.test.ts +177 -0
- package/packages/cli/test/sync.test.ts +1709 -0
- package/packages/cli/test/tls-intercept.test.ts +548 -0
- package/packages/cli/test/upstream-visible.test.ts +314 -0
- package/packages/cli/test/vercel-sdk-e2e.test.ts +105 -0
- package/packages/cli/test/version.test.ts +20 -0
- package/packages/cli/tsconfig.json +40 -0
- package/packages/core/package.json +26 -0
- package/packages/core/src/blobs.ts +109 -0
- package/packages/core/src/fetch.ts +48 -0
- package/packages/core/src/graph.ts +450 -0
- package/packages/core/src/index.ts +8 -0
- package/packages/core/src/paths.ts +180 -0
- package/packages/core/src/private-files.ts +394 -0
- package/packages/core/src/reader.ts +175 -0
- package/packages/core/src/redaction.ts +826 -0
- package/packages/core/src/writer.ts +467 -0
- package/packages/core/test/blobs.test.ts +170 -0
- package/packages/core/test/capture-contract.test.ts +179 -0
- package/packages/core/test/data-uri-redaction.test.ts +758 -0
- package/packages/core/test/graph.test.ts +520 -0
- package/packages/core/test/integration.test.ts +148 -0
- package/packages/core/test/paths-permission-failure.test.ts +53 -0
- package/packages/core/test/paths.test.ts +339 -0
- package/packages/core/test/private-files-owner.test.ts +77 -0
- package/packages/core/test/private-files-scratch-race.test.ts +62 -0
- package/packages/core/test/private-files.test.ts +251 -0
- package/packages/core/test/reader.test.ts +271 -0
- package/packages/core/test/redaction.test.ts +525 -0
- package/packages/core/test/writer.test.ts +531 -0
- package/packages/core/tsconfig.json +6 -0
- package/packages/fs-capture/package.json +25 -0
- package/packages/fs-capture/src/capture.ts +193 -0
- package/packages/fs-capture/src/git.ts +131 -0
- package/packages/fs-capture/src/index.ts +3 -0
- package/packages/fs-capture/src/shadow.ts +751 -0
- package/packages/fs-capture/test/capture.test.ts +241 -0
- package/packages/fs-capture/test/git.test.ts +118 -0
- package/packages/fs-capture/test/helpers.ts +28 -0
- package/packages/fs-capture/test/shadow.test.ts +1058 -0
- package/packages/fs-capture/tsconfig.json +6 -0
- package/packages/mcp-shim/package.json +26 -0
- package/packages/mcp-shim/src/cli.ts +372 -0
- package/packages/mcp-shim/src/framing.ts +106 -0
- package/packages/mcp-shim/src/index.ts +4 -0
- package/packages/mcp-shim/src/mock.ts +194 -0
- package/packages/mcp-shim/src/shim.ts +126 -0
- package/packages/mcp-shim/test/cli.test.ts +489 -0
- package/packages/mcp-shim/test/framing.test.ts +143 -0
- package/packages/mcp-shim/test/mock.test.ts +200 -0
- package/packages/mcp-shim/test/shim.test.ts +287 -0
- package/packages/mcp-shim/tsconfig.json +5 -0
- package/packages/node-instrument/package.json +23 -0
- package/packages/node-instrument/src/capture.ts +505 -0
- package/packages/node-instrument/src/index.ts +3 -0
- package/packages/node-instrument/src/install.ts +186 -0
- package/packages/node-instrument/src/rewrite.ts +66 -0
- package/packages/node-instrument/test/capture.test.ts +423 -0
- package/packages/node-instrument/test/install.test.ts +427 -0
- package/packages/node-instrument/test/rewrite.test.ts +85 -0
- package/packages/node-instrument/tsconfig.json +9 -0
- package/packages/plugin-api/package.json +22 -0
- package/packages/plugin-api/src/canonical.ts +73 -0
- package/packages/plugin-api/src/index.ts +2 -0
- package/packages/plugin-api/src/plugins.ts +265 -0
- package/packages/plugin-api/test/canonical.test.ts +58 -0
- package/packages/plugin-api/tsconfig.json +5 -0
- package/packages/providers/package.json +26 -0
- package/packages/providers/src/index.ts +34 -0
- package/packages/providers/src/pricing.ts +140 -0
- package/packages/providers/src/translate/anthropic.ts +620 -0
- package/packages/providers/src/translate/openai-responses.ts +638 -0
- package/packages/providers/src/translate/openai.ts +630 -0
- package/packages/providers/src/translate/sse.ts +99 -0
- package/packages/providers/src/translate/util.ts +111 -0
- package/packages/providers/test/anthropic-translate.test.ts +687 -0
- package/packages/providers/test/openai-responses-translate.test.ts +377 -0
- package/packages/providers/test/openai-translate.test.ts +884 -0
- package/packages/providers/test/pricing.test.ts +171 -0
- package/packages/providers/tsconfig.json +6 -0
- package/packages/proxy/package.json +28 -0
- package/packages/proxy/src/ca.ts +376 -0
- package/packages/proxy/src/der.ts +152 -0
- package/packages/proxy/src/dialects.ts +413 -0
- package/packages/proxy/src/forward.ts +64 -0
- package/packages/proxy/src/index.ts +8 -0
- package/packages/proxy/src/intercept.ts +1554 -0
- package/packages/proxy/src/matching.ts +1056 -0
- package/packages/proxy/src/retrieval.ts +290 -0
- package/packages/proxy/src/server.ts +2875 -0
- package/packages/proxy/src/tls-hosts.ts +205 -0
- package/packages/proxy/test/beta-headers.test.ts +39 -0
- package/packages/proxy/test/ca.test.ts +146 -0
- package/packages/proxy/test/forward.test.ts +306 -0
- package/packages/proxy/test/hop-by-hop.test.ts +118 -0
- package/packages/proxy/test/image-matching.test.ts +129 -0
- package/packages/proxy/test/indexing-concurrency.test.ts +224 -0
- package/packages/proxy/test/lookahead.test.ts +160 -0
- package/packages/proxy/test/malformed-body.test.ts +73 -0
- package/packages/proxy/test/matching.test.ts +822 -0
- package/packages/proxy/test/passthrough.test.ts +599 -0
- package/packages/proxy/test/recorded-upstream.test.ts +253 -0
- package/packages/proxy/test/responses-dialect.test.ts +239 -0
- package/packages/proxy/test/retrieval.test.ts +589 -0
- package/packages/proxy/test/server.test.ts +1281 -0
- package/packages/proxy/test/tls-hosts.test.ts +190 -0
- package/packages/proxy/test/tls-intercept.test.ts +1769 -0
- package/packages/proxy/tsconfig.json +22 -0
- package/packages/schema/package.json +28 -0
- package/packages/schema/schema/event.schema.json +144 -0
- package/packages/schema/schema/manifest.schema.json +184 -0
- package/packages/schema/src/constants.ts +73 -0
- package/packages/schema/src/index.ts +3 -0
- package/packages/schema/src/types.ts +103 -0
- package/packages/schema/src/validate.ts +60 -0
- package/packages/schema/test/schema-parity.test.ts +116 -0
- package/packages/schema/tsconfig.json +5 -0
- package/packages/shell-shim/package.json +26 -0
- package/packages/shell-shim/src/index.ts +3 -0
- package/packages/shell-shim/src/install.ts +406 -0
- package/packages/shell-shim/src/resolve.ts +98 -0
- package/packages/shell-shim/src/runner-bin.ts +4 -0
- package/packages/shell-shim/src/runner.ts +149 -0
- package/packages/shell-shim/test/resolve.test.ts +125 -0
- package/packages/shell-shim/test/shim.test.ts +548 -0
- package/packages/shell-shim/test/transport-race.test.ts +109 -0
- package/packages/shell-shim/tsconfig.json +13 -0
- package/packages/viewer/package.json +25 -0
- package/packages/viewer/src/bundle.ts +36 -0
- package/packages/viewer/src/client/main.ts +248 -0
- package/packages/viewer/src/credit.ts +24 -0
- package/packages/viewer/src/css.ts +409 -0
- package/packages/viewer/src/export.ts +38 -0
- package/packages/viewer/src/html.ts +356 -0
- package/packages/viewer/src/index.ts +16 -0
- package/packages/viewer/src/render.ts +791 -0
- package/packages/viewer/src/serve.ts +150 -0
- package/packages/viewer/src/trace-dir.ts +140 -0
- package/packages/viewer/test/bundle.test.ts +47 -0
- package/packages/viewer/test/client.test.ts +378 -0
- package/packages/viewer/test/export.test.ts +131 -0
- package/packages/viewer/test/fixtures.ts +69 -0
- package/packages/viewer/test/html.test.ts +453 -0
- package/packages/viewer/test/playback.test.ts +54 -0
- package/packages/viewer/test/render.test.ts +714 -0
- package/packages/viewer/test/serve.test.ts +125 -0
- package/packages/viewer/tsconfig.json +6 -0
- package/prompt/AIDER/deepseek-v4-1-flash-system-prompt.md +29 -0
- package/prompt/CLAUDECODE/claude-fable-5-1-print-system-prompt.md +127 -0
- package/prompt/CLAUDECODE/claude-fable-5-1-system-prompt.md +169 -0
- package/prompt/CLAUDECODE/claude-opus-4-8-system-prompt.md +131 -0
- package/prompt/CLAUDECODE/claude-opus-5-system-prompt.md +149 -0
- package/prompt/CLINE/openai-gpt-4o-mini-system-prompt.md +37 -0
- package/prompt/CODEX/gpt-5-6-luna-system-prompt.md +183 -0
- package/prompt/CODEX/gpt-5-6-sol-system-prompt.md +218 -0
- package/prompt/CODEX/gpt-6-1-sol-system-prompt.md +242 -0
- package/prompt/CODEX/gpt-6-astra-system-prompt.md +170 -0
- package/prompt/CODEX/gpt-6-luna-system-prompt.md +223 -0
- package/prompt/CODEX/gpt-6-sol-system-prompt.md +226 -0
- package/prompt/CRUSH/deepseek-v4-1-flash-system-prompt.md +472 -0
- package/prompt/CURSOR/grok-4-5-high-system-prompt.md +40 -0
- package/prompt/DSH/deepseek-flash-system-prompt.md +31 -0
- package/prompt/GEMINICLI/gemini-3-5-flash-system-prompt.md +168 -0
- package/prompt/GOOSE/deepseek-v4-1-flash-system-prompt.md +180 -0
- package/prompt/HACKERAI/openai-gpt-4o-mini-system-prompt.md +70 -0
- package/prompt/HERMES/nemotron-3-5-lightning-free-system-prompt.md +111 -0
- package/prompt/KILOCODE/kilo-auto-free-system-prompt.md +129 -0
- package/prompt/MCODE/deepseek-deepseek-v4-flash-free-coding-system-prompt.md +128 -0
- package/prompt/MCODE/deepseek-deepseek-v4-flash-free-tui-system-prompt.md +119 -0
- package/prompt/MCODE/deepseek-deepseek-v4-flash-free-work-system-prompt.md +140 -0
- package/prompt/MIMOCODE/mimo-v2-5-pro-system-prompt.md +411 -0
- package/prompt/MIMOCODE/mimo-v2-5-system-prompt.md +411 -0
- package/prompt/MUSECODE/muse-spark-1-3-system-prompt.md +78 -0
- package/prompt/OPENCLAW/gpt-5-6-sol-system-prompt.md +333 -0
- package/prompt/OPENCODE/big-pickle-system-prompt.md +114 -0
- package/prompt/OPENCODE/gpt-5-6-sol-system-prompt.md +126 -0
- package/prompt/OPENCODE/ling-3-0-flash-fin-free-system-prompt.md +114 -0
- package/prompt/OPENCODE/mimo-v2-5-free-system-prompt.md +114 -0
- package/prompt/OPENCODE/muse-spark-1-2-contributor-free-system-prompt.md +84 -0
- package/prompt/OPENCODE/nemotron-3-5-lightning-free-system-prompt.md +114 -0
- package/prompt/OPENCODE/nemotron-3-ultra-free-system-prompt.md +114 -0
- package/prompt/PI/openai-gpt-4o-mini-system-prompt.md +31 -0
- package/prompt/QWENCODE/gpt-5-6-sol-system-prompt.md +290 -0
- package/prompt/ZCODE/glm-4-6-system-prompt.md +91 -0
- package/python/README.md +132 -0
- package/python/agenticreplay_trace/__init__.py +58 -0
- package/python/agenticreplay_trace/graph.py +137 -0
- package/python/agenticreplay_trace/models.py +491 -0
- package/python/agenticreplay_trace/py.typed +0 -0
- package/python/agenticreplay_trace/reader.py +295 -0
- package/python/conftest.py +12 -0
- package/python/examples/analyze.py +114 -0
- package/python/pyproject.toml +45 -0
- package/python/tests/conftest.py +102 -0
- package/python/tests/test_capture_contract.py +24 -0
- package/python/tests/test_conformance.py +235 -0
- package/python/tests/test_examples.py +60 -0
- package/python/tests/test_graph.py +247 -0
- package/python/tests/test_models.py +342 -0
- package/python/tests/test_reader.py +423 -0
- package/python-langgraph/README.md +159 -0
- package/python-langgraph/agenticreplay_langgraph/__init__.py +21 -0
- package/python-langgraph/agenticreplay_langgraph/handler.py +317 -0
- package/python-langgraph/agenticreplay_langgraph/hook.py +168 -0
- package/python-langgraph/pyproject.toml +35 -0
- package/python-langgraph/tests/test_handler.py +370 -0
- package/python-langgraph/tests/test_integration.py +484 -0
- package/python-openai-agents/README.md +145 -0
- package/python-openai-agents/agenticreplay_openai_agents/__init__.py +11 -0
- package/python-openai-agents/agenticreplay_openai_agents/processor.py +331 -0
- package/python-openai-agents/pyproject.toml +34 -0
- package/python-openai-agents/tests/test_processor.py +457 -0
- package/scripts/check-neutrality.mjs +62 -0
- package/scripts/codex-client-acceptance.mjs +133 -0
- package/scripts/conformance.mjs +245 -0
- package/scripts/fidelity.mjs +170 -0
- package/scripts/hermes-client-acceptance.mjs +158 -0
- package/scripts/host-client-acceptance.mjs +732 -0
- package/scripts/installed-smoke.mjs +316 -0
- package/scripts/publish-order.mjs +96 -0
- package/scripts/regenerate-quickstart.mjs +79 -0
- package/scripts/render-cards.mjs +178 -0
- package/scripts/render-demo.mjs +139 -0
- package/scripts/render-sync-card.mjs +96 -0
- package/scripts/set-version.mjs +152 -0
- package/scripts/set-version.test.ts +220 -0
- package/scripts/sync-server-json.mjs +13 -0
- package/scripts/update-opencode-api-bases.mjs +29 -0
- package/server.json +28 -0
- package/skills/agenticreplay-replay/SKILL.md +211 -0
- package/spec/agenticreplay-trace-v0.md +223 -0
- package/test/integrations/README.md +133 -0
- package/test/integrations/agents/ai_sdk_openai.mjs +24 -0
- package/test/integrations/agents/anthropic_sdk.py +10 -0
- package/test/integrations/agents/browser_use_agent.py +24 -0
- package/test/integrations/agents/crewai_agent.py +44 -0
- package/test/integrations/agents/crewai_model_names.py +72 -0
- package/test/integrations/agents/hardcoded_origin.mjs +13 -0
- package/test/integrations/agents/haystack_pipeline.py +28 -0
- package/test/integrations/agents/haystack_rag.py +35 -0
- package/test/integrations/agents/langgraph_agent.py +54 -0
- package/test/integrations/agents/langgraph_nodes.py +62 -0
- package/test/integrations/agents/litellm_agent.py +11 -0
- package/test/integrations/agents/llama_index_agent.py +27 -0
- package/test/integrations/agents/llama_index_model_names.py +67 -0
- package/test/integrations/agents/mastra_agent.mjs +20 -0
- package/test/integrations/agents/mcp_agent.py +44 -0
- package/test/integrations/agents/mcp_server.py +20 -0
- package/test/integrations/agents/openai_agents_handoff.py +52 -0
- package/test/integrations/agents/openai_agents_sdk.py +29 -0
- package/test/integrations/agents/openai_async.py +17 -0
- package/test/integrations/agents/openai_sdk.py +10 -0
- package/test/integrations/agents/openhands_agent.py +34 -0
- package/test/integrations/agents/rag_pipeline.py +79 -0
- package/test/integrations/agents/vision_agent.py +63 -0
- package/test/integrations/run.mjs +719 -0
- package/test/integrations/stub-origin.mjs +229 -0
- package/tsconfig.base.json +20 -0
- package/tsconfig.json +41 -0
- package/vitest.config.ts +39 -0
- package/vitest.setup.ts +25 -0
package/.dockerignore
ADDED
package/.gitattributes
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# A trace is evidence, and its integrity is a byte hash over the file. Git's newline conversion
|
|
2
|
+
# rewrites those bytes on a Windows checkout, so a freshly cloned example fails its own integrity
|
|
3
|
+
# check for a reason that has nothing to do with the reader. Before this file existed, every trace
|
|
4
|
+
# under examples/ arrived with CRLF on Windows and `verify_integrity()` returned False on a run
|
|
5
|
+
# that was intact in the repository — the failure mode this project exists to rule out.
|
|
6
|
+
|
|
7
|
+
# Normalise to LF in the index and check out LF everywhere. The tooling, the tests and the trace
|
|
8
|
+
# format all assume LF; nothing here wants CRLF.
|
|
9
|
+
* text=auto eol=lf
|
|
10
|
+
|
|
11
|
+
# Content-addressed. Never rewritten, in either direction.
|
|
12
|
+
examples/traces/** -text
|
|
13
|
+
packages/*/fixtures/** -text
|
|
14
|
+
packages/*/test/fixtures/** -text
|
|
15
|
+
|
|
16
|
+
*.png binary
|
|
17
|
+
*.jpg binary
|
|
18
|
+
*.gz binary
|
|
19
|
+
*.zip binary
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
check:
|
|
15
|
+
name: check (node ${{ matrix.node }})
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
strategy:
|
|
18
|
+
fail-fast: false
|
|
19
|
+
matrix:
|
|
20
|
+
node: ['24', '26']
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
- uses: actions/setup-node@v4
|
|
24
|
+
with:
|
|
25
|
+
node-version: ${{ matrix.node }}
|
|
26
|
+
cache: npm
|
|
27
|
+
- uses: actions/setup-python@v5
|
|
28
|
+
with: { python-version: '3.12' }
|
|
29
|
+
- run: npm ci
|
|
30
|
+
- run: npm run fmt:check
|
|
31
|
+
- run: npx tsc --build
|
|
32
|
+
- run: npx vitest run --reporter=verbose
|
|
33
|
+
|
|
34
|
+
conformance:
|
|
35
|
+
name: trace format conformance
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v4
|
|
39
|
+
- uses: actions/setup-node@v4
|
|
40
|
+
with: { node-version: '24', cache: npm }
|
|
41
|
+
- run: npm ci
|
|
42
|
+
- run: npx tsc --build
|
|
43
|
+
# Every example trace shipped in the repo must validate against the normative schema.
|
|
44
|
+
# This is what makes the format a format rather than whatever the writer happens to emit.
|
|
45
|
+
- run: node scripts/conformance.mjs
|
|
46
|
+
# "Replay is reliable" as a number that regresses visibly rather than as a sentence. The
|
|
47
|
+
# budgets live beside the corpus in the script; a change that costs fidelity fails here.
|
|
48
|
+
- run: node scripts/fidelity.mjs --check
|
|
49
|
+
|
|
50
|
+
integrations:
|
|
51
|
+
name: framework integrations
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v4
|
|
55
|
+
- uses: actions/setup-node@v4
|
|
56
|
+
with:
|
|
57
|
+
node-version: '24'
|
|
58
|
+
cache: 'npm'
|
|
59
|
+
- uses: actions/setup-python@v5
|
|
60
|
+
with:
|
|
61
|
+
python-version: '3.12'
|
|
62
|
+
- run: npm ci
|
|
63
|
+
- run: npx tsc --build
|
|
64
|
+
# The frameworks this speaks for. A check whose package is missing is skipped rather than
|
|
65
|
+
# failed, so a contributor can run the suite without all of them.
|
|
66
|
+
- run: >
|
|
67
|
+
pip install openai anthropic litellm langgraph langchain-openai browser-use haystack-ai
|
|
68
|
+
crewai openai-agents openhands-sdk llama-index-core llama-index-llms-openai
|
|
69
|
+
# Mastra is the one framework here that is JS, and it is 130 MB — more than this repo's whole
|
|
70
|
+
# dependency tree. `--no-save` keeps it out of package.json so it costs this job and nothing
|
|
71
|
+
# else: no npm ci anywhere else gets slower, and a contributor who has not run this line gets
|
|
72
|
+
# a skip rather than a failure, exactly as the pip line above behaves.
|
|
73
|
+
- run: npm install --no-save @mastra/core @ai-sdk/openai ai
|
|
74
|
+
# From the tree, not PyPI: the `openai-agents-handoff` and `langgraph-nodes` checks exist to
|
|
75
|
+
# prove the adapters in *this* commit work, and installing a published copy would test the
|
|
76
|
+
# last release instead.
|
|
77
|
+
- run: pip install -e python-openai-agents
|
|
78
|
+
- run: pip install -e python-langgraph
|
|
79
|
+
# `--require-all`, because installing them above was never what enforced it. Two checks were
|
|
80
|
+
# added without a line here and CI stayed green on the skips, while the README said "in CI"
|
|
81
|
+
# about both. A skip is now a failure on this runner, so forgetting the line above fails
|
|
82
|
+
# loudly instead of quietly making a claim untrue.
|
|
83
|
+
- run: node test/integrations/run.mjs --require-all
|
|
84
|
+
# Not part of the matrix: this records nothing and replays nothing. It asks CrewAI which model
|
|
85
|
+
# names it resolves and fails if the answer has drifted from what `docs/integrations.md` says.
|
|
86
|
+
# It exists because that claim was wrong once — the measurement behind it used a model name no
|
|
87
|
+
# known-model list contains, and read the refusal as being about the prefix.
|
|
88
|
+
- run: python test/integrations/agents/crewai_model_names.py
|
|
89
|
+
working-directory: .
|
|
90
|
+
env:
|
|
91
|
+
OPENAI_API_KEY: unused-but-crewai-wants-one
|
|
92
|
+
# Same shape, same reason: LlamaIndex refuses any model name outside a list compiled into it,
|
|
93
|
+
# before a request is made. That is a real limit on pointing it at a gateway, `docs/integrations.md`
|
|
94
|
+
# now says so, and this is what fails when it stops being true.
|
|
95
|
+
- run: python test/integrations/agents/llama_index_model_names.py
|
|
96
|
+
working-directory: .
|
|
97
|
+
|
|
98
|
+
python-sdk:
|
|
99
|
+
name: python sdk
|
|
100
|
+
runs-on: ubuntu-latest
|
|
101
|
+
steps:
|
|
102
|
+
- uses: actions/checkout@v4
|
|
103
|
+
- uses: actions/setup-python@v5
|
|
104
|
+
with: { python-version: '3.11' }
|
|
105
|
+
# The SDK itself has no runtime dependencies and is meant to keep it that way, but the test
|
|
106
|
+
# runner is not the SDK: setup-python provides a clean interpreter with no pytest on it.
|
|
107
|
+
# Installing the package rather than running pytest against the source tree also checks that
|
|
108
|
+
# `pip install agenticreplay-trace` actually works, which is how anyone will really get it.
|
|
109
|
+
- run: pip install ./python[dev]
|
|
110
|
+
- run: python -m pytest python/ -q
|
|
111
|
+
# The second Python distribution in this tree. It was added with tests and with a `pip install
|
|
112
|
+
# -e` in the integrations job, and nothing ran them — the same shape as the skipped checks
|
|
113
|
+
# that job now fails on, one layer out. Its `[dev]` extra brings the Agents SDK, because two
|
|
114
|
+
# of its tests are about how `install()` registers with it.
|
|
115
|
+
- run: pip install ./python-openai-agents[dev]
|
|
116
|
+
- run: python -m pytest python-openai-agents/ -q
|
|
117
|
+
# The third. Its `[dev]` extra brings langgraph and langchain-core, because the half of its
|
|
118
|
+
# suite that matters builds real graphs and invokes them — the unit tests assert what
|
|
119
|
+
# langchain-core is believed to pass, and only a real graph keeps that belief honest.
|
|
120
|
+
- run: pip install ./python-langgraph[dev]
|
|
121
|
+
- run: python -m pytest python-langgraph/ -q
|
|
122
|
+
|
|
123
|
+
plugin-api-neutrality:
|
|
124
|
+
name: plugin API neutrality
|
|
125
|
+
runs-on: ubuntu-latest
|
|
126
|
+
steps:
|
|
127
|
+
- uses: actions/checkout@v4
|
|
128
|
+
- uses: actions/setup-node@v4
|
|
129
|
+
with: { node-version: '24', cache: npm }
|
|
130
|
+
- run: npm ci
|
|
131
|
+
# A vendor plugin must reach AgenticReplay only through the published interface.
|
|
132
|
+
# If this ever fails, a plugin has grown a privileged path into the core.
|
|
133
|
+
- run: node scripts/check-neutrality.mjs
|
|
134
|
+
|
|
135
|
+
distributions:
|
|
136
|
+
name: installed npm packages and Docker
|
|
137
|
+
runs-on: ubuntu-latest
|
|
138
|
+
steps:
|
|
139
|
+
- uses: actions/checkout@v4
|
|
140
|
+
- uses: actions/setup-node@v4
|
|
141
|
+
with: { node-version: '24', cache: npm }
|
|
142
|
+
- run: npm ci
|
|
143
|
+
- run: npm run build
|
|
144
|
+
- run: node scripts/installed-smoke.mjs
|
|
145
|
+
- run: docker build -t agenticreplay-local .
|
|
146
|
+
- run: docker run --rm --entrypoint agenticreplay agenticreplay-local --version
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agenticreplay",
|
|
3
|
+
"version": "0.2.2",
|
|
4
|
+
"description": "Record, inspect, replay and fork coding-agent runs: read what an agent actually did from the evidence of its run, offline.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Continuum AI Corp",
|
|
7
|
+
"url": "https://github.com/Continuum-AI-Corp"
|
|
8
|
+
},
|
|
9
|
+
"repository": "https://github.com/askdkc/AgenticReplay",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"keywords": ["agenticreplay", "agent run replay", "agent trace", "record agent run"]
|
|
12
|
+
}
|
package/.mcp.json
ADDED
package/.prettierignore
ADDED
package/.prettierrc.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "singleQuote": true, "printWidth": 100, "semi": true, "trailingComma": "all" }
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Contributing to AgenticReplay
|
|
2
|
+
|
|
3
|
+
## The five-minute dev loop
|
|
4
|
+
|
|
5
|
+
```console
|
|
6
|
+
git clone https://github.com/askdkc/AgenticReplay
|
|
7
|
+
cd AgenticReplay
|
|
8
|
+
npm install
|
|
9
|
+
npm run check # format check + typecheck + tests
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
`npm run check` is the fast loop — format check, typecheck, tests — and it is the first CI job, but
|
|
13
|
+
it is not all of CI. Three more jobs run commands `check` does not:
|
|
14
|
+
|
|
15
|
+
```console
|
|
16
|
+
node scripts/conformance.mjs # the shipped example traces and a freshly written one both
|
|
17
|
+
# validate against the normative schema
|
|
18
|
+
node scripts/check-neutrality.mjs # no vendor plugin reaches past @agenticreplay/plugin-api
|
|
19
|
+
pip install ./python[dev] && python -m pytest python/ -q # the Python SDK
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`conformance.mjs` reads `packages/*/dist`, so run it after a build — `npm run check` has already
|
|
23
|
+
done one by the time you get there.
|
|
24
|
+
|
|
25
|
+
Run those four on Node 24 and Node 26; CI exercises both runtime lines.
|
|
26
|
+
|
|
27
|
+
The published CLI and the development toolchain both require Node 24 or newer. The root
|
|
28
|
+
`package.json` declares `>=24.0.0`, so `npm ci` reports an unsupported runtime immediately.
|
|
29
|
+
|
|
30
|
+
Working on one package:
|
|
31
|
+
|
|
32
|
+
```console
|
|
33
|
+
npx vitest run packages/core # one package
|
|
34
|
+
npx vitest # watch mode, everything
|
|
35
|
+
npx tsc --build # typecheck the project graph
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
If that took longer than five minutes on a clean machine, that is a bug — please open an issue
|
|
39
|
+
saying where it stalled. Time-to-first-contribution is a metric we actually track.
|
|
40
|
+
|
|
41
|
+
## Tests come first
|
|
42
|
+
|
|
43
|
+
This project is built test-first, and not as a slogan: the payload schema, the checkpoint snapping
|
|
44
|
+
rules and the redactor all had real bugs caught by a test written before the implementation.
|
|
45
|
+
|
|
46
|
+
Write the failing test, run it, confirm it fails **for the reason you expect**, then implement.
|
|
47
|
+
A test that has never been red has not proven anything.
|
|
48
|
+
|
|
49
|
+
## What we are looking for
|
|
50
|
+
|
|
51
|
+
The highest-value contributions, in order:
|
|
52
|
+
|
|
53
|
+
1. **Adapters** — support for an agent harness we do not cover. `packages/adapters/` has the
|
|
54
|
+
pattern; the interface is two methods.
|
|
55
|
+
2. **Providers** — a model API we cannot fork onto. `packages/providers/` has two examples.
|
|
56
|
+
3. **Redaction rules** — a secret shape we fail to catch. These are small, self-contained, and
|
|
57
|
+
they protect everyone.
|
|
58
|
+
4. **Trace analyzers** — anything that reads a trace and finds something useful. The loop detector
|
|
59
|
+
in `packages/viewer/src/render.ts` is the model: about forty lines, no privileged access.
|
|
60
|
+
|
|
61
|
+
## Rules of the road
|
|
62
|
+
|
|
63
|
+
- **No new runtime dependencies** without discussion. The CLI has none beyond a JSON Schema
|
|
64
|
+
validator, and a debugger you install to diagnose a broken environment should not drag in a
|
|
65
|
+
hundred packages. `devDependencies` are easier, but still argue for them.
|
|
66
|
+
- **The spec is normative.** `spec/agenticreplay-trace-v0.md` and the JSON Schema come first; TypeScript
|
|
67
|
+
types are verified against them. If you need a format change, change the spec in the same PR and
|
|
68
|
+
bump the schema version. Adding an event type is a MINOR bump; changing one is MAJOR.
|
|
69
|
+
- **Readers skip what they do not understand.** Never make an unknown event type an error.
|
|
70
|
+
- **Replay never silently approximates.** If a match is inexact, emit a `divergence` event. A
|
|
71
|
+
debugger that quietly guesses is worse than no debugger, because you will believe it.
|
|
72
|
+
- **Secrets never reach disk or a TTY.** Redaction lives in the write path. If you add a new sink,
|
|
73
|
+
it goes through the redactor. If it *cannot* — anything written by the agent's own process, or by
|
|
74
|
+
a child of it, is on disk before agenticreplay sees it — then ask one question first: **does anything read
|
|
75
|
+
this file after the run?**
|
|
76
|
+
- No: it is a transport, not part of the trace. Keep it out of the run directory, write an
|
|
77
|
+
allow-list of the fields something actually reads rather than whatever the payload holds, and
|
|
78
|
+
delete it once it has been read. `shell-frames.jsonl` and the agent-spans file are both this.
|
|
79
|
+
- Yes: it stays, and it is unredacted material in a directory people share. Say so in
|
|
80
|
+
SECURITY.md, and make sure `agenticreplay scrub` at least *searches* it — a scrubber that reports
|
|
81
|
+
"nothing matched" over a file it never opened is the one failure mode SECURITY.md says it must
|
|
82
|
+
not have. `mcp-frames.jsonl` is this: a replay answers from it, and rewriting a frame changes
|
|
83
|
+
the key it is looked up by, so a scrub that edited it would make the replay serve a different
|
|
84
|
+
recorded response rather than fail.
|
|
85
|
+
- **A new field is a new sink.** The redactor works on payloads derived from the incoming request,
|
|
86
|
+
so a value sourced from anywhere else — configuration, a flag, an environment variable — arrives
|
|
87
|
+
having bypassed it. Adding an attribute, ask where its value comes from and whether that source
|
|
88
|
+
can carry a credential; `agenticreplay setup --gateway` accepts any URL, and `https://user:pw@gw` and
|
|
89
|
+
`https://gw?key=…` are both ordinary ways to configure a gateway. This was learned the hard way:
|
|
90
|
+
a field naming the origin that answered each call was verified four ways, all of them asking
|
|
91
|
+
whether the value was *correct* and none asking what else could be in it. Review caught it.
|
|
92
|
+
`packages/cli/test/no-credential-in-attrs.test.ts` is the part that cannot be forgotten — it
|
|
93
|
+
walks every attribute of every event and fails on the shape, whatever the field is called.
|
|
94
|
+
|
|
95
|
+
## Sign your commits
|
|
96
|
+
|
|
97
|
+
We use the [Developer Certificate of Origin](https://developercertificate.org/). Add a `Signed-off-by`
|
|
98
|
+
line with `git commit -s`. There is no CLA and no copyright assignment.
|
|
99
|
+
|
|
100
|
+
**This one is honour-system.** No CI job checks for the trailer and no bot will ask you for it, so a
|
|
101
|
+
PR without one is not blocked — we would rather tell you that than have you discover it from a
|
|
102
|
+
green tick. If we ever start enforcing it, it will be a check you can see, not a surprise on merge.
|
|
103
|
+
|
|
104
|
+
## Code of conduct
|
|
105
|
+
|
|
106
|
+
By participating you agree to the [Contributor Covenant](CODE_OF_CONDUCT.md).
|
package/Dockerfile
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Ships only the MCP server, not the recorder.
|
|
2
|
+
#
|
|
3
|
+
# Recording works by wrapping a process on the host — a local proxy, a PATH shim, a shadow git
|
|
4
|
+
# index. None of that survives a container boundary, so `agenticreplay record` inside here would watch an
|
|
5
|
+
# empty namespace. What does travel is the read side: the six MCP tools serve runs that already
|
|
6
|
+
# exist on disk, so a client mounts its `.agenticreplay` directory and reads it.
|
|
7
|
+
#
|
|
8
|
+
# docker run -i --rm -v "$PWD/.agenticreplay:/work/.agenticreplay:ro" agenticreplay
|
|
9
|
+
#
|
|
10
|
+
# Read-only is deliberate. `agenticreplay replay` and `agenticreplay compare` execute a real agent and can spend
|
|
11
|
+
# money, so a container that only ever reads is the honest default; drop `:ro` if you mean to
|
|
12
|
+
# fork from in here.
|
|
13
|
+
FROM node:24-alpine AS build
|
|
14
|
+
WORKDIR /src
|
|
15
|
+
COPY . .
|
|
16
|
+
RUN npm ci && npm run build \
|
|
17
|
+
&& mkdir /artifacts \
|
|
18
|
+
&& npm pack --workspaces --pack-destination /artifacts
|
|
19
|
+
|
|
20
|
+
FROM node:24-alpine
|
|
21
|
+
|
|
22
|
+
ENV NODE_ENV=production
|
|
23
|
+
WORKDIR /work
|
|
24
|
+
|
|
25
|
+
# Install every matching workspace tarball from this checkout, including unpublished renamed packages.
|
|
26
|
+
COPY --from=build /artifacts /artifacts
|
|
27
|
+
RUN npm install -g --omit=dev /artifacts/*.tgz && rm -rf /artifacts
|
|
28
|
+
|
|
29
|
+
# stdio transport — the client owns stdin/stdout, so no port is exposed.
|
|
30
|
+
ENTRYPOINT ["agenticreplay", "mcp"]
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/MAINTAINERS.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Maintainers
|
|
2
|
+
|
|
3
|
+
| Area | Maintainer |
|
|
4
|
+
|---|---|
|
|
5
|
+
| Trace format & core | @Continuum-AI-Corp |
|
|
6
|
+
| Proxy & replay | @Continuum-AI-Corp |
|
|
7
|
+
| Adapters & providers | @Continuum-AI-Corp |
|
|
8
|
+
| Viewer | @Continuum-AI-Corp |
|
|
9
|
+
|
|
10
|
+
## Governance
|
|
11
|
+
|
|
12
|
+
Today this is maintainer-led: the people above merge changes and cut releases.
|
|
13
|
+
|
|
14
|
+
**The path out of that is written down on purpose.** Once three maintainers from outside the
|
|
15
|
+
founding organisation are active, we form a technical steering committee with a published charter,
|
|
16
|
+
and format changes require its consent rather than ours. Ambiguity about who controls an open
|
|
17
|
+
format is a reason not to build on it, so we would rather commit to the trigger now than be asked
|
|
18
|
+
about it later.
|
|
19
|
+
|
|
20
|
+
## Becoming a maintainer
|
|
21
|
+
|
|
22
|
+
Sustained, high-quality contribution in an area, plus the judgement to say no to changes that widen
|
|
23
|
+
the surface. Adapters and providers are the usual route in. Ask — we would rather have the
|
|
24
|
+
conversation early than have you guess.
|