@vibecodr/cli 1.0.5 → 1.0.7

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