@viberaven/cli 1.6.1 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -1,64 +1,64 @@
1
- <!-- VIBERAVEN:START -->
2
- VibeRaven reads a repository and lists launch gaps for AI-built apps that deploy on Vercel and use Supabase. It runs fully locally: no login, no API key, no telemetry.
3
-
4
- Canonical agent command: `npx -y viberaven --agent-mode`
5
-
6
- If this command is run from the `viberaven` repo itself, use `node packages/cli/dist/cli.js --agent-mode` to avoid resolving the local package metadata.
7
-
8
- Suggest one pass before a Vercel + Supabase app launches or is handed off, after a Supabase migration or policy change, or when the user reports a production error about RLS, env vars, the database connection, the service role key or a Stripe webhook. It is not needed for apps that do not use Vercel and Supabase, for general SQL or deployment questions, or for one local error.
9
-
10
- This is advice, not a gate: the user decides when to ship. It is a repository check, not a live database test: it cannot show which RLS policies are live in production, and a clear result is not a security audit.
11
-
12
- Prefer `viberaven_check_readiness` when the VibeRaven MCP server is configured; otherwise `npx -y viberaven --agent-mode`.
13
- <!-- VIBERAVEN:END -->
14
-
15
- # VibeRaven CLI: agent instructions
16
-
17
- ## Run it
18
-
19
- From the project root:
20
-
21
- ```bash
22
- npx -y viberaven --agent-mode
23
- ```
24
-
25
- It writes, in `.viberaven/`:
26
-
27
- 1. `agent-tasklist.md`: one TASK block per gap, with fix type, file, exact fix, verify command and whether the user must act
28
- 2. `gate-result.json`: the verdict, `gate.status` (`clear`, `warning` or `not_clear`), and `topGapIds`
29
- 3. `context-map.json`: compact context for the next step
30
- 4. `agent-summary.md` and `launch-playbook.md`: scan context and the full checklist
31
- 5. `gaps/<gapId>.json`: detail for each gap
32
-
33
- ## Work the gaps
34
-
35
- The run prints a block between `VIBERAVEN_NEXT_ACTION_START` and `VIBERAVEN_NEXT_ACTION_END` with `batchSize`, `batchApplied`, `remainingInBatch`, `scanNow`, `stalled`, `type` (`repo-code`, `provider-action`, `verify`, `stalled` or `done`), `gapId` and `requiresUserAction`.
36
-
37
- 1. For a repo-code task with `requiresUserAction: false` that lists an MCP call, call `viberaven_heal_apply { gap: "<gapId>", yes: true }` or run `npx -y viberaven fix --gap <gapId>`. Preview first with `npx -y viberaven fix --gap <gapId> --dry-run` or `viberaven_heal_plan`.
38
- 2. For a repo-code task without an MCP call, patch it directly with `npx -y viberaven prompt --gap <gapId>` as guidance. Make minimal, targeted changes and do not refactor unrelated files.
39
- 3. A successful heal updates `.viberaven/loop-state.json`. After a batch of up to `batchSize` fixes, or when `scanNow` is true, run `npx -y viberaven --verify` (or `viberaven_verify`) once, not after every fix.
40
- 4. For a task with `requiresUserAction: true`, show the user the task's action and wait for their answer: a provider step (the `VIBERAVEN_PROVIDER_ACTION` block with dashboard URL and step), or a repo change that needs their yes. For `rls_disabled` that change enables RLS without policies, so browser reads return no rows until policies exist; call `viberaven_heal_apply` or run `npx -y viberaven fix --gap rls_disabled` only after they agree. The task's MCP arguments leave out `yes: true`; add it once they agree. Do not claim dashboard, billing, DNS or webhook setup is done from repo edits alone.
41
- 5. If `stalled` is true, stop re-running the check and tell the user which gaps remain.
42
- 6. Stop when `gate.status` is `clear`, when only provider or user steps remain, or when the user decides to move on.
43
-
44
- A clear `gate.status` means the repo checks found no blockers. It is not a security audit and does not show what is live in Supabase or Vercel.
45
-
46
- ## Other commands
47
-
48
- ```bash
49
- npx -y viberaven check # terminal verdict, exit 1 when blockers exist
50
- npx -y viberaven next --json # the next step from the last scan
51
- npx -y viberaven audit --vercel-supabase # RLS in migrations, pooler port, service role key
52
- npx -y viberaven --strict # verdict as an exit code for CI: exit 1 when gate.status is not_clear
53
- npx -y viberaven init --agents all --dry-run
54
- npx -y viberaven clean --plan # non-destructive cleanup plan
55
- ```
56
-
57
- `viberaven_validate_npm_package` (MCP) looks a new package name up on the public npm registry before an install.
58
-
59
- ## Current machine-readable docs
60
-
61
- - Skill: https://viberaven.dev/SKILL.md
62
- - Agent rules: https://viberaven.dev/AGENTS.md
63
- - CLI docs: https://viberaven.dev/cli.md
64
- - MCP config: https://viberaven.dev/mcp.md
1
+ <!-- VIBERAVEN:START -->
2
+ VibeRaven reads a repository and lists launch gaps for AI-built apps that deploy on Vercel and use Supabase. It runs fully locally: no login, no API key, no telemetry.
3
+
4
+ Canonical agent command: `npx -y viberaven --agent-mode`
5
+
6
+ If this command is run from the `viberaven` repo itself, use `node packages/cli/dist/cli.js --agent-mode` to avoid resolving the local package metadata.
7
+
8
+ Suggest one pass before a Vercel + Supabase app launches or is handed off, after a Supabase migration or policy change, or when the user reports a production error about RLS, env vars, the database connection, the service role key or a Stripe webhook. It is not needed for apps that do not use Vercel and Supabase, for general SQL or deployment questions, or for one local error.
9
+
10
+ This is advice, not a gate: the user decides when to ship. It is a repository check, not a live database test: it cannot show which RLS policies are live in production, and a clear result is not a security audit.
11
+
12
+ Prefer `viberaven_check_readiness` when the VibeRaven MCP server is configured; otherwise `npx -y viberaven --agent-mode`.
13
+ <!-- VIBERAVEN:END -->
14
+
15
+ # VibeRaven CLI: agent instructions
16
+
17
+ ## Run it
18
+
19
+ From the project root:
20
+
21
+ ```bash
22
+ npx -y viberaven --agent-mode
23
+ ```
24
+
25
+ It writes, in `.viberaven/`:
26
+
27
+ 1. `agent-tasklist.md`: one TASK block per gap, with fix type, file, exact fix, verify command and whether the user must act
28
+ 2. `gate-result.json`: the verdict, `gate.status` (`clear`, `warning` or `not_clear`), and `topGapIds`
29
+ 3. `context-map.json`: compact context for the next step
30
+ 4. `agent-summary.md` and `launch-playbook.md`: scan context and the full checklist
31
+ 5. `gaps/<gapId>.json`: detail for each gap
32
+
33
+ ## Work the gaps
34
+
35
+ The run prints a block between `VIBERAVEN_NEXT_ACTION_START` and `VIBERAVEN_NEXT_ACTION_END` with `batchSize`, `batchApplied`, `remainingInBatch`, `scanNow`, `stalled`, `type` (`repo-code`, `provider-action`, `verify`, `stalled` or `done`), `gapId` and `requiresUserAction`.
36
+
37
+ 1. For a repo-code task with `requiresUserAction: false` that lists an MCP call, call `viberaven_heal_apply { gap: "<gapId>", yes: true }` or run `npx -y viberaven fix --gap <gapId>`. Preview first with `npx -y viberaven fix --gap <gapId> --dry-run` or `viberaven_heal_plan`.
38
+ 2. For a repo-code task without an MCP call, patch it directly with `npx -y viberaven prompt --gap <gapId>` as guidance. Make minimal, targeted changes and do not refactor unrelated files.
39
+ 3. A successful heal updates `.viberaven/loop-state.json`. After a batch of up to `batchSize` fixes, or when `scanNow` is true, run `npx -y viberaven --verify` (or `viberaven_verify`) once, not after every fix.
40
+ 4. For a task with `requiresUserAction: true`, show the user the task's action and wait for their answer: a provider step (the `VIBERAVEN_PROVIDER_ACTION` block with dashboard URL and step), or a repo change that needs their yes. For `rls_disabled` that change enables RLS without policies, so browser reads return no rows until policies exist; call `viberaven_heal_apply` or run `npx -y viberaven fix --gap rls_disabled` only after they agree. The task's MCP arguments leave out `yes: true`; add it once they agree. Do not claim dashboard, billing, DNS or webhook setup is done from repo edits alone.
41
+ 5. If `stalled` is true, stop re-running the check and tell the user which gaps remain.
42
+ 6. Stop when `gate.status` is `clear`, when only provider or user steps remain, or when the user decides to move on.
43
+
44
+ A clear `gate.status` means the repo checks found no blockers. It is not a security audit and does not show what is live in Supabase or Vercel.
45
+
46
+ ## Other commands
47
+
48
+ ```bash
49
+ npx -y viberaven check # terminal verdict, exit 1 when blockers exist
50
+ npx -y viberaven next --json # the next step from the last scan
51
+ npx -y viberaven audit --vercel-supabase # RLS in migrations, pooler port, service role key
52
+ npx -y viberaven --strict # verdict as an exit code for CI: exit 1 when gate.status is not_clear
53
+ npx -y viberaven init --agents all --dry-run
54
+ npx -y viberaven clean --plan # non-destructive cleanup plan
55
+ ```
56
+
57
+ `viberaven_validate_npm_package` (MCP) looks a new package name up on the public npm registry before an install.
58
+
59
+ ## Current machine-readable docs
60
+
61
+ - Skill: https://viberaven.dev/SKILL.md
62
+ - Agent rules: https://viberaven.dev/AGENTS.md
63
+ - CLI docs: https://viberaven.dev/cli.md
64
+ - MCP config: https://viberaven.dev/mcp.md
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 VibeRaven
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 VibeRaven
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,113 +1,113 @@
1
- # @viberaven/cli
2
-
3
- [![npm version](https://img.shields.io/npm/v/@viberaven/cli)](https://www.npmjs.com/package/@viberaven/cli)
4
- [![npm downloads](https://img.shields.io/npm/dw/@viberaven/cli)](https://www.npmjs.com/package/@viberaven/cli)
5
- [![license](https://img.shields.io/npm/l/@viberaven/cli)](https://www.npmjs.com/package/@viberaven/cli)
6
-
7
- <p align="center">
8
- <img src="https://raw.githubusercontent.com/ohad6k/VibeRaven/main/assets/banner.png" alt="VibeRaven — AI got your app to demo. VibeRaven gets it to production." width="100%" />
9
- </p>
10
-
11
- VibeRaven is **the Card Table** — a local Studio where your AI-built app is laid out in front of you. Every provider (Supabase, Vercel, Stripe, ...) is a graded trading card in your hand: play a card and its production checks run instantly in chat; a **RAVEN GRADE 10** means that territory is production-ready. Versions are a pile you can pull from, your whole architecture is a region map of cards, and Codex, Claude Code, or Gemini CLI does the actual work — with you controlling how much it's allowed to touch.
12
-
13
- ## Start the Studio
14
-
15
- ```bash
16
- npx -y viberaven
17
- ```
18
-
19
- That command opens the table:
20
-
21
- - **Your hand** — providers as foil cards; click or drop one on the table and its launch checks run in chat, graded 1-10 from repo evidence.
22
- - **The version pile** — pull a release card to see what changed (real git compare + changelog), view the diff, or ask the agent to explain it.
23
- - **The region map** — your app as territory: pages, modules, and provider cards connected by routes, every card movable.
24
- - **Agentic chat** — missions run through your connected CLI, with `ask` / `approve` / `full` access modes and inline approve for risky work.
25
- - Provider MCP visibility, terminal, and diff views included.
26
-
27
- The unscoped `viberaven` package is a small shim that launches this CLI package.
28
-
29
- ## Agent Connections
30
-
31
- Inside the Studio, connect an installed CLI and test it before chat control:
32
-
33
- - Codex CLI
34
- - Claude Code
35
- - Gemini CLI
36
-
37
- Installed is not the same as connected. VibeRaven asks the selected CLI to prove it can run in the current repo before using it for real chat work.
38
-
39
- ## Provider And Release Context
40
-
41
- Use the Studio side tabs and context chips to attach provider or version context to a chat mission:
42
-
43
- - Providers: Supabase, Vercel, GitHub, Stripe, Sentry, PostHog, Clerk, Auth.js, Resend, Upstash.
44
- - Releases: current and recent git tags, changelog snippets, rollback context, and release comparisons.
45
- - Architecture: repo and provider boundaries for inspection and planning.
46
-
47
- Provider dashboard checks are not cleared by repo-code edits. Billing/product configuration, DNS, webhooks, credentials, quotas, and live provider verification must still be completed or verified in the provider dashboard or through read-only provider evidence.
48
-
49
- ## Machine And CI Commands
50
-
51
- The Studio is the default product surface. These commands remain available for automation and CI:
52
-
53
- ```bash
54
- npx -y viberaven check --json
55
- npx -y viberaven --strict --json
56
- npx -y viberaven actions
57
- npx -y viberaven --verify --action VR-A1
58
- ```
59
-
60
- For focused work:
61
-
62
- ```bash
63
- npx -y viberaven next --json
64
- npx -y viberaven prompt --gap <id>
65
- npx -y viberaven audit --vercel-supabase
66
- ```
67
-
68
- ## Legacy Agent Mode
69
-
70
- `--agent-mode` is kept for older artifact-first agent workflows:
71
-
72
- ```bash
73
- npx -y viberaven --agent-mode
74
- ```
75
-
76
- It writes artifacts such as:
77
-
78
- - `.viberaven/agent-tasklist.md`
79
- - `.viberaven/gate-result.json`
80
- - `.viberaven/context-map.json`
81
- - `.viberaven/agent-summary.md`
82
- - `.viberaven/launch-playbook.md`
83
-
84
- New product work should prefer the Studio and MCP/chat context flow instead of the old tasklist-first loop.
85
-
86
- ## MCP
87
-
88
- Use the MCP package when an agent host supports MCP tools:
89
-
90
- ```bash
91
- npx -y @viberaven/mcp
92
- ```
93
-
94
- The MCP server wraps the public CLI and exposes readiness, verification, action, audit, and healing tools without exposing secrets.
95
-
96
- ## Development
97
-
98
- ```bash
99
- npm --prefix packages/cli run typecheck
100
- npm --prefix packages/cli test -- local-ui/server.test.ts
101
- npm --prefix packages/cli run build
102
- ```
103
-
104
- For a local package publish check, run from this package directory:
105
-
106
- ```bash
107
- cd packages/cli
108
- npm pack --dry-run
109
- ```
110
-
111
- ## License
112
-
113
- MIT
1
+ # @viberaven/cli
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@viberaven/cli)](https://www.npmjs.com/package/@viberaven/cli)
4
+ [![npm downloads](https://img.shields.io/npm/dw/@viberaven/cli)](https://www.npmjs.com/package/@viberaven/cli)
5
+ [![license](https://img.shields.io/npm/l/@viberaven/cli)](https://www.npmjs.com/package/@viberaven/cli)
6
+
7
+ <p align="center">
8
+ <img src="https://raw.githubusercontent.com/ohad6k/VibeRaven/main/assets/banner.png" alt="VibeRaven — AI got your app to demo. VibeRaven gets it to production." width="100%" />
9
+ </p>
10
+
11
+ VibeRaven is **the Card Table** — a local Studio where your AI-built app is laid out in front of you. Every provider (Supabase, Vercel, Stripe, ...) is a graded trading card in your hand: play a card and its production checks run instantly in chat; a **RAVEN GRADE 10** means that territory is production-ready. Versions are a pile you can pull from, your whole architecture is a region map of cards, and Codex, Claude Code, or Gemini CLI does the actual work — with you controlling how much it's allowed to touch.
12
+
13
+ ## Start the Studio
14
+
15
+ ```bash
16
+ npx -y viberaven
17
+ ```
18
+
19
+ That command opens the table:
20
+
21
+ - **Your hand** — providers as foil cards; click or drop one on the table and its launch checks run in chat, graded 1-10 from repo evidence.
22
+ - **The version pile** — pull a release card to see what changed (real git compare + changelog), view the diff, or ask the agent to explain it.
23
+ - **The region map** — your app as territory: pages, modules, and provider cards connected by routes, every card movable.
24
+ - **Agentic chat** — missions run through your connected CLI, with `ask` / `approve` / `full` access modes and inline approve for risky work.
25
+ - Provider MCP visibility, terminal, and diff views included.
26
+
27
+ The unscoped `viberaven` package is a small shim that launches this CLI package.
28
+
29
+ ## Agent Connections
30
+
31
+ Inside the Studio, connect an installed CLI and test it before chat control:
32
+
33
+ - Codex CLI
34
+ - Claude Code
35
+ - Gemini CLI
36
+
37
+ Installed is not the same as connected. VibeRaven asks the selected CLI to prove it can run in the current repo before using it for real chat work.
38
+
39
+ ## Provider And Release Context
40
+
41
+ Use the Studio side tabs and context chips to attach provider or version context to a chat mission:
42
+
43
+ - Providers: Supabase, Vercel, GitHub, Stripe, Sentry, PostHog, Clerk, Auth.js, Resend, Upstash.
44
+ - Releases: current and recent git tags, changelog snippets, rollback context, and release comparisons.
45
+ - Architecture: repo and provider boundaries for inspection and planning.
46
+
47
+ Provider dashboard checks are not cleared by repo-code edits. Billing/product configuration, DNS, webhooks, credentials, quotas, and live provider verification must still be completed or verified in the provider dashboard or through read-only provider evidence.
48
+
49
+ ## Machine And CI Commands
50
+
51
+ The Studio is the default product surface. These commands remain available for automation and CI:
52
+
53
+ ```bash
54
+ npx -y viberaven check --json
55
+ npx -y viberaven --strict --json
56
+ npx -y viberaven actions
57
+ npx -y viberaven --verify --action VR-A1
58
+ ```
59
+
60
+ For focused work:
61
+
62
+ ```bash
63
+ npx -y viberaven next --json
64
+ npx -y viberaven prompt --gap <id>
65
+ npx -y viberaven audit --vercel-supabase
66
+ ```
67
+
68
+ ## Legacy Agent Mode
69
+
70
+ `--agent-mode` is kept for older artifact-first agent workflows:
71
+
72
+ ```bash
73
+ npx -y viberaven --agent-mode
74
+ ```
75
+
76
+ It writes artifacts such as:
77
+
78
+ - `.viberaven/agent-tasklist.md`
79
+ - `.viberaven/gate-result.json`
80
+ - `.viberaven/context-map.json`
81
+ - `.viberaven/agent-summary.md`
82
+ - `.viberaven/launch-playbook.md`
83
+
84
+ New product work should prefer the Studio and MCP/chat context flow instead of the old tasklist-first loop.
85
+
86
+ ## MCP
87
+
88
+ Use the MCP package when an agent host supports MCP tools:
89
+
90
+ ```bash
91
+ npx -y @viberaven/mcp
92
+ ```
93
+
94
+ The MCP server wraps the public CLI and exposes readiness, verification, action, audit, and healing tools without exposing secrets.
95
+
96
+ ## Development
97
+
98
+ ```bash
99
+ npm --prefix packages/cli run typecheck
100
+ npm --prefix packages/cli test -- local-ui/server.test.ts
101
+ npm --prefix packages/cli run build
102
+ ```
103
+
104
+ For a local package publish check, run from this package directory:
105
+
106
+ ```bash
107
+ cd packages/cli
108
+ npm pack --dry-run
109
+ ```
110
+
111
+ ## License
112
+
113
+ MIT
package/SECURITY.md CHANGED
@@ -1,59 +1,59 @@
1
- # Security - `@viberaven/cli`
2
-
3
- ## Managed Scan Boundary
4
-
5
- The npm CLI does not read `OPENAI_API_KEY` and does not accept a bring-your-own-key scan path. Scans use the VibeRaven managed API after device login, same as the signed-in VS Code extension.
6
-
7
- - API keys for model calls live on the server, not in the published npm package.
8
- - Local credentials store only a VibeRaven access token in `%APPDATA%\viberaven\credentials.json` or `~/.config/viberaven/`.
9
- - Never commit `credentials.json` or paste tokens into chat.
10
-
11
- ## Safe Commands
12
-
13
- Human terminal:
14
-
15
- ```bash
16
- npx -y viberaven
17
- ```
18
-
19
- Agent or CI gate:
20
-
21
- ```bash
22
- npx -y viberaven --agent-mode
23
- npx -y viberaven --verify
24
- npx -y viberaven --strict
25
- ```
26
-
27
- VibeRaven is the Agent Context + Production Gate. Agents should read `.viberaven/agent-tasklist.md`, `.viberaven/gate-result.json`, and `.viberaven/context-map.json` before claiming an app is safe to deploy.
28
-
29
- ## Written Artifacts
30
-
31
- After a scan, the CLI may create:
32
-
33
- | Path | Contents |
34
- |------|----------|
35
- | `.viberaven/last-scan.json` | Full scan payload |
36
- | `.viberaven/agent-tasklist.md` | Agent tasklist |
37
- | `.viberaven/gate-result.json` | Machine gate verdict |
38
- | `.viberaven/context-map.json` | Compact agent context |
39
- | `.viberaven/gaps/<gapId>.json` | Per-gap evidence |
40
- | `.viberaven/agent-summary.md` | Human/agent summary |
41
- | `.viberaven/launch-playbook.md` | Launch checklist |
42
- | `.viberaven/report.html` | Local HTML report |
43
-
44
- Repo scanners redact common key patterns in evidence strings; the CLI runs an extra redaction pass before writing files.
45
-
46
- ## Provider Boundaries
47
-
48
- Provider dashboard checks are not cleared by repo-code edits. Billing/product configuration, DNS, webhooks, credentials, quotas, and live provider verification must be completed or verified in the provider dashboard or through read-only provider evidence.
49
-
50
- ## MCP and npm Configuration
51
-
52
- `@viberaven/mcp` runs the CLI as `npx -y --package=@viberaven/cli@<its own version> -- viberaven ...`. Before it starts that npx, it removes every `npm_package_*` and `npm_lifecycle_*` variable and every `npm_config_*` variable except registry, proxy, TLS and auth settings. So the environment the MCP was started in cannot change what npx runs, add `node-options`, or point npx at another npmrc file.
53
-
54
- The child npx still reads npmrc files the normal way: your `~/.npmrc`, the global npmrc, and the `.npmrc` of the folder it runs in. That last one is the scanned repo's own `.npmrc`. It applies exactly as it does when you run `npx viberaven` in that folder yourself, and it can set options such as `node-options`. Only run VibeRaven, through MCP or directly, on repos whose `.npmrc` you would run npx under.
55
-
56
- ## Reporting Issues
57
-
58
- If you believe a scan artifact leaked a secret, rotate the key immediately and open an issue at https://github.com/ohad6k/VibeRaven/issues with the redacted file path only.
59
-
1
+ # Security - `@viberaven/cli`
2
+
3
+ ## Managed Scan Boundary
4
+
5
+ The npm CLI does not read `OPENAI_API_KEY` and does not accept a bring-your-own-key scan path. Scans use the VibeRaven managed API after device login, same as the signed-in VS Code extension.
6
+
7
+ - API keys for model calls live on the server, not in the published npm package.
8
+ - Local credentials store only a VibeRaven access token in `%APPDATA%\viberaven\credentials.json` or `~/.config/viberaven/`.
9
+ - Never commit `credentials.json` or paste tokens into chat.
10
+
11
+ ## Safe Commands
12
+
13
+ Human terminal:
14
+
15
+ ```bash
16
+ npx -y viberaven
17
+ ```
18
+
19
+ Agent or CI gate:
20
+
21
+ ```bash
22
+ npx -y viberaven --agent-mode
23
+ npx -y viberaven --verify
24
+ npx -y viberaven --strict
25
+ ```
26
+
27
+ VibeRaven is the Agent Context + Production Gate. Agents should read `.viberaven/agent-tasklist.md`, `.viberaven/gate-result.json`, and `.viberaven/context-map.json` before claiming an app is safe to deploy.
28
+
29
+ ## Written Artifacts
30
+
31
+ After a scan, the CLI may create:
32
+
33
+ | Path | Contents |
34
+ |------|----------|
35
+ | `.viberaven/last-scan.json` | Full scan payload |
36
+ | `.viberaven/agent-tasklist.md` | Agent tasklist |
37
+ | `.viberaven/gate-result.json` | Machine gate verdict |
38
+ | `.viberaven/context-map.json` | Compact agent context |
39
+ | `.viberaven/gaps/<gapId>.json` | Per-gap evidence |
40
+ | `.viberaven/agent-summary.md` | Human/agent summary |
41
+ | `.viberaven/launch-playbook.md` | Launch checklist |
42
+ | `.viberaven/report.html` | Local HTML report |
43
+
44
+ Repo scanners redact common key patterns in evidence strings; the CLI runs an extra redaction pass before writing files.
45
+
46
+ ## Provider Boundaries
47
+
48
+ Provider dashboard checks are not cleared by repo-code edits. Billing/product configuration, DNS, webhooks, credentials, quotas, and live provider verification must be completed or verified in the provider dashboard or through read-only provider evidence.
49
+
50
+ ## MCP and npm Configuration
51
+
52
+ `@viberaven/mcp` runs the CLI as `npx -y --package=@viberaven/cli@<its own version> -- viberaven ...`. Before it starts that npx, it removes every `npm_package_*` and `npm_lifecycle_*` variable and every `npm_config_*` variable except registry, proxy, TLS and auth settings. So the environment the MCP was started in cannot change what npx runs, add `node-options`, or point npx at another npmrc file.
53
+
54
+ The child npx still reads npmrc files the normal way: your `~/.npmrc`, the global npmrc, and the `.npmrc` of the folder it runs in. That last one is the scanned repo's own `.npmrc`. It applies exactly as it does when you run `npx viberaven` in that folder yourself, and it can set options such as `node-options`. Only run VibeRaven, through MCP or directly, on repos whose `.npmrc` you would run npx under.
55
+
56
+ ## Reporting Issues
57
+
58
+ If you believe a scan artifact leaked a secret, rotate the key immediately and open an issue at https://github.com/ohad6k/VibeRaven/issues with the redacted file path only.
59
+
package/dist/cli.js CHANGED
@@ -8563,6 +8563,16 @@ function safe(text) {
8563
8563
  function at(loc) {
8564
8564
  return loc ? `${loc.file}:${loc.line}` : "an unknown location";
8565
8565
  }
8566
+ function policyNameNote(name) {
8567
+ if (/\bservice[ _-]?role\b/i.test(name)) {
8568
+ return ` The name mentions the service role, but the service role bypasses row level security and never needs a policy, so this one only opens the table to everyone else.`;
8569
+ }
8570
+ const promise = name.match(/\b(?:own|owner|owners|their|admins?|teachers?|creators?|authors?|members?|self)\b/i);
8571
+ if (promise) {
8572
+ return ` The name says "${name}", but nothing in the policy checks who the caller is.`;
8573
+ }
8574
+ return "";
8575
+ }
8566
8576
  function audience(roles) {
8567
8577
  const set = new Set(roles);
8568
8578
  if (set.has("public") || set.has("anon") && set.has("authenticated")) return "anyone, signed in or not,";
@@ -8618,7 +8628,7 @@ function analyzeRls(replay) {
8618
8628
  id: "rls_policy_allows_all_read",
8619
8629
  severity: "high",
8620
8630
  message: safe(
8621
- `Policy "${policy.name}" on ${table2.display} (${at(policy.loc)}) lets ${who} read every row: using (true). Fine for truly public content; wrong for anything per-user.`
8631
+ `Policy "${policy.name}" on ${table2.display} (${at(policy.loc)}) lets ${who} read every row: using (true). Fine for truly public content; wrong for anything per-user.${policyNameNote(policy.name)}`
8622
8632
  ),
8623
8633
  file: policy.loc.file,
8624
8634
  line: policy.loc.line,
@@ -8650,7 +8660,7 @@ function analyzeRls(replay) {
8650
8660
  permissive.push({
8651
8661
  id: "rls_policy_allows_all_write",
8652
8662
  severity,
8653
- message: safe(`Policy "${policy.name}" on ${table2.display} (${at(policy.loc)}) lets ${who} ${verb}: ${clause}.`),
8663
+ message: safe(`Policy "${policy.name}" on ${table2.display} (${at(policy.loc)}) lets ${who} ${verb}: ${clause}.${severity === "critical" ? policyNameNote(policy.name) : ""}`),
8654
8664
  file: policy.loc.file,
8655
8665
  line: policy.loc.line,
8656
8666
  table: table2.display,
@@ -13807,9 +13817,9 @@ var init_clipboard = __esm({
13807
13817
  }
13808
13818
  });
13809
13819
 
13810
- // node_modules/picocolors/picocolors.js
13820
+ // ../../../../../VibeRice/packages/cli/node_modules/picocolors/picocolors.js
13811
13821
  var require_picocolors = __commonJS({
13812
- "node_modules/picocolors/picocolors.js"(exports2, module2) {
13822
+ "../../../../../VibeRice/packages/cli/node_modules/picocolors/picocolors.js"(exports2, module2) {
13813
13823
  var p2 = process || {};
13814
13824
  var argv = p2.argv || [];
13815
13825
  var env = p2.env || {};
@@ -14033,9 +14043,9 @@ var init_terminalSummary = __esm({
14033
14043
  }
14034
14044
  });
14035
14045
 
14036
- // node_modules/sisteransi/src/index.js
14046
+ // ../../../../../VibeRice/packages/cli/node_modules/sisteransi/src/index.js
14037
14047
  var require_src = __commonJS({
14038
- "node_modules/sisteransi/src/index.js"(exports2, module2) {
14048
+ "../../../../../VibeRice/packages/cli/node_modules/sisteransi/src/index.js"(exports2, module2) {
14039
14049
  "use strict";
14040
14050
  var ESC = "\x1B";
14041
14051
  var CSI = `${ESC}[`;
@@ -14089,7 +14099,7 @@ var require_src = __commonJS({
14089
14099
  }
14090
14100
  });
14091
14101
 
14092
- // node_modules/@clack/core/dist/index.mjs
14102
+ // ../../../../../VibeRice/packages/cli/node_modules/@clack/core/dist/index.mjs
14093
14103
  function DD({ onlyFirst: e2 = false } = {}) {
14094
14104
  const t = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
14095
14105
  return new RegExp(t, e2 ? void 0 : "g");
@@ -14201,7 +14211,7 @@ function fD({ input: e2 = import_node_process.stdin, output: u2 = import_node_pr
14201
14211
  }
14202
14212
  var import_sisteransi, import_node_process, g, import_node_readline, import_node_stream, uD, W, tD, eD, FD, sD, w, N, I, R, C, iD, rD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, A, OD, PD, J, LD;
14203
14213
  var init_dist = __esm({
14204
- "node_modules/@clack/core/dist/index.mjs"() {
14214
+ "../../../../../VibeRice/packages/cli/node_modules/@clack/core/dist/index.mjs"() {
14205
14215
  import_sisteransi = __toESM(require_src(), 1);
14206
14216
  import_node_process = require("node:process");
14207
14217
  g = __toESM(require("node:readline"), 1);
@@ -14451,13 +14461,13 @@ var init_dist = __esm({
14451
14461
  }
14452
14462
  });
14453
14463
 
14454
- // node_modules/@clack/prompts/dist/index.mjs
14464
+ // ../../../../../VibeRice/packages/cli/node_modules/@clack/prompts/dist/index.mjs
14455
14465
  function ce() {
14456
14466
  return import_node_process2.default.platform !== "win32" ? import_node_process2.default.env.TERM !== "linux" : !!import_node_process2.default.env.CI || !!import_node_process2.default.env.WT_SESSION || !!import_node_process2.default.env.TERMINUS_SUBLIME || import_node_process2.default.env.ConEmuTask === "{cmd::Cmder}" || import_node_process2.default.env.TERM_PROGRAM === "Terminus-Sublime" || import_node_process2.default.env.TERM_PROGRAM === "vscode" || import_node_process2.default.env.TERM === "xterm-256color" || import_node_process2.default.env.TERM === "alacritty" || import_node_process2.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
14457
14467
  }
14458
14468
  var import_node_process2, import_picocolors2, import_sisteransi2, V2, u, le, L2, W2, C2, ue, o, d2, k2, P2, A2, T, F, $e, _2, me, de, pe, q, D, U, K2, b2, G2, ve, xe, Ie, Se, M2, J2, Y2;
14459
14469
  var init_dist2 = __esm({
14460
- "node_modules/@clack/prompts/dist/index.mjs"() {
14470
+ "../../../../../VibeRice/packages/cli/node_modules/@clack/prompts/dist/index.mjs"() {
14461
14471
  init_dist();
14462
14472
  init_dist();
14463
14473
  import_node_process2 = __toESM(require("node:process"), 1);
@@ -14690,7 +14700,7 @@ var VERSION;
14690
14700
  var init_version = __esm({
14691
14701
  "src/version.ts"() {
14692
14702
  "use strict";
14693
- VERSION = "1.6.1";
14703
+ VERSION = "1.6.2";
14694
14704
  }
14695
14705
  });
14696
14706