@tonyclaw/agent-inspector 2.0.40 → 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 (47) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/CompareDrawer-Cfqxlo-U.js +1 -0
  3. package/.output/public/assets/ProxyViewerContainer-CE9pAX4c.js +117 -0
  4. package/.output/public/assets/{ReplayDialog-TTTVCMe9.js → ReplayDialog-daRidZo_.js} +1 -1
  5. package/.output/public/assets/{RequestAnatomy-c8ru0pS-.js → RequestAnatomy-CJ7EPQGQ.js} +1 -1
  6. package/.output/public/assets/ResponseView-xBmr54hB.js +1 -0
  7. package/.output/public/assets/StreamingChunkSequence-nK-0LpbM.js +1 -0
  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-CKYe6UUv.js → main-DOy_Q96H.js} +2 -2
  11. package/.output/server/{_sessionId-CkwhOzdS.mjs → _sessionId-DtYRZHlM.mjs} +2 -2
  12. package/.output/server/_ssr/{CompareDrawer-BHDiuYMw.mjs → CompareDrawer-fy1ARwtx.mjs} +4 -3
  13. package/.output/server/_ssr/{ProxyViewerContainer-0c2_DBMX.mjs → ProxyViewerContainer-9GJtCWCq.mjs} +242 -45
  14. package/.output/server/_ssr/{ReplayDialog-CTjwzDDH.mjs → ReplayDialog-BrS7syOE.mjs} +3 -3
  15. package/.output/server/_ssr/{RequestAnatomy-D36oujv2.mjs → RequestAnatomy-BtWt1cWY.mjs} +2 -2
  16. package/.output/server/_ssr/{ResponseView-ClZ3oODE.mjs → ResponseView-CkKGYE6m.mjs} +2 -2
  17. package/.output/server/_ssr/{StreamingChunkSequence-Ck5l4p1m.mjs → StreamingChunkSequence-C7rB3osr.mjs} +2 -2
  18. package/.output/server/_ssr/{index-DKBYH0TC.mjs → index-D24WforP.mjs} +2 -2
  19. package/.output/server/_ssr/index.mjs +2 -2
  20. package/.output/server/_ssr/{router-D4I3ZyVS.mjs → router-CVqVjBzJ.mjs} +1312 -467
  21. package/.output/server/{_tanstack-start-manifest_v-D4vSn_wD.mjs → _tanstack-start-manifest_v-DSikvwru.mjs} +1 -1
  22. package/.output/server/index.mjs +59 -59
  23. package/README.md +36 -12
  24. package/package.json +1 -1
  25. package/src/components/ProxyViewer.tsx +5 -2
  26. package/src/components/providers/ProviderCard.tsx +6 -3
  27. package/src/components/providers/ProviderForm.tsx +6 -3
  28. package/src/components/providers/ProvidersPanel.tsx +6 -1
  29. package/src/components/providers/SettingsDialog.tsx +142 -2
  30. package/src/components/proxy-viewer/CompareDrawer.tsx +3 -1
  31. package/src/components/proxy-viewer/LogEntry.tsx +8 -5
  32. package/src/components/proxy-viewer/useCopyFeedback.ts +3 -1
  33. package/src/components/ui/json-viewer.tsx +7 -2
  34. package/src/lib/clipboard.ts +67 -0
  35. package/src/lib/runContract.ts +3 -0
  36. package/src/mcp/currentContext.ts +65 -0
  37. package/src/mcp/mode.ts +56 -0
  38. package/src/mcp/server.ts +466 -15
  39. package/src/mcp/toolHandlers.ts +372 -0
  40. package/src/proxy/evidenceExporter.ts +1 -0
  41. package/src/proxy/runStore.ts +74 -22
  42. package/.output/public/assets/CompareDrawer-p0uYxW7_.js +0 -1
  43. package/.output/public/assets/ProxyViewerContainer-BGqeiYKD.js +0 -115
  44. package/.output/public/assets/ResponseView-D59jTMy4.js +0 -1
  45. package/.output/public/assets/StreamingChunkSequence-UlAMVF9j.js +0 -1
  46. package/.output/public/assets/_sessionId-EHPexdPl.js +0 -1
  47. package/.output/public/assets/index-CZP-XfpB.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-CKYe6UUv.js"], "assets": [] }, "/": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", "assets": [], "preloads": ["/assets/index-CZP-XfpB.js", "/assets/ProxyViewerContainer-BGqeiYKD.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-EHPexdPl.js", "/assets/ProxyViewerContainer-BGqeiYKD.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-CKYe6UUv.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
  };
@@ -38,100 +38,100 @@ const assets = {
38
38
  "/assets/alibaba-TTwafVwX.svg": {
39
39
  "type": "image/svg+xml",
40
40
  "etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
41
- "mtime": "2026-07-02T01:15:23.247Z",
41
+ "mtime": "2026-07-03T01:44:09.155Z",
42
42
  "size": 5915,
43
43
  "path": "../public/assets/alibaba-TTwafVwX.svg"
44
44
  },
45
- "/assets/CompareDrawer-p0uYxW7_.js": {
45
+ "/assets/index-D1MkoT4l.js": {
46
46
  "type": "text/javascript; charset=utf-8",
47
- "etag": '"49fe-PDyw+vlyo9dEC/B0BR4p7sgHWGc"',
48
- "mtime": "2026-07-02T01:15:23.247Z",
49
- "size": 18942,
50
- "path": "../public/assets/CompareDrawer-p0uYxW7_.js"
51
- },
52
- "/assets/index-CZP-XfpB.js": {
53
- "type": "text/javascript; charset=utf-8",
54
- "etag": '"74-T8zsQO7lllBR44srKw3fW8/4eS4"',
55
- "mtime": "2026-07-02T01:15:23.247Z",
47
+ "etag": '"74-5tWPGheuXYTT+KVstHwHWELFTpU"',
48
+ "mtime": "2026-07-03T01:44:09.155Z",
56
49
  "size": 116,
57
- "path": "../public/assets/index-CZP-XfpB.js"
50
+ "path": "../public/assets/index-D1MkoT4l.js"
58
51
  },
59
- "/assets/RequestAnatomy-c8ru0pS-.js": {
60
- "type": "text/javascript; charset=utf-8",
61
- "etag": '"4485-7HJ86QTNO6hp1l7c8bsI7vDnIao"',
62
- "mtime": "2026-07-02T01:15:23.247Z",
63
- "size": 17541,
64
- "path": "../public/assets/RequestAnatomy-c8ru0pS-.js"
52
+ "/assets/minimax-BPMzvuL-.jpeg": {
53
+ "type": "image/jpeg",
54
+ "etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
55
+ "mtime": "2026-07-03T01:44:09.155Z",
56
+ "size": 6918,
57
+ "path": "../public/assets/minimax-BPMzvuL-.jpeg"
65
58
  },
66
59
  "/assets/index-BfGJEb-2.css": {
67
60
  "type": "text/css; charset=utf-8",
68
61
  "etag": '"1acc9-JrjZs7fIRGuBr66cqP9miLHcLKk"',
69
- "mtime": "2026-07-02T01:15:23.247Z",
62
+ "mtime": "2026-07-03T01:44:09.155Z",
70
63
  "size": 109769,
71
64
  "path": "../public/assets/index-BfGJEb-2.css"
72
65
  },
73
- "/assets/ReplayDialog-TTTVCMe9.js": {
66
+ "/assets/CompareDrawer-Cfqxlo-U.js": {
74
67
  "type": "text/javascript; charset=utf-8",
75
- "etag": '"318c-7uKjiGCOGPnw5aJSXfioga1NTsM"',
76
- "mtime": "2026-07-02T01:15:23.247Z",
77
- "size": 12684,
78
- "path": "../public/assets/ReplayDialog-TTTVCMe9.js"
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"
79
72
  },
80
- "/assets/main-CKYe6UUv.js": {
73
+ "/assets/main-DOy_Q96H.js": {
81
74
  "type": "text/javascript; charset=utf-8",
82
- "etag": '"517d9-2aRLKvQ58GrmKFTsuV0pk+1qC6Y"',
83
- "mtime": "2026-07-02T01:15:23.247Z",
75
+ "etag": '"517d9-GvqATjRQp0lZCEyGodPErXeDUXg"',
76
+ "mtime": "2026-07-03T01:44:09.157Z",
84
77
  "size": 333785,
85
- "path": "../public/assets/main-CKYe6UUv.js"
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
+ "size": 3420,
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"
86
100
  },
87
- "/assets/StreamingChunkSequence-UlAMVF9j.js": {
101
+ "/assets/ResponseView-xBmr54hB.js": {
88
102
  "type": "text/javascript; charset=utf-8",
89
- "etag": '"d57-66GSO+9YzBli1luuyHBvRTVMfcc"',
90
- "mtime": "2026-07-02T01:15:23.247Z",
91
- "size": 3415,
92
- "path": "../public/assets/StreamingChunkSequence-UlAMVF9j.js"
103
+ "etag": '"30d1-XQa3i7Dl3IpHmJVZY7j7wGeKTWA"',
104
+ "mtime": "2026-07-03T01:44:09.157Z",
105
+ "size": 12497,
106
+ "path": "../public/assets/ResponseView-xBmr54hB.js"
93
107
  },
94
108
  "/assets/zhipuai-BPNAnxo-.svg": {
95
109
  "type": "image/svg+xml",
96
110
  "etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
97
- "mtime": "2026-07-02T01:15:23.247Z",
111
+ "mtime": "2026-07-03T01:44:09.155Z",
98
112
  "size": 11256,
99
113
  "path": "../public/assets/zhipuai-BPNAnxo-.svg"
100
114
  },
101
- "/assets/minimax-BPMzvuL-.jpeg": {
102
- "type": "image/jpeg",
103
- "etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
104
- "mtime": "2026-07-02T01:15:23.247Z",
105
- "size": 6918,
106
- "path": "../public/assets/minimax-BPMzvuL-.jpeg"
107
- },
108
- "/assets/ResponseView-D59jTMy4.js": {
115
+ "/assets/_sessionId-CbWEG5ej.js": {
109
116
  "type": "text/javascript; charset=utf-8",
110
- "etag": '"30d0-PRaxUUFPWC7Oei05DaQSd/wZ9Bw"',
111
- "mtime": "2026-07-02T01:15:23.247Z",
112
- "size": 12496,
113
- "path": "../public/assets/ResponseView-D59jTMy4.js"
117
+ "etag": '"d2-znIEA1ArIEaTdapPt/+hhunhTEA"',
118
+ "mtime": "2026-07-03T01:44:09.155Z",
119
+ "size": 210,
120
+ "path": "../public/assets/_sessionId-CbWEG5ej.js"
114
121
  },
115
122
  "/assets/qwen-CONDcHqt.png": {
116
123
  "type": "image/png",
117
124
  "etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
118
- "mtime": "2026-07-02T01:15:23.247Z",
125
+ "mtime": "2026-07-03T01:44:09.155Z",
119
126
  "size": 357059,
120
127
  "path": "../public/assets/qwen-CONDcHqt.png"
121
128
  },
122
- "/assets/_sessionId-EHPexdPl.js": {
123
- "type": "text/javascript; charset=utf-8",
124
- "etag": '"d2-ePZpCpCw8kcmKbtHPj19t6iJuaA"',
125
- "mtime": "2026-07-02T01:15:23.247Z",
126
- "size": 210,
127
- "path": "../public/assets/_sessionId-EHPexdPl.js"
128
- },
129
- "/assets/ProxyViewerContainer-BGqeiYKD.js": {
129
+ "/assets/ProxyViewerContainer-CE9pAX4c.js": {
130
130
  "type": "text/javascript; charset=utf-8",
131
- "etag": '"b6168-t944j+wio4ZprelsCA8iT/6ifVU"',
132
- "mtime": "2026-07-02T01:15:23.247Z",
133
- "size": 745832,
134
- "path": "../public/assets/ProxyViewerContainer-BGqeiYKD.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.40",
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",
@@ -13,6 +13,7 @@ import {
13
13
 
14
14
  import type { CapturedLog } from "../contracts";
15
15
  import { exportLogsAsZip, type ExportMode } from "../lib/export-logs";
16
+ import { copyTextToClipboard } from "../lib/clipboard";
16
17
  import type { CaptureMode, TimeDisplayFormat } from "../lib/runtimeConfig";
17
18
  import { formatTimestampRange } from "../lib/timeDisplay";
18
19
  import { cn, formatContextWindowTokens, formatTokens } from "../lib/utils";
@@ -276,7 +277,8 @@ function CopyableCommand({ command }: { command: string }): JSX.Element {
276
277
  const [copied, setCopied] = useState(false);
277
278
 
278
279
  const handleCopy = useCallback(() => {
279
- void window.navigator.clipboard.writeText(command).then(() => {
280
+ void copyTextToClipboard(command).then((success) => {
281
+ if (!success) return;
280
282
  setCopied(true);
281
283
  setTimeout(() => setCopied(false), 2000);
282
284
  });
@@ -557,7 +559,8 @@ function SessionContextBar({
557
559
  const userAgent = useMemo(() => getFirstUserAgent(logs), [logs]);
558
560
 
559
561
  const handleCopyLink = useCallback(() => {
560
- void window.navigator.clipboard.writeText(window.location.href).then(() => {
562
+ void copyTextToClipboard(window.location.href).then((success) => {
563
+ if (!success) return;
561
564
  setCopied(true);
562
565
  setTimeout(() => setCopied(false), 2000);
563
566
  });
@@ -24,6 +24,7 @@ import {
24
24
  ChevronRight,
25
25
  } from "lucide-react";
26
26
  import type { ProviderConfig } from "../../proxy/providers";
27
+ import { copyTextToClipboard } from "../../lib/clipboard";
27
28
  import { maskApiKey } from "../../lib/mask";
28
29
  import {
29
30
  findProviderModelMetadata,
@@ -422,9 +423,11 @@ export function ProviderCard({
422
423
  const [showModelResults, setShowModelResults] = useState(false);
423
424
 
424
425
  function handleCopy() {
425
- navigator.clipboard.writeText(provider.apiKey).catch(() => {});
426
- setCopied(true);
427
- setTimeout(() => setCopied(false), 2000);
426
+ void copyTextToClipboard(provider.apiKey).then((success) => {
427
+ if (!success) return;
428
+ setCopied(true);
429
+ setTimeout(() => setCopied(false), 2000);
430
+ });
428
431
  }
429
432
 
430
433
  // Get docs URL: use provider.apiDocsUrl if configured, otherwise check KNOWN_PROVIDER_DOCS
@@ -4,6 +4,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from ".
4
4
  import { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from "../ui/tooltip";
5
5
  import { Eye, EyeOff, Copy, Check, ChevronDown } from "lucide-react";
6
6
  import type { ProviderConfig, ProviderModelMetadata } from "../../lib/providerContract";
7
+ import { copyTextToClipboard } from "../../lib/clipboard";
7
8
  import { maskApiKey } from "../../lib/mask";
8
9
  import { formatContextWindowInput, parseContextWindowTokensInput } from "../../lib/utils";
9
10
 
@@ -316,9 +317,11 @@ export function ProviderForm({ provider, onSubmit, onCancel }: ProviderFormProps
316
317
  provider?.modelMetadata?.some((metadata) => metadata.contextWindow !== undefined) ?? false;
317
318
 
318
319
  function handleCopy() {
319
- navigator.clipboard.writeText(apiKey).catch(() => {});
320
- setCopied(true);
321
- setTimeout(() => setCopied(false), 2000);
320
+ void copyTextToClipboard(apiKey).then((success) => {
321
+ if (!success) return;
322
+ setCopied(true);
323
+ setTimeout(() => setCopied(false), 2000);
324
+ });
322
325
  }
323
326
 
324
327
  useEffect(() => {
@@ -8,6 +8,7 @@ import { ConfirmDialog } from "../ui/confirm-dialog";
8
8
  import { ProviderCard } from "./ProviderCard";
9
9
  import { ProviderForm } from "./ProviderForm";
10
10
  import { parseJsonResponse, readApiError } from "../../lib/apiClient";
11
+ import { copyTextToClipboard } from "../../lib/clipboard";
11
12
  import {
12
13
  ProviderConfigSchema,
13
14
  type ProviderConfig,
@@ -614,12 +615,16 @@ export function ProvidersPanel({
614
615
  <button
615
616
  type="button"
616
617
  onClick={() => {
617
- void window.navigator.clipboard.writeText(configPath).then(() => {
618
+ void copyTextToClipboard(configPath).then((success) => {
619
+ if (!success) return;
618
620
  setConfigPathCopied(true);
619
621
  setTimeout(() => setConfigPathCopied(false), 2000);
620
622
  });
621
623
  }}
622
624
  className="shrink-0 ml-auto text-muted-foreground hover:text-foreground transition-colors"
625
+ aria-label={
626
+ configPathCopied ? "Copied config file path" : "Copy config file path"
627
+ }
623
628
  >
624
629
  {configPathCopied ? (
625
630
  <Check className="size-3 text-green-500" />
@@ -7,6 +7,7 @@ import { Button } from "../ui/button";
7
7
  import { ProvidersPanel } from "./ProvidersPanel";
8
8
  import { useProviders } from "../../lib/useProviders";
9
9
  import { useStripConfig } from "../../lib/useStripConfig";
10
+ import { copyTextToClipboard } from "../../lib/clipboard";
10
11
  import {
11
12
  MAX_PROVIDER_TEST_TIMEOUT_SECONDS,
12
13
  MAX_SLOW_RESPONSE_THRESHOLD_SECONDS,
@@ -75,6 +76,7 @@ export function SettingsDialog(): JSX.Element {
75
76
  <TabsTrigger value="providers">Providers</TabsTrigger>
76
77
  <TabsTrigger value="proxy">Proxy</TabsTrigger>
77
78
  <TabsTrigger value="storage">Storage</TabsTrigger>
79
+ <TabsTrigger value="mcp">MCP</TabsTrigger>
78
80
  <TabsTrigger value="onboarding">Onboarding</TabsTrigger>
79
81
  </TabsList>
80
82
 
@@ -100,6 +102,9 @@ export function SettingsDialog(): JSX.Element {
100
102
  <TabsContent value="storage">
101
103
  <StorageSettingsTab />
102
104
  </TabsContent>
105
+ <TabsContent value="mcp">
106
+ <McpSettingsTab />
107
+ </TabsContent>
103
108
  <TabsContent value="onboarding">
104
109
  <OnboardingSettingsTab />
105
110
  </TabsContent>
@@ -171,7 +176,8 @@ function StorageSettingsTab(): JSX.Element {
171
176
  }, [refresh]);
172
177
 
173
178
  const handleCopy = useCallback((id: string, value: string) => {
174
- void window.navigator.clipboard.writeText(value).then(() => {
179
+ void copyTextToClipboard(value).then((success) => {
180
+ if (!success) return;
175
181
  setCopiedId(id);
176
182
  setTimeout(() => setCopiedId(null), 1600);
177
183
  });
@@ -314,7 +320,8 @@ function OnboardingSettingsTab(): JSX.Element {
314
320
  );
315
321
 
316
322
  const handleCopy = useCallback((id: string, value: string) => {
317
- void window.navigator.clipboard.writeText(value).then(() => {
323
+ void copyTextToClipboard(value).then((success) => {
324
+ if (!success) return;
318
325
  setCopiedId(id);
319
326
  setTimeout(() => setCopiedId(null), 1600);
320
327
  });
@@ -387,6 +394,139 @@ function OnboardingSettingsTab(): JSX.Element {
387
394
  );
388
395
  }
389
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
+
390
530
  function ProxySettingsTab(): JSX.Element {
391
531
  const {
392
532
  strip,
@@ -13,6 +13,7 @@ import {
13
13
  X,
14
14
  } from "lucide-react";
15
15
  import { cn, formatTokens } from "../../lib/utils";
16
+ import { copyTextToClipboard } from "../../lib/clipboard";
16
17
  import type { CapturedLog } from "../../contracts";
17
18
  import {
18
19
  type DiffOp,
@@ -656,7 +657,8 @@ export function CompareDrawer({ left, right, onClose }: CompareDrawerProps): JSX
656
657
  const [copiedPath, setCopiedPath] = useState<string | null>(null);
657
658
  const copyResetTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
658
659
  const onCopyPath = (path: string) => {
659
- void window.navigator.clipboard.writeText(path).then(() => {
660
+ void copyTextToClipboard(path).then((success) => {
661
+ if (!success) return;
660
662
  setCopiedPath(path);
661
663
  if (copyResetTimer.current !== null) clearTimeout(copyResetTimer.current);
662
664
  copyResetTimer.current = setTimeout(() => setCopiedPath(null), 1500);