@viberaven/cli 1.1.7 → 1.1.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.
- package/README.md +20 -0
- package/dist/cli.js +142 -22
- package/dist/cli.js.map +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -67,6 +67,26 @@ Chat output is intentionally limited to focused actions, provider targets, copy
|
|
|
67
67
|
|
|
68
68
|
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.
|
|
69
69
|
|
|
70
|
+
Preview the action surface without login, scan, or API spend:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npx -y viberaven preview --agent-mode
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The preview uses sample renderer data to show the intended chat-native shape. It is not a production verdict for the current repository.
|
|
77
|
+
|
|
78
|
+
## Agent infrastructure direction
|
|
79
|
+
|
|
80
|
+
VibeRaven's action model is designed for normal Codex, Claude Code, Cursor, and MCP workflows today, and for richer agent hosts later.
|
|
81
|
+
|
|
82
|
+
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:
|
|
83
|
+
|
|
84
|
+
- `.viberaven/actions.json` is the current action surface.
|
|
85
|
+
- `.viberaven/action-registry.json` preserves stable IDs and lifecycle history.
|
|
86
|
+
- Future session events can add an append-only timeline without changing the current action model.
|
|
87
|
+
- Provider credentials and raw env values must stay out of chat output, manifests, MCP resources, and UI renderers.
|
|
88
|
+
- Future local/hosted consoles should execute only narrow VibeRaven commands, not arbitrary shell text.
|
|
89
|
+
|
|
70
90
|
## Production Copilot Loop
|
|
71
91
|
|
|
72
92
|
VibeRaven runs a batch-disciplined loop until the production gate clears. Do not stop at "scan complete."
|
package/dist/cli.js
CHANGED
|
@@ -621,12 +621,12 @@ function createOpenCommand(target, platform = process.platform) {
|
|
|
621
621
|
}
|
|
622
622
|
async function openWithSystemDefault(target) {
|
|
623
623
|
const { command, args, shell } = createOpenCommand(target);
|
|
624
|
-
await new Promise((
|
|
624
|
+
await new Promise((resolve6, reject) => {
|
|
625
625
|
const child = (0, import_node_child_process.spawn)(command, args, { stdio: "ignore", shell });
|
|
626
626
|
child.on("error", reject);
|
|
627
627
|
child.on("exit", (code) => {
|
|
628
628
|
if (code === 0) {
|
|
629
|
-
|
|
629
|
+
resolve6();
|
|
630
630
|
} else {
|
|
631
631
|
reject(new Error(`Could not open browser (exit ${code ?? "unknown"}). Open manually: ${target}`));
|
|
632
632
|
}
|
|
@@ -666,7 +666,7 @@ function healPlanGapCommand(gapId) {
|
|
|
666
666
|
// src/auth.ts
|
|
667
667
|
var PUBLIC_LOGIN_COMMAND = `${PUBLIC_COMMAND} login`;
|
|
668
668
|
function sleep(ms) {
|
|
669
|
-
return new Promise((
|
|
669
|
+
return new Promise((resolve6) => setTimeout(resolve6, ms));
|
|
670
670
|
}
|
|
671
671
|
async function runDeviceLogin(apiBaseUrl) {
|
|
672
672
|
const signIn = await startManagedSignIn(apiBaseUrl);
|
|
@@ -9444,8 +9444,8 @@ function stripWindowsDrive(value) {
|
|
|
9444
9444
|
}
|
|
9445
9445
|
function stripAbsolutePrefix(value) {
|
|
9446
9446
|
const normalized = slashPath(value);
|
|
9447
|
-
const
|
|
9448
|
-
if (!
|
|
9447
|
+
const isAbsolute3 = /^[a-z]:\//i.test(normalized) || normalized.startsWith("/");
|
|
9448
|
+
if (!isAbsolute3) {
|
|
9449
9449
|
return normalized;
|
|
9450
9450
|
}
|
|
9451
9451
|
const lower = normalized.toLowerCase();
|
|
@@ -9901,12 +9901,12 @@ async function copyToClipboard(text) {
|
|
|
9901
9901
|
}
|
|
9902
9902
|
}
|
|
9903
9903
|
function pipeToCommand(command, text, extraArgs = []) {
|
|
9904
|
-
return new Promise((
|
|
9904
|
+
return new Promise((resolve6, reject) => {
|
|
9905
9905
|
const child = (0, import_node_child_process2.spawn)(command, extraArgs, { stdio: ["pipe", "ignore", "ignore"] });
|
|
9906
9906
|
child.on("error", reject);
|
|
9907
9907
|
child.on("close", (code) => {
|
|
9908
9908
|
if (code === 0) {
|
|
9909
|
-
|
|
9909
|
+
resolve6();
|
|
9910
9910
|
} else {
|
|
9911
9911
|
reject(new Error(`${command} exited with code ${code ?? "unknown"}`));
|
|
9912
9912
|
}
|
|
@@ -10302,10 +10302,10 @@ function sleepForRunnerPoll(ms, signal) {
|
|
|
10302
10302
|
if (signal?.aborted) {
|
|
10303
10303
|
return Promise.reject(createRunnerWatchAbortError());
|
|
10304
10304
|
}
|
|
10305
|
-
return new Promise((
|
|
10305
|
+
return new Promise((resolve6, reject) => {
|
|
10306
10306
|
const timer = setTimeout(() => {
|
|
10307
10307
|
cleanup();
|
|
10308
|
-
|
|
10308
|
+
resolve6();
|
|
10309
10309
|
}, ms);
|
|
10310
10310
|
const onAbort = () => {
|
|
10311
10311
|
cleanup();
|
|
@@ -10877,9 +10877,9 @@ function formatRepoMatch(repoMatch) {
|
|
|
10877
10877
|
}
|
|
10878
10878
|
}
|
|
10879
10879
|
async function runCommand(command, args, cwd) {
|
|
10880
|
-
return new Promise((
|
|
10880
|
+
return new Promise((resolve6) => {
|
|
10881
10881
|
(0, import_node_child_process3.execFile)(command, args, { cwd, windowsHide: true }, (error, stdout, stderr) => {
|
|
10882
|
-
|
|
10882
|
+
resolve6({
|
|
10883
10883
|
ok: !error,
|
|
10884
10884
|
stdout: String(stdout ?? ""),
|
|
10885
10885
|
stderr: String(stderr ?? "")
|
|
@@ -11589,7 +11589,7 @@ function buildAgentFixPrompt(artifact, gap) {
|
|
|
11589
11589
|
}
|
|
11590
11590
|
|
|
11591
11591
|
// src/version.ts
|
|
11592
|
-
var VERSION = "1.1.
|
|
11592
|
+
var VERSION = "1.1.8";
|
|
11593
11593
|
|
|
11594
11594
|
// src/commands/guide.ts
|
|
11595
11595
|
var import_picocolors3 = __toESM(require_picocolors());
|
|
@@ -14473,7 +14473,7 @@ function resolveConsoleCommandArgs(request) {
|
|
|
14473
14473
|
}
|
|
14474
14474
|
async function runAllowedConsoleCommand(input) {
|
|
14475
14475
|
const args = resolveConsoleCommandArgs(input.request);
|
|
14476
|
-
return new Promise((
|
|
14476
|
+
return new Promise((resolve6, reject) => {
|
|
14477
14477
|
let settled = false;
|
|
14478
14478
|
const settle = (callback) => {
|
|
14479
14479
|
if (settled) return;
|
|
@@ -14497,7 +14497,7 @@ async function runAllowedConsoleCommand(input) {
|
|
|
14497
14497
|
settle(() => reject(error));
|
|
14498
14498
|
});
|
|
14499
14499
|
child.on("close", (exitCode) => {
|
|
14500
|
-
settle(() =>
|
|
14500
|
+
settle(() => resolve6({ exitCode, stdout, stderr }));
|
|
14501
14501
|
});
|
|
14502
14502
|
});
|
|
14503
14503
|
}
|
|
@@ -14863,7 +14863,7 @@ async function createConsoleServer(input) {
|
|
|
14863
14863
|
}
|
|
14864
14864
|
sendJson(response, 404, { ok: false, error: "Not found." });
|
|
14865
14865
|
});
|
|
14866
|
-
await new Promise((
|
|
14866
|
+
await new Promise((resolve6, reject) => {
|
|
14867
14867
|
const handleListenError = (error) => {
|
|
14868
14868
|
closeWatcher();
|
|
14869
14869
|
reject(error);
|
|
@@ -14871,14 +14871,14 @@ async function createConsoleServer(input) {
|
|
|
14871
14871
|
server.once("error", handleListenError);
|
|
14872
14872
|
server.listen(input.port ?? 0, "127.0.0.1", () => {
|
|
14873
14873
|
server.off("error", handleListenError);
|
|
14874
|
-
|
|
14874
|
+
resolve6();
|
|
14875
14875
|
});
|
|
14876
14876
|
});
|
|
14877
14877
|
const actualPort = getServerPort(server);
|
|
14878
14878
|
return {
|
|
14879
14879
|
url: `http://127.0.0.1:${actualPort}`,
|
|
14880
14880
|
token,
|
|
14881
|
-
close: () => new Promise((
|
|
14881
|
+
close: () => new Promise((resolve6, reject) => {
|
|
14882
14882
|
closeWatcher();
|
|
14883
14883
|
for (const client of eventClients) {
|
|
14884
14884
|
client.response.end();
|
|
@@ -14889,7 +14889,7 @@ async function createConsoleServer(input) {
|
|
|
14889
14889
|
reject(error);
|
|
14890
14890
|
return;
|
|
14891
14891
|
}
|
|
14892
|
-
|
|
14892
|
+
resolve6();
|
|
14893
14893
|
});
|
|
14894
14894
|
})
|
|
14895
14895
|
};
|
|
@@ -14931,15 +14931,120 @@ async function runConsoleCliCommand(input) {
|
|
|
14931
14931
|
if (input.once) {
|
|
14932
14932
|
return closeServer(server);
|
|
14933
14933
|
}
|
|
14934
|
-
return new Promise((
|
|
14934
|
+
return new Promise((resolve6) => {
|
|
14935
14935
|
const onSigint = () => {
|
|
14936
14936
|
process.off("SIGINT", onSigint);
|
|
14937
|
-
void closeServer(server).then(
|
|
14937
|
+
void closeServer(server).then(resolve6);
|
|
14938
14938
|
};
|
|
14939
14939
|
process.once("SIGINT", onSigint);
|
|
14940
14940
|
});
|
|
14941
14941
|
}
|
|
14942
14942
|
|
|
14943
|
+
// src/commands/preview.ts
|
|
14944
|
+
var import_picocolors5 = __toESM(require_picocolors());
|
|
14945
|
+
function buildPreviewManifest() {
|
|
14946
|
+
return {
|
|
14947
|
+
version: 1,
|
|
14948
|
+
generatedAt: "2026-06-16T00:00:00.000Z",
|
|
14949
|
+
workspaceRoot: ".",
|
|
14950
|
+
gateStatus: "not_clear",
|
|
14951
|
+
actions: [
|
|
14952
|
+
{
|
|
14953
|
+
id: "VR-A1",
|
|
14954
|
+
actionKey: "provider-action:stripe:stripe-webhook:/api/stripe/webhook:checkout.session.completed,customer.subscription.deleted,customer.subscription.updated",
|
|
14955
|
+
revision: 1,
|
|
14956
|
+
kind: "provider-action",
|
|
14957
|
+
provider: "stripe",
|
|
14958
|
+
title: "Connect Stripe Webhook",
|
|
14959
|
+
status: "waiting-on-provider",
|
|
14960
|
+
severity: "critical",
|
|
14961
|
+
gapId: "stripe_webhook_secret_missing",
|
|
14962
|
+
readiness: ["Webhook endpoint path detected", "Required events prepared"],
|
|
14963
|
+
target: {
|
|
14964
|
+
type: "provider",
|
|
14965
|
+
provider: "stripe",
|
|
14966
|
+
label: "Create Stripe webhook endpoint for /api/stripe/webhook."
|
|
14967
|
+
},
|
|
14968
|
+
copyPayloads: [
|
|
14969
|
+
{
|
|
14970
|
+
label: "Required webhook events",
|
|
14971
|
+
format: "text",
|
|
14972
|
+
value: [
|
|
14973
|
+
"checkout.session.completed",
|
|
14974
|
+
"customer.subscription.updated",
|
|
14975
|
+
"customer.subscription.deleted"
|
|
14976
|
+
]
|
|
14977
|
+
}
|
|
14978
|
+
],
|
|
14979
|
+
verifyCommand: `${PUBLIC_COMMAND} verify --action VR-A1`,
|
|
14980
|
+
resumeInstruction: "Stripe webhook is configured. Continue VibeRaven from VR-A1."
|
|
14981
|
+
},
|
|
14982
|
+
{
|
|
14983
|
+
id: "VR-A2",
|
|
14984
|
+
actionKey: "repo-code:supabase:rls:supabase/migrations/20260615_rls.sql:user-owned-tables",
|
|
14985
|
+
revision: 1,
|
|
14986
|
+
kind: "repo-code",
|
|
14987
|
+
provider: "supabase",
|
|
14988
|
+
title: "Apply Supabase RLS",
|
|
14989
|
+
status: "waiting-on-database-proof",
|
|
14990
|
+
severity: "critical",
|
|
14991
|
+
gapId: "supabase_rls_policy_proof",
|
|
14992
|
+
readiness: ["Affected tables detected", "Migration file target prepared"],
|
|
14993
|
+
target: {
|
|
14994
|
+
type: "file",
|
|
14995
|
+
label: "RLS migration",
|
|
14996
|
+
path: "supabase/migrations/20260615_rls.sql"
|
|
14997
|
+
},
|
|
14998
|
+
copyPayloads: [
|
|
14999
|
+
{
|
|
15000
|
+
label: "Tiny SQL shape",
|
|
15001
|
+
format: "sql",
|
|
15002
|
+
value: 'alter table public.example enable row level security;\ncreate policy "Users manage own rows" on public.example for all using (auth.uid() = user_id);'
|
|
15003
|
+
}
|
|
15004
|
+
],
|
|
15005
|
+
verifyCommand: `${PUBLIC_COMMAND} verify --action VR-A2`,
|
|
15006
|
+
resumeInstruction: "Supabase RLS is applied. Continue VibeRaven from VR-A2."
|
|
15007
|
+
},
|
|
15008
|
+
{
|
|
15009
|
+
id: "VR-A3",
|
|
15010
|
+
actionKey: "verify:gate:final:npx-y-viberaven-strict",
|
|
15011
|
+
revision: 1,
|
|
15012
|
+
kind: "verify",
|
|
15013
|
+
title: "Run Final Verification",
|
|
15014
|
+
status: "blocked",
|
|
15015
|
+
severity: "warning",
|
|
15016
|
+
readiness: ["Run after repo-code and provider actions are complete"],
|
|
15017
|
+
target: {
|
|
15018
|
+
type: "command",
|
|
15019
|
+
label: "Strict gate",
|
|
15020
|
+
command: `${PUBLIC_COMMAND} --strict`
|
|
15021
|
+
},
|
|
15022
|
+
resumeInstruction: "Final verification finished. Continue VibeRaven from VR-A3."
|
|
15023
|
+
}
|
|
15024
|
+
]
|
|
15025
|
+
};
|
|
15026
|
+
}
|
|
15027
|
+
async function runPreviewCommand(options) {
|
|
15028
|
+
const manifest = buildPreviewManifest();
|
|
15029
|
+
if (options.json) {
|
|
15030
|
+
console.log(JSON.stringify({ manifest }, null, 2));
|
|
15031
|
+
return 0;
|
|
15032
|
+
}
|
|
15033
|
+
console.log(import_picocolors5.default.dim(`VibeRaven ${VERSION} preview - local rehearsal, no login or API spend.`));
|
|
15034
|
+
console.log(import_picocolors5.default.dim("This is sample renderer data, not a production verdict for this repository."));
|
|
15035
|
+
console.log("");
|
|
15036
|
+
console.log(renderActionSurface(manifest, { limit: 3 }).trimEnd());
|
|
15037
|
+
if (options.agentMode) {
|
|
15038
|
+
console.log("");
|
|
15039
|
+
console.log(
|
|
15040
|
+
import_picocolors5.default.dim(
|
|
15041
|
+
"Agent note: treat each visible action as the next production action surface. Do not mark provider actions resolved until provider proof exists."
|
|
15042
|
+
)
|
|
15043
|
+
);
|
|
15044
|
+
}
|
|
15045
|
+
return 0;
|
|
15046
|
+
}
|
|
15047
|
+
|
|
14943
15048
|
// src/output/nextActionBlock.ts
|
|
14944
15049
|
function buildNextActionBlock(tasks, loopState, plan) {
|
|
14945
15050
|
const batchSize = plan === "pro" ? 10 : 3;
|
|
@@ -15177,6 +15282,9 @@ Usage:
|
|
|
15177
15282
|
viberaven actions [--json] [path]
|
|
15178
15283
|
Print current chat-native production action surface
|
|
15179
15284
|
|
|
15285
|
+
viberaven preview [--agent-mode] [--json]
|
|
15286
|
+
Local chat-native action preview for videos and onboarding; no login or API spend
|
|
15287
|
+
|
|
15180
15288
|
viberaven connect --session <id> --token <token> [--once] [--api-url <url>]
|
|
15181
15289
|
Handshake, save runner session, then watch for jobs (Ctrl+C to stop)
|
|
15182
15290
|
|
|
@@ -15254,6 +15362,12 @@ Security:
|
|
|
15254
15362
|
|
|
15255
15363
|
`);
|
|
15256
15364
|
}
|
|
15365
|
+
function resolveCliWorkspacePath(input) {
|
|
15366
|
+
if (!input) {
|
|
15367
|
+
return process.cwd();
|
|
15368
|
+
}
|
|
15369
|
+
return (0, import_node_path31.isAbsolute)(input) ? input : (0, import_node_path31.resolve)(process.cwd(), input);
|
|
15370
|
+
}
|
|
15257
15371
|
function parseArgs(argv) {
|
|
15258
15372
|
const flags = {};
|
|
15259
15373
|
const positional = [];
|
|
@@ -15840,7 +15954,13 @@ async function main() {
|
|
|
15840
15954
|
return cmdStatus(flags, positional);
|
|
15841
15955
|
case "actions":
|
|
15842
15956
|
return runActionsCommand({
|
|
15843
|
-
cwd:
|
|
15957
|
+
cwd: resolveCliWorkspacePath(positional[0]),
|
|
15958
|
+
json: Boolean(flags.json)
|
|
15959
|
+
});
|
|
15960
|
+
case "preview":
|
|
15961
|
+
return runPreviewCommand({
|
|
15962
|
+
cwd: resolveCliWorkspacePath(positional[0]),
|
|
15963
|
+
agentMode: flags["agent-mode"] === true,
|
|
15844
15964
|
json: Boolean(flags.json)
|
|
15845
15965
|
});
|
|
15846
15966
|
case "console":
|
|
@@ -15851,7 +15971,7 @@ async function main() {
|
|
|
15851
15971
|
return 1;
|
|
15852
15972
|
}
|
|
15853
15973
|
return runConsoleCliCommand({
|
|
15854
|
-
cwd:
|
|
15974
|
+
cwd: resolveCliWorkspacePath(positional[0]),
|
|
15855
15975
|
port: typeof flags.port === "string" ? Number.parseInt(flags.port, 10) : void 0,
|
|
15856
15976
|
open: flags.open === true
|
|
15857
15977
|
});
|