@ironbee-ai/cli 0.8.3 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +42 -17
- package/dist/analytics/projection.d.ts.map +1 -1
- package/dist/analytics/projection.js +28 -14
- package/dist/analytics/projection.js.map +1 -1
- package/dist/clients/claude/commands/ironbee-verify.md +19 -106
- package/dist/clients/claude/hooks/require-verdict.d.ts +3 -3
- package/dist/clients/claude/hooks/require-verdict.js +5 -5
- package/dist/clients/claude/hooks/require-verification.d.ts +6 -5
- package/dist/clients/claude/hooks/require-verification.d.ts.map +1 -1
- package/dist/clients/claude/hooks/require-verification.js +20 -17
- package/dist/clients/claude/hooks/require-verification.js.map +1 -1
- package/dist/clients/claude/hooks/track-action-monitor.d.ts.map +1 -1
- package/dist/clients/claude/hooks/track-action-monitor.js +4 -1
- package/dist/clients/claude/hooks/track-action-monitor.js.map +1 -1
- package/dist/clients/claude/hooks/track-action.d.ts +11 -8
- package/dist/clients/claude/hooks/track-action.d.ts.map +1 -1
- package/dist/clients/claude/hooks/track-action.js +14 -9
- package/dist/clients/claude/hooks/track-action.js.map +1 -1
- package/dist/clients/claude/index.d.ts.map +1 -1
- package/dist/clients/claude/index.js +79 -18
- package/dist/clients/claude/index.js.map +1 -1
- package/dist/clients/claude/platforms/command-verify.backend.md +74 -0
- package/dist/clients/claude/platforms/command-verify.browser.md +108 -0
- package/dist/clients/claude/platforms/command-verify.node.md +67 -0
- package/dist/clients/claude/platforms/rule.backend.md +23 -0
- package/dist/clients/claude/platforms/rule.browser.md +17 -0
- package/dist/clients/claude/{fragments → platforms}/rule.node.md +3 -3
- package/dist/clients/claude/platforms/skill.backend.md +65 -0
- package/dist/clients/claude/platforms/skill.browser.md +31 -0
- package/dist/clients/claude/{fragments → platforms}/skill.node.md +2 -2
- package/dist/clients/claude/rules/ironbee-verification.md +14 -13
- package/dist/clients/claude/skills/ironbee-verification.md +19 -49
- package/dist/clients/cursor/commands/ironbee-verify/SKILL.md +21 -108
- package/dist/clients/cursor/hooks/require-verdict.d.ts +1 -1
- package/dist/clients/cursor/hooks/require-verdict.js +3 -3
- package/dist/clients/cursor/hooks/require-verification.d.ts.map +1 -1
- package/dist/clients/cursor/hooks/require-verification.js +9 -5
- package/dist/clients/cursor/hooks/require-verification.js.map +1 -1
- package/dist/clients/cursor/hooks/track-action-monitor.d.ts.map +1 -1
- package/dist/clients/cursor/hooks/track-action-monitor.js +4 -1
- package/dist/clients/cursor/hooks/track-action-monitor.js.map +1 -1
- package/dist/clients/cursor/hooks/track-action.d.ts +14 -12
- package/dist/clients/cursor/hooks/track-action.d.ts.map +1 -1
- package/dist/clients/cursor/hooks/track-action.js +25 -16
- package/dist/clients/cursor/hooks/track-action.js.map +1 -1
- package/dist/clients/cursor/index.d.ts.map +1 -1
- package/dist/clients/cursor/index.js +45 -11
- package/dist/clients/cursor/index.js.map +1 -1
- package/dist/clients/cursor/platforms/command-verify.backend.md +74 -0
- package/dist/clients/cursor/platforms/command-verify.browser.md +108 -0
- package/dist/clients/cursor/platforms/command-verify.node.md +67 -0
- package/dist/clients/cursor/platforms/rule.backend.md +23 -0
- package/dist/clients/cursor/platforms/rule.browser.md +17 -0
- package/dist/clients/cursor/{fragments → platforms}/rule.node.md +3 -3
- package/dist/clients/cursor/platforms/skill.backend.md +65 -0
- package/dist/clients/cursor/platforms/skill.browser.md +31 -0
- package/dist/clients/cursor/{fragments → platforms}/skill.node.md +2 -2
- package/dist/clients/cursor/rules/ironbee-verification.mdc +14 -13
- package/dist/clients/cursor/skills/ironbee-verification.md +19 -49
- package/dist/commands/backend.d.ts +17 -0
- package/dist/commands/backend.d.ts.map +1 -0
- package/dist/commands/backend.js +58 -0
- package/dist/commands/backend.js.map +1 -0
- package/dist/commands/browser.d.ts +19 -0
- package/dist/commands/browser.d.ts.map +1 -0
- package/dist/commands/browser.js +60 -0
- package/dist/commands/browser.js.map +1 -0
- package/dist/commands/config.d.ts +5 -5
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +13 -11
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/cycle-toggle.d.ts +89 -0
- package/dist/commands/cycle-toggle.d.ts.map +1 -0
- package/dist/commands/cycle-toggle.js +264 -0
- package/dist/commands/cycle-toggle.js.map +1 -0
- package/dist/commands/node.d.ts +16 -0
- package/dist/commands/node.d.ts.map +1 -0
- package/dist/commands/node.js +57 -0
- package/dist/commands/node.js.map +1 -0
- package/dist/hooks/core/actions.d.ts +11 -2
- package/dist/hooks/core/actions.d.ts.map +1 -1
- package/dist/hooks/core/actions.js.map +1 -1
- package/dist/hooks/core/verify-gate.d.ts.map +1 -1
- package/dist/hooks/core/verify-gate.js +44 -14
- package/dist/hooks/core/verify-gate.js.map +1 -1
- package/dist/import/claude/transcript-walk.d.ts.map +1 -1
- package/dist/import/claude/transcript-walk.js +10 -2
- package/dist/import/claude/transcript-walk.js.map +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/lib/config.d.ts +142 -41
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +251 -82
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/platform-section.d.ts +126 -0
- package/dist/lib/platform-section.d.ts.map +1 -0
- package/dist/lib/platform-section.js +279 -0
- package/dist/lib/platform-section.js.map +1 -0
- package/package.json +1 -1
- package/dist/clients/claude/fragments/command-verify.node.md +0 -33
- package/dist/clients/cursor/fragments/command-verify.node.md +0 -33
- package/dist/commands/backend-toggle.d.ts +0 -56
- package/dist/commands/backend-toggle.d.ts.map +0 -1
- package/dist/commands/backend-toggle.js +0 -199
- package/dist/commands/backend-toggle.js.map +0 -1
- package/dist/commands/disable-backend.d.ts +0 -14
- package/dist/commands/disable-backend.d.ts.map +0 -1
- package/dist/commands/disable-backend.js +0 -38
- package/dist/commands/disable-backend.js.map +0 -1
- package/dist/commands/enable-backend.d.ts +0 -15
- package/dist/commands/enable-backend.d.ts.map +0 -1
- package/dist/commands/enable-backend.js +0 -39
- package/dist/commands/enable-backend.js.map +0 -1
- package/dist/lib/runtime-section.d.ts +0 -118
- package/dist/lib/runtime-section.d.ts.map +0 -1
- package/dist/lib/runtime-section.js +0 -256
- package/dist/lib/runtime-section.js.map +0 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<!-- Backend protocol verification is ENABLED for this project. The Stop hook
|
|
2
|
+
enforces a backend cycle in addition to the browser cycle whenever an
|
|
3
|
+
edited file matches `backend.verifyPatterns`. The cycle is runtime- and
|
|
4
|
+
language-agnostic — it binds to wire protocols, not frameworks. -->
|
|
5
|
+
|
|
6
|
+
## Backend cycle — runtime- and language-agnostic
|
|
7
|
+
|
|
8
|
+
The **backend protocol cycle** verifies backend changes by driving real protocol calls (HTTP / gRPC / GraphQL / WebSocket) against the running service and reading the responses. It works for ANY backend runtime: Node, Java, Python, Go, Rust, Ruby, .NET, PHP, Elixir, Kotlin, Scala — the agent never attaches to a process; it just calls endpoints.
|
|
9
|
+
|
|
10
|
+
**This is different from the node cycle.** Node-cycle (`ndt_*`) attaches to a V8 inspector and sets non-blocking probes inside a running Node.js process — it's Node-only. Backend-cycle (`bedt_*`) makes outside-in protocol calls against any service. They can be active at the same time when both are enabled.
|
|
11
|
+
|
|
12
|
+
## Backend flow
|
|
13
|
+
|
|
14
|
+
1. **Confirm a backend service is running** (the user's dev server, Docker compose, k8s port-forward, …). The agent itself does not start the service — ask the user if uncertain.
|
|
15
|
+
2. **Identify the affected endpoint(s)** for your code change. Look at routes / handlers / controllers in the changed files. Map them to wire-level addresses (URL, gRPC service+method, GraphQL operation name, WebSocket path).
|
|
16
|
+
3. **Make a real protocol call** with one of:
|
|
17
|
+
- **HTTP/1.1 + HTTP/2**: `mcp__backend-devtools__bedt_request_http` — full method/headers/body/query/follow-redirects support; ALPN auto-negotiates H2 on TLS, falls back to H1.1.
|
|
18
|
+
- **gRPC**: `mcp__backend-devtools__bedt_request_grpc` — unary + 3 streaming modes; pass `.proto` text or descriptor.
|
|
19
|
+
- **GraphQL**: `mcp__backend-devtools__bedt_request_graphql` — query/mutation, variables, persisted query support.
|
|
20
|
+
- **WebSocket** (stateful — open/send/receive/close cycle):
|
|
21
|
+
- `mcp__backend-devtools__bedt_request_websocket-open` — establish session.
|
|
22
|
+
- `mcp__backend-devtools__bedt_request_websocket-send` / `bedt_request_websocket-receive` — exchange frames.
|
|
23
|
+
- `mcp__backend-devtools__bedt_request_websocket-close` — clean teardown (and `bedt_request_websocket-list` for running sessions).
|
|
24
|
+
- **Replay**: `mcp__backend-devtools__bedt_request_replay` — re-issue a captured curl command or HAR entry.
|
|
25
|
+
4. **Inspect the response** — `status` (HTTP / gRPC code), body, headers, returned `traceId` (always W3C `traceparent`).
|
|
26
|
+
**`4xx/5xx and gRPC non-OK are normal results, not errors.** A test for "404 Not Found" SHOULD return 404. Only transport-level failures (DNS, TLS, timeout, abort) populate the response's `error` field. Decide PASS/FAIL based on what your task actually requires.
|
|
27
|
+
5. **Chain follow-up calls** if you need to verify side effects (e.g. POST then GET to confirm the new resource is readable). Use `bedt_request_set-default-headers` to pin auth tokens once per host, `bedt_request_set-cookies` for session cookies — both stay scoped to that target across calls.
|
|
28
|
+
6. **Submit verdict** including `backend_*` fields. If browser and/or node cycles are also active, include their fields in the SAME verdict — do not submit two verdicts.
|
|
29
|
+
|
|
30
|
+
### Backend verdict fields
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"session_id": "<sid>",
|
|
34
|
+
"status": "pass",
|
|
35
|
+
"checks": ["POST /api/orders returned 201 with order id", "GET /api/orders/:id reflects new order"],
|
|
36
|
+
"backend_endpoints_called": [
|
|
37
|
+
"POST http://localhost:3000/api/orders",
|
|
38
|
+
"GET http://localhost:3000/api/orders/42"
|
|
39
|
+
],
|
|
40
|
+
"backend_response_statuses": [201, 200],
|
|
41
|
+
"backend_traces_collected": ["00-1234abcd-...01"]
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`backend_endpoints_called` is the only required field for the cycle (any non-empty array proves the agent engaged the protocol layer). `backend_response_statuses` and `backend_traces_collected` are optional but strongly recommended — same order as `backend_endpoints_called`. Status interpretation is YOUR call: there is no automatic pass-criteria override on this cycle. If the agent claims `status: pass` and the evidence is structurally valid, the gate honors it.
|
|
46
|
+
|
|
47
|
+
## Multi-cycle (browser + backend, or browser + node + backend)
|
|
48
|
+
|
|
49
|
+
Common case: a feature edit touches a `.tsx` page (browser-cycle) and a `routes/orders.ts` (node-cycle if Node.js, plus backend-cycle for protocol verification when `backend` is enabled). All active cycles must be satisfied for `status: pass`. **Single** `verification-start`, **single** verdict, **single** retry counter cover all of them.
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"session_id": "<sid>",
|
|
54
|
+
"status": "pass",
|
|
55
|
+
"pages_tested": ["http://localhost:3000/checkout"],
|
|
56
|
+
"checks": ["checkout submits", "POST /api/orders returned 201", "no console errors"],
|
|
57
|
+
"console_errors": 0,
|
|
58
|
+
"network_failures": 0,
|
|
59
|
+
"backend_endpoints_called": ["POST http://localhost:3000/api/orders"],
|
|
60
|
+
"backend_response_statuses": [201],
|
|
61
|
+
"backend_traces_collected": ["00-1234abcd-...01"]
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
For a multi-cycle pass, EVERY active cycle's pass criteria must hold. Claiming `pass` without a cycle's evidence will be overridden to `fail`.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!-- Browser cycle verification is ENABLED for this project. The Stop hook
|
|
2
|
+
enforces a browser cycle whenever an edited file matches
|
|
3
|
+
`browser.verifyPatterns` (default: most code extensions). -->
|
|
4
|
+
|
|
5
|
+
## Browser flow
|
|
6
|
+
|
|
7
|
+
> **Recording (only when `recording.enable` is on in config):** the gate blocks every other browser tool until you first call `mcp__browser-devtools__bdt_content_start-recording`, and `submit-verdict` rejects with `"recording is still active"` unless you call `mcp__browser-devtools__bdt_content_stop-recording` after the steps below. **Treat start/stop as bookends around steps 1-5.** The same is enforced as step 6 of the Universal flow.
|
|
8
|
+
|
|
9
|
+
1. **Navigate**: `mcp__browser-devtools__bdt_navigation_go-to` — go to the affected page(s)
|
|
10
|
+
2. **Interact**: actually exercise what changed — click buttons, fill forms, submit data, trigger workflows. Don't just look at the page.
|
|
11
|
+
3. **Screenshot**: `mcp__browser-devtools__bdt_content_take-screenshot` — capture the final visual state
|
|
12
|
+
4. **Accessibility**: `mcp__browser-devtools__bdt_a11y_take-aria-snapshot` — verify page structure
|
|
13
|
+
5. **Console**: `mcp__browser-devtools__bdt_o11y_get-console-messages` — check for errors
|
|
14
|
+
|
|
15
|
+
All four tools are MANDATORY (the Stop hook checks each). Functional interaction is expected for every verification.
|
|
16
|
+
|
|
17
|
+
### Browser verdict fields
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"session_id": "<sid>",
|
|
21
|
+
"status": "pass",
|
|
22
|
+
"pages_tested": ["http://localhost:3000/page"],
|
|
23
|
+
"checks": ["form submits successfully", "new item appears in list", "no console errors"],
|
|
24
|
+
"console_errors": 0,
|
|
25
|
+
"network_failures": 0
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
For `status: "pass"` (browser cycle): `console_errors === 0` AND `network_failures === 0`.
|
|
30
|
+
|
|
31
|
+
On fail, include `issues`. On pass after a previous fail, include `fixes`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- Node backend verification is ENABLED for this project. The Stop hook
|
|
2
2
|
enforces a node cycle in addition to the browser cycle whenever an
|
|
3
|
-
edited file matches `
|
|
3
|
+
edited file matches `node.verifyPatterns`. -->
|
|
4
4
|
|
|
5
5
|
## ⚠️ CRITICAL: when NOT to use node-devtools
|
|
6
6
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
If you see `pom.xml`, `build.gradle`, `requirements.txt`, `pyproject.toml`, `go.mod`, `Cargo.toml`, `Gemfile`, `composer.json`, `*.csproj` — the backend is NOT Node.js. Do NOT call any `ndt_*` tools.
|
|
17
17
|
|
|
18
|
-
**Misconfiguration recovery.** If you read this section it means the operator enabled the node cycle for this project. If the backend isn't actually Node.js, this was a mistake — the Stop hook will keep blocking the gate (with `incomplete_tools` for the node cycle) until you call `ndt_debug_connect` (which will fail) or `maxRetries` is exhausted. Don't attempt the connection. Stop and tell the user clearly: the project's backend is not Node.js; ask them to run `ironbee disable
|
|
18
|
+
**Misconfiguration recovery.** If you read this section it means the operator enabled the node cycle for this project. If the backend isn't actually Node.js, this was a mistake — the Stop hook will keep blocking the gate (with `incomplete_tools` for the node cycle) until you call `ndt_debug_connect` (which will fail) or `maxRetries` is exhausted. Don't attempt the connection. Stop and tell the user clearly: the project's backend is not Node.js; ask them to run `ironbee node disable` to unblock the gate. Continue with browser-cycle verification only in the meantime.
|
|
19
19
|
|
|
20
20
|
## Node flow
|
|
21
21
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
You MUST verify all code changes through real tools before completing any task. After every verification attempt, you MUST submit a verdict (pass or fail) via `ironbee hook submit-verdict` before doing anything else. If verification fails, submit the fail verdict first, then fix.
|
|
2
2
|
|
|
3
|
-
Verification runs in **cycles** decided by file
|
|
3
|
+
Verification runs in **cycles** decided by file-pattern match — you don't choose, the gate detects. Multiple cycles can run in parallel within a single Stop hook; each one has its own activation patterns, tools, and verdict fields.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
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.
|
|
5
|
+
**See the platform sections near the bottom of this file** for which cycles are active for this project, the tools they expose, and the per-cycle verdict fields you must include.
|
|
8
6
|
|
|
9
7
|
## Application lifecycle
|
|
10
8
|
|
|
@@ -19,16 +17,14 @@ Skip start if already running. Fix build errors before proceeding. **Don't guess
|
|
|
19
17
|
|
|
20
18
|
1. Build and start the application if not already running.
|
|
21
19
|
2. **Start verification**: `echo '{"session_id":"<your-session-id>"}' | ironbee hook verification-start` — required before any devtools tool call.
|
|
22
|
-
3. Run the
|
|
23
|
-
- If `recording.enable` is on, the gate forces `bdt_content_start-recording` BEFORE the steps above and rejects the verdict if you don't call `bdt_content_stop-recording` AFTER them. Always pair start/stop around steps above.
|
|
24
|
-
- **See the runtime section near the bottom of this file** — if a backend-runtime cycle is active for this project, run its flow within the same verification cycle as well.
|
|
20
|
+
3. **Run the per-cycle flow for every active cycle** — see the platform sections near the bottom of this file. Multiple cycles can be active in the same Stop run; every one of them must be exercised within this single verification cycle.
|
|
25
21
|
4. Stop the dev server when done.
|
|
26
|
-
5. **
|
|
22
|
+
5. **Honor any cycle-specific teardown** noted in the platform sections BEFORE submit-verdict.
|
|
27
23
|
6. **IMMEDIATELY submit your verdict** — do NOT edit any code before submitting: `echo '<verdict-json>' | ironbee hook submit-verdict`.
|
|
28
24
|
- Pass verdict carries fields for every active cycle. Fail verdict adds `issues`. Pass after fail adds `fixes`.
|
|
29
25
|
- Status `pass` is overridden to fail by the gate when evidence doesn't back it.
|
|
30
26
|
|
|
31
|
-
The
|
|
27
|
+
The Stop hook checks tool usage AND verdict validity for every active cycle. After EVERY verification attempt, you MUST submit a verdict before doing anything else — even if it failed. Do not skip to fixing code.
|
|
32
28
|
|
|
33
29
|
If verification fails: submit fail verdict → fix the code → re-verify → submit again.
|
|
34
30
|
|
|
@@ -41,8 +37,13 @@ Every code edit (Write/Edit) automatically clears your verdict, requiring re-ver
|
|
|
41
37
|
- Submitting a verdict without actually performing verification through real tools.
|
|
42
38
|
- Submitting a verdict based on assumptions, code reading, or prior knowledge.
|
|
43
39
|
- Copying example verdicts from hook messages without doing real verification first.
|
|
44
|
-
- Calling
|
|
45
|
-
|
|
40
|
+
- Calling devtools tools for any cycle without first opening a verification cycle (`ironbee hook verification-start`).
|
|
41
|
+
|
|
42
|
+
<!--IRONBEE:PLATFORM:browser-->
|
|
43
|
+
<!--/IRONBEE:PLATFORM:browser-->
|
|
44
|
+
|
|
45
|
+
<!--IRONBEE:PLATFORM:node-->
|
|
46
|
+
<!--/IRONBEE:PLATFORM:node-->
|
|
46
47
|
|
|
47
|
-
<!--IRONBEE:
|
|
48
|
-
<!--/IRONBEE:
|
|
48
|
+
<!--IRONBEE:PLATFORM:backend-->
|
|
49
|
+
<!--/IRONBEE:PLATFORM:backend-->
|
|
@@ -3,31 +3,30 @@ name: ironbee-verification
|
|
|
3
3
|
description: >
|
|
4
4
|
MANDATORY verification after code changes. Activates when implementing features, fixing
|
|
5
5
|
bugs, modifying UI components, API endpoints, styles, refactoring, or any task that
|
|
6
|
-
changes application behavior.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
changes application behavior. Verification runs in cycles activated by file-pattern
|
|
7
|
+
match — which cycles are wired up for this project is shown in the platform sections
|
|
8
|
+
near the bottom of this file. After every code edit you MUST verify the affected
|
|
9
|
+
cycle(s) through real tools and submit a single verdict (pass or fail) before
|
|
10
|
+
reporting task completion. If verification fails, submit the fail verdict first,
|
|
11
|
+
then fix.
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
# IronBee Verification
|
|
15
15
|
|
|
16
16
|
## Rule
|
|
17
|
-
No task is complete until changes are verified — through **real tools
|
|
17
|
+
No task is complete until changes are verified — through **real tools**, not by reading code or inferring behavior. After verification, you MUST submit a verdict (pass or fail) before doing anything else. If verification fails, submit the fail verdict first, then fix.
|
|
18
18
|
|
|
19
19
|
## Cycles
|
|
20
20
|
|
|
21
21
|
IronBee runs verification in **cycles**. A single Stop hook can drive multiple cycles in parallel — every active cycle must pass for your task to complete.
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
- **Backend-runtime cycle(s)** — opt-in per project via `ironbee enable-backend <runtime>` (e.g. `node`). Triggered when a changed file matches `backend.<runtime>.verifyPatterns`. Tools come from a runtime-specific MCP server. **See the runtime section near the bottom of this file** for whether a backend cycle is active for this project and which tools to call.
|
|
23
|
+
You don't choose which cycle runs — the file pattern decides. A single edited file can match multiple cycles' patterns and activate them all. Cycles always run in parallel within a single Stop run. Each cycle has its own tools, flow steps, and verdict fields.
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
**See the platform sections near the bottom of this file** for which cycles are active for this project, the tools they expose, and the per-cycle verdict fields you must include.
|
|
27
26
|
|
|
28
27
|
## Application lifecycle (your responsibility)
|
|
29
28
|
|
|
30
|
-
For
|
|
29
|
+
For every active cycle you manage the running application:
|
|
31
30
|
- **Build** if needed (`npm run build`, `docker compose build`, …)
|
|
32
31
|
- **Start** before navigating/connecting (`npm run dev`, `docker compose up -d`, …)
|
|
33
32
|
- **Stop** when verification is complete
|
|
@@ -39,15 +38,15 @@ If already running, skip start. If the build fails, fix it before proceeding.
|
|
|
39
38
|
## Universal flow
|
|
40
39
|
|
|
41
40
|
1. Implement your changes (write/edit code).
|
|
42
|
-
2. **Start verification** (one cycle covers every active mode —
|
|
41
|
+
2. **Start verification** (one cycle covers every active mode — every active cycle's flow runs within the same verification cycle):
|
|
43
42
|
```
|
|
44
43
|
echo '{"session_id":"<your-session-id>"}' | ironbee hook verification-start
|
|
45
44
|
```
|
|
46
45
|
Devtools tools are blocked without this.
|
|
47
46
|
3. Build and start the application if not already running.
|
|
48
|
-
4. Run the
|
|
47
|
+
4. **Run the per-cycle flows for every active cycle.** See the platform sections near the bottom of this file — each enabled cycle's section has its own flow steps, mandatory tools, and verdict fields. All active cycles must be exercised within this one verification cycle.
|
|
49
48
|
5. Stop the dev server when verification is complete.
|
|
50
|
-
6. **
|
|
49
|
+
6. **Honor any cycle-specific teardown** noted in the platform sections (e.g. recording stop) BEFORE submitting your verdict.
|
|
51
50
|
7. **Submit your verdict immediately** — do NOT edit any code first:
|
|
52
51
|
```
|
|
53
52
|
echo '<verdict-json>' | ironbee hook submit-verdict
|
|
@@ -57,43 +56,14 @@ If already running, skip start. If the build fails, fix it before proceeding.
|
|
|
57
56
|
- **The Stop hook overrides `status: pass` to fail when evidence doesn't back it.**
|
|
58
57
|
8. If failed → fix → rebuild → go back to step 2 → repeat until pass.
|
|
59
58
|
|
|
60
|
-
|
|
59
|
+
<!--IRONBEE:PLATFORM:browser-->
|
|
60
|
+
<!--/IRONBEE:PLATFORM:browser-->
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
<!--IRONBEE:PLATFORM:node-->
|
|
63
|
+
<!--/IRONBEE:PLATFORM:node-->
|
|
63
64
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
3. **Screenshot**: `mcp__browser-devtools__bdt_content_take-screenshot` — capture the final visual state
|
|
67
|
-
4. **Accessibility**: `mcp__browser-devtools__bdt_a11y_take-aria-snapshot` — verify page structure
|
|
68
|
-
5. **Console**: `mcp__browser-devtools__bdt_o11y_get-console-messages` — check for errors
|
|
69
|
-
|
|
70
|
-
All four tools are MANDATORY (the Stop hook checks each). Functional interaction is expected for every verification.
|
|
71
|
-
|
|
72
|
-
### Browser verdict fields
|
|
73
|
-
```json
|
|
74
|
-
{
|
|
75
|
-
"session_id": "<sid>",
|
|
76
|
-
"status": "pass",
|
|
77
|
-
"pages_tested": ["http://localhost:3000/page"],
|
|
78
|
-
"checks": ["form submits successfully", "new item appears in list", "no console errors"],
|
|
79
|
-
"console_errors": 0,
|
|
80
|
-
"network_failures": 0
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
For `status: "pass"` (browser cycle): `console_errors === 0` AND `network_failures === 0`.
|
|
85
|
-
|
|
86
|
-
On fail, include `issues`. On pass after a previous fail, include `fixes`.
|
|
87
|
-
|
|
88
|
-
<!--IRONBEE:RUNTIME:node-->
|
|
89
|
-
<!--/IRONBEE:RUNTIME:node-->
|
|
90
|
-
|
|
91
|
-
## What good verification looks like
|
|
92
|
-
|
|
93
|
-
- Changed a form handler? → Start the app, fill the form, submit it, verify the response (browser flow).
|
|
94
|
-
- Added an API endpoint in a backend file (when a runtime cycle is enabled)? → Run that runtime's flow per the runtime section: attach to the running process, set a probe at the handler, exercise the path from the browser, confirm the probe triggered (or inspect runtime logs).
|
|
95
|
-
- Fixed a bug that surfaced as both a UI glitch AND a server error? → Multi-cycle: visual confirmation in the browser AND probe/log proof on the server.
|
|
96
|
-
- Changed styling only? → Browser flow with extra attention on screenshot review.
|
|
65
|
+
<!--IRONBEE:PLATFORM:backend-->
|
|
66
|
+
<!--/IRONBEE:PLATFORM:backend-->
|
|
97
67
|
|
|
98
68
|
## Important
|
|
99
69
|
- **Always submit a verdict after every verification attempt** — both pass AND fail. Fail verdicts are tracked for analytics.
|
|
@@ -1,126 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ironbee-verify
|
|
3
|
-
description: "Trigger verification of code changes
|
|
3
|
+
description: "Trigger verification of code changes — runs every active cycle wired up for this project (see the platform sections at the bottom of the file)."
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# IronBee Verify
|
|
8
8
|
|
|
9
|
-
Verify the current code changes through real tools
|
|
9
|
+
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.
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
- `/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)
|
|
13
|
-
- `/ironbee-verify full` — **full scope** — entire application, all checklists, edge cases, responsive, accessibility deep dive
|
|
14
|
-
- `/ironbee-verify visual` — **visual only** — contrast, layout, spacing, fonts, images, theming
|
|
15
|
-
- `/ironbee-verify functional` — **functional only** — clicks, forms, navigation, data flow, error handling
|
|
11
|
+
## Universal steps
|
|
16
12
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
3. **For EVERY page you visit**, repeat this cycle:
|
|
28
|
-
a. **Navigate** using `MCP:bdt_navigation_go-to`
|
|
29
|
-
b. **Take a FULL PAGE screenshot** using `MCP:bdt_content_take-screenshot` with `fullPage: true`
|
|
30
|
-
c. **Take an ARIA snapshot** using `MCP:bdt_a11y_take-aria-snapshot`
|
|
31
|
-
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:
|
|
32
|
-
**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.
|
|
33
|
-
- Text readability — is it readable against its background? Look for text that blends in or poor contrast
|
|
34
|
-
- Layout — overlapping elements, unexpected gaps, overflow, content cut off
|
|
35
|
-
- Spacing — consistent padding/margin? Too cramped or too far apart?
|
|
36
|
-
- Colors — intentional and consistent? Any jarring mismatches?
|
|
37
|
-
- Typography — right sizes? Clipped or truncated text?
|
|
38
|
-
- Images/icons — loaded? Right size and aspect ratio?
|
|
39
|
-
- States — empty, loading, disabled, error states rendered properly?
|
|
40
|
-
Report your visual findings before continuing.
|
|
41
|
-
e. **Read the ARIA snapshot** — verify headings, labels, landmarks, and structure
|
|
42
|
-
f. If anything looks wrong → note it as an issue
|
|
43
|
-
4. **Functionally test** — run the checklist for your mode (see below). After each significant interaction, take another screenshot and repeat the visual analysis.
|
|
44
|
-
5. **Check console** for errors using `MCP:bdt_o11y_get-console-messages`
|
|
45
|
-
6. **Stop** the dev server when verification is complete
|
|
46
|
-
7. **If recording was started, stop it now** — `MCP: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 `MCP:bdt_content_start-recording` BEFORE the steps above and demands the matching stop here.)
|
|
47
|
-
8. **Submit your verdict** via terminal:
|
|
48
|
-
- Pass: `echo '{"session_id":"...","status":"pass","pages_tested":[...],"checks":[...],"console_errors":0,"network_failures":0}' | ironbee hook submit-verdict`
|
|
49
|
-
- Fail: `echo '{"session_id":"...","status":"fail","pages_tested":[...],"checks":[...],"console_errors":N,"network_failures":N,"issues":["describe what failed"]}' | ironbee hook submit-verdict`
|
|
50
|
-
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.
|
|
51
|
-
10. If pass after a previous fail, include `"fixes"` in the verdict describing what was fixed
|
|
13
|
+
1. **Start verification**: Run `echo '{"session_id":"<your-session-id>"}' | ironbee hook verification-start` via terminal.
|
|
14
|
+
2. **Build and start** the application if not already running.
|
|
15
|
+
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.
|
|
16
|
+
4. **Stop** the dev server when verification is complete.
|
|
17
|
+
5. **Honor any cycle-specific teardown** noted in the platform sections BEFORE submitting your verdict.
|
|
18
|
+
6. **Submit your verdict** via terminal. Include fields for every active cycle:
|
|
19
|
+
- Pass: `echo '{"session_id":"...","status":"pass", ...cycle-specific fields...}' | ironbee hook submit-verdict`
|
|
20
|
+
- Fail: `echo '{"session_id":"...","status":"fail", ...cycle-specific fields..., "issues":["describe what failed"]}' | ironbee hook submit-verdict`
|
|
21
|
+
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.
|
|
22
|
+
8. If pass after a previous fail, include `"fixes"` in the verdict describing what was fixed.
|
|
52
23
|
|
|
53
24
|
---
|
|
54
25
|
|
|
55
|
-
|
|
26
|
+
<!--IRONBEE:PLATFORM:browser-->
|
|
27
|
+
<!--/IRONBEE:PLATFORM:browser-->
|
|
56
28
|
|
|
57
|
-
|
|
29
|
+
<!--IRONBEE:PLATFORM:node-->
|
|
30
|
+
<!--/IRONBEE:PLATFORM:node-->
|
|
58
31
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
2. **Ignore `.ironbee/`, `.claude/`, `.cursor/`** — tool config, not application code
|
|
62
|
-
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).
|
|
63
|
-
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?
|
|
64
|
-
|
|
65
|
-
### 2. Verify in the browser
|
|
66
|
-
- **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.
|
|
67
|
-
- **Test the flow end-to-end** — navigate, click, fill forms, submit, verify the outcome
|
|
68
|
-
- **Check one edge case** — empty input, invalid data, or double-click
|
|
69
|
-
- **Console** — any new errors or warnings?
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## Full Mode (`/ironbee-verify full`)
|
|
74
|
-
|
|
75
|
-
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.
|
|
76
|
-
|
|
77
|
-
### Visual Checklist
|
|
78
|
-
In addition to the per-page visual analysis in step 3d:
|
|
79
|
-
- **Responsiveness** — does the layout adapt if viewport changes? No horizontal scrolling on standard widths
|
|
80
|
-
- **Borders & separators** — visible and consistent? Not too faint or missing
|
|
81
|
-
- **Scroll behavior** — does the page scroll smoothly? No content hidden behind sticky headers/footers?
|
|
82
|
-
|
|
83
|
-
### Functional Checklist
|
|
84
|
-
- **Navigation** — do links and buttons navigate to the correct pages?
|
|
85
|
-
- **Forms** — fill inputs with real data, select options, submit. Do validation messages appear correctly?
|
|
86
|
-
- **Buttons & interactions** — do click handlers fire? Do toggles, dropdowns, and modals work?
|
|
87
|
-
- **Data flow** — does submitted data appear where expected?
|
|
88
|
-
- **Error handling** — what happens with invalid input? Does the UI handle errors gracefully?
|
|
89
|
-
- **Authentication** — if applicable, do protected routes redirect correctly?
|
|
90
|
-
- **API calls** — do network requests succeed? Check for failed requests in console/network
|
|
91
|
-
- **State persistence** — does state survive page refresh where expected?
|
|
92
|
-
- **Edge cases** — empty inputs, very long text, special characters, rapid clicks
|
|
93
|
-
|
|
94
|
-
### Accessibility (deep dive)
|
|
95
|
-
- Are headings hierarchical? Do form inputs have labels? Are landmarks present?
|
|
96
|
-
- Check for missing alt text on images
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## Visual Mode (`/ironbee-verify visual`)
|
|
101
|
-
|
|
102
|
-
Focus exclusively on visual quality. Run the per-page visual analysis from step 3d on every page, plus:
|
|
103
|
-
- **Responsiveness** — viewport changes, no horizontal scrolling
|
|
104
|
-
- **Borders & separators** — visible and consistent?
|
|
105
|
-
- **Scroll behavior** — smooth scrolling, no hidden content
|
|
106
|
-
|
|
107
|
-
Take screenshots of **multiple states** if applicable (hover, active, disabled, empty, populated).
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
## Functional Mode (`/ironbee-verify functional`)
|
|
112
|
-
|
|
113
|
-
Focus exclusively on behavior. Use the same functional checklist as Full Mode above.
|
|
114
|
-
|
|
115
|
-
Test the **complete user flow**, not just the single step you changed.
|
|
32
|
+
<!--IRONBEE:PLATFORM:backend-->
|
|
33
|
+
<!--/IRONBEE:PLATFORM:backend-->
|
|
116
34
|
|
|
117
35
|
---
|
|
118
36
|
|
|
119
37
|
## When to FAIL
|
|
120
38
|
|
|
121
|
-
If you observe ANY problem — wrong data, unexpected errors,
|
|
39
|
+
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.
|
|
122
40
|
|
|
123
|
-
**Do NOT rationalize away problems.** If something looks wrong or behaves unexpectedly, it IS wrong.
|
|
41
|
+
**Do NOT rationalize away problems.** If something looks wrong or behaves unexpectedly, it IS wrong.
|
|
124
42
|
|
|
125
43
|
**After a fail verdict, you MUST fix the issues and re-verify.** Do not just report and stop.
|
|
126
44
|
|
|
@@ -134,8 +52,3 @@ Your `checks` array must list **specific observations**, not generic statements:
|
|
|
134
52
|
- ALWAYS submit a verdict after every verification attempt — both pass AND fail
|
|
135
53
|
- Do NOT edit code before submitting a fail verdict
|
|
136
54
|
- **Noticing a bug and submitting pass is the #1 violation** — if you see it, fail it
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
<!--IRONBEE:RUNTIME:node-->
|
|
141
|
-
<!--/IRONBEE:RUNTIME:node-->
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Cursor — require-verdict hook adapter
|
|
3
3
|
*
|
|
4
4
|
* preToolUse hook for Write|StrReplace|Delete — blocks file edits
|
|
5
|
-
* if the agent used any devtools tools (browser-devtools
|
|
5
|
+
* if the agent used any devtools tools (browser-devtools / node-devtools / backend-devtools) but hasn't submitted a verdict
|
|
6
6
|
* yet. Forces the agent to submit a fail verdict before fixing code.
|
|
7
7
|
*
|
|
8
8
|
* Side effect: when `tool_name === "Write"`, stashes whether the target
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Cursor — require-verdict hook adapter
|
|
4
4
|
*
|
|
5
5
|
* preToolUse hook for Write|StrReplace|Delete — blocks file edits
|
|
6
|
-
* if the agent used any devtools tools (browser-devtools
|
|
6
|
+
* if the agent used any devtools tools (browser-devtools / node-devtools / backend-devtools) but hasn't submitted a verdict
|
|
7
7
|
* yet. Forces the agent to submit a fail verdict before fixing code.
|
|
8
8
|
*
|
|
9
9
|
* Side effect: when `tool_name === "Write"`, stashes whether the target
|
|
@@ -42,9 +42,9 @@ async function run(projectDir) {
|
|
|
42
42
|
if ((0, actions_1.hasToolCallsSinceLastVerdict)(actionsFile)) {
|
|
43
43
|
const output = {
|
|
44
44
|
permission: "deny",
|
|
45
|
-
agent_message: `BLOCKED: You used verification tools (browser-devtools
|
|
45
|
+
agent_message: `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.
|
|
46
46
|
|
|
47
|
-
Submit your verdict first (include cycle-appropriate fields — browser fields for bdt_*, backend_node_*
|
|
47
|
+
Submit your verdict first (include cycle-appropriate fields — browser fields for bdt_*, backend_node_* for ndt_*, backend_endpoints_called/backend_response_statuses for bedt_*):
|
|
48
48
|
echo '{"session_id":"${sessionId}","status":"fail","checks":[...],"issues":["describe what failed"], ...}' | ironbee hook submit-verdict
|
|
49
49
|
|
|
50
50
|
Then you can edit code to fix the issues.`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-verification.d.ts","sourceRoot":"","sources":["../../../../src/clients/cursor/hooks/require-verification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"require-verification.d.ts","sourceRoot":"","sources":["../../../../src/clients/cursor/hooks/require-verification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAsCH,wBAAsB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA8H3D"}
|
|
@@ -22,10 +22,14 @@ const config_1 = require("../../../lib/config");
|
|
|
22
22
|
const logger_1 = require("../../../lib/logger");
|
|
23
23
|
const stdin_1 = require("../../../lib/stdin");
|
|
24
24
|
/** Prefix → MCP server lookup. Cursor's `MCP:<bare-tool>` wire has no server
|
|
25
|
-
* segment, so we identify by tool prefix (matcher
|
|
25
|
+
* segment, so we identify by tool prefix (matcher routes
|
|
26
|
+
* `MCP:(bdt|ndt|bedt)_.*`). All three prefixes are mutually distinct
|
|
27
|
+
* (`bdt` / `ndt` / `bedt` differ in the second character), so iteration
|
|
28
|
+
* order doesn't matter for correctness. */
|
|
26
29
|
const SERVER_BY_PREFIX = {
|
|
27
30
|
"MCP:bdt_": "browser-devtools",
|
|
28
31
|
"MCP:ndt_": "node-devtools",
|
|
32
|
+
"MCP:bedt_": "backend-devtools",
|
|
29
33
|
};
|
|
30
34
|
const FALLBACK_MCP_SERVER_NAME = "browser-devtools";
|
|
31
35
|
async function run(projectDir) {
|
|
@@ -48,12 +52,12 @@ async function run(projectDir) {
|
|
|
48
52
|
if (!verificationId) {
|
|
49
53
|
const output = {
|
|
50
54
|
permission: "deny",
|
|
51
|
-
agent_message: `BLOCKED: You must start a verification cycle before using devtools tools (browser-devtools
|
|
55
|
+
agent_message: `BLOCKED: You must start a verification cycle before using devtools tools (browser-devtools / node-devtools / backend-devtools).
|
|
52
56
|
|
|
53
57
|
Start verification first:
|
|
54
58
|
echo '{"session_id":"${sessionId}"}' | ironbee hook verification-start
|
|
55
59
|
|
|
56
|
-
Then use the verification tools for the active cycle(s) — MCP:bdt_* for browser, MCP:ndt_* for node.`,
|
|
60
|
+
Then use the verification tools for the active cycle(s) — MCP:bdt_* for browser, MCP:ndt_* for node, MCP:bedt_* for backend.`,
|
|
57
61
|
};
|
|
58
62
|
process.stdout.write(JSON.stringify(output));
|
|
59
63
|
process.exit(2);
|
|
@@ -118,8 +122,8 @@ Then use the verification tools for the active cycle(s) — MCP:bdt_* for browse
|
|
|
118
122
|
}
|
|
119
123
|
// Cursor's preToolUse stdin doesn't expose the MCP server and its
|
|
120
124
|
// tool_name format (`MCP:<bare-tool>`) has no server segment. The
|
|
121
|
-
// matcher restricts this hook to `MCP:(bdt|ndt)_.*` — we identify
|
|
122
|
-
// server by prefix lookup. Future runtimes extend SERVER_BY_PREFIX.
|
|
125
|
+
// matcher restricts this hook to `MCP:(bdt|ndt|bedt)_.*` — we identify
|
|
126
|
+
// the server by prefix lookup. Future runtimes extend SERVER_BY_PREFIX.
|
|
123
127
|
metadata.mcpServer = (() => {
|
|
124
128
|
for (const prefix of Object.keys(SERVER_BY_PREFIX)) {
|
|
125
129
|
if (toolName.startsWith(prefix)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"require-verification.js","sourceRoot":"","sources":["../../../../src/clients/cursor/hooks/require-verification.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;
|
|
1
|
+
{"version":3,"file":"require-verification.js","sourceRoot":"","sources":["../../../../src/clients/cursor/hooks/require-verification.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;AAsCH,kBA8HC;AAlKD,mCAAoC;AACpC,qEAAyK;AACzK,yDAAiE;AACjE,2DAA6D;AAC7D,gDAAiD;AACjD,gDAAyD;AACzD,8CAA+C;AAE/C;;;;4CAI4C;AAC5C,MAAM,gBAAgB,GAA2B;IAC7C,UAAU,EAAE,kBAAkB;IAC9B,UAAU,EAAE,eAAe;IAC3B,WAAW,EAAE,kBAAkB;CAClC,CAAC;AAEF,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,MAAM,MAAM,GAA2B,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;QAC/D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;QAC7C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChB,OAAO;IACX,CAAC;IAED,MAAM,SAAS,GAAW,KAAK,CAAC,eAAe,IAAI,SAAS,CAAC;IAC7D,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,EAAC,UAAU,CAAC,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A,4BAAY,EAAC,UAAU,CAAC,CAAC;IAC/D,IAAI,SAAS,EAAE,CAAC;QACZ,QAAQ,CAAC,SAAS,GAAG,SAAS,CAAC;IACnC,CAAC;IACD,IAAI,MAAM,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC;QACxB,QAAQ,CAAC,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC;IACjD,CAAC;IACD,IAAI,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC;QAC3B,QAAQ,CAAC,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC;IACvD,CAAC;IACD,YAAY,CAAC,SAAS,GAAG,QAAQ,CAAC;IAElC,MAAM,MAAM,GAA2B;QACnC,UAAU,EAAE,OAAO;QACnB,aAAa,EAAE,YAAY;KAC9B,CAAC;IACF,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/cursor/hooks/track-action-monitor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;
|
|
1
|
+
{"version":3,"file":"track-action-monitor.d.ts","sourceRoot":"","sources":["../../../../src/clients/cursor/hooks/track-action-monitor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AA4BH,wBAAsB,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA0E3D"}
|
|
@@ -37,6 +37,7 @@ const queue_1 = require("../../../queue");
|
|
|
37
37
|
const util_1 = require("../util");
|
|
38
38
|
const TOOL_NAME_PREFIX = "bdt_";
|
|
39
39
|
const NODE_TOOL_NAME_PREFIX = "ndt_";
|
|
40
|
+
const BACKEND_TOOL_NAME_PREFIX = "bedt_";
|
|
40
41
|
async function run(projectDir) {
|
|
41
42
|
let input;
|
|
42
43
|
try {
|
|
@@ -62,7 +63,9 @@ async function run(projectDir) {
|
|
|
62
63
|
const activityId = (0, session_state_1.getActiveActivityId)(sessionDir);
|
|
63
64
|
const classified = (0, util_1.classifyTool)(rawToolName, input.tool_input);
|
|
64
65
|
const isOurDevToolsTool = classified.tool_type === "mcp"
|
|
65
|
-
&& (classified.tool_name.startsWith(TOOL_NAME_PREFIX)
|
|
66
|
+
&& (classified.tool_name.startsWith(TOOL_NAME_PREFIX)
|
|
67
|
+
|| classified.tool_name.startsWith(NODE_TOOL_NAME_PREFIX)
|
|
68
|
+
|| classified.tool_name.startsWith(BACKEND_TOOL_NAME_PREFIX));
|
|
66
69
|
if (isOurDevToolsTool) {
|
|
67
70
|
logger_1.logger.debug(`track-action-monitor: skipped devtools tool ${rawToolName}`);
|
|
68
71
|
(0, output_1.writeAndExit)(JSON.stringify({}), 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"track-action-monitor.js","sourceRoot":"","sources":["../../../../src/clients/cursor/hooks/track-action-monitor.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;;
|
|
1
|
+
{"version":3,"file":"track-action-monitor.js","sourceRoot":"","sources":["../../../../src/clients/cursor/hooks/track-action-monitor.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;;AA4BH,kBA0EC;AApGD,yDAAyE;AACzE,2DAA6D;AAC7D,qEAAwE;AACxE,gDAAwD;AACxD,gDAAyD;AACzD,gDAAmD;AACnD,8CAA+C;AAC/C,0CAA2E;AAC3E,kCAA+E;AAE/E,MAAM,gBAAgB,GAAW,MAAM,CAAC;AACxC,MAAM,qBAAqB,GAAW,MAAM,CAAC;AAC7C,MAAM,wBAAwB,GAAW,OAAO,CAAC;AAc1C,KAAK,UAAU,GAAG,CAAC,U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