@tonyclaw/agent-inspector 3.0.12 → 3.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/cli.js +72 -6
- package/.output/nitro.json +1 -1
- package/.output/public/assets/{CompareDrawer-BxgmeTyv.js → CompareDrawer-BRV9ztWd.js} +1 -1
- package/.output/public/assets/{ProxyViewerContainer-CchT6T-4.js → ProxyViewerContainer-BVsv8OFb.js} +4 -4
- package/.output/public/assets/{ReplayDialog-CMHVUtVB.js → ReplayDialog-B4b6aD0q.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-CpqHIkD1.js → RequestAnatomy-ybH1l2Bp.js} +1 -1
- package/.output/public/assets/{ResponseView-BvhBiQ5k.js → ResponseView-DpPKgH-Y.js} +2 -2
- package/.output/public/assets/{StreamingChunkSequence-CcNvFNPp.js → StreamingChunkSequence-9f_rtMzz.js} +1 -1
- package/.output/public/assets/{_sessionId-D5z6C77f.js → _sessionId-gEmO-b2f.js} +1 -1
- package/.output/public/assets/index-CF3MPYb3.js +1 -0
- package/.output/public/assets/{index-CXcH69lm.js → index-JgHKqbP1.js} +1 -1
- package/.output/public/assets/{json-viewer-DjRQ00mw.js → json-viewer-DFpIPmLo.js} +1 -1
- package/.output/public/assets/{main-CkKubKth.js → main-YvdO47OP.js} +2 -2
- package/.output/server/{_sessionId-IP7wEbnv.mjs → _sessionId-wSX-l7m2.mjs} +2 -2
- package/.output/server/_ssr/{CompareDrawer-B4qTq3I9.mjs → CompareDrawer-R4d8V0Rv.mjs} +2 -2
- package/.output/server/_ssr/{ProxyViewerContainer-CCIJ1EcB.mjs → ProxyViewerContainer-CDtJhGg8.mjs} +8 -8
- package/.output/server/_ssr/{ReplayDialog-BgxCdCxM.mjs → ReplayDialog-BvmLERpW.mjs} +3 -3
- package/.output/server/_ssr/{RequestAnatomy-De3QDi_x.mjs → RequestAnatomy-CH-oO6mY.mjs} +2 -2
- package/.output/server/_ssr/{ResponseView-Dvibk8g5.mjs → ResponseView-D7shbJw0.mjs} +2 -2
- package/.output/server/_ssr/{StreamingChunkSequence-oAsweEag.mjs → StreamingChunkSequence-DB2YHGJj.mjs} +2 -2
- package/.output/server/_ssr/{index-BIlK7gMO.mjs → index-CS4QLxuv.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{json-viewer-Dgo4oRbs.mjs → json-viewer-HxOn73kS.mjs} +2 -2
- package/.output/server/_ssr/{router-DY_2TxnZ.mjs → router-l4O3mQ4T.mjs} +3 -3
- package/.output/server/{_tanstack-start-manifest_v-CYOwyBpv.mjs → _tanstack-start-manifest_v-Dckf_NHV.mjs} +1 -1
- package/.output/server/index.mjs +68 -68
- package/README.md +8 -9
- package/package.json +1 -1
- package/src/cli.ts +95 -11
- package/.output/public/assets/index-C57MERBU.js +0 -1
package/.output/server/index.mjs
CHANGED
|
@@ -38,121 +38,121 @@ const assets = {
|
|
|
38
38
|
"/assets/agent-inspector-58K1_MsC.ico": {
|
|
39
39
|
"type": "image/vnd.microsoft.icon",
|
|
40
40
|
"etag": '"38fa-ZD8kPABHYjPIkcH82FMY6iZM7fI"',
|
|
41
|
-
"mtime": "2026-07-
|
|
41
|
+
"mtime": "2026-07-07T13:32:21.623Z",
|
|
42
42
|
"size": 14586,
|
|
43
43
|
"path": "../public/assets/agent-inspector-58K1_MsC.ico"
|
|
44
44
|
},
|
|
45
45
|
"/assets/alibaba-TTwafVwX.svg": {
|
|
46
46
|
"type": "image/svg+xml",
|
|
47
47
|
"etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
|
|
48
|
-
"mtime": "2026-07-
|
|
48
|
+
"mtime": "2026-07-07T13:32:21.623Z",
|
|
49
49
|
"size": 5915,
|
|
50
50
|
"path": "../public/assets/alibaba-TTwafVwX.svg"
|
|
51
51
|
},
|
|
52
|
-
"/assets/
|
|
52
|
+
"/assets/minimax-BPMzvuL-.jpeg": {
|
|
53
|
+
"type": "image/jpeg",
|
|
54
|
+
"etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
|
|
55
|
+
"mtime": "2026-07-07T13:32:21.623Z",
|
|
56
|
+
"size": 6918,
|
|
57
|
+
"path": "../public/assets/minimax-BPMzvuL-.jpeg"
|
|
58
|
+
},
|
|
59
|
+
"/assets/json-viewer-DFpIPmLo.js": {
|
|
53
60
|
"type": "text/javascript; charset=utf-8",
|
|
54
|
-
"etag": '"
|
|
55
|
-
"mtime": "2026-07-
|
|
56
|
-
"size":
|
|
57
|
-
"path": "../public/assets/
|
|
61
|
+
"etag": '"1ae6-eQryaLPILn5fqiMEolAa4MZPxNo"',
|
|
62
|
+
"mtime": "2026-07-07T13:32:21.623Z",
|
|
63
|
+
"size": 6886,
|
|
64
|
+
"path": "../public/assets/json-viewer-DFpIPmLo.js"
|
|
58
65
|
},
|
|
59
|
-
"/assets/CompareDrawer-
|
|
66
|
+
"/assets/CompareDrawer-BRV9ztWd.js": {
|
|
60
67
|
"type": "text/javascript; charset=utf-8",
|
|
61
|
-
"etag": '"4bc3-
|
|
62
|
-
"mtime": "2026-07-
|
|
68
|
+
"etag": '"4bc3-shyRzaaE6ahHgRB0IA707QrKsJI"',
|
|
69
|
+
"mtime": "2026-07-07T13:32:21.623Z",
|
|
63
70
|
"size": 19395,
|
|
64
|
-
"path": "../public/assets/CompareDrawer-
|
|
71
|
+
"path": "../public/assets/CompareDrawer-BRV9ztWd.js"
|
|
65
72
|
},
|
|
66
|
-
"/assets/
|
|
73
|
+
"/assets/index-CF3MPYb3.js": {
|
|
67
74
|
"type": "text/javascript; charset=utf-8",
|
|
68
|
-
"etag": '"
|
|
69
|
-
"mtime": "2026-07-
|
|
70
|
-
"size":
|
|
71
|
-
"path": "../public/assets/
|
|
75
|
+
"etag": '"74-F+FcKHiJpC8jrn7xWNQ0dVMtZlM"',
|
|
76
|
+
"mtime": "2026-07-07T13:32:21.623Z",
|
|
77
|
+
"size": 116,
|
|
78
|
+
"path": "../public/assets/index-CF3MPYb3.js"
|
|
72
79
|
},
|
|
73
80
|
"/assets/index-BIgsQvaF.css": {
|
|
74
81
|
"type": "text/css; charset=utf-8",
|
|
75
82
|
"etag": '"23c25-AyhoABstT65ludnAAzbIkqX0g+A"',
|
|
76
|
-
"mtime": "2026-07-
|
|
83
|
+
"mtime": "2026-07-07T13:32:21.623Z",
|
|
77
84
|
"size": 146469,
|
|
78
85
|
"path": "../public/assets/index-BIgsQvaF.css"
|
|
79
86
|
},
|
|
80
|
-
"/assets/index-
|
|
87
|
+
"/assets/index-JgHKqbP1.js": {
|
|
81
88
|
"type": "text/javascript; charset=utf-8",
|
|
82
|
-
"etag": '"1cd2c-
|
|
83
|
-
"mtime": "2026-07-
|
|
89
|
+
"etag": '"1cd2c-0imryeYo69ow52gECBS18OO26Fo"',
|
|
90
|
+
"mtime": "2026-07-07T13:32:21.623Z",
|
|
84
91
|
"size": 118060,
|
|
85
|
-
"path": "../public/assets/index-
|
|
86
|
-
},
|
|
87
|
-
"/assets/minimax-BPMzvuL-.jpeg": {
|
|
88
|
-
"type": "image/jpeg",
|
|
89
|
-
"etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
|
|
90
|
-
"mtime": "2026-07-07T12:05:50.812Z",
|
|
91
|
-
"size": 6918,
|
|
92
|
-
"path": "../public/assets/minimax-BPMzvuL-.jpeg"
|
|
93
|
-
},
|
|
94
|
-
"/assets/ReplayDialog-CMHVUtVB.js": {
|
|
95
|
-
"type": "text/javascript; charset=utf-8",
|
|
96
|
-
"etag": '"3347-httGBIkl8o9TWRveRd5+mBu5ZJE"',
|
|
97
|
-
"mtime": "2026-07-07T12:05:50.813Z",
|
|
98
|
-
"size": 13127,
|
|
99
|
-
"path": "../public/assets/ReplayDialog-CMHVUtVB.js"
|
|
92
|
+
"path": "../public/assets/index-JgHKqbP1.js"
|
|
100
93
|
},
|
|
101
|
-
"/assets/main-
|
|
94
|
+
"/assets/main-YvdO47OP.js": {
|
|
102
95
|
"type": "text/javascript; charset=utf-8",
|
|
103
|
-
"etag": '"512fd-
|
|
104
|
-
"mtime": "2026-07-
|
|
96
|
+
"etag": '"512fd-gCPoQjeotNyQelNGqTchNTZoHkg"',
|
|
97
|
+
"mtime": "2026-07-07T13:32:21.623Z",
|
|
105
98
|
"size": 332541,
|
|
106
|
-
"path": "../public/assets/main-
|
|
99
|
+
"path": "../public/assets/main-YvdO47OP.js"
|
|
107
100
|
},
|
|
108
|
-
"/assets/RequestAnatomy-
|
|
101
|
+
"/assets/RequestAnatomy-ybH1l2Bp.js": {
|
|
109
102
|
"type": "text/javascript; charset=utf-8",
|
|
110
|
-
"etag": '"43f2-
|
|
111
|
-
"mtime": "2026-07-
|
|
103
|
+
"etag": '"43f2-pMwDNmrfJMk8cJ3DWaGnXdho66c"',
|
|
104
|
+
"mtime": "2026-07-07T13:32:21.623Z",
|
|
112
105
|
"size": 17394,
|
|
113
|
-
"path": "../public/assets/RequestAnatomy-
|
|
106
|
+
"path": "../public/assets/RequestAnatomy-ybH1l2Bp.js"
|
|
114
107
|
},
|
|
115
|
-
"/assets/
|
|
108
|
+
"/assets/ReplayDialog-B4b6aD0q.js": {
|
|
116
109
|
"type": "text/javascript; charset=utf-8",
|
|
117
|
-
"etag": '"
|
|
118
|
-
"mtime": "2026-07-
|
|
119
|
-
"size":
|
|
120
|
-
"path": "../public/assets/
|
|
121
|
-
},
|
|
122
|
-
"/assets/_sessionId-D5z6C77f.js": {
|
|
123
|
-
"type": "text/javascript; charset=utf-8",
|
|
124
|
-
"etag": '"36c-vSt7tJ0oCwR+jhLkE51BDj2yxgA"',
|
|
125
|
-
"mtime": "2026-07-07T12:05:50.813Z",
|
|
126
|
-
"size": 876,
|
|
127
|
-
"path": "../public/assets/_sessionId-D5z6C77f.js"
|
|
128
|
-
},
|
|
129
|
-
"/assets/ResponseView-BvhBiQ5k.js": {
|
|
130
|
-
"type": "text/javascript; charset=utf-8",
|
|
131
|
-
"etag": '"47fc-q737C36wyDb/lEJV2Wh3irlNMRk"',
|
|
132
|
-
"mtime": "2026-07-07T12:05:50.813Z",
|
|
133
|
-
"size": 18428,
|
|
134
|
-
"path": "../public/assets/ResponseView-BvhBiQ5k.js"
|
|
110
|
+
"etag": '"3347-eBE7gzon2VtfM/je14kPEkGAXhI"',
|
|
111
|
+
"mtime": "2026-07-07T13:32:21.623Z",
|
|
112
|
+
"size": 13127,
|
|
113
|
+
"path": "../public/assets/ReplayDialog-B4b6aD0q.js"
|
|
135
114
|
},
|
|
136
115
|
"/assets/zhipuai-BPNAnxo-.svg": {
|
|
137
116
|
"type": "image/svg+xml",
|
|
138
117
|
"etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
|
|
139
|
-
"mtime": "2026-07-
|
|
118
|
+
"mtime": "2026-07-07T13:32:21.623Z",
|
|
140
119
|
"size": 11256,
|
|
141
120
|
"path": "../public/assets/zhipuai-BPNAnxo-.svg"
|
|
142
121
|
},
|
|
122
|
+
"/assets/ResponseView-DpPKgH-Y.js": {
|
|
123
|
+
"type": "text/javascript; charset=utf-8",
|
|
124
|
+
"etag": '"47fc-Gknuf/I3Y4XU6BdbGTL5q+Ru5Lc"',
|
|
125
|
+
"mtime": "2026-07-07T13:32:21.623Z",
|
|
126
|
+
"size": 18428,
|
|
127
|
+
"path": "../public/assets/ResponseView-DpPKgH-Y.js"
|
|
128
|
+
},
|
|
129
|
+
"/assets/StreamingChunkSequence-9f_rtMzz.js": {
|
|
130
|
+
"type": "text/javascript; charset=utf-8",
|
|
131
|
+
"etag": '"e95-ez6Uni8ODVEO4MODGxVp1hZegy0"',
|
|
132
|
+
"mtime": "2026-07-07T13:32:21.623Z",
|
|
133
|
+
"size": 3733,
|
|
134
|
+
"path": "../public/assets/StreamingChunkSequence-9f_rtMzz.js"
|
|
135
|
+
},
|
|
136
|
+
"/assets/_sessionId-gEmO-b2f.js": {
|
|
137
|
+
"type": "text/javascript; charset=utf-8",
|
|
138
|
+
"etag": '"36c-gFZKiSoJBGbocCBmbrDp333No/U"',
|
|
139
|
+
"mtime": "2026-07-07T13:32:21.623Z",
|
|
140
|
+
"size": 876,
|
|
141
|
+
"path": "../public/assets/_sessionId-gEmO-b2f.js"
|
|
142
|
+
},
|
|
143
143
|
"/assets/qwen-CONDcHqt.png": {
|
|
144
144
|
"type": "image/png",
|
|
145
145
|
"etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
|
|
146
|
-
"mtime": "2026-07-
|
|
146
|
+
"mtime": "2026-07-07T13:32:21.623Z",
|
|
147
147
|
"size": 357059,
|
|
148
148
|
"path": "../public/assets/qwen-CONDcHqt.png"
|
|
149
149
|
},
|
|
150
|
-
"/assets/ProxyViewerContainer-
|
|
150
|
+
"/assets/ProxyViewerContainer-BVsv8OFb.js": {
|
|
151
151
|
"type": "text/javascript; charset=utf-8",
|
|
152
|
-
"etag": '"b658d-
|
|
153
|
-
"mtime": "2026-07-
|
|
152
|
+
"etag": '"b658d-WdVyevGJ8M3fvq9yKI0lrgCd700"',
|
|
153
|
+
"mtime": "2026-07-07T13:32:21.625Z",
|
|
154
154
|
"size": 746893,
|
|
155
|
-
"path": "../public/assets/ProxyViewerContainer-
|
|
155
|
+
"path": "../public/assets/ProxyViewerContainer-BVsv8OFb.js"
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
158
|
function readAsset(id) {
|
package/README.md
CHANGED
|
@@ -130,15 +130,14 @@ 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
|
-
|
|
134
|
-
|
|
135
|
-
continue to work for now, but new configs should use `9527`.
|
|
133
|
+
The legacy `http://localhost:25947` port is closed by default. If you need a temporary alias for
|
|
134
|
+
older AI tool or MCP configs, start with `agent-inspector --legacy-port`.
|
|
136
135
|
|
|
137
136
|
## v3.0 Port Migration
|
|
138
137
|
|
|
139
|
-
Agent Inspector v3.0 changes the default public port from `25947` to `9527`. The packaged CLI
|
|
140
|
-
`
|
|
141
|
-
|
|
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`
|
|
140
|
+
should be moved to `9527`, or you can temporarily start with `agent-inspector --legacy-port`.
|
|
142
141
|
|
|
143
142
|
Use these endpoints for new configs:
|
|
144
143
|
|
|
@@ -147,7 +146,7 @@ Use these endpoints for new configs:
|
|
|
147
146
|
- OpenAI-compatible `/v1` proxy: `http://localhost:9527/proxy/v1`
|
|
148
147
|
- MCP: `http://localhost:9527/api/mcp`
|
|
149
148
|
|
|
150
|
-
If you intentionally
|
|
149
|
+
If you intentionally need the old compatibility port, start with `agent-inspector --legacy-port`.
|
|
151
150
|
|
|
152
151
|
For Codex-style OpenAI Responses clients, configure the proxy as an OpenAI-compatible `/v1` base:
|
|
153
152
|
|
|
@@ -267,8 +266,8 @@ configure `http://localhost:9527/api/mcp` directly. If it only supports stdio, c
|
|
|
267
266
|
`agent-inspector-mcp stdio`; that command is only a bridge to `/api/mcp`, not a second Inspector
|
|
268
267
|
server.
|
|
269
268
|
|
|
270
|
-
Legacy MCP configs that still use `http://localhost:25947/api/mcp`
|
|
271
|
-
|
|
269
|
+
Legacy MCP configs that still use `http://localhost:25947/api/mcp` require starting the CLI with
|
|
270
|
+
`agent-inspector --legacy-port`; new configs should use `http://localhost:9527/api/mcp`.
|
|
272
271
|
|
|
273
272
|
Coding agents can use the MCP surface in three ways:
|
|
274
273
|
|
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -24,10 +24,10 @@ 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
|
|
28
|
-
//
|
|
29
|
-
// runtime stays on a private upstream port and
|
|
30
|
-
//
|
|
27
|
+
// v3 defaults the public entrypoint to 9527. The legacy 25947 alias can be
|
|
28
|
+
// enabled explicitly for older AI-tool and MCP configs. The TanStack Start
|
|
29
|
+
// runtime stays on a private upstream port and public ports reverse-proxy to
|
|
30
|
+
// that same runtime, so logs, sessions, and MCP state remain unified.
|
|
31
31
|
const DEFAULT_PORT = 9527;
|
|
32
32
|
const LEGACY_ALIAS_PORT = 25947;
|
|
33
33
|
const DEFAULT_UPSTREAM_PORT = 9529;
|
|
@@ -231,12 +231,42 @@ function printAccessHints(port: number, host?: string): void {
|
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
+
type BackgroundSupervisorOptions = {
|
|
235
|
+
port: number;
|
|
236
|
+
host: string | undefined;
|
|
237
|
+
configDir: string | undefined;
|
|
238
|
+
providersJson: string | undefined;
|
|
239
|
+
captureMode: CaptureMode;
|
|
240
|
+
enableIdentityProxy: boolean;
|
|
241
|
+
legacyAliasEnabled: boolean;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
function buildBackgroundSupervisorArgs(options: BackgroundSupervisorOptions): string[] {
|
|
245
|
+
const args = ["--no-open", "--port", String(options.port), "--mode", options.captureMode];
|
|
246
|
+
if (options.host !== undefined) {
|
|
247
|
+
args.push("--host", options.host);
|
|
248
|
+
}
|
|
249
|
+
if (options.configDir !== undefined) {
|
|
250
|
+
args.push("--config-dir", options.configDir);
|
|
251
|
+
}
|
|
252
|
+
if (options.providersJson !== undefined) {
|
|
253
|
+
args.push("--providers", options.providersJson);
|
|
254
|
+
}
|
|
255
|
+
if (!options.enableIdentityProxy) {
|
|
256
|
+
args.push("--no-identity-proxy");
|
|
257
|
+
}
|
|
258
|
+
if (options.legacyAliasEnabled) {
|
|
259
|
+
args.push("--legacy-port");
|
|
260
|
+
}
|
|
261
|
+
return args;
|
|
262
|
+
}
|
|
263
|
+
|
|
234
264
|
function pickUpstreamPort(publicPort: number, legacyAliasPort: number | null): number {
|
|
235
|
-
const
|
|
236
|
-
|
|
237
|
-
publicPort
|
|
238
|
-
|
|
239
|
-
|
|
265
|
+
const nearbyPort = publicPort + 2 <= 65535 ? publicPort + 2 : publicPort - 2;
|
|
266
|
+
const candidates =
|
|
267
|
+
publicPort === DEFAULT_PORT
|
|
268
|
+
? [DEFAULT_UPSTREAM_PORT, nearbyPort, LEGACY_ALIAS_PORT + 2]
|
|
269
|
+
: [nearbyPort, DEFAULT_UPSTREAM_PORT, LEGACY_ALIAS_PORT + 2];
|
|
240
270
|
for (const candidate of candidates) {
|
|
241
271
|
if (
|
|
242
272
|
Number.isInteger(candidate) &&
|
|
@@ -294,10 +324,10 @@ async function runStart(args: string[]): Promise<void> {
|
|
|
294
324
|
let forceRestart = false;
|
|
295
325
|
let configDir: string | undefined;
|
|
296
326
|
let providersJson: string | undefined;
|
|
297
|
-
let captureMode = DEFAULT_CAPTURE_MODE;
|
|
327
|
+
let captureMode: CaptureMode = DEFAULT_CAPTURE_MODE;
|
|
298
328
|
let captureModeWasSpecified = false;
|
|
299
329
|
let enableIdentityProxy = true;
|
|
300
|
-
let legacyAliasEnabled =
|
|
330
|
+
let legacyAliasEnabled = false;
|
|
301
331
|
|
|
302
332
|
if (envMode !== undefined && envMode !== "") {
|
|
303
333
|
const parsedMode = parseCaptureMode(envMode);
|
|
@@ -413,6 +443,9 @@ async function runStart(args: string[]): Promise<void> {
|
|
|
413
443
|
case "--no-legacy-port":
|
|
414
444
|
legacyAliasEnabled = false;
|
|
415
445
|
break;
|
|
446
|
+
case "--legacy-port":
|
|
447
|
+
legacyAliasEnabled = true;
|
|
448
|
+
break;
|
|
416
449
|
default:
|
|
417
450
|
break;
|
|
418
451
|
}
|
|
@@ -482,6 +515,57 @@ async function runStart(args: string[]): Promise<void> {
|
|
|
482
515
|
}
|
|
483
516
|
}
|
|
484
517
|
|
|
518
|
+
if (background && enableIdentityProxy) {
|
|
519
|
+
const cliEntry = process.argv[1];
|
|
520
|
+
if (cliEntry === undefined || cliEntry.length === 0) {
|
|
521
|
+
console.error("Cannot resolve agent-inspector CLI entry for background supervisor.");
|
|
522
|
+
process.exitCode = 1;
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
const supervisorArgs = buildBackgroundSupervisorArgs({
|
|
527
|
+
port,
|
|
528
|
+
host,
|
|
529
|
+
configDir,
|
|
530
|
+
providersJson,
|
|
531
|
+
captureMode,
|
|
532
|
+
enableIdentityProxy,
|
|
533
|
+
legacyAliasEnabled,
|
|
534
|
+
});
|
|
535
|
+
const supervisorProcess = spawn(process.execPath, [cliEntry, ...supervisorArgs], {
|
|
536
|
+
stdio: "ignore",
|
|
537
|
+
detached: true,
|
|
538
|
+
env: process.env,
|
|
539
|
+
windowsHide: true,
|
|
540
|
+
});
|
|
541
|
+
supervisorProcess.once("error", (err) => {
|
|
542
|
+
console.error(`Failed to start Agent Inspector background supervisor: ${err.message}`);
|
|
543
|
+
});
|
|
544
|
+
supervisorProcess.unref();
|
|
545
|
+
|
|
546
|
+
if (await waitForInspectorHealthy(port, 10000, host)) {
|
|
547
|
+
console.log(`agent-inspector background server is ready at ${url}`);
|
|
548
|
+
printAccessHints(port, host);
|
|
549
|
+
if (legacyAliasPort !== null) {
|
|
550
|
+
console.log(` Legacy proxy: http://localhost:${legacyAliasPort}/proxy`);
|
|
551
|
+
console.log(` Legacy MCP: http://localhost:${legacyAliasPort}/api/mcp`);
|
|
552
|
+
}
|
|
553
|
+
console.log(``);
|
|
554
|
+
console.log(`Route AI coding tools through the identity proxy for accurate PID attribution:`);
|
|
555
|
+
console.log(` Claude Code: ANTHROPIC_BASE_URL=http://localhost:${port}/proxy claude`);
|
|
556
|
+
console.log(` OpenCode: LLM_BASE_URL=http://localhost:${port}/proxy opencode`);
|
|
557
|
+
console.log(` MiMo Code: OPENAI_BASE_URL=http://localhost:${port}/proxy mimo`);
|
|
558
|
+
if (open && openWasSpecified) {
|
|
559
|
+
openBrowser(url);
|
|
560
|
+
}
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
console.error(`agent-inspector background server did not become ready at ${url}.`);
|
|
565
|
+
process.exitCode = 1;
|
|
566
|
+
return;
|
|
567
|
+
}
|
|
568
|
+
|
|
485
569
|
console.log(`Server running at ${url}`);
|
|
486
570
|
console.log(` Capture mode: ${captureMode}`);
|
|
487
571
|
console.log(` Proxy: ${url}/proxy`);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{P as o}from"./ProxyViewerContainer-CchT6T-4.js";import"./main-CkKubKth.js";const r=o;export{r as component};
|