@viberaven/cli 1.4.4 → 1.5.1

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 (42) hide show
  1. package/AGENTS.md +157 -157
  2. package/LICENSE +21 -21
  3. package/README.md +1 -3
  4. package/SECURITY.md +59 -53
  5. package/dist/cli.js +13764 -32046
  6. package/dist/console/app.js +251 -251
  7. package/dist/console/index.html +46 -46
  8. package/dist/console/styles.css +267 -267
  9. package/dist/playbooks/_stack-default.json +11 -11
  10. package/dist/playbooks/auth-supabase.json +31 -31
  11. package/dist/playbooks/stripe.json +66 -66
  12. package/dist/playbooks/supabase.json +51 -51
  13. package/dist/playbooks/vercel.json +42 -42
  14. package/dist/report/report-cli.css +1466 -1466
  15. package/dist/report/station.css +11854 -11854
  16. package/dist/report/station.js +8317 -8317
  17. package/dist/stack/app.js +18 -0
  18. package/dist/stack/stack.css +854 -0
  19. package/package.json +84 -75
  20. package/playbooks/_stack-default.json +11 -11
  21. package/playbooks/auth-supabase.json +31 -31
  22. package/playbooks/stripe.json +66 -66
  23. package/playbooks/supabase.json +51 -51
  24. package/playbooks/vercel.json +42 -42
  25. package/schemas/permissions-matrix.schema.json +90 -0
  26. package/templates/AGENTS.snippet.md +52 -52
  27. package/templates/CLAUDE.snippet.md +17 -17
  28. package/templates/CURSOR.snippet.md +17 -17
  29. package/assets/report/assets/provider-authjs.svg +0 -5
  30. package/assets/report/assets/provider-aws.svg +0 -5
  31. package/assets/report/assets/provider-logrocket.svg +0 -4
  32. package/assets/report/assets/viberaven-favicon.png +0 -0
  33. package/assets/report/assets/viberaven-hero.png +0 -0
  34. package/assets/report/assets/viberaven-logo.png +0 -0
  35. package/assets/report/assets/viberaven-mascot.png +0 -0
  36. package/assets/report/assets/viberaven-table.png +0 -0
  37. package/assets/report/report-cli.css +0 -1466
  38. package/assets/report/station.css +0 -11854
  39. package/assets/report/station.js +0 -8319
  40. package/dist/cli.js.map +0 -7
  41. package/dist/report/assets/viberaven-hero.png +0 -0
  42. package/dist/report/assets/viberaven-table.png +0 -0
@@ -0,0 +1,90 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://viberaven.dev/schemas/permissions-matrix.v1.json",
4
+ "title": "VibeRaven permissions matrix (viberaven.permissions.json)",
5
+ "description": "Who may read, add, change and delete rows in each table, written by a person. `viberaven rls-test` checks the migrations against it. Never generate it from the app's own policies. Every cell is about rows owned by `owner`: owner acts on their own row, other_user is a different signed-in user acting on the owner's row, anon is a request with only the public anon key. For insert, the new row names the owner as its owner.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["version", "tables"],
9
+ "properties": {
10
+ "$schema": { "type": "string" },
11
+ "version": { "const": 1 },
12
+ "description": { "type": "string" },
13
+ "defaultGrants": {
14
+ "description": "Table grants the test database gives new public tables. supabase-legacy: anon and authenticated get all privileges on new public tables, as on existing Supabase projects (the more exposed assumption). none: no default grants, only what the migrations grant.",
15
+ "enum": ["supabase-legacy", "none"],
16
+ "default": "supabase-legacy"
17
+ },
18
+ "tables": {
19
+ "type": "object",
20
+ "minProperties": 1,
21
+ "propertyNames": { "pattern": "^[A-Za-z_][A-Za-z0-9_$]*(\\.[A-Za-z_][A-Za-z0-9_$]*)?$" },
22
+ "additionalProperties": { "$ref": "#/$defs/table" }
23
+ }
24
+ },
25
+ "$defs": {
26
+ "table": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": ["owner", "expect"],
30
+ "properties": {
31
+ "description": { "type": "string" },
32
+ "owner": {
33
+ "description": "How a row's owner is defined. Only `column = auth.uid()` is supported.",
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": ["column", "is"],
37
+ "properties": {
38
+ "column": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_$]*$" },
39
+ "is": { "const": "auth.uid()" }
40
+ }
41
+ },
42
+ "expect": { "$ref": "#/$defs/expectation" },
43
+ "seed": {
44
+ "description": "Values for columns the test cannot fill by itself (for example a NOT NULL foreign key). Used for every seeded and inserted row. Leave the owner column out.",
45
+ "type": "object",
46
+ "propertyNames": { "pattern": "^[A-Za-z_][A-Za-z0-9_$]*$" },
47
+ "additionalProperties": { "type": ["string", "number", "boolean", "null"] }
48
+ },
49
+ "updateColumn": {
50
+ "description": "Column the update probe changes. Default: the first plain column that is not the owner column or part of the primary key.",
51
+ "type": "string",
52
+ "pattern": "^[A-Za-z_][A-Za-z0-9_$]*$"
53
+ }
54
+ }
55
+ },
56
+ "expectation": {
57
+ "type": "object",
58
+ "additionalProperties": false,
59
+ "required": ["owner", "other_user", "anon"],
60
+ "properties": {
61
+ "owner": { "$ref": "#/$defs/actorCells" },
62
+ "other_user": { "$ref": "#/$defs/actorCells" },
63
+ "anon": { "$ref": "#/$defs/actorCells" },
64
+ "service_role": {
65
+ "description": "The service role bypasses RLS, so it is never tested.",
66
+ "const": "excluded"
67
+ }
68
+ }
69
+ },
70
+ "actorCells": {
71
+ "type": "object",
72
+ "additionalProperties": false,
73
+ "required": ["select", "insert", "update", "delete"],
74
+ "properties": {
75
+ "select": { "$ref": "#/$defs/cell" },
76
+ "insert": { "$ref": "#/$defs/cell" },
77
+ "update": { "$ref": "#/$defs/cell" },
78
+ "delete": { "$ref": "#/$defs/cell" },
79
+ "reassign": {
80
+ "description": "Optional. Setting the owner column of the owner's row to another user: the owner giving the row away, or another user taking it. Not tested when absent.",
81
+ "$ref": "#/$defs/cell"
82
+ }
83
+ }
84
+ },
85
+ "cell": {
86
+ "description": "allow: the action must work on the owner's row. deny: it must return nothing, change nothing, or be refused with a permission error. skip: not tested (N/A).",
87
+ "enum": ["allow", "deny", "skip"]
88
+ }
89
+ }
90
+ }
@@ -1,52 +1,52 @@
1
- ## VibeRaven Launch Readiness
2
-
3
- VibeRaven is the Agent Context + Production Gate.
4
-
5
- Use VibeRaven when the user asks if their AI-built app is production-ready, launch-ready, safer to deploy, or what is missing before ship.
6
-
7
- ### Humans
8
-
9
- ```bash
10
- npx -y viberaven
11
- ```
12
-
13
- In a real terminal, this opens the interactive VibeRaven menu.
14
-
15
- ### Agents
16
-
17
- Paste this into your coding agent:
18
-
19
- ```bash
20
- npx -y viberaven --agent-mode
21
- ```
22
-
23
- 1. Run `npx -y viberaven --agent-mode` from the project root.
24
- 2. If VibeRaven prints `LOGIN_URL_READY`, open that exact URL for the user. Say: "I opened VibeRaven sign-in so you can approve access; I will continue after approval." Do not ask for passwords, tokens, cookies, or secrets. Keep the terminal alive while the user approves.
25
- If the scan flow cannot start login, run `npx -y viberaven login`.
26
- 3. Read `.viberaven/agent-tasklist.md` first, `.viberaven/gate-result.json` for the machine verdict, and `.viberaven/context-map.json` for compact agent context. If the tasklist says `CRITICAL GAPS DETECTED` or `PRODUCTION GATE NOT CLEAR`, fix one listed repo-code gap before deploy.
27
- 4. Read `.viberaven/agent-summary.md` second for scan context.
28
- 5. Read `.viberaven/launch-playbook.md` third for the full checklist.
29
- 6. Use `npx -y viberaven next --json` or `npx -y viberaven prompt --gap <id>` for one focused repo-code fix. Local installs can use `viberaven prompt`.
30
- 7. For Vercel + Supabase, run `npx -y viberaven audit --vercel-supabase` and check RLS, service role exposure, and Supabase pooler port 6543 instead of runtime port 5432.
31
- 8. Do not claim provider dashboard checks are fixed by repo-code edits.
32
- 9. Verify with tests/build, then run `npx -y viberaven --verify`.
33
-
34
- Before deploy or CI pass:
35
-
36
- ```bash
37
- npx -y viberaven --strict
38
- ```
39
-
40
- Also available:
41
-
42
- - `.viberaven/last-scan.json` - full mission map and gaps
43
- - `.viberaven/report.html` - visual map for the user
44
- - `npx -y viberaven init --dry-run` - preview local agent rules
45
- - `npx -y viberaven clean --plan` - write a non-destructive cleanup plan
46
-
47
- Free plan: 2 lifetime scans, 6/12 mission map lanes. Pro: 50 scans/month, all 12 lanes.
48
-
49
- Same VibeRaven account and scan quota as the VS Code extension.
50
-
51
- Security: the CLI does not read `OPENAI_API_KEY`. Scans use VibeRaven login and the managed API; your model key stays server-side.
52
-
1
+ ## VibeRaven Launch Readiness
2
+
3
+ VibeRaven is the Agent Context + Production Gate.
4
+
5
+ Use VibeRaven when the user asks if their AI-built app is production-ready, launch-ready, safer to deploy, or what is missing before ship.
6
+
7
+ ### Humans
8
+
9
+ ```bash
10
+ npx -y viberaven
11
+ ```
12
+
13
+ In a real terminal, this opens the interactive VibeRaven menu.
14
+
15
+ ### Agents
16
+
17
+ Paste this into your coding agent:
18
+
19
+ ```bash
20
+ npx -y viberaven --agent-mode
21
+ ```
22
+
23
+ 1. Run `npx -y viberaven --agent-mode` from the project root.
24
+ 2. If VibeRaven prints `LOGIN_URL_READY`, open that exact URL for the user. Say: "I opened VibeRaven sign-in so you can approve access; I will continue after approval." Do not ask for passwords, tokens, cookies, or secrets. Keep the terminal alive while the user approves.
25
+ If the scan flow cannot start login, run `npx -y viberaven login`.
26
+ 3. Read `.viberaven/agent-tasklist.md` first, `.viberaven/gate-result.json` for the machine verdict, and `.viberaven/context-map.json` for compact agent context. If the tasklist says `CRITICAL GAPS DETECTED` or `PRODUCTION GATE NOT CLEAR`, fix one listed repo-code gap before deploy.
27
+ 4. Read `.viberaven/agent-summary.md` second for scan context.
28
+ 5. Read `.viberaven/launch-playbook.md` third for the full checklist.
29
+ 6. Use `npx -y viberaven next --json` or `npx -y viberaven prompt --gap <id>` for one focused repo-code fix. Local installs can use `viberaven prompt`.
30
+ 7. For Vercel + Supabase, run `npx -y viberaven audit --vercel-supabase` and check RLS, service role exposure, and Supabase pooler port 6543 instead of runtime port 5432.
31
+ 8. Do not claim provider dashboard checks are fixed by repo-code edits.
32
+ 9. Verify with tests/build, then run `npx -y viberaven --verify`.
33
+
34
+ Before deploy or CI pass:
35
+
36
+ ```bash
37
+ npx -y viberaven --strict
38
+ ```
39
+
40
+ Also available:
41
+
42
+ - `.viberaven/last-scan.json` - full mission map and gaps
43
+ - `.viberaven/report.html` - visual map for the user
44
+ - `npx -y viberaven init --dry-run` - preview local agent rules
45
+ - `npx -y viberaven clean --plan` - write a non-destructive cleanup plan
46
+
47
+ Free plan: 2 lifetime scans, 6/12 mission map lanes. Pro: 50 scans/month, all 12 lanes.
48
+
49
+ Same VibeRaven account and scan quota as the VS Code extension.
50
+
51
+ Security: the CLI does not read `OPENAI_API_KEY`. Scans use VibeRaven login and the managed API; your model key stays server-side.
52
+
@@ -1,17 +1,17 @@
1
- <!-- viberaven:agent-rules:start -->
2
- ## VibeRaven Agent Rules
3
-
4
- VibeRaven is the Agent Context + Production Gate.
5
-
6
- - When production readiness, launch readiness, Vercel, Supabase, auth, database, payments, monitoring, deployment, rate limits, or error handling comes up, run `npx -y viberaven --agent-mode` from the project root.
7
- - Read `.viberaven/agent-tasklist.md` first, `.viberaven/gate-result.json` for the machine verdict, and `.viberaven/context-map.json` for compact agent context.
8
- - Read `.viberaven/agent-summary.md` before editing code.
9
- - Read `.viberaven/launch-playbook.md` before editing code.
10
- - Use `npx -y viberaven next --json` or `npx -y viberaven prompt --gap <id>` for one focused repo-code fix at a time.
11
- - Run `npx -y viberaven --verify` after one fix.
12
- - Run `npx -y viberaven --strict` before deploy or CI pass.
13
- - For Vercel + Supabase launch checks, run `npx -y viberaven audit --vercel-supabase`.
14
- - Do not claim provider dashboard work is fixed by repo-code edits. Provider dashboard checks, billing/product configuration, DNS, webhooks, credentials, quotas, and live provider verification must be completed or verified in the provider dashboard.
15
- - If VibeRaven prints `LOGIN_URL_READY`, open that URL for the user using the available browser tool or system browser. Tell the user: "I opened VibeRaven sign-in so you can approve access; I will continue after approval." Do not ask for passwords, tokens, cookies, or secrets. Keep the terminal process alive while the user approves.
16
- <!-- viberaven:agent-rules:end -->
17
-
1
+ <!-- viberaven:agent-rules:start -->
2
+ ## VibeRaven Agent Rules
3
+
4
+ VibeRaven is the Agent Context + Production Gate.
5
+
6
+ - When production readiness, launch readiness, Vercel, Supabase, auth, database, payments, monitoring, deployment, rate limits, or error handling comes up, run `npx -y viberaven --agent-mode` from the project root.
7
+ - Read `.viberaven/agent-tasklist.md` first, `.viberaven/gate-result.json` for the machine verdict, and `.viberaven/context-map.json` for compact agent context.
8
+ - Read `.viberaven/agent-summary.md` before editing code.
9
+ - Read `.viberaven/launch-playbook.md` before editing code.
10
+ - Use `npx -y viberaven next --json` or `npx -y viberaven prompt --gap <id>` for one focused repo-code fix at a time.
11
+ - Run `npx -y viberaven --verify` after one fix.
12
+ - Run `npx -y viberaven --strict` before deploy or CI pass.
13
+ - For Vercel + Supabase launch checks, run `npx -y viberaven audit --vercel-supabase`.
14
+ - Do not claim provider dashboard work is fixed by repo-code edits. Provider dashboard checks, billing/product configuration, DNS, webhooks, credentials, quotas, and live provider verification must be completed or verified in the provider dashboard.
15
+ - If VibeRaven prints `LOGIN_URL_READY`, open that URL for the user using the available browser tool or system browser. Tell the user: "I opened VibeRaven sign-in so you can approve access; I will continue after approval." Do not ask for passwords, tokens, cookies, or secrets. Keep the terminal process alive while the user approves.
16
+ <!-- viberaven:agent-rules:end -->
17
+
@@ -1,17 +1,17 @@
1
- <!-- viberaven:agent-rules:start -->
2
- ## VibeRaven Agent Rules
3
-
4
- VibeRaven is the Agent Context + Production Gate.
5
-
6
- - When production readiness, launch readiness, Vercel, Supabase, auth, database, payments, monitoring, deployment, rate limits, or error handling comes up, run `npx -y viberaven --agent-mode` from the project root.
7
- - Read `.viberaven/agent-tasklist.md` first, `.viberaven/gate-result.json` for the machine verdict, and `.viberaven/context-map.json` for compact agent context.
8
- - Read `.viberaven/agent-summary.md` before editing code.
9
- - Read `.viberaven/launch-playbook.md` before editing code.
10
- - Use `npx -y viberaven next --json` or `npx -y viberaven prompt --gap <id>` for one focused repo-code fix at a time.
11
- - Run `npx -y viberaven --verify` after one fix.
12
- - Run `npx -y viberaven --strict` before deploy or CI pass.
13
- - For Vercel + Supabase launch checks, run `npx -y viberaven audit --vercel-supabase`.
14
- - Do not claim provider dashboard work is fixed by repo-code edits. Provider dashboard checks, billing/product configuration, DNS, webhooks, credentials, quotas, and live provider verification must be completed or verified in the provider dashboard.
15
- - If VibeRaven prints `LOGIN_URL_READY`, open that URL for the user using the available browser tool or system browser. Tell the user: "I opened VibeRaven sign-in so you can approve access; I will continue after approval." Do not ask for passwords, tokens, cookies, or secrets. Keep the terminal process alive while the user approves.
16
- <!-- viberaven:agent-rules:end -->
17
-
1
+ <!-- viberaven:agent-rules:start -->
2
+ ## VibeRaven Agent Rules
3
+
4
+ VibeRaven is the Agent Context + Production Gate.
5
+
6
+ - When production readiness, launch readiness, Vercel, Supabase, auth, database, payments, monitoring, deployment, rate limits, or error handling comes up, run `npx -y viberaven --agent-mode` from the project root.
7
+ - Read `.viberaven/agent-tasklist.md` first, `.viberaven/gate-result.json` for the machine verdict, and `.viberaven/context-map.json` for compact agent context.
8
+ - Read `.viberaven/agent-summary.md` before editing code.
9
+ - Read `.viberaven/launch-playbook.md` before editing code.
10
+ - Use `npx -y viberaven next --json` or `npx -y viberaven prompt --gap <id>` for one focused repo-code fix at a time.
11
+ - Run `npx -y viberaven --verify` after one fix.
12
+ - Run `npx -y viberaven --strict` before deploy or CI pass.
13
+ - For Vercel + Supabase launch checks, run `npx -y viberaven audit --vercel-supabase`.
14
+ - Do not claim provider dashboard work is fixed by repo-code edits. Provider dashboard checks, billing/product configuration, DNS, webhooks, credentials, quotas, and live provider verification must be completed or verified in the provider dashboard.
15
+ - If VibeRaven prints `LOGIN_URL_READY`, open that URL for the user using the available browser tool or system browser. Tell the user: "I opened VibeRaven sign-in so you can approve access; I will continue after approval." Do not ask for passwords, tokens, cookies, or secrets. Keep the terminal process alive while the user approves.
16
+ <!-- viberaven:agent-rules:end -->
17
+
@@ -1,5 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" aria-hidden="true">
2
- <path fill="#412991" d="M32 5 11 16.8v13.7c0 12.2 8.9 23.3 21 27 12.1-3.7 21-14.8 21-27V16.8L32 5Z"/>
3
- <path fill="#EB5424" d="M32 5v48.7c-3.1-1.1-6.1-2.7-8.7-4.7L32 5Z"/>
4
- <path fill="#FBC22C" d="m32 5 8.7 44c-2.6 2-5.6 3.6-8.7 4.7V5Z"/>
5
- </svg>
@@ -1,5 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 64" aria-hidden="true">
2
- <text x="48" y="31" text-anchor="middle" font-family="Arial, Helvetica, sans-serif" font-size="21" font-weight="800" letter-spacing="-1.4" fill="#111827">AWS</text>
3
- <path fill="#FF9900" d="M23.6 42.4c13.9 7.5 31.5 7.5 45.1-.1 1.1-.6 2.2.8 1.3 1.7-12.3 12.5-34.3 12.6-47.2.8-.9-.8-.3-2.9.8-2.4Z"/>
4
- <path fill="#FF9900" d="M66.8 39.8c2.4-.3 7.8-.8 8.8 1 .9 1.6-1 5.8-2.5 8.2-.5.8-1.7.4-1.5-.6.5-2.1 1.3-4.8.5-5.8-.8-1-3.8-.8-5.4-.6-1 .1-1.2-2-.1-2.2h.2Z"/>
5
- </svg>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" aria-hidden="true">
2
- <path fill="#764ABC" fill-rule="evenodd" clip-rule="evenodd" d="M26.8 12.9A20.8 20.8 0 0 1 32.3 7a20.5 20.5 0 0 1 5.5 5.8 29.3 29.3 0 0 1 5.1 17.1c1.1.9 2.3 1.8 3.4 2.7a6.2 6.2 0 0 1 2 5.7c-.5 2.6-1.1 5.2-1.6 7.8a2.2 2.2 0 0 1-3.3 1.1c-1.8-1.5-3.6-3-5.4-4.5a8.4 8.4 0 0 1-5.2 2.3 8.5 8.5 0 0 1-6.1-2.2c-1.3 1-2.5 2.1-3.8 3.2-.6.6-1.2 1-1.9 1.4a2.2 2.2 0 0 1-2.9-1.4c-.6-2.5-1.2-5.1-1.8-7.6a6.3 6.3 0 0 1 2.1-6c1-.8 2-1.6 3-2.3.3-.2.1-.5.2-.7a29.3 29.3 0 0 1 5.2-16.5Zm2.2 8.2a4.3 4.3 0 0 0 .4 5.8 4.8 4.8 0 0 0 6.5.1 4.3 4.3 0 0 0 1.1-4.8 4.4 4.4 0 0 0-3.9-2.9 4.5 4.5 0 0 0-4.1 1.8Zm3.3 4.9a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2Z"/>
3
- <path fill="#764ABC" d="M26.4 48.1a1.1 1.1 0 0 1 1.6-.9 10.4 10.4 0 0 0 9 0 1.1 1.1 0 0 1 1.6.8v4.8a1.1 1.1 0 0 1-1.7.8c-.5-.4-.9-.9-1.4-1.3-.7 1.4-1.4 2.8-2.1 4.1a1.1 1.1 0 0 1-1.8 0c-.8-1.4-1.4-2.8-2.2-4.1-.4.4-.9.9-1.3 1.3a1.1 1.1 0 0 1-1.7-.8v-4.7Z"/>
4
- </svg>