@tonyclaw/agent-inspector 2.0.16 → 2.0.18
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 +394 -55
- package/.output/nitro.json +1 -1
- package/.output/public/assets/{CompareDrawer-DPs4UHwd.js → CompareDrawer-CepU-dLW.js} +1 -1
- package/.output/public/assets/{ProxyViewerContainer-B1KylMPs.js → ProxyViewerContainer-BG7rc33d.js} +16 -16
- package/.output/public/assets/{ReplayDialog-8ISC28XF.js → ReplayDialog-DK6SPv8X.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-BhbsgfBO.js → RequestAnatomy-C_C6ZU3T.js} +1 -1
- package/.output/public/assets/{ResponseView-CyM7JXeA.js → ResponseView-Bqpra4Zw.js} +1 -1
- package/.output/public/assets/{StreamingChunkSequence-BaX0x38n.js → StreamingChunkSequence-CdPbpprq.js} +1 -1
- package/.output/public/assets/_sessionId-CsNARHj5.js +1 -0
- package/.output/public/assets/index-37NfO0zx.js +1 -0
- package/.output/public/assets/{main-B2t-3SYj.js → main-BRXsrxtv.js} +2 -2
- package/.output/server/{_sessionId-CEbZTs68.mjs → _sessionId-B8Bbfs-v.mjs} +2 -2
- package/.output/server/_ssr/{CompareDrawer-CEo48Wsu.mjs → CompareDrawer-TgGZLf1J.mjs} +2 -2
- package/.output/server/_ssr/{ProxyViewerContainer-5ekIK_jx.mjs → ProxyViewerContainer-B_ppaNmQ.mjs} +41 -12
- package/.output/server/_ssr/{ReplayDialog-C0nEvbYo.mjs → ReplayDialog-BXlajnMC.mjs} +3 -3
- package/.output/server/_ssr/{RequestAnatomy-CT55prmM.mjs → RequestAnatomy-CCrx09-i.mjs} +2 -2
- package/.output/server/_ssr/{ResponseView-DBZSBCOD.mjs → ResponseView-BxtMJrov.mjs} +2 -2
- package/.output/server/_ssr/{StreamingChunkSequence-BuVT7Oke.mjs → StreamingChunkSequence-BlpdSPb8.mjs} +2 -2
- package/.output/server/_ssr/{index-Cw_zJVQv.mjs → index-BeTMNSJy.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{router-DxjqHipT.mjs → router-Ddl1tuU7.mjs} +27 -11
- package/.output/server/{_tanstack-start-manifest_v-xeOo5gW5.mjs → _tanstack-start-manifest_v-Bvdz_U0f.mjs} +1 -1
- package/.output/server/index.mjs +56 -56
- package/README.md +37 -5
- package/package.json +3 -3
- package/scripts/setup-agent-skills.mjs +64 -0
- package/src/cli/doctor.ts +12 -5
- package/src/cli/onboard.ts +407 -13
- package/src/cli/templates/codex-skill-onboard.ts +5 -0
- package/src/cli/templates/command-onboard.ts +12 -4
- package/src/cli/templates/skill-onboard.ts +17 -21
- package/src/components/OnboardingBanner.tsx +5 -0
- package/src/components/providers/SettingsDialog.tsx +22 -4
- package/src/proxy/dataDir.ts +35 -13
- package/.output/public/assets/_sessionId-CShO0OrR.js +0 -1
- package/.output/public/assets/index-BkdYiTpV.js +0 -1
- package/scripts/setup-codex-skill.mjs +0 -38
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
2
|
-
import { g as getLogFormatAdapter, f as formatTokens, c as cn, s as getStatusCategory, B as Badge, t as Collapsible, v as CollapsibleTrigger, w as CollapsibleContent, x as ScrollArea, y as JsonViewer, z as safeJsonValue } from "./ProxyViewerContainer-
|
|
3
|
-
import "./router-
|
|
2
|
+
import { g as getLogFormatAdapter, f as formatTokens, c as cn, s as getStatusCategory, B as Badge, t as Collapsible, v as CollapsibleTrigger, w as CollapsibleContent, x as ScrollArea, y as JsonViewer, z as safeJsonValue } from "./ProxyViewerContainer-B_ppaNmQ.mjs";
|
|
3
|
+
import "./router-Ddl1tuU7.mjs";
|
|
4
4
|
import "../_libs/modelcontextprotocol__server.mjs";
|
|
5
5
|
import "../_libs/jszip.mjs";
|
|
6
6
|
import { Z as Zap, j as TriangleAlert, ad as CircleStop, B as Brain, b as ChevronDown, f as ChevronRight, T as Terminal } from "../_libs/lucide-react.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
2
|
-
import { k as TooltipProvider, l as Tooltip, m as TooltipTrigger, B as Badge, n as TooltipContent, y as JsonViewer } from "./ProxyViewerContainer-
|
|
3
|
-
import "./router-
|
|
2
|
+
import { k as TooltipProvider, l as Tooltip, m as TooltipTrigger, B as Badge, n as TooltipContent, y as JsonViewer } from "./ProxyViewerContainer-B_ppaNmQ.mjs";
|
|
3
|
+
import "./router-Ddl1tuU7.mjs";
|
|
4
4
|
import "../_libs/modelcontextprotocol__server.mjs";
|
|
5
5
|
import "../_libs/jszip.mjs";
|
|
6
6
|
import { b as ChevronDown, f as ChevronRight, L as LoaderCircle } from "../_libs/lucide-react.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as ProxyViewerContainer } from "./ProxyViewerContainer-
|
|
1
|
+
import { P as ProxyViewerContainer } from "./ProxyViewerContainer-B_ppaNmQ.mjs";
|
|
2
2
|
import "../_libs/react.mjs";
|
|
3
|
-
import "./router-
|
|
3
|
+
import "./router-Ddl1tuU7.mjs";
|
|
4
4
|
import "../_libs/modelcontextprotocol__server.mjs";
|
|
5
5
|
import "../_libs/jszip.mjs";
|
|
6
6
|
import "../_libs/swr.mjs";
|
|
@@ -198,7 +198,7 @@ function getResponse() {
|
|
|
198
198
|
return event.res;
|
|
199
199
|
}
|
|
200
200
|
async function getStartManifest(matchedRoutes) {
|
|
201
|
-
const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-
|
|
201
|
+
const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-Bvdz_U0f.mjs");
|
|
202
202
|
const startManifest = tsrStartManifest();
|
|
203
203
|
const rootRoute = startManifest.routes[rootRouteId] = startManifest.routes[rootRouteId] || {};
|
|
204
204
|
rootRoute.assets = rootRoute.assets || [];
|
|
@@ -767,7 +767,7 @@ let entriesPromise;
|
|
|
767
767
|
let baseManifestPromise;
|
|
768
768
|
let cachedFinalManifestPromise;
|
|
769
769
|
async function loadEntries() {
|
|
770
|
-
const routerEntry = await import("./router-
|
|
770
|
+
const routerEntry = await import("./router-Ddl1tuU7.mjs").then((n) => n.n);
|
|
771
771
|
const startEntry = await import("./start-HYkvq4Ni.mjs");
|
|
772
772
|
return { startEntry, routerEntry };
|
|
773
773
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as createRouter, a as createRootRoute, b as createFileRoute, l as lazyRouteComponent, O as Outlet, H as HeadContent, S as Scripts } from "../_libs/tanstack__react-router.mjs";
|
|
2
2
|
import { j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
3
3
|
import { S as SWRConfig } from "../_libs/swr.mjs";
|
|
4
|
-
import { existsSync, readFileSync, mkdirSync, writeFileSync, renameSync, copyFileSync, unlinkSync } from "node:fs";
|
|
4
|
+
import { existsSync, readFileSync, mkdirSync, writeFileSync, renameSync, copyFileSync, unlinkSync, cpSync, rmSync } from "node:fs";
|
|
5
5
|
import fs, { mkdir, appendFile, readFile, open, readdir, stat, unlink, writeFile } from "node:fs/promises";
|
|
6
6
|
import { Buffer } from "node:buffer";
|
|
7
7
|
import path, { join, isAbsolute, dirname } from "node:path";
|
|
@@ -92,7 +92,7 @@ function RootDocument({ children }) {
|
|
|
92
92
|
] })
|
|
93
93
|
] });
|
|
94
94
|
}
|
|
95
|
-
const $$splitComponentImporter$1 = () => import("./index-
|
|
95
|
+
const $$splitComponentImporter$1 = () => import("./index-BeTMNSJy.mjs");
|
|
96
96
|
const Route$r = createFileRoute("/")({
|
|
97
97
|
component: lazyRouteComponent($$splitComponentImporter$1, "component")
|
|
98
98
|
});
|
|
@@ -135,7 +135,7 @@ function decodeSessionIdFromPath(encoded) {
|
|
|
135
135
|
function getSessionPath(sessionId) {
|
|
136
136
|
return `/session/${encodeSessionIdForPath(sessionId)}`;
|
|
137
137
|
}
|
|
138
|
-
const $$splitComponentImporter = () => import("../_sessionId-
|
|
138
|
+
const $$splitComponentImporter = () => import("../_sessionId-B8Bbfs-v.mjs");
|
|
139
139
|
const Route$q = createFileRoute("/session/$sessionId")({
|
|
140
140
|
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
141
141
|
parseParams: (params) => ({
|
|
@@ -146,16 +146,19 @@ const Route$q = createFileRoute("/session/$sessionId")({
|
|
|
146
146
|
})
|
|
147
147
|
});
|
|
148
148
|
const CURRENT_DATA_DIR_NAME = ".agent-inspector";
|
|
149
|
-
const
|
|
149
|
+
const LEGACY_DATA_DIR_NAMES = [".llm-inspector", ".llm-agent"];
|
|
150
150
|
function getDataDir() {
|
|
151
|
-
|
|
151
|
+
migrateLegacyDataDirs();
|
|
152
|
+
return resolveDataDir();
|
|
152
153
|
}
|
|
153
154
|
function hasDataDirState(pathExists, dir) {
|
|
154
155
|
return pathExists(join(dir, "providers.json")) || pathExists(join(dir, "config.json")) || pathExists(join(dir, "logs")) || pathExists(join(dir, "chunks"));
|
|
155
156
|
}
|
|
156
|
-
function
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
function defaultBaseDir(env = process.env, platform = process.platform) {
|
|
158
|
+
return platform === "win32" ? env["USERPROFILE"] ?? env["APPDATA"] ?? "C:\\" : env["HOME"] ?? "/tmp";
|
|
159
|
+
}
|
|
160
|
+
function resolveDataDir(_pathExists, env = process.env, platform = process.platform) {
|
|
161
|
+
const base = defaultBaseDir(env, platform);
|
|
159
162
|
const dirEnv = env["AGENT_INSPECTOR_DATA_DIR"];
|
|
160
163
|
if (dirEnv !== void 0 && dirEnv !== "") {
|
|
161
164
|
return isAbsolute(dirEnv) ? dirEnv : join(base, dirEnv);
|
|
@@ -164,13 +167,26 @@ function resolveDataDir(pathExists, env = process.env, platform = process.platfo
|
|
|
164
167
|
if (legacyDirEnv !== void 0 && legacyDirEnv !== "") {
|
|
165
168
|
return isAbsolute(legacyDirEnv) ? legacyDirEnv : join(base, legacyDirEnv);
|
|
166
169
|
}
|
|
167
|
-
|
|
168
|
-
const legacyDir = join(base, LEGACY_DATA_DIR_NAME);
|
|
169
|
-
return !hasDataDirState(pathExists, currentDir) && hasDataDirState(pathExists, legacyDir) ? legacyDir : currentDir;
|
|
170
|
+
return join(base, CURRENT_DATA_DIR_NAME);
|
|
170
171
|
}
|
|
171
172
|
function hasExplicitDataDir() {
|
|
172
173
|
return process.env["AGENT_INSPECTOR_DATA_DIR"] !== void 0 && process.env["AGENT_INSPECTOR_DATA_DIR"] !== "" || process.env["AGENT_INSPECTOR_CONFIG_DIR"] !== void 0 && process.env["AGENT_INSPECTOR_CONFIG_DIR"] !== "";
|
|
173
174
|
}
|
|
175
|
+
function migrateLegacyDataDirs() {
|
|
176
|
+
if (hasExplicitDataDir()) return;
|
|
177
|
+
const base = defaultBaseDir();
|
|
178
|
+
const currentDir = join(base, CURRENT_DATA_DIR_NAME);
|
|
179
|
+
if (hasDataDirState(existsSync, currentDir)) return;
|
|
180
|
+
for (const legacyName of LEGACY_DATA_DIR_NAMES) {
|
|
181
|
+
const legacyDir = join(base, legacyName);
|
|
182
|
+
if (!existsSync(legacyDir)) continue;
|
|
183
|
+
try {
|
|
184
|
+
cpSync(legacyDir, currentDir, { recursive: true, force: true });
|
|
185
|
+
rmSync(legacyDir, { recursive: true, force: true });
|
|
186
|
+
} catch {
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
174
190
|
const RETENTION_DAYS = Number(process.env["LOG_RETENTION_DAYS"] ?? "7");
|
|
175
191
|
function resolveLogDir() {
|
|
176
192
|
const logDirEnv = process.env["LOG_DIR"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const tsrStartManifest = () => ({ "routes": { "__root__": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/__root.tsx", "children": ["/", "/api/config", "/api/health", "/api/logs", "/api/mcp", "/api/models", "/api/providers", "/api/sessions", "/proxy/$", "/session/$sessionId", "/api/knowledge/candidates", "/api/knowledge/project-context", "/api/knowledge/search", "/api/knowledge/sessions/$sessionId/candidates"], "preloads": ["/assets/main-
|
|
1
|
+
const tsrStartManifest = () => ({ "routes": { "__root__": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/__root.tsx", "children": ["/", "/api/config", "/api/health", "/api/logs", "/api/mcp", "/api/models", "/api/providers", "/api/sessions", "/proxy/$", "/session/$sessionId", "/api/knowledge/candidates", "/api/knowledge/project-context", "/api/knowledge/search", "/api/knowledge/sessions/$sessionId/candidates"], "preloads": ["/assets/main-BRXsrxtv.js"], "assets": [] }, "/": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", "assets": [], "preloads": ["/assets/index-37NfO0zx.js", "/assets/ProxyViewerContainer-BG7rc33d.js"] }, "/api/config": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/config.ts", "children": ["/api/config/paths"] }, "/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/stream"] }, "/api/mcp": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/mcp.ts" }, "/api/models": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/models.ts" }, "/api/providers": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.ts", "children": ["/api/providers/$providerId", "/api/providers/export", "/api/providers/import", "/api/providers/scan"] }, "/api/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-CsNARHj5.js", "/assets/ProxyViewerContainer-BG7rc33d.js"] }, "/api/config/paths": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/config.paths.ts" }, "/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/chunks", "/api/logs/$id/replay"] }, "/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/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/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/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-BRXsrxtv.js" });
|
|
2
2
|
export {
|
|
3
3
|
tsrStartManifest
|
|
4
4
|
};
|
package/.output/server/index.mjs
CHANGED
|
@@ -35,103 +35,103 @@ const headers = ((m) => function headersRouteRule(event) {
|
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
const assets = {
|
|
38
|
-
"/assets/CompareDrawer-DPs4UHwd.js": {
|
|
39
|
-
"type": "text/javascript; charset=utf-8",
|
|
40
|
-
"etag": '"49fe-juuwKqSVn4vg8/mxHy0rBBfuaz0"',
|
|
41
|
-
"mtime": "2026-06-27T02:00:30.203Z",
|
|
42
|
-
"size": 18942,
|
|
43
|
-
"path": "../public/assets/CompareDrawer-DPs4UHwd.js"
|
|
44
|
-
},
|
|
45
|
-
"/assets/index-BkdYiTpV.js": {
|
|
46
|
-
"type": "text/javascript; charset=utf-8",
|
|
47
|
-
"etag": '"74-95mLx/6mpmji+KzspWJRgr0j2HE"',
|
|
48
|
-
"mtime": "2026-06-27T02:00:30.203Z",
|
|
49
|
-
"size": 116,
|
|
50
|
-
"path": "../public/assets/index-BkdYiTpV.js"
|
|
51
|
-
},
|
|
52
38
|
"/assets/alibaba-TTwafVwX.svg": {
|
|
53
39
|
"type": "image/svg+xml",
|
|
54
40
|
"etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
|
|
55
|
-
"mtime": "2026-06-
|
|
41
|
+
"mtime": "2026-06-27T08:36:43.687Z",
|
|
56
42
|
"size": 5915,
|
|
57
43
|
"path": "../public/assets/alibaba-TTwafVwX.svg"
|
|
58
44
|
},
|
|
59
|
-
"/assets/
|
|
60
|
-
"type": "
|
|
61
|
-
"etag": '"
|
|
62
|
-
"mtime": "2026-06-
|
|
63
|
-
"size":
|
|
64
|
-
"path": "../public/assets/
|
|
45
|
+
"/assets/CompareDrawer-CepU-dLW.js": {
|
|
46
|
+
"type": "text/javascript; charset=utf-8",
|
|
47
|
+
"etag": '"49fe-tnwk5QP+MvW6xIiE1eKLYM0+8Nk"',
|
|
48
|
+
"mtime": "2026-06-27T08:36:43.690Z",
|
|
49
|
+
"size": 18942,
|
|
50
|
+
"path": "../public/assets/CompareDrawer-CepU-dLW.js"
|
|
51
|
+
},
|
|
52
|
+
"/assets/index-37NfO0zx.js": {
|
|
53
|
+
"type": "text/javascript; charset=utf-8",
|
|
54
|
+
"etag": '"74-v4YTqp1BJEeiYpqdSM0kSIiMfRI"',
|
|
55
|
+
"mtime": "2026-06-27T08:36:43.690Z",
|
|
56
|
+
"size": 116,
|
|
57
|
+
"path": "../public/assets/index-37NfO0zx.js"
|
|
65
58
|
},
|
|
66
59
|
"/assets/index-D_nZj9Vt.css": {
|
|
67
60
|
"type": "text/css; charset=utf-8",
|
|
68
61
|
"etag": '"1a275-7T1iSNG2p6BSsqLwdpfky+9evLw"',
|
|
69
|
-
"mtime": "2026-06-
|
|
62
|
+
"mtime": "2026-06-27T08:36:43.690Z",
|
|
70
63
|
"size": 107125,
|
|
71
64
|
"path": "../public/assets/index-D_nZj9Vt.css"
|
|
72
65
|
},
|
|
73
|
-
"/assets/
|
|
66
|
+
"/assets/minimax-BPMzvuL-.jpeg": {
|
|
67
|
+
"type": "image/jpeg",
|
|
68
|
+
"etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
|
|
69
|
+
"mtime": "2026-06-27T08:36:43.689Z",
|
|
70
|
+
"size": 6918,
|
|
71
|
+
"path": "../public/assets/minimax-BPMzvuL-.jpeg"
|
|
72
|
+
},
|
|
73
|
+
"/assets/ReplayDialog-DK6SPv8X.js": {
|
|
74
74
|
"type": "text/javascript; charset=utf-8",
|
|
75
|
-
"etag": '"2361-
|
|
76
|
-
"mtime": "2026-06-
|
|
75
|
+
"etag": '"2361-0dSXxS+yW+fQ1Hwob3rFIHG/8kQ"',
|
|
76
|
+
"mtime": "2026-06-27T08:36:43.690Z",
|
|
77
77
|
"size": 9057,
|
|
78
|
-
"path": "../public/assets/ReplayDialog-
|
|
78
|
+
"path": "../public/assets/ReplayDialog-DK6SPv8X.js"
|
|
79
79
|
},
|
|
80
|
-
"/assets/RequestAnatomy-
|
|
80
|
+
"/assets/RequestAnatomy-C_C6ZU3T.js": {
|
|
81
81
|
"type": "text/javascript; charset=utf-8",
|
|
82
|
-
"etag": '"4485-
|
|
83
|
-
"mtime": "2026-06-
|
|
82
|
+
"etag": '"4485-V13BHPKtOZXhurKshD6hPJdOMjM"',
|
|
83
|
+
"mtime": "2026-06-27T08:36:43.690Z",
|
|
84
84
|
"size": 17541,
|
|
85
|
-
"path": "../public/assets/RequestAnatomy-
|
|
85
|
+
"path": "../public/assets/RequestAnatomy-C_C6ZU3T.js"
|
|
86
86
|
},
|
|
87
|
-
"/assets/ResponseView-
|
|
87
|
+
"/assets/ResponseView-Bqpra4Zw.js": {
|
|
88
88
|
"type": "text/javascript; charset=utf-8",
|
|
89
|
-
"etag": '"30cd-
|
|
90
|
-
"mtime": "2026-06-
|
|
89
|
+
"etag": '"30cd-PKvvu6r831JLikIZLvwX2YM2ppo"',
|
|
90
|
+
"mtime": "2026-06-27T08:36:43.690Z",
|
|
91
91
|
"size": 12493,
|
|
92
|
-
"path": "../public/assets/ResponseView-
|
|
92
|
+
"path": "../public/assets/ResponseView-Bqpra4Zw.js"
|
|
93
|
+
},
|
|
94
|
+
"/assets/main-BRXsrxtv.js": {
|
|
95
|
+
"type": "text/javascript; charset=utf-8",
|
|
96
|
+
"etag": '"51726-Qo0oVA+vO57y3JomfqOlDMWH9Rw"',
|
|
97
|
+
"mtime": "2026-06-27T08:36:43.690Z",
|
|
98
|
+
"size": 333606,
|
|
99
|
+
"path": "../public/assets/main-BRXsrxtv.js"
|
|
93
100
|
},
|
|
94
|
-
"/assets/StreamingChunkSequence-
|
|
101
|
+
"/assets/StreamingChunkSequence-CdPbpprq.js": {
|
|
95
102
|
"type": "text/javascript; charset=utf-8",
|
|
96
|
-
"etag": '"d5b-
|
|
97
|
-
"mtime": "2026-06-
|
|
103
|
+
"etag": '"d5b-YkikdGZkub445VaoQLxeiOhJX2I"',
|
|
104
|
+
"mtime": "2026-06-27T08:36:43.690Z",
|
|
98
105
|
"size": 3419,
|
|
99
|
-
"path": "../public/assets/StreamingChunkSequence-
|
|
106
|
+
"path": "../public/assets/StreamingChunkSequence-CdPbpprq.js"
|
|
100
107
|
},
|
|
101
108
|
"/assets/zhipuai-BPNAnxo-.svg": {
|
|
102
109
|
"type": "image/svg+xml",
|
|
103
110
|
"etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
|
|
104
|
-
"mtime": "2026-06-
|
|
111
|
+
"mtime": "2026-06-27T08:36:43.689Z",
|
|
105
112
|
"size": 11256,
|
|
106
113
|
"path": "../public/assets/zhipuai-BPNAnxo-.svg"
|
|
107
114
|
},
|
|
108
|
-
"/assets/_sessionId-
|
|
115
|
+
"/assets/_sessionId-CsNARHj5.js": {
|
|
109
116
|
"type": "text/javascript; charset=utf-8",
|
|
110
|
-
"etag": '"d2
|
|
111
|
-
"mtime": "2026-06-
|
|
117
|
+
"etag": '"d2-/1womMucNX0MQlv0PbfYhhW01rc"',
|
|
118
|
+
"mtime": "2026-06-27T08:36:43.690Z",
|
|
112
119
|
"size": 210,
|
|
113
|
-
"path": "../public/assets/_sessionId-
|
|
120
|
+
"path": "../public/assets/_sessionId-CsNARHj5.js"
|
|
114
121
|
},
|
|
115
122
|
"/assets/qwen-CONDcHqt.png": {
|
|
116
123
|
"type": "image/png",
|
|
117
124
|
"etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
|
|
118
|
-
"mtime": "2026-06-
|
|
125
|
+
"mtime": "2026-06-27T08:36:43.689Z",
|
|
119
126
|
"size": 357059,
|
|
120
127
|
"path": "../public/assets/qwen-CONDcHqt.png"
|
|
121
128
|
},
|
|
122
|
-
"/assets/
|
|
123
|
-
"type": "text/javascript; charset=utf-8",
|
|
124
|
-
"etag": '"51726-Ul/gmLn0c+fZ++xIS/dA5sr6Iz8"',
|
|
125
|
-
"mtime": "2026-06-27T02:00:30.203Z",
|
|
126
|
-
"size": 333606,
|
|
127
|
-
"path": "../public/assets/main-B2t-3SYj.js"
|
|
128
|
-
},
|
|
129
|
-
"/assets/ProxyViewerContainer-B1KylMPs.js": {
|
|
129
|
+
"/assets/ProxyViewerContainer-BG7rc33d.js": {
|
|
130
130
|
"type": "text/javascript; charset=utf-8",
|
|
131
|
-
"etag": '"
|
|
132
|
-
"mtime": "2026-06-
|
|
133
|
-
"size":
|
|
134
|
-
"path": "../public/assets/ProxyViewerContainer-
|
|
131
|
+
"etag": '"aa779-KSDOFLdOzzw4sKAgeq6GqW/vv6k"',
|
|
132
|
+
"mtime": "2026-06-27T08:36:43.690Z",
|
|
133
|
+
"size": 698233,
|
|
134
|
+
"path": "../public/assets/ProxyViewerContainer-BG7rc33d.js"
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
137
|
function readAsset(id) {
|
package/README.md
CHANGED
|
@@ -50,11 +50,28 @@ The onboarding command installs guided setup skills for local agents:
|
|
|
50
50
|
- Codex: `~/.codex/skills/agent-inspector-onboard/SKILL.md`, focused on connecting
|
|
51
51
|
`http://localhost:25947/api/mcp` through Codex `mcp_servers.agent-inspector`.
|
|
52
52
|
|
|
53
|
-
During npm global install, Agent Inspector also makes a best-effort
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
During npm global install, Agent Inspector also makes a best-effort onboarding skill install for
|
|
54
|
+
detected local agents. If `~/.claude` exists, it installs the Claude Code skill and slash command.
|
|
55
|
+
If `~/.codex` exists, it installs the Codex skill. Generated onboarding files are stamped with the
|
|
56
|
+
current npm package version; a later package install refreshes older generated files automatically,
|
|
57
|
+
while same-version, newer-version, or user-created files without Agent Inspector version metadata are
|
|
58
|
+
left in place.
|
|
59
|
+
|
|
60
|
+
Set `AGENT_INSPECTOR_SKIP_CLAUDE_SKILL=1` or `AGENT_INSPECTOR_SKIP_CODEX_SKILL=1` to skip either
|
|
61
|
+
postinstall step. Set `AGENT_INSPECTOR_INSTALL_CLAUDE_SKILL=1` or
|
|
62
|
+
`AGENT_INSPECTOR_INSTALL_CODEX_SKILL=1` to attempt installation even before the corresponding agent
|
|
63
|
+
home directory exists. To refresh generated onboarding files later, run
|
|
64
|
+
`agent-inspector onboard --force`.
|
|
65
|
+
|
|
66
|
+
To check what is installed, run `agent-inspector onboard --status`. It reports each generated file,
|
|
67
|
+
its stamped version, whether it is current/outdated/custom, and the suggested next command. For
|
|
68
|
+
scripts and CI checks, use `agent-inspector onboard --status --json`.
|
|
69
|
+
|
|
70
|
+
Before uninstalling the npm package, run `agent-inspector onboard --uninstall` to remove matching
|
|
71
|
+
generated onboarding files. The uninstall command only removes Agent Inspector generated files whose
|
|
72
|
+
metadata version matches the currently installed npm package. npm v7+ does not run package uninstall
|
|
73
|
+
lifecycle scripts, so `npm uninstall -g @tonyclaw/agent-inspector` alone cannot reliably clean these
|
|
74
|
+
files automatically.
|
|
58
75
|
|
|
59
76
|
For local development from source:
|
|
60
77
|
|
|
@@ -63,6 +80,21 @@ bun install
|
|
|
63
80
|
bun run dev
|
|
64
81
|
```
|
|
65
82
|
|
|
83
|
+
Run a local health check when you need to verify the proxy and installed
|
|
84
|
+
configuration:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
agent-inspector doctor
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The default doctor check covers proxy health, provider configuration, and
|
|
91
|
+
package metadata. Chrome companion source and zip artifacts are optional and
|
|
92
|
+
only checked when you ask for them explicitly:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
agent-inspector doctor --chrome-extension
|
|
96
|
+
```
|
|
97
|
+
|
|
66
98
|
Then point an AI coding tool at the proxy:
|
|
67
99
|
|
|
68
100
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tonyclaw/agent-inspector",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Agent observability and knowledge capture layer for AI coding tools.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"!src/**/__fixtures__",
|
|
40
40
|
"!src/routeTree.gen.ts",
|
|
41
41
|
"scripts/setup-windows-runtime.mjs",
|
|
42
|
-
"scripts/setup-
|
|
42
|
+
"scripts/setup-agent-skills.mjs",
|
|
43
43
|
"styles",
|
|
44
44
|
".output",
|
|
45
45
|
"!.output/*.exe"
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"start": "node .output/cli.js",
|
|
50
50
|
"build": "vite build && bun build:cli",
|
|
51
51
|
"build:cli": "npx esbuild src/cli.ts --bundle --platform=node --target=node18 --format=esm --outfile=.output/cli.js",
|
|
52
|
-
"postinstall": "node scripts/setup-windows-runtime.mjs && node scripts/setup-
|
|
52
|
+
"postinstall": "node scripts/setup-windows-runtime.mjs && node scripts/setup-agent-skills.mjs",
|
|
53
53
|
"prepublishOnly": "npm run build",
|
|
54
54
|
"typecheck": "tsc --noEmit",
|
|
55
55
|
"lint": "eslint .",
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import { spawnSync } from "node:child_process";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
|
|
7
|
+
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const packageRoot = dirname(scriptDir);
|
|
9
|
+
const cliEntry = join(packageRoot, ".output", "cli.js");
|
|
10
|
+
const claudeHome = process.env["CLAUDE_HOME"] ?? join(homedir(), ".claude");
|
|
11
|
+
const codexHome = process.env["CODEX_HOME"] ?? join(homedir(), ".codex");
|
|
12
|
+
|
|
13
|
+
function cliIsAvailable() {
|
|
14
|
+
return existsSync(cliEntry);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function shouldInstallClaude() {
|
|
18
|
+
if (process.env["AGENT_INSPECTOR_SKIP_CLAUDE_SKILL"] === "1") return false;
|
|
19
|
+
return existsSync(claudeHome) || process.env["AGENT_INSPECTOR_INSTALL_CLAUDE_SKILL"] === "1";
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function shouldInstallCodex() {
|
|
23
|
+
if (process.env["AGENT_INSPECTOR_SKIP_CODEX_SKILL"] === "1") return false;
|
|
24
|
+
return existsSync(codexHome) || process.env["AGENT_INSPECTOR_INSTALL_CODEX_SKILL"] === "1";
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function runOnboard(label, args) {
|
|
28
|
+
const result = spawnSync(process.execPath, [cliEntry, "onboard", ...args], {
|
|
29
|
+
stdio: "ignore",
|
|
30
|
+
windowsHide: true,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
if (result.status !== 0) {
|
|
34
|
+
console.warn(`Skipping ${label} onboard skill installation.`);
|
|
35
|
+
console.warn(`Run later: agent-inspector onboard --force`);
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
console.warn(`Agent Inspector onboard skill ready for ${label}.`);
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function main() {
|
|
44
|
+
if (!cliIsAvailable()) return;
|
|
45
|
+
|
|
46
|
+
if (shouldInstallClaude()) {
|
|
47
|
+
if (runOnboard("Claude Code", ["--skip-codex-skill", "--skill-dir", claudeHome])) {
|
|
48
|
+
console.warn(`Next step for Claude Code: /agent-inspector:onboard`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (shouldInstallCodex()) {
|
|
53
|
+
if (runOnboard("Codex", ["--codex-only"])) {
|
|
54
|
+
console.warn(`Next step for Codex: ask to use the agent-inspector-onboard skill`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
try {
|
|
60
|
+
main();
|
|
61
|
+
} catch (error) {
|
|
62
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
63
|
+
console.warn(`Skipping Agent Inspector onboard skill installation: ${message}`);
|
|
64
|
+
}
|
package/src/cli/doctor.ts
CHANGED
|
@@ -31,6 +31,7 @@ export type DoctorOptions = {
|
|
|
31
31
|
port: number;
|
|
32
32
|
configDir: string | null;
|
|
33
33
|
providersJson: string | null;
|
|
34
|
+
chromeExtension: boolean;
|
|
34
35
|
help: boolean;
|
|
35
36
|
};
|
|
36
37
|
|
|
@@ -87,6 +88,7 @@ export function parseDoctorArgs(
|
|
|
87
88
|
port: envPort ?? DEFAULT_PORT,
|
|
88
89
|
configDir: null,
|
|
89
90
|
providersJson: null,
|
|
91
|
+
chromeExtension: false,
|
|
90
92
|
help: false,
|
|
91
93
|
};
|
|
92
94
|
|
|
@@ -127,6 +129,9 @@ export function parseDoctorArgs(
|
|
|
127
129
|
i++;
|
|
128
130
|
break;
|
|
129
131
|
}
|
|
132
|
+
case "--chrome-extension":
|
|
133
|
+
options.chromeExtension = true;
|
|
134
|
+
break;
|
|
130
135
|
default:
|
|
131
136
|
return { kind: "error", message: `doctor: unknown option ${arg}` };
|
|
132
137
|
}
|
|
@@ -396,13 +401,14 @@ export async function buildDoctorReport(
|
|
|
396
401
|
deps: DoctorDeps = createDoctorDeps(),
|
|
397
402
|
): Promise<DoctorReport> {
|
|
398
403
|
const rootDir = findProjectRoot(deps.cwd, deps);
|
|
399
|
-
const
|
|
404
|
+
const coreChecks = [
|
|
400
405
|
await checkProxyHealth(options.port, deps),
|
|
401
406
|
checkProviderConfig(options, deps),
|
|
402
407
|
checkPackage(rootDir, deps),
|
|
403
|
-
checkExtensionSource(rootDir, deps),
|
|
404
|
-
checkExtensionPackage(rootDir, deps),
|
|
405
408
|
];
|
|
409
|
+
const checks = options.chromeExtension
|
|
410
|
+
? [...coreChecks, checkExtensionSource(rootDir, deps), checkExtensionPackage(rootDir, deps)]
|
|
411
|
+
: coreChecks;
|
|
406
412
|
|
|
407
413
|
const passCount = checks.filter((item) => item.severity === "pass").length;
|
|
408
414
|
const warnCount = checks.filter((item) => item.severity === "warn").length;
|
|
@@ -437,9 +443,10 @@ export function doctorHelp(): string {
|
|
|
437
443
|
"agent-inspector doctor",
|
|
438
444
|
"",
|
|
439
445
|
"Usage:",
|
|
440
|
-
" agent-inspector doctor [--port <port>] [--config-dir <dir>] [--providers <json>]",
|
|
446
|
+
" agent-inspector doctor [--port <port>] [--config-dir <dir>] [--providers <json>] [--chrome-extension]",
|
|
441
447
|
"",
|
|
442
|
-
"Checks local proxy health, provider config presence, package metadata
|
|
448
|
+
"Checks local proxy health, provider config presence, and package metadata.",
|
|
449
|
+
"Pass --chrome-extension to also check Chrome companion source and packaged artifacts.",
|
|
443
450
|
"",
|
|
444
451
|
].join("\n");
|
|
445
452
|
}
|