@vibecheckai/cli 3.1.2 → 3.1.4

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 (47) hide show
  1. package/README.md +60 -33
  2. package/bin/registry.js +319 -34
  3. package/bin/runners/CLI_REFACTOR_SUMMARY.md +229 -0
  4. package/bin/runners/REPORT_AUDIT.md +64 -0
  5. package/bin/runners/lib/entitlements-v2.js +97 -28
  6. package/bin/runners/lib/entitlements.js +3 -6
  7. package/bin/runners/lib/init-wizard.js +1 -1
  8. package/bin/runners/lib/report-engine.js +459 -280
  9. package/bin/runners/lib/report-html.js +1154 -1423
  10. package/bin/runners/lib/report-output.js +187 -0
  11. package/bin/runners/lib/report-templates.js +848 -850
  12. package/bin/runners/lib/scan-output.js +545 -0
  13. package/bin/runners/lib/server-usage.js +0 -12
  14. package/bin/runners/lib/ship-output.js +641 -0
  15. package/bin/runners/lib/status-output.js +253 -0
  16. package/bin/runners/lib/terminal-ui.js +853 -0
  17. package/bin/runners/runCheckpoint.js +502 -0
  18. package/bin/runners/runContracts.js +105 -0
  19. package/bin/runners/runExport.js +93 -0
  20. package/bin/runners/runFix.js +31 -24
  21. package/bin/runners/runInit.js +377 -112
  22. package/bin/runners/runInstall.js +1 -5
  23. package/bin/runners/runLabs.js +3 -3
  24. package/bin/runners/runPolish.js +2452 -0
  25. package/bin/runners/runProve.js +2 -2
  26. package/bin/runners/runReport.js +251 -200
  27. package/bin/runners/runRuntime.js +110 -0
  28. package/bin/runners/runScan.js +477 -379
  29. package/bin/runners/runSecurity.js +92 -0
  30. package/bin/runners/runShip.js +137 -207
  31. package/bin/runners/runStatus.js +16 -68
  32. package/bin/runners/utils.js +5 -5
  33. package/bin/vibecheck.js +25 -11
  34. package/mcp-server/index.js +150 -18
  35. package/mcp-server/package.json +2 -2
  36. package/mcp-server/premium-tools.js +13 -13
  37. package/mcp-server/tier-auth.js +292 -27
  38. package/mcp-server/vibecheck-tools.js +9 -9
  39. package/package.json +1 -1
  40. package/bin/runners/runClaimVerifier.js +0 -483
  41. package/bin/runners/runContextCompiler.js +0 -385
  42. package/bin/runners/runGate.js +0 -17
  43. package/bin/runners/runInitGha.js +0 -164
  44. package/bin/runners/runInteractive.js +0 -388
  45. package/bin/runners/runMdc.js +0 -204
  46. package/bin/runners/runMissionGenerator.js +0 -282
  47. package/bin/runners/runTruthpack.js +0 -636
@@ -0,0 +1,187 @@
1
+ /**
2
+ * Report Output - Report Generation Display
3
+ *
4
+ * Handles all report command output formatting:
5
+ * - Report generation progress
6
+ * - Format selection display
7
+ * - Output file information
8
+ * - Report type descriptions
9
+ */
10
+
11
+ const path = require('path');
12
+ const {
13
+ ansi,
14
+ colors,
15
+ icons,
16
+ Spinner,
17
+ renderSection,
18
+ formatDuration,
19
+ } = require('./terminal-ui');
20
+
21
+ // ═══════════════════════════════════════════════════════════════════════════════
22
+ // REPORT-SPECIFIC ICONS
23
+ // ═══════════════════════════════════════════════════════════════════════════════
24
+
25
+ const reportIcons = {
26
+ report: '📄',
27
+ html: '🌐',
28
+ markdown: '📝',
29
+ json: '📊',
30
+ sarif: '🔒',
31
+ csv: '📈',
32
+ executive: '👔',
33
+ technical: '🔧',
34
+ compliance: '🛡️',
35
+ trend: '📈',
36
+ success: '✓',
37
+ error: '✗',
38
+ };
39
+
40
+ // ═══════════════════════════════════════════════════════════════════════════════
41
+ // BANNER
42
+ // ═══════════════════════════════════════════════════════════════════════════════
43
+
44
+ const BANNER = `
45
+ ${ansi.rgb(0, 200, 255)} ██╗ ██╗██╗██████╗ ███████╗ ██████╗██╗ ██╗███████╗ ██████╗██╗ ██╗${ansi.reset}
46
+ ${ansi.rgb(30, 180, 255)} ██║ ██║██║██╔══██╗██╔════╝██╔════╝██║ ██║██╔════╝██╔════╝██║ ██╔╝${ansi.reset}
47
+ ${ansi.rgb(60, 160, 255)} ██║ ██║██║██████╔╝█████╗ ██║ ███████║█████╗ ██║ █████╔╝ ${ansi.reset}
48
+ ${ansi.rgb(90, 140, 255)} ╚██╗ ██╔╝██║██╔══██╗██╔══╝ ██║ ██╔══██║██╔══╝ ██║ ██╔═██╗ ${ansi.reset}
49
+ ${ansi.rgb(120, 120, 255)} ╚████╔╝ ██║██████╔╝███████╗╚██████╗██║ ██║███████╗╚██████╗██║ ██╗${ansi.reset}
50
+ ${ansi.rgb(150, 100, 255)} ╚═══╝ ╚═╝╚═════╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═════╝╚═╝ ╚═╝${ansi.reset}
51
+
52
+ ${ansi.dim} ┌─────────────────────────────────────────────────────────────────────┐${ansi.reset}
53
+ ${ansi.dim} │${ansi.reset} ${ansi.rgb(255, 255, 255)}${ansi.bold}Report Generator${ansi.reset} ${ansi.dim}•${ansi.reset} ${ansi.rgb(200, 200, 200)}Professional Reports${ansi.reset} ${ansi.dim}•${ansi.reset} ${ansi.rgb(150, 150, 150)}Multiple Formats${ansi.reset} ${ansi.dim}│${ansi.reset}
54
+ ${ansi.dim} └─────────────────────────────────────────────────────────────────────┘${ansi.reset}
55
+ `;
56
+
57
+ // ═══════════════════════════════════════════════════════════════════════════════
58
+ // REPORT TYPE DESCRIPTIONS
59
+ // ═══════════════════════════════════════════════════════════════════════════════
60
+
61
+ function getReportTypeDescription(type) {
62
+ const descriptions = {
63
+ executive: 'One-page overview for stakeholders',
64
+ technical: 'Detailed findings for developers/CTOs',
65
+ compliance: 'SOC2/HIPAA-ready language for regulated industries',
66
+ trend: 'Historical score analysis over time',
67
+ };
68
+ return descriptions[type] || 'Standard report';
69
+ }
70
+
71
+ function getFormatIcon(format) {
72
+ const iconMap = {
73
+ html: reportIcons.html,
74
+ md: reportIcons.markdown,
75
+ markdown: reportIcons.markdown,
76
+ json: reportIcons.json,
77
+ sarif: reportIcons.sarif,
78
+ csv: reportIcons.csv,
79
+ };
80
+ return iconMap[format] || reportIcons.report;
81
+ }
82
+
83
+ // ═══════════════════════════════════════════════════════════════════════════════
84
+ // REPORT GENERATION DISPLAY
85
+ // ═══════════════════════════════════════════════════════════════════════════════
86
+
87
+ function renderReportInfo(type, format, outputPath) {
88
+ const lines = [];
89
+ lines.push(renderSection('REPORT INFO', reportIcons.report));
90
+ lines.push('');
91
+ lines.push(` Type: ${colors.accent}${type}${ansi.reset} ${ansi.dim}(${getReportTypeDescription(type)})${ansi.reset}`);
92
+ lines.push(` Format: ${getFormatIcon(format)} ${colors.accent}${format.toUpperCase()}${ansi.reset}`);
93
+ if (outputPath) {
94
+ lines.push(` Output: ${colors.accent}${outputPath}${ansi.reset}`);
95
+ }
96
+ return lines.join('\n');
97
+ }
98
+
99
+ function renderSuccess(outputPath, format) {
100
+ const lines = [];
101
+ lines.push('');
102
+ lines.push(` ${colors.success}${icons.success}${ansi.reset} ${ansi.bold}Report generated successfully!${ansi.reset}`);
103
+ lines.push('');
104
+ lines.push(` ${ansi.dim}File:${ansi.reset} ${colors.accent}${outputPath}${ansi.reset}`);
105
+ if (format === 'html') {
106
+ lines.push(` ${ansi.dim}Open:${ansi.reset} ${colors.accent}file://${path.resolve(outputPath)}${ansi.reset}`);
107
+ }
108
+ return lines.join('\n');
109
+ }
110
+
111
+ function renderError(error) {
112
+ const lines = [];
113
+ lines.push('');
114
+ lines.push(` ${colors.error}${icons.error}${ansi.reset} ${ansi.bold}Report generation failed${ansi.reset}`);
115
+ lines.push(` ${ansi.dim}${error.message}${ansi.reset}`);
116
+ return lines.join('\n');
117
+ }
118
+
119
+ // ═══════════════════════════════════════════════════════════════════════════════
120
+ // HELP TEXT
121
+ // ═══════════════════════════════════════════════════════════════════════════════
122
+
123
+ function formatHelp() {
124
+ return `
125
+ ${ansi.bold}Usage:${ansi.reset} vibecheck report [options]
126
+
127
+ ${ansi.bold}Description${ansi.reset}
128
+ Generate beautiful, professional reports for stakeholders.
129
+
130
+ ${ansi.bold}Report Types${ansi.reset}
131
+ ${colors.accent}executive${ansi.reset} One-page overview for stakeholders (default)
132
+ ${colors.accent}technical${ansi.reset} Detailed findings for developers/CTOs
133
+ ${colors.accent}compliance${ansi.reset} SOC2/HIPAA-ready language for regulated industries
134
+ ${colors.accent}trend${ansi.reset} Historical score analysis over time
135
+
136
+ ${ansi.bold}Output Formats${ansi.reset}
137
+ ${colors.success}html${ansi.reset} Beautiful interactive report (default)
138
+ ${colors.success}md${ansi.reset} Markdown for documentation/GitHub
139
+ ${colors.success}json${ansi.reset} Machine-readable JSON
140
+ ${colors.success}sarif${ansi.reset} SARIF for security tool integration
141
+ ${colors.success}csv${ansi.reset} CSV for spreadsheet analysis
142
+
143
+ ${ansi.bold}Options${ansi.reset}
144
+ ${colors.accent}--type, -t <type>${ansi.reset} Report type: executive, technical, compliance, trend
145
+ ${colors.accent}--format, -f <format>${ansi.reset} Output format: html, md, json, sarif, csv
146
+ ${colors.accent}--output, -o <path>${ansi.reset} Output file path
147
+ ${colors.accent}--theme <dark|light>${ansi.reset} HTML theme (default: dark)
148
+ ${colors.accent}--company <name>${ansi.reset} Company name for branding
149
+ ${colors.accent}--logo <path>${ansi.reset} Custom logo path/URL
150
+ ${colors.accent}--include-trends${ansi.reset} Include historical trend data
151
+ ${colors.accent}--redact-paths${ansi.reset} Hide file paths for client reports
152
+ ${colors.accent}--max-findings <n>${ansi.reset} Max findings to show (default: 50)
153
+ ${colors.accent}--path, -p <dir>${ansi.reset} Project path (default: current directory)
154
+ ${colors.accent}--help, -h${ansi.reset} Show this help
155
+
156
+ ${ansi.bold}Examples${ansi.reset}
157
+ ${ansi.dim}# Interactive HTML${ansi.reset}
158
+ vibecheck report
159
+
160
+ ${ansi.dim}# Markdown file${ansi.reset}
161
+ vibecheck report --format=md --output=REPORT.md
162
+
163
+ ${ansi.dim}# Compliance report${ansi.reset}
164
+ vibecheck report --type=compliance --company=Acme
165
+
166
+ ${ansi.dim}# Security tooling${ansi.reset}
167
+ vibecheck report --format=sarif -o report.sarif
168
+
169
+ ${ansi.dim}# Client-safe HTML${ansi.reset}
170
+ vibecheck report --theme=light --redact
171
+ `;
172
+ }
173
+
174
+ // ═══════════════════════════════════════════════════════════════════════════════
175
+ // EXPORTS
176
+ // ═══════════════════════════════════════════════════════════════════════════════
177
+
178
+ module.exports = {
179
+ BANNER,
180
+ formatHelp,
181
+ renderReportInfo,
182
+ renderSuccess,
183
+ renderError,
184
+ getReportTypeDescription,
185
+ getFormatIcon,
186
+ reportIcons,
187
+ };