@vibecheckai/cli 2.8.2 → 3.0.0
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 +8 -8
- package/bin/_deprecations.js +35 -0
- package/bin/_router.js +46 -0
- package/bin/cli-hygiene.js +241 -0
- package/bin/guardrail.js +834 -0
- package/bin/runners/cli-utils.js +1070 -0
- package/bin/runners/context/ai-task-decomposer.js +337 -0
- package/bin/runners/context/analyzer.js +462 -0
- package/bin/runners/context/api-contracts.js +427 -0
- package/bin/runners/context/context-diff.js +342 -0
- package/bin/runners/context/context-pruner.js +291 -0
- package/bin/runners/context/dependency-graph.js +414 -0
- package/bin/runners/context/generators/claude.js +107 -0
- package/bin/runners/context/generators/codex.js +108 -0
- package/bin/runners/context/generators/copilot.js +119 -0
- package/bin/runners/context/generators/cursor.js +514 -0
- package/bin/runners/context/generators/mcp.js +151 -0
- package/bin/runners/context/generators/windsurf.js +180 -0
- package/bin/runners/context/git-context.js +302 -0
- package/bin/runners/context/index.js +1042 -0
- package/bin/runners/context/insights.js +173 -0
- package/bin/runners/context/mcp-server/generate-rules.js +337 -0
- package/bin/runners/context/mcp-server/index.js +1176 -0
- package/bin/runners/context/mcp-server/package.json +24 -0
- package/bin/runners/context/memory.js +200 -0
- package/bin/runners/context/monorepo.js +215 -0
- package/bin/runners/context/multi-repo-federation.js +404 -0
- package/bin/runners/context/patterns.js +253 -0
- package/bin/runners/context/proof-context.js +972 -0
- package/bin/runners/context/security-scanner.js +303 -0
- package/bin/runners/context/semantic-search.js +350 -0
- package/bin/runners/context/shared.js +264 -0
- package/bin/runners/context/team-conventions.js +310 -0
- package/bin/runners/lib/ai-bridge.js +416 -0
- package/bin/runners/lib/analysis-core.js +271 -0
- package/bin/runners/lib/analyzers.js +541 -0
- package/bin/runners/lib/audit-bridge.js +391 -0
- package/bin/runners/lib/auth-truth.js +193 -0
- package/bin/runners/lib/auth.js +215 -0
- package/bin/runners/lib/backup.js +62 -0
- package/bin/runners/lib/billing.js +107 -0
- package/bin/runners/lib/claims.js +118 -0
- package/bin/runners/lib/cli-ui.js +540 -0
- package/bin/runners/lib/compliance-bridge-new.js +0 -0
- package/bin/runners/lib/compliance-bridge.js +165 -0
- package/bin/runners/lib/contracts/auth-contract.js +194 -0
- package/bin/runners/lib/contracts/env-contract.js +178 -0
- package/bin/runners/lib/contracts/external-contract.js +198 -0
- package/bin/runners/lib/contracts/guard.js +168 -0
- package/bin/runners/lib/contracts/index.js +89 -0
- package/bin/runners/lib/contracts/plan-validator.js +311 -0
- package/bin/runners/lib/contracts/route-contract.js +192 -0
- package/bin/runners/lib/detect.js +89 -0
- package/bin/runners/lib/doctor/autofix.js +254 -0
- package/bin/runners/lib/doctor/index.js +37 -0
- package/bin/runners/lib/doctor/modules/dependencies.js +325 -0
- package/bin/runners/lib/doctor/modules/index.js +46 -0
- package/bin/runners/lib/doctor/modules/network.js +250 -0
- package/bin/runners/lib/doctor/modules/project.js +312 -0
- package/bin/runners/lib/doctor/modules/runtime.js +224 -0
- package/bin/runners/lib/doctor/modules/security.js +348 -0
- package/bin/runners/lib/doctor/modules/system.js +213 -0
- package/bin/runners/lib/doctor/modules/vibecheck.js +394 -0
- package/bin/runners/lib/doctor/reporter.js +262 -0
- package/bin/runners/lib/doctor/service.js +262 -0
- package/bin/runners/lib/doctor/types.js +113 -0
- package/bin/runners/lib/doctor/ui.js +263 -0
- package/bin/runners/lib/doctor-enhanced.js +233 -0
- package/bin/runners/lib/doctor-v2.js +608 -0
- package/bin/runners/lib/enforcement.js +72 -0
- package/bin/runners/lib/enterprise-detect.js +603 -0
- package/bin/runners/lib/enterprise-init.js +942 -0
- package/bin/runners/lib/entitlements-v2.js +381 -0
- package/bin/runners/lib/entitlements.generated.js +0 -0
- package/bin/runners/lib/entitlements.js +332 -0
- package/bin/runners/lib/env-template.js +66 -0
- package/bin/runners/lib/env.js +189 -0
- package/bin/runners/lib/error-handler.js +320 -0
- package/bin/runners/lib/firewall-prompt.js +50 -0
- package/bin/runners/lib/graph/graph-builder.js +265 -0
- package/bin/runners/lib/graph/html-renderer.js +413 -0
- package/bin/runners/lib/graph/index.js +32 -0
- package/bin/runners/lib/graph/runtime-collector.js +215 -0
- package/bin/runners/lib/graph/static-extractor.js +518 -0
- package/bin/runners/lib/init-wizard.js +308 -0
- package/bin/runners/lib/json-output.js +76 -0
- package/bin/runners/lib/llm.js +75 -0
- package/bin/runners/lib/meter.js +61 -0
- package/bin/runners/lib/missions/evidence.js +126 -0
- package/bin/runners/lib/missions/plan.js +69 -0
- package/bin/runners/lib/missions/templates.js +147 -0
- package/bin/runners/lib/patch.js +40 -0
- package/bin/runners/lib/permissions/auth-model.js +213 -0
- package/bin/runners/lib/permissions/idor-prover.js +205 -0
- package/bin/runners/lib/permissions/index.js +45 -0
- package/bin/runners/lib/permissions/matrix-builder.js +198 -0
- package/bin/runners/lib/pkgjson.js +28 -0
- package/bin/runners/lib/preflight.js +142 -0
- package/bin/runners/lib/reality-findings.js +84 -0
- package/bin/runners/lib/redact.js +29 -0
- package/bin/runners/lib/replay/capsule-manager.js +154 -0
- package/bin/runners/lib/replay/index.js +263 -0
- package/bin/runners/lib/replay/player.js +348 -0
- package/bin/runners/lib/replay/recorder.js +331 -0
- package/bin/runners/lib/report-engine.js +447 -0
- package/bin/runners/lib/report-html.js +1117 -0
- package/bin/runners/lib/report-templates.js +964 -0
- package/bin/runners/lib/route-detection.js +1140 -0
- package/bin/runners/lib/route-truth.js +477 -0
- package/bin/runners/lib/sandbox/index.js +59 -0
- package/bin/runners/lib/sandbox/proof-chain.js +399 -0
- package/bin/runners/lib/sandbox/sandbox-runner.js +205 -0
- package/bin/runners/lib/sandbox/worktree.js +174 -0
- package/bin/runners/lib/scan-cache.js +330 -0
- package/bin/runners/lib/scan-output-schema.js +344 -0
- package/bin/runners/lib/score-history.js +282 -0
- package/bin/runners/lib/security-bridge.js +249 -0
- package/bin/runners/lib/server-usage.js +513 -0
- package/bin/runners/lib/share-pack.js +239 -0
- package/bin/runners/lib/snippets.js +67 -0
- package/bin/runners/lib/truth.js +667 -0
- package/bin/runners/lib/unified-output.js +189 -0
- package/bin/runners/lib/validate-patch.js +156 -0
- package/bin/runners/lib/verification.js +345 -0
- package/bin/runners/reality/engine.js +917 -0
- package/bin/runners/reality/flows.js +122 -0
- package/bin/runners/reality/report.js +378 -0
- package/bin/runners/reality/session.js +193 -0
- package/bin/runners/runAIAgent.js +2 -0
- package/bin/runners/runAudit.js +2 -0
- package/bin/runners/runAuth.js +106 -0
- package/bin/runners/runAutopilot.js +2 -0
- package/bin/runners/runBadge.js +2 -0
- package/bin/runners/runCertify.js +2 -0
- package/bin/runners/runClaimVerifier.js +483 -0
- package/bin/runners/runContext.js +56 -0
- package/bin/runners/runContextCompiler.js +385 -0
- package/bin/runners/runCtx.js +187 -0
- package/bin/runners/runCtxGuard.js +176 -0
- package/bin/runners/runCtxSync.js +116 -0
- package/bin/runners/runDashboard.js +10 -0
- package/bin/runners/runDoctor.js +245 -0
- package/bin/runners/runEnhancedShip.js +2 -0
- package/bin/runners/runFix.js +735 -0
- package/bin/runners/runFixPacks.js +2 -0
- package/bin/runners/runGate.js +17 -0
- package/bin/runners/runGraph.js +283 -0
- package/bin/runners/runInit.js +260 -0
- package/bin/runners/runInitGha.js +101 -0
- package/bin/runners/runInstall.js +76 -0
- package/bin/runners/runInteractive.js +388 -0
- package/bin/runners/runLaunch.js +2 -0
- package/bin/runners/runMcp.js +19 -0
- package/bin/runners/runMdc.js +2 -0
- package/bin/runners/runMissionGenerator.js +282 -0
- package/bin/runners/runNaturalLanguage.js +3 -0
- package/bin/runners/runPR.js +96 -0
- package/bin/runners/runPermissions.js +290 -0
- package/bin/runners/runPromptFirewall.js +211 -0
- package/bin/runners/runProof.js +2 -0
- package/bin/runners/runProve.js +392 -0
- package/bin/runners/runReality.js +489 -0
- package/bin/runners/runRealitySniff.js +2 -0
- package/bin/runners/runReplay.js +469 -0
- package/bin/runners/runReport.js +478 -0
- package/bin/runners/runScan.js +835 -0
- package/bin/runners/runShare.js +34 -0
- package/bin/runners/runShip.js +1062 -0
- package/bin/runners/runStatus.js +136 -0
- package/bin/runners/runTruthpack.js +634 -0
- package/bin/runners/runUpgrade.js +2 -0
- package/bin/runners/runValidate.js +2 -0
- package/bin/runners/runVerifyAgentOutput.js +2 -0
- package/bin/runners/runWatch.js +230 -0
- package/bin/runners/utils.js +360 -0
- package/bin/scan.js +612 -0
- package/bin/vibecheck.js +834 -0
- package/package.json +11 -11
- package/dist/autopatch/verified-autopatch.d.ts +0 -111
- package/dist/autopatch/verified-autopatch.d.ts.map +0 -1
- package/dist/autopatch/verified-autopatch.js +0 -503
- package/dist/autopatch/verified-autopatch.js.map +0 -1
- package/dist/bundles/index.js +0 -8
- package/dist/bundles/vibecheck-core.js +0 -25799
- package/dist/bundles/vibecheck-security.js +0 -208693
- package/dist/bundles/vibecheck-ship.js +0 -2318
- package/dist/commands/baseline.d.ts +0 -7
- package/dist/commands/baseline.d.ts.map +0 -1
- package/dist/commands/baseline.js +0 -79
- package/dist/commands/baseline.js.map +0 -1
- package/dist/commands/cache.d.ts +0 -13
- package/dist/commands/cache.d.ts.map +0 -1
- package/dist/commands/cache.js +0 -165
- package/dist/commands/cache.js.map +0 -1
- package/dist/commands/checkpoint.d.ts +0 -8
- package/dist/commands/checkpoint.d.ts.map +0 -1
- package/dist/commands/checkpoint.js +0 -35
- package/dist/commands/checkpoint.js.map +0 -1
- package/dist/commands/doctor.d.ts +0 -17
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -226
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/evidence.d.ts +0 -45
- package/dist/commands/evidence.d.ts.map +0 -1
- package/dist/commands/evidence.js +0 -197
- package/dist/commands/evidence.js.map +0 -1
- package/dist/commands/explain.d.ts +0 -8
- package/dist/commands/explain.d.ts.map +0 -1
- package/dist/commands/explain.js +0 -52
- package/dist/commands/explain.js.map +0 -1
- package/dist/commands/fix-consolidated.d.ts +0 -19
- package/dist/commands/fix-consolidated.d.ts.map +0 -1
- package/dist/commands/fix-consolidated.js +0 -165
- package/dist/commands/fix-consolidated.js.map +0 -1
- package/dist/commands/index.d.ts +0 -8
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/index.js +0 -15
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/init.d.ts +0 -8
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -125
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/launcher.d.ts +0 -10
- package/dist/commands/launcher.d.ts.map +0 -1
- package/dist/commands/launcher.js +0 -174
- package/dist/commands/launcher.js.map +0 -1
- package/dist/commands/on.d.ts +0 -8
- package/dist/commands/on.d.ts.map +0 -1
- package/dist/commands/on.js +0 -123
- package/dist/commands/on.js.map +0 -1
- package/dist/commands/replay.d.ts +0 -8
- package/dist/commands/replay.d.ts.map +0 -1
- package/dist/commands/replay.js +0 -52
- package/dist/commands/replay.js.map +0 -1
- package/dist/commands/scan-consolidated.d.ts +0 -61
- package/dist/commands/scan-consolidated.d.ts.map +0 -1
- package/dist/commands/scan-consolidated.js +0 -243
- package/dist/commands/scan-consolidated.js.map +0 -1
- package/dist/commands/scan-secrets.d.ts +0 -47
- package/dist/commands/scan-secrets.d.ts.map +0 -1
- package/dist/commands/scan-secrets.js +0 -225
- package/dist/commands/scan-secrets.js.map +0 -1
- package/dist/commands/scan-vulnerabilities-enhanced.d.ts +0 -41
- package/dist/commands/scan-vulnerabilities-enhanced.d.ts.map +0 -1
- package/dist/commands/scan-vulnerabilities-enhanced.js +0 -368
- package/dist/commands/scan-vulnerabilities-enhanced.js.map +0 -1
- package/dist/commands/scan-vulnerabilities-osv.d.ts +0 -58
- package/dist/commands/scan-vulnerabilities-osv.d.ts.map +0 -1
- package/dist/commands/scan-vulnerabilities-osv.js +0 -722
- package/dist/commands/scan-vulnerabilities-osv.js.map +0 -1
- package/dist/commands/scan-vulnerabilities.d.ts +0 -32
- package/dist/commands/scan-vulnerabilities.d.ts.map +0 -1
- package/dist/commands/scan-vulnerabilities.js +0 -283
- package/dist/commands/scan-vulnerabilities.js.map +0 -1
- package/dist/commands/secrets-allowlist.d.ts +0 -7
- package/dist/commands/secrets-allowlist.d.ts.map +0 -1
- package/dist/commands/secrets-allowlist.js +0 -85
- package/dist/commands/secrets-allowlist.js.map +0 -1
- package/dist/commands/ship-consolidated.d.ts +0 -58
- package/dist/commands/ship-consolidated.d.ts.map +0 -1
- package/dist/commands/ship-consolidated.js +0 -515
- package/dist/commands/ship-consolidated.js.map +0 -1
- package/dist/commands/stats.d.ts +0 -8
- package/dist/commands/stats.d.ts.map +0 -1
- package/dist/commands/stats.js +0 -134
- package/dist/commands/stats.js.map +0 -1
- package/dist/commands/upgrade.d.ts +0 -8
- package/dist/commands/upgrade.d.ts.map +0 -1
- package/dist/commands/upgrade.js +0 -30
- package/dist/commands/upgrade.js.map +0 -1
- package/dist/fix/applicator.d.ts +0 -44
- package/dist/fix/applicator.d.ts.map +0 -1
- package/dist/fix/applicator.js +0 -144
- package/dist/fix/applicator.js.map +0 -1
- package/dist/fix/backup.d.ts +0 -38
- package/dist/fix/backup.d.ts.map +0 -1
- package/dist/fix/backup.js +0 -154
- package/dist/fix/backup.js.map +0 -1
- package/dist/fix/engine.d.ts +0 -55
- package/dist/fix/engine.d.ts.map +0 -1
- package/dist/fix/engine.js +0 -285
- package/dist/fix/engine.js.map +0 -1
- package/dist/fix/index.d.ts +0 -5
- package/dist/fix/index.d.ts.map +0 -1
- package/dist/fix/index.js +0 -12
- package/dist/fix/index.js.map +0 -1
- package/dist/fix/interactive.d.ts +0 -22
- package/dist/fix/interactive.d.ts.map +0 -1
- package/dist/fix/interactive.js +0 -172
- package/dist/fix/interactive.js.map +0 -1
- package/dist/formatters/index.d.ts +0 -6
- package/dist/formatters/index.d.ts.map +0 -1
- package/dist/formatters/index.js +0 -11
- package/dist/formatters/index.js.map +0 -1
- package/dist/formatters/sarif-enhanced.d.ts +0 -78
- package/dist/formatters/sarif-enhanced.d.ts.map +0 -1
- package/dist/formatters/sarif-enhanced.js +0 -144
- package/dist/formatters/sarif-enhanced.js.map +0 -1
- package/dist/formatters/sarif-v2.d.ts +0 -121
- package/dist/formatters/sarif-v2.d.ts.map +0 -1
- package/dist/formatters/sarif-v2.js +0 -356
- package/dist/formatters/sarif-v2.js.map +0 -1
- package/dist/formatters/sarif.d.ts +0 -72
- package/dist/formatters/sarif.d.ts.map +0 -1
- package/dist/formatters/sarif.js +0 -146
- package/dist/formatters/sarif.js.map +0 -1
- package/dist/index.d.ts +0 -61
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -4388
- package/dist/index.js.map +0 -1
- package/dist/init/ci-generator.d.ts +0 -18
- package/dist/init/ci-generator.d.ts.map +0 -1
- package/dist/init/ci-generator.js +0 -317
- package/dist/init/ci-generator.js.map +0 -1
- package/dist/init/detect-framework.d.ts +0 -15
- package/dist/init/detect-framework.d.ts.map +0 -1
- package/dist/init/detect-framework.js +0 -301
- package/dist/init/detect-framework.js.map +0 -1
- package/dist/init/hooks-installer.d.ts +0 -22
- package/dist/init/hooks-installer.d.ts.map +0 -1
- package/dist/init/hooks-installer.js +0 -310
- package/dist/init/hooks-installer.js.map +0 -1
- package/dist/init/index.d.ts +0 -8
- package/dist/init/index.d.ts.map +0 -1
- package/dist/init/index.js +0 -22
- package/dist/init/index.js.map +0 -1
- package/dist/init/templates.d.ts +0 -402
- package/dist/init/templates.d.ts.map +0 -1
- package/dist/init/templates.js +0 -240
- package/dist/init/templates.js.map +0 -1
- package/dist/mcp/server.d.ts +0 -12
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/mcp/server.js +0 -42
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/telemetry.d.ts +0 -40
- package/dist/mcp/telemetry.d.ts.map +0 -1
- package/dist/mcp/telemetry.js +0 -98
- package/dist/mcp/telemetry.js.map +0 -1
- package/dist/reality/no-dead-buttons/button-sweep-generator.d.ts +0 -32
- package/dist/reality/no-dead-buttons/button-sweep-generator.d.ts.map +0 -1
- package/dist/reality/no-dead-buttons/button-sweep-generator.js +0 -236
- package/dist/reality/no-dead-buttons/button-sweep-generator.js.map +0 -1
- package/dist/reality/no-dead-buttons/index.d.ts +0 -11
- package/dist/reality/no-dead-buttons/index.d.ts.map +0 -1
- package/dist/reality/no-dead-buttons/index.js +0 -18
- package/dist/reality/no-dead-buttons/index.js.map +0 -1
- package/dist/reality/no-dead-buttons/static-scanner.d.ts +0 -34
- package/dist/reality/no-dead-buttons/static-scanner.d.ts.map +0 -1
- package/dist/reality/no-dead-buttons/static-scanner.js +0 -230
- package/dist/reality/no-dead-buttons/static-scanner.js.map +0 -1
- package/dist/reality/reality-graph.d.ts +0 -192
- package/dist/reality/reality-graph.d.ts.map +0 -1
- package/dist/reality/reality-graph.js +0 -600
- package/dist/reality/reality-graph.js.map +0 -1
- package/dist/reality/reality-runner.d.ts +0 -89
- package/dist/reality/reality-runner.d.ts.map +0 -1
- package/dist/reality/reality-runner.js +0 -540
- package/dist/reality/reality-runner.js.map +0 -1
- package/dist/reality/receipt-generator.d.ts +0 -152
- package/dist/reality/receipt-generator.d.ts.map +0 -1
- package/dist/reality/receipt-generator.js +0 -495
- package/dist/reality/receipt-generator.js.map +0 -1
- package/dist/reality/runtime-tracer.d.ts +0 -75
- package/dist/reality/runtime-tracer.d.ts.map +0 -1
- package/dist/reality/runtime-tracer.js +0 -109
- package/dist/reality/runtime-tracer.js.map +0 -1
- package/dist/runtime/auth-utils.d.ts +0 -43
- package/dist/runtime/auth-utils.d.ts.map +0 -1
- package/dist/runtime/auth-utils.js +0 -130
- package/dist/runtime/auth-utils.js.map +0 -1
- package/dist/runtime/client.d.ts +0 -74
- package/dist/runtime/client.d.ts.map +0 -1
- package/dist/runtime/client.js +0 -222
- package/dist/runtime/client.js.map +0 -1
- package/dist/runtime/creds.d.ts +0 -48
- package/dist/runtime/creds.d.ts.map +0 -1
- package/dist/runtime/creds.js +0 -245
- package/dist/runtime/creds.js.map +0 -1
- package/dist/runtime/exit-codes.d.ts +0 -49
- package/dist/runtime/exit-codes.d.ts.map +0 -1
- package/dist/runtime/exit-codes.js +0 -93
- package/dist/runtime/exit-codes.js.map +0 -1
- package/dist/runtime/index.d.ts +0 -9
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/index.js +0 -25
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/json-output.d.ts +0 -42
- package/dist/runtime/json-output.d.ts.map +0 -1
- package/dist/runtime/json-output.js +0 -59
- package/dist/runtime/json-output.js.map +0 -1
- package/dist/runtime/semver.d.ts +0 -37
- package/dist/runtime/semver.d.ts.map +0 -1
- package/dist/runtime/semver.js +0 -110
- package/dist/runtime/semver.js.map +0 -1
- package/dist/scan/dead-ui-detector.d.ts +0 -48
- package/dist/scan/dead-ui-detector.d.ts.map +0 -1
- package/dist/scan/dead-ui-detector.js +0 -170
- package/dist/scan/dead-ui-detector.js.map +0 -1
- package/dist/scan/playwright-sweep.d.ts +0 -40
- package/dist/scan/playwright-sweep.d.ts.map +0 -1
- package/dist/scan/playwright-sweep.js +0 -216
- package/dist/scan/playwright-sweep.js.map +0 -1
- package/dist/scan/proof-bundle.d.ts +0 -25
- package/dist/scan/proof-bundle.d.ts.map +0 -1
- package/dist/scan/proof-bundle.js +0 -203
- package/dist/scan/proof-bundle.js.map +0 -1
- package/dist/scan/proof-graph.d.ts +0 -59
- package/dist/scan/proof-graph.d.ts.map +0 -1
- package/dist/scan/proof-graph.js +0 -64
- package/dist/scan/proof-graph.js.map +0 -1
- package/dist/scan/reality-sniff.d.ts +0 -56
- package/dist/scan/reality-sniff.d.ts.map +0 -1
- package/dist/scan/reality-sniff.js +0 -200
- package/dist/scan/reality-sniff.js.map +0 -1
- package/dist/scan/structural-verifier.d.ts +0 -20
- package/dist/scan/structural-verifier.d.ts.map +0 -1
- package/dist/scan/structural-verifier.js +0 -112
- package/dist/scan/structural-verifier.js.map +0 -1
- package/dist/scan/verification-engine.d.ts +0 -47
- package/dist/scan/verification-engine.d.ts.map +0 -1
- package/dist/scan/verification-engine.js +0 -141
- package/dist/scan/verification-engine.js.map +0 -1
- package/dist/scanner/baseline.d.ts +0 -52
- package/dist/scanner/baseline.d.ts.map +0 -1
- package/dist/scanner/baseline.js +0 -85
- package/dist/scanner/baseline.js.map +0 -1
- package/dist/scanner/incremental.d.ts +0 -30
- package/dist/scanner/incremental.d.ts.map +0 -1
- package/dist/scanner/incremental.js +0 -82
- package/dist/scanner/incremental.js.map +0 -1
- package/dist/scanner/parallel.d.ts +0 -43
- package/dist/scanner/parallel.d.ts.map +0 -1
- package/dist/scanner/parallel.js +0 -99
- package/dist/scanner/parallel.js.map +0 -1
- package/dist/standalone.d.ts +0 -1
- package/dist/standalone.d.ts.map +0 -1
- package/dist/standalone.js +0 -1
- package/dist/standalone.js.map +0 -1
- package/dist/truth-pack/index.d.ts +0 -102
- package/dist/truth-pack/index.d.ts.map +0 -1
- package/dist/truth-pack/index.js +0 -694
- package/dist/truth-pack/index.js.map +0 -1
- package/dist/ui/frame.d.ts +0 -68
- package/dist/ui/frame.d.ts.map +0 -1
- package/dist/ui/frame.js +0 -165
- package/dist/ui/frame.js.map +0 -1
- package/dist/ui/index.d.ts +0 -5
- package/dist/ui/index.d.ts.map +0 -1
- package/dist/ui/index.js +0 -16
- package/dist/ui/index.js.map +0 -1
- package/dist/ui.d.ts +0 -36
- package/dist/ui.d.ts.map +0 -1
- package/dist/ui.js +0 -45
- package/dist/ui.js.map +0 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// bin/runners/runInstall.js
|
|
2
|
+
const fs = require("fs");
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const { buildTruthpack, writeTruthpack } = require("./lib/truth");
|
|
5
|
+
const { detectPackageManager, detectNext, detectFastify, detectFastifyEntry } = require("./lib/detect");
|
|
6
|
+
const { readPkg, writePkg, upsertScripts } = require("./lib/pkgjson");
|
|
7
|
+
const { writeEnvTemplateFromTruthpack } = require("./lib/env-template");
|
|
8
|
+
|
|
9
|
+
function ensureDir(p) {
|
|
10
|
+
fs.mkdirSync(p, { recursive: true });
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async function runInstall({ repoRoot } = {}) {
|
|
14
|
+
const root = repoRoot || process.cwd();
|
|
15
|
+
|
|
16
|
+
const { path: pkgPath, json: pkg } = readPkg(root);
|
|
17
|
+
|
|
18
|
+
const pm = detectPackageManager(root);
|
|
19
|
+
const next = detectNext(root, pkg);
|
|
20
|
+
const fastify = detectFastify(root, pkg);
|
|
21
|
+
|
|
22
|
+
const fastifyEntry = fastify.enabled ? await detectFastifyEntry(root) : null;
|
|
23
|
+
|
|
24
|
+
// Build truthpack once (this powers env template + ctx baseline)
|
|
25
|
+
const truthpack = await buildTruthpack({ repoRoot: root, fastifyEntry: fastifyEntry || undefined });
|
|
26
|
+
writeTruthpack(root, truthpack);
|
|
27
|
+
|
|
28
|
+
// Write minimal local config
|
|
29
|
+
const cfgDir = path.join(root, ".vibecheck");
|
|
30
|
+
ensureDir(cfgDir);
|
|
31
|
+
|
|
32
|
+
const cfg = {
|
|
33
|
+
version: 1,
|
|
34
|
+
detected: {
|
|
35
|
+
packageManager: pm,
|
|
36
|
+
next: next.enabled,
|
|
37
|
+
fastify: fastify.enabled
|
|
38
|
+
},
|
|
39
|
+
fastifyEntry: fastifyEntry || null
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
fs.writeFileSync(path.join(cfgDir, "config.json"), JSON.stringify(cfg, null, 2), "utf8");
|
|
43
|
+
|
|
44
|
+
// Generate/extend env template from reality
|
|
45
|
+
const envRes = writeEnvTemplateFromTruthpack(root, truthpack);
|
|
46
|
+
|
|
47
|
+
// Add scripts (vibecoder-friendly)
|
|
48
|
+
const scriptsToAdd = {
|
|
49
|
+
"vibecheck:ctx": "vibecheck ctx",
|
|
50
|
+
"vibecheck:ship": "vibecheck ship",
|
|
51
|
+
"vibecheck:fix": "vibecheck fix --apply",
|
|
52
|
+
"vibecheck:pr": "vibecheck pr"
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const changedScripts = upsertScripts(pkg, scriptsToAdd);
|
|
56
|
+
if (changedScripts.length) writePkg(pkgPath, pkg);
|
|
57
|
+
|
|
58
|
+
// Output (one next command)
|
|
59
|
+
console.log(`\n✅ vibecheck install`);
|
|
60
|
+
console.log(`Detected package manager: ${pm}`);
|
|
61
|
+
console.log(`Detected Next: ${next.enabled ? "yes" : "no"}`);
|
|
62
|
+
console.log(`Detected Fastify: ${fastify.enabled ? "yes" : "no"}`);
|
|
63
|
+
if (fastifyEntry) console.log(`Fastify entry: ${fastifyEntry}`);
|
|
64
|
+
|
|
65
|
+
console.log(`\nWrote:`);
|
|
66
|
+
console.log(`- .vibecheck/config.json`);
|
|
67
|
+
console.log(`- .vibecheck/truthpack.json`);
|
|
68
|
+
if (envRes.wrote) console.log(`- ${envRes.outRel} (+${envRes.added.length} var(s))`);
|
|
69
|
+
if (changedScripts.length) console.log(`- package.json scripts: ${changedScripts.join(", ")}`);
|
|
70
|
+
|
|
71
|
+
const runner = pm === "pnpm" ? "pnpm" : pm === "yarn" ? "yarn" : "npm run";
|
|
72
|
+
console.log(`\nNext (do this):`);
|
|
73
|
+
console.log(` ${runner} vibecheck:ship`);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
module.exports = { runInstall };
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* vibecheck Interactive Mode
|
|
3
|
+
*
|
|
4
|
+
* Beautiful interactive CLI experience with menus, tables, and visual feedback.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const path = require("path");
|
|
8
|
+
const fs = require("fs");
|
|
9
|
+
const readline = require("readline");
|
|
10
|
+
|
|
11
|
+
const {
|
|
12
|
+
c,
|
|
13
|
+
createHeader,
|
|
14
|
+
createTable,
|
|
15
|
+
createProgressBar,
|
|
16
|
+
createScoreCard,
|
|
17
|
+
createMenu,
|
|
18
|
+
createSpinner,
|
|
19
|
+
createVerdictDisplay,
|
|
20
|
+
createBadgeDisplay,
|
|
21
|
+
divider,
|
|
22
|
+
sectionHeader,
|
|
23
|
+
} = require("./lib/cli-ui");
|
|
24
|
+
|
|
25
|
+
// ASCII Art Logo
|
|
26
|
+
const LOGO = `
|
|
27
|
+
${c.cyan}${c.bold}
|
|
28
|
+
██╗ ██╗██╗██████╗ ███████╗ ██████╗██╗ ██╗███████╗ ██████╗██╗ ██╗
|
|
29
|
+
██║ ██║██║██╔══██╗██╔════╝██╔════╝██║ ██║██╔════╝██╔════╝██║ ██╔╝
|
|
30
|
+
██║ ██║██║██████╔╝█████╗ ██║ ███████║█████╗ ██║ █████╔╝
|
|
31
|
+
╚██╗ ██╔╝██║██╔══██╗██╔══╝ ██║ ██╔══██║██╔══╝ ██║ ██╔═██╗
|
|
32
|
+
╚████╔╝ ██║██████╔╝███████╗╚██████╗██║ ██║███████╗╚██████╗██║ ██╗
|
|
33
|
+
╚═══╝ ╚═╝╚═════╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═════╝╚═╝ ╚═╝
|
|
34
|
+
${c.reset}
|
|
35
|
+
${c.dim} Proof-of-Working for AI-built apps${c.reset}
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
const WELCOME_MESSAGE = `
|
|
39
|
+
${c.cyan}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${c.reset}
|
|
40
|
+
${c.bold} Welcome to Vibecheck Interactive Mode${c.reset}
|
|
41
|
+
${c.dim} Navigate with numbers. Get ship verdicts, fix issues, verify runtime.${c.reset}
|
|
42
|
+
${c.cyan}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${c.reset}
|
|
43
|
+
`;
|
|
44
|
+
|
|
45
|
+
const MAIN_MENU_OPTIONS = [
|
|
46
|
+
{
|
|
47
|
+
key: "ship",
|
|
48
|
+
label: "Ship Check",
|
|
49
|
+
icon: "🚀",
|
|
50
|
+
description: "Get a ship verdict: SHIP | WARN | BLOCK",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: "fix",
|
|
54
|
+
label: "Fix Issues",
|
|
55
|
+
icon: "🔧",
|
|
56
|
+
description: "Run safe mechanical fixes with patch preview",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
key: "verify",
|
|
60
|
+
label: "Runtime Verify",
|
|
61
|
+
icon: "🔍",
|
|
62
|
+
description: "Playwright-powered runtime proof",
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
key: "report",
|
|
66
|
+
label: "Generate Report",
|
|
67
|
+
icon: "📄",
|
|
68
|
+
description: "Professional client reports (Executive/Technical/Compliance)",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: "badge",
|
|
72
|
+
label: "Ship Badge",
|
|
73
|
+
icon: "🏆",
|
|
74
|
+
description: "Generate beautiful embeddable badge for README",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
key: "history",
|
|
78
|
+
label: "Score History",
|
|
79
|
+
icon: "📊",
|
|
80
|
+
description: "View score trends and streaks",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
key: "doctor",
|
|
84
|
+
label: "Doctor",
|
|
85
|
+
icon: "🩺",
|
|
86
|
+
description: "Environment sanity check",
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Clear screen and show logo
|
|
92
|
+
*/
|
|
93
|
+
function showLogo() {
|
|
94
|
+
console.clear();
|
|
95
|
+
console.log(LOGO);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Show welcome screen
|
|
100
|
+
*/
|
|
101
|
+
function showWelcome() {
|
|
102
|
+
showLogo();
|
|
103
|
+
console.log(WELCOME_MESSAGE);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Create input prompt
|
|
108
|
+
*/
|
|
109
|
+
function prompt(question) {
|
|
110
|
+
return new Promise((resolve) => {
|
|
111
|
+
const rl = readline.createInterface({
|
|
112
|
+
input: process.stdin,
|
|
113
|
+
output: process.stdout,
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
rl.question(question, (answer) => {
|
|
117
|
+
rl.close();
|
|
118
|
+
resolve(answer.trim());
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Show main menu
|
|
125
|
+
*/
|
|
126
|
+
async function showMainMenu() {
|
|
127
|
+
console.log("");
|
|
128
|
+
console.log(`${c.bold}${c.cyan}┌─────────────────────────────────────┐${c.reset}`);
|
|
129
|
+
console.log(`${c.bold}${c.cyan}│${c.reset} ${c.bold}MAIN MENU${c.reset} ${c.bold}${c.cyan}│${c.reset}`);
|
|
130
|
+
console.log(`${c.bold}${c.cyan}└─────────────────────────────────────┘${c.reset}`);
|
|
131
|
+
console.log("");
|
|
132
|
+
|
|
133
|
+
MAIN_MENU_OPTIONS.forEach((opt, i) => {
|
|
134
|
+
const num = `${i + 1}`.padStart(2);
|
|
135
|
+
console.log(` ${c.cyan}${num}${c.reset} ${opt.icon} ${c.bold}${opt.label}${c.reset}`);
|
|
136
|
+
console.log(` ${c.dim}${opt.description}${c.reset}`);
|
|
137
|
+
console.log("");
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
console.log(` ${c.dim} 0 Exit${c.reset}`);
|
|
141
|
+
console.log("");
|
|
142
|
+
console.log(divider(50));
|
|
143
|
+
|
|
144
|
+
const choice = await prompt(` ${c.cyan}›${c.reset} Select option: `);
|
|
145
|
+
return parseInt(choice, 10);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Run ship check with beautiful output
|
|
150
|
+
*/
|
|
151
|
+
async function runShipInteractive(projectPath) {
|
|
152
|
+
console.log("");
|
|
153
|
+
console.log(sectionHeader("Ship Check", "🚀"));
|
|
154
|
+
console.log("");
|
|
155
|
+
|
|
156
|
+
const spinner = createSpinner("Analyzing your codebase...", "dots").start();
|
|
157
|
+
|
|
158
|
+
// Simulate analysis steps
|
|
159
|
+
await sleep(800);
|
|
160
|
+
spinner.update("Checking for exposed secrets...");
|
|
161
|
+
await sleep(600);
|
|
162
|
+
spinner.update("Analyzing authentication coverage...");
|
|
163
|
+
await sleep(600);
|
|
164
|
+
spinner.update("Detecting mock/demo code...");
|
|
165
|
+
await sleep(600);
|
|
166
|
+
spinner.update("Verifying route integrity...");
|
|
167
|
+
await sleep(500);
|
|
168
|
+
spinner.success("Analysis complete!");
|
|
169
|
+
|
|
170
|
+
// Run actual ship check
|
|
171
|
+
try {
|
|
172
|
+
const { runShip } = require("./runShip");
|
|
173
|
+
return await runShip(["--path", projectPath]);
|
|
174
|
+
} catch (err) {
|
|
175
|
+
console.error(`${c.red}Error: ${err.message}${c.reset}`);
|
|
176
|
+
return 1;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Show badge generation with stunning display
|
|
182
|
+
*/
|
|
183
|
+
async function runBadgeInteractive(projectPath) {
|
|
184
|
+
console.log("");
|
|
185
|
+
console.log(sectionHeader("Ship Badge Generator", "🏆"));
|
|
186
|
+
console.log("");
|
|
187
|
+
|
|
188
|
+
const spinner = createSpinner("Generating your ship badge...", "star").start();
|
|
189
|
+
await sleep(1500);
|
|
190
|
+
|
|
191
|
+
// Get latest scan results
|
|
192
|
+
const outputDir = path.join(projectPath, ".vibecheck");
|
|
193
|
+
const reportPath = path.join(outputDir, "report.json");
|
|
194
|
+
|
|
195
|
+
let score = 85;
|
|
196
|
+
let verdict = "SHIP";
|
|
197
|
+
|
|
198
|
+
if (fs.existsSync(reportPath)) {
|
|
199
|
+
try {
|
|
200
|
+
const report = JSON.parse(fs.readFileSync(reportPath, "utf8"));
|
|
201
|
+
score = report.score || 85;
|
|
202
|
+
verdict = report.canShip ? "SHIP" : (score >= 50 ? "WARN" : "BLOCK");
|
|
203
|
+
} catch {}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
spinner.success("Badge generated!");
|
|
207
|
+
|
|
208
|
+
const projectName = path.basename(projectPath);
|
|
209
|
+
const projectId = projectName.toLowerCase().replace(/[^a-z0-9]/g, "-");
|
|
210
|
+
|
|
211
|
+
// Show the stunning badge
|
|
212
|
+
console.log(createBadgeDisplay(projectId, score, verdict));
|
|
213
|
+
|
|
214
|
+
// Show embed codes
|
|
215
|
+
const badgeUrl = `https://vibecheck.dev/badge/${projectId}.svg`;
|
|
216
|
+
const reportUrl = `https://vibecheck.dev/report/${projectId}`;
|
|
217
|
+
const markdown = `[](${reportUrl})`;
|
|
218
|
+
|
|
219
|
+
console.log("");
|
|
220
|
+
console.log(`${c.bold}${c.cyan}┌─ Embed Codes ─────────────────────────────────────────────────────┐${c.reset}`);
|
|
221
|
+
console.log(`${c.cyan}│${c.reset}`);
|
|
222
|
+
console.log(`${c.cyan}│${c.reset} ${c.dim}Badge URL:${c.reset}`);
|
|
223
|
+
console.log(`${c.cyan}│${c.reset} ${c.green}${badgeUrl}${c.reset}`);
|
|
224
|
+
console.log(`${c.cyan}│${c.reset}`);
|
|
225
|
+
console.log(`${c.cyan}│${c.reset} ${c.dim}Markdown (for README):${c.reset}`);
|
|
226
|
+
console.log(`${c.cyan}│${c.reset} ${c.yellow}${markdown}${c.reset}`);
|
|
227
|
+
console.log(`${c.cyan}│${c.reset}`);
|
|
228
|
+
console.log(`${c.cyan}│${c.reset} ${c.dim}Report URL:${c.reset}`);
|
|
229
|
+
console.log(`${c.cyan}│${c.reset} ${c.blue}${reportUrl}${c.reset}`);
|
|
230
|
+
console.log(`${c.cyan}│${c.reset}`);
|
|
231
|
+
console.log(`${c.bold}${c.cyan}└───────────────────────────────────────────────────────────────────┘${c.reset}`);
|
|
232
|
+
console.log("");
|
|
233
|
+
|
|
234
|
+
// Save badge info
|
|
235
|
+
try {
|
|
236
|
+
if (!fs.existsSync(outputDir)) {
|
|
237
|
+
fs.mkdirSync(outputDir, { recursive: true });
|
|
238
|
+
}
|
|
239
|
+
fs.writeFileSync(
|
|
240
|
+
path.join(outputDir, "badge.json"),
|
|
241
|
+
JSON.stringify({ projectId, score, verdict, badgeUrl, reportUrl, markdown, generatedAt: new Date().toISOString() }, null, 2)
|
|
242
|
+
);
|
|
243
|
+
} catch {}
|
|
244
|
+
|
|
245
|
+
return 0;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Show score history with trends
|
|
250
|
+
*/
|
|
251
|
+
async function showHistoryInteractive(projectPath) {
|
|
252
|
+
console.log("");
|
|
253
|
+
console.log(sectionHeader("Score History", "📊"));
|
|
254
|
+
console.log("");
|
|
255
|
+
|
|
256
|
+
try {
|
|
257
|
+
const { formatHistoryDisplay } = require("./lib/score-history");
|
|
258
|
+
console.log(formatHistoryDisplay(projectPath));
|
|
259
|
+
} catch {
|
|
260
|
+
console.log(`${c.dim}No history available. Run \`vibecheck ship\` to start tracking.${c.reset}`);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
return 0;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Run doctor with beautiful output
|
|
268
|
+
*/
|
|
269
|
+
async function runDoctorInteractive(projectPath) {
|
|
270
|
+
console.log("");
|
|
271
|
+
console.log(sectionHeader("Environment Doctor", "🩺"));
|
|
272
|
+
console.log("");
|
|
273
|
+
|
|
274
|
+
try {
|
|
275
|
+
const { runDoctor } = require("./runDoctor");
|
|
276
|
+
return await runDoctor(["--path", projectPath]);
|
|
277
|
+
} catch (err) {
|
|
278
|
+
console.error(`${c.red}Error: ${err.message}${c.reset}`);
|
|
279
|
+
return 1;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Run report generator
|
|
285
|
+
*/
|
|
286
|
+
async function runReportInteractive(projectPath) {
|
|
287
|
+
console.log("");
|
|
288
|
+
console.log(sectionHeader("Report Generator", "📄"));
|
|
289
|
+
console.log("");
|
|
290
|
+
|
|
291
|
+
console.log(" Select report type:");
|
|
292
|
+
console.log("");
|
|
293
|
+
console.log(` ${c.cyan}1${c.reset} 📋 ${c.bold}Executive Summary${c.reset}`);
|
|
294
|
+
console.log(` ${c.dim}One-page overview for stakeholders${c.reset}`);
|
|
295
|
+
console.log("");
|
|
296
|
+
console.log(` ${c.cyan}2${c.reset} 🔬 ${c.bold}Technical Report${c.reset}`);
|
|
297
|
+
console.log(` ${c.dim}Detailed findings for developers${c.reset}`);
|
|
298
|
+
console.log("");
|
|
299
|
+
console.log(` ${c.cyan}3${c.reset} 🔒 ${c.bold}Compliance Report${c.reset}`);
|
|
300
|
+
console.log(` ${c.dim}SOC2-adjacent language${c.reset}`);
|
|
301
|
+
console.log("");
|
|
302
|
+
|
|
303
|
+
const choice = await prompt(` ${c.cyan}›${c.reset} Select type: `);
|
|
304
|
+
const types = ["executive", "technical", "compliance"];
|
|
305
|
+
const type = types[parseInt(choice, 10) - 1] || "executive";
|
|
306
|
+
|
|
307
|
+
try {
|
|
308
|
+
const { runReport } = require("./runReport");
|
|
309
|
+
return await runReport(["--type", type, "--path", projectPath]);
|
|
310
|
+
} catch (err) {
|
|
311
|
+
console.error(`${c.red}Error: ${err.message}${c.reset}`);
|
|
312
|
+
return 1;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Sleep utility
|
|
318
|
+
*/
|
|
319
|
+
function sleep(ms) {
|
|
320
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Main interactive loop
|
|
325
|
+
*/
|
|
326
|
+
async function runInteractive(args) {
|
|
327
|
+
const projectPath = path.resolve(args[0] || ".");
|
|
328
|
+
|
|
329
|
+
showWelcome();
|
|
330
|
+
|
|
331
|
+
let running = true;
|
|
332
|
+
|
|
333
|
+
while (running) {
|
|
334
|
+
const choice = await showMainMenu();
|
|
335
|
+
|
|
336
|
+
switch (choice) {
|
|
337
|
+
case 1: // Ship
|
|
338
|
+
await runShipInteractive(projectPath);
|
|
339
|
+
break;
|
|
340
|
+
case 2: // Fix
|
|
341
|
+
console.log("");
|
|
342
|
+
console.log(sectionHeader("Fix Issues", "🔧"));
|
|
343
|
+
const { runFix } = require("./runFix");
|
|
344
|
+
await runFix(["--path", projectPath]);
|
|
345
|
+
break;
|
|
346
|
+
case 3: // Verify
|
|
347
|
+
console.log("");
|
|
348
|
+
console.log(sectionHeader("Runtime Verify", "🔍"));
|
|
349
|
+
console.log(`${c.dim}Provide a URL to verify:${c.reset}`);
|
|
350
|
+
const url = await prompt(` ${c.cyan}URL:${c.reset} `);
|
|
351
|
+
if (url) {
|
|
352
|
+
const { runReality } = require("./runReality");
|
|
353
|
+
await runReality(["--url", url]);
|
|
354
|
+
}
|
|
355
|
+
break;
|
|
356
|
+
case 4: // Report
|
|
357
|
+
await runReportInteractive(projectPath);
|
|
358
|
+
break;
|
|
359
|
+
case 5: // Badge
|
|
360
|
+
await runBadgeInteractive(projectPath);
|
|
361
|
+
break;
|
|
362
|
+
case 6: // History
|
|
363
|
+
await showHistoryInteractive(projectPath);
|
|
364
|
+
break;
|
|
365
|
+
case 7: // Doctor
|
|
366
|
+
await runDoctorInteractive(projectPath);
|
|
367
|
+
break;
|
|
368
|
+
case 0:
|
|
369
|
+
running = false;
|
|
370
|
+
console.log("");
|
|
371
|
+
console.log(`${c.dim} Goodbye! Happy shipping. 🚀${c.reset}`);
|
|
372
|
+
console.log("");
|
|
373
|
+
break;
|
|
374
|
+
default:
|
|
375
|
+
console.log(`${c.yellow} Invalid option. Try again.${c.reset}`);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
if (running && choice !== 0) {
|
|
379
|
+
console.log("");
|
|
380
|
+
await prompt(` ${c.dim}Press Enter to continue...${c.reset}`);
|
|
381
|
+
showLogo();
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
return 0;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
module.exports = { runInteractive };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const { execSync } = require("child_process");
|
|
3
|
+
|
|
4
|
+
function runMcp(args) {
|
|
5
|
+
console.log("\n 🔌 Starting vibecheck MCP Server...\n");
|
|
6
|
+
|
|
7
|
+
const mcpServer = path.join(__dirname, "../../mcp-server/index.js");
|
|
8
|
+
|
|
9
|
+
try {
|
|
10
|
+
execSync(`node "${mcpServer}"`, { stdio: "inherit" });
|
|
11
|
+
} catch (error) {
|
|
12
|
+
console.error(" ❌ MCP Server failed to start");
|
|
13
|
+
return 1;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = { runMcp };
|