@vibecodr/cli 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +31 -11
  3. package/dist/app/command-registry.d.ts +13 -0
  4. package/dist/app/command-registry.d.ts.map +1 -0
  5. package/dist/app/command-registry.js +54 -0
  6. package/dist/app/command-registry.js.map +1 -0
  7. package/dist/app/help.d.ts +5 -0
  8. package/dist/app/help.d.ts.map +1 -0
  9. package/dist/app/help.js +158 -0
  10. package/dist/app/help.js.map +1 -0
  11. package/dist/bin/vibecodr-mcp.js +82 -80
  12. package/dist/bin/vibecodr-mcp.js.map +1 -1
  13. package/dist/commands/context.d.ts +2 -0
  14. package/dist/commands/context.d.ts.map +1 -1
  15. package/dist/commands/doctor.d.ts.map +1 -1
  16. package/dist/commands/doctor.js +81 -2
  17. package/dist/commands/doctor.js.map +1 -1
  18. package/dist/commands/feedback.d.ts +3 -0
  19. package/dist/commands/feedback.d.ts.map +1 -0
  20. package/dist/commands/feedback.js +92 -0
  21. package/dist/commands/feedback.js.map +1 -0
  22. package/dist/commands/login.d.ts.map +1 -1
  23. package/dist/commands/login.js +29 -4
  24. package/dist/commands/login.js.map +1 -1
  25. package/dist/commands/logout.d.ts.map +1 -1
  26. package/dist/commands/logout.js +25 -3
  27. package/dist/commands/logout.js.map +1 -1
  28. package/dist/commands/mcp.d.ts +3 -0
  29. package/dist/commands/mcp.d.ts.map +1 -0
  30. package/dist/commands/mcp.js +26 -0
  31. package/dist/commands/mcp.js.map +1 -0
  32. package/dist/commands/status.d.ts.map +1 -1
  33. package/dist/commands/status.js +78 -6
  34. package/dist/commands/status.js.map +1 -1
  35. package/dist/commands/tools.d.ts.map +1 -1
  36. package/dist/commands/tools.js +45 -1
  37. package/dist/commands/tools.js.map +1 -1
  38. package/dist/legacy/cli/install.js +4 -4
  39. package/dist/legacy/cli/run.js +353 -353
  40. package/dist/legacy/cli/run.js.map +1 -1
  41. package/dist/legacy/config/store.js +7 -7
  42. package/dist/legacy/core/api-client.js +3 -3
  43. package/dist/legacy/core/api-client.js.map +1 -1
  44. package/dist/legacy/core/validators.js +4 -4
  45. package/dist/legacy/core/version.d.ts +2 -2
  46. package/dist/legacy/core/version.js +1 -1
  47. package/docs/API-CONTRACT.md +605 -606
  48. package/docs/RELEASE-CHECKLIST.md +264 -260
  49. package/docs/SECURITY.md +166 -162
  50. package/docs/VALIDATION-MATRIX.md +45 -45
  51. package/docs/architecture.md +9 -6
  52. package/docs/auth.md +15 -7
  53. package/docs/commands.md +280 -256
  54. package/docs/install.md +5 -5
  55. package/package.json +4 -3
@@ -1,133 +1,137 @@
1
- # vc-tools Release Checklist
2
-
3
- Use this checklist before publishing `@vibecodr/vc-tools`.
4
-
5
- ## Repository Boundary
6
-
7
- - `git rev-parse --show-toplevel` prints the `tools/vc-tools` repository root.
8
- - No files are staged or committed from the parent Vibecodr repository.
9
- - The package name is `@vibecodr/vc-tools`.
10
- - The binary name is `vc-tools`.
11
- - Environment variables use the `VC_TOOLS_*` namespace.
12
- - Stored credentials use the native credential store unless
13
- `VC_TOOLS_CREDENTIAL_STORE=file` is explicitly set for tests.
14
-
15
- ## Required Verification
16
-
17
- ```powershell
18
- npm ci
19
- npm run check
20
- npm run check:worker
21
- npm test
22
- npm run build
23
- npm run verify:artifact
24
- npm run verify:goal
25
- npm run verify:release
26
- npm run verify
27
- node dist/bin/vc-tools.js --help
28
- node dist/bin/vc-tools.js help agent
29
- node dist/bin/vc-tools.js help computer
30
- node dist/bin/vc-tools.js help browser
31
- node dist/bin/vc-tools.js --quiet usage
32
- node dist/bin/vc-tools.js --json plans
33
- node dist/bin/vc-tools.js usage
34
- node dist/bin/vc-tools.js --json limits
35
- node dist/bin/vc-tools.js --json dashboard usage
36
- node dist/bin/vc-tools.js --json inspect
37
- node dist/bin/vc-tools.js --json browser render https://127.0.0.1
38
- npx wrangler deploy --dry-run --outdir tmp\wrangler-dry-run
39
- npx wrangler d1 migrations apply vc-tools-db --remote
40
- VC_TOOLS_RELEASE_CHANNEL=live npm run verify:release
41
- ```
42
-
43
- Expected results:
44
-
45
- - TypeScript exits `0`.
46
- - Worker type generation and Worker TypeScript checks exit `0`.
47
- - Tests exit `0`.
48
- - Build exits `0`.
49
- - Package artifact verifier exits `0`.
50
- - Goal coverage verifier exits `0`.
51
- - Release readiness verifier exits `0` for `VC_TOOLS_RELEASE_CHANNEL=cli-contract`.
52
- - `VC_TOOLS_RELEASE_CHANNEL=live npm run verify:release` exits `0` only after
53
- `live-hosted-production` is marked locally verified by fresh production smoke
54
- evidence. It is expected to fail while that inspection is still
55
- `hosted-required`.
56
- - Help identifies `vc-tools`, not `vibecodr`.
57
- - Help exposes examples, docs/support links, secure credential file/stdin
58
- inputs, and command-specific help via both `vc-tools help <command>` and
59
- `<command> --help`.
60
- - `--quiet` suppresses non-essential human success output while `--json` remains
61
- stable.
62
- - `plans` works without auth using local launch packaging fallback.
63
- - `plans` includes Free, Creator, Pro, overage meters, and launch safety
64
- policies.
65
- - `plans` fallback and `/v1/plans` are explicitly non-authoritative for actor
66
- entitlement; `usage`/`limits` are the account-state surface and are marked
67
- read-only/not client-mutable.
68
- - `usage` renders allotted limits, numeric usage, and 0-100% quota bars; `limits`
69
- returns the same hosted usage state and keeps stable JSON.
70
- - `dashboard usage` and `dashboard cogs` return hosted dashboard URLs without
71
- requiring or printing credentials.
72
- - `inspect` reports one hosted-required check for CLI-contract releases and zero
73
- hosted-required checks after live production smoke.
74
- - Unsafe browser URL smoke exits non-zero before any hosted request.
75
- - The Worker returns health, MCP metadata, and fail-closed auth responses; tests
76
- keep contract-mode coverage for no-cost route validation.
77
- - The contract-mode Worker supports MCP `initialize`, `tools/list`, and
78
- `tools/call` JSON-RPC requests.
79
- - Hosted dashboard sections render overview, usage, activity, artifacts, grants,
80
- retention, billing, and internal COGS launch-contract data.
81
-
82
- ## Hosted Service Production Checks
83
-
84
- Run these after hosted Worker, D1, R2, Queue, Browser Run, Sandbox,
85
- `VC_TOOLS_BROWSER_RUN_ACCOUNT_ID`, `VC_TOOLS_BROWSER_RUN_API_TOKEN`, and the
86
- hosted/Browser/Sandbox account-cap vars plus `VC_TOOLS_CLI_GRANT_PUBLIC_JWKS`
87
- or the controlled static `VC_TOOLS_TOKEN_SHA256` secret are configured. Also configure
88
- `VC_TOOLS_INTERNAL_ALERT_TOKEN` through the repo-owned
89
- `scripts/vc-tools-secrets.ps1` flow; that script stores the managed alert signer
90
- in WinCred and uploads the same value to `vibecodr-internal-api` as
91
- `INTERNAL_BINDING_TOKEN_NEXT` so the current internal mesh token is not rotated
92
- just to enable vc-tools alerting. Keep the `VC_TOOLS_INTERNAL_API_WORKER`
93
- service binding deployed, confirm internal-api `ALERT_CODES` includes
94
- `E-VIBECODR-VC-TOOLS-SOFT-CAP`, and confirm internal-api has `NTFY_TOPIC`
95
- configured if ntfy delivery is expected. vc-tools operator emails are reserved
96
- for account-wide hosted, Browser Run, and Sandbox capacity pressure; per-user
97
- quota/usage pressure remains enforced and audit-visible without outbound
98
- operator email.
99
- For the public auth paths, also configure parent API Worker secrets
100
- `CLERK_SECRET_KEY` and `CLI_GRANT_PRIVATE_JWK`, set the parent/hosted grant
101
- audience to `vibecodr:vc-tools`, and set the hosted Worker
102
- `VC_TOOLS_CLI_GRANT_PUBLIC_JWKS` to the matching public JWKS. Legacy HMAC grants
103
- require `CLI_GRANT_LEGACY_HMAC_ENABLED="true"` and
104
- `VC_TOOLS_CLI_GRANT_LEGACY_HMAC_ENABLED="true"`, are beta/internal-only, and
105
- should be removed by 2026-06-30 after live ES256 smoke and migration:
106
-
107
- ```powershell
1
+ # Vibecodr CLI Release Checklist
2
+
3
+ Use this checklist before publishing `@vibecodr/cli`.
4
+
5
+ ## Repository Boundary
6
+
7
+ - `git rev-parse --show-toplevel` prints the `tools/mcp/Vibecodr-CLI` repository root.
8
+ - No files are staged or committed from the parent Vibecodr repository.
9
+ - The package name is `@vibecodr/cli`.
10
+ - The canonical bin name is `vibecodr`; `vibecodr-mcp` and `vc-tools` are
11
+ preserved as back-compat aliases.
12
+ - Environment variables use the `VC_TOOLS_*` namespace.
13
+ - Stored credentials use the native credential store unless
14
+ `VC_TOOLS_CREDENTIAL_STORE=file` is explicitly set for tests.
15
+
16
+ ## Required Verification
17
+
18
+ ```powershell
19
+ npm ci
20
+ npm run check
21
+ npm run check:worker
22
+ npm test
23
+ npm run build
24
+ npm run verify:artifact
25
+ npm run verify:release
26
+ npm run verify
27
+ node dist/bin/vibecodr-mcp.js --help
28
+ node dist/bin/vibecodr-mcp.js help mcp
29
+ node dist/bin/vibecodr-mcp.js login mcp --help
30
+ node dist/bin/vibecodr-mcp.js login agent --help
31
+ node dist/bin/vibecodr-mcp.js logout agent --help
32
+ node dist/bin/vibecodr-mcp.js help agent
33
+ node dist/bin/vibecodr-mcp.js help computer
34
+ node dist/bin/vibecodr-mcp.js help browser
35
+ node dist/bin/vibecodr-mcp.js --quiet usage
36
+ node dist/bin/vibecodr-mcp.js --json plans
37
+ node dist/bin/vibecodr-mcp.js usage
38
+ node dist/bin/vibecodr-mcp.js --json limits
39
+ node dist/bin/vibecodr-mcp.js --json dashboard usage
40
+ node dist/bin/vibecodr-mcp.js --json inspect
41
+ node dist/bin/vibecodr-mcp.js --json browser render https://127.0.0.1
42
+ npx wrangler deploy --dry-run --outdir tmp\wrangler-dry-run
43
+ npx wrangler d1 migrations apply vc-tools-db --remote
44
+ VC_TOOLS_RELEASE_CHANNEL=live npm run verify:release
45
+ ```
46
+
47
+ Expected results:
48
+
49
+ - TypeScript exits `0`.
50
+ - Worker type generation and Worker TypeScript checks exit `0`.
51
+ - Tests exit `0`.
52
+ - Build exits `0`.
53
+ - Package artifact verifier exits `0`.
54
+ - Release readiness verifier exits `0` for `VC_TOOLS_RELEASE_CHANNEL=cli-contract`.
55
+ - `VC_TOOLS_RELEASE_CHANNEL=live npm run verify:release` exits `0` only after
56
+ `live-hosted-production` is marked locally verified by fresh production smoke
57
+ evidence. It is expected to fail while that inspection is still
58
+ `hosted-required`.
59
+ - Help identifies `vibecodr`. The `vc-tools` and `vibecodr-mcp` bin names are
60
+ back-compat aliases that route into the same dispatcher.
61
+ - Help exposes examples, docs/support links, secure credential file/stdin
62
+ inputs, and command-specific help via both `vibecodr help <command>` and
63
+ `<command> --help`.
64
+ - `--quiet` suppresses non-essential human success output while `--json` remains
65
+ stable.
66
+ - `plans` works without auth using local launch packaging fallback.
67
+ - `plans` includes Free, Creator, Pro, overage meters, and launch safety
68
+ policies.
69
+ - `plans` fallback and `/v1/plans` are explicitly non-authoritative for actor
70
+ entitlement; `usage`/`limits` are the account-state surface and are marked
71
+ read-only/not client-mutable.
72
+ - `usage` renders allotted limits, numeric usage, and 0-100% quota bars; `limits`
73
+ returns the same hosted usage state and keeps stable JSON.
74
+ - `dashboard usage` and `dashboard cogs` return hosted dashboard URLs without
75
+ requiring or printing credentials.
76
+ - `inspect` reports one hosted-required check for CLI-contract releases and zero
77
+ hosted-required checks after live production smoke.
78
+ - Unsafe browser URL smoke exits non-zero before any hosted request.
79
+ - The Worker returns health, MCP metadata, and fail-closed auth responses; tests
80
+ keep contract-mode coverage for no-cost route validation.
81
+ - The contract-mode Worker supports MCP `initialize`, `tools/list`, and
82
+ `tools/call` JSON-RPC requests.
83
+ - Hosted dashboard sections render overview, usage, activity, artifacts, grants,
84
+ retention, billing, and internal COGS launch-contract data.
85
+
86
+ ## Hosted Service Production Checks
87
+
88
+ Run these after hosted Worker, D1, R2, Queue, Browser Run, Sandbox,
89
+ `VC_TOOLS_BROWSER_RUN_ACCOUNT_ID`, `VC_TOOLS_BROWSER_RUN_API_TOKEN`, and the
90
+ hosted/Browser/Sandbox account-cap vars plus `VC_TOOLS_CLI_GRANT_PUBLIC_JWKS`
91
+ or the controlled static `VC_TOOLS_TOKEN_SHA256` secret are configured. Also configure
92
+ `VC_TOOLS_INTERNAL_ALERT_TOKEN` through the repo-owned
93
+ `scripts/vc-tools-secrets.ps1` flow; that script stores the managed alert signer
94
+ in WinCred and uploads the same value to `vibecodr-internal-api` as
95
+ `INTERNAL_BINDING_TOKEN_NEXT` so the current internal mesh token is not rotated
96
+ just to enable vc-tools alerting. Keep the `VC_TOOLS_INTERNAL_API_WORKER`
97
+ service binding deployed, confirm internal-api `ALERT_CODES` includes
98
+ `E-VIBECODR-VC-TOOLS-SOFT-CAP`, and confirm internal-api has `NTFY_TOPIC`
99
+ configured if ntfy delivery is expected. vc-tools operator emails are reserved
100
+ for account-wide hosted, Browser Run, and Sandbox capacity pressure; per-user
101
+ quota/usage pressure remains enforced and audit-visible without outbound
102
+ operator email.
103
+ For the public auth paths, also configure parent API Worker secrets
104
+ `CLERK_SECRET_KEY` and `CLI_GRANT_PRIVATE_JWK`, set the parent/hosted grant
105
+ audience to `vibecodr:vc-tools`, and set the hosted Worker
106
+ `VC_TOOLS_CLI_GRANT_PUBLIC_JWKS` to the matching public JWKS. Legacy HMAC grants
107
+ require `CLI_GRANT_LEGACY_HMAC_ENABLED="true"` and
108
+ `VC_TOOLS_CLI_GRANT_LEGACY_HMAC_ENABLED="true"`, are beta/internal-only, and
109
+ should be removed by 2026-06-30 after live ES256 smoke and migration:
110
+
111
+ ```powershell
108
112
  $env:VC_TOOLS_API_URL = "https://tools.vibecodr.space"
109
- vc-tools login
110
- vc-tools login --credential-file .\clerk-oauth-token.txt
111
- vc-tools login --credential-file .\vc-tools-api-key.txt
112
- vc-tools start --client codex
113
- vc-tools auth diagnose
114
- vc-tools agent connect --client codex
115
- vc-tools tools list
116
- vc-tools browser render https://example.com
117
- vc-tools browser screenshot https://example.com --format png
118
- vc-tools browser read https://example.com
119
- vc-tools browser pdf https://example.com
120
- vc-tools browser crawl https://example.com/docs --max-pages 5 --max-depth 1
121
- vc-tools browser ask https://example.com --timeout-ms 1200000 --idle-timeout-ms 600000 --instructions "Inspect the page and save a concise snapshot."
122
- vc-tools computer run "node --version"
123
- vc-tools usage
124
- vc-tools grants list
125
- vc-tools retention show
126
- ```
127
-
128
- Expected hosted guarantees:
129
-
130
- - Auth secrets are configured as Worker secrets, not committed config.
113
+ vibecodr login
114
+ vibecodr login --credential-file .\clerk-oauth-token.txt
115
+ vibecodr login --credential-file .\vibecodr-api-key.txt
116
+ vibecodr start --client codex
117
+ vibecodr auth diagnose
118
+ vibecodr agent connect --client codex
119
+ vibecodr tools list
120
+ vibecodr browser render https://example.com
121
+ vibecodr browser screenshot https://example.com --format png
122
+ vibecodr browser read https://example.com
123
+ vibecodr browser pdf https://example.com
124
+ vibecodr browser crawl https://example.com/docs --max-pages 5 --max-depth 1
125
+ vibecodr browser ask https://example.com --timeout-ms 1200000 --idle-timeout-ms 600000 --instructions "Inspect the page and save a concise snapshot."
126
+ vibecodr computer run "node --version"
127
+ vibecodr usage
128
+ vibecodr grants list
129
+ vibecodr retention show
130
+ ```
131
+
132
+ Expected hosted guarantees:
133
+
134
+ - Auth secrets are configured as Worker secrets, not committed config.
131
135
  - Public human login uses `https://api.vibecodr.space/auth/vc-tools/device/*`;
132
136
  the verification URI opens `/settings/vc-tools/approve?vc_tools_code=...`,
133
137
  the browser approval response does not contain the grant, and the private
@@ -135,99 +139,99 @@ Expected hosted guarantees:
135
139
  - Public automation login accepts generic credential files/stdin, identifies
136
140
  Clerk OAuth tokens or scoped Clerk API keys, and exchanges them through
137
141
  `https://api.vibecodr.space/auth/cli/exchange`; explicit login paths store
138
- the durable local credential so short-lived vc-tools grants can refresh.
139
- - 2026-05-15 live OAuth proof: Clerk PKCE from the production
140
- `/agent/vibe` metadata completed through the in-app browser, and
141
- `scripts/smoke-vc-tools-oauth-token.mjs` exchanged the returned Clerk access
142
- token over stdin. Run `codex-oauth-20260515230549-tgn17r` passed
143
- `login-oauth-token`, `whoami-oauth-token`, and `usage-oauth-token` with
144
- `authMode=oauth`, `grantProfile=vc_tools`, scopes
145
- `["vc-tools:use","vc-tools:*"]`, plan `Pro`, `providerMode=live`,
146
- `secretPrinted=false`, and temporary config cleanup confirmed.
147
- - Vibecodr CLI grants include the `vc-tools:use` scope, the requested tool
148
- scope such as `vc-tools:browser.render_url` or `vc-tools:*`, current plan,
149
- subject, `grant_profile`, `kid`, `iat`, `nbf`, `exp`, `jti`, and
150
- `vibecodr:vc-tools` audience; static-token fallback is reserved for
151
- controlled deployments.
142
+ the durable local credential so short-lived Vibecodr grants can refresh.
143
+ - 2026-05-15 live OAuth proof: Clerk PKCE from the production
144
+ `/agent/vibe` metadata completed through the in-app browser, and
145
+ `scripts/smoke-vc-tools-oauth-token.mjs` exchanged the returned Clerk access
146
+ token over stdin. Run `codex-oauth-20260515230549-tgn17r` passed
147
+ `login-oauth-token`, `whoami-oauth-token`, and `usage-oauth-token` with
148
+ `authMode=oauth`, `grantProfile=vc_tools`, scopes
149
+ `["vc-tools:use","vc-tools:*"]`, plan `Pro`, `providerMode=live`,
150
+ `secretPrinted=false`, and temporary config cleanup confirmed.
151
+ - Vibecodr CLI grants include the `vc-tools:use` scope, the requested tool
152
+ scope such as `vc-tools:browser.render_url` or `vc-tools:*`, current plan,
153
+ subject, `grant_profile`, `kid`, `iat`, `nbf`, `exp`, `jti`, and
154
+ `vibecodr:vc-tools` audience; static-token fallback is reserved for
155
+ controlled deployments.
152
156
  - D1 migrations `0001_live_schema.sql`, `0002_actor_scope.sql`,
153
157
  `0003_quota_reservations.sql`, and
154
158
  `0004_sandbox_quota_reservations.sql`, and
155
159
  `0005_operator_alert_dedupe.sql`, and
156
160
  `0006_scheduled_qa.sql`, and `0007_job_queue_metadata.sql` are applied.
157
- - Browser/Sandbox calls are quota checked by the API before cost-bearing
158
- Cloudflare work.
159
- - Operator kill switches must be known before launch: setting
160
- `VC_TOOLS_PAUSE_COST_BEARING_JOBS=true` pauses all Browser/Sandbox work,
161
+ - Browser/Sandbox calls are quota checked by the API before cost-bearing
162
+ Cloudflare work.
163
+ - Operator kill switches must be known before launch: setting
164
+ `VC_TOOLS_PAUSE_COST_BEARING_JOBS=true` pauses all Browser/Sandbox work,
161
165
  `VC_TOOLS_DISABLE_BROWSER_RUN=true` pauses Browser Run Quick Actions and
162
166
  crawl, `VC_TOOLS_DISABLE_BROWSER_SESSIONS=true` pauses paid
163
167
  `browser.agent_task`, and `VC_TOOLS_DISABLE_SANDBOX=true` pauses Sandbox.
164
168
  Each pause returns `503 ops.cost_bearing_paused`, writes
165
169
  `tools.cost_bearing_paused`, and avoids D1 job insertion and Queue/Workflow
166
170
  dispatch.
167
- - Crossing hosted, Browser Run, or Sandbox account-wide 70%, 85%, or 95%
168
- pressure emits a sanitized `E-VIBECODR-VC-TOOLS-SOFT-CAP` operator alert.
169
- User quota/usage thresholds do not emit operator emails. Alerts flow through
170
- internal-api email/ntfy fanout; optional
171
- `VC_TOOLS_OPERATOR_ALERT_WEBHOOK_URLS` and `VC_TOOLS_OPERATOR_NTFY_TOPIC`
172
- secrets are additive fallback channels. D1 dedupe suppresses repeats in the
173
- same reset window, and missing notifier bindings are audit-visible.
174
- - Queue and DLQ backlog are checked by the scheduled Worker via
175
- `JOB_QUEUE.metrics()` and `JOB_DLQ.metrics()` and emit sanitized
176
- account-scoped `queue.backlog_messages` / `queue.dlq_messages` operator
177
- alerts. Tune `VC_TOOLS_QUEUE_BACKLOG_SOFT_CAP`,
178
- `VC_TOOLS_QUEUE_BACKLOG_HARD_CAP`, `VC_TOOLS_DLQ_MESSAGES_SOFT_CAP`, and
179
- `VC_TOOLS_DLQ_MESSAGES_HARD_CAP` only as platform-level thresholds; do not
180
- fan out per-user quota/usage alerts.
181
- - Account-wide active artifact storage is checked by summing active,
182
- non-expired artifact bytes in D1 during the scheduled Worker pass and emits a
183
- sanitized account-scoped `artifact.storage_gb` operator alert. Tune
184
- `VC_TOOLS_ARTIFACT_STORAGE_ACCOUNT_SOFT_GB` and
185
- `VC_TOOLS_ARTIFACT_STORAGE_ACCOUNT_HARD_GB` as platform-level thresholds,
186
- separate from the customer plan allotment SSOT.
187
- - Expired-artifact cleanup failures emit the account-scoped
188
- `E-VIBECODR-VC-TOOLS-RETENTION-CLEANUP-FAILED` /
189
- `retention.cleanup_failed` operator alert. Keep this code in the parent
190
- internal-api `ALERT_CODES` allowlist alongside
191
- `E-VIBECODR-VC-TOOLS-SOFT-CAP`; internal-api filters all user-scoped
192
- `source=vc-tools` payloads before email/ntfy fanout.
193
- - Browser Run and Sandbox execution failure/timeout rates are checked from
194
- recent terminal job rows during the scheduled Worker pass and emit the
195
- account-scoped `E-VIBECODR-VC-TOOLS-EXECUTION-HEALTH-DEGRADED` alert with
196
- `browser.failure_rate`, `browser.timeout_rate`, `sandbox.failure_rate`, or
197
- `sandbox.timeout_rate`. Tune
198
- `VC_TOOLS_EXECUTION_HEALTH_WINDOW_MINUTES`,
199
- `VC_TOOLS_EXECUTION_HEALTH_MIN_TERMINAL_JOBS`,
200
- `VC_TOOLS_FAILURE_RATE_ALERT_PERCENT`, and
201
- `VC_TOOLS_TIMEOUT_RATE_ALERT_PERCENT` as platform-level thresholds.
202
- - Unexpected hosted Worker HTTP 500s emit the account-scoped
203
- `E-VIBECODR-VC-TOOLS-HOSTED-WORKER-5XX` /
204
- `hosted.worker_5xx` operator alert through the same fanout path. Keep this
205
- code in parent internal-api `ALERT_CODES`; payloads must stay sanitized to
206
- method, path pattern, status, and redacted error text only.
207
- - Hosted API/MCP auth failures write anonymous `auth.failed` audit rows. The
208
- scheduled Worker aggregates them and emits the account-scoped
209
- `E-VIBECODR-VC-TOOLS-AUTH-FAILURE-ANOMALY` /
210
- `auth.failure_anomaly` operator alert when
211
- `VC_TOOLS_AUTH_FAILURE_ALERT_THRESHOLD` is crossed inside
212
- `VC_TOOLS_AUTH_FAILURE_WINDOW_MINUTES`. Keep this code in parent internal-api
213
- `ALERT_CODES`; payloads must stay token/query/body/actor-free.
214
- - Cloudflare spend anomaly checks are internal account-level early warnings,
215
- not user notifications and not invoice-backed billing truth. The scheduled
216
- Worker estimates current-month raw cost from vc-tools COGS meters and
217
- env-configured assumptions, then emits the account-scoped
218
- `E-VIBECODR-VC-TOOLS-CLOUDFLARE-SPEND-ANOMALY` /
219
- `cloudflare.estimated_spend_usd` alert when
220
- `VC_TOOLS_CLOUDFLARE_SPEND_SOFT_USD` is crossed. Keep this code in parent
221
- internal-api `ALERT_CODES`, tune
222
- `VC_TOOLS_CLOUDFLARE_SPEND_SOFT_USD` and
223
- `VC_TOOLS_CLOUDFLARE_SPEND_HARD_USD` only as platform thresholds, and compare
224
- any alert with Cloudflare Billable Usage / Budget Alerts before raising
225
- capacity or changing pricing.
226
- - Unsafe URL and quota denials write analytics-only D1 audit metrics as
227
- `tools.denied_unsafe_url` and `tools.denied_quota`. These are intentionally
228
- per-actor COGS/ops signals and must not be promoted into email/ntfy fanout.
229
- - `/dashboard/cogs` renders internal-only cost pressure by actor, plan, surface,
230
- warning threshold, and env-configured cost assumptions.
171
+ - Crossing hosted, Browser Run, or Sandbox account-wide 70%, 85%, or 95%
172
+ pressure emits a sanitized `E-VIBECODR-VC-TOOLS-SOFT-CAP` operator alert.
173
+ User quota/usage thresholds do not emit operator emails. Alerts flow through
174
+ internal-api email/ntfy fanout; optional
175
+ `VC_TOOLS_OPERATOR_ALERT_WEBHOOK_URLS` and `VC_TOOLS_OPERATOR_NTFY_TOPIC`
176
+ secrets are additive fallback channels. D1 dedupe suppresses repeats in the
177
+ same reset window, and missing notifier bindings are audit-visible.
178
+ - Queue and DLQ backlog are checked by the scheduled Worker via
179
+ `JOB_QUEUE.metrics()` and `JOB_DLQ.metrics()` and emit sanitized
180
+ account-scoped `queue.backlog_messages` / `queue.dlq_messages` operator
181
+ alerts. Tune `VC_TOOLS_QUEUE_BACKLOG_SOFT_CAP`,
182
+ `VC_TOOLS_QUEUE_BACKLOG_HARD_CAP`, `VC_TOOLS_DLQ_MESSAGES_SOFT_CAP`, and
183
+ `VC_TOOLS_DLQ_MESSAGES_HARD_CAP` only as platform-level thresholds; do not
184
+ fan out per-user quota/usage alerts.
185
+ - Account-wide active artifact storage is checked by summing active,
186
+ non-expired artifact bytes in D1 during the scheduled Worker pass and emits a
187
+ sanitized account-scoped `artifact.storage_gb` operator alert. Tune
188
+ `VC_TOOLS_ARTIFACT_STORAGE_ACCOUNT_SOFT_GB` and
189
+ `VC_TOOLS_ARTIFACT_STORAGE_ACCOUNT_HARD_GB` as platform-level thresholds,
190
+ separate from the customer plan allotment SSOT.
191
+ - Expired-artifact cleanup failures emit the account-scoped
192
+ `E-VIBECODR-VC-TOOLS-RETENTION-CLEANUP-FAILED` /
193
+ `retention.cleanup_failed` operator alert. Keep this code in the parent
194
+ internal-api `ALERT_CODES` allowlist alongside
195
+ `E-VIBECODR-VC-TOOLS-SOFT-CAP`; internal-api filters all user-scoped
196
+ `source=vc-tools` payloads before email/ntfy fanout.
197
+ - Browser Run and Sandbox execution failure/timeout rates are checked from
198
+ recent terminal job rows during the scheduled Worker pass and emit the
199
+ account-scoped `E-VIBECODR-VC-TOOLS-EXECUTION-HEALTH-DEGRADED` alert with
200
+ `browser.failure_rate`, `browser.timeout_rate`, `sandbox.failure_rate`, or
201
+ `sandbox.timeout_rate`. Tune
202
+ `VC_TOOLS_EXECUTION_HEALTH_WINDOW_MINUTES`,
203
+ `VC_TOOLS_EXECUTION_HEALTH_MIN_TERMINAL_JOBS`,
204
+ `VC_TOOLS_FAILURE_RATE_ALERT_PERCENT`, and
205
+ `VC_TOOLS_TIMEOUT_RATE_ALERT_PERCENT` as platform-level thresholds.
206
+ - Unexpected hosted Worker HTTP 500s emit the account-scoped
207
+ `E-VIBECODR-VC-TOOLS-HOSTED-WORKER-5XX` /
208
+ `hosted.worker_5xx` operator alert through the same fanout path. Keep this
209
+ code in parent internal-api `ALERT_CODES`; payloads must stay sanitized to
210
+ method, path pattern, status, and redacted error text only.
211
+ - Hosted API/MCP auth failures write anonymous `auth.failed` audit rows. The
212
+ scheduled Worker aggregates them and emits the account-scoped
213
+ `E-VIBECODR-VC-TOOLS-AUTH-FAILURE-ANOMALY` /
214
+ `auth.failure_anomaly` operator alert when
215
+ `VC_TOOLS_AUTH_FAILURE_ALERT_THRESHOLD` is crossed inside
216
+ `VC_TOOLS_AUTH_FAILURE_WINDOW_MINUTES`. Keep this code in parent internal-api
217
+ `ALERT_CODES`; payloads must stay token/query/body/actor-free.
218
+ - Cloudflare spend anomaly checks are internal account-level early warnings,
219
+ not user notifications and not invoice-backed billing truth. The scheduled
220
+ Worker estimates current-month raw cost from vc-tools COGS meters and
221
+ env-configured assumptions, then emits the account-scoped
222
+ `E-VIBECODR-VC-TOOLS-CLOUDFLARE-SPEND-ANOMALY` /
223
+ `cloudflare.estimated_spend_usd` alert when
224
+ `VC_TOOLS_CLOUDFLARE_SPEND_SOFT_USD` is crossed. Keep this code in parent
225
+ internal-api `ALERT_CODES`, tune
226
+ `VC_TOOLS_CLOUDFLARE_SPEND_SOFT_USD` and
227
+ `VC_TOOLS_CLOUDFLARE_SPEND_HARD_USD` only as platform thresholds, and compare
228
+ any alert with Cloudflare Billable Usage / Budget Alerts before raising
229
+ capacity or changing pricing.
230
+ - Unsafe URL and quota denials write analytics-only D1 audit metrics as
231
+ `tools.denied_unsafe_url` and `tools.denied_quota`. These are intentionally
232
+ per-actor COGS/ops signals and must not be promoted into email/ntfy fanout.
233
+ - `/dashboard/cogs` renders internal-only cost pressure by actor, plan, surface,
234
+ warning threshold, and env-configured cost assumptions.
231
235
  - Jobs, artifacts, usage, retention, and audit rows are scoped to the
232
236
  authenticated actor.
233
237
  - All tool calls are logged by the hosted service without secrets before
@@ -242,56 +246,56 @@ Expected hosted guarantees:
242
246
  `queue_delay_seconds=0`, `reserved_browser_seconds=120`, D1 audit event
243
247
  `tools.workflow_started`, and R2 artifact
244
248
  `art_466de507-1432-41eb-9253-c9f79aac8148` downloaded through
245
- `vc-tools proof save`.
249
+ `vibecodr proof save`.
246
250
  - Scheduled QA create/list/update/delete works for a paid actor; explicit
247
251
  `--run-now` create/resume enqueues immediately, and due configs are enqueued
248
252
  by the Worker cron into the same D1 jobs and Queue path as manual Browser
249
253
  Quick Actions, with run/readback evidence and no cookies, credentials, or
250
- private targets accepted. Monthly cap denial leaves `lastJobId=null` and a
251
- skipped run row with `quota.scheduled_qa_monthly_runs_exceeded`. Natural
252
- cron-tick readback should be captured at a real deployed trigger time because
253
- Cloudflare's fire-now cron route is local Wrangler-dev-only.
254
- - Creator browser agent tasks complete through the `BROWSER` Browser Session
255
- binding at up to 20 minutes; Pro browser agent tasks complete through the
256
- same binding at up to 1 hour. Both close in `finally`, record closure
257
- metadata/audit, and produce R2 artifacts.
258
- - Browser crawl jobs complete through Browser Run `/crawl`, produce R2 crawl
259
- artifacts, and write crawl-page usage.
260
- - Browser jobs reject unsafe initial URLs, DNS records without A/AAAA answers,
261
- unsafe redirects/subrequests, and unsafe final URLs.
262
- - Creator sandbox jobs complete through Sandbox SDK `standard-1`; Pro sandbox
263
- jobs complete through the `ProSandbox` `standard-2` lane; Creator is capped
264
- at 10 minutes, Pro at 30 minutes, both paid plans cap active sandbox tasks at
265
- 2 per user, and both produce R2 artifacts.
266
- - Queue failures are bounded by the `vc-tools-jobs` consumer config:
267
- `max_batch_size=1`, `max_retries=3`, and
268
- `dead_letter_queue="vc-tools-jobs-dlq"`. A failed job message may rethrow only
269
- inside that retry window so Cloudflare can move it to the DLQ; retry
270
- deliveries of an already-failed job must not re-run Browser, Sandbox, R2, or
271
- other cost-bearing provider work.
272
- - DLQ replay is operator-controlled, not automatic. Before replaying a message
273
- from `vc-tools-jobs-dlq`, fix the root cause, inspect and redact the message
274
- body, correlate the job id and actor id against D1 `jobs` and `audit_events`,
275
- confirm the payload is still a valid `ToolJobMessage`, and re-send only the
276
- intended message body into `vc-tools-jobs` with a fresh audit note. Do not
277
- attach a broad automatic DLQ consumer or replay unknown payloads.
278
- - `/v1/usage` reflects browser and sandbox job usage after the smoke.
279
- - Sandbox network remains disabled unless a grant and explicit request allow it.
280
- - Browser recordings remain off by default.
281
- - Authenticated browsing is not available to Creator or ordinary users by default.
282
-
283
- ## Publish Readiness
284
-
285
- - `npm pack --dry-run` shows only intended package files.
286
- - The public npm artifact contains only `dist`, `README.md`, `LICENSE`, and
287
- `package.json`; repository-maintainer docs, hosted Worker source, migrations,
288
- deployment config, tests, and scripts stay out of the package.
289
- - Runtime `dependencies` contain only CLI-installed dependencies. Cloudflare
290
- platform primitive packages stay in repository development dependencies for
291
- hosted Worker verification and deployment.
292
- - No token-like string appears in `dist`, docs, test fixtures, or package
293
- metadata.
294
- - `docs/API-CONTRACT.md` matches the hosted service route contract.
295
- - `docs/VALIDATION-MATRIX.md` maps every goal-file command and safety gate to
296
- implementation evidence.
297
- - Release notes mention any hosted-service dependency that is degraded or paused.
254
+ private targets accepted. Monthly cap denial leaves `lastJobId=null` and a
255
+ skipped run row with `quota.scheduled_qa_monthly_runs_exceeded`. Natural
256
+ cron-tick readback should be captured at a real deployed trigger time because
257
+ Cloudflare's fire-now cron route is local Wrangler-dev-only.
258
+ - Creator browser agent tasks complete through the `BROWSER` Browser Session
259
+ binding at up to 20 minutes; Pro browser agent tasks complete through the
260
+ same binding at up to 1 hour. Both close in `finally`, record closure
261
+ metadata/audit, and produce R2 artifacts.
262
+ - Browser crawl jobs complete through Browser Run `/crawl`, produce R2 crawl
263
+ artifacts, and write crawl-page usage.
264
+ - Browser jobs reject unsafe initial URLs, DNS records without A/AAAA answers,
265
+ unsafe redirects/subrequests, and unsafe final URLs.
266
+ - Creator sandbox jobs complete through Sandbox SDK `standard-1`; Pro sandbox
267
+ jobs complete through the `ProSandbox` `standard-2` lane; Creator is capped
268
+ at 10 minutes, Pro at 30 minutes, both paid plans cap active sandbox tasks at
269
+ 2 per user, and both produce R2 artifacts.
270
+ - Queue failures are bounded by the `vc-tools-jobs` consumer config:
271
+ `max_batch_size=1`, `max_retries=3`, and
272
+ `dead_letter_queue="vc-tools-jobs-dlq"`. A failed job message may rethrow only
273
+ inside that retry window so Cloudflare can move it to the DLQ; retry
274
+ deliveries of an already-failed job must not re-run Browser, Sandbox, R2, or
275
+ other cost-bearing provider work.
276
+ - DLQ replay is operator-controlled, not automatic. Before replaying a message
277
+ from `vc-tools-jobs-dlq`, fix the root cause, inspect and redact the message
278
+ body, correlate the job id and actor id against D1 `jobs` and `audit_events`,
279
+ confirm the payload is still a valid `ToolJobMessage`, and re-send only the
280
+ intended message body into `vc-tools-jobs` with a fresh audit note. Do not
281
+ attach a broad automatic DLQ consumer or replay unknown payloads.
282
+ - `/v1/usage` reflects browser and sandbox job usage after the smoke.
283
+ - Sandbox network remains disabled unless a grant and explicit request allow it.
284
+ - Browser recordings remain off by default.
285
+ - Authenticated browsing is not available to Creator or ordinary users by default.
286
+
287
+ ## Publish Readiness
288
+
289
+ - `npm pack --dry-run` shows only intended package files.
290
+ - The public npm artifact contains only `dist`, `README.md`, `LICENSE`, and
291
+ `package.json`; repository-maintainer docs, hosted Worker source, migrations,
292
+ deployment config, tests, and scripts stay out of the package.
293
+ - Runtime `dependencies` contain only CLI-installed dependencies. Cloudflare
294
+ platform primitive packages stay in repository development dependencies for
295
+ hosted Worker verification and deployment.
296
+ - No token-like string appears in `dist`, docs, test fixtures, or package
297
+ metadata.
298
+ - `docs/API-CONTRACT.md` matches the hosted service route contract.
299
+ - `docs/VALIDATION-MATRIX.md` maps every goal-file command and safety gate to
300
+ implementation evidence.
301
+ - Release notes mention any hosted-service dependency that is degraded or paused.