@tonyclaw/agent-inspector 3.0.16 → 3.0.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.
Files changed (85) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/{CompareDrawer-BJmxAiM0.js → CompareDrawer-Lx-WeJNC.js} +1 -1
  3. package/.output/public/assets/{ProxyViewerContainer-C40Nig73.js → ProxyViewerContainer-BNehwMI0.js} +31 -31
  4. package/.output/public/assets/{ReplayDialog-CkLdOMJr.js → ReplayDialog-CADaXFPE.js} +1 -1
  5. package/.output/public/assets/{RequestAnatomy-DemOFfSc.js → RequestAnatomy-CGoL8ACh.js} +1 -1
  6. package/.output/public/assets/{ResponseView-9LhpuDo7.js → ResponseView-BSwM1dCH.js} +2 -2
  7. package/.output/public/assets/{StreamingChunkSequence-RRWYBOdz.js → StreamingChunkSequence-qhWtSx3D.js} +1 -1
  8. package/.output/public/assets/{_sessionId-CWEh2Jsn.js → _sessionId-2uq_HB8p.js} +1 -1
  9. package/.output/public/assets/index-BHXN1Fsx.css +1 -0
  10. package/.output/public/assets/{index-Lwir70Rs.js → index-DPc2wzgW.js} +1 -1
  11. package/.output/public/assets/{index-hjNWJZGE.js → index-T0u1foYL.js} +1 -1
  12. package/.output/public/assets/{json-viewer-D8gvbDlB.js → json-viewer-uIwLntt-.js} +1 -1
  13. package/.output/public/assets/{main-ovrz0tyD.js → main-DuFBHsus.js} +2 -2
  14. package/.output/server/_libs/@opentelemetry/semantic-conventions+[...].mjs +2658 -0
  15. package/.output/server/_libs/agent-base.mjs +234 -0
  16. package/.output/server/_libs/anthropic-ai__sdk.mjs +6042 -0
  17. package/.output/server/_libs/atomically.mjs +3 -0
  18. package/.output/server/_libs/base64-js.mjs +102 -0
  19. package/.output/server/_libs/bignumber.js.mjs +1353 -0
  20. package/.output/server/_libs/buffer-equal-constant-time.mjs +38 -0
  21. package/.output/server/_libs/data-uri-to-buffer.mjs +39 -0
  22. package/.output/server/_libs/debug.mjs +547 -0
  23. package/.output/server/_libs/ecdsa-sig-formatter.mjs +162 -0
  24. package/.output/server/_libs/extend.mjs +2 -1
  25. package/.output/server/_libs/fetch-blob.mjs +287 -0
  26. package/.output/server/_libs/formdata-polyfill.mjs +88 -0
  27. package/.output/server/_libs/gaxios.mjs +927 -0
  28. package/.output/server/_libs/gcp-metadata.mjs +322 -0
  29. package/.output/server/_libs/google-auth-library.mjs +6339 -0
  30. package/.output/server/_libs/google-logging-utils.mjs +385 -0
  31. package/.output/server/_libs/google__genai.mjs +18034 -0
  32. package/.output/server/_libs/has-flag.mjs +16 -0
  33. package/.output/server/_libs/https-proxy-agent.mjs +280 -0
  34. package/.output/server/_libs/json-bigint.mjs +413 -0
  35. package/.output/server/_libs/jwa.mjs +233 -0
  36. package/.output/server/_libs/jws.mjs +298 -0
  37. package/.output/server/_libs/lucide-react.mjs +261 -226
  38. package/.output/server/_libs/mariozechner__pi-agent-core.mjs +824 -0
  39. package/.output/server/_libs/mariozechner__pi-ai.mjs +22889 -0
  40. package/.output/server/_libs/mistralai__mistralai.mjs +32045 -0
  41. package/.output/server/_libs/ms.mjs +120 -0
  42. package/.output/server/_libs/node-domexception.mjs +17 -0
  43. package/.output/server/_libs/node-fetch.mjs +1578 -0
  44. package/.output/server/_libs/ohash.mjs +1 -1
  45. package/.output/server/_libs/openai.mjs +6766 -0
  46. package/.output/server/_libs/opentelemetry__api.mjs +1678 -0
  47. package/.output/server/_libs/p-retry.mjs +87 -0
  48. package/.output/server/_libs/partial-json.mjs +244 -0
  49. package/.output/server/_libs/react-dom.mjs +5 -5
  50. package/.output/server/_libs/react-markdown.mjs +2 -2
  51. package/.output/server/_libs/react.mjs +30 -0
  52. package/.output/server/_libs/readable-stream.mjs +5 -5
  53. package/.output/server/_libs/retry.mjs +236 -0
  54. package/.output/server/_libs/safe-buffer.mjs +63 -1
  55. package/.output/server/_libs/srvx.mjs +2 -2
  56. package/.output/server/_libs/supports-color.mjs +108 -0
  57. package/.output/server/_libs/tanstack__router-core.mjs +1 -1
  58. package/.output/server/_libs/typebox.mjs +6596 -0
  59. package/.output/server/_libs/util-deprecate.mjs +2 -2
  60. package/.output/server/_libs/vfile.mjs +2 -2
  61. package/.output/server/_libs/web-streams-polyfill.mjs +4282 -0
  62. package/.output/server/_libs/ws.mjs +3715 -0
  63. package/.output/server/_libs/zod-to-json-schema.mjs +1207 -0
  64. package/.output/server/_libs/zod.mjs +597 -9
  65. package/.output/server/{_sessionId-zI_GFX_7.mjs → _sessionId-DL2JQJwR.mjs} +14 -13
  66. package/.output/server/_ssr/{CompareDrawer-Ckcx1RVu.mjs → CompareDrawer-hPTOTmyU.mjs} +14 -13
  67. package/.output/server/_ssr/{ProxyViewerContainer-BgXewlIr.mjs → ProxyViewerContainer-k0mFaufl.mjs} +153 -87
  68. package/.output/server/_ssr/{ReplayDialog-wx3nDtZn.mjs → ReplayDialog-t6QdwnZh.mjs} +15 -14
  69. package/.output/server/_ssr/{RequestAnatomy-DN80zt0G.mjs → RequestAnatomy-BnvWxyac.mjs} +14 -13
  70. package/.output/server/_ssr/{ResponseView-DD7rTu_l.mjs → ResponseView-BhhozRRl.mjs} +14 -13
  71. package/.output/server/_ssr/{StreamingChunkSequence-DAgz6Vvw.mjs → StreamingChunkSequence-Dl_laTbX.mjs} +14 -13
  72. package/.output/server/_ssr/{index-dcTjp8du.mjs → index-D1-t1D8F.mjs} +13 -12
  73. package/.output/server/_ssr/index.mjs +4 -4
  74. package/.output/server/_ssr/{json-viewer-N2cuzGWR.mjs → json-viewer-D5Lh2yBU.mjs} +14 -13
  75. package/.output/server/_ssr/{router-BfQ0QsD5.mjs → router-DaLFEeWW.mjs} +523 -97
  76. package/.output/server/_tanstack-start-manifest_v-DsSiD2gY.mjs +4 -0
  77. package/.output/server/index.mjs +76 -76
  78. package/package.json +4 -1
  79. package/src/components/ProxyViewer.tsx +3 -0
  80. package/src/components/pi-agent/PiAgentPanel.tsx +204 -0
  81. package/src/lib/piAgentContract.ts +21 -0
  82. package/src/routes/api/pi-agent.ts +29 -0
  83. package/src/services/piAgent.ts +390 -0
  84. package/.output/public/assets/index-HRfrFVYw.css +0 -1
  85. package/.output/server/_tanstack-start-manifest_v-BXnYrbcJ.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/pi-agent", "/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/ecosystem/recipes/$recipeId/run", "/api/knowledge/sessions/$sessionId/candidates"], "preloads": ["/assets/main-DuFBHsus.js"], "assets": [] }, "/": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", "assets": [], "preloads": ["/assets/index-T0u1foYL.js", "/assets/ProxyViewerContainer-BNehwMI0.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/pi-agent": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/pi-agent.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-2uq_HB8p.js", "/assets/ProxyViewerContainer-BNehwMI0.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/ecosystem/recipes/$recipeId/run": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/ecosystem.recipes.$recipeId.run.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-DuFBHsus.js" });
2
+ export {
3
+ tsrStartManifest
4
+ };
@@ -35,124 +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-08T07:49:36.366Z",
42
- "size": 14586,
43
- "path": "../public/assets/agent-inspector-58K1_MsC.ico"
44
- },
45
38
  "/assets/alibaba-TTwafVwX.svg": {
46
39
  "type": "image/svg+xml",
47
40
  "etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
48
- "mtime": "2026-07-08T07:49:36.366Z",
41
+ "mtime": "2026-07-08T08:28:44.111Z",
49
42
  "size": 5915,
50
43
  "path": "../public/assets/alibaba-TTwafVwX.svg"
51
44
  },
52
- "/assets/CompareDrawer-BJmxAiM0.js": {
45
+ "/assets/agent-inspector-58K1_MsC.ico": {
46
+ "type": "image/vnd.microsoft.icon",
47
+ "etag": '"38fa-ZD8kPABHYjPIkcH82FMY6iZM7fI"',
48
+ "mtime": "2026-07-08T08:28:44.111Z",
49
+ "size": 14586,
50
+ "path": "../public/assets/agent-inspector-58K1_MsC.ico"
51
+ },
52
+ "/assets/CompareDrawer-Lx-WeJNC.js": {
53
53
  "type": "text/javascript; charset=utf-8",
54
- "etag": '"4bc3-0wNiqSedtdnKziZpUMnGfe9RDIg"',
55
- "mtime": "2026-07-08T07:49:36.366Z",
54
+ "etag": '"4bc3-tbu6Xh1vBvYDoKpIc4DM4rksx3Y"',
55
+ "mtime": "2026-07-08T08:28:44.111Z",
56
56
  "size": 19395,
57
- "path": "../public/assets/CompareDrawer-BJmxAiM0.js"
57
+ "path": "../public/assets/CompareDrawer-Lx-WeJNC.js"
58
58
  },
59
- "/assets/index-hjNWJZGE.js": {
59
+ "/assets/index-T0u1foYL.js": {
60
60
  "type": "text/javascript; charset=utf-8",
61
- "etag": '"264-F7Ue2VftEtRHLW5sYg77WtMLlaY"',
62
- "mtime": "2026-07-08T07:49:36.366Z",
61
+ "etag": '"264-h0V4RQjClTku18FOwNfcV0YtjQQ"',
62
+ "mtime": "2026-07-08T08:28:44.111Z",
63
63
  "size": 612,
64
- "path": "../public/assets/index-hjNWJZGE.js"
64
+ "path": "../public/assets/index-T0u1foYL.js"
65
+ },
66
+ "/assets/json-viewer-uIwLntt-.js": {
67
+ "type": "text/javascript; charset=utf-8",
68
+ "etag": '"1ae6-cD2tWuizuTOPAPpUEGSuMcAzEZE"',
69
+ "mtime": "2026-07-08T08:28:44.112Z",
70
+ "size": 6886,
71
+ "path": "../public/assets/json-viewer-uIwLntt-.js"
65
72
  },
66
73
  "/assets/minimax-BPMzvuL-.jpeg": {
67
74
  "type": "image/jpeg",
68
75
  "etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
69
- "mtime": "2026-07-08T07:49:36.366Z",
76
+ "mtime": "2026-07-08T08:28:44.111Z",
70
77
  "size": 6918,
71
78
  "path": "../public/assets/minimax-BPMzvuL-.jpeg"
72
79
  },
73
- "/assets/json-viewer-D8gvbDlB.js": {
74
- "type": "text/javascript; charset=utf-8",
75
- "etag": '"1ae6-3l17L5m8Gkm6hdHoj4wm+hPh1pE"',
76
- "mtime": "2026-07-08T07:49:36.368Z",
77
- "size": 6886,
78
- "path": "../public/assets/json-viewer-D8gvbDlB.js"
80
+ "/assets/index-BHXN1Fsx.css": {
81
+ "type": "text/css; charset=utf-8",
82
+ "etag": '"25b0d-UyzOlNKIaucQXEUHv/FUiQk9+WM"',
83
+ "mtime": "2026-07-08T08:28:44.111Z",
84
+ "size": 154381,
85
+ "path": "../public/assets/index-BHXN1Fsx.css"
79
86
  },
80
- "/assets/index-Lwir70Rs.js": {
87
+ "/assets/RequestAnatomy-CGoL8ACh.js": {
81
88
  "type": "text/javascript; charset=utf-8",
82
- "etag": '"1cd2c-uOY1+bLxcnzq9lK94Y24ff4tgfg"',
83
- "mtime": "2026-07-08T07:49:36.368Z",
84
- "size": 118060,
85
- "path": "../public/assets/index-Lwir70Rs.js"
89
+ "etag": '"43f2-3yCxwsYxkh4fRuvNcu0N2yWYmoA"',
90
+ "mtime": "2026-07-08T08:28:44.112Z",
91
+ "size": 17394,
92
+ "path": "../public/assets/RequestAnatomy-CGoL8ACh.js"
86
93
  },
87
- "/assets/main-ovrz0tyD.js": {
94
+ "/assets/index-DPc2wzgW.js": {
88
95
  "type": "text/javascript; charset=utf-8",
89
- "etag": '"51754-iAsbeZP/dvE+sTlxwVbBwpE2OCs"',
90
- "mtime": "2026-07-08T07:49:36.366Z",
91
- "size": 333652,
92
- "path": "../public/assets/main-ovrz0tyD.js"
96
+ "etag": '"1cd2c-UeDYk+i1ETjZJB+kOwGwo0jEFlw"',
97
+ "mtime": "2026-07-08T08:28:44.112Z",
98
+ "size": 118060,
99
+ "path": "../public/assets/index-DPc2wzgW.js"
93
100
  },
94
- "/assets/RequestAnatomy-DemOFfSc.js": {
101
+ "/assets/ResponseView-BSwM1dCH.js": {
95
102
  "type": "text/javascript; charset=utf-8",
96
- "etag": '"43f2-9HUxPv82UBTGS/J+/q248fOiJxw"',
97
- "mtime": "2026-07-08T07:49:36.366Z",
98
- "size": 17394,
99
- "path": "../public/assets/RequestAnatomy-DemOFfSc.js"
103
+ "etag": '"47fc-bpQkn8z+vA/JeSQA6o3uVrTteds"',
104
+ "mtime": "2026-07-08T08:28:44.112Z",
105
+ "size": 18428,
106
+ "path": "../public/assets/ResponseView-BSwM1dCH.js"
100
107
  },
101
- "/assets/ResponseView-9LhpuDo7.js": {
108
+ "/assets/ReplayDialog-CADaXFPE.js": {
102
109
  "type": "text/javascript; charset=utf-8",
103
- "etag": '"47fc-bHHyCeRZHr2EkGyCARjoaoqYgYg"',
104
- "mtime": "2026-07-08T07:49:36.366Z",
105
- "size": 18428,
106
- "path": "../public/assets/ResponseView-9LhpuDo7.js"
110
+ "etag": '"3347-uFrVkOUPbpSqnn4P2cQiRQFg5dM"',
111
+ "mtime": "2026-07-08T08:28:44.112Z",
112
+ "size": 13127,
113
+ "path": "../public/assets/ReplayDialog-CADaXFPE.js"
107
114
  },
108
- "/assets/StreamingChunkSequence-RRWYBOdz.js": {
115
+ "/assets/StreamingChunkSequence-qhWtSx3D.js": {
109
116
  "type": "text/javascript; charset=utf-8",
110
- "etag": '"e95-UCuCI5JEd/d2GeEjk1HjYYShDFA"',
111
- "mtime": "2026-07-08T07:49:36.368Z",
117
+ "etag": '"e95-sxTbAxYB6Grs18w+Xyj04D+BxcY"',
118
+ "mtime": "2026-07-08T08:28:44.112Z",
112
119
  "size": 3733,
113
- "path": "../public/assets/StreamingChunkSequence-RRWYBOdz.js"
120
+ "path": "../public/assets/StreamingChunkSequence-qhWtSx3D.js"
114
121
  },
115
- "/assets/index-HRfrFVYw.css": {
116
- "type": "text/css; charset=utf-8",
117
- "etag": '"256cc-1u+nmxaQWLqCgRpu+RY8lHvN/Rw"',
118
- "mtime": "2026-07-08T07:49:36.366Z",
119
- "size": 153292,
120
- "path": "../public/assets/index-HRfrFVYw.css"
122
+ "/assets/main-DuFBHsus.js": {
123
+ "type": "text/javascript; charset=utf-8",
124
+ "etag": '"51754-FUzKCD1aGZx7Uxl165jF/GgKtcQ"',
125
+ "mtime": "2026-07-08T08:28:44.111Z",
126
+ "size": 333652,
127
+ "path": "../public/assets/main-DuFBHsus.js"
121
128
  },
122
129
  "/assets/zhipuai-BPNAnxo-.svg": {
123
130
  "type": "image/svg+xml",
124
131
  "etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
125
- "mtime": "2026-07-08T07:49:36.366Z",
132
+ "mtime": "2026-07-08T08:28:44.111Z",
126
133
  "size": 11256,
127
134
  "path": "../public/assets/zhipuai-BPNAnxo-.svg"
128
135
  },
129
- "/assets/_sessionId-CWEh2Jsn.js": {
130
- "type": "text/javascript; charset=utf-8",
131
- "etag": '"36c-oFVb0kCzpHPGDXYQVoJ9vz+KOkM"',
132
- "mtime": "2026-07-08T07:49:36.366Z",
133
- "size": 876,
134
- "path": "../public/assets/_sessionId-CWEh2Jsn.js"
135
- },
136
136
  "/assets/qwen-CONDcHqt.png": {
137
137
  "type": "image/png",
138
138
  "etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
139
- "mtime": "2026-07-08T07:49:36.366Z",
139
+ "mtime": "2026-07-08T08:28:44.111Z",
140
140
  "size": 357059,
141
141
  "path": "../public/assets/qwen-CONDcHqt.png"
142
142
  },
143
- "/assets/ReplayDialog-CkLdOMJr.js": {
143
+ "/assets/_sessionId-2uq_HB8p.js": {
144
144
  "type": "text/javascript; charset=utf-8",
145
- "etag": '"3347-6HbaYA2frlBjkCZbszV4OozM1vA"',
146
- "mtime": "2026-07-08T07:49:36.366Z",
147
- "size": 13127,
148
- "path": "../public/assets/ReplayDialog-CkLdOMJr.js"
145
+ "etag": '"36c-Twr2jkpHT9aKqPmu9XD0Wj/28/U"',
146
+ "mtime": "2026-07-08T08:28:44.111Z",
147
+ "size": 876,
148
+ "path": "../public/assets/_sessionId-2uq_HB8p.js"
149
149
  },
150
- "/assets/ProxyViewerContainer-C40Nig73.js": {
150
+ "/assets/ProxyViewerContainer-BNehwMI0.js": {
151
151
  "type": "text/javascript; charset=utf-8",
152
- "etag": '"b9507-EVmqSsSCJV0ZRsDaOUA+xF8g3+E"',
153
- "mtime": "2026-07-08T07:49:36.368Z",
154
- "size": 759047,
155
- "path": "../public/assets/ProxyViewerContainer-C40Nig73.js"
152
+ "etag": '"bab5c-reTrPPm/VKGtnINOhj+7T+0rbb4"',
153
+ "mtime": "2026-07-08T08:28:44.112Z",
154
+ "size": 764764,
155
+ "path": "../public/assets/ProxyViewerContainer-BNehwMI0.js"
156
156
  }
157
157
  };
158
158
  function readAsset(id) {
@@ -180,7 +180,7 @@ const EncodingMap = {
180
180
  br: ".br",
181
181
  zstd: ".zst"
182
182
  };
183
- const _9o1BXV = defineHandler((event) => {
183
+ const _aYWmx5 = defineHandler((event) => {
184
184
  if (event.req.method && !METHODS.has(event.req.method)) {
185
185
  return;
186
186
  }
@@ -252,15 +252,15 @@ const findRouteRules = /* @__PURE__ */ (() => {
252
252
  return r;
253
253
  };
254
254
  })();
255
- const _lazy_c5_ocM = defineLazyEventHandler(() => import("./_chunks/ssr-renderer.mjs"));
255
+ const _lazy_bRSXJB = defineLazyEventHandler(() => import("./_chunks/ssr-renderer.mjs"));
256
256
  const findRoute = /* @__PURE__ */ (() => {
257
- const data = { route: "/**", handler: _lazy_c5_ocM };
257
+ const data = { route: "/**", handler: _lazy_bRSXJB };
258
258
  return ((_m, p) => {
259
259
  return { data, params: { "_": p.slice(1) } };
260
260
  });
261
261
  })();
262
262
  const globalMiddleware = [
263
- toEventHandler(_9o1BXV)
263
+ toEventHandler(_aYWmx5)
264
264
  ].filter(Boolean);
265
265
  const errorHandler$1 = (error, event) => {
266
266
  const res = defaultHandler(error, event);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonyclaw/agent-inspector",
3
- "version": "3.0.16",
3
+ "version": "3.0.17",
4
4
  "type": "module",
5
5
  "description": "Agent observability and knowledge capture layer for AI coding tools.",
6
6
  "license": "MIT",
@@ -69,6 +69,9 @@
69
69
  "ladle:build": "ladle build"
70
70
  },
71
71
  "dependencies": {
72
+ "@mariozechner/pi-agent-core": "^0.73.1",
73
+ "@mariozechner/pi-ai": "^0.73.1",
74
+ "@mariozechner/pi-coding-agent": "^0.73.1",
72
75
  "@modelcontextprotocol/server": "^2.0.0-alpha.2",
73
76
  "@radix-ui/react-dialog": "^1.1.14",
74
77
  "@radix-ui/react-select": "^2.2.6",
@@ -65,6 +65,7 @@ import { AlertsDialog } from "./alerts/AlertsDialog";
65
65
  import { GroupsDialog } from "./groups/GroupsDialog";
66
66
  import { SettingsDialog } from "./providers/SettingsDialog";
67
67
  import { AgentLabDialog } from "./ecosystem/AgentLabDialog";
68
+ import { PiAgentPanel } from "./pi-agent/PiAgentPanel";
68
69
  import { computeCacheTrends } from "./proxy-viewer/cacheTrend";
69
70
  import { LazyCompareDrawer } from "./proxy-viewer/lazy";
70
71
  import { dispatchLogFocusRequest } from "./proxy-viewer/logFocus";
@@ -2398,6 +2399,8 @@ export function ProxyViewer({
2398
2399
  </div>
2399
2400
  </SidebarPanel>
2400
2401
 
2402
+ <PiAgentPanel currentSessionId={labSessionId} logCount={logs.length} />
2403
+
2401
2404
  {hasSessionContext && sessionContextScope !== null && (
2402
2405
  <SessionContextBar
2403
2406
  label={sessionContextScope.label}
@@ -0,0 +1,204 @@
1
+ import { BrainCircuit, Loader2, Send } from "lucide-react";
2
+ import { useMemo, useState, type ChangeEvent, type JSX } from "react";
3
+ import { PiAgentResponseSchema } from "../../lib/piAgentContract";
4
+ import { useProviders } from "../../lib/useProviders";
5
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../ui/select";
6
+
7
+ type PiAgentPanelProps = {
8
+ currentSessionId: string | null;
9
+ logCount: number;
10
+ };
11
+
12
+ const DEFAULT_QUESTION =
13
+ "Analyze the current Inspector session. What looks abnormal, slow, or likely to hang?";
14
+
15
+ function providerSupportsPiAgent(provider: {
16
+ anthropicBaseUrl?: string;
17
+ openaiBaseUrl?: string;
18
+ openaiResponsesBaseUrl?: string;
19
+ }): boolean {
20
+ return (
21
+ provider.openaiResponsesBaseUrl !== undefined ||
22
+ provider.openaiBaseUrl !== undefined ||
23
+ provider.anthropicBaseUrl !== undefined
24
+ );
25
+ }
26
+
27
+ function providerProtocolLabel(provider: {
28
+ anthropicBaseUrl?: string;
29
+ openaiBaseUrl?: string;
30
+ openaiResponsesBaseUrl?: string;
31
+ }): string {
32
+ if (provider.openaiResponsesBaseUrl !== undefined && provider.openaiResponsesBaseUrl !== "") {
33
+ return "Responses";
34
+ }
35
+ if (provider.openaiBaseUrl !== undefined && provider.openaiBaseUrl !== "") {
36
+ return "Chat";
37
+ }
38
+ return "Anthropic";
39
+ }
40
+
41
+ function sortProviderBySource<T extends { name: string; source?: "company" | "personal" }>(
42
+ providers: readonly T[],
43
+ ): T[] {
44
+ return providers.toSorted((left, right) => {
45
+ const leftCompanyRank = left.source === "company" ? 0 : 1;
46
+ const rightCompanyRank = right.source === "company" ? 0 : 1;
47
+ if (leftCompanyRank !== rightCompanyRank) return leftCompanyRank - rightCompanyRank;
48
+ return left.name.localeCompare(right.name);
49
+ });
50
+ }
51
+
52
+ export function PiAgentPanel({ currentSessionId, logCount }: PiAgentPanelProps): JSX.Element {
53
+ const { providers } = useProviders();
54
+ const piProviders = useMemo(
55
+ () => sortProviderBySource(providers.filter(providerSupportsPiAgent)),
56
+ [providers],
57
+ );
58
+ const [question, setQuestion] = useState(DEFAULT_QUESTION);
59
+ const [providerId, setProviderId] = useState<string>("__auto__");
60
+ const [model, setModel] = useState<string>("__auto__");
61
+ const [answer, setAnswer] = useState<string>("");
62
+ const [status, setStatus] = useState<string>("");
63
+ const [loading, setLoading] = useState(false);
64
+
65
+ const selectedProvider = piProviders.find((provider) => provider.id === providerId);
66
+ const modelOptions = selectedProvider?.models ?? [];
67
+ const canAsk = question.trim() !== "" && piProviders.length > 0 && !loading;
68
+
69
+ const handleQuestionChange = (event: ChangeEvent<HTMLTextAreaElement>): void => {
70
+ setQuestion(event.currentTarget.value);
71
+ };
72
+
73
+ const handleProviderChange = (value: string): void => {
74
+ setProviderId(value);
75
+ setModel("__auto__");
76
+ };
77
+
78
+ const askPiAgent = (): void => {
79
+ if (!canAsk) return;
80
+ setLoading(true);
81
+ setStatus("");
82
+ setAnswer("");
83
+
84
+ const body = {
85
+ question: question.trim(),
86
+ ...(currentSessionId !== null ? { sessionId: currentSessionId } : {}),
87
+ ...(providerId !== "__auto__" ? { providerId } : {}),
88
+ ...(model !== "__auto__" ? { model } : {}),
89
+ logLimit: 24,
90
+ };
91
+
92
+ void fetch("/api/pi-agent", {
93
+ method: "POST",
94
+ headers: { "content-type": "application/json" },
95
+ body: JSON.stringify(body),
96
+ })
97
+ .then(async (response) => {
98
+ const raw = await response.text();
99
+ if (!response.ok) {
100
+ setStatus(`Pi Agent failed: HTTP ${String(response.status)}`);
101
+ setAnswer(raw);
102
+ return;
103
+ }
104
+ const parsedJson: unknown = JSON.parse(raw);
105
+ const parsed = PiAgentResponseSchema.safeParse(parsedJson);
106
+ if (!parsed.success) {
107
+ setStatus("Pi Agent returned an unexpected response.");
108
+ setAnswer(raw);
109
+ return;
110
+ }
111
+ setStatus(
112
+ `${parsed.data.providerName} / ${parsed.data.model} / ${parsed.data.protocol} / ${String(
113
+ parsed.data.logCount,
114
+ )} logs`,
115
+ );
116
+ setAnswer(parsed.data.answer);
117
+ })
118
+ .catch((err: unknown) => {
119
+ setStatus(err instanceof Error ? err.message : "Pi Agent request failed.");
120
+ })
121
+ .finally(() => {
122
+ setLoading(false);
123
+ });
124
+ };
125
+
126
+ return (
127
+ <section className="rounded-md bg-black/20 px-3 py-3 shadow-[inset_0_0_0_1px_rgba(255,255,255,0.045)]">
128
+ <div className="flex items-center gap-2">
129
+ <BrainCircuit className="size-4 text-cyan-200" />
130
+ <div className="min-w-0 flex-1">
131
+ <div className="text-xs font-semibold text-foreground">Pi Agent</div>
132
+ <div className="text-[11px] text-muted-foreground">
133
+ {currentSessionId === null ? "Inspector-wide analysis" : "Session analysis"}
134
+ </div>
135
+ </div>
136
+ </div>
137
+
138
+ <div className="mt-3 grid grid-cols-2 gap-2">
139
+ <Select value={providerId} onValueChange={handleProviderChange}>
140
+ <SelectTrigger className="h-8 border-0 bg-black/25 text-xs shadow-[inset_0_0_0_1px_rgba(255,255,255,0.06)]">
141
+ <SelectValue placeholder="Provider" />
142
+ </SelectTrigger>
143
+ <SelectContent>
144
+ <SelectItem value="__auto__">Auto provider</SelectItem>
145
+ {piProviders.map((provider) => (
146
+ <SelectItem key={provider.id} value={provider.id}>
147
+ {provider.name} / {providerProtocolLabel(provider)}
148
+ </SelectItem>
149
+ ))}
150
+ </SelectContent>
151
+ </Select>
152
+ <Select value={model} onValueChange={setModel}>
153
+ <SelectTrigger className="h-8 border-0 bg-black/25 text-xs shadow-[inset_0_0_0_1px_rgba(255,255,255,0.06)]">
154
+ <SelectValue placeholder="Model" />
155
+ </SelectTrigger>
156
+ <SelectContent>
157
+ <SelectItem value="__auto__">Auto model</SelectItem>
158
+ {modelOptions.map((modelName) => (
159
+ <SelectItem key={modelName} value={modelName}>
160
+ {modelName}
161
+ </SelectItem>
162
+ ))}
163
+ </SelectContent>
164
+ </Select>
165
+ </div>
166
+
167
+ <textarea
168
+ value={question}
169
+ onChange={handleQuestionChange}
170
+ className="mt-2 min-h-24 w-full resize-y rounded-md bg-black/25 px-3 py-2 text-xs leading-5 text-foreground outline-none shadow-[inset_0_0_0_1px_rgba(255,255,255,0.06)] transition-colors placeholder:text-muted-foreground focus-visible:ring-1 focus-visible:ring-ring"
171
+ placeholder="Ask Pi Agent about this session..."
172
+ />
173
+
174
+ <button
175
+ type="button"
176
+ onClick={askPiAgent}
177
+ disabled={!canAsk}
178
+ className="mt-2 inline-flex h-8 w-full items-center justify-center gap-2 rounded-md bg-cyan-400/12 px-3 text-xs font-medium text-cyan-100 shadow-[inset_0_0_0_1px_rgba(103,232,249,0.18)] transition-colors hover:bg-cyan-400/18 disabled:cursor-not-allowed disabled:opacity-50"
179
+ >
180
+ {loading ? <Loader2 className="size-3.5 animate-spin" /> : <Send className="size-3.5" />}
181
+ <span>{loading ? "Thinking..." : "Ask Pi"}</span>
182
+ </button>
183
+
184
+ {piProviders.length === 0 && (
185
+ <p className="mt-2 text-[11px] leading-5 text-muted-foreground">
186
+ Configure a Provider with Responses, Chat, or Anthropic URL to enable Pi Agent.
187
+ </p>
188
+ )}
189
+ {status !== "" && (
190
+ <p className="mt-2 break-words font-mono text-[10px] text-cyan-100/70">{status}</p>
191
+ )}
192
+ {answer !== "" && (
193
+ <div className="mt-3 max-h-64 overflow-y-auto whitespace-pre-wrap rounded-md bg-black/25 p-3 text-xs leading-5 text-foreground shadow-[inset_0_0_0_1px_rgba(255,255,255,0.05)]">
194
+ {answer}
195
+ </div>
196
+ )}
197
+ {logCount === 0 && (
198
+ <p className="mt-2 text-[11px] leading-5 text-muted-foreground">
199
+ No logs are visible in this scope yet; Pi Agent can still answer Provider setup questions.
200
+ </p>
201
+ )}
202
+ </section>
203
+ );
204
+ }
@@ -0,0 +1,21 @@
1
+ import { z } from "zod";
2
+
3
+ export const PiAgentRequestSchema = z.object({
4
+ question: z.string().trim().min(1).max(4_000),
5
+ sessionId: z.string().trim().min(1).optional(),
6
+ providerId: z.string().trim().min(1).optional(),
7
+ model: z.string().trim().min(1).optional(),
8
+ logLimit: z.number().int().min(1).max(80).optional(),
9
+ });
10
+
11
+ export const PiAgentResponseSchema = z.object({
12
+ answer: z.string(),
13
+ providerId: z.string(),
14
+ providerName: z.string(),
15
+ model: z.string(),
16
+ protocol: z.enum(["openaiResponses", "openaiChat", "anthropic"]),
17
+ logCount: z.number().int().nonnegative(),
18
+ });
19
+
20
+ export type PiAgentRequest = z.infer<typeof PiAgentRequestSchema>;
21
+ export type PiAgentResponse = z.infer<typeof PiAgentResponseSchema>;
@@ -0,0 +1,29 @@
1
+ import { createFileRoute } from "@tanstack/react-router";
2
+ import { PiAgentRequestSchema } from "../../lib/piAgentContract";
3
+ import { runPiAgent } from "../../services/piAgent";
4
+
5
+ export const Route = createFileRoute("/api/pi-agent")({
6
+ server: {
7
+ handlers: {
8
+ POST: async ({ request }: { request: Request }) => {
9
+ let body: unknown;
10
+ try {
11
+ body = await request.json();
12
+ } catch {
13
+ return Response.json({ error: "Invalid JSON body" }, { status: 400 });
14
+ }
15
+
16
+ const parsed = PiAgentRequestSchema.safeParse(body);
17
+ if (!parsed.success) {
18
+ return Response.json(
19
+ { error: "Invalid Pi-agent request", details: parsed.error.format() },
20
+ { status: 400 },
21
+ );
22
+ }
23
+
24
+ const result = await runPiAgent(parsed.data);
25
+ return Response.json(result);
26
+ },
27
+ },
28
+ },
29
+ });