@tonyclaw/agent-inspector 2.1.15 → 2.1.17
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/cli.js +57 -13
- package/.output/nitro.json +1 -1
- package/.output/public/assets/{CompareDrawer-BcEd6V-V.js → CompareDrawer-B9sLBHw5.js} +1 -1
- package/.output/public/assets/ProxyViewerContainer-DbWjc_BE.js +106 -0
- package/.output/public/assets/{ReplayDialog-BNpC0548.js → ReplayDialog-D9I9W9n3.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-Ds1uRLVB.js → RequestAnatomy-DGXK_Rii.js} +1 -1
- package/.output/public/assets/{ResponseView-7KPVqKl5.js → ResponseView-df_JzwsS.js} +2 -2
- package/.output/public/assets/{StreamingChunkSequence-BHQT261s.js → StreamingChunkSequence-i3DM5IKL.js} +1 -1
- package/.output/public/assets/_sessionId-CTpCHdFh.js +1 -0
- package/.output/public/assets/index-Blqvndcn.js +1 -0
- package/.output/public/assets/index-Cs79WRQj.css +1 -0
- package/.output/public/assets/{index-DjKt8XKe.js → index-Dqc2r1ea.js} +1 -1
- package/.output/public/assets/{json-viewer-CkCu-rka.js → json-viewer-D3QWQlSB.js} +1 -1
- package/.output/public/assets/{main-DpD1N0S8.js → main-ZhxhOCmF.js} +2 -2
- package/.output/server/_libs/lucide-react.mjs +255 -201
- package/.output/server/{_sessionId-DF9Sy8cP.mjs → _sessionId-YFrP0lZP.mjs} +2 -2
- package/.output/server/_ssr/{CompareDrawer-BoxztaO7.mjs → CompareDrawer-qC3adEeq.mjs} +3 -3
- package/.output/server/_ssr/{ProxyViewerContainer-CRBkqFlJ.mjs → ProxyViewerContainer-DCZIJC2b.mjs} +2732 -1849
- package/.output/server/_ssr/{ReplayDialog-Cc1dyDuK.mjs → ReplayDialog-CvX4XYCi.mjs} +4 -4
- package/.output/server/_ssr/{RequestAnatomy-CMGSsz5Z.mjs → RequestAnatomy-HQfrxjO1.mjs} +3 -3
- package/.output/server/_ssr/{ResponseView-Cp10DM1D.mjs → ResponseView-QSlSD11e.mjs} +3 -3
- package/.output/server/_ssr/{StreamingChunkSequence-B1VGxy3A.mjs → StreamingChunkSequence-DTAiwlnI.mjs} +3 -3
- package/.output/server/_ssr/{index-47XVPghS.mjs → index-D_EzfXaN.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{json-viewer-zDE2rrmJ.mjs → json-viewer-CrIX0e0Q.mjs} +3 -3
- package/.output/server/_ssr/{router-DVeuZFqI.mjs → router-__o2wrfO.mjs} +505 -136
- package/.output/server/{_tanstack-start-manifest_v-Bp8JxtPW.mjs → _tanstack-start-manifest_v-DbqyLpsI.mjs} +1 -1
- package/.output/server/index.mjs +63 -63
- package/README.md +57 -2
- package/package.json +1 -1
- package/src/cli/startupOutput.ts +16 -0
- package/src/cli.ts +61 -15
- package/src/components/ProxyViewer.tsx +535 -163
- package/src/components/ProxyViewerContainer.tsx +77 -67
- package/src/components/alerts/AlertsDialog.tsx +2 -1
- package/src/components/clients/ClientLogo.tsx +1 -1
- package/src/components/groups/GroupsDialog.tsx +19 -1
- package/src/components/providers/ProviderCard.tsx +133 -32
- package/src/components/providers/ProviderForm.tsx +61 -29
- package/src/components/providers/ProviderLogo.tsx +6 -1
- package/src/components/providers/ProvidersPanel.tsx +7 -7
- package/src/components/providers/SettingsDialog.tsx +13 -6
- package/src/components/proxy-viewer/AgentTraceSummary.tsx +6 -6
- package/src/components/proxy-viewer/ConversationGroup.tsx +43 -32
- package/src/components/proxy-viewer/ConversationGroupList.tsx +452 -89
- package/src/components/proxy-viewer/ConversationHeader.tsx +153 -120
- package/src/components/proxy-viewer/LogEntry.tsx +130 -43
- package/src/components/proxy-viewer/LogEntryHeader.tsx +357 -354
- package/src/components/proxy-viewer/ProviderLogoStack.tsx +2 -2
- package/src/components/proxy-viewer/RequestToolsPanel.tsx +9 -9
- package/src/components/proxy-viewer/ThreadConnector.tsx +102 -83
- package/src/components/proxy-viewer/TurnGroup.tsx +33 -69
- package/src/components/proxy-viewer/TurnGroupList.tsx +3 -0
- package/src/components/proxy-viewer/bodyHydration.ts +56 -0
- package/src/components/proxy-viewer/viewerState.ts +0 -4
- package/src/components/ui/icon-trigger.ts +2 -0
- package/src/components/ui/transient-toast.tsx +104 -0
- package/src/lib/providerTestContract.ts +56 -10
- package/src/lib/providerTestPrompt.ts +23 -1
- package/src/lib/sessionInfoContract.ts +4 -0
- package/src/lib/upstreamUrl.ts +105 -1
- package/src/mcp/server.ts +71 -27
- package/src/mcp/toolHandlers.ts +24 -5
- package/src/proxy/formats/openai/alibabaProvider.ts +0 -4
- package/src/proxy/sessionInfo.ts +31 -2
- package/src/proxy/sessionSupervisor.ts +20 -1
- package/src/proxy/store.ts +1 -1
- package/src/routes/api/providers.$providerId.test.log.ts +93 -14
- package/styles/globals.css +180 -180
- package/.output/public/assets/ProxyViewerContainer-h851qWNp.js +0 -106
- package/.output/public/assets/_sessionId-DWePGjnS.js +0 -1
- package/.output/public/assets/index-CI1-G8ua.js +0 -1
- package/.output/public/assets/index-DdhFqPsI.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/alerts", "/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/alerts", "/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-ZhxhOCmF.js"], "assets": [] }, "/": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", "assets": [], "preloads": ["/assets/index-Blqvndcn.js", "/assets/ProxyViewerContainer-DbWjc_BE.js"] }, "/api/alerts": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/alerts.ts", "children": ["/api/alerts/summary"] }, "/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/import", "/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-CTpCHdFh.js", "/assets/ProxyViewerContainer-DbWjc_BE.js"] }, "/api/alerts/summary": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/alerts.summary.ts" }, "/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/body", "/api/logs/$id/chunks", "/api/logs/$id/replay"] }, "/api/logs/import": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.import.ts" }, "/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/body": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.$id.body.ts" }, "/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-ZhxhOCmF.js" });
|
|
2
2
|
export {
|
|
3
3
|
tsrStartManifest
|
|
4
4
|
};
|
package/.output/server/index.mjs
CHANGED
|
@@ -38,114 +38,114 @@ const assets = {
|
|
|
38
38
|
"/assets/alibaba-TTwafVwX.svg": {
|
|
39
39
|
"type": "image/svg+xml",
|
|
40
40
|
"etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
|
|
41
|
-
"mtime": "2026-07-
|
|
41
|
+
"mtime": "2026-07-06T01:51:49.827Z",
|
|
42
42
|
"size": 5915,
|
|
43
43
|
"path": "../public/assets/alibaba-TTwafVwX.svg"
|
|
44
44
|
},
|
|
45
|
-
"/assets/CompareDrawer-
|
|
45
|
+
"/assets/CompareDrawer-B9sLBHw5.js": {
|
|
46
46
|
"type": "text/javascript; charset=utf-8",
|
|
47
|
-
"etag": '"4bbf-
|
|
48
|
-
"mtime": "2026-07-
|
|
47
|
+
"etag": '"4bbf-mOJ0EMaKAedd4RKPYjBplzH1us0"',
|
|
48
|
+
"mtime": "2026-07-06T01:51:49.827Z",
|
|
49
49
|
"size": 19391,
|
|
50
|
-
"path": "../public/assets/CompareDrawer-
|
|
50
|
+
"path": "../public/assets/CompareDrawer-B9sLBHw5.js"
|
|
51
51
|
},
|
|
52
|
-
"/assets/index-
|
|
52
|
+
"/assets/index-Cs79WRQj.css": {
|
|
53
53
|
"type": "text/css; charset=utf-8",
|
|
54
|
-
"etag": '"
|
|
55
|
-
"mtime": "2026-07-
|
|
56
|
-
"size":
|
|
57
|
-
"path": "../public/assets/index-
|
|
54
|
+
"etag": '"222de-8Pwwfkc74RHkx4a9x2RSdxKMxvk"',
|
|
55
|
+
"mtime": "2026-07-06T01:51:49.827Z",
|
|
56
|
+
"size": 139998,
|
|
57
|
+
"path": "../public/assets/index-Cs79WRQj.css"
|
|
58
58
|
},
|
|
59
|
-
"/assets/
|
|
59
|
+
"/assets/json-viewer-D3QWQlSB.js": {
|
|
60
60
|
"type": "text/javascript; charset=utf-8",
|
|
61
|
-
"etag": '"
|
|
62
|
-
"mtime": "2026-07-
|
|
63
|
-
"size": 118060,
|
|
64
|
-
"path": "../public/assets/index-DjKt8XKe.js"
|
|
65
|
-
},
|
|
66
|
-
"/assets/json-viewer-CkCu-rka.js": {
|
|
67
|
-
"type": "text/javascript; charset=utf-8",
|
|
68
|
-
"etag": '"1ae6-2bgY4h+p+tUN/whEBQOWKsJ3qYQ"',
|
|
69
|
-
"mtime": "2026-07-04T08:29:06.395Z",
|
|
61
|
+
"etag": '"1ae6-O7Q+mkHayIbluV/J6OMUlBSz1/E"',
|
|
62
|
+
"mtime": "2026-07-06T01:51:49.827Z",
|
|
70
63
|
"size": 6886,
|
|
71
|
-
"path": "../public/assets/json-viewer-
|
|
64
|
+
"path": "../public/assets/json-viewer-D3QWQlSB.js"
|
|
72
65
|
},
|
|
73
|
-
"/assets/index-
|
|
66
|
+
"/assets/index-Dqc2r1ea.js": {
|
|
74
67
|
"type": "text/javascript; charset=utf-8",
|
|
75
|
-
"etag": '"
|
|
76
|
-
"mtime": "2026-07-
|
|
77
|
-
"size":
|
|
78
|
-
"path": "../public/assets/index-
|
|
68
|
+
"etag": '"1cd2c-MUj6v+9GBschHh/SsyN1UByPNE0"',
|
|
69
|
+
"mtime": "2026-07-06T01:51:49.827Z",
|
|
70
|
+
"size": 118060,
|
|
71
|
+
"path": "../public/assets/index-Dqc2r1ea.js"
|
|
79
72
|
},
|
|
80
73
|
"/assets/minimax-BPMzvuL-.jpeg": {
|
|
81
74
|
"type": "image/jpeg",
|
|
82
75
|
"etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
|
|
83
|
-
"mtime": "2026-07-
|
|
76
|
+
"mtime": "2026-07-06T01:51:49.827Z",
|
|
84
77
|
"size": 6918,
|
|
85
78
|
"path": "../public/assets/minimax-BPMzvuL-.jpeg"
|
|
86
79
|
},
|
|
87
|
-
"/assets/
|
|
80
|
+
"/assets/index-Blqvndcn.js": {
|
|
88
81
|
"type": "text/javascript; charset=utf-8",
|
|
89
|
-
"etag": '"
|
|
90
|
-
"mtime": "2026-07-
|
|
91
|
-
"size":
|
|
92
|
-
"path": "../public/assets/
|
|
82
|
+
"etag": '"74-KumSweCku9x2YG0UbCSDwxEOQb4"',
|
|
83
|
+
"mtime": "2026-07-06T01:51:49.827Z",
|
|
84
|
+
"size": 116,
|
|
85
|
+
"path": "../public/assets/index-Blqvndcn.js"
|
|
93
86
|
},
|
|
94
|
-
"/assets/
|
|
87
|
+
"/assets/main-ZhxhOCmF.js": {
|
|
95
88
|
"type": "text/javascript; charset=utf-8",
|
|
96
|
-
"etag": '"
|
|
97
|
-
"mtime": "2026-07-
|
|
98
|
-
"size":
|
|
99
|
-
"path": "../public/assets/
|
|
89
|
+
"etag": '"512fd-NMWv1O63GXKR1aIbooHc2pwfyu4"',
|
|
90
|
+
"mtime": "2026-07-06T01:51:49.827Z",
|
|
91
|
+
"size": 332541,
|
|
92
|
+
"path": "../public/assets/main-ZhxhOCmF.js"
|
|
100
93
|
},
|
|
101
|
-
"/assets/
|
|
94
|
+
"/assets/ReplayDialog-D9I9W9n3.js": {
|
|
102
95
|
"type": "text/javascript; charset=utf-8",
|
|
103
|
-
"etag": '"
|
|
104
|
-
"mtime": "2026-07-
|
|
105
|
-
"size":
|
|
106
|
-
"path": "../public/assets/
|
|
96
|
+
"etag": '"31d6-YQGi7nwdceaOJuIfsN92yj+6Fyo"',
|
|
97
|
+
"mtime": "2026-07-06T01:51:49.827Z",
|
|
98
|
+
"size": 12758,
|
|
99
|
+
"path": "../public/assets/ReplayDialog-D9I9W9n3.js"
|
|
107
100
|
},
|
|
108
|
-
"/assets/
|
|
101
|
+
"/assets/RequestAnatomy-DGXK_Rii.js": {
|
|
109
102
|
"type": "text/javascript; charset=utf-8",
|
|
110
|
-
"etag": '"
|
|
111
|
-
"mtime": "2026-07-
|
|
112
|
-
"size":
|
|
113
|
-
"path": "../public/assets/
|
|
103
|
+
"etag": '"43f2-30DhTBpZpd4MA5WZnZbfkIQBryQ"',
|
|
104
|
+
"mtime": "2026-07-06T01:51:49.827Z",
|
|
105
|
+
"size": 17394,
|
|
106
|
+
"path": "../public/assets/RequestAnatomy-DGXK_Rii.js"
|
|
114
107
|
},
|
|
115
108
|
"/assets/zhipuai-BPNAnxo-.svg": {
|
|
116
109
|
"type": "image/svg+xml",
|
|
117
110
|
"etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
|
|
118
|
-
"mtime": "2026-07-
|
|
111
|
+
"mtime": "2026-07-06T01:51:49.827Z",
|
|
119
112
|
"size": 11256,
|
|
120
113
|
"path": "../public/assets/zhipuai-BPNAnxo-.svg"
|
|
121
114
|
},
|
|
122
|
-
"/assets/_sessionId-
|
|
115
|
+
"/assets/_sessionId-CTpCHdFh.js": {
|
|
123
116
|
"type": "text/javascript; charset=utf-8",
|
|
124
|
-
"etag": '"d2-
|
|
125
|
-
"mtime": "2026-07-
|
|
117
|
+
"etag": '"d2-diSV3Oay0m0yeVjsrN5VohJjP9I"',
|
|
118
|
+
"mtime": "2026-07-06T01:51:49.827Z",
|
|
126
119
|
"size": 210,
|
|
127
|
-
"path": "../public/assets/_sessionId-
|
|
120
|
+
"path": "../public/assets/_sessionId-CTpCHdFh.js"
|
|
128
121
|
},
|
|
129
|
-
"/assets/
|
|
122
|
+
"/assets/StreamingChunkSequence-i3DM5IKL.js": {
|
|
130
123
|
"type": "text/javascript; charset=utf-8",
|
|
131
|
-
"etag": '"
|
|
132
|
-
"mtime": "2026-07-
|
|
133
|
-
"size":
|
|
134
|
-
"path": "../public/assets/
|
|
124
|
+
"etag": '"dd6-sm8l2L9t4HNm1wckJccvuzIjumw"',
|
|
125
|
+
"mtime": "2026-07-06T01:51:49.827Z",
|
|
126
|
+
"size": 3542,
|
|
127
|
+
"path": "../public/assets/StreamingChunkSequence-i3DM5IKL.js"
|
|
135
128
|
},
|
|
136
129
|
"/assets/qwen-CONDcHqt.png": {
|
|
137
130
|
"type": "image/png",
|
|
138
131
|
"etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
|
|
139
|
-
"mtime": "2026-07-
|
|
132
|
+
"mtime": "2026-07-06T01:51:49.827Z",
|
|
140
133
|
"size": 357059,
|
|
141
134
|
"path": "../public/assets/qwen-CONDcHqt.png"
|
|
142
135
|
},
|
|
143
|
-
"/assets/
|
|
136
|
+
"/assets/ResponseView-df_JzwsS.js": {
|
|
137
|
+
"type": "text/javascript; charset=utf-8",
|
|
138
|
+
"etag": '"3fbb-RyW55oha8FJPVc7LwVVvqDHbS2w"',
|
|
139
|
+
"mtime": "2026-07-06T01:51:49.827Z",
|
|
140
|
+
"size": 16315,
|
|
141
|
+
"path": "../public/assets/ResponseView-df_JzwsS.js"
|
|
142
|
+
},
|
|
143
|
+
"/assets/ProxyViewerContainer-DbWjc_BE.js": {
|
|
144
144
|
"type": "text/javascript; charset=utf-8",
|
|
145
|
-
"etag": '"
|
|
146
|
-
"mtime": "2026-07-
|
|
147
|
-
"size":
|
|
148
|
-
"path": "../public/assets/ProxyViewerContainer-
|
|
145
|
+
"etag": '"ae33a-hp/EgU9Iy8Orpyt/O1Z4ej99Zjo"',
|
|
146
|
+
"mtime": "2026-07-06T01:51:49.827Z",
|
|
147
|
+
"size": 713530,
|
|
148
|
+
"path": "../public/assets/ProxyViewerContainer-DbWjc_BE.js"
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
151
|
function readAsset(id) {
|
package/README.md
CHANGED
|
@@ -6,7 +6,8 @@ The npm package and CLI remain `agent-inspector`; the platform name is Agent Ins
|
|
|
6
6
|
|
|
7
7
|
## What It Does
|
|
8
8
|
|
|
9
|
-
- Runs a local transparent proxy for Anthropic and OpenAI-compatible APIs
|
|
9
|
+
- Runs a local transparent proxy for Anthropic and OpenAI-compatible APIs, including OpenAI Chat
|
|
10
|
+
Completions and Responses paths.
|
|
10
11
|
- Captures model requests, responses, tool definitions, token usage, and errors.
|
|
11
12
|
- Provides a web UI for browsing sessions and logs in real time.
|
|
12
13
|
- Exposes sessions, logs, runs, and evidence packs through MCP Tools, Resources, and Prompts.
|
|
@@ -125,7 +126,19 @@ Then point an AI coding tool at the proxy:
|
|
|
125
126
|
ANTHROPIC_BASE_URL=http://localhost:25947/proxy <tool>
|
|
126
127
|
```
|
|
127
128
|
|
|
128
|
-
The web UI runs at http://localhost:25947.
|
|
129
|
+
The web UI runs at http://localhost:25947. The public proxy endpoint is also
|
|
130
|
+
`http://localhost:25947/proxy`; internally Agent Inspector may run the app on a private helper port,
|
|
131
|
+
but AI tools should use the public URL printed by the CLI.
|
|
132
|
+
|
|
133
|
+
For Codex-style OpenAI Responses clients, configure the proxy as an OpenAI-compatible `/v1` base:
|
|
134
|
+
|
|
135
|
+
```toml
|
|
136
|
+
model_provider = "agent-inspector"
|
|
137
|
+
|
|
138
|
+
[model_providers."agent-inspector"]
|
|
139
|
+
base_url = "http://127.0.0.1:25947/proxy/v1"
|
|
140
|
+
wire_api = "responses"
|
|
141
|
+
```
|
|
129
142
|
|
|
130
143
|
## Documentation Map
|
|
131
144
|
|
|
@@ -166,6 +179,48 @@ can also set `AGENT_INSPECTOR_MODE=full` or
|
|
|
166
179
|
`AGENT_INSPECTOR_CAPTURE_MODE=full`; the CLI flag takes precedence over the
|
|
167
180
|
environment.
|
|
168
181
|
|
|
182
|
+
## Provider URLs And Responses
|
|
183
|
+
|
|
184
|
+
Provider URL fields are base URLs. The UI shows the immutable API suffix next to each input and a
|
|
185
|
+
`Final URL` preview beneath it, using the same upstream URL builder that the proxy uses at runtime.
|
|
186
|
+
This makes path mistakes visible before saving the Provider.
|
|
187
|
+
|
|
188
|
+
| Provider field | Enter this kind of base URL | Runtime suffix |
|
|
189
|
+
| --- | --- | --- |
|
|
190
|
+
| Anthropic Base URL | `https://api.anthropic.com` | `/v1/messages` |
|
|
191
|
+
| OpenAI Chat Base URL | `https://api.openai.com` | `/v1/chat/completions` |
|
|
192
|
+
| OpenAI Responses Base URL | `https://api.openai.com` | `/v1/responses` |
|
|
193
|
+
|
|
194
|
+
Existing configurations that already store a full endpoint stay compatible. For example,
|
|
195
|
+
`https://api.minimaxi.com/v1/responses` remains exactly that for Responses requests; Agent Inspector
|
|
196
|
+
does not append `/v1/responses` a second time. Bases that already end in `/v1` also avoid `/v1/v1`
|
|
197
|
+
duplication.
|
|
198
|
+
|
|
199
|
+
MiniMax supports both OpenAI-compatible endpoints:
|
|
200
|
+
|
|
201
|
+
```text
|
|
202
|
+
https://api.minimaxi.com/v1/chat/completions
|
|
203
|
+
https://api.minimaxi.com/v1/responses
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
In the Provider UI, enter `https://api.minimaxi.com` as the OpenAI Chat and OpenAI Responses base;
|
|
207
|
+
the preview will show the final endpoint with the suffix appended. DeepSeek's official API supports
|
|
208
|
+
OpenAI Chat Completions but does not currently expose OpenAI Responses, so leave the Responses URL
|
|
209
|
+
empty for DeepSeek unless you are routing through a compatible gateway.
|
|
210
|
+
|
|
211
|
+
The proxy chooses protocol by request path, not by Provider name:
|
|
212
|
+
|
|
213
|
+
| Client-facing path | Parsed as |
|
|
214
|
+
| --- | --- |
|
|
215
|
+
| `/proxy/v1/messages` | Anthropic |
|
|
216
|
+
| `/proxy/v1/chat/completions` | OpenAI Chat Completions |
|
|
217
|
+
| `/proxy/v1/responses` | OpenAI Responses |
|
|
218
|
+
|
|
219
|
+
Provider Test runs configured endpoints independently: Anthropic, OpenAI Chat Completions, and
|
|
220
|
+
OpenAI Responses each get separate non-streaming and streaming probes. Test evidence is written into
|
|
221
|
+
a provider-specific Session so the UI can show which exact path, payload shape, status code, and
|
|
222
|
+
upstream URL failed.
|
|
223
|
+
|
|
169
224
|
## MCP Evidence Workflows
|
|
170
225
|
|
|
171
226
|
Agent Inspector exposes MCP at:
|
package/package.json
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type ServerOutputFilterContext = {
|
|
2
|
+
enableIdentityProxy: boolean;
|
|
3
|
+
publicPort: number;
|
|
4
|
+
upstreamPort: number;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export function shouldSuppressServerOutputLine(
|
|
8
|
+
line: string,
|
|
9
|
+
context: ServerOutputFilterContext,
|
|
10
|
+
): boolean {
|
|
11
|
+
if (!context.enableIdentityProxy) return false;
|
|
12
|
+
if (context.publicPort === context.upstreamPort) return false;
|
|
13
|
+
|
|
14
|
+
const lowerLine = line.toLowerCase();
|
|
15
|
+
return lowerLine.includes("listening on") && lowerLine.includes(`:${context.upstreamPort}`);
|
|
16
|
+
}
|
package/src/cli.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { Buffer } from "node:buffer";
|
|
2
3
|
import { spawn, execSync, type ChildProcess } from "node:child_process";
|
|
3
4
|
import { createConnection } from "node:net";
|
|
4
5
|
import { fileURLToPath } from "node:url";
|
|
5
6
|
import { dirname, join, resolve as resolvePath } from "node:path";
|
|
6
7
|
import { existsSync } from "node:fs";
|
|
8
|
+
import type { Readable, Writable } from "node:stream";
|
|
7
9
|
import {
|
|
8
10
|
formatAccessHintLines,
|
|
9
11
|
isValidBindHost,
|
|
@@ -12,6 +14,10 @@ import {
|
|
|
12
14
|
probeHostForBindHost,
|
|
13
15
|
urlForHost,
|
|
14
16
|
} from "./cli/networkHints.js";
|
|
17
|
+
import {
|
|
18
|
+
shouldSuppressServerOutputLine,
|
|
19
|
+
type ServerOutputFilterContext,
|
|
20
|
+
} from "./cli/startupOutput.js";
|
|
15
21
|
import { startIdentityProxy } from "./proxy/identityProxy.js";
|
|
16
22
|
|
|
17
23
|
const __filename = fileURLToPath(import.meta.url);
|
|
@@ -167,6 +173,38 @@ function waitForProcessExit(child: ChildProcess): Promise<number> {
|
|
|
167
173
|
});
|
|
168
174
|
}
|
|
169
175
|
|
|
176
|
+
function pipeServerOutput(child: ChildProcess, context: ServerOutputFilterContext): void {
|
|
177
|
+
pipeServerOutputStream(child.stdout, process.stdout, context);
|
|
178
|
+
pipeServerOutputStream(child.stderr, process.stderr, context);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function pipeServerOutputStream(
|
|
182
|
+
stream: Readable | null,
|
|
183
|
+
target: Writable,
|
|
184
|
+
context: ServerOutputFilterContext,
|
|
185
|
+
): void {
|
|
186
|
+
if (stream === null) return;
|
|
187
|
+
|
|
188
|
+
let buffered = "";
|
|
189
|
+
stream.on("data", (chunk: unknown) => {
|
|
190
|
+
const text = Buffer.isBuffer(chunk) ? chunk.toString("utf8") : String(chunk);
|
|
191
|
+
const lines = `${buffered}${text}`.split(/\r?\n/);
|
|
192
|
+
buffered = lines.pop() ?? "";
|
|
193
|
+
for (const line of lines) {
|
|
194
|
+
if (!shouldSuppressServerOutputLine(line, context)) {
|
|
195
|
+
target.write(`${line}\n`);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
stream.on("end", () => {
|
|
200
|
+
if (buffered.length === 0) return;
|
|
201
|
+
if (!shouldSuppressServerOutputLine(buffered, context)) {
|
|
202
|
+
target.write(buffered);
|
|
203
|
+
}
|
|
204
|
+
buffered = "";
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
170
208
|
type ServerCommand = {
|
|
171
209
|
command: string;
|
|
172
210
|
args: string[];
|
|
@@ -485,10 +523,14 @@ async function runStart(args: string[]): Promise<void> {
|
|
|
485
523
|
}
|
|
486
524
|
|
|
487
525
|
if (forceRestart) {
|
|
488
|
-
|
|
526
|
+
const restartPorts = new Set<number>();
|
|
527
|
+
restartPorts.add(port);
|
|
489
528
|
if (enableIdentityProxy) {
|
|
490
|
-
|
|
491
|
-
|
|
529
|
+
restartPorts.add(identityProxyPort);
|
|
530
|
+
restartPorts.add(upstreamPort);
|
|
531
|
+
}
|
|
532
|
+
for (const targetPort of restartPorts) {
|
|
533
|
+
killProcessOnPort(targetPort);
|
|
492
534
|
}
|
|
493
535
|
}
|
|
494
536
|
|
|
@@ -554,11 +596,18 @@ async function runStart(args: string[]): Promise<void> {
|
|
|
554
596
|
}
|
|
555
597
|
serverEnv["AGENT_INSPECTOR_CAPTURE_MODE"] = captureMode;
|
|
556
598
|
const serverProcess = spawn(serverCommand.command, serverCommand.args, {
|
|
557
|
-
stdio: background ? ["ignore", "ignore", "ignore"] : "
|
|
599
|
+
stdio: background ? ["ignore", "ignore", "ignore"] : ["ignore", "pipe", "pipe"],
|
|
558
600
|
detached: background,
|
|
559
601
|
env: serverEnv,
|
|
560
602
|
windowsHide: background,
|
|
561
603
|
});
|
|
604
|
+
if (!background) {
|
|
605
|
+
pipeServerOutput(serverProcess, {
|
|
606
|
+
enableIdentityProxy,
|
|
607
|
+
publicPort: port,
|
|
608
|
+
upstreamPort,
|
|
609
|
+
});
|
|
610
|
+
}
|
|
562
611
|
|
|
563
612
|
// Identity proxy — a native Node HTTP server that sits in front of
|
|
564
613
|
// TanStack Start and looks up each client's PID via the OS connection
|
|
@@ -597,20 +646,17 @@ async function runStart(args: string[]): Promise<void> {
|
|
|
597
646
|
return;
|
|
598
647
|
}
|
|
599
648
|
|
|
649
|
+
if (identityProxy !== null) {
|
|
650
|
+
console.log(``);
|
|
651
|
+
console.log(`Identity proxy ready at ${url} (PID-attributing public entrypoint).`);
|
|
652
|
+
if (upstreamPort !== port) {
|
|
653
|
+
console.log(` Internal runtime port ${upstreamPort} is hidden behind the public proxy.`);
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
|
|
600
657
|
process.exitCode = await waitForProcessExit(serverProcess);
|
|
601
658
|
|
|
602
|
-
// Foreground path: print the smart-port hint now that the proxy is up,
|
|
603
|
-
// then keep the proxy alive until the server exits.
|
|
604
659
|
if (identityProxy !== null) {
|
|
605
|
-
console.log(
|
|
606
|
-
``,
|
|
607
|
-
`Identity proxy is listening on port ${identityProxyPort}:`,
|
|
608
|
-
` Route AI coding tools through the identity proxy for accurate PID attribution:`,
|
|
609
|
-
` Claude Code: ANTHROPIC_BASE_URL=http://localhost:${identityProxyPort}/proxy claude`,
|
|
610
|
-
` OpenCode: LLM_BASE_URL=http://localhost:${identityProxyPort}/proxy opencode`,
|
|
611
|
-
` MiMo Code: OPENAI_BASE_URL=http://localhost:${identityProxyPort}/proxy mimo`,
|
|
612
|
-
` Direct port ${port} still works (falls back to OS-scan heuristic).`,
|
|
613
|
-
);
|
|
614
660
|
await new Promise<void>((resolve) => identityProxy.close(() => resolve()));
|
|
615
661
|
}
|
|
616
662
|
}
|