@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.
- package/CHANGELOG.md +6 -0
- package/README.md +42 -17
- 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/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,67 @@
|
|
|
1
|
+
<!-- Node backend verification is ENABLED for this project. -->
|
|
2
|
+
|
|
3
|
+
## Backend Node Mode (when `node.verifyPatterns` matches an edited file)
|
|
4
|
+
|
|
5
|
+
> **Precondition: the backend must actually be Node.js.** If you see `pom.xml`, `build.gradle`, `requirements.txt`, `pyproject.toml`, `go.mod`, `Cargo.toml`, etc., this section does NOT apply — `MCP:ndt_*` tools won't connect to non-Node processes. Just do browser verification.
|
|
6
|
+
|
|
7
|
+
If the project has node backend verification enabled (`ironbee node enable` once at setup, by an operator who confirmed the backend is Node.js) and your edits touch matching paths (e.g. `server/**`, `pages/api/**`), the stop hook also enforces a Node cycle. The same `verification-start` covers both cycles; the same verdict file carries fields for both.
|
|
8
|
+
|
|
9
|
+
### Mode behavior (node cycle)
|
|
10
|
+
- **default** (no arg or `default`): probe / log only the code paths your diff touched. Map each changed file → the handler(s) it affects → place probes there.
|
|
11
|
+
- **full**: probe / log every Node code path reachable from files matching `node.verifyPatterns`, not just the changed files. Expect a much larger probe set and longer runtime.
|
|
12
|
+
- `visual` / `functional`: browser-only modes; this cycle behaves as `default` when they are passed.
|
|
13
|
+
|
|
14
|
+
### Steps (additive to the browser flow above)
|
|
15
|
+
1. **Identify the running Node process** — note its PID, container name (`docker compose ps`), or inspector port.
|
|
16
|
+
2. **Connect**: `MCP:ndt_debug_connect` with one of `pid` / `processName` / `containerId` / `containerName` / `inspectorPort` / `wsUrl`. Inspector is auto-activated via SIGUSR1 if needed.
|
|
17
|
+
3. **Pick an evidence path** for each changed code path:
|
|
18
|
+
- **Probe path** (proves the code path executed): `MCP:ndt_debug_put-tracepoint` (or `put-logpoint` / `put-exceptionpoint`) at the changed code, exercise the path (e.g. trigger the API call from the browser), then `MCP:ndt_debug_get-probe-snapshots`. At least one probe must come back with `triggered: true`.
|
|
19
|
+
- **Log path** (proves no errors): exercise the path, then `MCP:ndt_debug_get-logs` with the error level filter. `backend_node_log_errors` must be empty for `status: pass`.
|
|
20
|
+
4. **Disconnect** (optional): `MCP:ndt_debug_disconnect`.
|
|
21
|
+
5. **Submit verdict** including `backend_node_*` fields. If browser cycle is also active, include browser fields in the SAME verdict — do not submit two verdicts.
|
|
22
|
+
|
|
23
|
+
### Verdict (node-cycle fields)
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"session_id": "...",
|
|
27
|
+
"status": "pass",
|
|
28
|
+
"checks": ["POST /api/orders returned 201", "tracepoint at handler.ts:42 fired once"],
|
|
29
|
+
"backend_node_processes_connected": ["pid:12345 (next-server)"],
|
|
30
|
+
"backend_node_probes_set": [
|
|
31
|
+
{ "type": "tracepoint", "location": "src/api/orders.ts:42", "triggered": true }
|
|
32
|
+
],
|
|
33
|
+
"backend_node_probe_snapshots_collected": 1,
|
|
34
|
+
"backend_node_log_errors": []
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
For a multi-cycle pass, both browser and node criteria must hold — claiming `pass` without one cycle's evidence will be overridden to fail by the gate.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Default Mode (node cycle)
|
|
43
|
+
|
|
44
|
+
Focus on the code you changed — not the entire Node service.
|
|
45
|
+
|
|
46
|
+
### 1. Study the changes
|
|
47
|
+
1. Run `git diff --name-only` and `git diff --name-only HEAD~1`
|
|
48
|
+
2. **Ignore `.ironbee/`, `.claude/`, `.cursor/`** — tool config, not application code
|
|
49
|
+
3. **Read the full diff** for every Node file in scope (handler / route / service / middleware) — note new branches, new validations, new error paths, new external calls, changed return values
|
|
50
|
+
4. Before connecting, you should be able to answer: which function(s) execute on the changed path? Where does a tracepoint prove the new code fired? What error logs would prove a regression?
|
|
51
|
+
|
|
52
|
+
### 2. Verify against the running process
|
|
53
|
+
- **Place a probe at each changed code site** — `MCP:ndt_debug_put-tracepoint` for "did it run", `MCP:ndt_debug_put-logpoint` for variable capture, `MCP:ndt_debug_put-exceptionpoint` for new throw branches
|
|
54
|
+
- **Exercise the path end-to-end** (trigger from browser, curl, or the backend cycle if active)
|
|
55
|
+
- **Each touched probe must report `triggered: true`** in `MCP:ndt_debug_get-probe-snapshots`
|
|
56
|
+
- **Check one edge case per new branch** — invalid input, missing field, auth failure, …
|
|
57
|
+
- **Logs** — `MCP:ndt_debug_get-logs` at error level; `backend_node_log_errors` must be empty for `pass`
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Full Mode (`/ironbee-verify full`, node cycle)
|
|
62
|
+
|
|
63
|
+
Probe every Node code path reachable from files matching `node.verifyPatterns`, not just the changed files. Do NOT run `git diff` or scope to recent changes.
|
|
64
|
+
|
|
65
|
+
- Place probes at every handler / route / service entry point in scope, plus key internal branch points (early returns, error catches, conditional middleware)
|
|
66
|
+
- Exercise each path with at least one happy-path call AND one failure-path call
|
|
67
|
+
- `backend_node_log_errors` must be empty after the full run — any unexpected log error is a fail, regardless of when it was introduced
|
|
@@ -0,0 +1,23 @@
|
|
|
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`. -->
|
|
4
|
+
|
|
5
|
+
## Backend cycle (runtime-agnostic protocol verification)
|
|
6
|
+
|
|
7
|
+
When the file matches `backend.verifyPatterns`, the Stop hook ALSO requires verification through the **backend-devtools** MCP server (prefix `bedt_`). Backend-cycle verification means making a real protocol call (HTTP / gRPC / GraphQL / WebSocket) against the running service and inspecting the response — language- and framework-independent.
|
|
8
|
+
|
|
9
|
+
The backend cycle and the node cycle are **independent**. Node attaches to a Node.js V8 inspector with non-blocking probes (`ndt_*`); backend drives wire protocols from outside (`bedt_*`). They can be active in the same task; both must be satisfied for `status: pass`.
|
|
10
|
+
|
|
11
|
+
### Backend-cycle additions to the main flow
|
|
12
|
+
|
|
13
|
+
These attach to the **Required steps** above — they don't replace any step. Numbering follows the main flow:
|
|
14
|
+
|
|
15
|
+
- **Within step 3 (run flow):** also run the backend flow: identify the affected endpoint(s) → call the matching protocol tool (`bedt_request_http` / `bedt_request_grpc` / `bedt_request_graphql` / `bedt_request_websocket-open` / `bedt_request_replay`) → inspect status / body / `traceId` → chain follow-up calls when verifying side effects. **A 4xx / 5xx response is a normal result, not an error** — only transport failures populate the `error` field.
|
|
16
|
+
- **Within step 6 (submit verdict):** include `backend_endpoints_called` (the only required backend field), and optionally `backend_response_statuses` and `backend_traces_collected`. One verdict carries fields for every active cycle.
|
|
17
|
+
|
|
18
|
+
### Additional BANNED for backend cycle
|
|
19
|
+
|
|
20
|
+
- Calling `bedt_*` tools without first opening a verification cycle (`ironbee hook verification-start`).
|
|
21
|
+
- Treating a 4xx / 5xx response as a transport failure when the test was specifically asking for that error condition (e.g. "POST should reject malformed body with 400"). Decide PASS/FAIL based on the test's intent, not the status code's HTTP-class default.
|
|
22
|
+
- Submitting a backend-only verdict that omits `backend_endpoints_called` — any non-empty list of endpoints driven during verification is required.
|
|
23
|
+
- Inferring backend behavior by reading code without making a real protocol call. The cycle is satisfied only by actually exercising the wire protocol.
|
|
@@ -0,0 +1,17 @@
|
|
|
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`. -->
|
|
4
|
+
|
|
5
|
+
**Browser cycle** — frontend file changes (default: most code extensions). Tools come from the **browser-devtools** MCP server (prefix `MCP:bdt_*`). Verification means navigating to the affected page and FUNCTIONALLY exercising the change in the browser — clicking, typing, submitting — not just looking at it.
|
|
6
|
+
|
|
7
|
+
## Browser flow steps
|
|
8
|
+
|
|
9
|
+
Run the **Browser cycle** flow when an edited file activates it: navigate (`MCP:bdt_navigation_go-to`) → functionally test → screenshot (`MCP:bdt_content_take-screenshot`) → accessibility (`MCP:bdt_a11y_take-aria-snapshot`) → console (`MCP:bdt_o11y_get-console-messages`). All four are MANDATORY.
|
|
10
|
+
|
|
11
|
+
- If `recording.enable` is on, the gate forces `MCP:bdt_content_start-recording` BEFORE the steps above and rejects the verdict if you don't call `MCP:bdt_content_stop-recording` AFTER them. Always pair start/stop around the steps above.
|
|
12
|
+
- Pass verdict carries `pages_tested`, `checks`, `console_errors`, `network_failures`. `status: pass` requires `console_errors === 0` AND `network_failures === 0`.
|
|
13
|
+
|
|
14
|
+
## Browser-cycle BANNED
|
|
15
|
+
|
|
16
|
+
- Calling `MCP:bdt_*` tools without first opening a verification cycle (`ironbee hook verification-start`).
|
|
17
|
+
- **Submitting a verdict while a browser recording is still active** — always call `MCP:bdt_content_stop-recording` BEFORE `ironbee hook submit-verdict`. The recording start/stop pair brackets the verification flow.
|
|
@@ -1,10 +1,10 @@
|
|
|
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
|
## Node cycle
|
|
6
6
|
|
|
7
|
-
Backend file changes IF the file matches `
|
|
7
|
+
Backend file changes IF the file matches `node.verifyPatterns` ALSO require verification through the **node-devtools** MCP server (prefix `MCP:ndt_*`). Node-cycle verification means attaching to the running Node process via the V8 inspector, setting a probe (tracepoint / logpoint / exceptionpoint) at the changed code, exercising the path so the probe fires, and reading snapshots — OR inspecting runtime error logs.
|
|
8
8
|
|
|
9
9
|
Both cycles can be active simultaneously (e.g. you edit both a React component and an API handler in the same task). One `verification-start` covers all active cycles; one verdict file carries fields for all active cycles; one retry counter applies globally.
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ Both cycles can be active simultaneously (e.g. you edit both a React component a
|
|
|
12
12
|
|
|
13
13
|
`node-devtools` is a V8 inspector wrapper. It does NOT work for Java, Python, Go, Rust, Ruby, .NET, PHP, or any other runtime. If you see `pom.xml`, `build.gradle`, `requirements.txt`, `pyproject.toml`, `go.mod`, `Cargo.toml`, etc., the backend is NOT Node.js and you must NOT call `MCP:ndt_*` tools — they will fail to connect to non-Node processes.
|
|
14
14
|
|
|
15
|
-
**Misconfiguration recovery.** If you reach this state, the operator enabled the node cycle for a non-Node project by mistake. The stop hook will keep blocking with `incomplete_tools` for the node cycle until you call `MCP:ndt_debug_connect` (which will fail) or until `maxRetries` is exhausted. Don't attempt the connection. Instead, stop and clearly report to the user: the project's backend is not Node.js, and they must run `ironbee disable
|
|
15
|
+
**Misconfiguration recovery.** If you reach this state, the operator enabled the node cycle for a non-Node project by mistake. The stop hook will keep blocking with `incomplete_tools` for the node cycle until you call `MCP:ndt_debug_connect` (which will fail) or until `maxRetries` is exhausted. Don't attempt the connection. Instead, stop and clearly report to the user: the project's backend is not Node.js, and they must run `ironbee node disable` to unblock the gate. Continue with browser-cycle verification only in the meantime.
|
|
16
16
|
|
|
17
17
|
### Node-cycle additions to the main flow
|
|
18
18
|
|
|
@@ -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: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:bedt_request_grpc` — unary + 3 streaming modes; pass `.proto` text or descriptor.
|
|
19
|
+
- **GraphQL**: `MCP:bedt_request_graphql` — query/mutation, variables, persisted query support.
|
|
20
|
+
- **WebSocket** (stateful — open/send/receive/close cycle):
|
|
21
|
+
- `MCP:bedt_request_websocket-open` — establish session.
|
|
22
|
+
- `MCP:bedt_request_websocket-send` / `bedt_request_websocket-receive` — exchange frames.
|
|
23
|
+
- `MCP:bedt_request_websocket-close` — clean teardown (and `bedt_request_websocket-list` for running sessions).
|
|
24
|
+
- **Replay**: `MCP: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:bdt_content_start-recording`, and `submit-verdict` rejects with `"recording is still active"` unless you call `MCP: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: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:bdt_content_take-screenshot` — capture the final visual state
|
|
12
|
+
4. **Accessibility**: `MCP:bdt_a11y_take-aria-snapshot` — verify page structure
|
|
13
|
+
5. **Console**: `MCP: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 `MCP: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 `MCP: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 `MCP: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,15 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "MANDATORY verification after code changes — IronBee enforcement (
|
|
2
|
+
description: "MANDATORY verification after code changes — IronBee enforcement (per-cycle verification gate)"
|
|
3
3
|
alwaysApply: true
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
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.
|
|
7
7
|
|
|
8
|
-
Verification runs in **cycles** decided by file
|
|
8
|
+
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.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
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.
|
|
10
|
+
**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.
|
|
13
11
|
|
|
14
12
|
## Application lifecycle
|
|
15
13
|
|
|
@@ -24,11 +22,9 @@ Skip start if already running. Fix build errors before proceeding. **Don't guess
|
|
|
24
22
|
|
|
25
23
|
1. Build and start the application if not already running.
|
|
26
24
|
2. **Start verification**: `echo '{"session_id":"<your-session-id>"}' | ironbee hook verification-start` — required before any devtools tool call.
|
|
27
|
-
3. Run the
|
|
28
|
-
- If `recording.enable` is on, the gate forces `MCP:bdt_content_start-recording` BEFORE the steps above and rejects the verdict if you don't call `MCP:bdt_content_stop-recording` AFTER them. Always pair start/stop around steps above.
|
|
29
|
-
- **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.
|
|
25
|
+
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.
|
|
30
26
|
4. Stop the dev server when done.
|
|
31
|
-
5. **
|
|
27
|
+
5. **Honor any cycle-specific teardown** noted in the platform sections BEFORE submit-verdict.
|
|
32
28
|
6. **IMMEDIATELY submit your verdict** — do NOT edit any code before submitting: `echo '<verdict-json>' | ironbee hook submit-verdict`.
|
|
33
29
|
- Pass verdict carries fields for every active cycle. Fail verdict adds `issues`. Pass after fail adds `fixes`.
|
|
34
30
|
- Status `pass` is overridden to fail by the gate when evidence doesn't back it.
|
|
@@ -46,8 +42,13 @@ Every file edit automatically clears your verdict, requiring re-verification.
|
|
|
46
42
|
- Submitting a verdict without actually performing verification through real tools.
|
|
47
43
|
- Submitting a verdict based on assumptions, code reading, or prior knowledge.
|
|
48
44
|
- Copying example verdicts from hook messages without doing real verification first.
|
|
49
|
-
- Calling
|
|
50
|
-
|
|
45
|
+
- Calling devtools tools for any cycle without first opening a verification cycle (`ironbee hook verification-start`).
|
|
46
|
+
|
|
47
|
+
<!--IRONBEE:PLATFORM:browser-->
|
|
48
|
+
<!--/IRONBEE:PLATFORM:browser-->
|
|
49
|
+
|
|
50
|
+
<!--IRONBEE:PLATFORM:node-->
|
|
51
|
+
<!--/IRONBEE:PLATFORM:node-->
|
|
51
52
|
|
|
52
|
-
<!--IRONBEE:
|
|
53
|
-
<!--/IRONBEE:
|
|
53
|
+
<!--IRONBEE:PLATFORM:backend-->
|
|
54
|
+
<!--/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:bdt_content_take-screenshot` — capture the final visual state
|
|
67
|
-
4. **Accessibility**: `MCP:bdt_a11y_take-aria-snapshot` — verify page structure
|
|
68
|
-
5. **Console**: `MCP: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.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ironbee backend <subcommand>` — manage the runtime-agnostic backend
|
|
3
|
+
* protocol cycle (HTTP / gRPC / GraphQL / WebSocket via the
|
|
4
|
+
* `backend-devtools` MCP, `bedt_*` tools).
|
|
5
|
+
*
|
|
6
|
+
* Subcommands today:
|
|
7
|
+
* - `enable` — opt in (writes a minimal `{ "backend": {} }` block;
|
|
8
|
+
* multi-language code defaults flow in at runtime).
|
|
9
|
+
* - `disable` — opt out (drops the block clean when no customizations
|
|
10
|
+
* + no lower-layer override; otherwise hard-kills via
|
|
11
|
+
* `verifyPatterns: []`).
|
|
12
|
+
*/
|
|
13
|
+
import { Command } from "commander";
|
|
14
|
+
export declare const backendEnableCommand: Command;
|
|
15
|
+
export declare const backendDisableCommand: Command;
|
|
16
|
+
export declare const backendCommand: Command;
|
|
17
|
+
//# sourceMappingURL=backend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../src/commands/backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBpC,eAAO,MAAM,oBAAoB,EAAE,OAW7B,CAAC;AAEP,eAAO,MAAM,qBAAqB,EAAE,OAW9B,CAAC;AAEP,eAAO,MAAM,cAAc,EAAE,OAGS,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* `ironbee backend <subcommand>` — manage the runtime-agnostic backend
|
|
4
|
+
* protocol cycle (HTTP / gRPC / GraphQL / WebSocket via the
|
|
5
|
+
* `backend-devtools` MCP, `bedt_*` tools).
|
|
6
|
+
*
|
|
7
|
+
* Subcommands today:
|
|
8
|
+
* - `enable` — opt in (writes a minimal `{ "backend": {} }` block;
|
|
9
|
+
* multi-language code defaults flow in at runtime).
|
|
10
|
+
* - `disable` — opt out (drops the block clean when no customizations
|
|
11
|
+
* + no lower-layer override; otherwise hard-kills via
|
|
12
|
+
* `verifyPatterns: []`).
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.backendCommand = exports.backendDisableCommand = exports.backendEnableCommand = void 0;
|
|
16
|
+
const commander_1 = require("commander");
|
|
17
|
+
const registry_1 = require("../clients/registry");
|
|
18
|
+
const config_1 = require("../lib/config");
|
|
19
|
+
const output_1 = require("../lib/output");
|
|
20
|
+
const cycle_toggle_1 = require("./cycle-toggle");
|
|
21
|
+
function attachToggleOptions(cmd) {
|
|
22
|
+
return cmd
|
|
23
|
+
.option("-p, --project-dir <dir>", "Project directory (default: cwd).")
|
|
24
|
+
.option("-g, --global", "Write to the global config (~/.ironbee/config.json) instead of the project.")
|
|
25
|
+
.option("--local", "Write to the gitignored project-local override (<project>/.ironbee/config.local.json). Mutually exclusive with --global.")
|
|
26
|
+
.option("--client <name>", `Only update guidance md files for this client (${(0, registry_1.clientNames)()}), or "all". Default: every registered client (per-file existsSync gate skips uninstalled ones).`);
|
|
27
|
+
}
|
|
28
|
+
exports.backendEnableCommand = attachToggleOptions(new commander_1.Command("enable"))
|
|
29
|
+
.description("Enable the runtime-agnostic backend protocol cycle. Writes a minimal `{ \"backend\": {} }` block — multi-language code defaults (TS/JS/Py/Go/Java/Ruby/.NET/Rust/Kotlin/Scala paths) flow in at runtime.")
|
|
30
|
+
.action((opts) => {
|
|
31
|
+
try {
|
|
32
|
+
const projectDir = opts.projectDir ?? process.cwd();
|
|
33
|
+
const target = (0, config_1.resolveConfigTargetFromFlags)(opts);
|
|
34
|
+
(0, cycle_toggle_1.applyEnableCycle)("backend", projectDir, target, opts.client);
|
|
35
|
+
}
|
|
36
|
+
catch (e) {
|
|
37
|
+
console.error(`${output_1.pc.red("✗")} ${e instanceof Error ? e.message : e}`);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
exports.backendDisableCommand = attachToggleOptions(new commander_1.Command("disable"))
|
|
42
|
+
.description("Disable the backend protocol cycle. Drops the entire `backend` block when no customizations + no lower-layer override exist; otherwise writes `backend.verifyPatterns: []` (hard kill, preserves customizations).")
|
|
43
|
+
.action((opts) => {
|
|
44
|
+
try {
|
|
45
|
+
const projectDir = opts.projectDir ?? process.cwd();
|
|
46
|
+
const target = (0, config_1.resolveConfigTargetFromFlags)(opts);
|
|
47
|
+
(0, cycle_toggle_1.applyDisableCycle)("backend", projectDir, target, opts.client);
|
|
48
|
+
}
|
|
49
|
+
catch (e) {
|
|
50
|
+
console.error(`${output_1.pc.red("✗")} ${e instanceof Error ? e.message : e}`);
|
|
51
|
+
process.exit(1);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
exports.backendCommand = new commander_1.Command("backend")
|
|
55
|
+
.description("Manage the runtime-agnostic backend protocol cycle (HTTP / gRPC / GraphQL / WebSocket via the `backend-devtools` MCP, `bedt_*` tools).")
|
|
56
|
+
.addCommand(exports.backendEnableCommand)
|
|
57
|
+
.addCommand(exports.backendDisableCommand);
|
|
58
|
+
//# sourceMappingURL=backend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../../src/commands/backend.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH,yCAAoC;AACpC,kDAAkD;AAClD,0CAA2E;AAC3E,0CAAmC;AACnC,iDAAqE;AASrE,SAAS,mBAAmB,CAAC,GAAY;IACrC,OAAO,GAAG;SACL,MAAM,CAAC,yBAAyB,EAAE,mCAAmC,CAAC;SACtE,MAAM,CAAC,cAAc,EAAE,6EAA6E,CAAC;SACrG,MAAM,CAAC,SAAS,EAAE,0HAA0H,CAAC;SAC7I,MAAM,CAAC,iBAAiB,EAAE,kDAAkD,IAAA,sBAAW,GAAE,kGAAkG,CAAC,CAAC;AACtM,CAAC;AAEY,QAAA,oBAAoB,GAAY,mBAAmB,CAAC,IAAI,mBAAO,CAAC,QAAQ,CAAC,CAAC;KAClF,WAAW,CAAC,0MAA0M,CAAC;KACvN,MAAM,CAAC,CAAC,IAAmB,EAAQ,EAAE;IAClC,IAAI,CAAC;QACD,MAAM,UAAU,GAAW,IAAI,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAC5D,MAAM,MAAM,GAAiB,IAAA,qCAA4B,EAAC,IAAI,CAAC,CAAC;QAChE,IAAA,+BAAgB,EAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACjE,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,GAAG,WAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACvE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC,CAAC,CAAC;AAEM,QAAA,qBAAqB,GAAY,mBAAmB,CAAC,IAAI,mBAAO,CAAC,SAAS,CAAC,CAAC;KACpF,WAAW,CAAC,mNAAmN,CAAC;KAChO,MAAM,CAAC,CAAC,IAAmB,EAAQ,EAAE;IAClC,IAAI,CAAC;QACD,MAAM,UAAU,GAAW,IAAI,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAC5D,MAAM,MAAM,GAAiB,IAAA,qCAA4B,EAAC,IAAI,CAAC,CAAC;QAChE,IAAA,gCAAiB,EAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAClE,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,GAAG,WAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACvE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC,CAAC,CAAC;AAEM,QAAA,cAAc,GAAY,IAAI,mBAAO,CAAC,SAAS,CAAC;KACxD,WAAW,CAAC,wIAAwI,CAAC;KACrJ,UAAU,CAAC,4BAAoB,CAAC;KAChC,UAAU,CAAC,6BAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ironbee browser <subcommand>` — manage the browser verification cycle.
|
|
3
|
+
*
|
|
4
|
+
* Subcommands today:
|
|
5
|
+
* - `enable` — turn the browser cycle on (default-on; use this to re-enable
|
|
6
|
+
* after `disable`, or to strip a prior `verifyPatterns: []`
|
|
7
|
+
* override).
|
|
8
|
+
* - `disable` — turn the browser cycle off (writes `verifyPatterns: []` as
|
|
9
|
+
* a hard kill; preserves customizations).
|
|
10
|
+
*
|
|
11
|
+
* The hierarchical `browser <verb>` shape leaves room for future per-platform
|
|
12
|
+
* commands beyond enable/disable (e.g. `browser status`, `browser inspect`,
|
|
13
|
+
* `browser test`) without name-spacing them at the top level.
|
|
14
|
+
*/
|
|
15
|
+
import { Command } from "commander";
|
|
16
|
+
export declare const browserEnableCommand: Command;
|
|
17
|
+
export declare const browserDisableCommand: Command;
|
|
18
|
+
export declare const browserCommand: Command;
|
|
19
|
+
//# sourceMappingURL=browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/commands/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBpC,eAAO,MAAM,oBAAoB,EAAE,OAW7B,CAAC;AAEP,eAAO,MAAM,qBAAqB,EAAE,OAW9B,CAAC;AAEP,eAAO,MAAM,cAAc,EAAE,OAGS,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* `ironbee browser <subcommand>` — manage the browser verification cycle.
|
|
4
|
+
*
|
|
5
|
+
* Subcommands today:
|
|
6
|
+
* - `enable` — turn the browser cycle on (default-on; use this to re-enable
|
|
7
|
+
* after `disable`, or to strip a prior `verifyPatterns: []`
|
|
8
|
+
* override).
|
|
9
|
+
* - `disable` — turn the browser cycle off (writes `verifyPatterns: []` as
|
|
10
|
+
* a hard kill; preserves customizations).
|
|
11
|
+
*
|
|
12
|
+
* The hierarchical `browser <verb>` shape leaves room for future per-platform
|
|
13
|
+
* commands beyond enable/disable (e.g. `browser status`, `browser inspect`,
|
|
14
|
+
* `browser test`) without name-spacing them at the top level.
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.browserCommand = exports.browserDisableCommand = exports.browserEnableCommand = void 0;
|
|
18
|
+
const commander_1 = require("commander");
|
|
19
|
+
const registry_1 = require("../clients/registry");
|
|
20
|
+
const config_1 = require("../lib/config");
|
|
21
|
+
const output_1 = require("../lib/output");
|
|
22
|
+
const cycle_toggle_1 = require("./cycle-toggle");
|
|
23
|
+
function attachToggleOptions(cmd) {
|
|
24
|
+
return cmd
|
|
25
|
+
.option("-p, --project-dir <dir>", "Project directory (default: cwd).")
|
|
26
|
+
.option("-g, --global", "Write to the global config (~/.ironbee/config.json) instead of the project.")
|
|
27
|
+
.option("--local", "Write to the gitignored project-local override (<project>/.ironbee/config.local.json). Mutually exclusive with --global.")
|
|
28
|
+
.option("--client <name>", `Only update guidance md files for this client (${(0, registry_1.clientNames)()}), or "all". Default: every registered client (per-file existsSync gate skips uninstalled ones).`);
|
|
29
|
+
}
|
|
30
|
+
exports.browserEnableCommand = attachToggleOptions(new commander_1.Command("enable"))
|
|
31
|
+
.description("Enable the browser cycle. Browser is default-on; this command writes a minimal `{ \"browser\": {} }` block (no pattern materialization; code defaults flow in at runtime) OR strips a prior `verifyPatterns: []` disable-override.")
|
|
32
|
+
.action((opts) => {
|
|
33
|
+
try {
|
|
34
|
+
const projectDir = opts.projectDir ?? process.cwd();
|
|
35
|
+
const target = (0, config_1.resolveConfigTargetFromFlags)(opts);
|
|
36
|
+
(0, cycle_toggle_1.applyEnableCycle)("browser", projectDir, target, opts.client);
|
|
37
|
+
}
|
|
38
|
+
catch (e) {
|
|
39
|
+
console.error(`${output_1.pc.red("✗")} ${e instanceof Error ? e.message : e}`);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
exports.browserDisableCommand = attachToggleOptions(new commander_1.Command("disable"))
|
|
44
|
+
.description("Disable the browser cycle (writes `browser.verifyPatterns: []` to override the default 40+ extension fallback; preserves customizations of `alwaysRequired` / `evidencePaths` / `additionalVerifyPatterns`).")
|
|
45
|
+
.action((opts) => {
|
|
46
|
+
try {
|
|
47
|
+
const projectDir = opts.projectDir ?? process.cwd();
|
|
48
|
+
const target = (0, config_1.resolveConfigTargetFromFlags)(opts);
|
|
49
|
+
(0, cycle_toggle_1.applyDisableCycle)("browser", projectDir, target, opts.client);
|
|
50
|
+
}
|
|
51
|
+
catch (e) {
|
|
52
|
+
console.error(`${output_1.pc.red("✗")} ${e instanceof Error ? e.message : e}`);
|
|
53
|
+
process.exit(1);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
exports.browserCommand = new commander_1.Command("browser")
|
|
57
|
+
.description("Manage the browser verification cycle (DOM / console / a11y / screenshots via the `browser-devtools` MCP, `bdt_*` tools).")
|
|
58
|
+
.addCommand(exports.browserEnableCommand)
|
|
59
|
+
.addCommand(exports.browserDisableCommand);
|
|
60
|
+
//# sourceMappingURL=browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/commands/browser.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAEH,yCAAoC;AACpC,kDAAkD;AAClD,0CAA2E;AAC3E,0CAAmC;AACnC,iDAAqE;AASrE,SAAS,mBAAmB,CAAC,GAAY;IACrC,OAAO,GAAG;SACL,MAAM,CAAC,yBAAyB,EAAE,mCAAmC,CAAC;SACtE,MAAM,CAAC,cAAc,EAAE,6EAA6E,CAAC;SACrG,MAAM,CAAC,SAAS,EAAE,0HAA0H,CAAC;SAC7I,MAAM,CAAC,iBAAiB,EAAE,kDAAkD,IAAA,sBAAW,GAAE,kGAAkG,CAAC,CAAC;AACtM,CAAC;AAEY,QAAA,oBAAoB,GAAY,mBAAmB,CAAC,IAAI,mBAAO,CAAC,QAAQ,CAAC,CAAC;KAClF,WAAW,CAAC,oOAAoO,CAAC;KACjP,MAAM,CAAC,CAAC,IAAmB,EAAQ,EAAE;IAClC,IAAI,CAAC;QACD,MAAM,UAAU,GAAW,IAAI,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAC5D,MAAM,MAAM,GAAiB,IAAA,qCAA4B,EAAC,IAAI,CAAC,CAAC;QAChE,IAAA,+BAAgB,EAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACjE,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,GAAG,WAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACvE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC,CAAC,CAAC;AAEM,QAAA,qBAAqB,GAAY,mBAAmB,CAAC,IAAI,mBAAO,CAAC,SAAS,CAAC,CAAC;KACpF,WAAW,CAAC,8MAA8M,CAAC;KAC3N,MAAM,CAAC,CAAC,IAAmB,EAAQ,EAAE;IAClC,IAAI,CAAC;QACD,MAAM,UAAU,GAAW,IAAI,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAC5D,MAAM,MAAM,GAAiB,IAAA,qCAA4B,EAAC,IAAI,CAAC,CAAC;QAChE,IAAA,gCAAiB,EAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAClE,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,GAAG,WAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACvE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC,CAAC,CAAC;AAEM,QAAA,cAAc,GAAY,IAAI,mBAAO,CAAC,SAAS,CAAC;KACxD,WAAW,CAAC,2HAA2H,CAAC;KACxI,UAAU,CAAC,4BAAoB,CAAC;KAChC,UAAU,CAAC,6BAAqB,CAAC,CAAC"}
|