@viberaven/cli 1.2.1 → 1.2.3
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/README.md +31 -75
- package/dist/cli.js +26 -33
- package/dist/cli.js.map +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,129 +4,85 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/@viberaven/cli)
|
|
5
5
|
[](https://www.npmjs.com/package/@viberaven/cli)
|
|
6
6
|
|
|
7
|
-
VibeRaven
|
|
7
|
+
**VibeRaven Studio** — local-first open-source console for AI-built apps. Chat with your connected coding CLI, attach provider and release context, and work from localhost.
|
|
8
8
|
|
|
9
9
|
Public repo: https://github.com/ohad6k/VibeRaven
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Humans
|
|
11
|
+
## Run Studio
|
|
14
12
|
|
|
15
13
|
```bash
|
|
16
14
|
npx -y viberaven
|
|
17
15
|
```
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
Opens VibeRaven Studio on `localhost` in the current project:
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
- Connect **Codex CLI**, **Claude Code**, or **Gemini CLI** (your existing CLI account — no OpenAI API key in VibeRaven).
|
|
20
|
+
- **Terminal** tab: install → sign in → **Test connection** (chat only works after verify).
|
|
21
|
+
- **Chat** tab: scoped missions that can edit the repo (permission mode: ask each change or full access).
|
|
22
|
+
- Provider Control Board and Versions & Releases context for drag-to-chat.
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
Explicit UI command:
|
|
24
25
|
|
|
25
26
|
```bash
|
|
26
|
-
npx -y viberaven
|
|
27
|
+
npx -y viberaven ui .
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Install agent rules (optional)
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx -y viberaven init --agents all
|
|
27
34
|
```
|
|
28
35
|
|
|
29
|
-
|
|
36
|
+
Preview without writing files: `npx -y viberaven init --agents all --dry-run`
|
|
37
|
+
|
|
38
|
+
## Agent production gate (CI & coding agents)
|
|
39
|
+
|
|
40
|
+
VibeRaven is also the **Agent Context + Production Gate** for pre-deploy checks. Use this path when an agent or CI job needs repo evidence, not the Studio UI.
|
|
30
41
|
|
|
31
42
|
```bash
|
|
32
|
-
|
|
43
|
+
npx -y viberaven --agent-mode
|
|
33
44
|
```
|
|
34
45
|
|
|
35
|
-
|
|
46
|
+
Read artifacts in order:
|
|
36
47
|
|
|
37
48
|
1. `.viberaven/agent-tasklist.md`
|
|
38
49
|
2. `.viberaven/gate-result.json`
|
|
39
50
|
3. `.viberaven/context-map.json`
|
|
40
|
-
4. `.viberaven/agent-summary.md`
|
|
41
|
-
5. `.viberaven/launch-playbook.md`
|
|
42
51
|
|
|
43
|
-
Fix one repo-code gap, then
|
|
52
|
+
Fix one repo-code gap, then:
|
|
44
53
|
|
|
45
54
|
```bash
|
|
46
55
|
npx -y viberaven --verify
|
|
47
56
|
npx -y viberaven --strict
|
|
48
57
|
```
|
|
49
58
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
npx -y viberaven next --json
|
|
54
|
-
npx -y viberaven prompt --gap <id>
|
|
55
|
-
npx -y viberaven audit --vercel-supabase
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Chat-native production actions
|
|
59
|
+
Focused helpers: `npx -y viberaven next --json`, `npx -y viberaven prompt --gap <id>`, `npx -y viberaven audit --vercel-supabase`
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
### Chat-native actions
|
|
61
62
|
|
|
62
63
|
```bash
|
|
63
|
-
npx -y viberaven --agent-mode
|
|
64
64
|
npx -y viberaven actions
|
|
65
65
|
npx -y viberaven verify --action VR-A1
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
Chat output is intentionally limited to focused actions, provider targets, copy payloads, verification commands, repo-relative file targets, and resume prompts. It does not print secrets, raw env values, or generic dashboard link dumps.
|
|
71
|
-
|
|
72
|
-
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.
|
|
68
|
+
Writes `.viberaven/actions.json` as the action surface contract. Provider dashboard steps are not cleared by repo edits alone.
|
|
73
69
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
npx -y viberaven preview --agent-mode
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
The preview uses sample renderer data to show the intended chat-native shape. It is not a production verdict for the current repository.
|
|
81
|
-
|
|
82
|
-
## Agent infrastructure direction
|
|
83
|
-
|
|
84
|
-
VibeRaven's action model is designed for normal Codex, Claude Code, Cursor, and MCP workflows today, and for richer agent hosts later.
|
|
85
|
-
|
|
86
|
-
Managed-agent systems need durable sessions, observable event history, credential boundaries, bounded execution, and resumable action state. VibeRaven keeps those concerns in the manifest contract:
|
|
87
|
-
|
|
88
|
-
- `.viberaven/actions.json` is the current action surface.
|
|
89
|
-
- `.viberaven/action-registry.json` preserves stable IDs and lifecycle history.
|
|
90
|
-
- Future session events can add an append-only timeline without changing the current action model.
|
|
91
|
-
- Provider credentials and raw env values must stay out of chat output, manifests, MCP resources, and UI renderers.
|
|
92
|
-
- Future local/hosted consoles should execute only narrow VibeRaven commands, not arbitrary shell text.
|
|
93
|
-
|
|
94
|
-
## Production Copilot Loop
|
|
95
|
-
|
|
96
|
-
VibeRaven runs a batch-disciplined loop until the production gate clears. Do not stop at "scan complete."
|
|
97
|
-
|
|
98
|
-
1. **Scan** — Run `--agent-mode`. Read `.viberaven/agent-tasklist.md` and parse `VIBERAVEN_NEXT_ACTION` from stdout for `batchSize`, `batchApplied`, `scanNow`, and `stalled`.
|
|
99
|
-
2. **Batch heals** — For each repo-code task where `requiresUserAction: false`, apply up to `batchSize` heals per batch (free=3, pro=10) via `viberaven_heal_apply { gap: "<gapId>", yes: true }` or `--heal --apply --gap <id> --yes`. When `scanNow: true`, verify before applying more heals.
|
|
100
|
-
3. **Verify and clear** — Run `--verify` once per batch (not after every heal). Repeat until `gate.status === 'clear'` in `.viberaven/gate-result.json`. For provider gaps, read `VIBERAVEN_PROVIDER_ACTION`, complete the dashboard step, then verify.
|
|
101
|
-
|
|
102
|
-
If `stalled: true`, stop calling verify and address provider-action gaps or report to the user. Run `--strict` before deploy or CI pass.
|
|
103
|
-
|
|
104
|
-
## Machine Output
|
|
70
|
+
### Machine output
|
|
105
71
|
|
|
106
72
|
```bash
|
|
107
73
|
npx -y viberaven --agent-mode --json
|
|
108
|
-
npx -y viberaven --agent-mode --jsonl
|
|
109
74
|
npx -y viberaven --strict --json
|
|
110
75
|
```
|
|
111
76
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
```text
|
|
115
|
-
docs/contracts/artifacts.md
|
|
116
|
-
https://viberaven.dev/schemas/gate-result.schema.json
|
|
117
|
-
https://viberaven.dev/schemas/context-map.schema.json
|
|
118
|
-
https://viberaven.dev/schemas/gap.schema.json
|
|
119
|
-
https://viberaven.dev/schemas/heal-result.schema.json
|
|
120
|
-
```
|
|
77
|
+
Artifact schemas: `docs/contracts/artifacts.md`, https://viberaven.dev/schemas/gate-result.schema.json, https://viberaven.dev/schemas/context-map.schema.json, https://viberaven.dev/schemas/gap.schema.json, https://viberaven.dev/schemas/heal-result.schema.json
|
|
121
78
|
|
|
122
79
|
## Development
|
|
123
80
|
|
|
124
81
|
```bash
|
|
125
|
-
npm run
|
|
126
|
-
npm
|
|
127
|
-
node packages/cli/dist/cli.js scan
|
|
82
|
+
npm run build
|
|
83
|
+
npm test
|
|
128
84
|
```
|
|
129
85
|
|
|
130
86
|
## License
|
|
131
87
|
|
|
132
|
-
|
|
88
|
+
MIT
|
package/dist/cli.js
CHANGED
|
@@ -12304,7 +12304,7 @@ var VERSION;
|
|
|
12304
12304
|
var init_version = __esm({
|
|
12305
12305
|
"src/version.ts"() {
|
|
12306
12306
|
"use strict";
|
|
12307
|
-
VERSION = "1.2.
|
|
12307
|
+
VERSION = "1.2.3";
|
|
12308
12308
|
}
|
|
12309
12309
|
});
|
|
12310
12310
|
|
|
@@ -18846,17 +18846,19 @@ function connectCliAgent(agentId, chatIndex, options) {
|
|
|
18846
18846
|
}
|
|
18847
18847
|
|
|
18848
18848
|
function cliSetupProbeLabel() {
|
|
18849
|
-
return demo.cliProbeStatus === 'probing' ? 'Testing
|
|
18849
|
+
return demo.cliProbeStatus === 'probing' ? 'Testing\u2026' : demo.cliProbeStatus === 'success' ? 'Connected' : demo.cliProbeStatus === 'failed' ? 'Try again' : 'Test connection';
|
|
18850
18850
|
}
|
|
18851
18851
|
|
|
18852
18852
|
function CliSetupActions(targetId, index) {
|
|
18853
18853
|
const setup = cliSetupFor(targetId);
|
|
18854
18854
|
const probeLabel = cliSetupProbeLabel();
|
|
18855
|
-
|
|
18855
|
+
const ctaPending = demo.cliProbeStatus !== 'success' && demo.cliProbeStatus !== 'probing';
|
|
18856
|
+
const ctaClass = 'vr-cli-action-button is-primary' + (ctaPending ? ' is-pending' : '');
|
|
18857
|
+
return '<p class="vr-cli-setup-cta-hint">After sign-in, click <strong>Test connection</strong> \u2014 chat only works once verified.</p>' +
|
|
18858
|
+
'<div class="vr-cli-connect-expand-actions">' +
|
|
18856
18859
|
'<button class="vr-cli-action-button" type="button" data-action="run-cli-install" data-cli-agent="' + escapeHtml(targetId) + '" data-chat-index="' + String(index) + '">' + Icon('shell') + 'Run install</button>' +
|
|
18857
18860
|
'<button class="vr-cli-action-button" type="button" data-action="run-cli-signin" data-cli-agent="' + escapeHtml(targetId) + '" data-chat-index="' + String(index) + '">' + Icon('shell') + 'Run sign in</button>' +
|
|
18858
|
-
'<button class="
|
|
18859
|
-
'<button class="vr-cli-action-button is-primary" type="button" data-action="test-cli-connection" data-cli-agent="' + escapeHtml(targetId) + '" data-chat-index="' + String(index) + '">' + Icon('refresh') + escapeHtml(probeLabel) + '</button>' +
|
|
18861
|
+
'<button class="' + ctaClass + '" type="button" data-action="test-cli-connection" data-cli-agent="' + escapeHtml(targetId) + '" data-chat-index="' + String(index) + '">' + Icon('refresh') + escapeHtml(probeLabel) + '</button>' +
|
|
18860
18862
|
'</div>' +
|
|
18861
18863
|
'<p class="vr-cli-setup-hint">Type commands in the Studio terminal below, or run: <code>' + escapeHtml(setup.installCommand) + '</code> then <code>' + escapeHtml(setup.signInCommand) + '</code></p>';
|
|
18862
18864
|
}
|
|
@@ -19298,7 +19300,7 @@ async function runCliSignInInStudio(agentId, chatIndex) {
|
|
|
19298
19300
|
String(payload?.output || payload?.message || 'Sign-in command finished.'),
|
|
19299
19301
|
payload?.interactiveNote ? String(payload.interactiveNote) : '',
|
|
19300
19302
|
'',
|
|
19301
|
-
'Complete any browser login, then click
|
|
19303
|
+
'Complete any browser login, then click Test connection below to verify.'
|
|
19302
19304
|
]);
|
|
19303
19305
|
demo.cliTerminalDraft = setupCommandFallback(agentId, 'sign-in');
|
|
19304
19306
|
demo.notice = 'Sign-in ran in Studio terminal. Finish login if prompted, then test the connection.';
|
|
@@ -19330,7 +19332,7 @@ async function openCliOsTerminal(agentId, chatIndex) {
|
|
|
19330
19332
|
'',
|
|
19331
19333
|
String(payload?.message || 'Complete sign-in in the OS terminal window that opened.'),
|
|
19332
19334
|
'',
|
|
19333
|
-
'When login finishes, return here and click
|
|
19335
|
+
'When login finishes, return here and click Test connection below to verify.'
|
|
19334
19336
|
]);
|
|
19335
19337
|
demo.notice = payload?.ok ? 'OS terminal opened for sign-in fallback.' : 'Could not open an OS terminal window.';
|
|
19336
19338
|
} catch {
|
|
@@ -19340,16 +19342,6 @@ async function openCliOsTerminal(agentId, chatIndex) {
|
|
|
19340
19342
|
render();
|
|
19341
19343
|
}
|
|
19342
19344
|
|
|
19343
|
-
function finishCliSignIn(agentId, chatIndex) {
|
|
19344
|
-
const laneIndex = Math.max(0, Number(chatIndex) || 0);
|
|
19345
|
-
setConnectTarget(agentId);
|
|
19346
|
-
demo.pickerChatIndex = laneIndex;
|
|
19347
|
-
demo.activeStudioTab = 'terminal';
|
|
19348
|
-
appendTerminalLines(['If sign-in finished in the browser or OS window, click Test connection below.', '']);
|
|
19349
|
-
demo.notice = 'When sign-in finishes, click Test connection to verify.';
|
|
19350
|
-
render();
|
|
19351
|
-
}
|
|
19352
|
-
|
|
19353
19345
|
function ModelPicker(index) {
|
|
19354
19346
|
const chat = chatContext(index);
|
|
19355
19347
|
const models = allModelOptions(index);
|
|
@@ -19695,12 +19687,8 @@ function renderAgentAnswerHtml(rawText, chatIndex, cards) {
|
|
|
19695
19687
|
const hasMissionPlanSteps = Boolean(cards && Array.isArray(cards.planSteps) && cards.planSteps.length);
|
|
19696
19688
|
const structured = parseAgentSections(visibleText, { skipPlanSections: hasMissionPlanSteps });
|
|
19697
19689
|
if (structured) {
|
|
19698
|
-
const hasGateSection = structured.some((section) => section.name.toLowerCase() === 'gate');
|
|
19699
|
-
const gateStrip = !hasGateSection && currentState.gate && currentState.gate.label
|
|
19700
|
-
? AgentGateStrip('', currentState.gate)
|
|
19701
|
-
: '';
|
|
19702
19690
|
const sectionCards = structured.map((section) => renderAgentSectionCard(section, chatIndex)).join('');
|
|
19703
|
-
return '<div class="vr-agent-answer-body vr-agent-answer-structured"><div class="vr-agent-sections">' +
|
|
19691
|
+
return '<div class="vr-agent-answer-body vr-agent-answer-structured"><div class="vr-agent-sections">' + sectionCards + '</div></div>';
|
|
19704
19692
|
}
|
|
19705
19693
|
const blocks = [];
|
|
19706
19694
|
let listType = null;
|
|
@@ -20225,7 +20213,7 @@ app.addEventListener('click', async (event) => {
|
|
|
20225
20213
|
return;
|
|
20226
20214
|
}
|
|
20227
20215
|
|
|
20228
|
-
const connectActionButton = event.target.closest('[data-action="run-cli-install"], [data-action="run-cli-signin"], [data-action="
|
|
20216
|
+
const connectActionButton = event.target.closest('[data-action="run-cli-install"], [data-action="run-cli-signin"], [data-action="open-os-terminal"], [data-action="test-cli-connection"], [data-action="copy-cli-command"], [data-action="terminal-select-cli"], [data-action="terminal-shell-run"], [data-action="connect-complete-chat"], [data-action="reset-cli-connect"]');
|
|
20229
20217
|
if (connectActionButton) {
|
|
20230
20218
|
const action = connectActionButton.getAttribute('data-action');
|
|
20231
20219
|
const agentId = connectActionButton.getAttribute('data-cli-agent') || demo.cliConnectTargetId || 'codex';
|
|
@@ -20279,10 +20267,6 @@ app.addEventListener('click', async (event) => {
|
|
|
20279
20267
|
await runCliSignInInStudio(agentId, chatIndex);
|
|
20280
20268
|
return;
|
|
20281
20269
|
}
|
|
20282
|
-
if (action === 'finish-cli-signin') {
|
|
20283
|
-
finishCliSignIn(agentId, chatIndex);
|
|
20284
|
-
return;
|
|
20285
|
-
}
|
|
20286
20270
|
if (action === 'open-os-terminal') {
|
|
20287
20271
|
await openCliOsTerminal(agentId, chatIndex);
|
|
20288
20272
|
return;
|
|
@@ -20548,12 +20532,6 @@ app.addEventListener('click', async (event) => {
|
|
|
20548
20532
|
await runCliSignInInStudio(agentId, chatIndex);
|
|
20549
20533
|
return;
|
|
20550
20534
|
}
|
|
20551
|
-
if (action === 'finish-cli-signin') {
|
|
20552
|
-
const agentId = actionButton.getAttribute('data-cli-agent') || demo.cliConnectTargetId || 'codex';
|
|
20553
|
-
const chatIndex = Number(actionButton.getAttribute('data-chat-index') || demo.pickerChatIndex || 0);
|
|
20554
|
-
finishCliSignIn(agentId, chatIndex);
|
|
20555
|
-
return;
|
|
20556
|
-
}
|
|
20557
20535
|
if (action === 'open-os-terminal') {
|
|
20558
20536
|
const agentId = actionButton.getAttribute('data-cli-agent') || demo.cliConnectTargetId || 'codex';
|
|
20559
20537
|
const chatIndex = Number(actionButton.getAttribute('data-chat-index') || demo.pickerChatIndex || 0);
|
|
@@ -23790,6 +23768,21 @@ body:has(.vr-app.is-dragging) {
|
|
|
23790
23768
|
background: rgba(124, 58, 237, 0.92);
|
|
23791
23769
|
color: #fff;
|
|
23792
23770
|
}
|
|
23771
|
+
.vr-cli-setup-cta-hint {
|
|
23772
|
+
margin: 0 0 6px;
|
|
23773
|
+
color: #94a3b8;
|
|
23774
|
+
font-size: 11px;
|
|
23775
|
+
font-weight: 500;
|
|
23776
|
+
line-height: 1.35;
|
|
23777
|
+
}
|
|
23778
|
+
.vr-cli-setup-cta-hint strong {
|
|
23779
|
+
color: #c4b5fd;
|
|
23780
|
+
font-weight: 650;
|
|
23781
|
+
}
|
|
23782
|
+
.vr-cli-action-button.is-primary.is-pending {
|
|
23783
|
+
border-color: rgba(168, 85, 247, 0.55);
|
|
23784
|
+
box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.25);
|
|
23785
|
+
}
|
|
23793
23786
|
.vr-cli-strip button.is-connect-target {
|
|
23794
23787
|
border-color: rgba(248, 250, 252, 0.34);
|
|
23795
23788
|
box-shadow: inset 0 0 0 1px rgba(248, 250, 252, 0.08);
|