@vibecheckai/cli 3.1.8 → 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 (36) hide show
  1. package/bin/registry.js +106 -116
  2. package/bin/runners/context/generators/mcp.js +18 -0
  3. package/bin/runners/context/index.js +72 -4
  4. package/bin/runners/context/proof-context.js +293 -1
  5. package/bin/runners/context/security-scanner.js +311 -73
  6. package/bin/runners/lib/analyzers.js +607 -20
  7. package/bin/runners/lib/detectors-v2.js +172 -15
  8. package/bin/runners/lib/entitlements-v2.js +48 -1
  9. package/bin/runners/lib/evidence-pack.js +678 -0
  10. package/bin/runners/lib/html-proof-report.js +913 -0
  11. package/bin/runners/lib/missions/plan.js +231 -41
  12. package/bin/runners/lib/missions/templates.js +125 -0
  13. package/bin/runners/lib/scan-output.js +492 -253
  14. package/bin/runners/lib/ship-output.js +901 -641
  15. package/bin/runners/runCheckpoint.js +44 -3
  16. package/bin/runners/runContext.d.ts +4 -0
  17. package/bin/runners/runDoctor.js +10 -2
  18. package/bin/runners/runFix.js +51 -341
  19. package/bin/runners/runInit.js +11 -0
  20. package/bin/runners/runPolish.d.ts +4 -0
  21. package/bin/runners/runPolish.js +608 -29
  22. package/bin/runners/runProve.js +210 -25
  23. package/bin/runners/runReality.js +846 -101
  24. package/bin/runners/runScan.js +238 -4
  25. package/bin/runners/runShip.js +19 -3
  26. package/bin/runners/runWatch.js +14 -1
  27. package/bin/vibecheck.js +32 -2
  28. package/mcp-server/consolidated-tools.js +408 -42
  29. package/mcp-server/index.js +152 -15
  30. package/mcp-server/proof-tools.js +571 -0
  31. package/mcp-server/tier-auth.js +22 -19
  32. package/mcp-server/tools-v3.js +744 -0
  33. package/mcp-server/truth-firewall-tools.js +190 -4
  34. package/package.json +3 -1
  35. package/bin/runners/runInstall.js +0 -281
  36. package/bin/runners/runLabs.js +0 -341
@@ -1,341 +0,0 @@
1
- /**
2
- * vibecheck labs - Experimental Features
3
- *
4
- * Access to experimental, internal, and beta features.
5
- * These may change or be removed without notice.
6
- *
7
- * @module runners/runLabs
8
- */
9
-
10
- "use strict";
11
-
12
- const { c, sym, box, printHeader, table } = require("./lib/ui");
13
-
14
- // ═══════════════════════════════════════════════════════════════════════════════
15
- // LABS FEATURE REGISTRY
16
- // ═══════════════════════════════════════════════════════════════════════════════
17
- const LABS_FEATURES = {
18
- // Experimental - Working but API may change
19
- "ai-test": {
20
- status: "experimental",
21
- description: "AI agent for autonomous app testing",
22
- docs: "https://docs.vibecheckai.dev/labs/ai-test",
23
- runner: () => require("./runAIAgent").runAIAgent,
24
- },
25
- "launch": {
26
- status: "experimental",
27
- description: "Pre-launch checklist wizard",
28
- docs: "https://docs.vibecheckai.dev/labs/launch",
29
- runner: () => require("./runLaunch").runLaunch,
30
- },
31
- "dashboard": {
32
- status: "stub",
33
- description: "Real-time monitoring dashboard (coming soon)",
34
- eta: "Q2 2025",
35
- },
36
- "permissions": {
37
- status: "experimental",
38
- description: "AuthZ matrix & IDOR vulnerability prover",
39
- runner: () => require("./runPermissions").runPermissions,
40
- },
41
- "replay": {
42
- status: "experimental",
43
- description: "Record and replay user sessions for testing",
44
- runner: () => require("./runReplay").runReplay,
45
- },
46
- "graph": {
47
- status: "experimental",
48
- description: "Reality proof graph visualization",
49
- runner: () => require("./runGraph").runGraph,
50
- },
51
-
52
- // Beta - Feature complete, gathering feedback
53
- "ctx-diff": {
54
- status: "beta",
55
- description: "Diff truthpack changes across commits",
56
- runner: () => require("./runCtxDiff").main,
57
- },
58
-
59
- // Stubs - Planned but not implemented
60
- "autopilot": {
61
- status: "stub",
62
- description: "Continuous protection mode (auto-fix on commit)",
63
- eta: "Q2 2025",
64
- },
65
- "certify": {
66
- status: "stub",
67
- description: "Generate compliance certification badges",
68
- eta: "Q2 2025",
69
- },
70
- "audit": {
71
- status: "stub",
72
- description: "Full audit trail for compliance (SOC2, HIPAA)",
73
- eta: "Q3 2025",
74
- },
75
- "natural-language": {
76
- status: "stub",
77
- description: "Natural language command parsing",
78
- eta: "Q2 2025",
79
- },
80
- "fix-packs": {
81
- status: "stub",
82
- description: "Downloadable fix pack templates",
83
- eta: "Q2 2025",
84
- },
85
- "mdc": {
86
- status: "stub",
87
- description: "MDC documentation generator",
88
- eta: "Q3 2025",
89
- },
90
-
91
- // Aliases - Redirect to main commands
92
- "enhanced-ship": {
93
- status: "alias",
94
- target: "ship --strict",
95
- description: "Enhanced ship mode (use: vibecheck ship --strict)",
96
- },
97
- "sniff": {
98
- status: "alias",
99
- target: "reality --sniff",
100
- description: "Reality sniff mode (use: vibecheck reality --sniff)",
101
- },
102
- };
103
-
104
- // ═══════════════════════════════════════════════════════════════════════════════
105
- // STATUS DISPLAY
106
- // ═══════════════════════════════════════════════════════════════════════════════
107
- const STATUS_CONFIG = {
108
- experimental: {
109
- icon: sym.lightning,
110
- color: c.yellow,
111
- label: "EXPERIMENTAL",
112
- description: "Working but API may change",
113
- },
114
- beta: {
115
- icon: sym.star,
116
- color: c.cyan,
117
- label: "BETA",
118
- description: "Feature complete, gathering feedback",
119
- },
120
- stub: {
121
- icon: sym.pending,
122
- color: c.dim,
123
- label: "PLANNED",
124
- description: "Not yet implemented",
125
- },
126
- alias: {
127
- icon: sym.arrow,
128
- color: c.dim,
129
- label: "ALIAS",
130
- description: "Use the main command instead",
131
- },
132
- };
133
-
134
- function formatStatus(status) {
135
- const config = STATUS_CONFIG[status];
136
- if (!config) return status;
137
- return `${config.color}${config.icon} ${config.label}${c.reset}`;
138
- }
139
-
140
- // ═══════════════════════════════════════════════════════════════════════════════
141
- // HELP DISPLAY
142
- // ═══════════════════════════════════════════════════════════════════════════════
143
- function printHelp() {
144
- printHeader("LABS", {
145
- icon: sym.lightning,
146
- subtitle: "Experimental & Internal Features"
147
- });
148
-
149
- console.log(`${c.yellow}${sym.warning} These features are experimental and may change without notice.${c.reset}\n`);
150
-
151
- // Group by status
152
- const groups = {
153
- experimental: [],
154
- beta: [],
155
- stub: [],
156
- alias: [],
157
- };
158
-
159
- for (const [name, feature] of Object.entries(LABS_FEATURES)) {
160
- if (groups[feature.status]) {
161
- groups[feature.status].push({ name, ...feature });
162
- }
163
- }
164
-
165
- // Experimental
166
- if (groups.experimental.length > 0) {
167
- console.log(`${c.yellow}${sym.lightning} EXPERIMENTAL${c.reset} ${c.dim}(working, API may change)${c.reset}\n`);
168
-
169
- for (const feature of groups.experimental) {
170
- console.log(` ${c.cyan}vibecheck labs ${feature.name}${c.reset}`);
171
- console.log(` ${c.dim}${feature.description}${c.reset}`);
172
- if (feature.docs) {
173
- console.log(` ${c.dim}Docs: ${feature.docs}${c.reset}`);
174
- }
175
- console.log("");
176
- }
177
- }
178
-
179
- // Beta
180
- if (groups.beta.length > 0) {
181
- console.log(`${c.cyan}${sym.star} BETA${c.reset} ${c.dim}(feature complete, gathering feedback)${c.reset}\n`);
182
-
183
- for (const feature of groups.beta) {
184
- console.log(` ${c.cyan}vibecheck labs ${feature.name}${c.reset}`);
185
- console.log(` ${c.dim}${feature.description}${c.reset}`);
186
- console.log("");
187
- }
188
- }
189
-
190
- // Stubs
191
- if (groups.stub.length > 0) {
192
- console.log(`${c.dim}${sym.pending} PLANNED${c.reset} ${c.dim}(not yet implemented)${c.reset}\n`);
193
-
194
- const stubData = groups.stub.map(f => [
195
- `${c.dim}${f.name}${c.reset}`,
196
- `${c.dim}${f.description}${c.reset}`,
197
- f.eta ? `${c.dim}ETA: ${f.eta}${c.reset}` : "",
198
- ]);
199
-
200
- console.log(table(stubData, { indent: 2 }));
201
- console.log("");
202
- }
203
-
204
- // Aliases
205
- if (groups.alias.length > 0) {
206
- console.log(`${c.dim}${sym.arrow} ALIASES${c.reset} ${c.dim}(use the main command instead)${c.reset}\n`);
207
-
208
- for (const feature of groups.alias) {
209
- console.log(` ${c.dim}labs ${feature.name}${c.reset} ${sym.arrow} ${c.cyan}vibecheck ${feature.target}${c.reset}`);
210
- }
211
- console.log("");
212
- }
213
-
214
- // Usage
215
- console.log(`${c.dim}${"─".repeat(60)}${c.reset}`);
216
- console.log(`${c.bold}Usage${c.reset}\n`);
217
- console.log(` vibecheck labs <feature> [options]\n`);
218
- console.log(`${c.dim}Example:${c.reset}`);
219
- console.log(` vibecheck labs ai-test --url http://localhost:3000`);
220
- console.log("");
221
-
222
- // Feedback
223
- console.log(`${c.dim}${"─".repeat(60)}${c.reset}`);
224
- console.log(`${c.bold}Feedback${c.reset}\n`);
225
- console.log(` ${c.dim}Want a feature prioritized? Let us know:${c.reset}`);
226
- console.log(` ${c.cyan}https://github.com/vibecheckai/vibecheck/discussions${c.reset}`);
227
- console.log("");
228
- }
229
-
230
- function printFeatureStub(name, feature) {
231
- console.log(box(
232
- `${c.bold}vibecheck labs ${name}${c.reset}\n\n` +
233
- `${feature.description}\n\n` +
234
- `${c.dim}This feature is not yet implemented.${c.reset}\n` +
235
- (feature.eta ? `${c.dim}Expected: ${feature.eta}${c.reset}\n` : "") +
236
- `\n${c.dim}Want this feature? Vote for it:${c.reset}\n` +
237
- `${c.cyan}https://github.com/vibecheckai/vibecheck/discussions${c.reset}`,
238
- { title: "PLANNED", borderColor: c.yellow }
239
- ));
240
- console.log("");
241
- }
242
-
243
- function printAliasWarning(name, feature) {
244
- console.log(`${c.yellow}${sym.warning}${c.reset} '${name}' is now available as: ${c.cyan}vibecheck ${feature.target}${c.reset}\n`);
245
- console.log(`${c.dim}The labs alias will be removed in a future version.${c.reset}\n`);
246
- }
247
-
248
- // ═══════════════════════════════════════════════════════════════════════════════
249
- // MAIN RUNNER
250
- // ═══════════════════════════════════════════════════════════════════════════════
251
- async function runLabs(args = []) {
252
- const subCmd = args[0];
253
- const subArgs = args.slice(1);
254
-
255
- // Show help if no command
256
- if (!subCmd || subCmd === "--help" || subCmd === "-h") {
257
- printHelp();
258
- return 0;
259
- }
260
-
261
- // List all features
262
- if (subCmd === "--list" || subCmd === "-l") {
263
- const features = Object.entries(LABS_FEATURES).map(([name, f]) => [
264
- name,
265
- formatStatus(f.status),
266
- f.description.slice(0, 40),
267
- ]);
268
-
269
- console.log(table(features, {
270
- headers: ["Feature", "Status", "Description"],
271
- indent: 2,
272
- }));
273
- console.log("");
274
- return 0;
275
- }
276
-
277
- // Find feature
278
- const feature = LABS_FEATURES[subCmd];
279
-
280
- if (!feature) {
281
- console.log(`${c.red}${sym.error}${c.reset} Unknown labs feature: ${c.yellow}${subCmd}${c.reset}\n`);
282
- console.log(`${c.dim}Available features:${c.reset}`);
283
- console.log(` ${Object.keys(LABS_FEATURES).filter(k => LABS_FEATURES[k].status !== "stub").join(", ")}`);
284
- console.log(`\n${c.dim}Run 'vibecheck labs --help' for details.${c.reset}\n`);
285
- return 1;
286
- }
287
-
288
- // Handle stubs
289
- if (feature.status === "stub") {
290
- printFeatureStub(subCmd, feature);
291
- return 0;
292
- }
293
-
294
- // Handle aliases
295
- if (feature.status === "alias") {
296
- printAliasWarning(subCmd, feature);
297
-
298
- // Try to run the aliased command
299
- const [cmd, ...aliasArgs] = feature.target.split(" ");
300
- try {
301
- const { runShip } = require("./runShip");
302
- if (cmd === "ship") {
303
- return await runShip([...aliasArgs, ...subArgs]);
304
- }
305
- const { runReality } = require("./runReality");
306
- if (cmd === "reality") {
307
- return await runReality([...aliasArgs, ...subArgs]);
308
- }
309
- } catch (e) {
310
- console.log(`${c.dim}Please run the command directly: vibecheck ${feature.target}${c.reset}\n`);
311
- }
312
- return 0;
313
- }
314
-
315
- // Run the feature
316
- try {
317
- const runner = feature.runner();
318
-
319
- // Show experimental warning
320
- if (feature.status === "experimental") {
321
- console.log(`${c.yellow}${sym.warning} EXPERIMENTAL:${c.reset} ${c.dim}This feature may change without notice.${c.reset}\n`);
322
- } else if (feature.status === "beta") {
323
- console.log(`${c.cyan}${sym.star} BETA:${c.reset} ${c.dim}Feedback welcome! Report issues at github.com/vibecheckai/vibecheck${c.reset}\n`);
324
- }
325
-
326
- return await runner(subArgs);
327
- } catch (e) {
328
- if (e.code === "MODULE_NOT_FOUND") {
329
- console.log(`${c.red}${sym.error}${c.reset} Feature '${subCmd}' is not available in this version.\n`);
330
- console.log(`${c.dim}Try updating: npm update -g @vibecheckai/cli${c.reset}\n`);
331
- } else {
332
- console.error(`${c.red}${sym.error}${c.reset} Error running labs ${subCmd}: ${e.message}`);
333
- if (process.env.VIBECHECK_DEBUG) {
334
- console.error(c.dim + e.stack + c.reset);
335
- }
336
- }
337
- return 1;
338
- }
339
- }
340
-
341
- module.exports = { runLabs, LABS_FEATURES };