@tonyclaw/agent-inspector 2.0.41 → 2.0.43
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/.output/nitro.json +1 -1
- package/.output/public/assets/{CompareDrawer-DCg6S2cl.js → CompareDrawer-CxM1gCfL.js} +1 -1
- package/.output/public/assets/ProxyViewerContainer-TtRG-0E7.js +117 -0
- package/.output/public/assets/{ReplayDialog-ClVgjSDE.js → ReplayDialog-UseUkucS.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-BhqvLQp9.js → RequestAnatomy-aPxgEJ2L.js} +1 -1
- package/.output/public/assets/{ResponseView-BZAJoK6B.js → ResponseView-DA-F4F97.js} +1 -1
- package/.output/public/assets/{StreamingChunkSequence-CaORmoKX.js → StreamingChunkSequence-JSQEPeNS.js} +1 -1
- package/.output/public/assets/_sessionId-BEXuCWq5.js +1 -0
- package/.output/public/assets/index-Bhsa_2xX.js +1 -0
- package/.output/public/assets/index-DOWlRJ0W.css +1 -0
- package/.output/public/assets/{main-CI3HFEcV.js → main-BpGVJcpB.js} +2 -2
- package/.output/server/{_sessionId-DQ0ljHQ8.mjs → _sessionId-DGn-TENM.mjs} +2 -2
- package/.output/server/_ssr/{CompareDrawer-nkVa9epn.mjs → CompareDrawer-CFElCSYY.mjs} +2 -2
- package/.output/server/_ssr/{ProxyViewerContainer-CXA7iH3H.mjs → ProxyViewerContainer-B7SR9mrD.mjs} +383 -76
- package/.output/server/_ssr/{ReplayDialog-CK71-ucq.mjs → ReplayDialog-DfKapj0k.mjs} +3 -3
- package/.output/server/_ssr/{RequestAnatomy-DDCUJJ3X.mjs → RequestAnatomy-CUxTCg31.mjs} +2 -2
- package/.output/server/_ssr/{ResponseView-C6ZA7V3B.mjs → ResponseView-BXY0w197.mjs} +2 -2
- package/.output/server/_ssr/{StreamingChunkSequence-DW5v_o6G.mjs → StreamingChunkSequence-CzMnES9H.mjs} +2 -2
- package/.output/server/_ssr/{index-Ckex98yq.mjs → index-CVlT-REW.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{router-ChJIVv7-.mjs → router-B2d1LUx6.mjs} +1313 -468
- package/.output/server/{_tanstack-start-manifest_v-CJ4__weU.mjs → _tanstack-start-manifest_v-Drpi28BM.mjs} +1 -1
- package/.output/server/index.mjs +60 -60
- package/README.md +36 -12
- package/package.json +1 -1
- package/src/components/ProxyViewer.tsx +156 -17
- package/src/components/ProxyViewerContainer.tsx +66 -4
- package/src/components/groups/GroupsDialog.tsx +11 -10
- package/src/components/providers/SettingsDialog.tsx +137 -0
- package/src/components/proxy-viewer/LogEntry.tsx +107 -56
- package/src/components/ui/dialog.tsx +1 -1
- package/src/lib/runContract.ts +3 -0
- package/src/mcp/currentContext.ts +65 -0
- package/src/mcp/mode.ts +56 -0
- package/src/mcp/server.ts +466 -15
- package/src/mcp/toolHandlers.ts +372 -0
- package/src/proxy/evidenceExporter.ts +1 -0
- package/src/proxy/runStore.ts +74 -22
- package/.output/public/assets/ProxyViewerContainer-DsU6QETm.js +0 -115
- package/.output/public/assets/_sessionId-BHqywvM3.js +0 -1
- package/.output/public/assets/index-B_LPYuM0.js +0 -1
- package/.output/public/assets/index-BfGJEb-2.css +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-
|
|
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-BpGVJcpB.js"], "assets": [] }, "/": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", "assets": [], "preloads": ["/assets/index-Bhsa_2xX.js", "/assets/ProxyViewerContainer-TtRG-0E7.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-BEXuCWq5.js", "/assets/ProxyViewerContainer-TtRG-0E7.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-BpGVJcpB.js" });
|
|
2
2
|
export {
|
|
3
3
|
tsrStartManifest
|
|
4
4
|
};
|
package/.output/server/index.mjs
CHANGED
|
@@ -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-
|
|
41
|
+
"mtime": "2026-07-03T02:24:32.082Z",
|
|
49
42
|
"size": 5915,
|
|
50
43
|
"path": "../public/assets/alibaba-TTwafVwX.svg"
|
|
51
44
|
},
|
|
52
|
-
"/assets/
|
|
53
|
-
"type": "image/jpeg",
|
|
54
|
-
"etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
|
|
55
|
-
"mtime": "2026-07-02T06:48:19.896Z",
|
|
56
|
-
"size": 6918,
|
|
57
|
-
"path": "../public/assets/minimax-BPMzvuL-.jpeg"
|
|
58
|
-
},
|
|
59
|
-
"/assets/RequestAnatomy-BhqvLQp9.js": {
|
|
45
|
+
"/assets/CompareDrawer-CxM1gCfL.js": {
|
|
60
46
|
"type": "text/javascript; charset=utf-8",
|
|
61
|
-
"etag": '"
|
|
62
|
-
"mtime": "2026-07-
|
|
63
|
-
"size":
|
|
64
|
-
"path": "../public/assets/
|
|
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"
|
|
47
|
+
"etag": '"49e8-MWCeQ8XhCRwryE9ztGUYYFSWZMU"',
|
|
48
|
+
"mtime": "2026-07-03T02:24:32.084Z",
|
|
49
|
+
"size": 18920,
|
|
50
|
+
"path": "../public/assets/CompareDrawer-CxM1gCfL.js"
|
|
72
51
|
},
|
|
73
|
-
"/assets/index-
|
|
52
|
+
"/assets/index-Bhsa_2xX.js": {
|
|
74
53
|
"type": "text/javascript; charset=utf-8",
|
|
75
|
-
"etag": '"74-
|
|
76
|
-
"mtime": "2026-07-
|
|
54
|
+
"etag": '"74-FekOZ7LhkvEikN+5Vtic9whLu2c"',
|
|
55
|
+
"mtime": "2026-07-03T02:24:32.084Z",
|
|
77
56
|
"size": 116,
|
|
78
|
-
"path": "../public/assets/index-
|
|
57
|
+
"path": "../public/assets/index-Bhsa_2xX.js"
|
|
79
58
|
},
|
|
80
|
-
"/assets/index-
|
|
59
|
+
"/assets/index-DOWlRJ0W.css": {
|
|
81
60
|
"type": "text/css; charset=utf-8",
|
|
82
|
-
"etag": '"
|
|
83
|
-
"mtime": "2026-07-
|
|
84
|
-
"size":
|
|
85
|
-
"path": "../public/assets/index-
|
|
61
|
+
"etag": '"1ad8b-QtGZOCeSfvBzb+puIlHYbHPVBvo"',
|
|
62
|
+
"mtime": "2026-07-03T02:24:32.084Z",
|
|
63
|
+
"size": 109963,
|
|
64
|
+
"path": "../public/assets/index-DOWlRJ0W.css"
|
|
86
65
|
},
|
|
87
|
-
"/assets/
|
|
66
|
+
"/assets/ReplayDialog-UseUkucS.js": {
|
|
88
67
|
"type": "text/javascript; charset=utf-8",
|
|
89
|
-
"etag": '"
|
|
90
|
-
"mtime": "2026-07-
|
|
91
|
-
"size":
|
|
92
|
-
"path": "../public/assets/
|
|
68
|
+
"etag": '"318c-kKQJY2fzKwzsc7gAjVFVbioolPs"',
|
|
69
|
+
"mtime": "2026-07-03T02:24:32.084Z",
|
|
70
|
+
"size": 12684,
|
|
71
|
+
"path": "../public/assets/ReplayDialog-UseUkucS.js"
|
|
93
72
|
},
|
|
94
|
-
"/assets/
|
|
73
|
+
"/assets/RequestAnatomy-aPxgEJ2L.js": {
|
|
95
74
|
"type": "text/javascript; charset=utf-8",
|
|
96
|
-
"etag": '"
|
|
97
|
-
"mtime": "2026-07-
|
|
75
|
+
"etag": '"4485-mO43pmS8TLLXBnkqeHw5yJys4xE"',
|
|
76
|
+
"mtime": "2026-07-03T02:24:32.084Z",
|
|
77
|
+
"size": 17541,
|
|
78
|
+
"path": "../public/assets/RequestAnatomy-aPxgEJ2L.js"
|
|
79
|
+
},
|
|
80
|
+
"/assets/ResponseView-DA-F4F97.js": {
|
|
81
|
+
"type": "text/javascript; charset=utf-8",
|
|
82
|
+
"etag": '"30d1-5KGpGiZC9fD4bpancX3Blld/U6c"',
|
|
83
|
+
"mtime": "2026-07-03T02:24:32.084Z",
|
|
98
84
|
"size": 12497,
|
|
99
|
-
"path": "../public/assets/ResponseView-
|
|
85
|
+
"path": "../public/assets/ResponseView-DA-F4F97.js"
|
|
86
|
+
},
|
|
87
|
+
"/assets/minimax-BPMzvuL-.jpeg": {
|
|
88
|
+
"type": "image/jpeg",
|
|
89
|
+
"etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
|
|
90
|
+
"mtime": "2026-07-03T02:24:32.082Z",
|
|
91
|
+
"size": 6918,
|
|
92
|
+
"path": "../public/assets/minimax-BPMzvuL-.jpeg"
|
|
93
|
+
},
|
|
94
|
+
"/assets/StreamingChunkSequence-JSQEPeNS.js": {
|
|
95
|
+
"type": "text/javascript; charset=utf-8",
|
|
96
|
+
"etag": '"d5c-ZXGtNk6QwMMsBCwiFU85hEx0MWk"',
|
|
97
|
+
"mtime": "2026-07-03T02:24:32.084Z",
|
|
98
|
+
"size": 3420,
|
|
99
|
+
"path": "../public/assets/StreamingChunkSequence-JSQEPeNS.js"
|
|
100
100
|
},
|
|
101
101
|
"/assets/zhipuai-BPNAnxo-.svg": {
|
|
102
102
|
"type": "image/svg+xml",
|
|
103
103
|
"etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
|
|
104
|
-
"mtime": "2026-07-
|
|
104
|
+
"mtime": "2026-07-03T02:24:32.082Z",
|
|
105
105
|
"size": 11256,
|
|
106
106
|
"path": "../public/assets/zhipuai-BPNAnxo-.svg"
|
|
107
107
|
},
|
|
108
|
-
"/assets/_sessionId-
|
|
108
|
+
"/assets/_sessionId-BEXuCWq5.js": {
|
|
109
109
|
"type": "text/javascript; charset=utf-8",
|
|
110
|
-
"etag": '"d2-
|
|
111
|
-
"mtime": "2026-07-
|
|
110
|
+
"etag": '"d2-exeT3w9Bi3c+xV7elTFmaQnyqhI"',
|
|
111
|
+
"mtime": "2026-07-03T02:24:32.084Z",
|
|
112
112
|
"size": 210,
|
|
113
|
-
"path": "../public/assets/_sessionId-
|
|
113
|
+
"path": "../public/assets/_sessionId-BEXuCWq5.js"
|
|
114
114
|
},
|
|
115
|
-
"/assets/main-
|
|
115
|
+
"/assets/main-BpGVJcpB.js": {
|
|
116
116
|
"type": "text/javascript; charset=utf-8",
|
|
117
|
-
"etag": '"517d9-
|
|
118
|
-
"mtime": "2026-07-
|
|
117
|
+
"etag": '"517d9-g8ehe8xaUgKICmE82dajQ3Rg1Aw"',
|
|
118
|
+
"mtime": "2026-07-03T02:24:32.084Z",
|
|
119
119
|
"size": 333785,
|
|
120
|
-
"path": "../public/assets/main-
|
|
120
|
+
"path": "../public/assets/main-BpGVJcpB.js"
|
|
121
121
|
},
|
|
122
122
|
"/assets/qwen-CONDcHqt.png": {
|
|
123
123
|
"type": "image/png",
|
|
124
124
|
"etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
|
|
125
|
-
"mtime": "2026-07-
|
|
125
|
+
"mtime": "2026-07-03T02:24:32.084Z",
|
|
126
126
|
"size": 357059,
|
|
127
127
|
"path": "../public/assets/qwen-CONDcHqt.png"
|
|
128
128
|
},
|
|
129
|
-
"/assets/ProxyViewerContainer-
|
|
129
|
+
"/assets/ProxyViewerContainer-TtRG-0E7.js": {
|
|
130
130
|
"type": "text/javascript; charset=utf-8",
|
|
131
|
-
"etag": '"
|
|
132
|
-
"mtime": "2026-07-
|
|
133
|
-
"size":
|
|
134
|
-
"path": "../public/assets/ProxyViewerContainer-
|
|
131
|
+
"etag": '"b7ea9-7bsvy+ETcxfBpFGaacydCBqQiqA"',
|
|
132
|
+
"mtime": "2026-07-03T02:24:32.084Z",
|
|
133
|
+
"size": 753321,
|
|
134
|
+
"path": "../public/assets/ProxyViewerContainer-TtRG-0E7.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
|
|
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
|
|
199
|
-
`sessionId`.
|
|
200
|
-
2.
|
|
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
|
-
|
|
203
|
-
|
|
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
|
-
|
|
206
|
-
|
|
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.
|
|
219
|
-
3.
|
|
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
|
-
|
|
236
|
+
7. Call `inspector_update_group` to mark the whole batch `running`, `failed`, `completed`, or
|
|
223
237
|
`cancelled`.
|
|
224
|
-
|
|
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
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
import type { CapturedLog } from "../contracts";
|
|
15
15
|
import { exportLogsAsZip, type ExportMode } from "../lib/export-logs";
|
|
16
16
|
import { copyTextToClipboard } from "../lib/clipboard";
|
|
17
|
+
import type { InspectorGroupEvidence, InspectorGroupMember } from "../lib/groupContract";
|
|
17
18
|
import type { CaptureMode, TimeDisplayFormat } from "../lib/runtimeConfig";
|
|
18
19
|
import { formatTimestampRange } from "../lib/timeDisplay";
|
|
19
20
|
import { cn, formatContextWindowTokens, formatTokens } from "../lib/utils";
|
|
@@ -86,6 +87,17 @@ export type SessionContextScope = {
|
|
|
86
87
|
showBackLink: boolean;
|
|
87
88
|
};
|
|
88
89
|
|
|
90
|
+
export type SessionMembershipEvidence = {
|
|
91
|
+
groupId: string;
|
|
92
|
+
groupTitle: string;
|
|
93
|
+
groupKind: string;
|
|
94
|
+
groupStatus: string;
|
|
95
|
+
groupTask: string | null;
|
|
96
|
+
groupProject: string | null;
|
|
97
|
+
groupEvidence: InspectorGroupEvidence | null;
|
|
98
|
+
member: InspectorGroupMember;
|
|
99
|
+
};
|
|
100
|
+
|
|
89
101
|
function formatTimeRange(logs: CapturedLog[], timeDisplayFormat: TimeDisplayFormat): string | null {
|
|
90
102
|
const first = logs[0];
|
|
91
103
|
const last = logs[logs.length - 1];
|
|
@@ -194,6 +206,114 @@ function formatContextWindow(summary: SessionModelContextSummary): string {
|
|
|
194
206
|
return `Context window ${formatContextWindowTokens(tokens)}`;
|
|
195
207
|
}
|
|
196
208
|
|
|
209
|
+
const MEMBER_METADATA_KEYS: string[] = [
|
|
210
|
+
"score",
|
|
211
|
+
"decision",
|
|
212
|
+
"final_status",
|
|
213
|
+
"validation_pass_ratio",
|
|
214
|
+
"semantic_memory_score",
|
|
215
|
+
"opencode_exit",
|
|
216
|
+
"actual_model",
|
|
217
|
+
"run_dir",
|
|
218
|
+
"workspace",
|
|
219
|
+
"project_dir",
|
|
220
|
+
"work_dir",
|
|
221
|
+
];
|
|
222
|
+
|
|
223
|
+
function formatMetadataValue(value: InspectorGroupMember["metadata"][string]): string | null {
|
|
224
|
+
if (typeof value === "string") return value.length > 0 ? value : null;
|
|
225
|
+
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
226
|
+
if (value === null) return null;
|
|
227
|
+
return JSON.stringify(value);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
function getMemberMetadataRows(member: InspectorGroupMember): { key: string; value: string }[] {
|
|
231
|
+
const rows: { key: string; value: string }[] = [];
|
|
232
|
+
for (const key of MEMBER_METADATA_KEYS) {
|
|
233
|
+
const value = member.metadata[key];
|
|
234
|
+
if (value === undefined) continue;
|
|
235
|
+
const formatted = formatMetadataValue(value);
|
|
236
|
+
if (formatted !== null) rows.push({ key, value: formatted });
|
|
237
|
+
}
|
|
238
|
+
return rows;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function SessionMembershipPanel({
|
|
242
|
+
memberships,
|
|
243
|
+
}: {
|
|
244
|
+
memberships: SessionMembershipEvidence[];
|
|
245
|
+
}): JSX.Element | null {
|
|
246
|
+
if (memberships.length === 0) return null;
|
|
247
|
+
|
|
248
|
+
return (
|
|
249
|
+
<div className="mb-4 rounded-md border border-border bg-muted/10 px-3 py-2 text-xs">
|
|
250
|
+
<div className="mb-2 flex items-center justify-between gap-2">
|
|
251
|
+
<div className="font-semibold text-foreground">Group Member Evidence</div>
|
|
252
|
+
<div className="font-mono text-[10px] text-muted-foreground">
|
|
253
|
+
{memberships.length} group{memberships.length === 1 ? "" : "s"}
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
<div className="space-y-2">
|
|
257
|
+
{memberships.map((membership) => {
|
|
258
|
+
const member = membership.member;
|
|
259
|
+
const metadataRows = getMemberMetadataRows(member);
|
|
260
|
+
return (
|
|
261
|
+
<div key={`${membership.groupId}:${member.id}`} className="min-w-0">
|
|
262
|
+
<div className="flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1">
|
|
263
|
+
<span
|
|
264
|
+
className="truncate font-medium text-foreground"
|
|
265
|
+
title={membership.groupTitle}
|
|
266
|
+
>
|
|
267
|
+
{membership.groupTitle}
|
|
268
|
+
</span>
|
|
269
|
+
<span className="font-mono text-[10px] uppercase text-muted-foreground">
|
|
270
|
+
{membership.groupStatus}
|
|
271
|
+
</span>
|
|
272
|
+
{member.status !== null && (
|
|
273
|
+
<span className="font-mono text-[10px] text-muted-foreground">
|
|
274
|
+
member {member.status}
|
|
275
|
+
</span>
|
|
276
|
+
)}
|
|
277
|
+
</div>
|
|
278
|
+
<div className="mt-1 flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 text-muted-foreground">
|
|
279
|
+
<span className="font-mono" title={member.sessionId}>
|
|
280
|
+
{truncateSessionId(member.sessionId)}
|
|
281
|
+
</span>
|
|
282
|
+
{member.label !== null && <span>{member.label}</span>}
|
|
283
|
+
{member.provider !== null && <span>{member.provider}</span>}
|
|
284
|
+
{member.model !== null && <span className="font-mono">{member.model}</span>}
|
|
285
|
+
{member.runId !== null && (
|
|
286
|
+
<span className="font-mono" title={member.runId}>
|
|
287
|
+
run {truncateSessionId(member.runId)}
|
|
288
|
+
</span>
|
|
289
|
+
)}
|
|
290
|
+
</div>
|
|
291
|
+
{metadataRows.length > 0 && (
|
|
292
|
+
<div className="mt-2 grid gap-1 sm:grid-cols-2 xl:grid-cols-3">
|
|
293
|
+
{metadataRows.map((row) => (
|
|
294
|
+
<div
|
|
295
|
+
key={row.key}
|
|
296
|
+
className="min-w-0 rounded border border-border/60 px-2 py-1"
|
|
297
|
+
>
|
|
298
|
+
<div className="font-mono text-[10px] text-muted-foreground">{row.key}</div>
|
|
299
|
+
<div
|
|
300
|
+
className="truncate font-mono text-[11px] text-foreground"
|
|
301
|
+
title={row.value}
|
|
302
|
+
>
|
|
303
|
+
{row.value}
|
|
304
|
+
</div>
|
|
305
|
+
</div>
|
|
306
|
+
))}
|
|
307
|
+
</div>
|
|
308
|
+
)}
|
|
309
|
+
</div>
|
|
310
|
+
);
|
|
311
|
+
})}
|
|
312
|
+
</div>
|
|
313
|
+
</div>
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
|
|
197
317
|
function formatRequestCount(count: number): string {
|
|
198
318
|
return `${count} ${count === 1 ? "request" : "requests"}`;
|
|
199
319
|
}
|
|
@@ -641,6 +761,10 @@ export type ProxyViewerProps = {
|
|
|
641
761
|
slowResponseThresholdSeconds: number;
|
|
642
762
|
/** Controls whether timestamps render as compact local time or full ISO strings. */
|
|
643
763
|
timeDisplayFormat: TimeDisplayFormat;
|
|
764
|
+
/** True while a pinned session page is waiting for its initial log scan. */
|
|
765
|
+
isLoading?: boolean;
|
|
766
|
+
/** Group/run member metadata attached to the pinned session id. */
|
|
767
|
+
sessionMemberships?: SessionMembershipEvidence[];
|
|
644
768
|
/** Hide the session filter dropdown. Used on `/session/$id` routes where
|
|
645
769
|
* the session is already pinned by the URL and the dropdown would just
|
|
646
770
|
* fight the URL state. */
|
|
@@ -665,6 +789,8 @@ export function ProxyViewer({
|
|
|
665
789
|
strip,
|
|
666
790
|
slowResponseThresholdSeconds,
|
|
667
791
|
timeDisplayFormat,
|
|
792
|
+
isLoading = false,
|
|
793
|
+
sessionMemberships = [],
|
|
668
794
|
hideSessionFilter = false,
|
|
669
795
|
pinnedSessionId,
|
|
670
796
|
}: ProxyViewerProps): JSX.Element {
|
|
@@ -841,6 +967,10 @@ export function ProxyViewer({
|
|
|
841
967
|
/>
|
|
842
968
|
)}
|
|
843
969
|
|
|
970
|
+
{hasSessionContext && pinnedSessionId !== undefined && sessionMemberships.length > 0 && (
|
|
971
|
+
<SessionMembershipPanel memberships={sessionMemberships} />
|
|
972
|
+
)}
|
|
973
|
+
|
|
844
974
|
{/* Controls + Filters */}
|
|
845
975
|
<div className="flex items-center gap-3 mb-4">
|
|
846
976
|
{!hideSessionFilter && (
|
|
@@ -972,26 +1102,35 @@ export function ProxyViewer({
|
|
|
972
1102
|
{logs.length === 0 ? (
|
|
973
1103
|
selectedSession !== "__all__" ? (
|
|
974
1104
|
<div className="text-center text-muted-foreground py-16 space-y-4">
|
|
975
|
-
<p className="text-sm font-medium">
|
|
1105
|
+
<p className="text-sm font-medium">
|
|
1106
|
+
{isLoading ? "Loading session data..." : "Session not found"}
|
|
1107
|
+
</p>
|
|
976
1108
|
<p className="text-xs font-mono bg-muted px-3 py-1 rounded inline-block max-w-[500px] break-all">
|
|
977
1109
|
{truncateSessionId(selectedSession)}
|
|
978
1110
|
</p>
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
1111
|
+
{sessionMemberships.length > 0 && (
|
|
1112
|
+
<div className="mx-auto max-w-3xl text-left">
|
|
1113
|
+
<SessionMembershipPanel memberships={sessionMemberships} />
|
|
1114
|
+
</div>
|
|
1115
|
+
)}
|
|
1116
|
+
{!isLoading && (
|
|
1117
|
+
<p className="text-xs">
|
|
1118
|
+
This session may have been cleared or never existed.{" "}
|
|
1119
|
+
{hideSessionFilter ? (
|
|
1120
|
+
<a href="/" className="underline hover:text-foreground transition-colors">
|
|
1121
|
+
Back to all sessions
|
|
1122
|
+
</a>
|
|
1123
|
+
) : (
|
|
1124
|
+
<button
|
|
1125
|
+
type="button"
|
|
1126
|
+
onClick={() => onSessionChange("__all__")}
|
|
1127
|
+
className="underline hover:text-foreground transition-colors"
|
|
1128
|
+
>
|
|
1129
|
+
Show all sessions
|
|
1130
|
+
</button>
|
|
1131
|
+
)}
|
|
1132
|
+
</p>
|
|
1133
|
+
)}
|
|
995
1134
|
</div>
|
|
996
1135
|
) : (
|
|
997
1136
|
<div className="text-center text-muted-foreground py-16 space-y-4">
|