@tonyclaw/agent-inspector 3.0.18 → 3.0.20

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 (110) hide show
  1. package/.output/cli.js +1257 -506
  2. package/.output/nitro.json +3 -3
  3. package/.output/public/assets/CompareDrawer-CV7rBBty.js +1 -0
  4. package/.output/public/assets/ProxyViewerContainer-CqRfBWJ3.js +127 -0
  5. package/.output/public/assets/ReplayDialog-yDeF-z9y.js +1 -0
  6. package/.output/public/assets/RequestAnatomy-BXxKNdgk.js +1 -0
  7. package/.output/public/assets/ResponseView-BIYNgUNB.js +3 -0
  8. package/.output/public/assets/StreamingChunkSequence-C1faiChu.js +1 -0
  9. package/.output/public/assets/_sessionId-B34PrfCQ.js +1 -0
  10. package/.output/public/assets/index-B3YOj8-_.css +1 -0
  11. package/.output/public/assets/index-BLwqIxup.js +12 -0
  12. package/.output/public/assets/{index-ClQ7Vi3J.js → index-DOspyaW6.js} +1 -1
  13. package/.output/public/assets/index-DT476lno.js +1 -0
  14. package/.output/public/assets/json-viewer-C1S08J_2.js +1 -0
  15. package/.output/server/_chunks/ssr-renderer.mjs +18 -2
  16. package/.output/server/_libs/@radix-ui/react-dismissable-layer+[...].mjs +165 -31
  17. package/.output/server/_libs/@radix-ui/react-use-callback-ref+[...].mjs +1 -1
  18. package/.output/server/_libs/@radix-ui/react-use-controllable-state+[...].mjs +2 -2
  19. package/.output/server/_libs/@radix-ui/react-use-is-hydrated+[...].mjs +28 -1
  20. package/.output/server/_libs/mistralai__mistralai.mjs +1 -1
  21. package/.output/server/_libs/modelcontextprotocol__server.mjs +11571 -8127
  22. package/.output/server/_libs/radix-ui__primitive.mjs +1 -1
  23. package/.output/server/_libs/radix-ui__react-collapsible.mjs +1 -1
  24. package/.output/server/_libs/radix-ui__react-collection.mjs +8 -8
  25. package/.output/server/_libs/radix-ui__react-compose-refs.mjs +0 -1
  26. package/.output/server/_libs/radix-ui__react-context.mjs +4 -18
  27. package/.output/server/_libs/radix-ui__react-dialog.mjs +41 -88
  28. package/.output/server/_libs/radix-ui__react-focus-guards.mjs +15 -5
  29. package/.output/server/_libs/radix-ui__react-focus-scope.mjs +6 -2
  30. package/.output/server/_libs/radix-ui__react-id.mjs +3 -3
  31. package/.output/server/_libs/radix-ui__react-popper.mjs +62 -8
  32. package/.output/server/_libs/radix-ui__react-portal.mjs +2 -2
  33. package/.output/server/_libs/radix-ui__react-presence.mjs +50 -5
  34. package/.output/server/_libs/radix-ui__react-roving-focus.mjs +15 -4
  35. package/.output/server/_libs/radix-ui__react-scroll-area.mjs +30 -20
  36. package/.output/server/_libs/radix-ui__react-select.mjs +167 -123
  37. package/.output/server/_libs/radix-ui__react-slot.mjs +74 -41
  38. package/.output/server/_libs/radix-ui__react-tabs.mjs +6 -1
  39. package/.output/server/_libs/radix-ui__react-tooltip.mjs +6 -3
  40. package/.output/server/_libs/react-dom.mjs +13 -15
  41. package/.output/server/_libs/react.mjs +45 -45
  42. package/.output/server/_libs/srvx.mjs +409 -53
  43. package/.output/server/_libs/swr.mjs +10 -2
  44. package/.output/server/_libs/tailwind-merge.mjs +286 -41
  45. package/.output/server/_libs/tanstack__history.mjs +9 -13
  46. package/.output/server/_libs/tanstack__react-router.mjs +788 -1092
  47. package/.output/server/_libs/tanstack__react-store.mjs +1 -1
  48. package/.output/server/_libs/tanstack__react-virtual.mjs +82 -7
  49. package/.output/server/_libs/tanstack__router-core.mjs +1841 -2060
  50. package/.output/server/_libs/tanstack__virtual-core.mjs +116 -45
  51. package/.output/server/_libs/use-sync-external-store.mjs +1 -1
  52. package/.output/server/_libs/zod-to-json-schema.mjs +1 -1
  53. package/.output/server/_libs/zod.mjs +5085 -200
  54. package/.output/server/{_sessionId-Bi3ZIrqT.mjs → _sessionId-CmoBbtKT.mjs} +30 -32
  55. package/.output/server/_ssr/{CompareDrawer-BYZS_hCR.mjs → CompareDrawer-BsXnVK4e.mjs} +29 -31
  56. package/.output/server/_ssr/{ProxyViewerContainer-BE4umfVs.mjs → ProxyViewerContainer-D-_7pyfx.mjs} +54 -52
  57. package/.output/server/_ssr/{ReplayDialog-BlID2ZH4.mjs → ReplayDialog-deDQA2M5.mjs} +30 -32
  58. package/.output/server/_ssr/{RequestAnatomy-CGJ2lkzT.mjs → RequestAnatomy-CX-cCRdX.mjs} +29 -31
  59. package/.output/server/_ssr/{ResponseView-DDjcGf7M.mjs → ResponseView-D0LJR1qj.mjs} +29 -31
  60. package/.output/server/_ssr/{StreamingChunkSequence-G7B8M5G2.mjs → StreamingChunkSequence-CJRECetE.mjs} +29 -31
  61. package/.output/server/_ssr/empty-plugin-adapters-BFgPZ6_d.mjs +6 -0
  62. package/.output/server/_ssr/{index-ClQ9FvRJ.mjs → index-CYWOXS4d.mjs} +31 -33
  63. package/.output/server/_ssr/index.mjs +1102 -784
  64. package/.output/server/_ssr/{json-viewer-CFbpkiBJ.mjs → json-viewer-CCneYiCn.mjs} +29 -31
  65. package/.output/server/_ssr/{router-Cq8LEvhE.mjs → router-D-PAN8IK.mjs} +182 -67
  66. package/.output/server/_tanstack-start-manifest_v-CVZ9yh4R.mjs +4 -0
  67. package/.output/server/index.mjs +74 -92
  68. package/README.md +4 -4
  69. package/package.json +17 -8
  70. package/src/cli/onboard.ts +1 -1
  71. package/src/cli.ts +2 -2
  72. package/src/components/clients/ClientLogo.tsx +5 -1
  73. package/src/components/proxy-viewer/RequestToolsPanel.tsx +1 -0
  74. package/src/components/proxy-viewer/ResponseView.tsx +1 -0
  75. package/src/components/proxy-viewer/StreamingChunkSequence.tsx +1 -0
  76. package/src/components/proxy-viewer/TurnGroup.tsx +1 -0
  77. package/src/components/proxy-viewer/anatomy/SegmentBar.tsx +1 -0
  78. package/src/components/proxy-viewer/formats/anthropic/ContentBlocks.tsx +4 -0
  79. package/src/components/proxy-viewer/formats/anthropic/ResponseView.tsx +1 -0
  80. package/src/components/proxy-viewer/formats/openai/ResponseView.tsx +2 -0
  81. package/src/components/ui/dialog.tsx +1 -1
  82. package/src/components/ui/json-viewer.tsx +2 -0
  83. package/src/components/ui/select.tsx +1 -1
  84. package/src/contracts/json.ts +7 -2
  85. package/src/lib/providerContract.ts +25 -5
  86. package/src/mcp/server.ts +12 -3
  87. package/src/mcp/toolHandlers.ts +6 -1
  88. package/src/proxy/handler.ts +17 -7
  89. package/src/proxy/logFinalizer.ts +76 -8
  90. package/src/proxy/logIndex.ts +16 -32
  91. package/src/proxy/providers.ts +22 -1
  92. package/src/proxy/sessionProcess.ts +15 -1
  93. package/src/proxy/upstream.ts +4 -2
  94. package/src/router.tsx +9 -0
  95. package/.output/public/assets/CompareDrawer-Daj03-RL.js +0 -1
  96. package/.output/public/assets/ProxyViewerContainer-BLCRQtU_.js +0 -106
  97. package/.output/public/assets/ReplayDialog-5FR5crdo.js +0 -1
  98. package/.output/public/assets/RequestAnatomy-DF0hHdQY.js +0 -1
  99. package/.output/public/assets/ResponseView-BwkMSsUa.js +0 -3
  100. package/.output/public/assets/StreamingChunkSequence-CKeUd58x.js +0 -1
  101. package/.output/public/assets/_sessionId-CThgXa41.js +0 -1
  102. package/.output/public/assets/index-BHXN1Fsx.css +0 -1
  103. package/.output/public/assets/index-gm3A0idN.js +0 -1
  104. package/.output/public/assets/json-viewer-BA-W-PZq.js +0 -1
  105. package/.output/public/assets/main-BnRC1932.js +0 -18
  106. package/.output/server/_libs/@radix-ui/react-use-escape-keydown+[...].mjs +0 -17
  107. package/.output/server/_libs/cfworker__json-schema.mjs +0 -1
  108. package/.output/server/_libs/tiny-invariant.mjs +0 -12
  109. package/.output/server/_libs/tiny-warning.mjs +0 -5
  110. package/.output/server/_tanstack-start-manifest_v-p7J0QCMh.mjs +0 -4
@@ -1,5 +1,5 @@
1
1
  globalThis.__nitro_main__ = import.meta.url;
2
- import { N as NodeResponse, s as serve } from "./_libs/srvx.mjs";
2
+ import { c as NodeResponse, s as serve } from "./_libs/srvx.mjs";
3
3
  import { d as defineHandler, H as HTTPError, t as toEventHandler, a as defineLazyEventHandler, b as H3Core } from "./_libs/h3.mjs";
4
4
  import { d as decodePath, w as withLeadingSlash, a as withoutTrailingSlash, j as joinURL } from "./_libs/ufo.mjs";
5
5
  import { promises } from "node:fs";
@@ -11,24 +11,6 @@ import "node:stream/promises";
11
11
  import "node:https";
12
12
  import "node:http2";
13
13
  import "./_libs/rou3.mjs";
14
- function lazyService(loader) {
15
- let promise, mod;
16
- return {
17
- fetch(req) {
18
- if (mod) {
19
- return mod.fetch(req);
20
- }
21
- if (!promise) {
22
- promise = loader().then((_mod) => mod = _mod.default || _mod);
23
- }
24
- return promise.then((mod2) => mod2.fetch(req));
25
- }
26
- };
27
- }
28
- const services = {
29
- ["ssr"]: lazyService(() => import("./_ssr/index.mjs"))
30
- };
31
- globalThis.__nitro_vite_envs__ = services;
32
14
  const headers = ((m) => function headersRouteRule(event) {
33
15
  for (const [key2, value] of Object.entries(m.options || {})) {
34
16
  event.res.headers.set(key2, value);
@@ -38,121 +20,121 @@ const assets = {
38
20
  "/assets/alibaba-TTwafVwX.svg": {
39
21
  "type": "image/svg+xml",
40
22
  "etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
41
- "mtime": "2026-07-08T09:20:47.299Z",
23
+ "mtime": "2026-07-09T06:59:01.790Z",
42
24
  "size": 5915,
43
25
  "path": "../public/assets/alibaba-TTwafVwX.svg"
44
26
  },
45
27
  "/assets/agent-inspector-58K1_MsC.ico": {
46
28
  "type": "image/vnd.microsoft.icon",
47
29
  "etag": '"38fa-ZD8kPABHYjPIkcH82FMY6iZM7fI"',
48
- "mtime": "2026-07-08T09:20:47.299Z",
30
+ "mtime": "2026-07-09T06:59:01.790Z",
49
31
  "size": 14586,
50
32
  "path": "../public/assets/agent-inspector-58K1_MsC.ico"
51
33
  },
52
- "/assets/json-viewer-BA-W-PZq.js": {
34
+ "/assets/CompareDrawer-CV7rBBty.js": {
53
35
  "type": "text/javascript; charset=utf-8",
54
- "etag": '"1ae6-dvP4VHmxfaubFfn7DjIy5LP2VDM"',
55
- "mtime": "2026-07-08T09:20:47.300Z",
56
- "size": 6886,
57
- "path": "../public/assets/json-viewer-BA-W-PZq.js"
36
+ "etag": '"4bc4-NeuRTrt7yHDOmT9FQIMZJsJttrg"',
37
+ "mtime": "2026-07-09T06:59:01.790Z",
38
+ "size": 19396,
39
+ "path": "../public/assets/CompareDrawer-CV7rBBty.js"
58
40
  },
59
- "/assets/index-gm3A0idN.js": {
41
+ "/assets/index-DT476lno.js": {
60
42
  "type": "text/javascript; charset=utf-8",
61
- "etag": '"264-bUtHugGp38xTQ/556OOmW4cTb30"',
62
- "mtime": "2026-07-08T09:20:47.299Z",
63
- "size": 612,
64
- "path": "../public/assets/index-gm3A0idN.js"
43
+ "etag": '"265-MUXBG+nWxX37u2jGqJqLxo+dQ58"',
44
+ "mtime": "2026-07-09T06:59:01.790Z",
45
+ "size": 613,
46
+ "path": "../public/assets/index-DT476lno.js"
47
+ },
48
+ "/assets/index-DOspyaW6.js": {
49
+ "type": "text/javascript; charset=utf-8",
50
+ "etag": '"1cd2d-wAQHK/XT8cmFNwY2u7tsp3R5u5E"',
51
+ "mtime": "2026-07-09T06:59:01.791Z",
52
+ "size": 118061,
53
+ "path": "../public/assets/index-DOspyaW6.js"
54
+ },
55
+ "/assets/index-B3YOj8-_.css": {
56
+ "type": "text/css; charset=utf-8",
57
+ "etag": '"25d7e-wT0HU4Abt/tuojN/MHx6/a/L3BA"',
58
+ "mtime": "2026-07-09T06:59:01.790Z",
59
+ "size": 155006,
60
+ "path": "../public/assets/index-B3YOj8-_.css"
65
61
  },
66
62
  "/assets/minimax-BPMzvuL-.jpeg": {
67
63
  "type": "image/jpeg",
68
64
  "etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
69
- "mtime": "2026-07-08T09:20:47.299Z",
65
+ "mtime": "2026-07-09T06:59:01.790Z",
70
66
  "size": 6918,
71
67
  "path": "../public/assets/minimax-BPMzvuL-.jpeg"
72
68
  },
73
- "/assets/index-ClQ7Vi3J.js": {
69
+ "/assets/RequestAnatomy-BXxKNdgk.js": {
74
70
  "type": "text/javascript; charset=utf-8",
75
- "etag": '"1cd2c-4zCEbVXrILXYj2zEV1+iKezgPds"',
76
- "mtime": "2026-07-08T09:20:47.300Z",
77
- "size": 118060,
78
- "path": "../public/assets/index-ClQ7Vi3J.js"
71
+ "etag": '"43f3-xfqa2g7z/1x7C7SVZel7b8TpVPs"',
72
+ "mtime": "2026-07-09T06:59:01.790Z",
73
+ "size": 17395,
74
+ "path": "../public/assets/RequestAnatomy-BXxKNdgk.js"
79
75
  },
80
- "/assets/main-BnRC1932.js": {
76
+ "/assets/index-BLwqIxup.js": {
81
77
  "type": "text/javascript; charset=utf-8",
82
- "etag": '"51754-C+GxW6/FcQjEc3T50yvdt1wbC+Q"',
83
- "mtime": "2026-07-08T09:20:47.300Z",
84
- "size": 333652,
85
- "path": "../public/assets/main-BnRC1932.js"
78
+ "etag": '"5231f-HqTXsZ4wO12ASADoW2/b28qy0iU"',
79
+ "mtime": "2026-07-09T06:59:01.790Z",
80
+ "size": 336671,
81
+ "path": "../public/assets/index-BLwqIxup.js"
86
82
  },
87
- "/assets/CompareDrawer-Daj03-RL.js": {
83
+ "/assets/ReplayDialog-yDeF-z9y.js": {
88
84
  "type": "text/javascript; charset=utf-8",
89
- "etag": '"4bc3-br2IcvOX80Rt2Ihi0wTncTxpsjQ"',
90
- "mtime": "2026-07-08T09:20:47.300Z",
91
- "size": 19395,
92
- "path": "../public/assets/CompareDrawer-Daj03-RL.js"
85
+ "etag": '"3348-KuuPZ1nE8LYKQOTTGWkhFYGrHTE"',
86
+ "mtime": "2026-07-09T06:59:01.790Z",
87
+ "size": 13128,
88
+ "path": "../public/assets/ReplayDialog-yDeF-z9y.js"
93
89
  },
94
- "/assets/ResponseView-BwkMSsUa.js": {
90
+ "/assets/ResponseView-BIYNgUNB.js": {
95
91
  "type": "text/javascript; charset=utf-8",
96
- "etag": '"47fc-0qG8LO4aEdS/plOjflbM11UR8Ow"',
97
- "mtime": "2026-07-08T09:20:47.300Z",
98
- "size": 18428,
99
- "path": "../public/assets/ResponseView-BwkMSsUa.js"
92
+ "etag": '"47fe-zKVqch7wCsmDgW7eCqN7M7CT6xc"',
93
+ "mtime": "2026-07-09T06:59:01.790Z",
94
+ "size": 18430,
95
+ "path": "../public/assets/ResponseView-BIYNgUNB.js"
100
96
  },
101
- "/assets/RequestAnatomy-DF0hHdQY.js": {
97
+ "/assets/StreamingChunkSequence-C1faiChu.js": {
102
98
  "type": "text/javascript; charset=utf-8",
103
- "etag": '"43f2-Mtz9JWVo1c1JlS8OqgcPSXmE3lQ"',
104
- "mtime": "2026-07-08T09:20:47.300Z",
105
- "size": 17394,
106
- "path": "../public/assets/RequestAnatomy-DF0hHdQY.js"
99
+ "etag": '"e96-OFL3QQfpjl325p412ILsH/ND4Z0"',
100
+ "mtime": "2026-07-09T06:59:01.791Z",
101
+ "size": 3734,
102
+ "path": "../public/assets/StreamingChunkSequence-C1faiChu.js"
107
103
  },
108
- "/assets/ReplayDialog-5FR5crdo.js": {
104
+ "/assets/_sessionId-B34PrfCQ.js": {
109
105
  "type": "text/javascript; charset=utf-8",
110
- "etag": '"3347-a97u4d282w761H2y42rBEmcN128"',
111
- "mtime": "2026-07-08T09:20:47.300Z",
112
- "size": 13127,
113
- "path": "../public/assets/ReplayDialog-5FR5crdo.js"
114
- },
115
- "/assets/StreamingChunkSequence-CKeUd58x.js": {
116
- "type": "text/javascript; charset=utf-8",
117
- "etag": '"e95-aUcHwmSf3cNmuFqJIhMNTBPZwHQ"',
118
- "mtime": "2026-07-08T09:20:47.300Z",
119
- "size": 3733,
120
- "path": "../public/assets/StreamingChunkSequence-CKeUd58x.js"
106
+ "etag": '"36d-UKHpMMKVTcaT/1x9Bgn6o8Jt+G8"',
107
+ "mtime": "2026-07-09T06:59:01.790Z",
108
+ "size": 877,
109
+ "path": "../public/assets/_sessionId-B34PrfCQ.js"
121
110
  },
122
111
  "/assets/zhipuai-BPNAnxo-.svg": {
123
112
  "type": "image/svg+xml",
124
113
  "etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
125
- "mtime": "2026-07-08T09:20:47.299Z",
114
+ "mtime": "2026-07-09T06:59:01.790Z",
126
115
  "size": 11256,
127
116
  "path": "../public/assets/zhipuai-BPNAnxo-.svg"
128
117
  },
129
- "/assets/index-BHXN1Fsx.css": {
130
- "type": "text/css; charset=utf-8",
131
- "etag": '"25b0d-UyzOlNKIaucQXEUHv/FUiQk9+WM"',
132
- "mtime": "2026-07-08T09:20:47.299Z",
133
- "size": 154381,
134
- "path": "../public/assets/index-BHXN1Fsx.css"
135
- },
136
- "/assets/_sessionId-CThgXa41.js": {
118
+ "/assets/json-viewer-C1S08J_2.js": {
137
119
  "type": "text/javascript; charset=utf-8",
138
- "etag": '"36c-LhEJ0XDKnu7ufvoZ93ll2DTfzsE"',
139
- "mtime": "2026-07-08T09:20:47.299Z",
140
- "size": 876,
141
- "path": "../public/assets/_sessionId-CThgXa41.js"
120
+ "etag": '"1ae7-30vssKRdTL6PhsFp1e/RPJHIleA"',
121
+ "mtime": "2026-07-09T06:59:01.790Z",
122
+ "size": 6887,
123
+ "path": "../public/assets/json-viewer-C1S08J_2.js"
142
124
  },
143
125
  "/assets/qwen-CONDcHqt.png": {
144
126
  "type": "image/png",
145
127
  "etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
146
- "mtime": "2026-07-08T09:20:47.299Z",
128
+ "mtime": "2026-07-09T06:59:01.790Z",
147
129
  "size": 357059,
148
130
  "path": "../public/assets/qwen-CONDcHqt.png"
149
131
  },
150
- "/assets/ProxyViewerContainer-BLCRQtU_.js": {
132
+ "/assets/ProxyViewerContainer-CqRfBWJ3.js": {
151
133
  "type": "text/javascript; charset=utf-8",
152
- "etag": '"bacfa-YqZ58vQYU45MNm0p7H9WPhfdV4M"',
153
- "mtime": "2026-07-08T09:20:47.300Z",
154
- "size": 765178,
155
- "path": "../public/assets/ProxyViewerContainer-BLCRQtU_.js"
134
+ "etag": '"bd898-gg83MT9gqLxpBjOn+Tmh6I1/9N4"',
135
+ "mtime": "2026-07-09T06:59:01.791Z",
136
+ "size": 776344,
137
+ "path": "../public/assets/ProxyViewerContainer-CqRfBWJ3.js"
156
138
  }
157
139
  };
158
140
  function readAsset(id) {
@@ -180,7 +162,7 @@ const EncodingMap = {
180
162
  br: ".br",
181
163
  zstd: ".zst"
182
164
  };
183
- const _aYWmx5 = defineHandler((event) => {
165
+ const _TahAqH = defineHandler((event) => {
184
166
  if (event.req.method && !METHODS.has(event.req.method)) {
185
167
  return;
186
168
  }
@@ -252,15 +234,15 @@ const findRouteRules = /* @__PURE__ */ (() => {
252
234
  return r;
253
235
  };
254
236
  })();
255
- const _lazy_bRSXJB = defineLazyEventHandler(() => import("./_chunks/ssr-renderer.mjs"));
237
+ const _lazy_9A6hFz = defineLazyEventHandler(() => import("./_chunks/ssr-renderer.mjs"));
256
238
  const findRoute = /* @__PURE__ */ (() => {
257
- const data = { route: "/**", handler: _lazy_bRSXJB };
239
+ const data = { route: "/**", handler: _lazy_9A6hFz };
258
240
  return ((_m, p) => {
259
241
  return { data, params: { "_": p.slice(1) } };
260
242
  });
261
243
  })();
262
244
  const globalMiddleware = [
263
- toEventHandler(_aYWmx5)
245
+ toEventHandler(_TahAqH)
264
246
  ].filter(Boolean);
265
247
  const errorHandler$1 = (error, event) => {
266
248
  const res = defaultHandler(error, event);
package/README.md CHANGED
@@ -130,13 +130,13 @@ The web UI runs at http://localhost:9527. The public proxy endpoint is also
130
130
  `http://localhost:9527/proxy`; internally Agent Inspector may run the app on a private helper port,
131
131
  but AI tools should use the public URL printed by the CLI.
132
132
 
133
- The legacy `http://localhost:25947` port is closed by default. If you need a temporary alias for
133
+ The legacy `http://localhost:9527` port is closed by default. If you need a temporary alias for
134
134
  older AI tool or MCP configs, start with `agent-inspector --legacy-port`.
135
135
 
136
136
  ## v3.0 Port Migration
137
137
 
138
- Agent Inspector v3.0 changes the default public port from `25947` to `9527`. The packaged CLI now
139
- opens only `9527` by default. Existing AI coding tool and MCP configs that still point at `25947`
138
+ Agent Inspector v3.0 changes the default public port from `9527` to `9527`. The packaged CLI now
139
+ opens only `9527` by default. Existing AI coding tool and MCP configs that still point at `9527`
140
140
  should be moved to `9527`, or you can temporarily start with `agent-inspector --legacy-port`.
141
141
 
142
142
  Use these endpoints for new configs:
@@ -266,7 +266,7 @@ configure `http://localhost:9527/api/mcp` directly. If it only supports stdio, c
266
266
  `agent-inspector-mcp stdio`; that command is only a bridge to `/api/mcp`, not a second Inspector
267
267
  server.
268
268
 
269
- Legacy MCP configs that still use `http://localhost:25947/api/mcp` require starting the CLI with
269
+ Legacy MCP configs that still use `http://localhost:9527/api/mcp` require starting the CLI with
270
270
  `agent-inspector --legacy-port`; new configs should use `http://localhost:9527/api/mcp`.
271
271
 
272
272
  Coding agents can use the MCP surface in three ways:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonyclaw/agent-inspector",
3
- "version": "3.0.18",
3
+ "version": "3.0.20",
4
4
  "type": "module",
5
5
  "description": "Agent observability and knowledge capture layer for AI coding tools.",
6
6
  "license": "MIT",
@@ -71,10 +71,7 @@
71
71
  "dependencies": {
72
72
  "@mariozechner/pi-agent-core": "^0.73.1",
73
73
  "@mariozechner/pi-ai": "^0.73.1",
74
- "@mariozechner/pi-coding-agent": "^0.73.1",
75
74
  "@modelcontextprotocol/server": "^2.0.0-alpha.2",
76
- "@radix-ui/react-dialog": "^1.1.14",
77
- "@radix-ui/react-select": "^2.2.6",
78
75
  "@tailwindcss/typography": "^0.5.19",
79
76
  "@tanstack/react-router": "^1.160.2",
80
77
  "@tanstack/react-start": "^1.161.0",
@@ -104,24 +101,36 @@
104
101
  "@eslint/js": "^10.0.1",
105
102
  "@ladle/react": "^5.1.1",
106
103
  "@tailwindcss/vite": "^4.1.18",
107
- "@types/bun": "latest",
104
+ "@types/bun": "1.3.8",
108
105
  "@types/react": "^19",
109
106
  "@types/react-dom": "^19",
110
107
  "@typescript-eslint/eslint-plugin": "^8.55.0",
111
108
  "@typescript-eslint/parser": "^8.55.0",
112
109
  "@vitejs/plugin-react": "^5.1.4",
113
- "esbuild": "^0.25.0",
110
+ "esbuild": "^0.28.1",
114
111
  "eslint": "^9.32.0",
115
112
  "eslint-plugin-eslint-comments": "^3.2.0",
116
113
  "eslint-plugin-functional": "^9.0.2",
117
114
  "eslint-plugin-unicorn": "^63.0.0",
118
115
  "husky": "^9.1.7",
119
116
  "knip": "^5.83.1",
120
- "nitro": "^3.0.260603-beta",
117
+ "nitro": "^3.0.260610-beta",
121
118
  "playwright": "^1.60.0",
122
119
  "tailwindcss": "^4.1.11",
123
120
  "typescript": "^5.9.3",
124
- "vite": "^7.3.1",
121
+ "vite": "^7.3.6",
125
122
  "vite-tsconfig-paths": "^6.1.1"
123
+ },
124
+ "overrides": {
125
+ "undici": ">=7.24.0 <8.0.0",
126
+ "rollup": ">=4.59.0 <5.0.0",
127
+ "postcss": ">=8.5.10 <9.0.0",
128
+ "js-yaml": ">=4.1.2 <5.0.0",
129
+ "flatted": ">=3.4.0 <4.0.0",
130
+ "smol-toml": ">=1.6.1 <2.0.0",
131
+ "koa": ">=2.16.4 <3.0.0",
132
+ "@babel/core": ">=7.29.1 <8.0.0",
133
+ "@typescript-eslint/typescript-estree": "^8.63.0",
134
+ "vite": "^7.3.6"
126
135
  }
127
136
  }
@@ -37,7 +37,7 @@ const __dirname = dirname(__filename);
37
37
 
38
38
  const DEFAULT_PORT = 9527;
39
39
  const DEFAULT_MCP_URL = `http://localhost:${DEFAULT_PORT}/api/mcp`;
40
- const LEGACY_MCP_URL = "http://localhost:25947/api/mcp";
40
+ const LEGACY_MCP_URL = "http://localhost:9527/api/mcp";
41
41
  const SKILL_DIR_NAME = "agent-inspector-onboard";
42
42
  const SKILL_FILE_NAME = "SKILL.md";
43
43
  // Windows reserves `:` for NTFS alternate data streams, so a file named
package/src/cli.ts CHANGED
@@ -24,12 +24,12 @@ import { findPidsByPort, killPid, openUrlCommand } from "./proxy/platformCommand
24
24
  const __filename = fileURLToPath(import.meta.url);
25
25
  const __dirname = dirname(__filename);
26
26
 
27
- // v3 defaults the public entrypoint to 9527. The legacy 25947 alias can be
27
+ // v3 defaults the public entrypoint to 9527. The legacy 9527 alias can be
28
28
  // enabled explicitly for older AI-tool and MCP configs. The TanStack Start
29
29
  // runtime stays on a private upstream port and public ports reverse-proxy to
30
30
  // that same runtime, so logs, sessions, and MCP state remain unified.
31
31
  const DEFAULT_PORT = 9527;
32
- const LEGACY_ALIAS_PORT = 25947;
32
+ const LEGACY_ALIAS_PORT = 9527;
33
33
  const DEFAULT_UPSTREAM_PORT = 9529;
34
34
  const LOCAL_PROBE_TIMEOUT_MS = 2000;
35
35
  const BRANDED_WINDOWS_RUNTIME_EXE = "agent-inspector.exe";
@@ -51,7 +51,11 @@ export function detectClientApp(input: ClientAppDetectionInput): ClientApp {
51
51
  }
52
52
  if (matchesAny(haystack, ["mimocode", "mimo-code", "mimo code"])) return "mimo-code";
53
53
  if (matchesAny(haystack, ["opencode", "open-code", "open code"])) return "opencode";
54
- if (matchesAny(haystack, ["claude-code", "claude code", "claudecode"])) return "claude-code";
54
+ if (
55
+ matchesAny(haystack, ["claude-code", "claude code", "claudecode", "claude-cli", "claude cli"])
56
+ ) {
57
+ return "claude-code";
58
+ }
55
59
  if (matchesAny(haystack, ["codex desktop", "codex-cli", "openai-codex", "codex"])) {
56
60
  return "codex";
57
61
  }
@@ -183,6 +183,7 @@ function matchesQuery(tool: RequestToolDefinition, query: string): boolean {
183
183
  return haystack.includes(query);
184
184
  }
185
185
 
186
+ // eslint-disable-next-line @typescript-eslint/no-shadow -- named function gives React DevTools a readable displayName
186
187
  export const RequestTools = memo(function RequestTools({
187
188
  summary,
188
189
  calledToolNames,
@@ -66,6 +66,7 @@ function MarkdownFallbackView({ text }: { text: string }): JSX.Element {
66
66
  return <AnswerMarkdown text={text} />;
67
67
  }
68
68
 
69
+ // eslint-disable-next-line @typescript-eslint/no-shadow -- named function gives React DevTools a readable displayName
69
70
  export const ResponseView = memo(function ResponseView({
70
71
  responseText,
71
72
  responseStatus,
@@ -30,6 +30,7 @@ const StreamingChunksResponseSchema = z.object({
30
30
 
31
31
  const CHUNK_FETCH_TIMEOUT_MS = 10_000;
32
32
 
33
+ // eslint-disable-next-line @typescript-eslint/no-shadow -- named function gives React DevTools a readable displayName
33
34
  export const StreamingChunkSequence = memo(function StreamingChunkSequence({
34
35
  logId,
35
36
  truncated,
@@ -51,6 +51,7 @@ export type TurnGroupProps = {
51
51
  showLogClientMetadata?: boolean;
52
52
  };
53
53
 
54
+ // eslint-disable-next-line @typescript-eslint/no-shadow -- named function gives React DevTools a readable displayName
54
55
  export const TurnGroup = memo(function TurnGroup({
55
56
  entries,
56
57
  viewMode,
@@ -54,6 +54,7 @@ export type SegmentBarProps = {
54
54
  * context segment. Segment mode can activate a JSON path; aggregate modes stay
55
55
  * static so they do not imply a misleading jump target.
56
56
  */
57
+ // eslint-disable-next-line @typescript-eslint/no-shadow -- named function gives React DevTools a readable displayName
57
58
  export const SegmentBar = memo(function SegmentBar({
58
59
  segments,
59
60
  totalTokens,
@@ -38,6 +38,7 @@ function SystemReminderBlock({ text }: { text: string }): JSX.Element {
38
38
  );
39
39
  }
40
40
 
41
+ // eslint-disable-next-line @typescript-eslint/no-shadow -- named function gives React DevTools a readable displayName
41
42
  export const TextBlock = memo(function TextBlock({ text }: { text: string }): JSX.Element {
42
43
  if (text.includes("<system-reminder>")) {
43
44
  return <SystemReminderBlock text={text} />;
@@ -57,6 +58,7 @@ export const TextBlock = memo(function TextBlock({ text }: { text: string }): JS
57
58
  );
58
59
  });
59
60
 
61
+ // eslint-disable-next-line @typescript-eslint/no-shadow -- named function gives React DevTools a readable displayName
60
62
  export const ThinkingBlock = memo(function ThinkingBlock({
61
63
  thinking,
62
64
  }: {
@@ -97,6 +99,7 @@ export const ThinkingBlock = memo(function ThinkingBlock({
97
99
  );
98
100
  });
99
101
 
102
+ // eslint-disable-next-line @typescript-eslint/no-shadow -- named function gives React DevTools a readable displayName
100
103
  export const ToolUseBlock = memo(function ToolUseBlock({
101
104
  name,
102
105
  input,
@@ -160,6 +163,7 @@ export const ToolUseBlock = memo(function ToolUseBlock({
160
163
  );
161
164
  });
162
165
 
166
+ // eslint-disable-next-line @typescript-eslint/no-shadow -- named function gives React DevTools a readable displayName
163
167
  export const ResponseContentBlockRenderer = memo(function ResponseContentBlockRenderer({
164
168
  block,
165
169
  toolIndex,
@@ -7,6 +7,7 @@ import { Separator } from "../../../ui/separator";
7
7
  import type { ResponseToolFocus } from "../index";
8
8
  import { ResponseContentBlockRenderer } from "./ContentBlocks";
9
9
 
10
+ // eslint-disable-next-line @typescript-eslint/no-shadow -- named function gives React DevTools a readable displayName
10
11
  export const StructuredResponseViewAnthropic = memo(function StructuredResponseViewAnthropic({
11
12
  response,
12
13
  toolFocus,
@@ -283,6 +283,7 @@ function ResponsesFunctionCallBlock({
283
283
  );
284
284
  }
285
285
 
286
+ // eslint-disable-next-line @typescript-eslint/no-shadow -- named function gives React DevTools a readable displayName
286
287
  export const OpenAIResponseView = memo(function OpenAIResponseView({
287
288
  response,
288
289
  toolFocus,
@@ -378,6 +379,7 @@ export const OpenAIResponseView = memo(function OpenAIResponseView({
378
379
  );
379
380
  });
380
381
 
382
+ // eslint-disable-next-line @typescript-eslint/no-shadow -- named function gives React DevTools a readable displayName
381
383
  export const OpenAIResponsesResponseView = memo(function OpenAIResponsesResponseView({
382
384
  response,
383
385
  toolFocus,
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ import { Dialog as DialogPrimitive } from "radix-ui";
4
4
  import { X } from "lucide-react";
5
5
  import * as React from "react";
6
6
 
@@ -220,6 +220,7 @@ function ExpandCollapseButton({
220
220
  );
221
221
  }
222
222
 
223
+ // eslint-disable-next-line @typescript-eslint/no-shadow -- named function gives React DevTools a readable displayName
223
224
  const JsonNode = memo(function JsonNode({
224
225
  name,
225
226
  value,
@@ -479,6 +480,7 @@ export type JsonViewerFromStringProps = {
479
480
  bulkRevision?: number;
480
481
  };
481
482
 
483
+ // eslint-disable-next-line @typescript-eslint/no-shadow -- named function gives React DevTools a readable displayName
482
484
  export const JsonViewerFromString = memo(function JsonViewerFromString({
483
485
  text,
484
486
  defaultExpandDepth = 0,
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import * as SelectPrimitive from "@radix-ui/react-select";
3
+ import { Select as SelectPrimitive } from "radix-ui";
4
4
  import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
5
5
  import * as React from "react";
6
6
 
@@ -23,10 +23,15 @@ export const JsonValueSchema: z.ZodType<JsonValue> = z.lazy(() =>
23
23
  );
24
24
 
25
25
  /**
26
- * Re-types a value as `JsonValue` without re-walking it. Use this ONLY when
27
- * the value has already been validated and originated from `JSON.parse`.
26
+ * Re-types a value as `JsonValue` without a full recursive walk. A lightweight
27
+ * runtime guard rejects the most dangerous non-JSON types (undefined, bigint,
28
+ * functions) that would crash JSON.stringify downstream. Use when the value
29
+ * has already been validated by Zod or originated from JSON.parse.
28
30
  */
29
31
  export function trustAsJsonValue<T>(value: T): JsonValue {
32
+ if (value === undefined || typeof value === "bigint" || typeof value === "function") {
33
+ return null;
34
+ }
30
35
  // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
31
36
  return value as unknown as JsonValue;
32
37
  }
@@ -1,5 +1,25 @@
1
1
  import { z } from "zod";
2
2
 
3
+ /**
4
+ * Validates that a string is a well-formed http(s) URL. Rejects non-HTTP
5
+ * schemes (file:, ftp:, etc.) that could be used for SSRF. Local/private
6
+ * addresses are allowed because this tool legitimately proxies to local LLM
7
+ * servers (Ollama, LM Studio, etc.).
8
+ */
9
+ function httpUrl(): z.ZodString {
10
+ return z.string().refine((val) => {
11
+ // Treat empty strings as "unset" so legacy/in-flight providers that
12
+ // store empty placeholders instead of null can still round-trip.
13
+ if (val.length === 0) return true;
14
+ try {
15
+ const parsed = new URL(val);
16
+ return parsed.protocol === "http:" || parsed.protocol === "https:";
17
+ } catch {
18
+ return false;
19
+ }
20
+ }, "Must be a valid http(s) URL");
21
+ }
22
+
3
23
  export const ProviderModelMetadataSchema = z.object({
4
24
  model: z.string().min(1),
5
25
  contextWindow: z.number().int().positive().optional(),
@@ -20,12 +40,12 @@ export const ProviderConfigSchema = z.object({
20
40
  name: z.string(),
21
41
  apiKey: z.string(),
22
42
  model: z.string().optional(),
23
- models: z.array(z.string()).min(1),
43
+ models: z.array(z.string()).optional().default([]),
24
44
  format: z.enum(["anthropic", "openai"]).optional(),
25
- baseUrl: z.string().optional(),
26
- anthropicBaseUrl: z.string().optional(),
27
- openaiBaseUrl: z.string().optional(),
28
- openaiResponsesBaseUrl: z.string().optional(),
45
+ baseUrl: httpUrl().optional(),
46
+ anthropicBaseUrl: httpUrl().optional(),
47
+ openaiBaseUrl: httpUrl().optional(),
48
+ openaiResponsesBaseUrl: httpUrl().optional(),
29
49
  authHeader: z.enum(["bearer", "x-api-key"]).optional().default("bearer"),
30
50
  apiDocsUrl: z.string().optional(),
31
51
  modelMetadataUrl: z.string().optional(),
package/src/mcp/server.ts CHANGED
@@ -99,6 +99,7 @@ import {
99
99
  updateProviderImpl,
100
100
  type ToolResult,
101
101
  } from "./toolHandlers";
102
+ import { logger } from "../proxy/logger";
102
103
 
103
104
  // ---------------------------------------------------------------------------
104
105
  // Lazy singleton: build the McpServer + transport on first use.
@@ -122,9 +123,17 @@ function buildServer(): ServerPair {
122
123
  const transport = new WebStandardStreamableHTTPServerTransport({
123
124
  sessionIdGenerator: undefined, // stateless — see module docstring
124
125
  });
125
- // The connect() call is async but we don't need to await it here; the SDK
126
- // buffers the first request internally.
127
- void server.connect(transport);
126
+ // The connect() call is async handle rejection so a failed transport
127
+ // setup doesn't leave a broken singleton that silently fails all requests.
128
+ void server.connect(transport).then(
129
+ () => {},
130
+ (err) => {
131
+ logger.error(
132
+ "[mcp] server.connect failed:",
133
+ err instanceof Error ? err.message : String(err),
134
+ );
135
+ },
136
+ );
128
137
  return { server, transport };
129
138
  }
130
139
 
@@ -777,7 +777,12 @@ export async function diagnoseCaptureImpl(
777
777
  const runtime = await getRuntimeConfigImpl(callApi);
778
778
  if (runtime.isError === true) return runtime;
779
779
  const runtimeText = runtime.content[0]?.text ?? "{}";
780
- const runtimePayload: unknown = JSON.parse(runtimeText);
780
+ let runtimePayload: unknown = {};
781
+ try {
782
+ runtimePayload = JSON.parse(runtimeText);
783
+ } catch {
784
+ // Non-JSON runtime config text — treat as empty config and continue diagnostics
785
+ }
781
786
  const runtimeRecord = isRecord(runtimePayload) ? runtimePayload : {};
782
787
  const configRecord = isRecord(runtimeRecord["config"]) ? runtimeRecord["config"] : {};
783
788
  const captureMode = stringField(configRecord, "captureMode");