@tonyclaw/agent-inspector 2.0.0 → 2.0.2

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 (44) hide show
  1. package/.output/cli.js +353 -54
  2. package/.output/nitro.json +1 -1
  3. package/.output/public/assets/{CompareDrawer-CU5ZrWcL.js → CompareDrawer-Bp7_x-5N.js} +1 -1
  4. package/.output/public/assets/{ProxyViewerContainer-pEBqVp1d.js → ProxyViewerContainer-USuxPy-K.js} +13 -13
  5. package/.output/public/assets/{ReplayDialog-F58yNg5j.js → ReplayDialog-DFHCd0yx.js} +1 -1
  6. package/.output/public/assets/{RequestAnatomy-C9lT0qE_.js → RequestAnatomy-ehyrskxt.js} +1 -1
  7. package/.output/public/assets/{ResponseView-DHJq6bnz.js → ResponseView-BNGyc8e_.js} +1 -1
  8. package/.output/public/assets/{StreamingChunkSequence-BTgfpFUT.js → StreamingChunkSequence-Bjs4Lqwn.js} +1 -1
  9. package/.output/public/assets/_sessionId-D_SeK_qp.js +1 -0
  10. package/.output/public/assets/index-BGGOWR7A.js +1 -0
  11. package/.output/public/assets/index-CIL46Z2y.css +1 -0
  12. package/.output/public/assets/{json-viewer-CZVYLR8j.js → json-viewer-6uV_YXws.js} +1 -1
  13. package/.output/public/assets/{main-DHs7FBK3.js → main-FSGUGtEL.js} +2 -2
  14. package/.output/server/{_sessionId-wMLPvC5g.mjs → _sessionId-_bf9vUww.mjs} +2 -2
  15. package/.output/server/_ssr/{CompareDrawer-BU4V0uVf.mjs → CompareDrawer-DIth2DQM.mjs} +3 -3
  16. package/.output/server/_ssr/{ProxyViewerContainer-BnRwFEnn.mjs → ProxyViewerContainer-249bTH-T.mjs} +24 -30
  17. package/.output/server/_ssr/{ReplayDialog-C7dn9pd_.mjs → ReplayDialog-C1aGx0y1.mjs} +4 -4
  18. package/.output/server/_ssr/{RequestAnatomy-C1rWpe9-.mjs → RequestAnatomy-D2bCiEJn.mjs} +2 -2
  19. package/.output/server/_ssr/{ResponseView-hGpPaYsf.mjs → ResponseView-DP6k4Xs_.mjs} +3 -3
  20. package/.output/server/_ssr/{StreamingChunkSequence-BRWI1r_G.mjs → StreamingChunkSequence-HyXZV-b5.mjs} +3 -3
  21. package/.output/server/_ssr/{index-BKURLVPz.mjs → index-Bt47f9pn.mjs} +2 -2
  22. package/.output/server/_ssr/index.mjs +2 -2
  23. package/.output/server/_ssr/{json-viewer-BBd2DtQP.mjs → json-viewer-Co-YRwUP.mjs} +2 -2
  24. package/.output/server/_ssr/{router-BcZ0D6AB.mjs → router-to_OJirX.mjs} +383 -43
  25. package/.output/server/{_tanstack-start-manifest_v-1y8ZVxRI.mjs → _tanstack-start-manifest_v-Bd-2YRWo.mjs} +1 -1
  26. package/.output/server/index.mjs +64 -64
  27. package/README.md +57 -4
  28. package/package.json +9 -2
  29. package/scripts/setup-codex-skill.mjs +38 -0
  30. package/scripts/setup-windows-runtime.mjs +74 -0
  31. package/src/assets/agent-inspector.ico +0 -0
  32. package/src/cli/onboard.ts +175 -68
  33. package/src/cli/templates/codex-skill-onboard.ts +210 -0
  34. package/src/cli.ts +18 -2
  35. package/src/components/providers/ProviderCard.tsx +2 -27
  36. package/src/components/providers/ProvidersPanel.tsx +16 -0
  37. package/src/knowledge/openclawClient.ts +34 -5
  38. package/src/knowledge/openclawGatewayClient.ts +237 -0
  39. package/src/knowledge/openclawMarkdown.ts +146 -0
  40. package/src/lib/providerTestPrompt.ts +78 -0
  41. package/src/routes/api/providers.$providerId.test.log.ts +9 -22
  42. package/.output/public/assets/_sessionId-DsNRbnNm.js +0 -1
  43. package/.output/public/assets/index-CpWG2hFn.css +0 -1
  44. package/.output/public/assets/index-DmBV8Gve.js +0 -1
@@ -35,110 +35,110 @@ const headers = ((m) => function headersRouteRule(event) {
35
35
  }
36
36
  });
37
37
  const assets = {
38
- "/assets/index-CpWG2hFn.css": {
39
- "type": "text/css; charset=utf-8",
40
- "etag": '"17063-Htyi07AI/KjwlBt4Ff8s9XjH2HE"',
41
- "mtime": "2026-06-20T02:55:38.781Z",
42
- "size": 94307,
43
- "path": "../public/assets/index-CpWG2hFn.css"
44
- },
45
38
  "/assets/alibaba-TTwafVwX.svg": {
46
39
  "type": "image/svg+xml",
47
40
  "etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
48
- "mtime": "2026-06-20T02:55:38.781Z",
41
+ "mtime": "2026-06-20T06:54:35.499Z",
49
42
  "size": 5915,
50
43
  "path": "../public/assets/alibaba-TTwafVwX.svg"
51
44
  },
52
- "/assets/CompareDrawer-CU5ZrWcL.js": {
45
+ "/assets/CompareDrawer-Bp7_x-5N.js": {
53
46
  "type": "text/javascript; charset=utf-8",
54
- "etag": '"4a1f-2+GLPzWQ3B1UYxv4W/gqYK0eSOU"',
55
- "mtime": "2026-06-20T02:55:38.781Z",
47
+ "etag": '"4a1f-jydruemAUSMwVzObceAGMUJLrQ8"',
48
+ "mtime": "2026-06-20T06:54:35.500Z",
56
49
  "size": 18975,
57
- "path": "../public/assets/CompareDrawer-CU5ZrWcL.js"
58
- },
59
- "/assets/index-DmBV8Gve.js": {
60
- "type": "text/javascript; charset=utf-8",
61
- "etag": '"74-qEIMUWLZsbtdjOyCF+RCeAPprrM"',
62
- "mtime": "2026-06-20T02:55:38.781Z",
63
- "size": 116,
64
- "path": "../public/assets/index-DmBV8Gve.js"
65
- },
66
- "/assets/json-viewer-CZVYLR8j.js": {
67
- "type": "text/javascript; charset=utf-8",
68
- "etag": '"1e651-7jTmLGqQOxmz6Dr/v8g0WGWFYFs"',
69
- "mtime": "2026-06-20T02:55:38.782Z",
70
- "size": 124497,
71
- "path": "../public/assets/json-viewer-CZVYLR8j.js"
50
+ "path": "../public/assets/CompareDrawer-Bp7_x-5N.js"
72
51
  },
73
52
  "/assets/minimax-BPMzvuL-.jpeg": {
74
53
  "type": "image/jpeg",
75
54
  "etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
76
- "mtime": "2026-06-20T02:55:38.780Z",
55
+ "mtime": "2026-06-20T06:54:35.499Z",
77
56
  "size": 6918,
78
57
  "path": "../public/assets/minimax-BPMzvuL-.jpeg"
79
58
  },
80
- "/assets/ReplayDialog-F58yNg5j.js": {
59
+ "/assets/json-viewer-6uV_YXws.js": {
81
60
  "type": "text/javascript; charset=utf-8",
82
- "etag": '"11c0-8Zbj22ehxBS4KCLYYzCxCc1sKvk"',
83
- "mtime": "2026-06-20T02:55:38.781Z",
84
- "size": 4544,
85
- "path": "../public/assets/ReplayDialog-F58yNg5j.js"
61
+ "etag": '"1e651-ErvitreVwBoWFEPdSIq0EqZIuw4"',
62
+ "mtime": "2026-06-20T06:54:35.501Z",
63
+ "size": 124497,
64
+ "path": "../public/assets/json-viewer-6uV_YXws.js"
86
65
  },
87
- "/assets/ResponseView-DHJq6bnz.js": {
66
+ "/assets/index-CIL46Z2y.css": {
67
+ "type": "text/css; charset=utf-8",
68
+ "etag": '"17078-OCA3ki0c0CZu1AhDXwlliM+a+qY"',
69
+ "mtime": "2026-06-20T06:54:35.499Z",
70
+ "size": 94328,
71
+ "path": "../public/assets/index-CIL46Z2y.css"
72
+ },
73
+ "/assets/index-BGGOWR7A.js": {
88
74
  "type": "text/javascript; charset=utf-8",
89
- "etag": '"6e91-uW599LXwIPf73coL604vJSPPXA0"',
90
- "mtime": "2026-06-20T02:55:38.781Z",
91
- "size": 28305,
92
- "path": "../public/assets/ResponseView-DHJq6bnz.js"
75
+ "etag": '"74-JGabHf17Kno+3wF7wJwm2nHkVhg"',
76
+ "mtime": "2026-06-20T06:54:35.500Z",
77
+ "size": 116,
78
+ "path": "../public/assets/index-BGGOWR7A.js"
93
79
  },
94
- "/assets/StreamingChunkSequence-BTgfpFUT.js": {
80
+ "/assets/StreamingChunkSequence-Bjs4Lqwn.js": {
95
81
  "type": "text/javascript; charset=utf-8",
96
- "etag": '"d81-XA4ODao35Eyi0DlKnKkQbJMOQb8"',
97
- "mtime": "2026-06-20T02:55:38.781Z",
82
+ "etag": '"d81-yAIItbapwm0q/MbLRpCH915YVMc"',
83
+ "mtime": "2026-06-20T06:54:35.501Z",
98
84
  "size": 3457,
99
- "path": "../public/assets/StreamingChunkSequence-BTgfpFUT.js"
85
+ "path": "../public/assets/StreamingChunkSequence-Bjs4Lqwn.js"
86
+ },
87
+ "/assets/RequestAnatomy-ehyrskxt.js": {
88
+ "type": "text/javascript; charset=utf-8",
89
+ "etag": '"142a-KSCjJNt2RlqmIm3y55z67ygsWGU"',
90
+ "mtime": "2026-06-20T06:54:35.500Z",
91
+ "size": 5162,
92
+ "path": "../public/assets/RequestAnatomy-ehyrskxt.js"
100
93
  },
101
94
  "/assets/zhipuai-BPNAnxo-.svg": {
102
95
  "type": "image/svg+xml",
103
96
  "etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
104
- "mtime": "2026-06-20T02:55:38.780Z",
97
+ "mtime": "2026-06-20T06:54:35.499Z",
105
98
  "size": 11256,
106
99
  "path": "../public/assets/zhipuai-BPNAnxo-.svg"
107
100
  },
108
- "/assets/_sessionId-DsNRbnNm.js": {
101
+ "/assets/main-FSGUGtEL.js": {
102
+ "type": "text/javascript; charset=utf-8",
103
+ "etag": '"5138c-aZy2XlKYAw/+FTrgYI1Iz4MHtww"',
104
+ "mtime": "2026-06-20T06:54:35.500Z",
105
+ "size": 332684,
106
+ "path": "../public/assets/main-FSGUGtEL.js"
107
+ },
108
+ "/assets/ProxyViewerContainer-USuxPy-K.js": {
109
+ "type": "text/javascript; charset=utf-8",
110
+ "etag": '"774b9-fxnez8ICkM1Nb7unXdv1GIz+RbA"',
111
+ "mtime": "2026-06-20T06:54:35.500Z",
112
+ "size": 488633,
113
+ "path": "../public/assets/ProxyViewerContainer-USuxPy-K.js"
114
+ },
115
+ "/assets/_sessionId-D_SeK_qp.js": {
109
116
  "type": "text/javascript; charset=utf-8",
110
- "etag": '"d2-Vs3mLOLEEMGbWP4z/lTPbOn+dc8"',
111
- "mtime": "2026-06-20T02:55:38.781Z",
117
+ "etag": '"d2-pqW14/f9UjxfuYAzRgQmGaiZhbs"',
118
+ "mtime": "2026-06-20T06:54:35.500Z",
112
119
  "size": 210,
113
- "path": "../public/assets/_sessionId-DsNRbnNm.js"
120
+ "path": "../public/assets/_sessionId-D_SeK_qp.js"
114
121
  },
115
- "/assets/main-DHs7FBK3.js": {
122
+ "/assets/ResponseView-BNGyc8e_.js": {
116
123
  "type": "text/javascript; charset=utf-8",
117
- "etag": '"5138c-gGyEqSNc9hLficzzEorSKjc0F5g"',
118
- "mtime": "2026-06-20T02:55:38.781Z",
119
- "size": 332684,
120
- "path": "../public/assets/main-DHs7FBK3.js"
124
+ "etag": '"6e91-De46gQnfLBYdkbMBsXcKinAu7mE"',
125
+ "mtime": "2026-06-20T06:54:35.501Z",
126
+ "size": 28305,
127
+ "path": "../public/assets/ResponseView-BNGyc8e_.js"
121
128
  },
122
129
  "/assets/qwen-CONDcHqt.png": {
123
130
  "type": "image/png",
124
131
  "etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
125
- "mtime": "2026-06-20T02:55:38.780Z",
132
+ "mtime": "2026-06-20T06:54:35.500Z",
126
133
  "size": 357059,
127
134
  "path": "../public/assets/qwen-CONDcHqt.png"
128
135
  },
129
- "/assets/ProxyViewerContainer-pEBqVp1d.js": {
136
+ "/assets/ReplayDialog-DFHCd0yx.js": {
130
137
  "type": "text/javascript; charset=utf-8",
131
- "etag": '"77564-L+1r+UlLMkAVNcYyFyWyJee23a8"',
132
- "mtime": "2026-06-20T02:55:38.781Z",
133
- "size": 488804,
134
- "path": "../public/assets/ProxyViewerContainer-pEBqVp1d.js"
135
- },
136
- "/assets/RequestAnatomy-C9lT0qE_.js": {
137
- "type": "text/javascript; charset=utf-8",
138
- "etag": '"142a-8sxBo7MxYcnRgyDlw3XsNdl0s3M"',
139
- "mtime": "2026-06-20T02:55:38.781Z",
140
- "size": 5162,
141
- "path": "../public/assets/RequestAnatomy-C9lT0qE_.js"
138
+ "etag": '"11c0-ZB9rU8oZnq77GG7kiCz6W03GjPI"',
139
+ "mtime": "2026-06-20T06:54:35.500Z",
140
+ "size": 4544,
141
+ "path": "../public/assets/ReplayDialog-DFHCd0yx.js"
142
142
  }
143
143
  };
144
144
  function readAsset(id) {
package/README.md CHANGED
@@ -22,12 +22,37 @@ npm install -g @tonyclaw/agent-inspector
22
22
  agent-inspector
23
23
  ```
24
24
 
25
+ On Windows, the npm install step creates a local `agent-inspector.exe` runtime
26
+ from the user's installed Node.js runtime. The long-running server process
27
+ therefore appears in Task Manager as **Agent Inspector <version>** with the
28
+ project icon. The executable also carries standard `FileVersion` and
29
+ `ProductVersion` metadata for the installed package version. If npm lifecycle
30
+ scripts are disabled, Agent Inspector falls back to `node.exe` and keeps
31
+ working normally.
32
+
33
+ For Linux containers, the Windows runtime setup is a no-op. To keep images lean,
34
+ install with optional dependencies omitted:
35
+
36
+ ```bash
37
+ npm install -g --omit=optional @tonyclaw/agent-inspector
38
+ ```
39
+
25
40
  Optional guided setup:
26
41
 
27
42
  ```bash
28
43
  agent-inspector onboard
29
44
  ```
30
45
 
46
+ The onboarding command installs guided setup skills for local agents:
47
+
48
+ - Claude Code: `~/.claude/skills/agent-inspector-onboard/SKILL.md` plus a slash command.
49
+ - Codex: `~/.codex/skills/agent-inspector-onboard/SKILL.md`, focused on connecting
50
+ `http://localhost:25947/api/mcp` through Codex `mcp_servers.agent-inspector`.
51
+
52
+ During npm global install, Agent Inspector also makes a best-effort Codex skill install when
53
+ `~/.codex` already exists. Set `AGENT_INSPECTOR_SKIP_CODEX_SKILL=1` to skip that postinstall step,
54
+ or run `agent-inspector onboard --codex-only --force` later to refresh it.
55
+
31
56
  For local development from source:
32
57
 
33
58
  ```bash
@@ -45,8 +70,36 @@ The web UI runs at http://localhost:25947.
45
70
 
46
71
  ## Project Direction
47
72
 
48
- Agent Inspector should stay close to the proven inspector codebase while growing into an agent knowledge layer. The core product direction has three layers:
73
+ Agent Inspector should stay close to the proven inspector codebase while growing into an agent knowledge layer. The memory flow has four layers:
74
+
75
+ 1. Raw Trace: capture requests, responses, streaming chunks, tools, errors, and token usage.
76
+ 2. Episode: summarize a session into goal, steps, outcome, failures, and artifacts.
77
+ 3. Memory Candidate: create reviewable, redacted knowledge candidates with evidence ids.
78
+ 4. OpenClaw Memory: write approved candidates into OpenClaw's durable recall system.
79
+
80
+ Agent Inspector owns the first three layers. OpenClaw owns indexing, retrieval, consolidation, and long-term recall.
81
+
82
+ ## OpenClaw Memory Bridge
83
+
84
+ Agent Inspector treats OpenClaw as a hidden memory backend. The preferred integration uses OpenClaw's file-backed memory layout:
85
+
86
+ ```bash
87
+ OPENCLAW_WORKSPACE_DIR=C:\Users\<you>\.openclaw\workspace
88
+ OPENCLAW_GATEWAY_URL=http://127.0.0.1:18789
89
+ OPENCLAW_GATEWAY_TOKEN=<gateway-token>
90
+ OPENCLAW_SESSION_KEY=main
91
+ ```
92
+
93
+ When a candidate is promoted, Agent Inspector writes sanitized Markdown under:
94
+
95
+ ```text
96
+ memory/agent-inspector/YYYY-MM-DD/<candidate>.md
97
+ ```
98
+
99
+ OpenClaw remains responsible for indexing and recall. Run `openclaw memory index --force` when you
100
+ need immediate reindexing, or rely on the running OpenClaw memory runtime to sync according to its
101
+ own policy.
102
+
103
+ Search stays behind the Inspector facade. Agents call Inspector MCP/API tools, and Inspector invokes OpenClaw Gateway `memory_search` when `OPENCLAW_GATEWAY_URL` is configured.
49
104
 
50
- 1. Observe: normalize agent and model traffic into stable interaction events.
51
- 2. Analyze: identify reusable facts, decisions, tool patterns, failures, and user preferences.
52
- 3. Remember: publish curated memory candidates into an external memory system while keeping user control and auditability.
105
+ For older deployments, `OPENCLAW_MEMORY_URL` / `OPENCLAW_API_URL` remain supported as a legacy HTTP backend.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tonyclaw/agent-inspector",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "type": "module",
5
5
  "description": "Agent observability and knowledge capture layer for AI coding tools.",
6
6
  "license": "MIT",
@@ -37,14 +37,18 @@
37
37
  "!src/**/*.stories.tsx",
38
38
  "!src/**/__fixtures__",
39
39
  "!src/routeTree.gen.ts",
40
+ "scripts/setup-windows-runtime.mjs",
41
+ "scripts/setup-codex-skill.mjs",
40
42
  "styles",
41
- ".output"
43
+ ".output",
44
+ "!.output/*.exe"
42
45
  ],
43
46
  "scripts": {
44
47
  "dev": "vite dev",
45
48
  "start": "node .output/cli.js",
46
49
  "build": "vite build && bun build:cli",
47
50
  "build:cli": "npx esbuild src/cli.ts --bundle --platform=node --target=node18 --format=esm --outfile=.output/cli.js",
51
+ "postinstall": "node scripts/setup-windows-runtime.mjs && node scripts/setup-codex-skill.mjs",
48
52
  "prepublishOnly": "npm run build",
49
53
  "typecheck": "tsc --noEmit",
50
54
  "lint": "eslint .",
@@ -81,6 +85,9 @@
81
85
  "tw-animate-css": "^1.4.0",
82
86
  "zod": "^4.3.6"
83
87
  },
88
+ "optionalDependencies": {
89
+ "rcedit": "4.0.1"
90
+ },
84
91
  "devDependencies": {
85
92
  "@biomejs/biome": "^2.3.14",
86
93
  "@cfworker/json-schema": "^4.1.1",
@@ -0,0 +1,38 @@
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 codexHome = process.env["CODEX_HOME"] ?? join(homedir(), ".codex");
11
+
12
+ function shouldSkip() {
13
+ return (
14
+ process.env["AGENT_INSPECTOR_SKIP_CODEX_SKILL"] === "1" ||
15
+ !existsSync(cliEntry) ||
16
+ (!existsSync(codexHome) && process.env["AGENT_INSPECTOR_INSTALL_CODEX_SKILL"] !== "1")
17
+ );
18
+ }
19
+
20
+ function main() {
21
+ if (shouldSkip()) return;
22
+
23
+ const result = spawnSync(process.execPath, [cliEntry, "onboard", "--codex-only"], {
24
+ stdio: "ignore",
25
+ windowsHide: true,
26
+ });
27
+
28
+ if (result.status !== 0) {
29
+ console.warn("Skipping Codex onboard skill installation.");
30
+ }
31
+ }
32
+
33
+ try {
34
+ main();
35
+ } catch (error) {
36
+ const message = error instanceof Error ? error.message : String(error);
37
+ console.warn(`Skipping Codex onboard skill installation: ${message}`);
38
+ }
@@ -0,0 +1,74 @@
1
+ import { copyFile, mkdir, readFile } from "node:fs/promises";
2
+ import { existsSync } from "node:fs";
3
+ import { createRequire } from "node:module";
4
+ import { dirname, join } from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+
7
+ const require = createRequire(import.meta.url);
8
+ const scriptDir = dirname(fileURLToPath(import.meta.url));
9
+ const packageRoot = dirname(scriptDir);
10
+ const outputDir = join(packageRoot, ".output");
11
+ const serverEntry = join(outputDir, "server", "index.mjs");
12
+ const brandedRuntime = join(outputDir, "agent-inspector.exe");
13
+ const iconPath = join(packageRoot, "src", "assets", "agent-inspector.ico");
14
+
15
+ function normalizeWindowsVersion(version) {
16
+ const numericParts = version
17
+ .split(".")
18
+ .map((part) => Number.parseInt(part.replace(/\D.*$/, ""), 10))
19
+ .filter((part) => Number.isInteger(part) && part >= 0);
20
+ return [...numericParts, 0, 0, 0, 0].slice(0, 4).join(".");
21
+ }
22
+
23
+ async function readPackageVersion() {
24
+ const packageJson = JSON.parse(await readFile(join(packageRoot, "package.json"), "utf8"));
25
+ return typeof packageJson.version === "string" ? packageJson.version : "0.0.0";
26
+ }
27
+
28
+ function shouldSkip() {
29
+ return (
30
+ process.platform !== "win32" ||
31
+ process.env["AGENT_INSPECTOR_SKIP_WINDOWS_RUNTIME"] === "1" ||
32
+ !existsSync(serverEntry) ||
33
+ !existsSync(iconPath) ||
34
+ !existsSync(process.execPath)
35
+ );
36
+ }
37
+
38
+ async function main() {
39
+ if (shouldSkip()) return;
40
+
41
+ const version = await readPackageVersion();
42
+ const windowsVersion = normalizeWindowsVersion(version);
43
+ const displayName = `Agent Inspector ${version}`;
44
+ const rcedit = require("rcedit");
45
+
46
+ await mkdir(outputDir, { recursive: true });
47
+ await copyFile(process.execPath, brandedRuntime);
48
+ await rcedit(brandedRuntime, {
49
+ icon: iconPath,
50
+ "file-version": windowsVersion,
51
+ "product-version": windowsVersion,
52
+ "version-string": {
53
+ CompanyName: "TonyClaw",
54
+ FileDescription: displayName,
55
+ InternalName: displayName,
56
+ OriginalFilename: "agent-inspector.exe",
57
+ ProductName: displayName,
58
+ ProductVersion: version,
59
+ LegalCopyright: "Copyright (c) TonyClaw",
60
+ },
61
+ });
62
+
63
+ console.log("Generated Windows branded runtime: .output/agent-inspector.exe");
64
+ }
65
+
66
+ try {
67
+ await main();
68
+ } catch (error) {
69
+ const message = error instanceof Error ? error.message : String(error);
70
+ console.warn(`Skipping Windows branded runtime generation: ${message}`);
71
+ if (process.env["AGENT_INSPECTOR_REQUIRE_WINDOWS_RUNTIME"] === "1") {
72
+ process.exitCode = 1;
73
+ }
74
+ }
Binary file