@tonyclaw/agent-inspector 2.0.41 → 2.0.42

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.
Files changed (34) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/{CompareDrawer-DCg6S2cl.js → CompareDrawer-Cfqxlo-U.js} +1 -1
  3. package/.output/public/assets/{ProxyViewerContainer-DsU6QETm.js → ProxyViewerContainer-CE9pAX4c.js} +26 -24
  4. package/.output/public/assets/{ReplayDialog-ClVgjSDE.js → ReplayDialog-daRidZo_.js} +1 -1
  5. package/.output/public/assets/{RequestAnatomy-BhqvLQp9.js → RequestAnatomy-CJ7EPQGQ.js} +1 -1
  6. package/.output/public/assets/{ResponseView-BZAJoK6B.js → ResponseView-xBmr54hB.js} +1 -1
  7. package/.output/public/assets/{StreamingChunkSequence-CaORmoKX.js → StreamingChunkSequence-nK-0LpbM.js} +1 -1
  8. package/.output/public/assets/_sessionId-CbWEG5ej.js +1 -0
  9. package/.output/public/assets/index-D1MkoT4l.js +1 -0
  10. package/.output/public/assets/{main-CI3HFEcV.js → main-DOy_Q96H.js} +2 -2
  11. package/.output/server/{_sessionId-DQ0ljHQ8.mjs → _sessionId-DtYRZHlM.mjs} +2 -2
  12. package/.output/server/_ssr/{CompareDrawer-nkVa9epn.mjs → CompareDrawer-fy1ARwtx.mjs} +2 -2
  13. package/.output/server/_ssr/{ProxyViewerContainer-CXA7iH3H.mjs → ProxyViewerContainer-9GJtCWCq.mjs} +131 -6
  14. package/.output/server/_ssr/{ReplayDialog-CK71-ucq.mjs → ReplayDialog-BrS7syOE.mjs} +3 -3
  15. package/.output/server/_ssr/{RequestAnatomy-DDCUJJ3X.mjs → RequestAnatomy-BtWt1cWY.mjs} +2 -2
  16. package/.output/server/_ssr/{ResponseView-C6ZA7V3B.mjs → ResponseView-CkKGYE6m.mjs} +2 -2
  17. package/.output/server/_ssr/{StreamingChunkSequence-DW5v_o6G.mjs → StreamingChunkSequence-C7rB3osr.mjs} +2 -2
  18. package/.output/server/_ssr/{index-Ckex98yq.mjs → index-D24WforP.mjs} +2 -2
  19. package/.output/server/_ssr/index.mjs +2 -2
  20. package/.output/server/_ssr/{router-ChJIVv7-.mjs → router-CVqVjBzJ.mjs} +1312 -467
  21. package/.output/server/{_tanstack-start-manifest_v-CJ4__weU.mjs → _tanstack-start-manifest_v-DSikvwru.mjs} +1 -1
  22. package/.output/server/index.mjs +57 -57
  23. package/README.md +36 -12
  24. package/package.json +1 -1
  25. package/src/components/providers/SettingsDialog.tsx +137 -0
  26. package/src/lib/runContract.ts +3 -0
  27. package/src/mcp/currentContext.ts +65 -0
  28. package/src/mcp/mode.ts +56 -0
  29. package/src/mcp/server.ts +466 -15
  30. package/src/mcp/toolHandlers.ts +372 -0
  31. package/src/proxy/evidenceExporter.ts +1 -0
  32. package/src/proxy/runStore.ts +74 -22
  33. package/.output/public/assets/_sessionId-BHqywvM3.js +0 -1
  34. package/.output/public/assets/index-B_LPYuM0.js +0 -1
@@ -1,4 +1,4 @@
1
- const tsrStartManifest = () => ({ "routes": { "__root__": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/__root.tsx", "children": ["/", "/api/config", "/api/groups", "/api/health", "/api/logs", "/api/mcp", "/api/models", "/api/providers", "/api/runs", "/api/sessions", "/proxy/$", "/session/$sessionId", "/api/knowledge/candidates", "/api/knowledge/project-context", "/api/knowledge/search", "/api/knowledge/sessions/$sessionId/candidates"], "preloads": ["/assets/main-CI3HFEcV.js"], "assets": [] }, "/": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", "assets": [], "preloads": ["/assets/index-B_LPYuM0.js", "/assets/ProxyViewerContainer-DsU6QETm.js"] }, "/api/config": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/config.ts", "children": ["/api/config/paths"] }, "/api/groups": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/groups.ts", "children": ["/api/groups/$groupId"] }, "/api/health": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/health.ts" }, "/api/logs": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.ts", "children": ["/api/logs/$id", "/api/logs/stream"] }, "/api/mcp": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/mcp.ts" }, "/api/models": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/models.ts" }, "/api/providers": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.ts", "children": ["/api/providers/$providerId", "/api/providers/export", "/api/providers/import", "/api/providers/scan"] }, "/api/runs": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/runs.ts", "children": ["/api/runs/$runId"] }, "/api/sessions": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/sessions.ts" }, "/proxy/$": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/proxy/$.ts" }, "/session/$sessionId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/session/$sessionId.tsx", "assets": [], "preloads": ["/assets/_sessionId-BHqywvM3.js", "/assets/ProxyViewerContainer-DsU6QETm.js"] }, "/api/config/paths": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/config.paths.ts" }, "/api/groups/$groupId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/groups.$groupId.ts", "children": ["/api/groups/$groupId/evidence", "/api/groups/$groupId/sessions"] }, "/api/knowledge/candidates": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.candidates.ts", "children": ["/api/knowledge/candidates/$candidateId"] }, "/api/knowledge/project-context": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.project-context.ts" }, "/api/knowledge/search": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.search.ts" }, "/api/logs/$id": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.$id.ts", "children": ["/api/logs/$id/chunks", "/api/logs/$id/replay"] }, "/api/logs/stream": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.stream.ts" }, "/api/providers/$providerId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.ts", "children": ["/api/providers/$providerId/model-metadata", "/api/providers/$providerId/test"] }, "/api/providers/export": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.export.ts" }, "/api/providers/import": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.import.ts" }, "/api/providers/scan": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.scan.ts" }, "/api/runs/$runId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/runs.$runId.ts", "children": ["/api/runs/$runId/evidence"] }, "/api/groups/$groupId/evidence": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/groups.$groupId.evidence.ts" }, "/api/groups/$groupId/sessions": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/groups.$groupId.sessions.ts" }, "/api/knowledge/candidates/$candidateId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.candidates.$candidateId.ts", "children": ["/api/knowledge/candidates/$candidateId/promote"] }, "/api/logs/$id/chunks": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.$id.chunks.ts" }, "/api/logs/$id/replay": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.$id.replay.ts" }, "/api/providers/$providerId/model-metadata": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.model-metadata.ts" }, "/api/providers/$providerId/test": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.test.ts", "children": ["/api/providers/$providerId/test/log"] }, "/api/runs/$runId/evidence": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/runs.$runId.evidence.ts" }, "/api/knowledge/candidates/$candidateId/promote": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.candidates.$candidateId.promote.ts" }, "/api/knowledge/sessions/$sessionId/candidates": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.sessions.$sessionId.candidates.ts" }, "/api/providers/$providerId/test/log": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.test.log.ts" } }, "clientEntry": "/assets/main-CI3HFEcV.js" });
1
+ const tsrStartManifest = () => ({ "routes": { "__root__": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/__root.tsx", "children": ["/", "/api/config", "/api/groups", "/api/health", "/api/logs", "/api/mcp", "/api/models", "/api/providers", "/api/runs", "/api/sessions", "/proxy/$", "/session/$sessionId", "/api/knowledge/candidates", "/api/knowledge/project-context", "/api/knowledge/search", "/api/knowledge/sessions/$sessionId/candidates"], "preloads": ["/assets/main-DOy_Q96H.js"], "assets": [] }, "/": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", "assets": [], "preloads": ["/assets/index-D1MkoT4l.js", "/assets/ProxyViewerContainer-CE9pAX4c.js"] }, "/api/config": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/config.ts", "children": ["/api/config/paths"] }, "/api/groups": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/groups.ts", "children": ["/api/groups/$groupId"] }, "/api/health": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/health.ts" }, "/api/logs": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.ts", "children": ["/api/logs/$id", "/api/logs/stream"] }, "/api/mcp": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/mcp.ts" }, "/api/models": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/models.ts" }, "/api/providers": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.ts", "children": ["/api/providers/$providerId", "/api/providers/export", "/api/providers/import", "/api/providers/scan"] }, "/api/runs": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/runs.ts", "children": ["/api/runs/$runId"] }, "/api/sessions": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/sessions.ts" }, "/proxy/$": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/proxy/$.ts" }, "/session/$sessionId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/session/$sessionId.tsx", "assets": [], "preloads": ["/assets/_sessionId-CbWEG5ej.js", "/assets/ProxyViewerContainer-CE9pAX4c.js"] }, "/api/config/paths": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/config.paths.ts" }, "/api/groups/$groupId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/groups.$groupId.ts", "children": ["/api/groups/$groupId/evidence", "/api/groups/$groupId/sessions"] }, "/api/knowledge/candidates": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.candidates.ts", "children": ["/api/knowledge/candidates/$candidateId"] }, "/api/knowledge/project-context": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.project-context.ts" }, "/api/knowledge/search": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.search.ts" }, "/api/logs/$id": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.$id.ts", "children": ["/api/logs/$id/chunks", "/api/logs/$id/replay"] }, "/api/logs/stream": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.stream.ts" }, "/api/providers/$providerId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.ts", "children": ["/api/providers/$providerId/model-metadata", "/api/providers/$providerId/test"] }, "/api/providers/export": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.export.ts" }, "/api/providers/import": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.import.ts" }, "/api/providers/scan": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.scan.ts" }, "/api/runs/$runId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/runs.$runId.ts", "children": ["/api/runs/$runId/evidence"] }, "/api/groups/$groupId/evidence": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/groups.$groupId.evidence.ts" }, "/api/groups/$groupId/sessions": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/groups.$groupId.sessions.ts" }, "/api/knowledge/candidates/$candidateId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.candidates.$candidateId.ts", "children": ["/api/knowledge/candidates/$candidateId/promote"] }, "/api/logs/$id/chunks": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.$id.chunks.ts" }, "/api/logs/$id/replay": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.$id.replay.ts" }, "/api/providers/$providerId/model-metadata": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.model-metadata.ts" }, "/api/providers/$providerId/test": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.test.ts", "children": ["/api/providers/$providerId/test/log"] }, "/api/runs/$runId/evidence": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/runs.$runId.evidence.ts" }, "/api/knowledge/candidates/$candidateId/promote": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.candidates.$candidateId.promote.ts" }, "/api/knowledge/sessions/$sessionId/candidates": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.sessions.$sessionId.candidates.ts" }, "/api/providers/$providerId/test/log": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.test.log.ts" } }, "clientEntry": "/assets/main-DOy_Q96H.js" });
2
2
  export {
3
3
  tsrStartManifest
4
4
  };
@@ -35,103 +35,103 @@ const headers = ((m) => function headersRouteRule(event) {
35
35
  }
36
36
  });
37
37
  const assets = {
38
- "/assets/CompareDrawer-DCg6S2cl.js": {
39
- "type": "text/javascript; charset=utf-8",
40
- "etag": '"49e8-k5Sysa3YIYWHG3hgZOKGI6S/VSQ"',
41
- "mtime": "2026-07-02T06:48:19.896Z",
42
- "size": 18920,
43
- "path": "../public/assets/CompareDrawer-DCg6S2cl.js"
44
- },
45
38
  "/assets/alibaba-TTwafVwX.svg": {
46
39
  "type": "image/svg+xml",
47
40
  "etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
48
- "mtime": "2026-07-02T06:48:19.896Z",
41
+ "mtime": "2026-07-03T01:44:09.155Z",
49
42
  "size": 5915,
50
43
  "path": "../public/assets/alibaba-TTwafVwX.svg"
51
44
  },
45
+ "/assets/index-D1MkoT4l.js": {
46
+ "type": "text/javascript; charset=utf-8",
47
+ "etag": '"74-5tWPGheuXYTT+KVstHwHWELFTpU"',
48
+ "mtime": "2026-07-03T01:44:09.155Z",
49
+ "size": 116,
50
+ "path": "../public/assets/index-D1MkoT4l.js"
51
+ },
52
52
  "/assets/minimax-BPMzvuL-.jpeg": {
53
53
  "type": "image/jpeg",
54
54
  "etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
55
- "mtime": "2026-07-02T06:48:19.896Z",
55
+ "mtime": "2026-07-03T01:44:09.155Z",
56
56
  "size": 6918,
57
57
  "path": "../public/assets/minimax-BPMzvuL-.jpeg"
58
58
  },
59
- "/assets/RequestAnatomy-BhqvLQp9.js": {
60
- "type": "text/javascript; charset=utf-8",
61
- "etag": '"4485-e5cA5GSbVksNziulI0+GKBLNU8I"',
62
- "mtime": "2026-07-02T06:48:19.896Z",
63
- "size": 17541,
64
- "path": "../public/assets/RequestAnatomy-BhqvLQp9.js"
65
- },
66
- "/assets/ReplayDialog-ClVgjSDE.js": {
67
- "type": "text/javascript; charset=utf-8",
68
- "etag": '"318c-LpwaR4Dkb9DojATSYhkNfnmy2zI"',
69
- "mtime": "2026-07-02T06:48:19.896Z",
70
- "size": 12684,
71
- "path": "../public/assets/ReplayDialog-ClVgjSDE.js"
72
- },
73
- "/assets/index-B_LPYuM0.js": {
74
- "type": "text/javascript; charset=utf-8",
75
- "etag": '"74-nFohMzCw3y6hRBAH/I/1aAKk9qA"',
76
- "mtime": "2026-07-02T06:48:19.896Z",
77
- "size": 116,
78
- "path": "../public/assets/index-B_LPYuM0.js"
79
- },
80
59
  "/assets/index-BfGJEb-2.css": {
81
60
  "type": "text/css; charset=utf-8",
82
61
  "etag": '"1acc9-JrjZs7fIRGuBr66cqP9miLHcLKk"',
83
- "mtime": "2026-07-02T06:48:19.896Z",
62
+ "mtime": "2026-07-03T01:44:09.155Z",
84
63
  "size": 109769,
85
64
  "path": "../public/assets/index-BfGJEb-2.css"
86
65
  },
87
- "/assets/StreamingChunkSequence-CaORmoKX.js": {
66
+ "/assets/CompareDrawer-Cfqxlo-U.js": {
88
67
  "type": "text/javascript; charset=utf-8",
89
- "etag": '"d5c-CFWA5sGEVjRZL7Tc8f3pZV/+3pw"',
90
- "mtime": "2026-07-02T06:48:19.896Z",
68
+ "etag": '"49e8-4/OM/oQ2JC3boP6H31ljkTMqaic"',
69
+ "mtime": "2026-07-03T01:44:09.157Z",
70
+ "size": 18920,
71
+ "path": "../public/assets/CompareDrawer-Cfqxlo-U.js"
72
+ },
73
+ "/assets/main-DOy_Q96H.js": {
74
+ "type": "text/javascript; charset=utf-8",
75
+ "etag": '"517d9-GvqATjRQp0lZCEyGodPErXeDUXg"',
76
+ "mtime": "2026-07-03T01:44:09.157Z",
77
+ "size": 333785,
78
+ "path": "../public/assets/main-DOy_Q96H.js"
79
+ },
80
+ "/assets/ReplayDialog-daRidZo_.js": {
81
+ "type": "text/javascript; charset=utf-8",
82
+ "etag": '"318c-LNphXs3XdCOanUWleZMjvNJbyo4"',
83
+ "mtime": "2026-07-03T01:44:09.155Z",
84
+ "size": 12684,
85
+ "path": "../public/assets/ReplayDialog-daRidZo_.js"
86
+ },
87
+ "/assets/StreamingChunkSequence-nK-0LpbM.js": {
88
+ "type": "text/javascript; charset=utf-8",
89
+ "etag": '"d5c-pin0T6zoaVTMLQgDVheLwJQdCbc"',
90
+ "mtime": "2026-07-03T01:44:09.157Z",
91
91
  "size": 3420,
92
- "path": "../public/assets/StreamingChunkSequence-CaORmoKX.js"
92
+ "path": "../public/assets/StreamingChunkSequence-nK-0LpbM.js"
93
+ },
94
+ "/assets/RequestAnatomy-CJ7EPQGQ.js": {
95
+ "type": "text/javascript; charset=utf-8",
96
+ "etag": '"4485-sqyRSWpcGItAjW8EQpuyuH2NJkM"',
97
+ "mtime": "2026-07-03T01:44:09.157Z",
98
+ "size": 17541,
99
+ "path": "../public/assets/RequestAnatomy-CJ7EPQGQ.js"
93
100
  },
94
- "/assets/ResponseView-BZAJoK6B.js": {
101
+ "/assets/ResponseView-xBmr54hB.js": {
95
102
  "type": "text/javascript; charset=utf-8",
96
- "etag": '"30d1-1lX2qKD6ndedO8OL4mCAFqTi2c4"',
97
- "mtime": "2026-07-02T06:48:19.896Z",
103
+ "etag": '"30d1-XQa3i7Dl3IpHmJVZY7j7wGeKTWA"',
104
+ "mtime": "2026-07-03T01:44:09.157Z",
98
105
  "size": 12497,
99
- "path": "../public/assets/ResponseView-BZAJoK6B.js"
106
+ "path": "../public/assets/ResponseView-xBmr54hB.js"
100
107
  },
101
108
  "/assets/zhipuai-BPNAnxo-.svg": {
102
109
  "type": "image/svg+xml",
103
110
  "etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
104
- "mtime": "2026-07-02T06:48:19.896Z",
111
+ "mtime": "2026-07-03T01:44:09.155Z",
105
112
  "size": 11256,
106
113
  "path": "../public/assets/zhipuai-BPNAnxo-.svg"
107
114
  },
108
- "/assets/_sessionId-BHqywvM3.js": {
115
+ "/assets/_sessionId-CbWEG5ej.js": {
109
116
  "type": "text/javascript; charset=utf-8",
110
- "etag": '"d2-aRnjHQXX3+PkuHFc37DXAEd2jHY"',
111
- "mtime": "2026-07-02T06:48:19.896Z",
117
+ "etag": '"d2-znIEA1ArIEaTdapPt/+hhunhTEA"',
118
+ "mtime": "2026-07-03T01:44:09.155Z",
112
119
  "size": 210,
113
- "path": "../public/assets/_sessionId-BHqywvM3.js"
114
- },
115
- "/assets/main-CI3HFEcV.js": {
116
- "type": "text/javascript; charset=utf-8",
117
- "etag": '"517d9-uRZNMUg8U43tHnhzFFtGrUV430s"',
118
- "mtime": "2026-07-02T06:48:19.896Z",
119
- "size": 333785,
120
- "path": "../public/assets/main-CI3HFEcV.js"
120
+ "path": "../public/assets/_sessionId-CbWEG5ej.js"
121
121
  },
122
122
  "/assets/qwen-CONDcHqt.png": {
123
123
  "type": "image/png",
124
124
  "etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
125
- "mtime": "2026-07-02T06:48:19.896Z",
125
+ "mtime": "2026-07-03T01:44:09.155Z",
126
126
  "size": 357059,
127
127
  "path": "../public/assets/qwen-CONDcHqt.png"
128
128
  },
129
- "/assets/ProxyViewerContainer-DsU6QETm.js": {
129
+ "/assets/ProxyViewerContainer-CE9pAX4c.js": {
130
130
  "type": "text/javascript; charset=utf-8",
131
- "etag": '"b645c-NZxv8v6zEqGaTkLxqNhFQyxqtsc"',
132
- "mtime": "2026-07-02T06:48:19.896Z",
133
- "size": 746588,
134
- "path": "../public/assets/ProxyViewerContainer-DsU6QETm.js"
131
+ "etag": '"b6dd2-a7szrizd/RNOpvOe2NWIYoJTdEQ"',
132
+ "mtime": "2026-07-03T01:44:09.157Z",
133
+ "size": 749010,
134
+ "path": "../public/assets/ProxyViewerContainer-CE9pAX4c.js"
135
135
  }
136
136
  };
137
137
  function readAsset(id) {
package/README.md CHANGED
@@ -181,6 +181,9 @@ agent-inspector-mcp config codex
181
181
  The companion package is useful for MCP clients that expect a local command. Direct HTTP remains the
182
182
  shortest path for clients that support Streamable HTTP.
183
183
 
184
+ The MCP HTTP surface is also documented as OpenAPI YAML in
185
+ [`docs/mcp-openapi.yaml`](docs/mcp-openapi.yaml).
186
+
184
187
  Use only one transport for the same Inspector instance. If the MCP client supports Streamable HTTP,
185
188
  configure `http://localhost:25947/api/mcp` directly. If it only supports stdio, configure
186
189
  `agent-inspector-mcp stdio`; that command is only a bridge to `/api/mcp`, not a second Inspector
@@ -190,20 +193,24 @@ Coding agents can use the MCP surface in three ways:
190
193
 
191
194
  - Tools: perform actions such as listing logs, reading bounded log details, testing providers,
192
195
  creating evaluation runs/groups, attaching sessions, and exporting evidence packs.
193
- - Resources: read stable evidence URIs without invoking a tool call.
196
+ - Resources: read stable evidence URIs, MCP self-description, session timelines, and evidence file
197
+ paths without invoking a tool call.
194
198
  - Prompts: start common analysis/reporting tasks from reusable templates.
195
199
 
196
200
  The evaluation-oriented run flow is:
197
201
 
198
- 1. Call `inspector_create_run` before a task starts to declare a stable `runId` and optional
199
- `sessionId`.
200
- 2. Call `inspector_update_run` as the task moves through `running`, `failed`, `completed`, or
202
+ 1. Call `inspector_create_run` before a task starts to declare a stable `runId`, optional
203
+ `sessionId`, and optional `groupId`.
204
+ 2. Optionally call `inspector_set_current_context` so the active run/session/model/provider is
205
+ discoverable through `inspector://context/current`.
206
+ 3. Call `inspector_update_run` as the task moves through `running`, `failed`, `completed`, or
201
207
  `cancelled`; metadata keys are merged so CI can add build numbers, branch names, or case ids.
202
- 3. Let the coding agent run through the proxy as usual.
203
- 4. If something fails, call `inspector_get_recent_failures` or read
208
+ 4. Let the coding agent run through the proxy as usual.
209
+ 5. If something fails, call `inspector_get_recent_failures` or read
204
210
  `inspector://failures/recent`, then use `inspector_search_logs` to locate suspicious log ids.
205
- 5. Call `inspector_get_run` to inspect the declared run.
206
- 6. Call `inspector_export_evidence` to write JSON, Markdown, and HTML artifacts under:
211
+ 6. Use `inspector_get_session_timeline` for a quick chronological view before opening large logs.
212
+ 7. Call `inspector_get_run` to inspect the declared run.
213
+ 8. Call `inspector_export_evidence` to write JSON, Markdown, and HTML artifacts under:
207
214
 
208
215
  ```text
209
216
  <dataDir>/evidence/<runId>/evidence.json
@@ -211,17 +218,24 @@ The evaluation-oriented run flow is:
211
218
  <dataDir>/evidence/<runId>/evidence.html
212
219
  ```
213
220
 
221
+ Use `inspector_get_evidence_files` to return those paths and `inspector_export_evidence_bundle` to
222
+ create `evidence.zip`.
223
+
214
224
  For benchmark or CI systems that spawn multiple coding-agent processes, use a group as the
215
225
  outer evaluation artifact:
216
226
 
217
227
  1. Call `inspector_create_group` once for the evaluation batch.
218
- 2. Start each OpenCode/Codex process through the proxy with its own model/provider.
219
- 3. As each process discovers or reports its session id, call `inspector_add_group_session` with
228
+ 2. Call `inspector_set_current_context` with the group/project/task.
229
+ 3. For each OpenCode/Codex worker, call `inspector_create_run` with the group's `groupId`.
230
+ 4. Start each OpenCode/Codex process through the proxy with its own model/provider.
231
+ 5. As each process discovers or reports its session id, call `inspector_update_run` with the real
232
+ `sessionId`; runs that have a `groupId` are auto-attached to the group.
233
+ 6. Optionally call `inspector_add_group_session` to override or enrich the group member with
220
234
  `groupId`, `sessionId`, and optional `runId`, `provider`, `model`, `agent`, `label`, and
221
235
  metadata.
222
- 4. Call `inspector_update_group` to mark the whole batch `running`, `failed`, `completed`, or
236
+ 7. Call `inspector_update_group` to mark the whole batch `running`, `failed`, `completed`, or
223
237
  `cancelled`.
224
- 5. Call `inspector_export_group_evidence` to write an aggregate provider/model matrix under:
238
+ 8. Call `inspector_export_group_evidence` to write an aggregate provider/model matrix under:
225
239
 
226
240
  ```text
227
241
  <dataDir>/evidence/groups/<groupId>/evidence.json
@@ -229,21 +243,31 @@ outer evaluation artifact:
229
243
  <dataDir>/evidence/groups/<groupId>/evidence.html
230
244
  ```
231
245
 
246
+ Use `inspector_get_group_evidence_files` to return those paths and
247
+ `inspector_export_group_evidence_bundle` to create `group-evidence.zip`.
248
+
232
249
  Useful MCP resource URIs:
233
250
 
234
251
  | Resource | Purpose |
235
252
  | --- | --- |
253
+ | `inspector://mcp/health` | Read MCP version, transport, mode, and catalog counts. |
254
+ | `inspector://mcp/capabilities` | Read tools split into read vs write/action, resources, prompts, and write mode. |
255
+ | `inspector://mcp/config` | Read Streamable HTTP, stdio bridge, OpenCode, and network config snippets. |
256
+ | `inspector://context/current` | Read the active eval/coding context. |
236
257
  | `inspector://sessions` | List known session ids. |
237
258
  | `inspector://sessions/{sessionId}` | Read a compact session summary with Inspector links, counts, models, providers, token totals, and recent logs. |
259
+ | `inspector://sessions/{sessionId}/timeline` | Read a chronological request timeline for a session. |
238
260
  | `inspector://logs/{id}` | Read bounded log details for one captured request. Large bodies are capped for agent safety. |
239
261
  | `inspector://runs` | List declared evaluation runs. |
240
262
  | `inspector://failures/recent` | Read recent failed/cancelled runs and non-success evidence classifications. |
241
263
  | `inspector://runs/{runId}` | Read one declared run and its evidence paths. |
242
264
  | `inspector://evidence/{runId}` | Read the exported Markdown evidence pack for a run. |
265
+ | `inspector://evidence/{runId}/files` | Read local paths and byte status for run evidence files. |
243
266
  | `inspector://groups` | List declared evaluation groups. |
244
267
  | `inspector://groups/{groupId}` | Read one group, including attached session/run members and evidence paths. |
245
268
  | `inspector://groups/{groupId}/sessions` | Read only the attached group member list. |
246
269
  | `inspector://groups/{groupId}/evidence` | Read the exported Markdown evidence pack for a group. |
270
+ | `inspector://groups/{groupId}/evidence/files` | Read local paths and byte status for group evidence files. |
247
271
 
248
272
  Built-in prompt templates help turn captured evidence into user-facing output:
249
273
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonyclaw/agent-inspector",
3
- "version": "2.0.41",
3
+ "version": "2.0.42",
4
4
  "type": "module",
5
5
  "description": "Agent observability and knowledge capture layer for AI coding tools.",
6
6
  "license": "MIT",
@@ -76,6 +76,7 @@ export function SettingsDialog(): JSX.Element {
76
76
  <TabsTrigger value="providers">Providers</TabsTrigger>
77
77
  <TabsTrigger value="proxy">Proxy</TabsTrigger>
78
78
  <TabsTrigger value="storage">Storage</TabsTrigger>
79
+ <TabsTrigger value="mcp">MCP</TabsTrigger>
79
80
  <TabsTrigger value="onboarding">Onboarding</TabsTrigger>
80
81
  </TabsList>
81
82
 
@@ -101,6 +102,9 @@ export function SettingsDialog(): JSX.Element {
101
102
  <TabsContent value="storage">
102
103
  <StorageSettingsTab />
103
104
  </TabsContent>
105
+ <TabsContent value="mcp">
106
+ <McpSettingsTab />
107
+ </TabsContent>
104
108
  <TabsContent value="onboarding">
105
109
  <OnboardingSettingsTab />
106
110
  </TabsContent>
@@ -390,6 +394,139 @@ function OnboardingSettingsTab(): JSX.Element {
390
394
  );
391
395
  }
392
396
 
397
+ function McpSettingsTab(): JSX.Element {
398
+ const [copiedId, setCopiedId] = useState<string | null>(null);
399
+ const origin = useMemo(() => {
400
+ if (typeof window === "undefined") return "http://localhost:25947";
401
+ return window.location.origin;
402
+ }, []);
403
+ const endpoint = `${origin}/api/mcp`;
404
+ const values = useMemo(
405
+ () => [
406
+ { id: "mcp-url", label: "Streamable HTTP MCP URL", value: endpoint },
407
+ {
408
+ id: "stdio",
409
+ label: "Stdio bridge command",
410
+ value: `agent-inspector-mcp stdio --url ${endpoint}`,
411
+ },
412
+ {
413
+ id: "doctor",
414
+ label: "Bridge doctor",
415
+ value: `agent-inspector-mcp doctor --url ${endpoint}`,
416
+ },
417
+ {
418
+ id: "readonly",
419
+ label: "Readonly mode",
420
+ value: "AGENT_INSPECTOR_MCP_READONLY=1 agent-inspector",
421
+ },
422
+ {
423
+ id: "capabilities",
424
+ label: "Capabilities resource",
425
+ value: "inspector://mcp/capabilities",
426
+ },
427
+ {
428
+ id: "context",
429
+ label: "Current context resource",
430
+ value: "inspector://context/current",
431
+ },
432
+ {
433
+ id: "streamable-json",
434
+ label: "Streamable HTTP JSON",
435
+ value: JSON.stringify(
436
+ {
437
+ mcpServers: {
438
+ "agent-inspector": {
439
+ type: "streamableHttp",
440
+ url: endpoint,
441
+ },
442
+ },
443
+ },
444
+ null,
445
+ 2,
446
+ ),
447
+ },
448
+ {
449
+ id: "stdio-json",
450
+ label: "Stdio MCP JSON",
451
+ value: JSON.stringify(
452
+ {
453
+ mcpServers: {
454
+ "agent-inspector": {
455
+ command: "agent-inspector-mcp",
456
+ args: ["stdio", "--url", endpoint],
457
+ },
458
+ },
459
+ },
460
+ null,
461
+ 2,
462
+ ),
463
+ },
464
+ {
465
+ id: "opencode-local",
466
+ label: "OpenCode local MCP",
467
+ value: JSON.stringify(
468
+ {
469
+ mcp: {
470
+ "agent-inspector": {
471
+ type: "local",
472
+ command: ["agent-inspector-mcp", "stdio", "--url", endpoint],
473
+ enabled: true,
474
+ },
475
+ },
476
+ },
477
+ null,
478
+ 2,
479
+ ),
480
+ },
481
+ {
482
+ id: "codex-toml",
483
+ label: "Codex TOML",
484
+ value: `[mcp_servers.agent-inspector]\ncommand = "agent-inspector-mcp"\nargs = ["stdio", "--url", "${endpoint}"]`,
485
+ },
486
+ ],
487
+ [endpoint],
488
+ );
489
+
490
+ const handleCopy = useCallback((id: string, value: string) => {
491
+ void copyTextToClipboard(value).then((success) => {
492
+ if (!success) return;
493
+ setCopiedId(id);
494
+ setTimeout(() => setCopiedId(null), 1600);
495
+ });
496
+ }, []);
497
+
498
+ return (
499
+ <div className="min-w-0 space-y-4">
500
+ <div className="flex items-center gap-2">
501
+ <Terminal className="size-4 text-muted-foreground" />
502
+ <h3 className="text-sm font-semibold">MCP access</h3>
503
+ </div>
504
+ <div className="grid gap-2 rounded-md border border-border bg-background px-3 py-2 text-xs text-muted-foreground">
505
+ <div>
506
+ Use Streamable HTTP when the client supports URL-based MCP. Use the stdio bridge only for
507
+ stdio-only clients. Configure one entry for the same Inspector instance.
508
+ </div>
509
+ <div>
510
+ If the MCP client runs in another container or host, replace localhost with a reachable
511
+ host/IP and verify the network path.
512
+ </div>
513
+ </div>
514
+ <div className="grid gap-2">
515
+ {values.map((item) => (
516
+ <CopyableSetupValue
517
+ key={item.id}
518
+ id={item.id}
519
+ label={item.label}
520
+ value={item.value}
521
+ copiedId={copiedId}
522
+ onCopy={handleCopy}
523
+ />
524
+ ))}
525
+ </div>
526
+ </div>
527
+ );
528
+ }
529
+
393
530
  function ProxySettingsTab(): JSX.Element {
394
531
  const {
395
532
  strip,
@@ -76,6 +76,7 @@ export const EvidenceReportSchema = JenkinsReportSchema;
76
76
  export const InspectorRunSchema = z.object({
77
77
  id: z.string(),
78
78
  sessionId: z.string(),
79
+ groupId: z.string().nullable().default(null),
79
80
  title: z.string(),
80
81
  task: z.string().nullable(),
81
82
  project: z.string().nullable(),
@@ -92,6 +93,7 @@ export const CreateInspectorRunInputSchema = z
92
93
  .object({
93
94
  runId: z.string().min(1).optional(),
94
95
  sessionId: z.string().min(1).optional(),
96
+ groupId: z.string().min(1).nullable().optional(),
95
97
  title: z.string().min(1).optional(),
96
98
  task: z.string().nullable().optional(),
97
99
  project: z.string().nullable().optional(),
@@ -104,6 +106,7 @@ export const CreateInspectorRunInputSchema = z
104
106
 
105
107
  export const UpdateInspectorRunInputSchema = z.object({
106
108
  sessionId: z.string().min(1).optional(),
109
+ groupId: z.string().min(1).nullable().optional(),
107
110
  title: z.string().min(1).optional(),
108
111
  task: z.string().nullable().optional(),
109
112
  project: z.string().nullable().optional(),
@@ -0,0 +1,65 @@
1
+ import type { JsonValue } from "../contracts";
2
+
3
+ export type InspectorCurrentContext = {
4
+ groupId: string | null;
5
+ runId: string | null;
6
+ sessionId: string | null;
7
+ model: string | null;
8
+ provider: string | null;
9
+ agent: string | null;
10
+ project: string | null;
11
+ task: string | null;
12
+ metadata: Record<string, JsonValue>;
13
+ updatedAt: string;
14
+ };
15
+
16
+ export type InspectorCurrentContextPatch = Partial<
17
+ Omit<InspectorCurrentContext, "metadata" | "updatedAt">
18
+ > & {
19
+ metadata?: Record<string, JsonValue>;
20
+ };
21
+
22
+ function envString(name: string): string | null {
23
+ const value = process.env[name];
24
+ if (value === undefined) return null;
25
+ const trimmed = value.trim();
26
+ return trimmed.length === 0 ? null : trimmed;
27
+ }
28
+
29
+ function initialContext(): InspectorCurrentContext {
30
+ return {
31
+ groupId: envString("INSPECTOR_GROUP_ID"),
32
+ runId: envString("INSPECTOR_RUN_ID"),
33
+ sessionId: envString("INSPECTOR_SESSION_ID"),
34
+ model: envString("INSPECTOR_MODEL"),
35
+ provider: envString("INSPECTOR_PROVIDER"),
36
+ agent: envString("INSPECTOR_AGENT"),
37
+ project: envString("INSPECTOR_PROJECT"),
38
+ task: envString("INSPECTOR_TASK"),
39
+ metadata: {},
40
+ updatedAt: new Date().toISOString(),
41
+ };
42
+ }
43
+
44
+ let currentContext = initialContext();
45
+
46
+ export function getCurrentContext(): InspectorCurrentContext {
47
+ return currentContext;
48
+ }
49
+
50
+ export function setCurrentContext(patch: InspectorCurrentContextPatch): InspectorCurrentContext {
51
+ currentContext = {
52
+ ...currentContext,
53
+ ...patch,
54
+ metadata:
55
+ patch.metadata === undefined
56
+ ? currentContext.metadata
57
+ : { ...currentContext.metadata, ...patch.metadata },
58
+ updatedAt: new Date().toISOString(),
59
+ };
60
+ return currentContext;
61
+ }
62
+
63
+ export function _resetCurrentContextForTests(): void {
64
+ currentContext = initialContext();
65
+ }
@@ -0,0 +1,56 @@
1
+ export type McpWriteMode = "enabled" | "readonly";
2
+
3
+ function parseFlag(value: string | undefined): boolean | null {
4
+ if (value === undefined) return null;
5
+ switch (value.trim().toLowerCase()) {
6
+ case "1":
7
+ case "true":
8
+ case "yes":
9
+ case "on":
10
+ return true;
11
+ case "0":
12
+ case "false":
13
+ case "no":
14
+ case "off":
15
+ return false;
16
+ default:
17
+ return null;
18
+ }
19
+ }
20
+
21
+ export function isMcpWriteEnabled(): boolean {
22
+ const readonlyFlag = parseFlag(process.env["AGENT_INSPECTOR_MCP_READONLY"]);
23
+ if (readonlyFlag === true) return false;
24
+
25
+ const writesFlag = parseFlag(process.env["AGENT_INSPECTOR_MCP_WRITES"]);
26
+ if (writesFlag === false) return false;
27
+
28
+ return true;
29
+ }
30
+
31
+ export function getMcpWriteMode(): McpWriteMode {
32
+ return isMcpWriteEnabled() ? "enabled" : "readonly";
33
+ }
34
+
35
+ export function getMcpModeInfo(): {
36
+ writeMode: McpWriteMode;
37
+ writesEnabled: boolean;
38
+ env: {
39
+ AGENT_INSPECTOR_MCP_READONLY: string | null;
40
+ AGENT_INSPECTOR_MCP_WRITES: string | null;
41
+ };
42
+ note: string;
43
+ } {
44
+ const writesEnabled = isMcpWriteEnabled();
45
+ return {
46
+ writeMode: writesEnabled ? "enabled" : "readonly",
47
+ writesEnabled,
48
+ env: {
49
+ AGENT_INSPECTOR_MCP_READONLY: process.env["AGENT_INSPECTOR_MCP_READONLY"] ?? null,
50
+ AGENT_INSPECTOR_MCP_WRITES: process.env["AGENT_INSPECTOR_MCP_WRITES"] ?? null,
51
+ },
52
+ note: writesEnabled
53
+ ? "MCP write/action tools are enabled. Set AGENT_INSPECTOR_MCP_READONLY=1 to expose the same catalog while blocking mutations."
54
+ : "MCP is in readonly mode. Read tools/resources still work, while write/action tools return an isError result.",
55
+ };
56
+ }