@tonyclaw/agent-inspector 2.0.1 → 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 (42) hide show
  1. package/.output/cli.js +344 -53
  2. package/.output/nitro.json +1 -1
  3. package/.output/public/assets/{CompareDrawer-sVLGhCO3.js → CompareDrawer-Bp7_x-5N.js} +1 -1
  4. package/.output/public/assets/{ProxyViewerContainer-p9QvzZ6U.js → ProxyViewerContainer-USuxPy-K.js} +13 -13
  5. package/.output/public/assets/{ReplayDialog-DxbFUqNW.js → ReplayDialog-DFHCd0yx.js} +1 -1
  6. package/.output/public/assets/{RequestAnatomy-CSmGQa_g.js → RequestAnatomy-ehyrskxt.js} +1 -1
  7. package/.output/public/assets/{ResponseView-B5f89c8Z.js → ResponseView-BNGyc8e_.js} +1 -1
  8. package/.output/public/assets/{StreamingChunkSequence-BzqpY0TN.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-CKNMihlh.js → json-viewer-6uV_YXws.js} +1 -1
  13. package/.output/public/assets/{main-yWf8dv9w.js → main-FSGUGtEL.js} +2 -2
  14. package/.output/server/{_sessionId-DfHd0gd8.mjs → _sessionId-_bf9vUww.mjs} +2 -2
  15. package/.output/server/_ssr/{CompareDrawer-DGYAUWgF.mjs → CompareDrawer-DIth2DQM.mjs} +3 -3
  16. package/.output/server/_ssr/{ProxyViewerContainer-fawglkTo.mjs → ProxyViewerContainer-249bTH-T.mjs} +24 -30
  17. package/.output/server/_ssr/{ReplayDialog-B4vlKa2W.mjs → ReplayDialog-C1aGx0y1.mjs} +4 -4
  18. package/.output/server/_ssr/{RequestAnatomy-BNQvEIZK.mjs → RequestAnatomy-D2bCiEJn.mjs} +2 -2
  19. package/.output/server/_ssr/{ResponseView-X6X6G16_.mjs → ResponseView-DP6k4Xs_.mjs} +3 -3
  20. package/.output/server/_ssr/{StreamingChunkSequence-BPVN3MnF.mjs → StreamingChunkSequence-HyXZV-b5.mjs} +3 -3
  21. package/.output/server/_ssr/{index-CXmpc2X5.mjs → index-Bt47f9pn.mjs} +2 -2
  22. package/.output/server/_ssr/index.mjs +2 -2
  23. package/.output/server/_ssr/{json-viewer-3XC3eq4R.mjs → json-viewer-Co-YRwUP.mjs} +2 -2
  24. package/.output/server/_ssr/{router-C0B2qvIM.mjs → router-to_OJirX.mjs} +383 -43
  25. package/.output/server/{_tanstack-start-manifest_v-7tfsmd2I.mjs → _tanstack-start-manifest_v-Bd-2YRWo.mjs} +1 -1
  26. package/.output/server/index.mjs +63 -63
  27. package/README.md +47 -7
  28. package/package.json +3 -2
  29. package/scripts/setup-codex-skill.mjs +38 -0
  30. package/scripts/setup-windows-runtime.mjs +4 -3
  31. package/src/cli/onboard.ts +175 -68
  32. package/src/cli/templates/codex-skill-onboard.ts +210 -0
  33. package/src/components/providers/ProviderCard.tsx +2 -27
  34. package/src/components/providers/ProvidersPanel.tsx +16 -0
  35. package/src/knowledge/openclawClient.ts +34 -5
  36. package/src/knowledge/openclawGatewayClient.ts +237 -0
  37. package/src/knowledge/openclawMarkdown.ts +146 -0
  38. package/src/lib/providerTestPrompt.ts +78 -0
  39. package/src/routes/api/providers.$providerId.test.log.ts +9 -22
  40. package/.output/public/assets/_sessionId-BF7ftHV3.js +0 -1
  41. package/.output/public/assets/index-BU0PpLby.js +0 -1
  42. package/.output/public/assets/index-CpWG2hFn.css +0 -1
@@ -38,107 +38,107 @@ const assets = {
38
38
  "/assets/alibaba-TTwafVwX.svg": {
39
39
  "type": "image/svg+xml",
40
40
  "etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
41
- "mtime": "2026-06-20T04:11:08.016Z",
41
+ "mtime": "2026-06-20T06:54:35.499Z",
42
42
  "size": 5915,
43
43
  "path": "../public/assets/alibaba-TTwafVwX.svg"
44
44
  },
45
- "/assets/index-BU0PpLby.js": {
45
+ "/assets/CompareDrawer-Bp7_x-5N.js": {
46
46
  "type": "text/javascript; charset=utf-8",
47
- "etag": '"74-VQLwqrYKW1w1vyDegF1mvh4xcEg"',
48
- "mtime": "2026-06-20T04:11:08.016Z",
49
- "size": 116,
50
- "path": "../public/assets/index-BU0PpLby.js"
51
- },
52
- "/assets/CompareDrawer-sVLGhCO3.js": {
53
- "type": "text/javascript; charset=utf-8",
54
- "etag": '"4a1f-I4v3MS54eYnnzDhhqEIEsaLQr9E"',
55
- "mtime": "2026-06-20T04:11:08.016Z",
47
+ "etag": '"4a1f-jydruemAUSMwVzObceAGMUJLrQ8"',
48
+ "mtime": "2026-06-20T06:54:35.500Z",
56
49
  "size": 18975,
57
- "path": "../public/assets/CompareDrawer-sVLGhCO3.js"
58
- },
59
- "/assets/index-CpWG2hFn.css": {
60
- "type": "text/css; charset=utf-8",
61
- "etag": '"17063-Htyi07AI/KjwlBt4Ff8s9XjH2HE"',
62
- "mtime": "2026-06-20T04:11:08.016Z",
63
- "size": 94307,
64
- "path": "../public/assets/index-CpWG2hFn.css"
65
- },
66
- "/assets/json-viewer-CKNMihlh.js": {
67
- "type": "text/javascript; charset=utf-8",
68
- "etag": '"1e651-bsyUi317U2guBJsuPZODPYIDT3I"',
69
- "mtime": "2026-06-20T04:11:08.018Z",
70
- "size": 124497,
71
- "path": "../public/assets/json-viewer-CKNMihlh.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-20T04:11:08.016Z",
55
+ "mtime": "2026-06-20T06:54:35.499Z",
77
56
  "size": 6918,
78
57
  "path": "../public/assets/minimax-BPMzvuL-.jpeg"
79
58
  },
80
- "/assets/main-yWf8dv9w.js": {
59
+ "/assets/json-viewer-6uV_YXws.js": {
81
60
  "type": "text/javascript; charset=utf-8",
82
- "etag": '"5138c-ajuPEmTU5gk81OjbjPWHjuTkUeM"',
83
- "mtime": "2026-06-20T04:11:08.016Z",
84
- "size": 332684,
85
- "path": "../public/assets/main-yWf8dv9w.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/ReplayDialog-DxbFUqNW.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": '"11c0-HRfvYJdzqa0jHhOxOHXszP4gZZY"',
90
- "mtime": "2026-06-20T04:11:08.016Z",
91
- "size": 4544,
92
- "path": "../public/assets/ReplayDialog-DxbFUqNW.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/RequestAnatomy-CSmGQa_g.js": {
80
+ "/assets/StreamingChunkSequence-Bjs4Lqwn.js": {
95
81
  "type": "text/javascript; charset=utf-8",
96
- "etag": '"142a-/7Ujr1VdEsMRLbp8oA7QUq4987M"',
97
- "mtime": "2026-06-20T04:11:08.018Z",
98
- "size": 5162,
99
- "path": "../public/assets/RequestAnatomy-CSmGQa_g.js"
82
+ "etag": '"d81-yAIItbapwm0q/MbLRpCH915YVMc"',
83
+ "mtime": "2026-06-20T06:54:35.501Z",
84
+ "size": 3457,
85
+ "path": "../public/assets/StreamingChunkSequence-Bjs4Lqwn.js"
100
86
  },
101
- "/assets/ResponseView-B5f89c8Z.js": {
87
+ "/assets/RequestAnatomy-ehyrskxt.js": {
102
88
  "type": "text/javascript; charset=utf-8",
103
- "etag": '"6e91-8GOJTIuom7L8X7ehEPf9HfaFuGs"',
104
- "mtime": "2026-06-20T04:11:08.018Z",
105
- "size": 28305,
106
- "path": "../public/assets/ResponseView-B5f89c8Z.js"
89
+ "etag": '"142a-KSCjJNt2RlqmIm3y55z67ygsWGU"',
90
+ "mtime": "2026-06-20T06:54:35.500Z",
91
+ "size": 5162,
92
+ "path": "../public/assets/RequestAnatomy-ehyrskxt.js"
107
93
  },
108
94
  "/assets/zhipuai-BPNAnxo-.svg": {
109
95
  "type": "image/svg+xml",
110
96
  "etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
111
- "mtime": "2026-06-20T04:11:08.016Z",
97
+ "mtime": "2026-06-20T06:54:35.499Z",
112
98
  "size": 11256,
113
99
  "path": "../public/assets/zhipuai-BPNAnxo-.svg"
114
100
  },
115
- "/assets/StreamingChunkSequence-BzqpY0TN.js": {
101
+ "/assets/main-FSGUGtEL.js": {
116
102
  "type": "text/javascript; charset=utf-8",
117
- "etag": '"d81-5rce/n28nmO176CRcqCDrcHI9uw"',
118
- "mtime": "2026-06-20T04:11:08.018Z",
119
- "size": 3457,
120
- "path": "../public/assets/StreamingChunkSequence-BzqpY0TN.js"
103
+ "etag": '"5138c-aZy2XlKYAw/+FTrgYI1Iz4MHtww"',
104
+ "mtime": "2026-06-20T06:54:35.500Z",
105
+ "size": 332684,
106
+ "path": "../public/assets/main-FSGUGtEL.js"
121
107
  },
122
- "/assets/_sessionId-BF7ftHV3.js": {
108
+ "/assets/ProxyViewerContainer-USuxPy-K.js": {
123
109
  "type": "text/javascript; charset=utf-8",
124
- "etag": '"d2-qBNzxlXPxxp+2NZarjxCyy5PG+Q"',
125
- "mtime": "2026-06-20T04:11:08.016Z",
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": {
116
+ "type": "text/javascript; charset=utf-8",
117
+ "etag": '"d2-pqW14/f9UjxfuYAzRgQmGaiZhbs"',
118
+ "mtime": "2026-06-20T06:54:35.500Z",
126
119
  "size": 210,
127
- "path": "../public/assets/_sessionId-BF7ftHV3.js"
120
+ "path": "../public/assets/_sessionId-D_SeK_qp.js"
121
+ },
122
+ "/assets/ResponseView-BNGyc8e_.js": {
123
+ "type": "text/javascript; charset=utf-8",
124
+ "etag": '"6e91-De46gQnfLBYdkbMBsXcKinAu7mE"',
125
+ "mtime": "2026-06-20T06:54:35.501Z",
126
+ "size": 28305,
127
+ "path": "../public/assets/ResponseView-BNGyc8e_.js"
128
128
  },
129
129
  "/assets/qwen-CONDcHqt.png": {
130
130
  "type": "image/png",
131
131
  "etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
132
- "mtime": "2026-06-20T04:11:08.016Z",
132
+ "mtime": "2026-06-20T06:54:35.500Z",
133
133
  "size": 357059,
134
134
  "path": "../public/assets/qwen-CONDcHqt.png"
135
135
  },
136
- "/assets/ProxyViewerContainer-p9QvzZ6U.js": {
136
+ "/assets/ReplayDialog-DFHCd0yx.js": {
137
137
  "type": "text/javascript; charset=utf-8",
138
- "etag": '"77564-16W0V8xckeXv7EkaIbc7W0w1HT8"',
139
- "mtime": "2026-06-20T04:11:08.016Z",
140
- "size": 488804,
141
- "path": "../public/assets/ProxyViewerContainer-p9QvzZ6U.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
@@ -24,9 +24,11 @@ agent-inspector
24
24
 
25
25
  On Windows, the npm install step creates a local `agent-inspector.exe` runtime
26
26
  from the user's installed Node.js runtime. The long-running server process
27
- therefore appears in Task Manager as **Agent Inspector** with the project icon.
28
- If npm lifecycle scripts are disabled, Agent Inspector falls back to `node.exe`
29
- and keeps working normally.
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.
30
32
 
31
33
  For Linux containers, the Windows runtime setup is a no-op. To keep images lean,
32
34
  install with optional dependencies omitted:
@@ -41,6 +43,16 @@ Optional guided setup:
41
43
  agent-inspector onboard
42
44
  ```
43
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
+
44
56
  For local development from source:
45
57
 
46
58
  ```bash
@@ -58,8 +70,36 @@ The web UI runs at http://localhost:25947.
58
70
 
59
71
  ## Project Direction
60
72
 
61
- 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.
62
104
 
63
- 1. Observe: normalize agent and model traffic into stable interaction events.
64
- 2. Analyze: identify reusable facts, decisions, tool patterns, failures, and user preferences.
65
- 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.1",
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",
@@ -38,6 +38,7 @@
38
38
  "!src/**/__fixtures__",
39
39
  "!src/routeTree.gen.ts",
40
40
  "scripts/setup-windows-runtime.mjs",
41
+ "scripts/setup-codex-skill.mjs",
41
42
  "styles",
42
43
  ".output",
43
44
  "!.output/*.exe"
@@ -47,7 +48,7 @@
47
48
  "start": "node .output/cli.js",
48
49
  "build": "vite build && bun build:cli",
49
50
  "build:cli": "npx esbuild src/cli.ts --bundle --platform=node --target=node18 --format=esm --outfile=.output/cli.js",
50
- "postinstall": "node scripts/setup-windows-runtime.mjs",
51
+ "postinstall": "node scripts/setup-windows-runtime.mjs && node scripts/setup-codex-skill.mjs",
51
52
  "prepublishOnly": "npm run build",
52
53
  "typecheck": "tsc --noEmit",
53
54
  "lint": "eslint .",
@@ -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
+ }
@@ -40,6 +40,7 @@ async function main() {
40
40
 
41
41
  const version = await readPackageVersion();
42
42
  const windowsVersion = normalizeWindowsVersion(version);
43
+ const displayName = `Agent Inspector ${version}`;
43
44
  const rcedit = require("rcedit");
44
45
 
45
46
  await mkdir(outputDir, { recursive: true });
@@ -50,10 +51,10 @@ async function main() {
50
51
  "product-version": windowsVersion,
51
52
  "version-string": {
52
53
  CompanyName: "TonyClaw",
53
- FileDescription: "Agent Inspector",
54
- InternalName: "Agent Inspector",
54
+ FileDescription: displayName,
55
+ InternalName: displayName,
55
56
  OriginalFilename: "agent-inspector.exe",
56
- ProductName: "Agent Inspector",
57
+ ProductName: displayName,
57
58
  ProductVersion: version,
58
59
  LegalCopyright: "Copyright (c) TonyClaw",
59
60
  },