@viberaven/cli 1.1.5 → 1.1.6
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/dist/cli.js +210 -70
- package/dist/cli.js.map +4 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2215,20 +2215,20 @@ function mapEvidenceSourceToLegacyEvidenceClass(source, status) {
|
|
|
2215
2215
|
}
|
|
2216
2216
|
return "mcp-verifier";
|
|
2217
2217
|
}
|
|
2218
|
-
function isProviderLayerCheck(
|
|
2219
|
-
return
|
|
2218
|
+
function isProviderLayerCheck(check2) {
|
|
2219
|
+
return check2.evidenceSource === "provider" || check2.evidenceSource === "mcp";
|
|
2220
2220
|
}
|
|
2221
|
-
function isRepoLayerCheck(
|
|
2222
|
-
return
|
|
2221
|
+
function isRepoLayerCheck(check2) {
|
|
2222
|
+
return check2.evidenceSource === "repo";
|
|
2223
2223
|
}
|
|
2224
2224
|
function computeLayerReadinessPercent(checks, layer) {
|
|
2225
2225
|
const filtered = checks.filter(
|
|
2226
|
-
(
|
|
2226
|
+
(check2) => layer === "repo" ? isRepoLayerCheck(check2) : isProviderLayerCheck(check2)
|
|
2227
2227
|
);
|
|
2228
2228
|
if (filtered.length === 0) {
|
|
2229
2229
|
return 100;
|
|
2230
2230
|
}
|
|
2231
|
-
const verified = filtered.filter((
|
|
2231
|
+
const verified = filtered.filter((check2) => check2.status === "verified").length;
|
|
2232
2232
|
return Math.round(verified / filtered.length * 100);
|
|
2233
2233
|
}
|
|
2234
2234
|
function aggregateReadinessPercents(providerResults) {
|
|
@@ -2260,7 +2260,7 @@ function mergeVerificationIntoMissionGraph(graph, layer) {
|
|
|
2260
2260
|
if (!mission) {
|
|
2261
2261
|
continue;
|
|
2262
2262
|
}
|
|
2263
|
-
if (mission.checks.some((
|
|
2263
|
+
if (mission.checks.some((check2) => check2.verificationCheckId === layerCheck.id || check2.id === missionRowId(layerCheck.id))) {
|
|
2264
2264
|
continue;
|
|
2265
2265
|
}
|
|
2266
2266
|
mission.checks.push(verificationCheckToMissionCheck(layerCheck, mission));
|
|
@@ -2351,7 +2351,7 @@ function readinessPercentForRepoChecks(checks) {
|
|
|
2351
2351
|
if (repoChecks.length === 0) {
|
|
2352
2352
|
return 100;
|
|
2353
2353
|
}
|
|
2354
|
-
const verified = repoChecks.filter((
|
|
2354
|
+
const verified = repoChecks.filter((check2) => isVerifiedMissionCheck(check2)).length;
|
|
2355
2355
|
return Math.round(verified / repoChecks.length * 100);
|
|
2356
2356
|
}
|
|
2357
2357
|
function readinessPercentForProviderChecks(checks) {
|
|
@@ -2359,29 +2359,29 @@ function readinessPercentForProviderChecks(checks) {
|
|
|
2359
2359
|
if (providerChecks.length === 0) {
|
|
2360
2360
|
return 100;
|
|
2361
2361
|
}
|
|
2362
|
-
const verified = providerChecks.filter((
|
|
2362
|
+
const verified = providerChecks.filter((check2) => isVerifiedMissionCheck(check2)).length;
|
|
2363
2363
|
return Math.round(verified / providerChecks.length * 100);
|
|
2364
2364
|
}
|
|
2365
|
-
function isRepoLayerMissionCheck(
|
|
2366
|
-
if (
|
|
2365
|
+
function isRepoLayerMissionCheck(check2) {
|
|
2366
|
+
if (check2.evidenceSource === "provider" || check2.evidenceSource === "mcp" || check2.evidenceSource === "manual") {
|
|
2367
2367
|
return false;
|
|
2368
2368
|
}
|
|
2369
|
-
if (
|
|
2369
|
+
if (check2.evidenceSource === "repo") {
|
|
2370
2370
|
return true;
|
|
2371
2371
|
}
|
|
2372
|
-
return
|
|
2372
|
+
return check2.evidenceClass === "repo-verified" || check2.evidenceClass === "missing-repo-fix";
|
|
2373
2373
|
}
|
|
2374
|
-
function isProviderLayerMissionCheck(
|
|
2375
|
-
if (
|
|
2374
|
+
function isProviderLayerMissionCheck(check2) {
|
|
2375
|
+
if (check2.evidenceSource === "provider" || check2.evidenceSource === "mcp") {
|
|
2376
2376
|
return true;
|
|
2377
2377
|
}
|
|
2378
|
-
return
|
|
2378
|
+
return check2.evidenceClass === "mcp-verifier";
|
|
2379
2379
|
}
|
|
2380
|
-
function isVerifiedMissionCheck(
|
|
2381
|
-
if (
|
|
2382
|
-
return
|
|
2380
|
+
function isVerifiedMissionCheck(check2) {
|
|
2381
|
+
if (check2.verificationStatus) {
|
|
2382
|
+
return check2.verificationStatus === "verified";
|
|
2383
2383
|
}
|
|
2384
|
-
return
|
|
2384
|
+
return check2.status === "passed" || check2.status === "user-confirmed";
|
|
2385
2385
|
}
|
|
2386
2386
|
function rebuildAreas(providerMissions) {
|
|
2387
2387
|
const byArea = /* @__PURE__ */ new Map();
|
|
@@ -2410,7 +2410,7 @@ function rebuildAreas(providerMissions) {
|
|
|
2410
2410
|
const repoReadinessPercent = percentVerified(repoChecks);
|
|
2411
2411
|
const providerReadinessPercent = percentVerified(providerChecks);
|
|
2412
2412
|
const criticalCount = missions.flatMap((m2) => m2.checks).filter(
|
|
2413
|
-
(
|
|
2413
|
+
(check2) => isProviderLayerMissionCheck(check2) && (check2.verificationStatus === "missing" || check2.status === "missing" || check2.status === "failed")
|
|
2414
2414
|
).length;
|
|
2415
2415
|
return {
|
|
2416
2416
|
key,
|
|
@@ -2427,7 +2427,7 @@ function percentVerified(checks) {
|
|
|
2427
2427
|
if (checks.length === 0) {
|
|
2428
2428
|
return 100;
|
|
2429
2429
|
}
|
|
2430
|
-
const verified = checks.filter((
|
|
2430
|
+
const verified = checks.filter((check2) => isVerifiedMissionCheck(check2)).length;
|
|
2431
2431
|
return Math.round(verified / checks.length * 100);
|
|
2432
2432
|
}
|
|
2433
2433
|
|
|
@@ -2492,7 +2492,7 @@ function toProviderMission(summary) {
|
|
|
2492
2492
|
promptSubject: summary.promptSubject,
|
|
2493
2493
|
readinessPercent: summary.readinessPercent,
|
|
2494
2494
|
repoReadinessPercent: summary.readinessPercent,
|
|
2495
|
-
providerReadinessPercent: checks.some((
|
|
2495
|
+
providerReadinessPercent: checks.some((check2) => check2.evidenceClass === "mcp-verifier") ? 0 : 100,
|
|
2496
2496
|
checks
|
|
2497
2497
|
};
|
|
2498
2498
|
}
|
|
@@ -2537,7 +2537,7 @@ function overlaySifgLeaks(providerMissions, graph) {
|
|
|
2537
2537
|
const providerCheckIds = new Map(
|
|
2538
2538
|
providerMissions.map((mission) => [
|
|
2539
2539
|
mission.key,
|
|
2540
|
-
new Set(mission.checks.map((
|
|
2540
|
+
new Set(mission.checks.map((check2) => check2.id))
|
|
2541
2541
|
])
|
|
2542
2542
|
);
|
|
2543
2543
|
for (const leak of graph.leaks) {
|
|
@@ -2556,9 +2556,9 @@ function overlaySifgLeaks(providerMissions, graph) {
|
|
|
2556
2556
|
continue;
|
|
2557
2557
|
}
|
|
2558
2558
|
const usedCheckIds = providerCheckIds.get(mission.key) ?? /* @__PURE__ */ new Set();
|
|
2559
|
-
const
|
|
2560
|
-
mission.checks.push(
|
|
2561
|
-
usedCheckIds.add(
|
|
2559
|
+
const check2 = toSifgMissionCheck(mission, pipeline, pipelineId, leaks, usedCheckIds);
|
|
2560
|
+
mission.checks.push(check2);
|
|
2561
|
+
usedCheckIds.add(check2.id);
|
|
2562
2562
|
providerCheckIds.set(mission.key, usedCheckIds);
|
|
2563
2563
|
}
|
|
2564
2564
|
for (const mission of providerMissions) {
|
|
@@ -2609,11 +2609,11 @@ function stableSifgSuffix(id) {
|
|
|
2609
2609
|
}
|
|
2610
2610
|
function readinessPercentForChecks(checks) {
|
|
2611
2611
|
const actionableChecks = checks.filter(isActionableCheck);
|
|
2612
|
-
const passed = actionableChecks.filter((
|
|
2612
|
+
const passed = actionableChecks.filter((check2) => check2.status === "passed").length;
|
|
2613
2613
|
return Math.round(passed / Math.max(actionableChecks.length, 1) * 100);
|
|
2614
2614
|
}
|
|
2615
|
-
function isActionableCheck(
|
|
2616
|
-
return
|
|
2615
|
+
function isActionableCheck(check2) {
|
|
2616
|
+
return check2.evidenceClass !== "manual-dashboard" && check2.evidenceClass !== "mcp-verifier";
|
|
2617
2617
|
}
|
|
2618
2618
|
function buildAreas(providerMissions) {
|
|
2619
2619
|
const byArea = /* @__PURE__ */ new Map();
|
|
@@ -2624,15 +2624,15 @@ function buildAreas(providerMissions) {
|
|
|
2624
2624
|
}
|
|
2625
2625
|
return [...byArea.entries()].map(([key, missions]) => {
|
|
2626
2626
|
const actionableChecks = missions.flatMap((mission) => mission.checks).filter(isActionableCheck);
|
|
2627
|
-
const passed = actionableChecks.filter((
|
|
2628
|
-
const missing = actionableChecks.filter((
|
|
2627
|
+
const passed = actionableChecks.filter((check2) => check2.status === "passed").length;
|
|
2628
|
+
const missing = actionableChecks.filter((check2) => check2.status === "missing" || check2.status === "failed").length;
|
|
2629
2629
|
return {
|
|
2630
2630
|
key,
|
|
2631
2631
|
label: AREA_LABELS[key],
|
|
2632
2632
|
readinessPercent: Math.round(passed / Math.max(actionableChecks.length, 1) * 100),
|
|
2633
2633
|
repoReadinessPercent: Math.round(passed / Math.max(actionableChecks.length, 1) * 100),
|
|
2634
2634
|
providerReadinessPercent: missions.some(
|
|
2635
|
-
(mission) => mission.checks.some((
|
|
2635
|
+
(mission) => mission.checks.some((check2) => check2.evidenceClass === "mcp-verifier")
|
|
2636
2636
|
) ? 0 : 100,
|
|
2637
2637
|
criticalCount: missing,
|
|
2638
2638
|
providerMissions: missions
|
|
@@ -7586,9 +7586,9 @@ function runVerifier(verifier, ctx) {
|
|
|
7586
7586
|
}
|
|
7587
7587
|
const connectionState = verifier.connectStatus(ctx);
|
|
7588
7588
|
const rawChecks = verifier.runChecks(ctx);
|
|
7589
|
-
const checks = rawChecks.map((
|
|
7590
|
-
...
|
|
7591
|
-
status: coerceProviderVerificationStatus(
|
|
7589
|
+
const checks = rawChecks.map((check2) => ({
|
|
7590
|
+
...check2,
|
|
7591
|
+
status: coerceProviderVerificationStatus(check2.status, connectionState)
|
|
7592
7592
|
}));
|
|
7593
7593
|
const diffs = verifier.buildDiffs(ctx);
|
|
7594
7594
|
return {
|
|
@@ -8313,24 +8313,24 @@ var CHECK_TO_PLAYBOOK = {
|
|
|
8313
8313
|
"stripe-product": "stripe",
|
|
8314
8314
|
"stripe-keys": "stripe"
|
|
8315
8315
|
};
|
|
8316
|
-
function mapCheckToPlaybook(
|
|
8317
|
-
if (CHECK_TO_PLAYBOOK[
|
|
8318
|
-
return CHECK_TO_PLAYBOOK[
|
|
8316
|
+
function mapCheckToPlaybook(check2) {
|
|
8317
|
+
if (CHECK_TO_PLAYBOOK[check2.id]) {
|
|
8318
|
+
return CHECK_TO_PLAYBOOK[check2.id];
|
|
8319
8319
|
}
|
|
8320
|
-
const providerKey =
|
|
8321
|
-
if (providerKey.includes("vercel") ||
|
|
8320
|
+
const providerKey = check2.providerKey.toLowerCase();
|
|
8321
|
+
if (providerKey.includes("vercel") || check2.area === "deployment") {
|
|
8322
8322
|
return "vercel";
|
|
8323
8323
|
}
|
|
8324
|
-
if (providerKey.includes("stripe") ||
|
|
8324
|
+
if (providerKey.includes("stripe") || check2.area === "payments") {
|
|
8325
8325
|
return "stripe";
|
|
8326
8326
|
}
|
|
8327
|
-
if (providerKey.includes("supabase") &&
|
|
8327
|
+
if (providerKey.includes("supabase") && check2.area === "auth") {
|
|
8328
8328
|
return "auth-supabase";
|
|
8329
8329
|
}
|
|
8330
|
-
if (providerKey.includes("supabase") ||
|
|
8330
|
+
if (providerKey.includes("supabase") || check2.area === "database") {
|
|
8331
8331
|
return "supabase";
|
|
8332
8332
|
}
|
|
8333
|
-
if (
|
|
8333
|
+
if (check2.area === "auth") {
|
|
8334
8334
|
return "auth-supabase";
|
|
8335
8335
|
}
|
|
8336
8336
|
return "vercel";
|
|
@@ -8471,21 +8471,21 @@ function loadPlaybookSync(provider2) {
|
|
|
8471
8471
|
}
|
|
8472
8472
|
|
|
8473
8473
|
// src/playbooks/manualChecks.ts
|
|
8474
|
-
function isManualProviderCheck(
|
|
8475
|
-
return
|
|
8474
|
+
function isManualProviderCheck(check2) {
|
|
8475
|
+
return check2.evidenceClass === "manual-dashboard" || check2.evidenceClass === "mcp-verifier" || check2.evidenceSource === "provider" || check2.evidenceSource === "mcp" || check2.status === "needs-connection" || check2.status === "unknown";
|
|
8476
8476
|
}
|
|
8477
8477
|
function collectManualChecks(artifact) {
|
|
8478
8478
|
const refs = [];
|
|
8479
8479
|
for (const area of artifact.missionGraph.areas ?? []) {
|
|
8480
8480
|
for (const mission of area.providerMissions) {
|
|
8481
|
-
for (const
|
|
8482
|
-
if (!isManualProviderCheck(
|
|
8481
|
+
for (const check2 of mission.checks) {
|
|
8482
|
+
if (!isManualProviderCheck(check2)) {
|
|
8483
8483
|
continue;
|
|
8484
8484
|
}
|
|
8485
8485
|
refs.push({
|
|
8486
8486
|
areaLabel: area.label,
|
|
8487
8487
|
providerLabel: mission.providerLabel,
|
|
8488
|
-
check,
|
|
8488
|
+
check: check2,
|
|
8489
8489
|
mapCategory: area.key
|
|
8490
8490
|
});
|
|
8491
8491
|
}
|
|
@@ -8751,8 +8751,8 @@ function generateAgentSummary(artifact) {
|
|
|
8751
8751
|
const manualChecks = (artifact.missionGraph.areas ?? []).flatMap(
|
|
8752
8752
|
(area) => area.providerMissions.flatMap(
|
|
8753
8753
|
(mission) => mission.checks.filter(
|
|
8754
|
-
(
|
|
8755
|
-
).map((
|
|
8754
|
+
(check2) => check2.evidenceClass === "manual-dashboard" || check2.evidenceClass === "mcp-verifier" || check2.evidenceSource === "provider" || check2.evidenceSource === "mcp" || check2.status === "needs-connection" || check2.status === "unknown"
|
|
8755
|
+
).map((check2) => ({ area: area.label, provider: mission.providerLabel, check: check2 }))
|
|
8756
8756
|
)
|
|
8757
8757
|
);
|
|
8758
8758
|
lines.push("");
|
|
@@ -9573,9 +9573,9 @@ function missionMatchesProvider(mission, provider2) {
|
|
|
9573
9573
|
return normalizeProviderToken2(mission.provider || mission.providerLabel || mission.key) === current || normalizeProviderToken2(mission.providerLabel || mission.provider || mission.key) === current;
|
|
9574
9574
|
}
|
|
9575
9575
|
function missionEvidenceScore(mission) {
|
|
9576
|
-
const repoVerified = mission.checks.filter((
|
|
9576
|
+
const repoVerified = mission.checks.filter((check2) => check2.evidenceClass === "repo-verified" || check2.status === "passed").length;
|
|
9577
9577
|
const missing = mission.checks.filter(
|
|
9578
|
-
(
|
|
9578
|
+
(check2) => check2.evidenceClass === "missing-repo-fix" || check2.status === "missing" || check2.status === "failed"
|
|
9579
9579
|
).length;
|
|
9580
9580
|
return repoVerified * 100 + (mission.readinessPercent ?? 0) - missing;
|
|
9581
9581
|
}
|
|
@@ -9595,7 +9595,7 @@ function openChecksForMission(mission) {
|
|
|
9595
9595
|
return 0;
|
|
9596
9596
|
}
|
|
9597
9597
|
return mission.checks.filter(
|
|
9598
|
-
(
|
|
9598
|
+
(check2) => check2.status === "missing" || check2.status === "failed" || check2.status === "needs-connection"
|
|
9599
9599
|
).length;
|
|
9600
9600
|
}
|
|
9601
9601
|
|
|
@@ -9627,7 +9627,7 @@ function manualActionCheckCount(artifact) {
|
|
|
9627
9627
|
return (artifact.missionGraph.areas ?? []).reduce((areaTotal, area) => {
|
|
9628
9628
|
return areaTotal + area.providerMissions.reduce((missionTotal, mission) => {
|
|
9629
9629
|
return missionTotal + mission.checks.filter(
|
|
9630
|
-
(
|
|
9630
|
+
(check2) => check2.evidenceClass === "manual-dashboard" || check2.evidenceClass === "mcp-verifier" || check2.evidenceSource === "provider" || check2.evidenceSource === "mcp" || check2.status === "needs-connection" || check2.status === "unknown"
|
|
9631
9631
|
).length;
|
|
9632
9632
|
}, 0);
|
|
9633
9633
|
}, 0);
|
|
@@ -11229,7 +11229,7 @@ function buildAgentFixPrompt(artifact, gap) {
|
|
|
11229
11229
|
}
|
|
11230
11230
|
|
|
11231
11231
|
// src/version.ts
|
|
11232
|
-
var VERSION = "1.1.
|
|
11232
|
+
var VERSION = "1.1.6";
|
|
11233
11233
|
|
|
11234
11234
|
// src/commands/guide.ts
|
|
11235
11235
|
var import_picocolors3 = __toESM(require_picocolors());
|
|
@@ -11390,7 +11390,7 @@ function buildVercelSupabaseAudit(input) {
|
|
|
11390
11390
|
buildPoolerCheck(input.files),
|
|
11391
11391
|
buildServiceRoleCheck(input.files)
|
|
11392
11392
|
];
|
|
11393
|
-
const status = checks.every((
|
|
11393
|
+
const status = checks.every((check2) => check2.status === "pass") ? "pass" : "needs_work";
|
|
11394
11394
|
return {
|
|
11395
11395
|
status,
|
|
11396
11396
|
summary: status === "pass" ? "Repo evidence passes the local Vercel/Supabase audit checks." : "Repo evidence needs work before claiming Vercel/Supabase production readiness.",
|
|
@@ -11477,13 +11477,13 @@ function renderVercelSupabaseAudit(result) {
|
|
|
11477
11477
|
"Boundary: this audit uses local repo evidence only. Provider dashboard settings still need manual verification or read-only provider MCP confirmation.",
|
|
11478
11478
|
""
|
|
11479
11479
|
];
|
|
11480
|
-
for (const
|
|
11481
|
-
lines.push(`${
|
|
11482
|
-
lines.push(` ${
|
|
11483
|
-
for (const evidence of
|
|
11480
|
+
for (const check2 of result.checks) {
|
|
11481
|
+
lines.push(`${check2.status === "pass" ? "PASS" : "NEEDS_WORK"} ${check2.id}`);
|
|
11482
|
+
lines.push(` ${check2.summary}`);
|
|
11483
|
+
for (const evidence of check2.evidence.slice(0, 5)) {
|
|
11484
11484
|
lines.push(` - ${evidence}`);
|
|
11485
11485
|
}
|
|
11486
|
-
if (
|
|
11486
|
+
if (check2.evidence.length === 0) {
|
|
11487
11487
|
lines.push(" - No local evidence found.");
|
|
11488
11488
|
}
|
|
11489
11489
|
lines.push("");
|
|
@@ -13695,15 +13695,15 @@ async function checkAgentInjection(cwd) {
|
|
|
13695
13695
|
}
|
|
13696
13696
|
}
|
|
13697
13697
|
return {
|
|
13698
|
-
ok: checks.every((
|
|
13698
|
+
ok: checks.every((check2) => check2.status === "pass"),
|
|
13699
13699
|
checks
|
|
13700
13700
|
};
|
|
13701
13701
|
}
|
|
13702
13702
|
function formatDoctorAgentsReport(report) {
|
|
13703
13703
|
const lines = ["VibeRaven agent injection doctor", ""];
|
|
13704
|
-
for (const
|
|
13705
|
-
const icon =
|
|
13706
|
-
lines.push(`${icon} ${
|
|
13704
|
+
for (const check2 of report.checks) {
|
|
13705
|
+
const icon = check2.status === "pass" ? "\u2713" : "\u2717";
|
|
13706
|
+
lines.push(`${icon} ${check2.message}`);
|
|
13707
13707
|
}
|
|
13708
13708
|
lines.push("");
|
|
13709
13709
|
lines.push(report.ok ? "All agent injection checks passed." : "Agent injection checks failed.");
|
|
@@ -13924,6 +13924,9 @@ async function runAuditCommand(input) {
|
|
|
13924
13924
|
return result.status === "pass" ? 0 : 1;
|
|
13925
13925
|
}
|
|
13926
13926
|
|
|
13927
|
+
// src/commands/preview.ts
|
|
13928
|
+
var import_picocolors5 = __toESM(require_picocolors());
|
|
13929
|
+
|
|
13927
13930
|
// src/output/nextActionBlock.ts
|
|
13928
13931
|
function buildNextActionBlock(tasks, loopState, plan) {
|
|
13929
13932
|
const batchSize = plan === "pro" ? 10 : 3;
|
|
@@ -14076,6 +14079,134 @@ function printNextActionBlock(block) {
|
|
|
14076
14079
|
console.log(NEXT_ACTION_END);
|
|
14077
14080
|
}
|
|
14078
14081
|
|
|
14082
|
+
// src/commands/preview.ts
|
|
14083
|
+
function previewArtifact(cwd) {
|
|
14084
|
+
return {
|
|
14085
|
+
version: 1,
|
|
14086
|
+
scannedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
14087
|
+
workspacePath: cwd,
|
|
14088
|
+
score: 42,
|
|
14089
|
+
scoreLabel: "Blocked",
|
|
14090
|
+
summary: "Vercel, Supabase, and Stripe are detected, but launch-critical provider setup is not proven yet.",
|
|
14091
|
+
archetype: "ai-built-saas",
|
|
14092
|
+
plan: "free",
|
|
14093
|
+
productionCorePercent: 40,
|
|
14094
|
+
usage: {
|
|
14095
|
+
plan: "free",
|
|
14096
|
+
remainingPrompts: 0,
|
|
14097
|
+
used: 0,
|
|
14098
|
+
limit: 0,
|
|
14099
|
+
period: "lifetime",
|
|
14100
|
+
unlockedMapCategoryKeys: ["appFlow", "frontend", "backend", "auth", "database", "payments"]
|
|
14101
|
+
},
|
|
14102
|
+
gaps: [
|
|
14103
|
+
{
|
|
14104
|
+
id: "auth_secret_missing",
|
|
14105
|
+
category: "SECURITY & AUTH",
|
|
14106
|
+
severity: "critical",
|
|
14107
|
+
title: "Create production auth secret",
|
|
14108
|
+
detail: "The app needs a production session secret before real users sign in.",
|
|
14109
|
+
copyPrompt: "Generate and document NEXTAUTH_SECRET or the equivalent auth secret for this stack.",
|
|
14110
|
+
toolSuggestions: [],
|
|
14111
|
+
mcpSuggestion: null,
|
|
14112
|
+
primaryMapCategory: "auth",
|
|
14113
|
+
affectedMapCategories: []
|
|
14114
|
+
},
|
|
14115
|
+
{
|
|
14116
|
+
id: "rls_disabled",
|
|
14117
|
+
category: "DATABASE & DATA",
|
|
14118
|
+
severity: "critical",
|
|
14119
|
+
title: "Verify Supabase RLS before launch",
|
|
14120
|
+
detail: "Database access must be protected by Row Level Security or equivalent server-side controls.",
|
|
14121
|
+
copyPrompt: "Open Supabase and verify RLS policies for user-owned tables.",
|
|
14122
|
+
toolSuggestions: [],
|
|
14123
|
+
mcpSuggestion: null,
|
|
14124
|
+
primaryMapCategory: "database",
|
|
14125
|
+
affectedMapCategories: []
|
|
14126
|
+
},
|
|
14127
|
+
{
|
|
14128
|
+
id: "stripe_webhook_secret_missing",
|
|
14129
|
+
category: "PAYMENTS",
|
|
14130
|
+
severity: "critical",
|
|
14131
|
+
title: "Connect Stripe webhook secret",
|
|
14132
|
+
detail: "Stripe webhook signature verification needs STRIPE_WEBHOOK_SECRET before live payments.",
|
|
14133
|
+
copyPrompt: "Create a Stripe webhook endpoint and add STRIPE_WEBHOOK_SECRET to the deployment environment.",
|
|
14134
|
+
toolSuggestions: [],
|
|
14135
|
+
mcpSuggestion: null,
|
|
14136
|
+
primaryMapCategory: "payments",
|
|
14137
|
+
affectedMapCategories: []
|
|
14138
|
+
}
|
|
14139
|
+
],
|
|
14140
|
+
missionGraph: {
|
|
14141
|
+
areas: [],
|
|
14142
|
+
byArea: {},
|
|
14143
|
+
byProvider: {},
|
|
14144
|
+
repositoryEvidence: { env: [], security: [] }
|
|
14145
|
+
},
|
|
14146
|
+
stackWiring: { items: [], byKey: {} },
|
|
14147
|
+
providerRegistry: {
|
|
14148
|
+
version: 1,
|
|
14149
|
+
source: "bundled",
|
|
14150
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
14151
|
+
status: "fresh",
|
|
14152
|
+
staleAfterDays: 14,
|
|
14153
|
+
providers: []
|
|
14154
|
+
}
|
|
14155
|
+
};
|
|
14156
|
+
}
|
|
14157
|
+
function check(done, text) {
|
|
14158
|
+
const mark = done ? import_picocolors5.default.green("[x]") : import_picocolors5.default.yellow("[ ]");
|
|
14159
|
+
return ` ${mark} ${text}`;
|
|
14160
|
+
}
|
|
14161
|
+
async function runPreviewCommand(options) {
|
|
14162
|
+
const artifact = previewArtifact(options.cwd);
|
|
14163
|
+
const tasks = buildTaskList(artifact);
|
|
14164
|
+
const next = buildNextActionBlock(tasks, {
|
|
14165
|
+
batchApplied: 1,
|
|
14166
|
+
appliedGapIdsSinceScan: ["auth_secret_missing"],
|
|
14167
|
+
lastGapCount: artifact.gaps.length,
|
|
14168
|
+
stalledScans: 0
|
|
14169
|
+
}, "free");
|
|
14170
|
+
if (options.json) {
|
|
14171
|
+
console.log(JSON.stringify({ artifact, tasks, next }, null, 2));
|
|
14172
|
+
return 0;
|
|
14173
|
+
}
|
|
14174
|
+
console.log(import_picocolors5.default.dim(`VibeRaven ${VERSION} preview - local rehearsal, no login or API spend.`));
|
|
14175
|
+
console.log(import_picocolors5.default.bold("VibeRaven"));
|
|
14176
|
+
console.log("Taking this app from demo to production.");
|
|
14177
|
+
console.log("");
|
|
14178
|
+
console.log(`${import_picocolors5.default.bold("Status:")} ${import_picocolors5.default.red("BLOCKED")} | vercel + supabase + stripe | 3 launch gaps`);
|
|
14179
|
+
console.log("");
|
|
14180
|
+
console.log(import_picocolors5.default.bold("Progress"));
|
|
14181
|
+
console.log(check(true, "Understand the stack and launch gaps"));
|
|
14182
|
+
console.log(check(true, "Patch the first repo-owned secret gap"));
|
|
14183
|
+
console.log(check(false, "Open Supabase and verify RLS policies"));
|
|
14184
|
+
console.log(check(false, "Connect Stripe webhook signing secret"));
|
|
14185
|
+
console.log(check(false, "Verify again before launch"));
|
|
14186
|
+
console.log("");
|
|
14187
|
+
console.log(import_picocolors5.default.bold("I can do now"));
|
|
14188
|
+
console.log(" 1. Add missing env names and agent rules.");
|
|
14189
|
+
console.log(" 2. Prepare focused repo fixes the coding agent can apply.");
|
|
14190
|
+
console.log(" 3. Keep the launch loop moving until provider proof is needed.");
|
|
14191
|
+
console.log("");
|
|
14192
|
+
console.log(import_picocolors5.default.bold("I need you for"));
|
|
14193
|
+
console.log(" 1. Supabase: open the project and confirm RLS policies.");
|
|
14194
|
+
console.log(" 2. Stripe: create or open the webhook endpoint.");
|
|
14195
|
+
console.log(" 3. Deployment: paste provider secrets into Vercel or your host.");
|
|
14196
|
+
console.log("");
|
|
14197
|
+
console.log(import_picocolors5.default.bold("Open"));
|
|
14198
|
+
console.log(` supabase: ${import_picocolors5.default.cyan("https://supabase.com/dashboard")}`);
|
|
14199
|
+
console.log(` stripe: ${import_picocolors5.default.cyan("https://dashboard.stripe.com/")}`);
|
|
14200
|
+
console.log("");
|
|
14201
|
+
console.log(`${import_picocolors5.default.bold("Copy env names:")} NEXTAUTH_SECRET, STRIPE_WEBHOOK_SECRET`);
|
|
14202
|
+
console.log(`${import_picocolors5.default.bold("Next:")} I will guide the blocked provider setup, then verify when you confirm it is done.`);
|
|
14203
|
+
if (options.agentMode) {
|
|
14204
|
+
console.log("");
|
|
14205
|
+
console.log(import_picocolors5.default.dim("Agent note: render the checklist above as the live timeline; update [ ] to [x] as work completes."));
|
|
14206
|
+
}
|
|
14207
|
+
return 0;
|
|
14208
|
+
}
|
|
14209
|
+
|
|
14079
14210
|
// src/providerMcpBridge.ts
|
|
14080
14211
|
var import_node_fs12 = require("node:fs");
|
|
14081
14212
|
var import_node_os2 = require("node:os");
|
|
@@ -14192,6 +14323,9 @@ Usage:
|
|
|
14192
14323
|
|
|
14193
14324
|
viberaven status
|
|
14194
14325
|
|
|
14326
|
+
viberaven preview [--agent-mode] [--json]
|
|
14327
|
+
Local production rehearsal for videos and onboarding; no login or API spend
|
|
14328
|
+
|
|
14195
14329
|
viberaven connect --session <id> --token <token> [--once] [--api-url <url>]
|
|
14196
14330
|
Handshake, save runner session, then watch for jobs (Ctrl+C to stop)
|
|
14197
14331
|
|
|
@@ -14395,8 +14529,8 @@ async function cmdLogout() {
|
|
|
14395
14529
|
}
|
|
14396
14530
|
async function cmdProviderVerify(flags, positional) {
|
|
14397
14531
|
const provider2 = typeof flags.provider === "string" ? flags.provider : positional[0];
|
|
14398
|
-
const
|
|
14399
|
-
if (!provider2 || !
|
|
14532
|
+
const check2 = typeof flags.check === "string" ? flags.check : positional[1];
|
|
14533
|
+
if (!provider2 || !check2) {
|
|
14400
14534
|
console.error("Usage: viberaven provider-verify --provider <supabase|vercel> --check <id> [--plan free|pro]");
|
|
14401
14535
|
return 1;
|
|
14402
14536
|
}
|
|
@@ -14409,7 +14543,7 @@ async function cmdProviderVerify(flags, positional) {
|
|
|
14409
14543
|
}
|
|
14410
14544
|
const result = await verifyProviderGap({
|
|
14411
14545
|
provider: provider2,
|
|
14412
|
-
check,
|
|
14546
|
+
check: check2,
|
|
14413
14547
|
cwd: process.cwd(),
|
|
14414
14548
|
plan
|
|
14415
14549
|
});
|
|
@@ -14835,6 +14969,12 @@ async function main() {
|
|
|
14835
14969
|
return 0;
|
|
14836
14970
|
case "status":
|
|
14837
14971
|
return cmdStatus(flags, positional);
|
|
14972
|
+
case "preview":
|
|
14973
|
+
return runPreviewCommand({
|
|
14974
|
+
cwd: positional[0] ? (0, import_node_path25.join)(process.cwd(), positional[0]) : process.cwd(),
|
|
14975
|
+
agentMode: flags["agent-mode"] === true,
|
|
14976
|
+
json: Boolean(flags.json)
|
|
14977
|
+
});
|
|
14838
14978
|
case "next":
|
|
14839
14979
|
return runNextCommand({
|
|
14840
14980
|
json: Boolean(flags.json),
|