@tonyclaw/agent-inspector 3.0.7 → 3.0.9

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 (73) hide show
  1. package/.output/cli.js +245 -171
  2. package/.output/nitro.json +1 -1
  3. package/.output/public/assets/{CompareDrawer-C0Kbsm-Q.js → CompareDrawer-CJKL4LMm.js} +1 -1
  4. package/.output/public/assets/ProxyViewerContainer-DBUy29O-.js +106 -0
  5. package/.output/public/assets/ReplayDialog-BYanl-a_.js +1 -0
  6. package/.output/public/assets/{RequestAnatomy-fa0JXy5p.js → RequestAnatomy-DvPz1jqE.js} +1 -1
  7. package/.output/public/assets/ResponseView-sZnxp9GN.js +3 -0
  8. package/.output/public/assets/StreamingChunkSequence-G-tiYiBd.js +1 -0
  9. package/.output/public/assets/{_sessionId-D5fYH2C0.js → _sessionId-_hDcsmXq.js} +1 -1
  10. package/.output/public/assets/agent-inspector-58K1_MsC.ico +0 -0
  11. package/.output/public/assets/index-DAPAWsAd.js +1 -0
  12. package/.output/public/assets/index-DspnLqUW.css +1 -0
  13. package/.output/public/assets/{index-BEsqvywM.js → index-SuOSQb2_.js} +1 -1
  14. package/.output/public/assets/{json-viewer-B0QRbMSf.js → json-viewer-yQdhgjaw.js} +1 -1
  15. package/.output/public/assets/{main-CuKZD7n0.js → main-CgjcDxjR.js} +2 -2
  16. package/.output/server/_libs/radix-ui__react-dialog.mjs +2 -2
  17. package/.output/server/{_sessionId-DdBTK3qm.mjs → _sessionId-BGISf2En.mjs} +3 -3
  18. package/.output/server/_ssr/{CompareDrawer-m82cVZ73.mjs → CompareDrawer-s-UF9gW3.mjs} +2 -2
  19. package/.output/server/_ssr/{ProxyViewerContainer-7geuf78f.mjs → ProxyViewerContainer-C0Sbz9ED.mjs} +1033 -530
  20. package/.output/server/_ssr/{ReplayDialog-B8RlWLLH.mjs → ReplayDialog-DvS8gvJr.mjs} +58 -23
  21. package/.output/server/_ssr/{RequestAnatomy-BE7pmwpv.mjs → RequestAnatomy-BwhWglJL.mjs} +2 -2
  22. package/.output/server/_ssr/{ResponseView-D-sDsdQr.mjs → ResponseView-wBVreqQf.mjs} +2 -2
  23. package/.output/server/_ssr/{StreamingChunkSequence-DU_hThJr.mjs → StreamingChunkSequence-Dr6eg-MJ.mjs} +30 -20
  24. package/.output/server/_ssr/{index-D0sV8UbE.mjs → index-B98Wia1X.mjs} +2 -2
  25. package/.output/server/_ssr/index.mjs +2 -2
  26. package/.output/server/_ssr/{json-viewer-CaDh1zrw.mjs → json-viewer-D7L8y0FH.mjs} +2 -2
  27. package/.output/server/_ssr/{router-Zh2iZ_u0.mjs → router-g9mo0nWT.mjs} +459 -196
  28. package/.output/server/_tanstack-start-manifest_v-CbGc-o50.mjs +4 -0
  29. package/.output/server/index.mjs +76 -69
  30. package/package.json +1 -1
  31. package/src/assets/IDE/opencode.svg +1 -1
  32. package/src/assets/IDE/xiaomimimo.svg +1 -1
  33. package/src/cli/detect-tools.ts +2 -27
  34. package/src/cli/templates/codex-skill-onboard.ts +1 -1
  35. package/src/cli/templates/skill-onboard.ts +2 -3
  36. package/src/cli.ts +9 -86
  37. package/src/components/ProxyViewer.tsx +249 -37
  38. package/src/components/ProxyViewerContainer.tsx +167 -22
  39. package/src/components/clients/ClientLogo.tsx +38 -3
  40. package/src/components/ecosystem/AgentLabDialog.tsx +204 -3
  41. package/src/components/groups/GroupsDialog.tsx +28 -40
  42. package/src/components/providers/ImportWizardDialog.tsx +51 -101
  43. package/src/components/providers/ProvidersPanel.tsx +82 -68
  44. package/src/components/providers/SettingsDialog.tsx +11 -12
  45. package/src/components/proxy-viewer/AgentTraceSummary.tsx +15 -23
  46. package/src/components/proxy-viewer/ReplayDialog.tsx +65 -22
  47. package/src/components/proxy-viewer/StreamingChunkSequence.tsx +33 -20
  48. package/src/components/proxy-viewer/TurnGroup.tsx +0 -16
  49. package/src/components/proxy-viewer/log-formats/anthropic.ts +5 -5
  50. package/src/components/proxy-viewer/log-formats/openai.ts +7 -10
  51. package/src/components/proxy-viewer/requestTools.ts +5 -2
  52. package/src/lib/apiClient.ts +43 -10
  53. package/src/lib/ecosystemContract.ts +32 -0
  54. package/src/lib/export-logs.ts +37 -3
  55. package/src/proxy/ecosystemRegistry.ts +244 -0
  56. package/src/proxy/ecosystemTasks.ts +153 -0
  57. package/src/proxy/platformCommands.ts +212 -0
  58. package/src/proxy/socketTracker.ts +84 -143
  59. package/src/routes/api/ecosystem.packages.$packageId.help.ts +16 -0
  60. package/src/routes/api/ecosystem.packages.$packageId.install.ts +16 -0
  61. package/src/routes/api/ecosystem.packages.$packageId.runner-presets.ts +19 -0
  62. package/src/routes/api/ecosystem.packages.$packageId.upgrade.ts +16 -0
  63. package/src/routes/api/ecosystem.packages.ts +1 -248
  64. package/src/routes/api/ecosystem.tasks.$taskId.ts +16 -0
  65. package/src/routes/api/ecosystem.tasks.ts +12 -0
  66. package/src/routes/api/providers.$providerId.test.log.ts +28 -24
  67. package/.output/public/assets/ProxyViewerContainer-p-rpYyiF.js +0 -106
  68. package/.output/public/assets/ReplayDialog-CM3dhP8v.js +0 -1
  69. package/.output/public/assets/ResponseView-Bq6sC7Ay.js +0 -3
  70. package/.output/public/assets/StreamingChunkSequence-CGOun3Df.js +0 -1
  71. package/.output/public/assets/index-C29Olfzt.js +0 -1
  72. package/.output/public/assets/index-DgANE0r3.css +0 -1
  73. package/.output/server/_tanstack-start-manifest_v-LCE-2AaF.mjs +0 -4
@@ -0,0 +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/ecosystem/packages", "/api/ecosystem/tasks", "/api/knowledge/candidates", "/api/knowledge/project-context", "/api/knowledge/search", "/api/knowledge/sessions/$sessionId/candidates"], "preloads": ["/assets/main-CgjcDxjR.js"], "assets": [] }, "/": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", "assets": [], "preloads": ["/assets/index-DAPAWsAd.js", "/assets/ProxyViewerContainer-DBUy29O-.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-_hDcsmXq.js", "/assets/ProxyViewerContainer-DBUy29O-.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/ecosystem/packages": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/ecosystem.packages.ts", "children": ["/api/ecosystem/packages/$packageId/help", "/api/ecosystem/packages/$packageId/install", "/api/ecosystem/packages/$packageId/runner-presets", "/api/ecosystem/packages/$packageId/upgrade"] }, "/api/ecosystem/tasks": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/ecosystem.tasks.ts", "children": ["/api/ecosystem/tasks/$taskId"] }, "/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/ecosystem/tasks/$taskId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/ecosystem.tasks.$taskId.ts" }, "/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/ecosystem/packages/$packageId/help": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/ecosystem.packages.$packageId.help.ts" }, "/api/ecosystem/packages/$packageId/install": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/ecosystem.packages.$packageId.install.ts" }, "/api/ecosystem/packages/$packageId/runner-presets": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/ecosystem.packages.$packageId.runner-presets.ts" }, "/api/ecosystem/packages/$packageId/upgrade": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/ecosystem.packages.$packageId.upgrade.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-CgjcDxjR.js" });
2
+ export {
3
+ tsrStartManifest
4
+ };
@@ -35,117 +35,124 @@ const headers = ((m) => function headersRouteRule(event) {
35
35
  }
36
36
  });
37
37
  const assets = {
38
+ "/assets/agent-inspector-58K1_MsC.ico": {
39
+ "type": "image/vnd.microsoft.icon",
40
+ "etag": '"38fa-ZD8kPABHYjPIkcH82FMY6iZM7fI"',
41
+ "mtime": "2026-07-07T07:16:49.136Z",
42
+ "size": 14586,
43
+ "path": "../public/assets/agent-inspector-58K1_MsC.ico"
44
+ },
38
45
  "/assets/alibaba-TTwafVwX.svg": {
39
46
  "type": "image/svg+xml",
40
47
  "etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
41
- "mtime": "2026-07-07T03:30:05.671Z",
48
+ "mtime": "2026-07-07T07:16:49.136Z",
42
49
  "size": 5915,
43
50
  "path": "../public/assets/alibaba-TTwafVwX.svg"
44
51
  },
45
- "/assets/index-C29Olfzt.js": {
52
+ "/assets/index-DAPAWsAd.js": {
46
53
  "type": "text/javascript; charset=utf-8",
47
- "etag": '"74-s+7/jMd3WYqZzQ3XOcigwii5CRc"',
48
- "mtime": "2026-07-07T03:30:05.671Z",
54
+ "etag": '"74-ZZKHhoKO+55DHAA498w0K6Lm4qw"',
55
+ "mtime": "2026-07-07T07:16:49.140Z",
49
56
  "size": 116,
50
- "path": "../public/assets/index-C29Olfzt.js"
51
- },
52
- "/assets/CompareDrawer-C0Kbsm-Q.js": {
53
- "type": "text/javascript; charset=utf-8",
54
- "etag": '"4bc3-3/VJbR0ecEp8fqbT2a5kapBN4fQ"',
55
- "mtime": "2026-07-07T03:30:05.672Z",
56
- "size": 19395,
57
- "path": "../public/assets/CompareDrawer-C0Kbsm-Q.js"
57
+ "path": "../public/assets/index-DAPAWsAd.js"
58
58
  },
59
- "/assets/json-viewer-B0QRbMSf.js": {
59
+ "/assets/json-viewer-yQdhgjaw.js": {
60
60
  "type": "text/javascript; charset=utf-8",
61
- "etag": '"1ae6-HDeKTwqcL77vuf9Xf8Mztpyi9c0"',
62
- "mtime": "2026-07-07T03:30:05.672Z",
61
+ "etag": '"1ae6-/dOqzrafTSuVKqV2HeORzmyl5nQ"',
62
+ "mtime": "2026-07-07T07:16:49.140Z",
63
63
  "size": 6886,
64
- "path": "../public/assets/json-viewer-B0QRbMSf.js"
64
+ "path": "../public/assets/json-viewer-yQdhgjaw.js"
65
65
  },
66
- "/assets/index-BEsqvywM.js": {
66
+ "/assets/minimax-BPMzvuL-.jpeg": {
67
+ "type": "image/jpeg",
68
+ "etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
69
+ "mtime": "2026-07-07T07:16:49.137Z",
70
+ "size": 6918,
71
+ "path": "../public/assets/minimax-BPMzvuL-.jpeg"
72
+ },
73
+ "/assets/index-SuOSQb2_.js": {
67
74
  "type": "text/javascript; charset=utf-8",
68
- "etag": '"1cd2c-4JNStjVbTapY8ZiFdMrGpVJbzaM"',
69
- "mtime": "2026-07-07T03:30:05.672Z",
75
+ "etag": '"1cd2c-fcz/7fAkC94L+5g/O/yTEJNwdLM"',
76
+ "mtime": "2026-07-07T07:16:49.140Z",
70
77
  "size": 118060,
71
- "path": "../public/assets/index-BEsqvywM.js"
78
+ "path": "../public/assets/index-SuOSQb2_.js"
72
79
  },
73
- "/assets/index-DgANE0r3.css": {
74
- "type": "text/css; charset=utf-8",
75
- "etag": '"22822-3pXTBm3VZrblIU9z3J9JDN7tcyw"',
76
- "mtime": "2026-07-07T03:30:05.671Z",
77
- "size": 141346,
78
- "path": "../public/assets/index-DgANE0r3.css"
79
- },
80
- "/assets/main-CuKZD7n0.js": {
80
+ "/assets/ReplayDialog-BYanl-a_.js": {
81
81
  "type": "text/javascript; charset=utf-8",
82
- "etag": '"512fd-5AcmxJQrVhDjQwawGVXebWzVm+8"',
83
- "mtime": "2026-07-07T03:30:05.672Z",
84
- "size": 332541,
85
- "path": "../public/assets/main-CuKZD7n0.js"
82
+ "etag": '"3347-l7JyhtUv5PuwyRFuP/S2WhlW2vA"',
83
+ "mtime": "2026-07-07T07:16:49.140Z",
84
+ "size": 13127,
85
+ "path": "../public/assets/ReplayDialog-BYanl-a_.js"
86
86
  },
87
- "/assets/ReplayDialog-CM3dhP8v.js": {
87
+ "/assets/CompareDrawer-CJKL4LMm.js": {
88
88
  "type": "text/javascript; charset=utf-8",
89
- "etag": '"31d6-9NTEpX75drhjb91rAk+PyzE3Ffs"',
90
- "mtime": "2026-07-07T03:30:05.672Z",
91
- "size": 12758,
92
- "path": "../public/assets/ReplayDialog-CM3dhP8v.js"
89
+ "etag": '"4bc3-xmP76TYJVpRr+vvy+zLDrQtQciY"',
90
+ "mtime": "2026-07-07T07:16:49.140Z",
91
+ "size": 19395,
92
+ "path": "../public/assets/CompareDrawer-CJKL4LMm.js"
93
93
  },
94
- "/assets/minimax-BPMzvuL-.jpeg": {
95
- "type": "image/jpeg",
96
- "etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
97
- "mtime": "2026-07-07T03:30:05.671Z",
98
- "size": 6918,
99
- "path": "../public/assets/minimax-BPMzvuL-.jpeg"
94
+ "/assets/index-DspnLqUW.css": {
95
+ "type": "text/css; charset=utf-8",
96
+ "etag": '"23991-XuDW77lmswcy3Fj+3lAejKbHi7M"',
97
+ "mtime": "2026-07-07T07:16:49.140Z",
98
+ "size": 145809,
99
+ "path": "../public/assets/index-DspnLqUW.css"
100
+ },
101
+ "/assets/main-CgjcDxjR.js": {
102
+ "type": "text/javascript; charset=utf-8",
103
+ "etag": '"512fd-lIDKQ2kW3Kssu+XZYoU7FG3vr/o"',
104
+ "mtime": "2026-07-07T07:16:49.140Z",
105
+ "size": 332541,
106
+ "path": "../public/assets/main-CgjcDxjR.js"
100
107
  },
101
- "/assets/RequestAnatomy-fa0JXy5p.js": {
108
+ "/assets/RequestAnatomy-DvPz1jqE.js": {
102
109
  "type": "text/javascript; charset=utf-8",
103
- "etag": '"43f2-zAYk5x91KzRRJ64tCmBGM0YQM78"',
104
- "mtime": "2026-07-07T03:30:05.672Z",
110
+ "etag": '"43f2-v0SNumN4LRV0ESTSVtpSLFvrw7U"',
111
+ "mtime": "2026-07-07T07:16:49.140Z",
105
112
  "size": 17394,
106
- "path": "../public/assets/RequestAnatomy-fa0JXy5p.js"
113
+ "path": "../public/assets/RequestAnatomy-DvPz1jqE.js"
107
114
  },
108
- "/assets/StreamingChunkSequence-CGOun3Df.js": {
115
+ "/assets/ResponseView-sZnxp9GN.js": {
109
116
  "type": "text/javascript; charset=utf-8",
110
- "etag": '"dd6-uVBRgD1iZ+bzNCittGBxPQnS57s"',
111
- "mtime": "2026-07-07T03:30:05.672Z",
112
- "size": 3542,
113
- "path": "../public/assets/StreamingChunkSequence-CGOun3Df.js"
117
+ "etag": '"47fc-UL48vL9KqYv1bfotBEGotFclCdc"',
118
+ "mtime": "2026-07-07T07:16:49.140Z",
119
+ "size": 18428,
120
+ "path": "../public/assets/ResponseView-sZnxp9GN.js"
114
121
  },
115
122
  "/assets/zhipuai-BPNAnxo-.svg": {
116
123
  "type": "image/svg+xml",
117
124
  "etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
118
- "mtime": "2026-07-07T03:30:05.671Z",
125
+ "mtime": "2026-07-07T07:16:49.136Z",
119
126
  "size": 11256,
120
127
  "path": "../public/assets/zhipuai-BPNAnxo-.svg"
121
128
  },
122
- "/assets/_sessionId-D5fYH2C0.js": {
129
+ "/assets/StreamingChunkSequence-G-tiYiBd.js": {
123
130
  "type": "text/javascript; charset=utf-8",
124
- "etag": '"36c-T0Z2CDujLBhIqkZaWr7QMjUQmLY"',
125
- "mtime": "2026-07-07T03:30:05.672Z",
126
- "size": 876,
127
- "path": "../public/assets/_sessionId-D5fYH2C0.js"
131
+ "etag": '"e95-tlk/fXLPRlYoIMbaCU9ocnm8KuQ"',
132
+ "mtime": "2026-07-07T07:16:49.140Z",
133
+ "size": 3733,
134
+ "path": "../public/assets/StreamingChunkSequence-G-tiYiBd.js"
128
135
  },
129
- "/assets/ResponseView-Bq6sC7Ay.js": {
136
+ "/assets/_sessionId-_hDcsmXq.js": {
130
137
  "type": "text/javascript; charset=utf-8",
131
- "etag": '"47fa-1d2SEiO5LDVauvFaf3awOUXVtu0"',
132
- "mtime": "2026-07-07T03:30:05.672Z",
133
- "size": 18426,
134
- "path": "../public/assets/ResponseView-Bq6sC7Ay.js"
138
+ "etag": '"36c-7689u/S8XCNOa1m8tQB02g3UHs8"',
139
+ "mtime": "2026-07-07T07:16:49.140Z",
140
+ "size": 876,
141
+ "path": "../public/assets/_sessionId-_hDcsmXq.js"
135
142
  },
136
143
  "/assets/qwen-CONDcHqt.png": {
137
144
  "type": "image/png",
138
145
  "etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
139
- "mtime": "2026-07-07T03:30:05.671Z",
146
+ "mtime": "2026-07-07T07:16:49.137Z",
140
147
  "size": 357059,
141
148
  "path": "../public/assets/qwen-CONDcHqt.png"
142
149
  },
143
- "/assets/ProxyViewerContainer-p-rpYyiF.js": {
150
+ "/assets/ProxyViewerContainer-DBUy29O-.js": {
144
151
  "type": "text/javascript; charset=utf-8",
145
- "etag": '"b4a83-phSZuesX9+pumw3nmK0JBX5WjYc"',
146
- "mtime": "2026-07-07T03:30:05.672Z",
147
- "size": 739971,
148
- "path": "../public/assets/ProxyViewerContainer-p-rpYyiF.js"
152
+ "etag": '"b6d05-7MUF7Pf21pXPXLAoeJj+3yw5QQ4"',
153
+ "mtime": "2026-07-07T07:16:49.140Z",
154
+ "size": 748805,
155
+ "path": "../public/assets/ProxyViewerContainer-DBUy29O-.js"
149
156
  }
150
157
  };
151
158
  function readAsset(id) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonyclaw/agent-inspector",
3
- "version": "3.0.7",
3
+ "version": "3.0.9",
4
4
  "type": "module",
5
5
  "description": "Agent observability and knowledge capture layer for AI coding tools.",
6
6
  "license": "MIT",
@@ -1 +1 @@
1
- <svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>opencode</title><path d="M16 6H8v12h8V6zm4 16H4V2h16v20z"></path></svg>
1
+ <svg fill="#7dd3fc" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>OpenCode</title><path d="M16 6H8v12h8V6zm4 16H4V2h16v20z"></path></svg>
@@ -1 +1 @@
1
- <svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>XiaomiMiMo</title><path d="M.958 15.936a.459.459 0 01.459.44v2.729a.46.46 0 01-.918 0v-2.729a.459.459 0 01.459-.44zm4.814-2.035a.46.46 0 01.553.45v4.754a.458.458 0 11-.918 0V15.48L3.74 17.202a.462.462 0 01-.655.016.462.462 0 01-.065-.082L.628 14.67a.459.459 0 01.658-.637l2.124 2.187 2.127-2.188a.46.46 0 01.235-.13zm2.068.004a.46.46 0 01.458.445v4.755a.46.46 0 01-.458.458.459.459 0 01-.458-.458V14.35a.459.459 0 01.458-.445zm1.973 2.014a.46.46 0 01.46.457v2.729a.46.46 0 01-.784.324.46.46 0 01-.134-.324v-2.729a.46.46 0 01.458-.458zm.002-2.045a.458.458 0 01.328.157l2.127 2.19 2.125-2.19a.459.459 0 01.784.318v4.756a.46.46 0 01-.455.458.46.46 0 01-.458-.458V15.48l-1.667 1.723a.46.46 0 01-.65.008l-.005-.005c0-.002-.002-.002-.004-.003l-2.455-2.534a.46.46 0 01-.008-.667.461.461 0 01.338-.128zm6.797 1.206a.46.46 0 01.53.651A1.966 1.966 0 0019.81 18.4a.462.462 0 01.623.18.46.46 0 01-.181.624 2.863 2.863 0 01-1.38.353l-.142-.004a2.88 2.88 0 01-2.393-4.263.461.461 0 01.274-.21zm.864-.931a2.884 2.884 0 013.915 3.914.46.46 0 01-.402.24l-.057-.004a.458.458 0 01-.164-.055.46.46 0 01-.182-.622 1.967 1.967 0 00-2.669-2.67.459.459 0 11-.441-.803zM9.59 6.368c1.481 0 1.696 1.202 1.696 1.654v2.648h-.917v-.432c-.26.346-.792.535-1.36.535-.133 0-1.289-.03-1.384-1.136-.082-.932.675-1.61 2.053-1.61h.691c0-.563-.367-.886-.983-.886-.44.013-.864.174-1.2.458l-.36-.664c.484-.379 1.012-.567 1.764-.567zm4.427.1c1.263 0 2.082.97 2.083 2.15 0 1.181-.824 2.154-2.083 2.154-1.26 0-2.084-.972-2.084-2.152 0-1.18.82-2.153 2.084-2.153zm6.801.015c.68 0 1.202.465 1.197 1.548v2.642H21.1V8.29c0-.312-.002-.98-.63-.98s-.628.667-.628.838v2.524h-.89V8.148c0-.17-.001-.838-.63-.838-.628 0-.628.668-.628.98v2.383h-.917v-4.03h.917V7a1.22 1.22 0 01.947-.516c.398 0 .76.193.982.686a1.321 1.321 0 011.195-.686zm-18.093.872l1.457-1.772H5.32L3.311 8.07l2.14 2.602H4.24L2.725 8.796 1.21 10.672H0L2.138 8.07.13 5.583h1.138l1.458 1.772zm4.149 3.317h-.916V6.644h.916v4.028zm16.99 0h-.916V6.644h.916v4.028zM9.925 8.71c-1.055 0-1.359.412-1.326.742.032.329.324.537.757.537a1.013 1.013 0 001.014-.968l.002-.31h-.447zM14.018 7.3c-.663 0-1.184.487-1.184 1.32 0 .832.52 1.32 1.184 1.32.662 0 1.182-.49 1.182-1.32 0-.832-.52-1.32-1.182-1.32zM6.417 5.001a.568.568 0 01.587.582.588.588 0 01-1.175 0A.57.57 0 016.417 5zm16.991 0a.57.57 0 01.592.582.588.588 0 01-1.174 0 .57.57 0 01.357-.542.572.572 0 01.225-.04z"></path></svg>
1
+ <svg fill="#ff6900" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>MiMo Code</title><path d="M.958 15.936a.459.459 0 01.459.44v2.729a.46.46 0 01-.918 0v-2.729a.459.459 0 01.459-.44zm4.814-2.035a.46.46 0 01.553.45v4.754a.458.458 0 11-.918 0V15.48L3.74 17.202a.462.462 0 01-.655.016.462.462 0 01-.065-.082L.628 14.67a.459.459 0 01.658-.637l2.124 2.187 2.127-2.188a.46.46 0 01.235-.13zm2.068.004a.46.46 0 01.458.445v4.755a.46.46 0 01-.458.458.459.459 0 01-.458-.458V14.35a.459.459 0 01.458-.445zm1.973 2.014a.46.46 0 01.46.457v2.729a.46.46 0 01-.784.324.46.46 0 01-.134-.324v-2.729a.46.46 0 01.458-.458zm.002-2.045a.458.458 0 01.328.157l2.127 2.19 2.125-2.19a.459.459 0 01.784.318v4.756a.46.46 0 01-.455.458.46.46 0 01-.458-.458V15.48l-1.667 1.723a.46.46 0 01-.65.008l-.005-.005c0-.002-.002-.002-.004-.003l-2.455-2.534a.46.46 0 01-.008-.667.461.461 0 01.338-.128zm6.797 1.206a.46.46 0 01.53.651A1.966 1.966 0 0019.81 18.4a.462.462 0 01.623.18.46.46 0 01-.181.624 2.863 2.863 0 01-1.38.353l-.142-.004a2.88 2.88 0 01-2.393-4.263.461.461 0 01.274-.21zm.864-.931a2.884 2.884 0 013.915 3.914.46.46 0 01-.402.24l-.057-.004a.458.458 0 01-.164-.055.46.46 0 01-.182-.622 1.967 1.967 0 00-2.669-2.67.459.459 0 11-.441-.803zM9.59 6.368c1.481 0 1.696 1.202 1.696 1.654v2.648h-.917v-.432c-.26.346-.792.535-1.36.535-.133 0-1.289-.03-1.384-1.136-.082-.932.675-1.61 2.053-1.61h.691c0-.563-.367-.886-.983-.886-.44.013-.864.174-1.2.458l-.36-.664c.484-.379 1.012-.567 1.764-.567zm4.427.1c1.263 0 2.082.97 2.083 2.15 0 1.181-.824 2.154-2.083 2.154-1.26 0-2.084-.972-2.084-2.152 0-1.18.82-2.153 2.084-2.153zm6.801.015c.68 0 1.202.465 1.197 1.548v2.642H21.1V8.29c0-.312-.002-.98-.63-.98s-.628.667-.628.838v2.524h-.89V8.148c0-.17-.001-.838-.63-.838-.628 0-.628.668-.628.98v2.383h-.917v-4.03h.917V7a1.22 1.22 0 01.947-.516c.398 0 .76.193.982.686a1.321 1.321 0 011.195-.686zm-18.093.872l1.457-1.772H5.32L3.311 8.07l2.14 2.602H4.24L2.725 8.796 1.21 10.672H0L2.138 8.07.13 5.583h1.138l1.458 1.772zm4.149 3.317h-.916V6.644h.916v4.028zm16.99 0h-.916V6.644h.916v4.028zM9.925 8.71c-1.055 0-1.359.412-1.326.742.032.329.324.537.757.537a1.013 1.013 0 001.014-.968l.002-.31h-.447zM14.018 7.3c-.663 0-1.184.487-1.184 1.32 0 .832.52 1.32 1.184 1.32.662 0 1.182-.49 1.182-1.32 0-.832-.52-1.32-1.182-1.32zM6.417 5.001a.568.568 0 01.587.582.588.588 0 01-1.175 0A.57.57 0 016.417 5zm16.991 0a.57.57 0 01.592.582.588.588 0 01-1.174 0 .57.57 0 01.357-.542.572.572 0 01.225-.04z"></path></svg>
@@ -10,10 +10,10 @@
10
10
  * `curl` example in that case.
11
11
  */
12
12
 
13
- import { execFileSync } from "node:child_process";
14
13
  import { existsSync } from "node:fs";
15
14
  import { join } from "node:path";
16
15
  import { homedir } from "node:os";
16
+ import { resolveExecutableOnPath } from "../proxy/platformCommands.js";
17
17
 
18
18
  export type DetectedTool = {
19
19
  readonly found: true;
@@ -35,33 +35,8 @@ export type DetectedToolEntry = {
35
35
  readonly result: ToolDetectionResult;
36
36
  };
37
37
 
38
- /**
39
- * Run `command -v <bin>` (bash) or `where <bin>` (cmd) and return the first
40
- * line of stdout. Returns `null` if the binary isn't on PATH. We use the
41
- * platform's own lookup so we don't have to maintain a hard-coded list of
42
- * candidate install dirs.
43
- */
44
38
  function which(bin: string): string | null {
45
- try {
46
- if (process.platform === "win32") {
47
- const out = execFileSync("where", [bin], {
48
- encoding: "utf8",
49
- timeout: 3000,
50
- windowsHide: true,
51
- stdio: ["ignore", "pipe", "ignore"],
52
- });
53
- const first = out.split(/\r?\n/).find((line) => line.trim().length > 0);
54
- return first?.trim() ?? null;
55
- }
56
- const out = execFileSync("sh", ["-c", `command -v ${bin}`], {
57
- encoding: "utf8",
58
- timeout: 3000,
59
- stdio: ["ignore", "pipe", "ignore"],
60
- });
61
- return out.trim() || null;
62
- } catch {
63
- return null;
64
- }
39
+ return resolveExecutableOnPath(bin);
65
40
  }
66
41
 
67
42
  function tryDir(path: string): string | null {
@@ -70,7 +70,7 @@ Test-Path (Join-Path $env:USERPROFILE ".codex\\config.toml")
70
70
  \`\`\`
71
71
 
72
72
  \`\`\`bash
73
- command -v agent-inspector || true
73
+ node -e "const fs=require('node:fs'),p=require('node:path');const names=process.platform==='win32'?['agent-inspector.cmd','agent-inspector.exe','agent-inspector']:['agent-inspector'];const found=(process.env.PATH||'').split(p.delimiter).some(d=>names.some(n=>fs.existsSync(p.join(d,n))));console.log(found?'agent-inspector: present':'agent-inspector: missing')"
74
74
  agent-inspector onboard --status
75
75
  test -d "$HOME/.codex" && echo "codex home: present" || echo "codex home: missing"
76
76
  test -f "$HOME/.codex/config.toml" && echo "config: present" || echo "config: missing"
@@ -208,14 +208,13 @@ if ((Test-Path $projMcp) -and (Select-String -Path $projMcp -Pattern 'agent-insp
208
208
  \`\`\`bash
209
209
  # Unix / macOS / WSL
210
210
  node --version # expect >= 18
211
- command -v claude >/dev/null && echo "claude-code: present" || echo "claude-code: not detected"
211
+ node -e "const fs=require('node:fs'),p=require('node:path');const names=process.platform==='win32'?['claude.cmd','claude.exe','claude']:['claude'];const found=(process.env.PATH||'').split(p.delimiter).some(d=>names.some(n=>fs.existsSync(p.join(d,n))));console.log(found?'claude-code: present':'claude-code: not detected')"
212
212
  \`\`\`
213
213
 
214
214
  \`\`\`powershell
215
215
  # Windows PowerShell — single-quoted so $env: expands correctly
216
216
  node --version # expect >= 18
217
- $null = Get-Command claude -ErrorAction SilentlyContinue
218
- if ($null) { Write-Host 'claude-code: present' } else { Write-Host 'claude-code: not detected' }
217
+ node -e "const fs=require('node:fs'),p=require('node:path');const names=process.platform==='win32'?['claude.cmd','claude.exe','claude']:['claude'];const found=(process.env.PATH||'').split(p.delimiter).some(d=>names.some(n=>fs.existsSync(p.join(d,n))));console.log(found?'claude-code: present':'claude-code: not detected')"
219
218
  \`\`\`
220
219
 
221
220
  > **PAUSE** — if Node is older than 18, ask the user to install a newer version (https://nodejs.org) before continuing. Use \`AskUserQuestion\` with header \`Node version\`.
package/src/cli.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { Buffer } from "node:buffer";
3
- import { spawn, execSync, type ChildProcess } from "node:child_process";
3
+ import { spawn, type ChildProcess } from "node:child_process";
4
4
  import { createConnection } from "node:net";
5
5
  import { fileURLToPath } from "node:url";
6
6
  import { dirname, join, resolve as resolvePath } from "node:path";
@@ -19,6 +19,7 @@ import {
19
19
  type ServerOutputFilterContext,
20
20
  } from "./cli/startupOutput.js";
21
21
  import { startIdentityProxy } from "./proxy/identityProxy.js";
22
+ import { findPidsByPort, killPid, openUrlCommand } from "./proxy/platformCommands.js";
22
23
 
23
24
  const __filename = fileURLToPath(import.meta.url);
24
25
  const __dirname = dirname(__filename);
@@ -134,26 +135,9 @@ async function waitForInspectorHealthy(
134
135
  }
135
136
 
136
137
  function openBrowser(targetUrl: string): void {
137
- let command: string[] | undefined;
138
- // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
139
- switch (process.platform) {
140
- case "darwin":
141
- command = ["open", targetUrl];
142
- break;
143
- case "linux":
144
- command = ["xdg-open", targetUrl];
145
- break;
146
- case "win32":
147
- command = ["cmd", "/c", "start", "", targetUrl];
148
- break;
149
- default:
150
- // Unsupported platform - do nothing
151
- break;
152
- }
153
- if (command === undefined) return;
154
- const [bin, ...cmdArgs] = command;
155
- if (bin === undefined) return;
156
- const browserProcess = spawn(bin, cmdArgs, {
138
+ const command = openUrlCommand(targetUrl);
139
+ if (command === null) return;
140
+ const browserProcess = spawn(command.command, command.args, {
157
141
  stdio: "ignore",
158
142
  detached: true,
159
143
  windowsHide: true,
@@ -444,71 +428,10 @@ async function runStart(args: string[]): Promise<void> {
444
428
  * Check if a port is in use and kill the process using it
445
429
  */
446
430
  function killProcessOnPort(targetPort: number): void {
447
- const platform = process.platform;
448
-
449
- try {
450
- let pids: number[] = [];
451
-
452
- if (platform === "win32") {
453
- // Windows: use netstat to find PID, then taskkill
454
- const output = execSync(`netstat -ano | findstr :${targetPort}`, {
455
- encoding: "utf8",
456
- timeout: 5000,
457
- windowsHide: true,
458
- });
459
- const lines = output.trim().split("\n");
460
- for (const line of lines) {
461
- const parts = line.trim().split(/\s+/);
462
- if (parts.length >= 5) {
463
- const localAddress = parts[1] ?? "";
464
- const pidStr = parts[4] ?? "";
465
- if (localAddress !== "" && pidStr !== "" && localAddress.includes(`:${targetPort}`)) {
466
- const pid = parseInt(pidStr, 10);
467
- if (!isNaN(pid) && pid > 0) {
468
- pids.push(pid);
469
- }
470
- }
471
- }
472
- }
473
- // Remove duplicates
474
- pids = [...new Set(pids)];
475
-
476
- for (const pid of pids) {
477
- try {
478
- console.log(`Killing process ${pid} on port ${targetPort}...`);
479
- execSync(`taskkill /PID ${pid} /F`, {
480
- encoding: "utf8",
481
- timeout: 5000,
482
- windowsHide: true,
483
- });
484
- } catch {
485
- // Process may have already exited
486
- }
487
- }
488
- } else {
489
- // Unix-like: use lsof
490
- const output = execSync(`lsof -ti:${targetPort}`, { encoding: "utf8", timeout: 5000 });
491
- const lines = output.trim().split("\n");
492
- for (const line of lines) {
493
- const pid = parseInt(line.trim(), 10);
494
- if (!isNaN(pid) && pid > 0) {
495
- pids.push(pid);
496
- }
497
- }
498
- // Remove duplicates
499
- pids = [...new Set(pids)];
500
-
501
- for (const pid of pids) {
502
- try {
503
- console.log(`Killing process ${pid} on port ${targetPort}...`);
504
- execSync(`kill -9 ${pid}`, { encoding: "utf8", timeout: 5000 });
505
- } catch {
506
- // Process may have already exited
507
- }
508
- }
509
- }
510
- } catch {
511
- // No process found on port, which is fine
431
+ const pids = findPidsByPort(targetPort);
432
+ for (const pid of pids) {
433
+ console.log(`Killing process ${pid} on port ${targetPort}...`);
434
+ killPid(pid);
512
435
  }
513
436
  }
514
437