@ironbee-ai/cli 0.8.3 → 0.9.0

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 (112) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +42 -17
  3. package/dist/clients/claude/commands/ironbee-verify.md +19 -106
  4. package/dist/clients/claude/hooks/require-verdict.d.ts +3 -3
  5. package/dist/clients/claude/hooks/require-verdict.js +5 -5
  6. package/dist/clients/claude/hooks/require-verification.d.ts +6 -5
  7. package/dist/clients/claude/hooks/require-verification.d.ts.map +1 -1
  8. package/dist/clients/claude/hooks/require-verification.js +20 -17
  9. package/dist/clients/claude/hooks/require-verification.js.map +1 -1
  10. package/dist/clients/claude/hooks/track-action-monitor.d.ts.map +1 -1
  11. package/dist/clients/claude/hooks/track-action-monitor.js +4 -1
  12. package/dist/clients/claude/hooks/track-action-monitor.js.map +1 -1
  13. package/dist/clients/claude/hooks/track-action.d.ts +11 -8
  14. package/dist/clients/claude/hooks/track-action.d.ts.map +1 -1
  15. package/dist/clients/claude/hooks/track-action.js +14 -9
  16. package/dist/clients/claude/hooks/track-action.js.map +1 -1
  17. package/dist/clients/claude/index.d.ts.map +1 -1
  18. package/dist/clients/claude/index.js +79 -18
  19. package/dist/clients/claude/index.js.map +1 -1
  20. package/dist/clients/claude/platforms/command-verify.backend.md +74 -0
  21. package/dist/clients/claude/platforms/command-verify.browser.md +108 -0
  22. package/dist/clients/claude/platforms/command-verify.node.md +67 -0
  23. package/dist/clients/claude/platforms/rule.backend.md +23 -0
  24. package/dist/clients/claude/platforms/rule.browser.md +17 -0
  25. package/dist/clients/claude/{fragments → platforms}/rule.node.md +3 -3
  26. package/dist/clients/claude/platforms/skill.backend.md +65 -0
  27. package/dist/clients/claude/platforms/skill.browser.md +31 -0
  28. package/dist/clients/claude/{fragments → platforms}/skill.node.md +2 -2
  29. package/dist/clients/claude/rules/ironbee-verification.md +14 -13
  30. package/dist/clients/claude/skills/ironbee-verification.md +19 -49
  31. package/dist/clients/cursor/commands/ironbee-verify/SKILL.md +21 -108
  32. package/dist/clients/cursor/hooks/require-verdict.d.ts +1 -1
  33. package/dist/clients/cursor/hooks/require-verdict.js +3 -3
  34. package/dist/clients/cursor/hooks/require-verification.d.ts.map +1 -1
  35. package/dist/clients/cursor/hooks/require-verification.js +9 -5
  36. package/dist/clients/cursor/hooks/require-verification.js.map +1 -1
  37. package/dist/clients/cursor/hooks/track-action-monitor.d.ts.map +1 -1
  38. package/dist/clients/cursor/hooks/track-action-monitor.js +4 -1
  39. package/dist/clients/cursor/hooks/track-action-monitor.js.map +1 -1
  40. package/dist/clients/cursor/hooks/track-action.d.ts +14 -12
  41. package/dist/clients/cursor/hooks/track-action.d.ts.map +1 -1
  42. package/dist/clients/cursor/hooks/track-action.js +25 -16
  43. package/dist/clients/cursor/hooks/track-action.js.map +1 -1
  44. package/dist/clients/cursor/index.d.ts.map +1 -1
  45. package/dist/clients/cursor/index.js +45 -11
  46. package/dist/clients/cursor/index.js.map +1 -1
  47. package/dist/clients/cursor/platforms/command-verify.backend.md +74 -0
  48. package/dist/clients/cursor/platforms/command-verify.browser.md +108 -0
  49. package/dist/clients/cursor/platforms/command-verify.node.md +67 -0
  50. package/dist/clients/cursor/platforms/rule.backend.md +23 -0
  51. package/dist/clients/cursor/platforms/rule.browser.md +17 -0
  52. package/dist/clients/cursor/{fragments → platforms}/rule.node.md +3 -3
  53. package/dist/clients/cursor/platforms/skill.backend.md +65 -0
  54. package/dist/clients/cursor/platforms/skill.browser.md +31 -0
  55. package/dist/clients/cursor/{fragments → platforms}/skill.node.md +2 -2
  56. package/dist/clients/cursor/rules/ironbee-verification.mdc +14 -13
  57. package/dist/clients/cursor/skills/ironbee-verification.md +19 -49
  58. package/dist/commands/backend.d.ts +17 -0
  59. package/dist/commands/backend.d.ts.map +1 -0
  60. package/dist/commands/backend.js +58 -0
  61. package/dist/commands/backend.js.map +1 -0
  62. package/dist/commands/browser.d.ts +19 -0
  63. package/dist/commands/browser.d.ts.map +1 -0
  64. package/dist/commands/browser.js +60 -0
  65. package/dist/commands/browser.js.map +1 -0
  66. package/dist/commands/config.d.ts +5 -5
  67. package/dist/commands/config.d.ts.map +1 -1
  68. package/dist/commands/config.js +13 -11
  69. package/dist/commands/config.js.map +1 -1
  70. package/dist/commands/cycle-toggle.d.ts +89 -0
  71. package/dist/commands/cycle-toggle.d.ts.map +1 -0
  72. package/dist/commands/cycle-toggle.js +264 -0
  73. package/dist/commands/cycle-toggle.js.map +1 -0
  74. package/dist/commands/node.d.ts +16 -0
  75. package/dist/commands/node.d.ts.map +1 -0
  76. package/dist/commands/node.js +57 -0
  77. package/dist/commands/node.js.map +1 -0
  78. package/dist/hooks/core/actions.d.ts +11 -2
  79. package/dist/hooks/core/actions.d.ts.map +1 -1
  80. package/dist/hooks/core/actions.js.map +1 -1
  81. package/dist/hooks/core/verify-gate.d.ts.map +1 -1
  82. package/dist/hooks/core/verify-gate.js +44 -14
  83. package/dist/hooks/core/verify-gate.js.map +1 -1
  84. package/dist/index.js +9 -6
  85. package/dist/index.js.map +1 -1
  86. package/dist/lib/config.d.ts +142 -41
  87. package/dist/lib/config.d.ts.map +1 -1
  88. package/dist/lib/config.js +251 -82
  89. package/dist/lib/config.js.map +1 -1
  90. package/dist/lib/platform-section.d.ts +126 -0
  91. package/dist/lib/platform-section.d.ts.map +1 -0
  92. package/dist/lib/platform-section.js +279 -0
  93. package/dist/lib/platform-section.js.map +1 -0
  94. package/package.json +1 -1
  95. package/dist/clients/claude/fragments/command-verify.node.md +0 -33
  96. package/dist/clients/cursor/fragments/command-verify.node.md +0 -33
  97. package/dist/commands/backend-toggle.d.ts +0 -56
  98. package/dist/commands/backend-toggle.d.ts.map +0 -1
  99. package/dist/commands/backend-toggle.js +0 -199
  100. package/dist/commands/backend-toggle.js.map +0 -1
  101. package/dist/commands/disable-backend.d.ts +0 -14
  102. package/dist/commands/disable-backend.d.ts.map +0 -1
  103. package/dist/commands/disable-backend.js +0 -38
  104. package/dist/commands/disable-backend.js.map +0 -1
  105. package/dist/commands/enable-backend.d.ts +0 -15
  106. package/dist/commands/enable-backend.d.ts.map +0 -1
  107. package/dist/commands/enable-backend.js +0 -39
  108. package/dist/commands/enable-backend.js.map +0 -1
  109. package/dist/lib/runtime-section.d.ts +0 -118
  110. package/dist/lib/runtime-section.d.ts.map +0 -1
  111. package/dist/lib/runtime-section.js +0 -256
  112. package/dist/lib/runtime-section.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.0 (2026-05-11)
4
+
5
+ ### Features
6
+
7
+ * **backend:** support backend platform ([#10](https://github.com/ironbee-ai/ironbee-cli/issues/10)) ([516aad3](https://github.com/ironbee-ai/ironbee-cli/commit/516aad32915d05da07e971fa151678652d97b5b4))
8
+
3
9
  ## 0.8.3 (2026-05-09)
4
10
 
5
11
  ### Features
package/README.md CHANGED
@@ -115,15 +115,37 @@ ironbee import --all-projects --since 6m --concurrency 2
115
115
  - `--concurrency <N>` — parallel sessions (default 4, clamped to `[1, 32]`); also configurable via `import.concurrency` in `~/.ironbee/config.json` or `<project>/.ironbee/config.json`
116
116
 
117
117
 
118
- ### Optional: enable Node backend verification
118
+ ### Optional: opt out of the browser cycle
119
119
 
120
120
  ```bash
121
- ironbee enable-backend node
121
+ ironbee browser disable
122
122
  ```
123
123
 
124
- Run this once per project that has Node backend code you want IronBee to gate. It writes opinionated default `verifyPatterns` (e.g. `server/**`, `pages/api/**`, `**/server.{ts,js,mjs,cjs}`) under `backend.node.verifyPatterns` in the project config. From then on, edits to matching paths require Node-cycle verification (connect + probes/logs) alongside any browser-cycle verification.
124
+ The **browser cycle** is the default-on cycle every code-file edit (40+ extensions: `.ts`, `.tsx`, `.css`, `.html`, `.py`, `.go`, `.java`, …) requires browser-driven verification (navigate / screenshot / aria / console). Run `browser disable` for projects where you don't want browser-cycle enforcement (e.g. backend-only services where only `node enable` / `backend enable` apply). It writes `browser.verifyPatterns: []` to override the legacy 40+ extension default; customizations of `alwaysRequired` / `evidencePaths` / `additionalVerifyPatterns` are preserved.
125
125
 
126
- To revert: `ironbee disable-backend node`. This empties `verifyPatterns` (no enforcement) but preserves any customizations you made to `alwaysRequired` / `evidencePaths`, so re-enabling later restores your tuned setup.
126
+ To re-enable: `ironbee browser enable` strips the `verifyPatterns: []` override so the code defaults (legacy 40+ extension list) flow back in at runtime. `config.json` stays minimal; the default list is NOT materialized into the file (it lives in code and tracks the CLI version automatically).
127
+
128
+ ### Optional: enable Node.js runtime debug verification
129
+
130
+ ```bash
131
+ ironbee node enable
132
+ ```
133
+
134
+ Run this once per project whose backend is Node.js and you want IronBee to gate at the runtime level (V8 inspector probes via `node-devtools`). It writes a minimal `{ "node": {} }` block to config — code defaults (e.g. `server/**`, `pages/api/**`, `**/server.{ts,js,mjs,cjs}`) flow in at runtime; nothing is materialized into the file. From then on, edits to matching paths require Node-cycle verification (connect + probes/logs) alongside any browser-cycle verification. To customize, set `node.verifyPatterns` (replaces defaults) or `node.additionalVerifyPatterns` (appends).
135
+
136
+ To revert: `ironbee node disable`. With no customizations the entire `node` block is dropped (clean config). With customizations or a lower-layer override, writes `verifyPatterns: []` (hard kill, preserves `alwaysRequired` / `evidencePaths` / `additionalVerifyPatterns` so re-enabling later restores your tuned setup).
137
+
138
+ ### Optional: enable runtime-agnostic backend protocol verification
139
+
140
+ ```bash
141
+ ironbee backend enable
142
+ ```
143
+
144
+ Activates the **backend protocol cycle** — drives real HTTP / gRPC / GraphQL / WebSocket calls against your running backend service via the `backend-devtools` MCP (`bedt_*` tools) and verifies the responses. Works for any backend runtime: Node, Java, Python, Go, Rust, Ruby, .NET, PHP, Elixir, Kotlin, Scala. The command writes a minimal `{ "backend": {} }` block to config — code defaults (multi-language paths covering `server/**`, `api/**`, `routes/**`, `controllers/**`, `handlers/**`, `services/**`) flow in at runtime.
145
+
146
+ The backend cycle is independent of the node cycle — node attaches to a Node.js process and sets non-blocking debug probes; backend drives the wire protocol from outside. Both can be enabled simultaneously; both must pass.
147
+
148
+ To revert: `ironbee backend disable` (drops the block clean if no customizations / lower-layer override; otherwise hard-kills via `verifyPatterns: []`).
127
149
 
128
150
  ### Optional: monitoring-only mode (no enforcement)
129
151
 
@@ -140,7 +162,7 @@ The toggle re-renders all client artifacts (hooks, skill, rule, MCP servers, per
140
162
  Cursor requires manual activation of MCP servers after install:
141
163
 
142
164
  1. **Restart Cursor** to load the new hooks and MCP config
143
- 2. Go to **Settings → Tools & MCP** and verify both **browser-devtools** and **node-devtools** are enabled
165
+ 2. Go to **Settings → Tools & MCP** and verify all three of **browser-devtools**, **node-devtools**, and **backend-devtools** are enabled
144
166
  3. If a server shows as enabled but tools are unavailable, toggle it off and on
145
167
 
146
168
  > **Note:** This is a [known Cursor limitation](https://forum.cursor.com/t/mcp-tools-only-available-to-agent-after-manually-toggling-server-off-on-even-when-already-enabled/152859) — MCP servers added via `mcp.json` may need manual activation.
@@ -157,8 +179,9 @@ ironbee uninstall [project-dir] [--client <name>] [--all] [-y] Remove hooks an
157
179
  ironbee status [project-dir] Show verdict status for active sessions
158
180
  ironbee verify [session-id] Dry-run verdict validation
159
181
  ironbee analyze [session-id] Analyze session metrics (or all sessions)
160
- ironbee enable-backend <runtime> Opt into backend verification (today: node)
161
- ironbee disable-backend <runtime> Opt out (resets verifyPatterns to []; preserves customizations)
182
+ ironbee browser <enable|disable> Manage the browser cycle (default-on; bdt_* tools via browser-devtools)
183
+ ironbee node <enable|disable> Manage the Node.js runtime debug cycle (V8 inspector probes via node-devtools)
184
+ ironbee backend <enable|disable> Manage the runtime-agnostic backend protocol cycle (HTTP/gRPC/GraphQL/WS via backend-devtools)
162
185
  ironbee enable-verification Turn enforcement on (default state)
163
186
  ironbee disable-verification Monitoring-only mode (no enforcement; sessions still ship to collector)
164
187
  ironbee config get <key> Read a config value (default: merged effective value)
@@ -176,7 +199,7 @@ ironbee unregister Remove this project from the u
176
199
 
177
200
  - **`ironbee install --all`** — explicit batch op that re-runs install on every registered project. Use after a global config change to propagate it everywhere; uses each project's currently detected clients (or pass `--client <name>` to override).
178
201
  - **`ironbee uninstall --all`** — destructive batch op that wipes ironbee from every registered project. Prompts with default-No before acting; pass `--yes` / `-y` to skip the prompt. Refuses without `--yes` in non-interactive contexts.
179
- - **Prompt on global config writes** — `ironbee config set <key> <val> -g` (and `unset`) on an artifact-affecting key (`collector`, `verification`, `browser`, `backend`, `browserDevTools`, `nodeDevTools`) lists up to 10 other registered project paths still on the prior state and asks `Apply this change to these N projects now? [Y/n]` (default Yes). Pass `--apply-all` / `--no-apply-all` to skip the prompt; non-TTY contexts skip it and print a hint pointing at `install --all`.
202
+ - **Prompt on global config writes** — `ironbee config set <key> <val> -g` (and `unset`) on an artifact-affecting key (`collector`, `verification`, `browser`, `node`, `backend`, `browserDevTools`, `nodeDevTools`, `backendDevTools`) lists up to 10 other registered project paths still on the prior state and asks `Apply this change to these N projects now? [Y/n]` (default Yes). Pass `--apply-all` / `--no-apply-all` to skip the prompt; non-TTY contexts skip it and print a hint pointing at `install --all`.
180
203
 
181
204
  For pure inventory bookkeeping (no artifact writes):
182
205
 
@@ -232,18 +255,18 @@ IronBee loads config from two locations (project deep-merges over global):
232
255
 
233
256
  | Key | Description | Default |
234
257
  |-----|-------------|---------|
235
- | `browser.verifyPatterns` | Glob patterns for files requiring **browser** verification (replaces defaults) | 40+ code extensions |
258
+ | `browser.verifyPatterns` | Glob patterns for files requiring **browser** verification (replaces defaults). Four-state semantic: block-absent → code defaults (40+ ext, default-on); block-present + verifyPatterns unset → code defaults (post-`browser enable` shape); `[]` → hard kill (also disables `additionalVerifyPatterns`); custom `[...]` → user-defined. | 40+ code extensions when block absent OR `verifyPatterns` unset |
236
259
  | `browser.additionalVerifyPatterns` | Extra browser patterns appended to defaults | `[]` |
237
- | `backend.<runtime>.verifyPatterns` | Glob patterns for files requiring **backend** verification, per runtime (today: `node`). Empty by default — opt in via `ironbee enable-backend <runtime>`. | `[]` |
238
- | `backend.<runtime>.additionalVerifyPatterns` | Extra backend patterns | `[]` |
260
+ | `node.verifyPatterns` | Glob patterns activating the **Node.js runtime debug cycle** (`node-devtools` MCP, `ndt_*` tools — V8 inspector probes). Empty by default — opt in via `ironbee node enable`. | `[]` |
261
+ | `node.additionalVerifyPatterns` | Extra patterns appended to `node.verifyPatterns` | `[]` |
262
+ | `backend.verifyPatterns` | Glob patterns activating the **runtime-agnostic backend protocol cycle** (`backend-devtools` MCP, `bedt_*` tools — HTTP/gRPC/GraphQL/WebSocket). Empty by default — opt in via `ironbee backend enable`. | `[]` |
263
+ | `backend.additionalVerifyPatterns` | Extra patterns appended to `backend.verifyPatterns` | `[]` |
239
264
  | `ignoredVerifyPatterns` | Patterns to exclude from verification (checked first, applies to all cycles) | `[]` |
240
265
  | `maxRetries` | Max retry attempts before allowing completion (single global counter regardless of how many cycles run) | `3` |
241
266
  | `verification.enable` | Master switch for enforcement. **Inverse semantics from `recording`/`jobQueue`/`collector`** — verification is the core feature, opt-out via `enable: false`. When disabled, ironbee runs in monitoring-only mode (no enforcement hooks, skill, rule, or MCP servers; only session/activity/tool_call telemetry flows to the collector). | `true` |
242
267
  | `fileChange.captureChangeset` | When `true`, every `file_change` event carries a hunks-only unified-diff `changeset` string (`@@` headers + `space`/`-`/`+` lines, no filename header — `file_path` already lives on the parent event). Off by default — the default `tool_input` whitelist deliberately strips file content from the wire; turning this on routes content through `file_change` instead. PreToolUse pre-reads the file when enabled so PostToolUse can produce a real before/after diff (Write/Edit on Claude; Write/StrReplace/Delete on Cursor). Skipped on binary content (NUL byte in first 4 KB). | `false` |
243
268
  | `fileChange.maxChangesetBytes` | Hard cap on the `changeset` string size. Diffs over the cap are sliced on a UTF-8 byte boundary and end with a `\n... (truncated, N bytes omitted)\n` footer so the collector POST stays within typical reverse-proxy body limits. | `65536` (64 KB) |
244
269
 
245
- > **Migrating from older versions:** the previous flat `verifyPatterns` / `additionalVerifyPatterns` at the top level is no longer supported. The config loader fails loudly on legacy shape — move them under `browser.*` (or the appropriate runtime under `backend.<runtime>.*`).
246
-
247
270
  ### Editing config from the CLI (`ironbee config`)
248
271
 
249
272
  You can edit either config file via the CLI instead of hand-rolling JSON:
@@ -273,7 +296,7 @@ ironbee config path # print the project config file path
273
296
 
274
297
  **Type coercion** — `set` parses the value as JSON when it can (`true`/`42`/`[…]`/`{…}`) and falls back to a raw string when JSON parse fails. URLs and paths pass through unquoted; pass `--json` to force strict JSON parsing (e.g. when you want the literal string `"42"` instead of the number `42`).
275
298
 
276
- **Smart artifact re-render** — when a top-level key affects installed client artifacts (`verification`, `collector`, `browser`, `backend`, `browserDevTools`, `nodeDevTools`), `set` and `unset` re-render the client files (hooks, MCP entries, skill, rule, permissions) automatically — same code path `enable-verification` / `enable-backend` use. Other keys (`maxRetries`, `recording`, `jobQueue`, `analytics`, `import`, `ignoredVerifyPatterns`) are pure config flips that the next agent session picks up — no rerender needed.
299
+ **Smart artifact re-render** — when a top-level key affects installed client artifacts (`verification`, `collector`, `browser`, `node`, `backend`, `browserDevTools`, `nodeDevTools`, `backendDevTools`), `set` and `unset` re-render the client files (hooks, MCP entries, skill, rule, permissions) automatically — same code path `enable-verification` / `node enable` / `backend enable` use. Other keys (`maxRetries`, `recording`, `jobQueue`, `analytics`, `import`, `ignoredVerifyPatterns`) are pure config flips that the next agent session picks up — no rerender needed.
277
300
 
278
301
  Pass `--no-rerender` to skip the rerender on artifact-affecting keys (handy for scripted bulk edits — follow up with `ironbee install` to resync). If a rerender fails midway, the config file is rolled back to its prior bytes so disk state never diverges from installed artifacts.
279
302
 
@@ -281,9 +304,11 @@ Pass `--no-rerender` to skip the rerender on artifact-affecting keys (handy for
281
304
 
282
305
  ### Default verify patterns
283
306
 
284
- By default, the **browser cycle** matches common code file extensions: `.ts`, `.tsx`, `.js`, `.jsx`, `.css`, `.scss`, `.html`, `.py`, `.go`, `.rs`, `.java`, `.vue`, `.svelte`, and [many more](src/lib/config.ts). Backend file edits trigger browser verification by default since they often affect frontend behavior.
307
+ By default, the **browser cycle** is enabled and matches common code file extensions: `.ts`, `.tsx`, `.js`, `.jsx`, `.css`, `.scss`, `.html`, `.py`, `.go`, `.rs`, `.java`, `.vue`, `.svelte`, and [many more](src/lib/config.ts) (`DEFAULT_BROWSER_VERIFY_PATTERNS`). Backend file edits trigger browser verification by default since they often affect frontend behavior. Run `ironbee browser disable` for projects where the browser-cycle gate isn't appropriate (e.g. backend-only services); `ironbee browser enable` re-enables.
308
+
309
+ **Patterns are NOT materialized into `config.json`** — they live in the CLI source (`DEFAULT_BROWSER_VERIFY_PATTERNS` / `DEFAULT_NODE_VERIFY_PATTERNS` / `DEFAULT_BACKEND_VERIFY_PATTERNS`) and flow in at runtime when the cycle block exists without an explicit `verifyPatterns` key. Keeps `config.json` minimal AND lets defaults track CLI updates automatically (no frozen-at-install-time drift). To customize, set the explicit `<cycle>.verifyPatterns` (replaces defaults) or `<cycle>.additionalVerifyPatterns` (appends).
285
310
 
286
- The **node cycle** has no default patterns — running `ironbee enable-backend node` writes opinionated defaults (`server/**`, `pages/api/**`, etc.) which you can customize after.
311
+ The **node cycle** is opt-in via `ironbee node enable` (only meaningful for Node.js backends — `node-devtools` is a V8 inspector wrapper). The **backend cycle** is opt-in via `ironbee backend enable` and is runtime-agnostic (drives wire protocols via `backend-devtools`).
287
312
 
288
313
  Non-code files like `README.md`, `package.json`, or `.gitignore` do not trigger any cycle.
289
314
 
@@ -342,7 +367,7 @@ You can mix-and-match: full config replacement via `mcp`, or just env-var additi
342
367
  When the agent tries to complete a task, IronBee runs these checks:
343
368
 
344
369
  1. **Were code files edited?** — If no matching files were changed, the agent completes normally.
345
- 2. **Which cycles are active?** — IronBee matches each edited file against `browser.verifyPatterns` and (if you opted in) `backend.<runtime>.verifyPatterns`. A single file may activate both cycles; both then run in parallel.
370
+ 2. **Which cycles are active?** — IronBee matches each edited file against `browser.verifyPatterns` and (if you opted in) `node.verifyPatterns` and/or `backend.verifyPatterns`. A single file may activate two or three cycles; they all run in parallel and pass/fail combine with AND.
346
371
  3. **Were the cycle's required tools used?**
347
372
  - **Browser cycle**: navigate, screenshot, accessibility snapshot, console check (all-of)
348
373
  - **Node cycle**: connect; then either probe path (`(put-tracepoint | put-logpoint | put-exceptionpoint) AND get-probe-snapshots`) OR log path (`get-logs`)
@@ -1,120 +1,38 @@
1
1
  # IronBee Verify
2
2
 
3
- Verify the current code changes through real tools browser interaction for frontend, runtime-specific debugger for any enabled backend cycle.
3
+ Verify the current code changes through real tools. The gate runs every cycle that has been wired up for this project, and all active cycles must be satisfied within a single verification cycle for `status: pass`. Each cycle has its own tools, flow, and verdict fields — **see the platform sections near the bottom of this file** for which cycles apply and what to call.
4
4
 
5
- ## Usage
6
- - `/ironbee-verify` — **default** — focus on what changed, visual + functional checks on affected areas (browser-cycle modes; any enabled backend-runtime cycle runs alongside automatically — see runtime section below)
7
- - `/ironbee-verify full` — **full scope** — entire application, all checklists, edge cases, responsive, accessibility deep dive
8
- - `/ironbee-verify visual` — **visual only** — contrast, layout, spacing, fonts, images, theming
9
- - `/ironbee-verify functional` — **functional only** — clicks, forms, navigation, data flow, error handling
10
-
11
- If no argument is given, use **default** mode. The mode argument controls only the browser-cycle thoroughness — any active backend-runtime cycle runs the same way regardless of mode.
12
-
13
- A backend-runtime cycle (e.g. `node` after `ironbee enable-backend node`) may also be active for this project — **see the runtime section near the bottom of this file** for whether it applies and which tools to call.
14
-
15
- ---
16
-
17
- ## Steps (all modes)
5
+ ## Universal steps
18
6
 
19
7
  1. **Start verification**: Run `echo '{"session_id":"<your-session-id>"}' | ironbee hook verification-start` via Bash (substitute the actual session ID printed by the SessionStart hook).
20
- 2. **Build and start** the application if not already running
21
- 3. **For EVERY page you visit**, repeat this cycle:
22
- a. **Navigate** using `mcp__browser-devtools__bdt_navigation_go-to`
23
- b. **Take a FULL PAGE screenshot** using `mcp__browser-devtools__bdt_content_take-screenshot` with `fullPage: true`
24
- c. **Take an ARIA snapshot** using `mcp__browser-devtools__bdt_a11y_take-aria-snapshot`
25
- d. **STOP and visually analyze the screenshot** switch your focus entirely to finding visual problems. Look at this screenshot as if your ONLY job is to find visual defects:
26
- **WARNING: ARIA reports DOM content, not what the user actually sees.** Do NOT assume the page looks correct just because ARIA shows the right content. Only the screenshot tells you what the user actually sees.
27
- - Text readability is it readable against its background? Look for text that blends in or poor contrast
28
- - Layout overlapping elements, unexpected gaps, overflow, content cut off
29
- - Spacing — consistent padding/margin? Too cramped or too far apart?
30
- - Colors — intentional and consistent? Any jarring mismatches?
31
- - Typography — right sizes? Clipped or truncated text?
32
- - Images/icons — loaded? Right size and aspect ratio?
33
- - States — empty, loading, disabled, error states rendered properly?
34
- Report your visual findings before continuing.
35
- e. **Read the ARIA snapshot** — verify headings, labels, landmarks, and structure
36
- f. If anything looks wrong → note it as an issue
37
- 4. **Functionally test** — run the checklist for your mode (see below). After each significant interaction, take another screenshot and repeat the visual analysis.
38
- 5. **Check console** for errors using `mcp__browser-devtools__bdt_o11y_get-console-messages`
39
- 6. **Stop** the dev server when verification is complete
40
- 7. **If recording was started, stop it now** — `mcp__browser-devtools__bdt_content_stop-recording`. submit-verdict rejects with `"recording is still active"` when this step is skipped. (Recording is a server-side opt-in via `recording.enable` — when on, the gate forces `bdt_content_start-recording` BEFORE the steps above and demands the matching stop here.)
41
- 8. **Submit your verdict** via Bash:
42
- - Pass: `echo '{"session_id":"...","status":"pass","pages_tested":[...],"checks":[...],"console_errors":0,"network_failures":0}' | ironbee hook submit-verdict`
43
- - Fail: `echo '{"session_id":"...","status":"fail","pages_tested":[...],"checks":[...],"console_errors":N,"network_failures":N,"issues":["describe what failed"]}' | ironbee hook submit-verdict`
44
- 9. **If failed** → collect ALL issues first (finish testing all affected pages), submit one fail verdict with all issues, then fix everything, rebuild, and re-verify. Do not fix one issue at a time — batch fixes to avoid repeated build/restart cycles.
45
- 10. If pass after a previous fail, include `"fixes"` in the verdict describing what was fixed
46
-
47
- ---
48
-
49
- ## Default Mode
50
-
51
- Focus on the code you changed — not the entire application.
52
-
53
- ### 1. Study the changes
54
- 1. Run `git diff --name-only` and `git diff --name-only HEAD~1`
55
- 2. **Ignore `.ironbee/`, `.claude/`, `.cursor/`** — tool config, not application code
56
- 3. **Read the full diff** (`git diff` and/or `git diff HEAD~1`) — understand every change: what was added, removed, modified. Note specific values (colors, sizes, conditions, logic, API endpoints, component props).
57
- 4. Before opening the browser, you should be able to answer: what exactly changed, what should look or behave differently, and what could go wrong?
58
-
59
- ### 2. Verify in the browser
60
- - **Cross-reference the diff against what you see.** For each change in the diff, verify it is correctly reflected in the browser. If the diff changes a color → check that color. If it changes a calculation → verify the result. If it adds a component → confirm it renders.
61
- - **Test the flow end-to-end** — navigate, click, fill forms, submit, verify the outcome
62
- - **Check one edge case** — empty input, invalid data, or double-click
63
- - **Console** — any new errors or warnings?
64
-
65
- ---
66
-
67
- ## Full Mode (`/ironbee-verify full`)
68
-
69
- Comprehensive verification of the **entire application**. Do NOT run `git diff` or scope to recent changes. Test every page, every flow, every visual detail. Any issue is a failure, regardless of when it was introduced.
70
-
71
- ### Visual Checklist
72
- In addition to the per-page visual analysis in step 3d:
73
- - **Responsiveness** — does the layout adapt if viewport changes? No horizontal scrolling on standard widths
74
- - **Borders & separators** — visible and consistent? Not too faint or missing
75
- - **Scroll behavior** — does the page scroll smoothly? No content hidden behind sticky headers/footers?
76
-
77
- ### Functional Checklist
78
- - **Navigation** — do links and buttons navigate to the correct pages?
79
- - **Forms** — fill inputs with real data, select options, submit. Do validation messages appear correctly?
80
- - **Buttons & interactions** — do click handlers fire? Do toggles, dropdowns, and modals work?
81
- - **Data flow** — does submitted data appear where expected?
82
- - **Error handling** — what happens with invalid input? Does the UI handle errors gracefully?
83
- - **Authentication** — if applicable, do protected routes redirect correctly?
84
- - **API calls** — do network requests succeed? Check for failed requests in console/network
85
- - **State persistence** — does state survive page refresh where expected?
86
- - **Edge cases** — empty inputs, very long text, special characters, rapid clicks
87
-
88
- ### Accessibility (deep dive)
89
- - Are headings hierarchical? Do form inputs have labels? Are landmarks present?
90
- - Check for missing alt text on images
8
+ 2. **Build and start** the application if not already running.
9
+ 3. **For every active cycle, run its flow** as described in the platform sections near the bottom of this file. All active cycles must be exercised within this same verification cycle.
10
+ 4. **Stop** the dev server when verification is complete.
11
+ 5. **Honor any cycle-specific teardown** noted in the platform sections BEFORE submitting your verdict.
12
+ 6. **Submit your verdict** via Bash. Include fields for every active cycle:
13
+ - Pass: `echo '{"session_id":"...","status":"pass", ...cycle-specific fields...}' | ironbee hook submit-verdict`
14
+ - Fail: `echo '{"session_id":"...","status":"fail", ...cycle-specific fields..., "issues":["describe what failed"]}' | ironbee hook submit-verdict`
15
+ 7. **If failed** collect ALL issues first (finish testing every active cycle), submit one fail verdict with all issues, then fix everything, rebuild, and re-verify. Do not fix one issue at a time — batch fixes to avoid repeated build/restart cycles.
16
+ 8. If pass after a previous fail, include `"fixes"` in the verdict describing what was fixed.
91
17
 
92
18
  ---
93
19
 
94
- ## Visual Mode (`/ironbee-verify visual`)
20
+ <!--IRONBEE:PLATFORM:browser-->
21
+ <!--/IRONBEE:PLATFORM:browser-->
95
22
 
96
- Focus exclusively on visual quality. Run the per-page visual analysis from step 3d on every page, plus:
97
- - **Responsiveness** — viewport changes, no horizontal scrolling
98
- - **Borders & separators** — visible and consistent?
99
- - **Scroll behavior** — smooth scrolling, no hidden content
23
+ <!--IRONBEE:PLATFORM:node-->
24
+ <!--/IRONBEE:PLATFORM:node-->
100
25
 
101
- Take screenshots of **multiple states** if applicable (hover, active, disabled, empty, populated).
102
-
103
- ---
104
-
105
- ## Functional Mode (`/ironbee-verify functional`)
106
-
107
- Focus exclusively on behavior. Use the same functional checklist as Full Mode above.
108
-
109
- Test the **complete user flow**, not just the single step you changed.
26
+ <!--IRONBEE:PLATFORM:backend-->
27
+ <!--/IRONBEE:PLATFORM:backend-->
110
28
 
111
29
  ---
112
30
 
113
31
  ## When to FAIL
114
32
 
115
- If you observe ANY problem — wrong data, unexpected errors, visual defects, broken interactions, console errors, data inconsistency between pages — you MUST submit a **fail** verdict.
33
+ If you observe ANY problem on any active cycle — wrong data, unexpected errors, broken interactions, missing evidence, anything that doesn't match the spec — you MUST submit a **fail** verdict.
116
34
 
117
- **Do NOT rationalize away problems.** If something looks wrong or behaves unexpectedly, it IS wrong. In **full** mode, there is no such thing as "pre-existing" — if it's broken, fail it.
35
+ **Do NOT rationalize away problems.** If something looks wrong or behaves unexpectedly, it IS wrong.
118
36
 
119
37
  **After a fail verdict, you MUST fix the issues and re-verify.** Do not just report and stop.
120
38
 
@@ -128,8 +46,3 @@ Your `checks` array must list **specific observations**, not generic statements:
128
46
  - ALWAYS submit a verdict after every verification attempt — both pass AND fail
129
47
  - Do NOT edit code before submitting a fail verdict
130
48
  - **Noticing a bug and submitting pass is the #1 violation** — if you see it, fail it
131
-
132
- ---
133
-
134
- <!--IRONBEE:RUNTIME:node-->
135
- <!--/IRONBEE:RUNTIME:node-->
@@ -2,9 +2,9 @@
2
2
  * Claude Code — require-verdict hook adapter
3
3
  *
4
4
  * PreToolUse hook for Write|Edit — blocks file edits if the agent used
5
- * any devtools tools (browser-devtools or node-devtools) but hasn't
6
- * submitted a verdict yet. Forces the agent to submit a fail verdict
7
- * before fixing code.
5
+ * any devtools tools (browser-devtools / node-devtools / backend-devtools)
6
+ * but hasn't submitted a verdict yet. Forces the agent to submit a fail
7
+ * verdict before fixing code.
8
8
  *
9
9
  * Side effect: when `tool_name === "Write"`, stashes whether the target
10
10
  * file already exists so the matching PostToolUse adapter can decide
@@ -3,9 +3,9 @@
3
3
  * Claude Code — require-verdict hook adapter
4
4
  *
5
5
  * PreToolUse hook for Write|Edit — blocks file edits if the agent used
6
- * any devtools tools (browser-devtools or node-devtools) but hasn't
7
- * submitted a verdict yet. Forces the agent to submit a fail verdict
8
- * before fixing code.
6
+ * any devtools tools (browser-devtools / node-devtools / backend-devtools)
7
+ * but hasn't submitted a verdict yet. Forces the agent to submit a fail
8
+ * verdict before fixing code.
9
9
  *
10
10
  * Side effect: when `tool_name === "Write"`, stashes whether the target
11
11
  * file already exists so the matching PostToolUse adapter can decide
@@ -38,9 +38,9 @@ async function run(projectDir) {
38
38
  const sessionDir = `${projectDir}/.ironbee/sessions/${sessionId}`;
39
39
  const actionsFile = `${sessionDir}/actions.jsonl`;
40
40
  if ((0, actions_1.hasToolCallsSinceLastVerdict)(actionsFile)) {
41
- process.stderr.write(`BLOCKED: You used verification tools (browser-devtools or node-devtools) but did not submit a verdict. You MUST submit a verdict (pass or fail) before editing code.
41
+ process.stderr.write(`BLOCKED: You used verification tools (browser-devtools / node-devtools / backend-devtools) but did not submit a verdict. You MUST submit a verdict (pass or fail) before editing code.
42
42
 
43
- Submit your verdict first (include cycle-appropriate fields — browser fields for bdt_*, backend_node_* fields for ndt_*):
43
+ Submit your verdict first (include cycle-appropriate fields — browser fields for bdt_*, backend_node_* for ndt_*, backend_endpoints_called/backend_response_statuses for bedt_*):
44
44
  echo '{"session_id":"${sessionId}","status":"fail","checks":[...],"issues":["describe what failed"], ...}' | ironbee hook submit-verdict
45
45
 
46
46
  Then you can edit code to fix the issues.
@@ -1,15 +1,16 @@
1
1
  /**
2
2
  * Claude Code — require-verification hook adapter
3
3
  *
4
- * PreToolUse hook for `mcp__browser-devtools__.*|mcp__node-devtools__.*`
5
- * — blocks devtools tool usage if no active verification cycle. Forces
6
- * the agent to call `ironbee hook verification-start` before using any
7
- * verification tooling (browser or node).
4
+ * PreToolUse hook for the three devtools matchers — `mcp__browser-devtools__.*`,
5
+ * `mcp__node-devtools__.*`, `mcp__backend-devtools__.*` — blocks devtools tool
6
+ * usage if no active verification cycle. Forces the agent to call
7
+ * `ironbee hook verification-start` before using any verification tooling
8
+ * (browser, node, or backend).
8
9
  *
9
10
  * When allowed, injects `_metadata` into tool input with sessionId and traceId
10
11
  * so the MCP server knows the active session/trace context. The `mcpServer`
11
12
  * field is parsed from `tool_name` so each server (browser-devtools /
12
- * node-devtools) sees its own correct identity.
13
+ * node-devtools / backend-devtools) sees its own correct identity.
13
14
  *
14
15
  * Exit 0 = allow tool (with updatedInput containing _metadata)
15
16
  * Exit 2 = block tool
@@ -1 +1 @@
1
- {"version":3,"file":"require-verification.d.ts","sourceRoot":"","sources":["../../../../src/clients/claude/hooks/require-verification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAgCH,wBAAsB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoH3D"}
1
+ {"version":3,"file":"require-verification.d.ts","sourceRoot":"","sources":["../../../../src/clients/claude/hooks/require-verification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAiCH,wBAAsB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqH3D"}
@@ -2,15 +2,16 @@
2
2
  /**
3
3
  * Claude Code — require-verification hook adapter
4
4
  *
5
- * PreToolUse hook for `mcp__browser-devtools__.*|mcp__node-devtools__.*`
6
- * — blocks devtools tool usage if no active verification cycle. Forces
7
- * the agent to call `ironbee hook verification-start` before using any
8
- * verification tooling (browser or node).
5
+ * PreToolUse hook for the three devtools matchers — `mcp__browser-devtools__.*`,
6
+ * `mcp__node-devtools__.*`, `mcp__backend-devtools__.*` — blocks devtools tool
7
+ * usage if no active verification cycle. Forces the agent to call
8
+ * `ironbee hook verification-start` before using any verification tooling
9
+ * (browser, node, or backend).
9
10
  *
10
11
  * When allowed, injects `_metadata` into tool input with sessionId and traceId
11
12
  * so the MCP server knows the active session/trace context. The `mcpServer`
12
13
  * field is parsed from `tool_name` so each server (browser-devtools /
13
- * node-devtools) sees its own correct identity.
14
+ * node-devtools / backend-devtools) sees its own correct identity.
14
15
  *
15
16
  * Exit 0 = allow tool (with updatedInput containing _metadata)
16
17
  * Exit 2 = block tool
@@ -26,9 +27,10 @@ const logger_1 = require("../../../lib/logger");
26
27
  const util_1 = require("../util");
27
28
  const stdin_1 = require("../../../lib/stdin");
28
29
  /** Fallback MCP server when `tool_name` parsing fails. The matcher routes
29
- * both `mcp__browser-devtools__.*` and `mcp__node-devtools__.*` here, so
30
- * `extractMcpServerName` is the source of truth — this is only used if the
31
- * tool_name field is malformed or absent. */
30
+ * all three of `mcp__browser-devtools__.*`, `mcp__node-devtools__.*`, and
31
+ * `mcp__backend-devtools__.*` here, so `extractMcpServerName` is the source
32
+ * of truth — this fallback is only used if the tool_name field is malformed
33
+ * or absent. */
32
34
  const FALLBACK_MCP_SERVER_NAME = "browser-devtools";
33
35
  async function run(projectDir) {
34
36
  let input;
@@ -45,12 +47,12 @@ async function run(projectDir) {
45
47
  const actionsFile = `${sessionDir}/actions.jsonl`;
46
48
  const verificationId = (0, session_state_1.getActiveVerificationId)(sessionDir);
47
49
  if (!verificationId) {
48
- process.stderr.write(`BLOCKED: You must start a verification cycle before using devtools tools (browser-devtools or node-devtools).
50
+ process.stderr.write(`BLOCKED: You must start a verification cycle before using devtools tools (browser-devtools / node-devtools / backend-devtools).
49
51
 
50
52
  Start verification first:
51
53
  echo '{"session_id":"${sessionId}"}' | ironbee hook verification-start
52
54
 
53
- Then use the verification tools for the active cycle(s) — bdt_* for browser, ndt_* for node.
55
+ Then use the verification tools for the active cycle(s) — bdt_* for browser, ndt_* for node, bedt_* for backend.
54
56
  `);
55
57
  process.exit(2);
56
58
  }
@@ -108,13 +110,14 @@ Then use the verification tools for the active cycle(s) — bdt_* for browser, n
108
110
  if (input.tool_use_id) {
109
111
  metadata.toolUseId = input.tool_use_id;
110
112
  }
111
- // The matcher routes both `mcp__browser-devtools__.*` and
112
- // `mcp__node-devtools__.*` here, so the tool_name reliably encodes a
113
- // server. Parse it so each server gets its correct identity in the
114
- // metadata. Falls back to a hardcoded browser-devtools constant if
115
- // parsing ever fails (malformed tool_name, missing field, …). This
116
- // keeps MCP-emitted OTel events tagged with the same `mcp_server`
117
- // dimension our own tool_call events carry.
113
+ // The matcher routes all three of `mcp__browser-devtools__.*`,
114
+ // `mcp__node-devtools__.*`, and `mcp__backend-devtools__.*` here, so
115
+ // the tool_name reliably encodes a server. Parse it so each server
116
+ // gets its correct identity in the metadata. Falls back to a
117
+ // hardcoded browser-devtools constant if parsing ever fails (malformed
118
+ // tool_name, missing field, …). This keeps MCP-emitted OTel events
119
+ // tagged with the same `mcp_server` dimension our own tool_call
120
+ // events carry.
118
121
  metadata.mcpServer = (0, util_1.extractMcpServerName)(input.tool_name) ?? FALLBACK_MCP_SERVER_NAME;
119
122
  const userEmail = (0, session_state_1.getUserEmail)(sessionDir);
120
123
  if (userEmail) {
@@ -1 +1 @@
1
- {"version":3,"file":"require-verification.js","sourceRoot":"","sources":["../../../../src/clients/claude/hooks/require-verification.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;AAgCH,kBAoHC;AAlJD,mCAAoC;AACpC,qEAAyK;AACzK,yDAAiE;AACjE,2DAA6D;AAC7D,gDAAiD;AACjD,gDAAyD;AACzD,kCAA+C;AAC/C,8CAA+C;AAE/C;;;8CAG8C;AAC9C,MAAM,wBAAwB,GAAW,kBAAkB,CAAC;AAiBrD,KAAK,UAAU,GAAG,CAAC,UAAkB;IACxC,IAAI,KAA4B,CAAC;IACjC,IAAI,CAAC;QACD,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAS,GAAE,CAA0B,CAAC;IAC7D,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QAClB,eAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,EAAE,CAAC,CAAC;QAC5C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,MAAM,SAAS,GAAW,KAAK,CAAC,UAAU,IAAI,SAAS,CAAC;IACxD,MAAM,UAAU,GAAW,GAAG,UAAU,sBAAsB,SAAS,EAAE,CAAC;IAC1E,IAAA,mBAAU,EAAC,GAAG,UAAU,cAAc,CAAC,CAAC;IAExC,MAAM,WAAW,GAAW,GAAG,UAAU,gBAAgB,CAAC;IAE1D,MAAM,cAAc,GAAuB,IAAA,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;IACD,YAAY,CAAC,SAAS,GAAG,QAAQ,CAAC;IAElC,MAAM,MAAM,GAA2B;QACnC,kBAAkB,EAAE;YAChB,aAAa,EAAE,YAAY;YAC3B,kBAAkB,EAAE,OAAO;YAC3B,YAAY;SACf;KACJ,CAAC;IAEF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC"}
1
+ {"version":3,"file":"require-verification.js","sourceRoot":"","sources":["../../../../src/clients/claude/hooks/require-verification.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;AAiCH,kBAqHC;AApJD,mCAAoC;AACpC,qEAAyK;AACzK,yDAAiE;AACjE,2DAA6D;AAC7D,gDAAiD;AACjD,gDAAyD;AACzD,kCAA+C;AAC/C,8CAA+C;AAE/C;;;;iBAIiB;AACjB,MAAM,wBAAwB,GAAW,kBAAkB,CAAC;AAiBrD,KAAK,UAAU,GAAG,CAAC,UAAkB;IACxC,IAAI,KAA4B,CAAC;IACjC,IAAI,CAAC;QACD,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAS,GAAE,CAA0B,CAAC;IAC7D,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QAClB,eAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,EAAE,CAAC,CAAC;QAC5C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,MAAM,SAAS,GAAW,KAAK,CAAC,UAAU,IAAI,SAAS,CAAC;IACxD,MAAM,UAAU,GAAW,GAAG,UAAU,sBAAsB,SAAS,EAAE,CAAC;IAC1E,IAAA,mBAAU,EAAC,GAAG,UAAU,cAAc,CAAC,CAAC;IAExC,MAAM,WAAW,GAAW,GAAG,UAAU,gBAAgB,CAAC;IAE1D,MAAM,cAAc,GAAuB,IAAA,uCAAuB,EAA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AC;IACD,YAAY,CAAC,SAAS,GAAG,QAAQ,CAAC;IAElC,MAAM,MAAM,GAA2B;QACnC,kBAAkB,EAAE;YAChB,aAAa,EAAE,YAAY;YAC3B,kBAAkB,EAAE,OAAO;YAC3B,YAAY;SACf;KACJ,CAAC;IAEF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"track-action-monitor.d.ts","sourceRoot":"","sources":["../../../../src/clients/claude/hooks/track-action-monitor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAyBH,wBAAsB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkE3D"}
1
+ {"version":3,"file":"track-action-monitor.d.ts","sourceRoot":"","sources":["../../../../src/clients/claude/hooks/track-action-monitor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AA0BH,wBAAsB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoE3D"}
@@ -36,6 +36,7 @@ const queue_1 = require("../../../queue");
36
36
  const util_1 = require("../util");
37
37
  const BROWSER_DEVTOOLS_SERVER = "browser-devtools";
38
38
  const NODE_DEVTOOLS_SERVER = "node-devtools";
39
+ const BACKEND_DEVTOOLS_SERVER = "backend-devtools";
39
40
  async function run(projectDir) {
40
41
  let input;
41
42
  try {
@@ -63,7 +64,9 @@ async function run(projectDir) {
63
64
  const activityId = (0, session_state_1.getActiveActivityId)(sessionDir);
64
65
  const classified = (0, util_1.classifyTool)(rawToolName, input.tool_input);
65
66
  const isOurDevToolsTool = classified.tool_type === "mcp"
66
- && (classified.mcp_server === BROWSER_DEVTOOLS_SERVER || classified.mcp_server === NODE_DEVTOOLS_SERVER);
67
+ && (classified.mcp_server === BROWSER_DEVTOOLS_SERVER
68
+ || classified.mcp_server === NODE_DEVTOOLS_SERVER
69
+ || classified.mcp_server === BACKEND_DEVTOOLS_SERVER);
67
70
  // Devtools events self-ship via the MCP server; in monitoring-only mode
68
71
  // the server isn't even installed. No queue submit, no actions.jsonl.
69
72
  if (isOurDevToolsTool) {
@@ -1 +1 @@
1
- {"version":3,"file":"track-action-monitor.js","sourceRoot":"","sources":["../../../../src/clients/claude/hooks/track-action-monitor.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;;AAyBH,kBAkEC;AAzFD,yDAAyE;AACzE,2DAA6D;AAC7D,qEAAwE;AACxE,gDAAwD;AACxD,gDAAyD;AACzD,8CAA+C;AAC/C,0CAA2E;AAC3E,kCAA+E;AAE/E,MAAM,uBAAuB,GAAW,kBAAkB,CAAC;AAC3D,MAAM,oBAAoB,GAAW,eAAe,CAAC;AAa9C,KAAK,UAAU,GAAG,CAAC,UAAkB;IACxC,IAAI,KAA6B,CAAC;IAClC,IAAI,CAAC;QACD,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAS,GAAE,CAA2B,CAAC;IAC9D,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QAClB,eAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,EAAE,CAAC,CAAC;QAC5C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,MAAM,SAAS,GAAW,KAAK,CAAC,UAAU,IAAI,SAAS,CAAC;IACxD,MAAM,UAAU,GAAW,GAAG,UAAU,sBAAsB,SAAS,EAAE,CAAC;IAC1E,MAAM,WAAW,GAAW,GAAG,UAAU,gBAAgB,CAAC;IAC1D,IAAA,mBAAU,EAAC,GAAG,UAAU,cAAc,CAAC,CAAC;IAExC,wEAAwE;IACxE,mEAAmE;IACnE,mDAAmD;IACnD,IAAI,IAAA,mCAAmB,EAAC,UAAU,CAAC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,EAAC,UAAU,CAAC,EAAE,CAAC;QACjC,OAAO;IACX,CAAC;IACD,MAAM,IAAI,GAA4B,EAAE,GAAG,KAAK,EAAE,CAAC;IACnD,OAAO,IAAI,CAAC,aAAa,CAAC;IAC1B,IAAI,CAAC;QACD,IAAA,cAAM,EAAC,UAAU,EAAE,SAAS,EAAE,uBAAe,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QAClB,IAAI,CAAC,YAAY,wBAAgB,EAAE,CAAC;YAChC,eAAM,CAAC,KAAK,CAAC,kDAAkD,KAAK,CAAC,SAAS,YAAY,CAAC,CAAC;YAC5F,OAAO;QACX,CAAC;QACD,eAAM,CAAC,KAAK,CAAC,0CAA0C,KAAK,CAAC,SAAS,KAAK,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACrH,CAAC;AACL,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC5B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACxC,OAAO,CAAC,CAAC;IACb,CAAC;IACD,IAAI,CAAC;QACD,MAAM,CAAC,GAAW,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC5E,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,CAAC,CAAC;IACb,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"track-action-monitor.js","sourceRoot":"","sources":["../../../../src/clients/claude/hooks/track-action-monitor.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;;AA0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AC,YAAY,wBAAgB,EAAE,CAAC;YAChC,eAAM,CAAC,KAAK,CAAC,kDAAkD,KAAK,CAAC,SAAS,YAAY,CAAC,CAAC;YAC5F,OAAO;QACX,CAAC;QACD,eAAM,CAAC,KAAK,CAAC,0CAA0C,KAAK,CAAC,SAAS,KAAK,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACrH,CAAC;AACL,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC5B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACxC,OAAO,CAAC,CAAC;IACb,CAAC;IACD,IAAI,CAAC;QACD,MAAM,CAAC,GAAW,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC5E,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,CAAC,CAAC;IACb,CAAC;AACL,CAAC"}
@@ -6,14 +6,17 @@
6
6
  * the `error` field on stdin (Claude hook contract).
7
7
  *
8
8
  * Responsibilities:
9
- * 1. **browser-devtools (mcp__browser-devtools__*)**: append the tool_call
10
- * entry to `actions.jsonl` (verify-gate depends on these records),
11
- * update recording state, extract nested `callTool()` invocations from
12
- * `bdt_execute`. Browser tools are NOT submitted to the send_event
13
- * queue browser-devtools-mcp ships them directly to the collector,
14
- * so double-sending would cause duplicates (with different ids) that
15
- * downstream dedup cannot collapse. tool_input is preserved AS-IS for
16
- * these so the local nested parser keeps working.
9
+ * 1. **devtools MCP (browser-devtools / node-devtools / backend-devtools)**:
10
+ * append the tool_call entry to `actions.jsonl` (verify-gate depends
11
+ * on these records); for browser tools, also update recording state
12
+ * and extract nested `callTool()` invocations from `bdt_execute`.
13
+ * Devtools tools are NOT submitted to the send_event queue — all
14
+ * three modes use the same `browser-devtools-mcp` package, which
15
+ * ships its own `tool_call` events directly to the collector, so
16
+ * double-sending would cause duplicates (with different ids) that
17
+ * downstream dedup cannot collapse. tool_input is preserved AS-IS
18
+ * for devtools tools so the local nested parser (browser-only) keeps
19
+ * working and verify-gate sees the raw shape.
17
20
  * 2. **All other tools** (Read/Write/Bash/…): submit a send_event job.
18
21
  * `tool_input` is replaced with a per-tool safe projection (see
19
22
  * `extractClaudeToolInput`) — only labels (file_path, pattern, url,
@@ -1 +1 @@
1
- {"version":3,"file":"track-action.d.ts","sourceRoot":"","sources":["../../../../src/clients/claude/hooks/track-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAwGH,wBAAsB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAmI3D"}
1
+ {"version":3,"file":"track-action.d.ts","sourceRoot":"","sources":["../../../../src/clients/claude/hooks/track-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAyGH,wBAAsB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoI3D"}
@@ -7,14 +7,17 @@
7
7
  * the `error` field on stdin (Claude hook contract).
8
8
  *
9
9
  * Responsibilities:
10
- * 1. **browser-devtools (mcp__browser-devtools__*)**: append the tool_call
11
- * entry to `actions.jsonl` (verify-gate depends on these records),
12
- * update recording state, extract nested `callTool()` invocations from
13
- * `bdt_execute`. Browser tools are NOT submitted to the send_event
14
- * queue browser-devtools-mcp ships them directly to the collector,
15
- * so double-sending would cause duplicates (with different ids) that
16
- * downstream dedup cannot collapse. tool_input is preserved AS-IS for
17
- * these so the local nested parser keeps working.
10
+ * 1. **devtools MCP (browser-devtools / node-devtools / backend-devtools)**:
11
+ * append the tool_call entry to `actions.jsonl` (verify-gate depends
12
+ * on these records); for browser tools, also update recording state
13
+ * and extract nested `callTool()` invocations from `bdt_execute`.
14
+ * Devtools tools are NOT submitted to the send_event queue — all
15
+ * three modes use the same `browser-devtools-mcp` package, which
16
+ * ships its own `tool_call` events directly to the collector, so
17
+ * double-sending would cause duplicates (with different ids) that
18
+ * downstream dedup cannot collapse. tool_input is preserved AS-IS
19
+ * for devtools tools so the local nested parser (browser-only) keeps
20
+ * working and verify-gate sees the raw shape.
18
21
  * 2. **All other tools** (Read/Write/Bash/…): submit a send_event job.
19
22
  * `tool_input` is replaced with a per-tool safe projection (see
20
23
  * `extractClaudeToolInput`) — only labels (file_path, pattern, url,
@@ -43,6 +46,7 @@ const MCP_PREFIX = "mcp__browser-devtools__";
43
46
  const TOOL_NAME_PREFIX = "bdt_";
44
47
  const BROWSER_DEVTOOLS_SERVER = "browser-devtools";
45
48
  const NODE_DEVTOOLS_SERVER = "node-devtools";
49
+ const BACKEND_DEVTOOLS_SERVER = "backend-devtools";
46
50
  /** Bare (post-classification) names used for recording-state detection and nested extract gating. */
47
51
  const EXECUTE_TOOL_BARE = `${TOOL_NAME_PREFIX}execute`;
48
52
  const RECORDING_START_BARE = `${TOOL_NAME_PREFIX}content_start-recording`;
@@ -134,7 +138,8 @@ async function run(projectDir) {
134
138
  const classified = (0, util_1.classifyTool)(rawToolName, input.tool_input);
135
139
  const isBrowserTool = classified.tool_type === "mcp" && classified.mcp_server === BROWSER_DEVTOOLS_SERVER;
136
140
  const isNodeTool = classified.tool_type === "mcp" && classified.mcp_server === NODE_DEVTOOLS_SERVER;
137
- const isOurDevToolsTool = isBrowserTool || isNodeTool;
141
+ const isBackendTool = classified.tool_type === "mcp" && classified.mcp_server === BACKEND_DEVTOOLS_SERVER;
142
+ const isOurDevToolsTool = isBrowserTool || isNodeTool || isBackendTool;
138
143
  // For browser-devtools / node-devtools tools we keep tool_input AS-IS:
139
144
  // verify-gate and the bdt_execute nested-callTool parser need the raw
140
145
  // shape; both servers self-ship to the collector so the queue exemption