@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
package/docs/SECURITY.md CHANGED
@@ -1,21 +1,25 @@
1
- # vc-tools Security Notes
2
-
3
- `vc-tools` is a trust-boundary CLI. It validates local input before submitting
4
- requests to the hosted Vibecodr Tools API, but the hosted API remains the source
5
- of truth for auth, grants, quota, audit logging, retention, and Cloudflare
6
- credential custody.
7
-
8
- ## Local Rules
9
-
10
- - Plain `vc-tools login` is the default human path. It starts a browser/device
11
- approval session, prints a user-checkable code, optionally opens the Vibecodr
12
- approval page, and stores the durable credential returned to the polling CLI
13
- when the parent API issues one. The browser approval response must never
14
- include the signed grant, API key, OAuth token, refresh token, or private
15
- device code.
1
+ # Vibecodr CLI Security Notes
2
+
3
+ The Vibecodr CLI is a trust-boundary tool. It validates local input before
4
+ submitting requests to the hosted Vibecodr API, but the hosted API remains the
5
+ source of truth for auth, grants, quota, audit logging, retention, and
6
+ Cloudflare credential custody.
7
+
8
+ ## Local Rules
9
+
10
+ - Plain `vibecodr login` is the default MCP Gateway OAuth path. It stores only
11
+ the CLI profile's MCP OAuth session under the historical `@vibecodr/mcp`
12
+ service; it does not log editor clients into MCP and does not create an Agent
13
+ Computer credential.
14
+ - `vibecodr login agent` and `vibecodr start` are the hosted Agent Computer
15
+ human paths. They start a browser/device approval session, print a
16
+ user-checkable code, optionally open the Vibecodr approval page, and store the
17
+ durable credential returned to the polling CLI when the parent API issues one.
18
+ The browser approval response must never include the signed grant, API key,
19
+ OAuth token, refresh token, or private device code.
16
20
  - Non-interactive credentials are preferably accepted through
17
21
  `--credential-file`, `--credential-stdin`, `VC_TOOLS_CREDENTIAL_FILE`, or
18
- local credentials. The input may be an existing vc-tools grant, a Clerk OAuth
22
+ local credentials. The input may be an existing Vibecodr grant, a Clerk OAuth
19
23
  access token, or a scoped Clerk API key.
20
24
  - Clerk OAuth access tokens and scoped Clerk API keys are exchanged through
21
25
  Vibecodr Auth for short-lived scoped `vc-tools` grants. When supplied through
@@ -27,66 +31,66 @@ credential custody.
27
31
  file/stdin/native credential paths to avoid shell-history, process-list, and
28
32
  environment leakage.
29
33
  - The local auth SSOT is account-wide: one durable local credential plus a
30
- cached short-lived grant. Direct vc-tools grants can still be cached, but they
34
+ cached short-lived grant. Direct Vibecodr grants can still be cached, but they
31
35
  are not refreshable and should be treated as advanced/temporary credentials.
32
36
  - Stored credentials use the native OS credential store by default through
33
37
  `@napi-rs/keyring`. The file-backed credential store is only for local
34
38
  automation and must be explicitly selected with `VC_TOOLS_CREDENTIAL_STORE=file`.
35
- - Authority-bearing tokens are redacted from stdout, stderr, JSON responses,
36
- warnings, hosted provider error details, and API error details. Safe operator
37
- handles and counters such as `artifactId`, `jobId`, `requestId`, `traceId`,
38
- `tokenCount`, `totalTokens`, and `tokenKind` remain visible so operators can
39
- debug without seeing reusable authority.
40
- - API URLs must use HTTPS. Local HTTP API URLs are denied unless the operator
41
- explicitly passes `--allow-insecure-local-api` or sets
39
+ - Authority-bearing tokens are redacted from stdout, stderr, JSON responses,
40
+ warnings, hosted provider error details, and API error details. Safe operator
41
+ handles and counters such as `artifactId`, `jobId`, `requestId`, `traceId`,
42
+ `tokenCount`, `totalTokens`, and `tokenKind` remain visible so operators can
43
+ debug without seeing reusable authority.
44
+ - API URLs must use HTTPS. Local HTTP API URLs are denied unless the operator
45
+ explicitly passes `--allow-insecure-local-api` or sets
42
46
  `VC_TOOLS_ALLOW_INSECURE_LOCAL_API=true` for local development. This prevents a
43
47
  poisoned local config or environment variable from receiving a stored token.
44
- - Browser URLs must use HTTPS and must not target localhost, private IP ranges,
45
- link-local ranges, multicast/unspecified ranges, internal hostnames, or URL
46
- credentials. IPv6 loopback, unique-local, link-local, IPv4-mapped, NAT64, and
47
- 6to4 forms are denied before remote browser calls.
48
- - Sandbox commands are remote submissions only. The CLI never executes them
49
- locally.
48
+ - Browser URLs must use HTTPS and must not target localhost, private IP ranges,
49
+ link-local ranges, multicast/unspecified ranges, internal hostnames, or URL
50
+ credentials. IPv6 loopback, unique-local, link-local, IPv4-mapped, NAT64, and
51
+ 6to4 forms are denied before remote browser calls.
52
+ - Sandbox commands are remote submissions only. The CLI never executes them
53
+ locally.
50
54
  - Paid sandbox network access permits public HTTP(S) package/docs requests by
51
55
  default. Cloudflare host policy plus the hosted outbound handler block URL
52
56
  credentials, private/local/link-local/metadata/internal hosts, and hostnames
53
57
  resolving to those ranges.
54
- - Mutations require explicit confirmation flags.
55
- - `--quiet`, `--no-input`, and `--no-color` are accepted CLI convention flags;
56
- the CLI does not prompt or emit color by default.
57
- - Artifact downloads must stay inside the current workspace unless a future
58
- release adds an explicitly audited export mode. Users may target a directory
59
- or an explicit file path inside the workspace, and `--filename` names the file
60
- inside a directory output without weakening the workspace boundary.
61
- - Artifact downloads resolve existing output paths and nearest existing parents
62
- through real paths so symlinked or junctioned directories cannot redirect a
63
- pull outside the workspace.
64
- - Artifact uploads must also originate inside the current workspace.
65
- - Artifact upload size is enforced by the hosted service from the active plan
66
- contract, not by a separate CLI hardcode.
67
-
68
- ## Hosted Service Rules
69
-
70
- The API must enforce these before any cost-bearing Cloudflare work:
71
-
72
- - user authentication
73
- - browser/device vc-tools login sessions in the parent Vibecodr API, stored as
74
- hashed device and user codes, single-use on redemption, and expired quickly
58
+ - Mutations require explicit confirmation flags.
59
+ - `--quiet`, `--no-input`, and `--no-color` are accepted CLI convention flags;
60
+ the CLI does not prompt or emit color by default.
61
+ - Artifact downloads must stay inside the current workspace unless a future
62
+ release adds an explicitly audited export mode. Users may target a directory
63
+ or an explicit file path inside the workspace, and `--filename` names the file
64
+ inside a directory output without weakening the workspace boundary.
65
+ - Artifact downloads resolve existing output paths and nearest existing parents
66
+ through real paths so symlinked or junctioned directories cannot redirect a
67
+ pull outside the workspace.
68
+ - Artifact uploads must also originate inside the current workspace.
69
+ - Artifact upload size is enforced by the hosted service from the active plan
70
+ contract, not by a separate CLI hardcode.
71
+
72
+ ## Hosted Service Rules
73
+
74
+ The API must enforce these before any cost-bearing Cloudflare work:
75
+
76
+ - user authentication
77
+ - browser/device Vibecodr login sessions in the parent Vibecodr API, stored as
78
+ hashed device and user codes, single-use on redemption, and expired quickly
75
79
  - Clerk OAuth/API-key verification in the parent Vibecodr Auth API before any
76
80
  public user receives a `vc-tools` grant
77
- - scoped Vibecodr CLI grants with `vc-tools:use` plus a requested tool scope
78
- such as `vc-tools:browser.render_url` or `vc-tools:*`, or an explicitly
79
- configured static-token fallback for controlled deployments
80
- - vc-tools grant audience validation. Hosted Tools accepts only grants intended
81
- for `vibecodr:vc-tools`, not broader Vibecodr CLI/API tokens.
82
- - actor-scoped job, artifact, usage, retention, and audit rows
83
- - authenticated hosted inspection and dashboard routes
84
- - workspace/project/user grant checks
85
- - plan entitlement checks
86
- - quota/spend checks
87
- - abuse/rate-limit checks
88
- - audit-log emission
89
- - retention policy classification
81
+ - scoped Vibecodr CLI grants with `vc-tools:use` plus a requested tool scope
82
+ such as `vc-tools:browser.render_url` or `vc-tools:*`, or an explicitly
83
+ configured static-token fallback for controlled deployments
84
+ - Grant audience validation. The hosted Vibecodr API accepts only grants
85
+ intended for `vibecodr:vc-tools`, not broader Vibecodr CLI/API tokens.
86
+ - actor-scoped job, artifact, usage, retention, and audit rows
87
+ - authenticated hosted inspection and dashboard routes
88
+ - workspace/project/user grant checks
89
+ - plan entitlement checks
90
+ - quota/spend checks
91
+ - abuse/rate-limit checks
92
+ - audit-log emission
93
+ - retention policy classification
90
94
  - Browser Run policy: initial URL, DNS address records, and bounded redirect
91
95
  chains must remain public HTTPS targets before cost-bearing dispatch and
92
96
  before the hosted Quick Action or Workflow-owned paid Browser Session request
@@ -94,19 +98,19 @@ The API must enforce these before any cost-bearing Cloudflare work:
94
98
  and 1 hour on Pro, closes after 10 minutes without meaningful action/artifact
95
99
  progress, and closes the browser in `finally` after storing a bounded artifact
96
100
  plus closure metadata in the job result and audit stream
97
- - Browser mode policy: public-web browsing is broad by default for public HTTPS
98
- targets, while authenticated third-party sessions, private networks,
99
- Vibecodr-owned infrastructure, and provider credentials remain isolated unless
100
- a future explicit grant opens a narrow lane
101
- - Browser auth boundary: hosted browser calls reject cookies, credentials,
102
- authorization headers, custom auth headers, storage state, sessions, or
103
- secrets before provider execution
104
- - Browser Run crawl policy: bounded public crawls use the same URL/DNS guards,
105
- plan page/depth caps, hosted artifact retention, and usage metering as other
106
- browser tools
107
- - Browser Run provider-pressure policy: provider 429 responses return queued
108
- jobs to a retry/defer state instead of exposing provider secrets or marking
109
- the job failed on first rate-limit pressure
101
+ - Browser mode policy: public-web browsing is broad by default for public HTTPS
102
+ targets, while authenticated third-party sessions, private networks,
103
+ Vibecodr-owned infrastructure, and provider credentials remain isolated unless
104
+ a future explicit grant opens a narrow lane
105
+ - Browser auth boundary: hosted browser calls reject cookies, credentials,
106
+ authorization headers, custom auth headers, storage state, sessions, or
107
+ secrets before provider execution
108
+ - Browser Run crawl policy: bounded public crawls use the same URL/DNS guards,
109
+ plan page/depth caps, hosted artifact retention, and usage metering as other
110
+ browser tools
111
+ - Browser Run provider-pressure policy: provider 429 responses return queued
112
+ jobs to a retry/defer state instead of exposing provider secrets or marking
113
+ the job failed on first rate-limit pressure
110
114
  - Hosted capacity policy: Queue consumer concurrency, Workflow-owned Browser
111
115
  Agent execution, Browser Run account caps, Sandbox account caps, and Sandbox
112
116
  container `max_instances` are aligned to a 30-active-job launch ceiling so
@@ -115,9 +119,9 @@ The API must enforce these before any cost-bearing Cloudflare work:
115
119
  caps and Pro sandbox jobs route to `standard-2` containers with 30-minute task
116
120
  caps instead of the `lite` lane; both paid plans cap active sandbox tasks at 2
117
121
  per user
118
- - Sandbox quota policy: monthly sandbox seconds are reserved atomically before
119
- queue insertion and reconciled when sandbox jobs are cancelled or reach a
120
- terminal state
122
+ - Sandbox quota policy: monthly sandbox seconds are reserved atomically before
123
+ queue insertion and reconciled when sandbox jobs are cancelled or reach a
124
+ terminal state
121
125
  - Sandbox egress policy: paid Agent Computer jobs can use public HTTP(S) egress
122
126
  for package installs and public docs. Private/local/link-local/metadata/
123
127
  internal CIDRs and host suffixes are denied by Cloudflare Sandbox host policy,
@@ -133,95 +137,95 @@ The API must enforce these before any cost-bearing Cloudflare work:
133
137
  queued-ahead counts without leaking payloads or adding a universal delay to
134
138
  interactive tools. Scheduled QA may still use bounded Cloudflare Queue
135
139
  per-message delays to spread due runs.
136
- - Queue completion policy: the consumer rechecks current D1 job state after
137
- execution and cannot mark a job completed if cancellation was requested while
138
- it was running
139
- - Retention policy: artifact retention is capped by the active plan, expired
140
- artifacts are hidden from list/get/download paths, and a scheduled cleanup
141
- removes expired R2 objects plus D1 metadata
142
- - Artifact storage policy: uploaded and generated artifacts are checked against
143
- active actor storage before writes, D1 metadata insertion repeats the storage
144
- predicate, and newly written R2 bytes are deleted if that metadata reservation
145
- fails
146
- - Artifact deletion is actor-scoped and explicit: the hosted Worker deletes the
147
- R2 object and D1 shelf row for the authenticated actor, and CLI deletion
148
- requires `--yes`
149
-
150
- The CLI's validation is a usability and early-safety layer. It is not a
151
- replacement for hosted enforcement.
152
-
153
- ## Open-Source Client Boundary
154
-
155
- The public `@vibecodr/vc-tools` package is a client/control-plane helper, not
156
- the quota or billing authority. Users can fork or edit the local CLI, local
157
- fallback plan constants, local help text, and local development API targets, but
158
- those edits do not change the official hosted service.
159
-
160
- Authoritative state remains hosted:
161
-
140
+ - Queue completion policy: the consumer rechecks current D1 job state after
141
+ execution and cannot mark a job completed if cancellation was requested while
142
+ it was running
143
+ - Retention policy: artifact retention is capped by the active plan, expired
144
+ artifacts are hidden from list/get/download paths, and a scheduled cleanup
145
+ removes expired R2 objects plus D1 metadata
146
+ - Artifact storage policy: uploaded and generated artifacts are checked against
147
+ active actor storage before writes, D1 metadata insertion repeats the storage
148
+ predicate, and newly written R2 bytes are deleted if that metadata reservation
149
+ fails
150
+ - Artifact deletion is actor-scoped and explicit: the hosted Worker deletes the
151
+ R2 object and D1 shelf row for the authenticated actor, and CLI deletion
152
+ requires `--yes`
153
+
154
+ The CLI's validation is a usability and early-safety layer. It is not a
155
+ replacement for hosted enforcement.
156
+
157
+ ## Open-Source Client Boundary
158
+
159
+ The public `@vibecodr/cli` package is a client/control-plane helper, not the
160
+ quota or billing authority. Users can fork or edit the local CLI, local
161
+ fallback plan constants, local help text, and local development API targets, but
162
+ those edits do not change the official hosted service.
163
+
164
+ Authoritative state remains hosted:
165
+
162
166
  - Vibecodr Auth verifies Clerk OAuth/API-key inputs passed through the generic
163
167
  credential path and issues scoped `vc-tools` grants.
164
- - The hosted Tools API resolves the authenticated actor, plan, grants, and
165
- server-side limits.
168
+ - The hosted Vibecodr API resolves the authenticated actor, plan, grants, and
169
+ server-side limits.
166
170
  - `/v1/usage` and the `usage.read` MCP tool expose read-only hosted account
167
171
  state. In live mode the response is marked authoritative and
168
172
  `mutableByClient: false`. User-facing usage and readiness responses stay
169
173
  account-scoped: operator alert configuration, internal binding presence,
170
174
  provider account caps, hosted account pressure, ntfy/webhook topics, and raw
171
175
  actor ids belong only on operator-scoped endpoints.
172
- - `/v1/plans` and local fallback plan constants are packaging/reference data.
173
- They are not authoritative for an actor's entitlement, usage, billing, quota,
174
- or provider execution.
175
- - Cost-bearing Browser Run and Sandbox work is accepted only after hosted auth,
176
- grant, plan, quota, audit, and reservation checks.
177
-
178
- If a user points `VC_TOOLS_API_URL` or `--api-url` at a forked service, that
179
- service can return different local display data. It is not Vibecodr Tools Cloud
180
- authority and cannot spend Vibecodr provider credentials or mutate official D1,
181
- R2, Queue, billing, grant, or usage state.
182
-
183
- ## Remaining Hosted Proofs
184
-
185
- Local validation verifies the shipped control surface and contract behavior. A
186
- live production release must still produce fresh smoke evidence for:
187
-
188
- - deployed Worker secrets and routes
189
- - D1 migrations, including actor-scope columns
190
- - real Browser Run Quick Action execution with SSRF guards and metered-time
191
- usage active
192
- - real Browser Run crawl execution with R2 artifact readback and crawl-page
193
- usage active
176
+ - `/v1/plans` and local fallback plan constants are packaging/reference data.
177
+ They are not authoritative for an actor's entitlement, usage, billing, quota,
178
+ or provider execution.
179
+ - Cost-bearing Browser Run and Sandbox work is accepted only after hosted auth,
180
+ grant, plan, quota, audit, and reservation checks.
181
+
182
+ If a user points `VC_TOOLS_API_URL` or `--api-url` at a forked service, that
183
+ service can return different local display data. It is not the hosted Vibecodr
184
+ authority and cannot spend Vibecodr provider credentials or mutate official D1,
185
+ R2, Queue, billing, grant, or usage state.
186
+
187
+ ## Remaining Hosted Proofs
188
+
189
+ Local validation verifies the shipped control surface and contract behavior. A
190
+ live production release must still produce fresh smoke evidence for:
191
+
192
+ - deployed Worker secrets and routes
193
+ - D1 migrations, including actor-scope columns
194
+ - real Browser Run Quick Action execution with SSRF guards and metered-time
195
+ usage active
196
+ - real Browser Run crawl execution with R2 artifact readback and crawl-page
197
+ usage active
194
198
  - real Sandbox execution with public HTTP(S) egress and private/internal denial
195
- - real Pro `standard-2` Sandbox execution after the split lane is deployed
196
- - R2 artifact download scoped to the authenticated actor
197
- - usage/quota counters scoped to the authenticated actor
199
+ - real Pro `standard-2` Sandbox execution after the split lane is deployed
200
+ - R2 artifact download scoped to the authenticated actor
201
+ - usage/quota counters scoped to the authenticated actor
198
202
  - audit rows written before cost-bearing Queue/Workflow dispatch
199
-
200
- ## Secret Handling
201
-
202
- Do not add debug flags that print raw request headers, environment variables,
203
- stored credentials, Cloudflare tokens, OAuth tokens, or hosted API responses
204
- without redaction.
205
-
206
- Clerk server secrets and the ES256 `CLI_GRANT_PRIVATE_JWK` belong only in the
207
- parent Vibecodr API Worker secrets. The hosted Worker receives only
208
- `VC_TOOLS_CLI_GRANT_PUBLIC_JWKS` for normal vc-tools grants, plus
209
- `VC_TOOLS_TOKEN_SHA256`, `VC_TOOLS_INTERNAL_ALERT_TOKEN`, optional operator
210
- alert webhook/ntfy secrets, and Cloudflare provider credentials as hosted
211
- Worker secrets. Legacy HMAC grant secrets are beta/internal-only, require
212
- the explicit `*_LEGACY_HMAC_ENABLED="true"` switches on both parent and hosted
213
- surfaces, and should be removed by 2026-06-30 after live ES256 smoke and
214
- migration. None of those values belong in source, Wrangler plaintext vars, docs,
215
- tests, or package artifacts. Soft-cap operator alerts are account-wide capacity
216
- signals only and must remain metadata-only: surface, capability, plan name,
217
- current usage, included limit, percent used, and suggested action are allowed;
218
- raw commands, target URLs, bearer tokens, provider API tokens, actor
219
- identifiers, artifact contents, and user cookies are not. Per-user usage and
220
- quota pressure stays in usage/COGS/audit analytics without outbound operator
221
- notification fanout. D1 alert dedupe/reset-window rows may store capacity
222
- metadata details and suppression counts, but not user payload contents.
223
-
224
- The public npm artifact is a CLI/client package. Hosted Worker source,
225
- migrations, deployment configuration, repository-maintainer docs, and
226
- Cloudflare platform primitive packages must not be shipped as public CLI
227
- runtime surface.
203
+
204
+ ## Secret Handling
205
+
206
+ Do not add debug flags that print raw request headers, environment variables,
207
+ stored credentials, Cloudflare tokens, OAuth tokens, or hosted API responses
208
+ without redaction.
209
+
210
+ Clerk server secrets and the ES256 `CLI_GRANT_PRIVATE_JWK` belong only in the
211
+ parent Vibecodr API Worker secrets. The hosted Worker receives only
212
+ `VC_TOOLS_CLI_GRANT_PUBLIC_JWKS` for normal Vibecodr grants, plus
213
+ `VC_TOOLS_TOKEN_SHA256`, `VC_TOOLS_INTERNAL_ALERT_TOKEN`, optional operator
214
+ alert webhook/ntfy secrets, and Cloudflare provider credentials as hosted
215
+ Worker secrets. Legacy HMAC grant secrets are beta/internal-only, require
216
+ the explicit `*_LEGACY_HMAC_ENABLED="true"` switches on both parent and hosted
217
+ surfaces, and should be removed by 2026-06-30 after live ES256 smoke and
218
+ migration. None of those values belong in source, Wrangler plaintext vars, docs,
219
+ tests, or package artifacts. Soft-cap operator alerts are account-wide capacity
220
+ signals only and must remain metadata-only: surface, capability, plan name,
221
+ current usage, included limit, percent used, and suggested action are allowed;
222
+ raw commands, target URLs, bearer tokens, provider API tokens, actor
223
+ identifiers, artifact contents, and user cookies are not. Per-user usage and
224
+ quota pressure stays in usage/COGS/audit analytics without outbound operator
225
+ notification fanout. D1 alert dedupe/reset-window rows may store capacity
226
+ metadata details and suppression counts, but not user payload contents.
227
+
228
+ The public npm artifact is a CLI/client package. Hosted Worker source,
229
+ migrations, deployment configuration, repository-maintainer docs, and
230
+ Cloudflare platform primitive packages must not be shipped as public CLI
231
+ runtime surface.
@@ -1,28 +1,28 @@
1
- # vc-tools Validation Matrix
2
-
3
- This file maps `goal.md` and the `vc-tools-goal.md` product requirements to concrete CLI
4
- artifacts and tests.
5
-
6
- | Goal requirement | CLI artifact | Validation |
7
- | --- | --- | --- |
8
- | Separate tool from Vibecodr CLI | package `@vibecodr/vc-tools`, bin `vc-tools`, `VC_TOOLS_*` env namespace | `test/cli.behavior.test.ts` verifies help/version identity |
1
+ # Vibecodr CLI Validation Matrix
2
+
3
+ This file maps `goal.md` and the `vc-tools-goal.md` product requirements to concrete CLI
4
+ artifacts and tests.
5
+
6
+ | Goal requirement | CLI artifact | Validation |
7
+ | --- | --- | --- |
8
+ | Unified Vibecodr CLI surface | package `@vibecodr/cli`, canonical bin `vibecodr` with back-compat `vibecodr-mcp` and `vc-tools` bins, `VC_TOOLS_*` env namespace preserved for back-compat | `test/cli.behavior.test.ts` verifies help/version identity |
9
9
  | CLI Guidelines compliance | `src/cli/parser.ts`, `src/cli/run.ts`, `src/cli/output.ts`, `docs/CLI-GUIDELINES-AUDIT.md` | tests verify command-specific help, docs/support links, typo suggestions, stable JSON, product-safe default output, quiet mode, agent-computer primary nouns, and secure credential file/stdin sources |
10
- | Agent Computer first-use path | `vc-tools start`, `vc-tools setup`, `vc-tools try`, `vc-tools agent connect/status`, `vc-tools computer status` | tests verify `start` checks account identity, hosted health, MCP connection metadata, usage state, safe readiness output, and agent-native connection details without exposing tokens; `try` proves auth, hosted API, browser, computer, proof saving, and usage readback |
11
- | CLI login and auth diagnostics | `vc-tools login`, `vc-tools auth status`, `vc-tools auth diagnose`, `vc-tools auth export-agent-env`, safe generic credential file/stdin forms | tests verify browser/device auth starts when no credential is provided, `start` recovers from unreadable stored approval state by opening the normal browser login path, cost-bearing browser commands treat unreadable stored approval as missing auth instead of failing on credential storage shape, the private device code is never printed or stored, approval metadata points to `/settings/vc-tools/approve`, `--no-input` refuses interactive login without network calls, direct token grant caching, generic credential classification for Clerk OAuth/API-key exchange through Vibecodr Auth, durable API-key/OAuth local storage, expired grant refresh from stored API keys, file/stdin credential paths, one-off env credential auth without persistence, status reporting for active credential sources without exposing internal profiles, ambiguous credential denial, redaction, optional API verification, explicit file-store test mode, friendly expired-login errors, isolated config warnings, strict-permission agent credential-file export without printing the secret, and no stored-token forwarding to insecure local API URLs unless explicitly allowed |
12
- | Remote agent connection setup | `vc-tools agent connect`, advanced `vc-tools connect` | tests verify Streamable HTTP metadata, agent-native tool names, and no token leakage |
10
+ | Agent Computer first-use path | `vibecodr start`, `vibecodr setup`, `vibecodr try`, `vibecodr agent connect/status`, `vibecodr computer status` | tests verify `start` checks account identity, hosted health, MCP connection metadata, usage state, safe readiness output, and agent-native connection details without exposing tokens; `try` proves auth, hosted API, browser, computer, proof saving, and usage readback |
11
+ | CLI login and auth diagnostics | `vibecodr login`, `vibecodr auth status`, `vibecodr auth diagnose`, `vibecodr auth export-agent-env`, safe generic credential file/stdin forms | tests verify browser/device auth starts when no credential is provided, `start` recovers from unreadable stored approval state by opening the normal browser login path, cost-bearing browser commands treat unreadable stored approval as missing auth instead of failing on credential storage shape, the private device code is never printed or stored, approval metadata points to `/settings/vc-tools/approve`, `--no-input` refuses interactive login without network calls, direct token grant caching, generic credential classification for Clerk OAuth/API-key exchange through Vibecodr Auth, durable API-key/OAuth local storage, expired grant refresh from stored API keys, file/stdin credential paths, one-off env credential auth without persistence, status reporting for active credential sources without exposing internal profiles, ambiguous credential denial, redaction, optional API verification, explicit file-store test mode, friendly expired-login errors, isolated config warnings, strict-permission agent credential-file export without printing the secret, and no stored-token forwarding to insecure local API URLs unless explicitly allowed |
12
+ | Remote agent connection setup | `vibecodr agent connect`, advanced `vibecodr connect` | tests verify Streamable HTTP metadata, agent-native tool names, and no token leakage |
13
13
  | Remote MCP tool server | `/mcp` in `src/hosted/worker.ts` | tests verify MCP `initialize`, `tools/list`, and `tools/call` JSON-RPC contract flow with agent-native `browser.*`, `computer.*`, `work.*`, `proof.*`, and `usage.status` tool names mapped to hosted canonical capabilities |
14
- | Browser render/screenshot/markdown/PDF tests, crawl, snapshot, and paid agent tasks | `vc-tools browser *`, advanced `vc-tools tools test browser.*` | tests verify capability aliases including `browser.snapshot`, canonical browser and crawl payloads, default submit/wait behavior, `--out` proof saving without exposed IDs, Creator `browser.agent_task` acceptance up to 20 minutes, Pro acceptance up to 1 hour, Free denial, Quick Actions staying short, HTTPS-only validation, localhost/private/internal denial with safe-next-action messaging, URL credential denial, direct cookie/header/storage-state auth material denial, IPv4/IPv6 private, link-local, mapped, NAT64, and 6to4 denial, hosted unsafe redirect-chain denial before cost-bearing dispatch, and Workflow dispatch for paid browser agent tasks |
15
- | Agent Computer run/tests | `vc-tools computer run/test`, advanced `vc-tools tools test sandbox.*`, hosted Sandbox SDK queue execution | tests verify no local shell execution, bounded command payload, default submit/wait behavior, `--out` proof saving without exposed IDs, public HTTP(S) package/docs egress by default for paid Agent Computer jobs, explicit `--network public`/`--network off` payloads, no private-network opt-in flag, no per-command host allowlist requirement, Cloudflare host policy plus hosted outbound handler denial for private/local/internal destinations and private-resolving DNS, per-command Sandbox SDK timeout forwarding, timeout/fork-storm failure cleanup through sandbox teardown, minimal sandbox env injection, stdout/stderr truncation, sandbox-returned files/output-file paths ignored in favor of one fixed transcript artifact, artifact storage accounting, and sandbox-minute metering |
16
- | Proof store/read/save/delete | `vc-tools proof list/show/save/delete`, advanced `vc-tools artifacts list/get/pull/create/delete` | tests verify metadata shape, bounded list limits, safe filenames, overwrite guard, explicit in-workspace pull file targets, automatic proof saving from browser/computer aliases and `work follow --out`, explicit confirmation before delete, actor-scoped hosted deletion of D1 shelf rows plus R2 bytes, hosted plan-owned upload caps, hard total artifact storage caps, R2 cleanup after D1 reservation races, workspace-bounded upload/download paths, and symlink/junction escape denial |
17
- | Work status/cancel/list | `vc-tools work list/show/follow/cancel`, advanced `vc-tools jobs list/status/cancel` | tests verify list limit propagation, ID validation, alias routing, real follow polling until terminal status, optional terminal proof saving, queued fairness-delay metadata in status output, and `--yes` on cancellation |
18
- | Usage quotas and limits | `vc-tools usage`, `vc-tools limits`, `usage.status`/`usage.read` MCP tools | tests verify stable JSON output, human quota bars, alias routing, warning preservation, and no operator-only alert/account-pressure metadata in user-facing usage payloads |
19
- | Open-source client authority boundary | `vc-tools plans`, `/v1/plans`, `/v1/usage`, `/v1/health`, `/v1/mcp/connection`, `usage.read`, docs/SECURITY.md | tests verify local plan fallback is marked non-authoritative, hosted plan packaging is not actor entitlement authority, usage snapshots are read-only/not client-mutable, default product JSON excludes internal/future/operator/provider/auth metadata, and internal/future launch metadata plus overage-meter details are actor/operator-scoped instead of global while keeping operator readiness on operator-scoped endpoints |
20
- | Account identity | `vc-tools whoami`, `/v1/me` | tests verify the standard whoami command reads hosted identity and prints account-first Agent Computer output plus redacted payload data, and hosted JSON omits synthetic `@vibecodr.local` email fallbacks |
21
- | Tool grants | `vc-tools grants`, `vc-tools grants list` | tests verify default list routing and scoped grant rendering |
22
- | Retention settings | `vc-tools retention show/set` | tests verify day bounds, plan-capped artifact retention, recordings policy, `--yes` on mutation |
23
- | Usage dashboard | `vc-tools dashboard [section]` | tests verify safe dashboard section URL generation without auth leakage and shared API URL validation |
24
- | Plan packaging | `vc-tools plans` | tests verify local fallback plan contract and hosted response handling |
25
- | Free/Creator/Pro plan limits | `DEFAULT_PLANS`, `OVERAGE_METERS` in `src/core/contracts.ts` | `test/limits.test.ts` verifies the exact Free, Creator, and Pro launch matrix: prices, monthly/daily VC Tool credits, browser seconds, Creator 20-minute and Pro 1-hour Browser Session caps, crawl caps, scheduled QA, Creator `standard-1`/10-minute sandbox lane, Pro `standard-2`/30-minute sandbox lane, shared paid 2-active-sandbox cap, per-upload artifact caps, artifact limits, and compatibility meters |
14
+ | Browser render/screenshot/markdown/PDF tests, crawl, snapshot, and paid agent tasks | `vibecodr browser *`, advanced `vibecodr tools test browser.*` | tests verify capability aliases including `browser.snapshot`, canonical browser and crawl payloads, default submit/wait behavior, `--out` proof saving without exposed IDs, Creator `browser.agent_task` acceptance up to 20 minutes, Pro acceptance up to 1 hour, Free denial, Quick Actions staying short, HTTPS-only validation, localhost/private/internal denial with safe-next-action messaging, URL credential denial, direct cookie/header/storage-state auth material denial, IPv4/IPv6 private, link-local, mapped, NAT64, and 6to4 denial, hosted unsafe redirect-chain denial before cost-bearing dispatch, and Workflow dispatch for paid browser agent tasks |
15
+ | Agent Computer run/tests | `vibecodr computer run/test`, advanced `vibecodr tools test sandbox.*`, hosted Sandbox SDK queue execution | tests verify no local shell execution, bounded command payload, default submit/wait behavior, `--out` proof saving without exposed IDs, public HTTP(S) package/docs egress by default for paid Agent Computer jobs, explicit `--network public`/`--network off` payloads, no private-network opt-in flag, no per-command host allowlist requirement, Cloudflare host policy plus hosted outbound handler denial for private/local/internal destinations and private-resolving DNS, per-command Sandbox SDK timeout forwarding, timeout/fork-storm failure cleanup through sandbox teardown, minimal sandbox env injection, stdout/stderr truncation, sandbox-returned files/output-file paths ignored in favor of one fixed transcript artifact, artifact storage accounting, and sandbox-minute metering |
16
+ | Proof store/read/save/delete | `vibecodr proof list/show/save/delete`, advanced `vibecodr artifacts list/get/pull/create/delete` | tests verify metadata shape, bounded list limits, safe filenames, overwrite guard, explicit in-workspace pull file targets, automatic proof saving from browser/computer aliases and `work follow --out`, explicit confirmation before delete, actor-scoped hosted deletion of D1 shelf rows plus R2 bytes, hosted plan-owned upload caps, hard total artifact storage caps, R2 cleanup after D1 reservation races, workspace-bounded upload/download paths, and symlink/junction escape denial |
17
+ | Work status/cancel/list | `vibecodr work list/show/follow/cancel`, advanced `vibecodr jobs list/status/cancel` | tests verify list limit propagation, ID validation, alias routing, real follow polling until terminal status, optional terminal proof saving, queued fairness-delay metadata in status output, and `--yes` on cancellation |
18
+ | Usage quotas and limits | `vibecodr usage`, `vibecodr limits`, `usage.status`/`usage.read` MCP tools | tests verify stable JSON output, human quota bars, alias routing, warning preservation, and no operator-only alert/account-pressure metadata in user-facing usage payloads |
19
+ | Open-source client authority boundary | `vibecodr plans`, `/v1/plans`, `/v1/usage`, `/v1/health`, `/v1/mcp/connection`, `usage.read`, docs/SECURITY.md | tests verify local plan fallback is marked non-authoritative, hosted plan packaging is not actor entitlement authority, usage snapshots are read-only/not client-mutable, default product JSON excludes internal/future/operator/provider/auth metadata, and internal/future launch metadata plus overage-meter details are actor/operator-scoped instead of global while keeping operator readiness on operator-scoped endpoints |
20
+ | Account identity | `vibecodr whoami`, `/v1/me` | tests verify the standard whoami command reads hosted identity and prints account-first Agent Computer output plus redacted payload data, and hosted JSON omits synthetic `@vibecodr.local` email fallbacks |
21
+ | Tool grants | `vibecodr grants`, `vibecodr grants list` | tests verify default list routing and scoped grant rendering |
22
+ | Retention settings | `vibecodr retention show/set` | tests verify day bounds, plan-capped artifact retention, recordings policy, `--yes` on mutation |
23
+ | Usage dashboard | `vibecodr dashboard [section]` | tests verify safe dashboard section URL generation without auth leakage and shared API URL validation |
24
+ | Plan packaging | `vibecodr plans` | tests verify local fallback plan contract and hosted response handling |
25
+ | Free/Creator/Pro plan limits | `DEFAULT_PLANS`, `OVERAGE_METERS` in `src/core/contracts.ts` | `test/limits.test.ts` verifies the exact Free, Creator, and Pro launch matrix: prices, monthly/daily VC Tool credits, browser seconds, Creator 20-minute and Pro 1-hour Browser Session caps, crawl caps, scheduled QA, Creator `standard-1`/10-minute sandbox lane, Pro `standard-2`/30-minute sandbox lane, shared paid 2-active-sandbox cap, per-upload artifact caps, artifact limits, and compatibility meters |
26
26
  | Separate ledgers | Parent `PLAN_LIMITS[*].builds`, parent `PLAN_LIMITS[*].vcTools`, hosted `enforceQuota` | tests verify build seconds reserve independently from VC Tool credits; hosted quota checks count browser and sandbox work against one VC Tools ledger before Queue/Workflow dispatch; hosted quota tests deny plan-specific active browser run caps for Free/Creator/Pro plus monthly credit, daily credit, browser-second, and sandbox-second exhaustion before cost-bearing dispatch; a parallel atomic reservation race test proves only one dispatch wins when two requests contend for the same reservation window |
27
27
  | Account-wide hosted capacity breakers | parent `VC_TOOLS_GLOBAL_LIMITS`, child hosted/Browser Run/Sandbox account cap vars and kill-switch vars, Workflow binding, queue `max_concurrency`, container `max_instances`, scheduled-only bounded per-message Queue delays, internal-api alert codes, D1 `operator_alert_dedupe`, `JOB_QUEUE.metrics()`, `JOB_DLQ.metrics()`, account-wide active artifact bytes, expired-artifact cleanup failure alert, execution-health failure/timeout alert, hosted Worker 5xx alert, auth failure anomaly alert, Cloudflare spend anomaly alert, and API contract docs | parent tests verify soft/hard cap policy and filter all user-scoped vc-tools payloads before fanout; hosted tests verify browser and sandbox jobs do not start above hard caps, repeat-actor jobs report queued-ahead metadata without delaying interactive Queue sends, Browser Agent jobs create `BROWSER_AGENT_WORKFLOW` instances instead of Queue messages, Queue consumers reject Browser Agent execution, hard caps are operator-configurable, `VC_TOOLS_PAUSE_COST_BEARING_JOBS` pauses all cost-bearing work before D1 job insertion or Queue/Workflow dispatch, `VC_TOOLS_DISABLE_BROWSER_RUN`, `VC_TOOLS_DISABLE_BROWSER_SESSIONS`, and `VC_TOOLS_DISABLE_SANDBOX` pause their lanes separately, 70/85/95 soft-cap crossings fan sanitized alerts to internal-api plus ntfy/webhook surfaces, duplicate crossings in the same reset window are suppressed, missing notifier bindings are audit-visible, scheduled Queue/DLQ/artifact-storage/retention-cleanup/execution-health/auth-failure/Cloudflare-spend alerts stay account-scoped without user fanout, unexpected hosted 500 alerts omit user/query/token data, and auth-failure metrics omit token/query material |
28
28
  | Dashboard sections | `DASHBOARD_SECTIONS` and `OPERATOR_DASHBOARD_SECTIONS` in `src/core/contracts.ts`, authenticated hosted `/dashboard/*` | tests verify unauthenticated dashboard access is denied, authenticated customer dashboard sections stay beta-safe without internal/future billing metadata, configured internal-metadata actors can still inspect that launch metadata, the CLI does not print the internal COGS URL, customer grants cannot read `/dashboard/cogs/`, and an explicit operator grant can read the internal COGS section |
@@ -30,29 +30,29 @@ artifacts and tests.
30
30
  | No raw provider credential exposure | hosted API boundary only; CLI stores Vibecodr account credentials, not Cloudflare/provider credentials | redaction tests verify authority-bearing token values are hidden while safe operator handles/counters stay visible; OAuth/API-key exchange tests verify durable local storage plus output redaction; docs contract |
31
31
  | All tool calls quota-checked and logged | API contract requires hosted enforcement; CLI submits through `/v1/tools/test` only | hosted tests verify quota lookup before Queue/Workflow dispatch, audit/job state before Queue send or Workflow create, quota-denial audit metrics, and unsafe-URL denial audit metrics without notification fanout |
32
32
  | Browser Run timeout mapping | `src/hosted/worker.ts` Quick Action payload builders and Browser Session navigation | hosted tests verify Quick Action `goToOptions.timeout` clamps to 60s, non-PDF Quick Actions stay on a minimal provider-compatible payload without top-level `actionTimeout`, PDF keeps its documented `pdfOptions.timeout`, dynamic public-page navigation uses Cloudflare's recommended `networkidle2` default instead of the stricter `networkidle0`, Browser Sessions launch with bounded `keep_alive`, and Browser Session large-page navigation timeout failures close the browser, mark the job failed, and do not write artifacts or browser-minute usage |
33
- | Browser Run crawl provider path | `browser.crawl_site`, hosted `/crawl` Quick Action integration | CLI tests verify `browser.crawl` payloads; hosted tests verify crawl start, result fetch, artifact storage, browser-minute usage, and crawl-page usage |
34
- | Browser Run provider retry/defer | `src/hosted/worker.ts` queue failure handling | hosted tests verify provider 429 responses return jobs to queued/retryable state and do not mark them failed on first rate-limit pressure |
33
+ | Browser Run crawl provider path | `browser.crawl_site`, hosted `/crawl` Quick Action integration | CLI tests verify `browser.crawl` payloads; hosted tests verify crawl start, result fetch, artifact storage, browser-minute usage, and crawl-page usage |
34
+ | Browser Run provider retry/defer | `src/hosted/worker.ts` queue failure handling | hosted tests verify provider 429 responses return jobs to queued/retryable state and do not mark them failed on first rate-limit pressure |
35
35
  | Human-use security hardening | CLI and hosted Worker trust-boundary controls | tests verify insecure local API opt-in, workspace-bounded artifacts including symlink/junction denial, scoped Vibecodr CLI grants with per-tool capability scopes, actor-scoped live job/artifact/usage/audit SQL, DNS address-record and redirect-chain enforcement with denial metrics, authenticated-browser material denial, Browser Run Quick Action routing and metered time, crawl metering, paid sandbox public HTTP(S) egress with private/local/internal denial, quota denial metrics, pre-execution and during-execution cancellation guards, hard artifact storage caps, D1/R2 artifact write cleanup, explicit artifact deletion cleanup, and retention-backed artifact expiry |
36
36
  | Hosted API/MCP scaffold | `src/hosted/worker.ts`, `wrangler.jsonc`, `migrations/0001_live_schema.sql`, `migrations/0002_actor_scope.sql`, `migrations/0003_quota_reservations.sql`, `migrations/0004_sandbox_quota_reservations.sql`, `migrations/0005_operator_alert_dedupe.sql`, `migrations/0006_scheduled_qa.sql`, `migrations/0007_job_queue_metadata.sql` | `npm run check:worker` and `test/hosted-worker.test.ts` verify health, auth fail-closed behavior, auth-failure audit metrics, user-safe public readiness, protected inspection/dashboard routes, scoped CLI grants, capability-scope denial, MCP metadata, MCP tool flow, dashboard contract, actor-scoped live acceptance, atomic quota reservation including sandbox seconds and parallel race conflict handling, queued-ahead metadata without interactive fairness delay, Workflow-owned paid agent browser dispatch without a Queue binding, Queue rejection for Browser Agent execution, Browser Run Quick Action hard-cap deferral, Browser Session hard-cap deferral, Sandbox hard-cap deferral, provider retry/defer handling, Browser Run large-page timeout bounds, failed-job DLQ retry-boundary behavior without provider re-execution, exhausted failed-job loop prevention, scheduled Queue/DLQ/artifact-storage/retention-cleanup/execution-health/auth-failure/Cloudflare-spend alerting, unexpected hosted 500 alerting, crawl artifacts, scheduled QA config/create/list/run-now enqueue/cron enqueue, sandbox execution timeout/env/output/teardown behavior, sandbox timeout/fork-storm failure cleanup, sandbox-returned file/path suppression, sandbox reservation reconciliation, unsafe redirect rejection before cost-bearing dispatch, D1-backed operator alert dedupe, and contract-mode tool acceptance |
37
37
  | Live Cloudflare provider | `src/hosted/worker.ts`, `wrangler.jsonc`, `Dockerfile`, `migrations/0001_live_schema.sql`, `migrations/0002_actor_scope.sql`, `migrations/0003_quota_reservations.sql`, `migrations/0004_sandbox_quota_reservations.sql`, `migrations/0005_operator_alert_dedupe.sql`, `migrations/0006_scheduled_qa.sql`, `migrations/0007_job_queue_metadata.sql` | hosted-required for live releases: apply all migrations, set Browser Run Quick Actions secrets and `BROWSER_AGENT_WORKFLOW`, deploy, then smoke health, authenticated login, real Quick Action browser job, real scheduled QA create/list/run-now enqueue/job-readback/monthly-cap denial plus natural cron-tick readback at a real trigger time, real Creator browser agent-task job through `BROWSER_AGENT_WORKFLOW`/`BROWSER`, real Pro browser agent-task job through `BROWSER_AGENT_WORKFLOW`/`BROWSER`, real crawl job, real Creator `standard-1` sandbox job capped at 10 minutes, real Pro `standard-2` sandbox job capped at 30 minutes, R2 artifact download, actor-scoped user-safe usage, crawl-page usage, sandbox-second quota denial, operator-alert dedupe/readback on operator surfaces, COGS dashboard readback, and audit rows against `https://tools.vibecodr.space` |
38
38
  | Cloudflare dynamic primitive fit | `docs/CLOUDFLARE-PRIMITIVE-FIT.md`, `docs/API-CONTRACT.md`, `wrangler.jsonc` | docs verify Cloudflare Workflows are the v1 durable `browser.agent_task` lane; Dynamic Workers/Facets/Dynamic Workflows remain future supervised dynamic-code capabilities, not replacements for v1 Browser Run Quick Actions, Sandbox SDK, D1, R2, Queue/DLQ, or platform-owned quota/audit/billing authority |
39
- | Production-grade packaging | build, typecheck, test, explicit npm exports, CLI-only runtime dependencies, pack verifier, CI | `npm run verify`; pack verifier rejects `docs/`, hosted Worker source, migrations, deployment config, tests, scripts, and Cloudflare primitive runtime dependencies from the public npm artifact |
40
- | Inspectable goal coverage | `vc-tools inspect`, `src/core/goal-coverage.ts`, `scripts/check-goal-coverage.mjs` | `npm run verify:goal` and `test/cli.behavior.test.ts` verify coverage output |
41
-
42
- ## Completion Gate
43
-
44
- Before shipping:
45
-
46
- 1. `npm run check`
47
- 2. `npm run check:worker`
48
- 3. `npm test`
49
- 4. `npm run build`
50
- 5. `npm run verify:artifact`
51
- 6. `npm run verify:goal`
52
- 7. Manual CLI smoke against a mock or real API
53
- 8. Hosted service smoke against `https://tools.vibecodr.space`
54
-
55
- The CLI-contract release channel may ship with `live-hosted-production` marked
56
- `hosted-required`. A live release must clear that pending inspection with fresh
57
- production smoke evidence after any Worker binding, live tool execution,
58
- retention, quota, audit, queue, D1, R2, Browser Run, or Sandbox behavior change.
39
+ | Production-grade packaging | build, typecheck, test, explicit npm exports, CLI-only runtime dependencies, pack verifier, CI | `npm run verify`; pack verifier rejects `docs/`, hosted Worker source, migrations, deployment config, tests, scripts, and Cloudflare primitive runtime dependencies from the public npm artifact |
40
+ | Inspectable goal coverage | `vibecodr inspect`, `src/legacy/core/goal-coverage.ts` | `npm run verify:release` and `test/legacy/cli.behavior.test.ts` verify coverage output |
41
+
42
+ ## Completion Gate
43
+
44
+ Before shipping:
45
+
46
+ 1. `npm run check`
47
+ 2. `npm run check:worker`
48
+ 3. `npm test`
49
+ 4. `npm run build`
50
+ 5. `npm run verify:artifact`
51
+ 6. `npm run verify:release`
52
+ 7. Manual CLI smoke against a mock or real API
53
+ 8. Hosted service smoke against `https://tools.vibecodr.space`
54
+
55
+ The CLI-contract release channel may ship with `live-hosted-production` marked
56
+ `hosted-required`. A live release must clear that pending inspection with fresh
57
+ production smoke evidence after any Worker binding, live tool execution,
58
+ retention, quota, audit, queue, D1, R2, Browser Run, or Sandbox behavior change.
@@ -1,22 +1,25 @@
1
1
  # Architecture
2
2
 
3
- The Vibecodr CLI is a client of the hosted Vibecodr MCP gateway.
3
+ The Vibecodr CLI is the unified user-facing command surface for the hosted MCP Gateway and the hosted Agent Computer.
4
4
 
5
5
  ## Boundary
6
6
 
7
7
  - hosted MCP gateway/server repo: `Vibecodr-MCP`
8
- - CLI client repo: `Vibecodr-MCP-CLI`
8
+ - CLI and hosted Agent Computer worker repo: `Vibecodr-CLI`
9
9
  - CLI package: `@vibecodr/cli`
10
10
  - primary executable: `vibecodr`
11
- - compatibility executable: `vibecodr-mcp`
11
+ - compatibility executables: `vibecodr-mcp`, `vc-tools`
12
12
  - legacy package compatibility: `@vibecodr/mcp`
13
13
  - default MCP URL: `https://openai.vibecodr.space/mcp`
14
+ - Agent Computer API URL: `https://tools.vibecodr.space`
14
15
 
15
- This repo does not run the hosted server. It installs client config, performs CLI-owned OAuth, discovers the live tool catalog, and calls tools over Streamable HTTP MCP.
16
+ This repo does not run the hosted MCP gateway. It does own the distributable CLI and the hosted Agent Computer worker source. The CLI installs client config, performs CLI-owned OAuth for the MCP Gateway, discovers the live gateway tool catalog, calls tools over Streamable HTTP MCP, and routes Agent Computer commands to `tools.vibecodr.space`.
16
17
 
17
18
  ## Auth Ownership
18
19
 
19
- `vibecodr login` stores OAuth tokens for the CLI profile only.
20
+ `vibecodr login` and `vibecodr login mcp` store OAuth tokens for the CLI profile only.
21
+
22
+ `vibecodr login agent` and `vibecodr start` store the hosted Agent Computer credential only.
20
23
 
21
24
  Codex, Cursor, VS Code, Windsurf, ChatGPT, and other MCP clients own separate OAuth sessions. Installing MCP config into those clients points them at the same server, but it does not copy CLI tokens into them.
22
25
 
@@ -26,7 +29,7 @@ The CLI is permissively licensed and safe to distribute as a public client packa
26
29
 
27
30
  The package name is `@vibecodr/cli` because this repo distributes the user-facing command-line client. The older `@vibecodr/mcp` package name is kept only as a compatibility/deprecation surface; the bare `vibecodr` executable remains the canonical user command.
28
31
 
29
- Local config directories and secure-token service names intentionally keep their historical `vibecodr-mcp` / `@vibecodr/mcp` identifiers during this migration. Those names are storage compatibility keys, not the public npm package identity.
32
+ Local config directories and secure-token service names intentionally keep their historical `vibecodr-mcp`, `vc-tools`, `@vibecodr/mcp`, and `@vibecodr/vc-tools` identifiers during this migration. Those names are storage compatibility keys, not the public npm package identity.
30
33
 
31
34
  Keeping the repos separate makes the contract clear:
32
35
 
package/docs/auth.md CHANGED
@@ -1,12 +1,18 @@
1
1
  # Auth
2
2
 
3
- `vibecodr login` authenticates the CLI itself to the hosted Vibecodr MCP server. It does not log Codex, Cursor, VS Code, Windsurf, ChatGPT, or any other MCP client into MCP.
3
+ `vibecodr login` defaults to authenticating the CLI itself to the hosted Vibecodr MCP server. It does not log Codex, Cursor, VS Code, Windsurf, ChatGPT, or any other MCP client into MCP.
4
4
 
5
- Vibecodr has one hosted MCP gateway. The CLI is one client of that gateway, with its own local OAuth token store.
5
+ Vibecodr now has two CLI credential lanes:
6
+
7
+ - MCP Gateway: `vibecodr login` or `vibecodr login mcp`, stored under the historical `@vibecodr/mcp` service.
8
+ - Hosted Agent Computer: `vibecodr login agent` or the automatic `vibecodr start` approval flow, stored under the historical `@vibecodr/vc-tools` service.
9
+
10
+ The token types are intentionally separate. Status and doctor can read both lanes, but the CLI does not merge or copy credentials between them.
6
11
 
7
12
  Compatibility alias:
8
13
 
9
14
  - `vibecodr-mcp login`
15
+ - `vc-tools login` for the Agent Computer compatibility path
10
16
 
11
17
  ## Implemented now
12
18
 
@@ -15,7 +21,8 @@ Compatibility alias:
15
21
  - loopback callback on `127.0.0.1`
16
22
  - secure token storage in the OS credential store via `@napi-rs/keyring`
17
23
  - proactive refresh before protected runtime commands when a refresh token is available
18
- - `logout` local token deletion plus best-effort revocation
24
+ - `logout` local token deletion plus best-effort revocation for MCP Gateway sessions
25
+ - `logout agent --yes` local Agent Computer credential deletion through the compatibility lane
19
26
 
20
27
  The plaintext file secret store is for local automated tests only. It is ignored unless both `VIBECDR_MCP_INSECURE_SECRET_STORE_PATH` and `VIBECDR_MCP_ENABLE_INSECURE_SECRET_STORE=true` are set.
21
28
 
@@ -48,10 +55,11 @@ Current repo reality:
48
55
 
49
56
  ## Runtime behavior
50
57
 
51
- - `login` prints the authorization URL by default so the browser step is explicit and reliable across shells
52
- - `login --browser open` opts into automatic browser launch
53
- - `status` reads local session state without requiring the network unless `--probe` is used
54
- - `tools` and `call` will attempt to reuse the stored session
58
+ - `login` and `login mcp` print the authorization URL by default so the browser step is explicit and reliable across shells
59
+ - `login mcp --browser open` opts into automatic browser launch
60
+ - `login agent` starts the hosted Agent Computer approval flow; `start` also opens this flow when no Agent Computer credential is stored
61
+ - `status` reads local MCP Gateway and Agent Computer credential state without requiring the network unless `--probe` is used
62
+ - `mcp tools`, `tools`, `mcp call`, and `call` will attempt to reuse the stored MCP Gateway session
55
63
  - if the access token is close to expiry and a refresh token is present, the CLI refreshes before making the MCP request
56
64
 
57
65
  ## Verified now