@tonyclaw/agent-inspector 3.0.25 → 3.0.27
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 +80 -11
- package/.output/nitro.json +1 -1
- package/.output/public/assets/{CompareDrawer-BnvOPwpe.js → CompareDrawer-BVCAAbbu.js} +1 -1
- package/.output/public/assets/ProxyViewerContainer-CYOXB81n.js +4234 -0
- package/.output/public/assets/{ReplayDialog-BJgoQWdW.js → ReplayDialog-DMX23O5G.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-CpBZEHnM.js → RequestAnatomy-S17pYDRc.js} +1 -1
- package/.output/public/assets/{ResponseView-CWmyRb2M.js → ResponseView-Cf1XrawD.js} +2 -2
- package/.output/public/assets/{StreamingChunkSequence-BWhC8bwx.js → StreamingChunkSequence-BdOrVlCi.js} +1 -1
- package/.output/public/assets/{_sessionId-Cq-2OqUU.js → _sessionId-BnKGmJrR.js} +1 -1
- package/.output/public/assets/{index-Cf8O0Oos.js → index-9fMLCU4d.js} +1 -1
- package/.output/public/assets/{index-BKi9IRtV.js → index-B1atk19i.js} +3 -3
- package/.output/public/assets/index-CmeF5XXS.css +1 -0
- package/.output/public/assets/{index-DdgTJ4QJ.js → index-gY3I-7-D.js} +1 -1
- package/.output/public/assets/{json-viewer-Bqu_4hmm.js → json-viewer-CpyYpPjx.js} +1 -1
- package/.output/server/_libs/lucide-react.mjs +6 -6
- package/.output/server/_libs/three.mjs +26016 -0
- package/.output/server/{_sessionId-Ba7H3Gjw.mjs → _sessionId-eA_h2_s6.mjs} +9 -6
- package/.output/server/_ssr/{CompareDrawer-aH59Ab6x.mjs → CompareDrawer-K2k9G7r1.mjs} +10 -7
- package/.output/server/_ssr/{ProxyViewerContainer-By-I0tJv.mjs → ProxyViewerContainer-CbyBpCAj.mjs} +804 -363
- package/.output/server/_ssr/{ReplayDialog-BO4Vy0et.mjs → ReplayDialog-DacI2Iv0.mjs} +10 -7
- package/.output/server/_ssr/{RequestAnatomy-FtOr7vSS.mjs → RequestAnatomy-gh-pAdkO.mjs} +9 -6
- package/.output/server/_ssr/{ResponseView-cvw6ajue.mjs → ResponseView-BRJKN50-.mjs} +10 -7
- package/.output/server/_ssr/{StreamingChunkSequence-Oc8S2kD6.mjs → StreamingChunkSequence-BQLVEuWY.mjs} +9 -6
- package/.output/server/_ssr/{index-BDRlQheR.mjs → index-DuSWrjbH.mjs} +9 -6
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{json-viewer-Cd6trhQr.mjs → json-viewer-DNs1ZjKI.mjs} +9 -6
- package/.output/server/_ssr/{router-bofP-Ekl.mjs → router-Dgx6-ot3.mjs} +713 -218
- package/.output/server/{_tanstack-start-manifest_v-BPuf86qB.mjs → _tanstack-start-manifest_v-CoGjnkQD.mjs} +1 -1
- package/.output/server/index.mjs +65 -65
- package/README.md +8 -0
- package/package.json +6 -5
- package/src/cli.ts +43 -9
- package/src/components/inspector-pet/InspectorPet.tsx +66 -51
- package/src/components/inspector-pet/InspectorPetCrab3D.tsx +455 -0
- package/src/components/inspector-pet/inspectorPetLogic.ts +28 -43
- package/src/components/providers/ProviderCard.tsx +3 -36
- package/src/components/providers/ProviderForm.tsx +251 -175
- package/src/components/providers/ProvidersPanel.tsx +18 -8
- package/src/components/providers/SettingsDialog.tsx +3 -3
- package/src/components/providers/providerFormCapabilities.ts +36 -0
- package/src/components/proxy-viewer/ProviderLogoStack.tsx +0 -3
- package/src/contracts/anthropic.ts +0 -5
- package/src/contracts/index.ts +0 -4
- package/src/contracts/log.ts +0 -1
- package/src/contracts/openai.ts +0 -3
- package/src/knowledge/openclawClient.ts +22 -9
- package/src/knowledge/openclawGatewayClient.ts +20 -13
- package/src/lib/alertContract.ts +0 -3
- package/src/lib/ecosystemContract.ts +0 -3
- package/src/lib/export-logs.ts +1 -4
- package/src/lib/safeFetch.ts +100 -0
- package/src/lib/ssrfGuard.ts +133 -0
- package/src/lib/stopReason.ts +1 -4
- package/src/lib/unknown.ts +27 -0
- package/src/lib/useProviders.ts +1 -1
- package/src/mcp/mode.ts +3 -9
- package/src/mcp/server.ts +5 -14
- package/src/mcp/toolHandlers.ts +45 -54
- package/src/proxy/constants.ts +17 -0
- package/src/proxy/formats/anthropic/handler.ts +5 -1
- package/src/proxy/formats/anthropic/schemas.ts +1 -7
- package/src/proxy/formats/index.ts +1 -1
- package/src/proxy/formats/openai/schemas.ts +0 -3
- package/src/proxy/formats/registry.ts +0 -3
- package/src/proxy/handler.ts +91 -12
- package/src/proxy/identityProxy.ts +74 -1
- package/src/proxy/logImporter.ts +82 -12
- package/src/proxy/logIndex.ts +1 -4
- package/src/proxy/providerSecretStore.ts +181 -0
- package/src/proxy/providers.ts +84 -11
- package/src/proxy/schemas.ts +1 -8
- package/src/proxy/sqliteLogIndex.ts +0 -16
- package/src/proxy/store.ts +1 -5
- package/src/proxy/toolSchemaWarnings.ts +1 -9
- package/src/routes/api/logs.$id.replay.ts +17 -5
- package/src/routes/api/providers.$providerId.model-metadata.ts +11 -1
- package/src/routes/api/providers.$providerId.ts +18 -5
- package/src/routes/api/providers.ts +18 -7
- package/styles/globals.css +0 -61
- package/.output/public/assets/ProxyViewerContainer-DcqFqo1m.js +0 -127
- package/.output/public/assets/index-BMYuDL5X.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const tsrStartManifest = () => ({ routes: { __root__: { filePath: "C:/Users/claw/workspace/agent-inspector/src/routes/__root.tsx", children: ["/", "/api/alerts", "/api/config", "/api/groups", "/api/health", "/api/logs", "/api/mcp", "/api/models", "/api/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/index-
|
|
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/index-B1atk19i.js"], scripts: [{ attrs: { type: "module", async: true, src: "/assets/index-B1atk19i.js" } }] }, "/": { filePath: "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", children: void 0, preloads: ["/assets/index-gY3I-7-D.js", "/assets/ProxyViewerContainer-CYOXB81n.js"] }, "/session/$sessionId": { filePath: "C:/Users/claw/workspace/agent-inspector/src/routes/session/$sessionId.tsx", children: void 0, preloads: ["/assets/_sessionId-BnKGmJrR.js", "/assets/ProxyViewerContainer-CYOXB81n.js"] } } });
|
|
2
2
|
export {
|
|
3
3
|
tsrStartManifest
|
|
4
4
|
};
|
package/.output/server/index.mjs
CHANGED
|
@@ -17,124 +17,124 @@ const headers = ((m) => function headersRouteRule(event) {
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
const assets = {
|
|
20
|
-
"/assets/CompareDrawer-BnvOPwpe.js": {
|
|
21
|
-
"type": "text/javascript; charset=utf-8",
|
|
22
|
-
"etag": '"4bc4-5zhLacO6EX3WqI4FuA4lGMXjN0s"',
|
|
23
|
-
"mtime": "2026-07-10T08:00:31.058Z",
|
|
24
|
-
"size": 19396,
|
|
25
|
-
"path": "../public/assets/CompareDrawer-BnvOPwpe.js"
|
|
26
|
-
},
|
|
27
20
|
"/assets/agent-inspector-58K1_MsC.ico": {
|
|
28
21
|
"type": "image/vnd.microsoft.icon",
|
|
29
22
|
"etag": '"38fa-ZD8kPABHYjPIkcH82FMY6iZM7fI"',
|
|
30
|
-
"mtime": "2026-07-
|
|
23
|
+
"mtime": "2026-07-11T04:43:38.031Z",
|
|
31
24
|
"size": 14586,
|
|
32
25
|
"path": "../public/assets/agent-inspector-58K1_MsC.ico"
|
|
33
26
|
},
|
|
34
27
|
"/assets/alibaba-TTwafVwX.svg": {
|
|
35
28
|
"type": "image/svg+xml",
|
|
36
29
|
"etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
|
|
37
|
-
"mtime": "2026-07-
|
|
30
|
+
"mtime": "2026-07-11T04:43:38.031Z",
|
|
38
31
|
"size": 5915,
|
|
39
32
|
"path": "../public/assets/alibaba-TTwafVwX.svg"
|
|
40
33
|
},
|
|
41
|
-
"/assets/
|
|
34
|
+
"/assets/CompareDrawer-BVCAAbbu.js": {
|
|
42
35
|
"type": "text/javascript; charset=utf-8",
|
|
43
|
-
"etag": '"
|
|
44
|
-
"mtime": "2026-07-
|
|
45
|
-
"size":
|
|
46
|
-
"path": "../public/assets/
|
|
36
|
+
"etag": '"4bc4-Zb2MZSke4PGsZAZQWlHQldYzm9M"',
|
|
37
|
+
"mtime": "2026-07-11T04:43:38.031Z",
|
|
38
|
+
"size": 19396,
|
|
39
|
+
"path": "../public/assets/CompareDrawer-BVCAAbbu.js"
|
|
47
40
|
},
|
|
48
|
-
"/assets/json-viewer-
|
|
41
|
+
"/assets/json-viewer-CpyYpPjx.js": {
|
|
49
42
|
"type": "text/javascript; charset=utf-8",
|
|
50
|
-
"etag": '"1ae7-
|
|
51
|
-
"mtime": "2026-07-
|
|
43
|
+
"etag": '"1ae7-AXjzdLeB9CtNkkvC/oR6PHIpZrw"',
|
|
44
|
+
"mtime": "2026-07-11T04:43:38.032Z",
|
|
52
45
|
"size": 6887,
|
|
53
|
-
"path": "../public/assets/json-viewer-
|
|
46
|
+
"path": "../public/assets/json-viewer-CpyYpPjx.js"
|
|
54
47
|
},
|
|
55
|
-
"/assets/index-
|
|
48
|
+
"/assets/index-gY3I-7-D.js": {
|
|
56
49
|
"type": "text/javascript; charset=utf-8",
|
|
57
|
-
"etag": '"265-
|
|
58
|
-
"mtime": "2026-07-
|
|
50
|
+
"etag": '"265-61LM1QLhhYspwWAw/ft2ETl95Zg"',
|
|
51
|
+
"mtime": "2026-07-11T04:43:38.031Z",
|
|
59
52
|
"size": 613,
|
|
60
|
-
"path": "../public/assets/index-
|
|
53
|
+
"path": "../public/assets/index-gY3I-7-D.js"
|
|
54
|
+
},
|
|
55
|
+
"/assets/index-9fMLCU4d.js": {
|
|
56
|
+
"type": "text/javascript; charset=utf-8",
|
|
57
|
+
"etag": '"1cd2d-vhf/v641OwP3pvt2nzTr2vXPzE4"',
|
|
58
|
+
"mtime": "2026-07-11T04:43:38.032Z",
|
|
59
|
+
"size": 118061,
|
|
60
|
+
"path": "../public/assets/index-9fMLCU4d.js"
|
|
61
61
|
},
|
|
62
62
|
"/assets/minimax-BPMzvuL-.jpeg": {
|
|
63
63
|
"type": "image/jpeg",
|
|
64
64
|
"etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
|
|
65
|
-
"mtime": "2026-07-
|
|
65
|
+
"mtime": "2026-07-11T04:43:38.031Z",
|
|
66
66
|
"size": 6918,
|
|
67
67
|
"path": "../public/assets/minimax-BPMzvuL-.jpeg"
|
|
68
68
|
},
|
|
69
|
-
"/assets/index-
|
|
69
|
+
"/assets/index-CmeF5XXS.css": {
|
|
70
70
|
"type": "text/css; charset=utf-8",
|
|
71
|
-
"etag": '"
|
|
72
|
-
"mtime": "2026-07-
|
|
73
|
-
"size":
|
|
74
|
-
"path": "../public/assets/index-
|
|
75
|
-
},
|
|
76
|
-
"/assets/ReplayDialog-BJgoQWdW.js": {
|
|
77
|
-
"type": "text/javascript; charset=utf-8",
|
|
78
|
-
"etag": '"3348-pJMqX96FOv3wEI7PoEEMFpyJ11w"',
|
|
79
|
-
"mtime": "2026-07-10T08:00:31.058Z",
|
|
80
|
-
"size": 13128,
|
|
81
|
-
"path": "../public/assets/ReplayDialog-BJgoQWdW.js"
|
|
71
|
+
"etag": '"28a56-x7Wmw+oL5ZFDjFw5JRwjxSop3gg"',
|
|
72
|
+
"mtime": "2026-07-11T04:43:38.031Z",
|
|
73
|
+
"size": 166486,
|
|
74
|
+
"path": "../public/assets/index-CmeF5XXS.css"
|
|
82
75
|
},
|
|
83
|
-
"/assets/
|
|
76
|
+
"/assets/RequestAnatomy-S17pYDRc.js": {
|
|
84
77
|
"type": "text/javascript; charset=utf-8",
|
|
85
|
-
"etag": '"
|
|
86
|
-
"mtime": "2026-07-
|
|
87
|
-
"size":
|
|
88
|
-
"path": "../public/assets/
|
|
78
|
+
"etag": '"43f3-DId6+xakRnGM+B/ZQpGxfeV9YU0"',
|
|
79
|
+
"mtime": "2026-07-11T04:43:38.032Z",
|
|
80
|
+
"size": 17395,
|
|
81
|
+
"path": "../public/assets/RequestAnatomy-S17pYDRc.js"
|
|
89
82
|
},
|
|
90
|
-
"/assets/ResponseView-
|
|
83
|
+
"/assets/ResponseView-Cf1XrawD.js": {
|
|
91
84
|
"type": "text/javascript; charset=utf-8",
|
|
92
|
-
"etag": '"47fe-
|
|
93
|
-
"mtime": "2026-07-
|
|
85
|
+
"etag": '"47fe-kAztjtZjRuPE6xDPPKWIypxT0pw"',
|
|
86
|
+
"mtime": "2026-07-11T04:43:38.032Z",
|
|
94
87
|
"size": 18430,
|
|
95
|
-
"path": "../public/assets/ResponseView-
|
|
88
|
+
"path": "../public/assets/ResponseView-Cf1XrawD.js"
|
|
96
89
|
},
|
|
97
|
-
"/assets/
|
|
90
|
+
"/assets/StreamingChunkSequence-BdOrVlCi.js": {
|
|
98
91
|
"type": "text/javascript; charset=utf-8",
|
|
99
|
-
"etag": '"
|
|
100
|
-
"mtime": "2026-07-
|
|
101
|
-
"size":
|
|
102
|
-
"path": "../public/assets/
|
|
92
|
+
"etag": '"e96-lQJVKxQQeI+CfoFlIj48wFou0qg"',
|
|
93
|
+
"mtime": "2026-07-11T04:43:38.032Z",
|
|
94
|
+
"size": 3734,
|
|
95
|
+
"path": "../public/assets/StreamingChunkSequence-BdOrVlCi.js"
|
|
103
96
|
},
|
|
104
|
-
"/assets/
|
|
97
|
+
"/assets/ReplayDialog-DMX23O5G.js": {
|
|
105
98
|
"type": "text/javascript; charset=utf-8",
|
|
106
|
-
"etag": '"
|
|
107
|
-
"mtime": "2026-07-
|
|
108
|
-
"size":
|
|
109
|
-
"path": "../public/assets/
|
|
99
|
+
"etag": '"3348-Y6DIYl0Hh8PNYNBckbjWZMRAVXk"',
|
|
100
|
+
"mtime": "2026-07-11T04:43:38.032Z",
|
|
101
|
+
"size": 13128,
|
|
102
|
+
"path": "../public/assets/ReplayDialog-DMX23O5G.js"
|
|
110
103
|
},
|
|
111
|
-
"/assets/_sessionId-
|
|
104
|
+
"/assets/_sessionId-BnKGmJrR.js": {
|
|
112
105
|
"type": "text/javascript; charset=utf-8",
|
|
113
|
-
"etag": '"36d-
|
|
114
|
-
"mtime": "2026-07-
|
|
106
|
+
"etag": '"36d-RhevzYZMuLpSJjgi/aeqAk1rL4A"',
|
|
107
|
+
"mtime": "2026-07-11T04:43:38.031Z",
|
|
115
108
|
"size": 877,
|
|
116
|
-
"path": "../public/assets/_sessionId-
|
|
109
|
+
"path": "../public/assets/_sessionId-BnKGmJrR.js"
|
|
110
|
+
},
|
|
111
|
+
"/assets/index-B1atk19i.js": {
|
|
112
|
+
"type": "text/javascript; charset=utf-8",
|
|
113
|
+
"etag": '"537cd-GY35Hkfq1WcIm1S1m2dfzIGL8WU"',
|
|
114
|
+
"mtime": "2026-07-11T04:43:38.031Z",
|
|
115
|
+
"size": 341965,
|
|
116
|
+
"path": "../public/assets/index-B1atk19i.js"
|
|
117
117
|
},
|
|
118
118
|
"/assets/zhipuai-BPNAnxo-.svg": {
|
|
119
119
|
"type": "image/svg+xml",
|
|
120
120
|
"etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
|
|
121
|
-
"mtime": "2026-07-
|
|
121
|
+
"mtime": "2026-07-11T04:43:38.031Z",
|
|
122
122
|
"size": 11256,
|
|
123
123
|
"path": "../public/assets/zhipuai-BPNAnxo-.svg"
|
|
124
124
|
},
|
|
125
125
|
"/assets/qwen-CONDcHqt.png": {
|
|
126
126
|
"type": "image/png",
|
|
127
127
|
"etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
|
|
128
|
-
"mtime": "2026-07-
|
|
128
|
+
"mtime": "2026-07-11T04:43:38.031Z",
|
|
129
129
|
"size": 357059,
|
|
130
130
|
"path": "../public/assets/qwen-CONDcHqt.png"
|
|
131
131
|
},
|
|
132
|
-
"/assets/ProxyViewerContainer-
|
|
132
|
+
"/assets/ProxyViewerContainer-CYOXB81n.js": {
|
|
133
133
|
"type": "text/javascript; charset=utf-8",
|
|
134
|
-
"etag": '"
|
|
135
|
-
"mtime": "2026-07-
|
|
136
|
-
"size":
|
|
137
|
-
"path": "../public/assets/ProxyViewerContainer-
|
|
134
|
+
"etag": '"1404bd-m6RVh35PDpz6DtJ+NOh+zTs1XG8"',
|
|
135
|
+
"mtime": "2026-07-11T04:43:38.032Z",
|
|
136
|
+
"size": 1311933,
|
|
137
|
+
"path": "../public/assets/ProxyViewerContainer-CYOXB81n.js"
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
140
|
function readAsset(id) {
|
package/README.md
CHANGED
|
@@ -31,6 +31,14 @@ npm install -g @tonyclaw/agent-inspector-mcp
|
|
|
31
31
|
agent-inspector-mcp doctor
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
+
Agent Inspector requires Node.js 22 or newer. Node.js 24 LTS is recommended for production use.
|
|
35
|
+
|
|
36
|
+
By default, Agent Inspector binds to `127.0.0.1`. With `--host 0.0.0.0`, remote coding tools may
|
|
37
|
+
use `/proxy`, while the UI, REST API, and MCP control plane remain local-only. Set
|
|
38
|
+
`AGENT_INSPECTOR_CONTROL_TOKEN` for authenticated remote API/MCP clients, or explicitly set
|
|
39
|
+
`AGENT_INSPECTOR_ALLOW_REMOTE_CONTROL=1` only behind a trusted firewall or loopback-only port
|
|
40
|
+
mapping.
|
|
41
|
+
|
|
34
42
|
`@tonyclaw/agent-inspector` runs the local UI, proxy, REST API, storage, and built-in
|
|
35
43
|
`/api/mcp` endpoint. `@tonyclaw/agent-inspector-mcp` is the enhancement package for
|
|
36
44
|
stdio-first MCP clients and setup automation; it bridges to the local Inspector endpoint without
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tonyclaw/agent-inspector",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.27",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Agent observability and knowledge capture layer for AI coding tools.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"engines": {
|
|
8
|
-
"node": ">=
|
|
8
|
+
"node": ">=22.0.0"
|
|
9
9
|
},
|
|
10
10
|
"author": "TonyClaw",
|
|
11
11
|
"repository": {
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"dev": "vite dev",
|
|
56
56
|
"start": "node .output/cli.js",
|
|
57
57
|
"build": "vite build && bun build:cli && bun build:mcp",
|
|
58
|
-
"build:cli": "npx esbuild src/cli.ts --bundle --platform=node --target=
|
|
59
|
-
"build:mcp": "npx esbuild packages/agent-inspector-mcp/src/cli.ts --bundle --platform=node --target=
|
|
58
|
+
"build:cli": "npx esbuild src/cli.ts --bundle --platform=node --target=node22 --format=esm --outfile=.output/cli.js",
|
|
59
|
+
"build:mcp": "npx esbuild packages/agent-inspector-mcp/src/cli.ts --bundle --platform=node --target=node22 --format=esm --outfile=packages/agent-inspector-mcp/dist/cli.js",
|
|
60
60
|
"postinstall": "node scripts/setup-windows-runtime.mjs && node scripts/setup-agent-skills.mjs",
|
|
61
61
|
"prepublishOnly": "npm run build",
|
|
62
62
|
"typecheck": "tsc --noEmit",
|
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
"react-markdown": "^10.1.0",
|
|
93
93
|
"swr": "^2.4.1",
|
|
94
94
|
"tailwind-merge": "^3.4.0",
|
|
95
|
+
"three": "0.185.1",
|
|
95
96
|
"tw-animate-css": "^1.4.0",
|
|
96
97
|
"zod": "^4.3.6"
|
|
97
98
|
},
|
|
@@ -101,13 +102,13 @@
|
|
|
101
102
|
},
|
|
102
103
|
"devDependencies": {
|
|
103
104
|
"@biomejs/biome": "^2.3.14",
|
|
104
|
-
"@cfworker/json-schema": "^4.1.1",
|
|
105
105
|
"@eslint/js": "^10.0.1",
|
|
106
106
|
"@ladle/react": "^5.1.1",
|
|
107
107
|
"@tailwindcss/vite": "^4.1.18",
|
|
108
108
|
"@types/bun": "1.3.8",
|
|
109
109
|
"@types/react": "^19",
|
|
110
110
|
"@types/react-dom": "^19",
|
|
111
|
+
"@types/three": "0.185.1",
|
|
111
112
|
"@typescript-eslint/eslint-plugin": "^8.55.0",
|
|
112
113
|
"@typescript-eslint/parser": "^8.55.0",
|
|
113
114
|
"@vitejs/plugin-react": "^5.1.4",
|
package/src/cli.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { existsSync } from "node:fs";
|
|
|
8
8
|
import type { Readable, Writable } from "node:stream";
|
|
9
9
|
import {
|
|
10
10
|
formatAccessHintLines,
|
|
11
|
+
isLoopbackHost,
|
|
11
12
|
isValidBindHost,
|
|
12
13
|
localUrlForPort,
|
|
13
14
|
networkUrlsForBindHost,
|
|
@@ -31,6 +32,7 @@ const __dirname = dirname(__filename);
|
|
|
31
32
|
const DEFAULT_PORT = 9527;
|
|
32
33
|
const LEGACY_ALIAS_PORT = 9527;
|
|
33
34
|
const DEFAULT_UPSTREAM_PORT = 9529;
|
|
35
|
+
const DEFAULT_BIND_HOST = "127.0.0.1";
|
|
34
36
|
const LOCAL_PROBE_TIMEOUT_MS = 2000;
|
|
35
37
|
const BRANDED_WINDOWS_RUNTIME_EXE = "agent-inspector.exe";
|
|
36
38
|
const DEFAULT_CAPTURE_MODE = "simple";
|
|
@@ -229,6 +231,16 @@ function printAccessHints(port: number, host?: string): void {
|
|
|
229
231
|
for (const line of formatAccessHintLines(port, networkUrls, host)) {
|
|
230
232
|
console.log(line);
|
|
231
233
|
}
|
|
234
|
+
if (!isLoopbackHost(host)) {
|
|
235
|
+
if (process.env["AGENT_INSPECTOR_ALLOW_REMOTE_CONTROL"] === "1") {
|
|
236
|
+
console.warn(" Control plane: REMOTE ACCESS ENABLED by administrator override");
|
|
237
|
+
} else {
|
|
238
|
+
console.log(" Control plane: local only; remote clients may use /proxy");
|
|
239
|
+
if ((process.env["AGENT_INSPECTOR_CONTROL_TOKEN"] ?? "") !== "") {
|
|
240
|
+
console.log(" Remote API: Bearer token authentication enabled");
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
232
244
|
}
|
|
233
245
|
|
|
234
246
|
type BackgroundSupervisorOptions = {
|
|
@@ -289,13 +301,18 @@ function pickUpstreamPort(publicPort: number, legacyAliasPort: number | null): n
|
|
|
289
301
|
async function tryStartIdentityProxy(
|
|
290
302
|
identityPort: number,
|
|
291
303
|
upstreamPort: number,
|
|
292
|
-
|
|
304
|
+
listenHost: string,
|
|
305
|
+
upstreamHost: string,
|
|
293
306
|
): Promise<import("node:http").Server | null> {
|
|
294
307
|
try {
|
|
295
308
|
const server = await startIdentityProxy({
|
|
296
309
|
listenPort: identityPort,
|
|
297
|
-
|
|
310
|
+
listenHost,
|
|
311
|
+
upstreamHost,
|
|
298
312
|
upstreamPort,
|
|
313
|
+
restrictRemoteControl: !isLoopbackHost(listenHost),
|
|
314
|
+
allowRemoteControl: process.env["AGENT_INSPECTOR_ALLOW_REMOTE_CONTROL"] === "1",
|
|
315
|
+
controlToken: process.env["AGENT_INSPECTOR_CONTROL_TOKEN"],
|
|
299
316
|
});
|
|
300
317
|
return server;
|
|
301
318
|
} catch (err) {
|
|
@@ -317,7 +334,8 @@ async function runStart(args: string[]): Promise<void> {
|
|
|
317
334
|
process.env["AGENT_INSPECTOR_CAPTURE_MODE"] ?? process.env["AGENT_INSPECTOR_MODE"];
|
|
318
335
|
|
|
319
336
|
let port = portDefault;
|
|
320
|
-
let host =
|
|
337
|
+
let host =
|
|
338
|
+
envHost !== undefined && envHost.trim().length > 0 ? envHost.trim() : DEFAULT_BIND_HOST;
|
|
321
339
|
let open = true;
|
|
322
340
|
let openWasSpecified = false;
|
|
323
341
|
let background = false;
|
|
@@ -457,6 +475,18 @@ async function runStart(args: string[]): Promise<void> {
|
|
|
457
475
|
return;
|
|
458
476
|
}
|
|
459
477
|
|
|
478
|
+
if (
|
|
479
|
+
!enableIdentityProxy &&
|
|
480
|
+
!isLoopbackHost(host) &&
|
|
481
|
+
process.env["AGENT_INSPECTOR_ALLOW_REMOTE_CONTROL"] !== "1"
|
|
482
|
+
) {
|
|
483
|
+
console.error(
|
|
484
|
+
"Refusing an unprotected remote bind with --no-identity-proxy. Keep the identity proxy enabled or set AGENT_INSPECTOR_ALLOW_REMOTE_CONTROL=1 explicitly.",
|
|
485
|
+
);
|
|
486
|
+
process.exitCode = 1;
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
|
|
460
490
|
/**
|
|
461
491
|
* Check if a port is in use and kill the process using it
|
|
462
492
|
*/
|
|
@@ -475,6 +505,7 @@ async function runStart(args: string[]): Promise<void> {
|
|
|
475
505
|
// the public-facing port(s). When the identity proxy is disabled we fall
|
|
476
506
|
// back to TanStack listening on the public port directly.
|
|
477
507
|
const upstreamPort = enableIdentityProxy ? pickUpstreamPort(port, legacyAliasPort) : port;
|
|
508
|
+
const upstreamHost = enableIdentityProxy ? DEFAULT_BIND_HOST : host;
|
|
478
509
|
process.env["PORT"] = String(upstreamPort);
|
|
479
510
|
|
|
480
511
|
const url = urlForHost(port, host);
|
|
@@ -627,10 +658,8 @@ async function runStart(args: string[]): Promise<void> {
|
|
|
627
658
|
if (providersJson !== undefined) {
|
|
628
659
|
serverEnv["AGENT_INSPECTOR_PROVIDERS_JSON"] = providersJson;
|
|
629
660
|
}
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
serverEnv["NITRO_HOST"] = host;
|
|
633
|
-
}
|
|
661
|
+
serverEnv["HOST"] = upstreamHost;
|
|
662
|
+
serverEnv["NITRO_HOST"] = upstreamHost;
|
|
634
663
|
serverEnv["AGENT_INSPECTOR_PUBLIC_PORT"] = String(port);
|
|
635
664
|
serverEnv["PROXY_PORT"] = String(port);
|
|
636
665
|
serverEnv["AGENT_INSPECTOR_CAPTURE_MODE"] = captureMode;
|
|
@@ -664,12 +693,17 @@ async function runStart(args: string[]): Promise<void> {
|
|
|
664
693
|
server: import("node:http").Server;
|
|
665
694
|
}> = [];
|
|
666
695
|
if (enableIdentityProxy) {
|
|
667
|
-
const primaryProxy = await tryStartIdentityProxy(port, upstreamPort, host);
|
|
696
|
+
const primaryProxy = await tryStartIdentityProxy(port, upstreamPort, host, upstreamHost);
|
|
668
697
|
if (primaryProxy !== null) {
|
|
669
698
|
identityProxies.push({ label: "primary", port, server: primaryProxy });
|
|
670
699
|
}
|
|
671
700
|
if (legacyAliasPort !== null) {
|
|
672
|
-
const legacyProxy = await tryStartIdentityProxy(
|
|
701
|
+
const legacyProxy = await tryStartIdentityProxy(
|
|
702
|
+
legacyAliasPort,
|
|
703
|
+
upstreamPort,
|
|
704
|
+
host,
|
|
705
|
+
upstreamHost,
|
|
706
|
+
);
|
|
673
707
|
if (legacyProxy !== null) {
|
|
674
708
|
identityProxies.push({ label: "legacy", port: legacyAliasPort, server: legacyProxy });
|
|
675
709
|
}
|