@vibecheckai/cli 3.1.6 → 3.2.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.
Files changed (56) hide show
  1. package/README.md +27 -32
  2. package/bin/registry.js +208 -343
  3. package/bin/runners/context/generators/mcp.js +18 -0
  4. package/bin/runners/context/index.js +72 -4
  5. package/bin/runners/context/proof-context.js +293 -1
  6. package/bin/runners/context/security-scanner.js +311 -73
  7. package/bin/runners/lib/analyzers.js +607 -20
  8. package/bin/runners/lib/detectors-v2.js +172 -15
  9. package/bin/runners/lib/entitlements-v2.js +48 -1
  10. package/bin/runners/lib/evidence-pack.js +678 -0
  11. package/bin/runners/lib/html-proof-report.js +913 -0
  12. package/bin/runners/lib/missions/plan.js +231 -41
  13. package/bin/runners/lib/missions/templates.js +125 -0
  14. package/bin/runners/lib/scan-output.js +492 -253
  15. package/bin/runners/lib/ship-output.js +901 -641
  16. package/bin/runners/runCheckpoint.js +44 -3
  17. package/bin/runners/runContext.d.ts +4 -0
  18. package/bin/runners/runContext.js +2 -3
  19. package/bin/runners/runDoctor.js +11 -4
  20. package/bin/runners/runFix.js +51 -341
  21. package/bin/runners/runInit.js +37 -20
  22. package/bin/runners/runPolish.d.ts +4 -0
  23. package/bin/runners/runPolish.js +608 -29
  24. package/bin/runners/runProve.js +210 -25
  25. package/bin/runners/runReality.js +861 -107
  26. package/bin/runners/runScan.js +238 -4
  27. package/bin/runners/runShip.js +19 -3
  28. package/bin/runners/runWatch.js +25 -5
  29. package/bin/vibecheck.js +35 -47
  30. package/mcp-server/consolidated-tools.js +408 -42
  31. package/mcp-server/index.js +152 -15
  32. package/mcp-server/package.json +1 -1
  33. package/mcp-server/proof-tools.js +571 -0
  34. package/mcp-server/tier-auth.js +22 -19
  35. package/mcp-server/tools-v3.js +744 -0
  36. package/mcp-server/truth-firewall-tools.js +190 -4
  37. package/package.json +3 -1
  38. package/bin/runners/runBadge.js +0 -916
  39. package/bin/runners/runContracts.js +0 -105
  40. package/bin/runners/runCtx.js +0 -680
  41. package/bin/runners/runCtxDiff.js +0 -301
  42. package/bin/runners/runCtxGuard.js +0 -176
  43. package/bin/runners/runCtxSync.js +0 -116
  44. package/bin/runners/runExport.js +0 -93
  45. package/bin/runners/runGraph.js +0 -454
  46. package/bin/runners/runInstall.js +0 -273
  47. package/bin/runners/runLabs.js +0 -341
  48. package/bin/runners/runLaunch.js +0 -181
  49. package/bin/runners/runPR.js +0 -255
  50. package/bin/runners/runPermissions.js +0 -310
  51. package/bin/runners/runPreflight.js +0 -580
  52. package/bin/runners/runReplay.js +0 -499
  53. package/bin/runners/runSecurity.js +0 -92
  54. package/bin/runners/runShare.js +0 -212
  55. package/bin/runners/runStatus.js +0 -102
  56. package/bin/runners/runVerify.js +0 -272
@@ -1,105 +0,0 @@
1
- /**
2
- * vibecheck contracts - CI Gate for Contract Drift / Invariants
3
- *
4
- * Replaces: ctx guard
5
- * Purpose: Validate code against contracts (SHIP/WARN/BLOCK)
6
- */
7
-
8
- "use strict";
9
-
10
- const { runCtxGuard } = require("./runCtxGuard");
11
-
12
- const c = {
13
- reset: '\x1b[0m',
14
- bold: '\x1b[1m',
15
- dim: '\x1b[2m',
16
- green: '\x1b[32m',
17
- yellow: '\x1b[33m',
18
- cyan: '\x1b[36m',
19
- red: '\x1b[31m',
20
- };
21
-
22
- function parseArgs(args) {
23
- const opts = {
24
- repoRoot: process.cwd(),
25
- fastifyEntry: null,
26
- json: false,
27
- failOnWarn: false,
28
- failOnMissing: false,
29
- strict: false,
30
- help: false
31
- };
32
-
33
- for (let i = 0; i < args.length; i++) {
34
- const arg = args[i];
35
- if (arg === "--json") opts.json = true;
36
- else if (arg === "--strict") opts.strict = true;
37
- else if (arg === "--fail-on-warn") opts.failOnWarn = true;
38
- else if (arg === "--fail-on-missing") opts.failOnMissing = true;
39
- else if (arg === "--fastify-entry") opts.fastifyEntry = args[++i];
40
- else if (arg === "--path" || arg === "-p") opts.repoRoot = args[++i];
41
- else if (arg === "--help" || arg === "-h") opts.help = true;
42
- }
43
-
44
- // --strict implies --fail-on-warn
45
- if (opts.strict) opts.failOnWarn = true;
46
-
47
- return opts;
48
- }
49
-
50
- function printHelp() {
51
- console.log(`
52
- ${c.cyan}${c.bold}🛡️ vibecheck contracts${c.reset} - CI Gate for Contract Drift
53
-
54
- Validates current code against contracts. Use in CI to block drift.
55
-
56
- ${c.bold}USAGE${c.reset}
57
- vibecheck contracts ${c.dim}# Validate against contracts${c.reset}
58
- vibecheck contracts --strict ${c.dim}# Fail on warnings${c.reset}
59
- vibecheck contracts --json ${c.dim}# Output JSON for CI${c.reset}
60
-
61
- ${c.bold}OPTIONS${c.reset}
62
- --strict Fail on warnings (exit 1 on WARN)
63
- --json Output JSON result to .vibecheck/contracts-result.json
64
- --fail-on-warn Exit 1 on warnings (same as --strict)
65
- --fail-on-missing Exit 2 if no contracts exist
66
- --fastify-entry Fastify entry file (e.g. src/server.ts)
67
- --path, -p Project path (default: current directory)
68
- --help, -h Show this help
69
-
70
- ${c.bold}VIOLATIONS (BLOCK)${c.reset}
71
- • Route used in code but not in routes.json
72
- • Webhook without signature verification
73
- • Protected route accessible anonymously
74
-
75
- ${c.bold}WARNINGS${c.reset}
76
- • Env var used but not in env.json
77
- • Required env var not used
78
- • Undeclared external service
79
-
80
- ${c.bold}EXIT CODES${c.reset}
81
- 0 = SHIP (or WARN without --strict)
82
- 1 = WARN (with --strict)
83
- 2 = BLOCK
84
-
85
- ${c.bold}EXAMPLES${c.reset}
86
- vibecheck contracts ${c.dim}# Local validation${c.reset}
87
- vibecheck contracts --strict --json ${c.dim}# CI mode${c.reset}
88
-
89
- ${c.dim}Note: This command replaces 'vibecheck ctx guard'.${c.reset}
90
- `);
91
- }
92
-
93
- async function runContracts(args) {
94
- const opts = parseArgs(args);
95
-
96
- if (opts.help) {
97
- printHelp();
98
- return 0;
99
- }
100
-
101
- // Delegate to runCtxGuard
102
- return await runCtxGuard(opts);
103
- }
104
-
105
- module.exports = { runContracts };