@vibecheckai/cli 3.0.5 → 3.0.8
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/bin/runners/cli-utils.js +6 -6
- package/bin/runners/context/index.js +1 -1
- package/bin/runners/lib/entitlements-v2.js +3 -1
- package/bin/runners/lib/entitlements.js +3 -0
- package/bin/runners/lib/firewall-prompt.js +1 -1
- package/bin/runners/lib/report-html.js +5 -0
- package/bin/runners/lib/report-templates.js +5 -0
- package/bin/runners/lib/report.js +135 -0
- package/bin/runners/lib/sandbox/proof-chain.js +3 -3
- package/bin/runners/lib/ui.js +562 -0
- package/bin/runners/runCtx.js +7 -2
- package/bin/runners/runGuard.js +168 -0
- package/bin/runners/runInstall.js +41 -1
- package/bin/runners/runLabs.js +341 -0
- package/bin/runners/runMdc.js +203 -1
- package/bin/runners/runProof.zip +0 -0
- package/bin/runners/runProve.js +85 -27
- package/bin/runners/runReality.js +89 -15
- package/bin/runners/runScan.js +6 -6
- package/bin/runners/runShare.js +64 -4
- package/bin/runners/runStatus.js +3 -1
- package/bin/vibecheck.js +415 -774
- package/mcp-server/.guardrail/audit/audit.log.jsonl +2 -0
- package/mcp-server/.specs/architecture.mdc +90 -0
- package/mcp-server/.specs/security.mdc +30 -0
- package/mcp-server/README.md +252 -0
- package/mcp-server/agent-checkpoint.js +364 -0
- package/mcp-server/architect-tools.js +707 -0
- package/mcp-server/audit-mcp.js +206 -0
- package/mcp-server/codebase-architect-tools.js +838 -0
- package/mcp-server/consolidated-tools.js +804 -0
- package/mcp-server/hygiene-tools.js +428 -0
- package/mcp-server/index-v1.js +698 -0
- package/mcp-server/index.js +2092 -0
- package/mcp-server/index.old.js +4137 -0
- package/mcp-server/intelligence-tools.js +664 -0
- package/mcp-server/intent-drift-tools.js +873 -0
- package/mcp-server/mdc-generator.js +298 -0
- package/mcp-server/package-lock.json +165 -0
- package/mcp-server/package.json +47 -0
- package/mcp-server/premium-tools.js +1275 -0
- package/mcp-server/test-mcp.js +108 -0
- package/mcp-server/test-tools.js +36 -0
- package/mcp-server/tier-auth.js +147 -0
- package/mcp-server/tools/index.js +72 -0
- package/mcp-server/tools-reorganized.ts +244 -0
- package/mcp-server/truth-context.js +581 -0
- package/mcp-server/truth-firewall-tools.js +1500 -0
- package/mcp-server/vibecheck-2.0-tools.js +748 -0
- package/mcp-server/vibecheck-tools.js +1075 -0
- package/package.json +7 -2
- package/bin/guardrail.js +0 -843
- package/bin/runners/runAudit.js +0 -2
- package/bin/runners/runAutopilot.js +0 -2
- package/bin/runners/runCertify.js +0 -2
- package/bin/runners/runDashboard.js +0 -10
- package/bin/runners/runEnhancedShip.js +0 -2
- package/bin/runners/runFixPacks.js +0 -2
- package/bin/runners/runNaturalLanguage.js +0 -3
- package/bin/runners/runProof.js +0 -2
- package/bin/runners/runRealitySniff.js +0 -2
- package/bin/runners/runUpgrade.js +0 -2
- package/bin/runners/runVerifyAgentOutput.js +0 -2
package/bin/runners/cli-utils.js
CHANGED
|
@@ -38,12 +38,12 @@ const c = {
|
|
|
38
38
|
|
|
39
39
|
// ASCII Art Banner
|
|
40
40
|
const BANNER = `
|
|
41
|
-
${c.brightCyan}
|
|
42
|
-
|
|
43
|
-
██║
|
|
44
|
-
██║
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
${c.brightCyan} ██╗ ██╗██╗██████╗ ███████╗ ██████╗██╗ ██╗███████╗ ██████╗██╗ ██╗
|
|
42
|
+
██║ ██║██║██╔══██╗██╔════╝██╔════╝██║ ██║██╔════╝██╔════╝██║ ██╔╝
|
|
43
|
+
██║ ██║██║██████╔╝█████╗ ██║ ███████║█████╗ ██║ █████╔╝
|
|
44
|
+
╚██╗ ██╔╝██║██╔══██╗██╔══╝ ██║ ██╔══██║██╔══╝ ██║ ██╔═██╗
|
|
45
|
+
╚████╔╝ ██║██████╔╝███████╗╚██████╗██║ ██║███████╗╚██████╗██║ ██╗
|
|
46
|
+
╚═══╝ ╚═╝╚═════╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝ ╚═════╝╚═╝ ╚═╝${c.reset}
|
|
47
47
|
${c.dim} AI-Native Code Security Platform${c.reset}
|
|
48
48
|
`;
|
|
49
49
|
|
|
@@ -20,7 +20,7 @@ const { generatePrunedContext, getContextForFile, pruneContext } = require("./co
|
|
|
20
20
|
const { generateDependencyGraph, buildDependencyGraph, generateMermaidDiagram, generateHtmlVisualization } = require("./dependency-graph");
|
|
21
21
|
const { generateGitContext, getGitContext } = require("./git-context");
|
|
22
22
|
const { extractAPIContracts, generateAPIContext } = require("./api-contracts");
|
|
23
|
-
const { analyzeTeamConventions } = require("./team-conventions");
|
|
23
|
+
const { analyzeTeamConventions, generateTeamReport } = require("./team-conventions");
|
|
24
24
|
const { buildSearchIndex, saveSearchIndex, loadSearchIndex, semanticSearch, generateSearchReport } = require("./semantic-search");
|
|
25
25
|
const { scanProject, generateSecurityReport } = require("./security-scanner");
|
|
26
26
|
const { decomposeTask, generateDecompositionReport } = require("./ai-task-decomposer");
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Entitlements v2 - Signed Receipts
|
|
2
|
+
* Entitlements v2 - Signed Receipts (CANONICAL)
|
|
3
|
+
*
|
|
4
|
+
* This is the canonical entitlements module. Use this for all new code.
|
|
3
5
|
*
|
|
4
6
|
* Proper server-side metering with signed receipts:
|
|
5
7
|
* 1. Every ship check requests a signed usage receipt from API
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Entitlements System - CLI Wrapper
|
|
3
3
|
*
|
|
4
|
+
* @deprecated Use entitlements-v2.js for new code. This module wraps @vibecheck/core
|
|
5
|
+
* and is kept for backward compatibility only.
|
|
6
|
+
*
|
|
4
7
|
* ⚠️ AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
5
8
|
*
|
|
6
9
|
* This file wraps the canonical entitlements implementation from @vibecheck/core.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// bin/runners/lib/firewall-prompt.js
|
|
2
2
|
function buildRealityFirewall({ truthpackSummary, mission, template, findings, fileSnippets, allowedFiles }) {
|
|
3
3
|
return `
|
|
4
|
-
You are
|
|
4
|
+
You are Vibecheck Fix Engine.
|
|
5
5
|
|
|
6
6
|
REALITY RULES (non-negotiable):
|
|
7
7
|
- Do NOT invent files, routes, env vars, middleware, or functions.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified Report Module
|
|
3
|
+
*
|
|
4
|
+
* This is the SINGLE entry point for all report generation.
|
|
5
|
+
* Internal modules:
|
|
6
|
+
* - report-engine.js → data assembly + export formats
|
|
7
|
+
* - html-report.js → HTML generation (primary)
|
|
8
|
+
* - report-html.js → Alternative HTML styles (deprecated)
|
|
9
|
+
* - report-templates.js → Template components (internal)
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const path = require("path");
|
|
13
|
+
const fs = require("fs");
|
|
14
|
+
|
|
15
|
+
// Primary modules
|
|
16
|
+
const { generateHTMLReport, writeHTMLReport } = require("./html-report");
|
|
17
|
+
const { buildReportData, exportToSARIF, exportToCSV, exportToMarkdown, exportToJSON } = require("./report-engine");
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Generate a report from ship results
|
|
21
|
+
* @param {Object} options
|
|
22
|
+
* @param {string} options.repoRoot - Repository root path
|
|
23
|
+
* @param {Object} options.shipReport - Ship report data (optional, loads from disk if not provided)
|
|
24
|
+
* @param {string} options.format - Output format: html (default), json, sarif, csv, markdown
|
|
25
|
+
* @param {string} options.outputPath - Custom output path (optional)
|
|
26
|
+
* @returns {Object} { path, format, data }
|
|
27
|
+
*/
|
|
28
|
+
async function generateReport(options = {}) {
|
|
29
|
+
const {
|
|
30
|
+
repoRoot = process.cwd(),
|
|
31
|
+
shipReport = null,
|
|
32
|
+
format = "html",
|
|
33
|
+
outputPath = null,
|
|
34
|
+
} = options;
|
|
35
|
+
|
|
36
|
+
// Load ship report if not provided
|
|
37
|
+
let report = shipReport;
|
|
38
|
+
if (!report) {
|
|
39
|
+
const shipPath = path.join(repoRoot, ".vibecheck", "ship", "last_ship.json");
|
|
40
|
+
if (fs.existsSync(shipPath)) {
|
|
41
|
+
report = JSON.parse(fs.readFileSync(shipPath, "utf-8"));
|
|
42
|
+
} else {
|
|
43
|
+
throw new Error("No ship report found. Run 'vibecheck ship' first.");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Build report data
|
|
48
|
+
const reportData = buildReportData(report);
|
|
49
|
+
|
|
50
|
+
// Generate output based on format
|
|
51
|
+
let outputFile;
|
|
52
|
+
let outputData;
|
|
53
|
+
|
|
54
|
+
switch (format.toLowerCase()) {
|
|
55
|
+
case "html":
|
|
56
|
+
outputData = generateHTMLReport(reportData);
|
|
57
|
+
outputFile = outputPath || path.join(repoRoot, ".vibecheck", "reports", "report.html");
|
|
58
|
+
break;
|
|
59
|
+
case "json":
|
|
60
|
+
outputData = exportToJSON(reportData);
|
|
61
|
+
outputFile = outputPath || path.join(repoRoot, ".vibecheck", "reports", "report.json");
|
|
62
|
+
break;
|
|
63
|
+
case "sarif":
|
|
64
|
+
outputData = exportToSARIF(reportData);
|
|
65
|
+
outputFile = outputPath || path.join(repoRoot, ".vibecheck", "reports", "report.sarif");
|
|
66
|
+
break;
|
|
67
|
+
case "csv":
|
|
68
|
+
outputData = exportToCSV(reportData);
|
|
69
|
+
outputFile = outputPath || path.join(repoRoot, ".vibecheck", "reports", "report.csv");
|
|
70
|
+
break;
|
|
71
|
+
case "markdown":
|
|
72
|
+
case "md":
|
|
73
|
+
outputData = exportToMarkdown(reportData);
|
|
74
|
+
outputFile = outputPath || path.join(repoRoot, ".vibecheck", "reports", "report.md");
|
|
75
|
+
break;
|
|
76
|
+
default:
|
|
77
|
+
throw new Error(`Unknown format: ${format}. Use: html, json, sarif, csv, markdown`);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Ensure output directory exists
|
|
81
|
+
const outputDir = path.dirname(outputFile);
|
|
82
|
+
if (!fs.existsSync(outputDir)) {
|
|
83
|
+
fs.mkdirSync(outputDir, { recursive: true });
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Write output
|
|
87
|
+
fs.writeFileSync(outputFile, outputData, "utf-8");
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
path: outputFile,
|
|
91
|
+
format,
|
|
92
|
+
data: reportData,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Open the latest report in browser
|
|
98
|
+
*/
|
|
99
|
+
async function openReport(repoRoot = process.cwd()) {
|
|
100
|
+
const reportPath = path.join(repoRoot, ".vibecheck", "ship", "last_ship.html");
|
|
101
|
+
const altPath = path.join(repoRoot, ".vibecheck", "reports", "report.html");
|
|
102
|
+
|
|
103
|
+
const filePath = fs.existsSync(reportPath) ? reportPath :
|
|
104
|
+
fs.existsSync(altPath) ? altPath : null;
|
|
105
|
+
|
|
106
|
+
if (!filePath) {
|
|
107
|
+
throw new Error("No report found. Run 'vibecheck ship' or 'vibecheck report' first.");
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Cross-platform open
|
|
111
|
+
const { exec } = require("child_process");
|
|
112
|
+
const cmd = process.platform === "win32" ? `start "" "${filePath}"` :
|
|
113
|
+
process.platform === "darwin" ? `open "${filePath}"` :
|
|
114
|
+
`xdg-open "${filePath}"`;
|
|
115
|
+
|
|
116
|
+
return new Promise((resolve, reject) => {
|
|
117
|
+
exec(cmd, (err) => {
|
|
118
|
+
if (err) reject(err);
|
|
119
|
+
else resolve(filePath);
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
module.exports = {
|
|
125
|
+
generateReport,
|
|
126
|
+
openReport,
|
|
127
|
+
// Re-export for backward compatibility
|
|
128
|
+
generateHTMLReport,
|
|
129
|
+
writeHTMLReport,
|
|
130
|
+
buildReportData,
|
|
131
|
+
exportToSARIF,
|
|
132
|
+
exportToCSV,
|
|
133
|
+
exportToMarkdown,
|
|
134
|
+
exportToJSON,
|
|
135
|
+
};
|
|
@@ -82,7 +82,7 @@ async function runStaticProof(sandboxPath, options) {
|
|
|
82
82
|
|
|
83
83
|
// Run vibecheck ship in sandbox
|
|
84
84
|
try {
|
|
85
|
-
const vibecheckBin = path.join(__dirname, "..", "..", "..", "
|
|
85
|
+
const vibecheckBin = path.join(__dirname, "..", "..", "..", "vibecheck.js");
|
|
86
86
|
const output = execSync(`node "${vibecheckBin}" ship --json`, {
|
|
87
87
|
cwd: sandboxPath,
|
|
88
88
|
encoding: "utf8",
|
|
@@ -120,7 +120,7 @@ async function runStaticProof(sandboxPath, options) {
|
|
|
120
120
|
const contractsDir = path.join(sandboxPath, ".vibecheck", "contracts");
|
|
121
121
|
if (fs.existsSync(contractsDir)) {
|
|
122
122
|
try {
|
|
123
|
-
const vibecheckBin = path.join(__dirname, "..", "..", "..", "
|
|
123
|
+
const vibecheckBin = path.join(__dirname, "..", "..", "..", "vibecheck.js");
|
|
124
124
|
const output = execSync(`node "${vibecheckBin}" ctx guard --json`, {
|
|
125
125
|
cwd: sandboxPath,
|
|
126
126
|
encoding: "utf8",
|
|
@@ -293,7 +293,7 @@ async function runRealityProof(sandboxPath, options) {
|
|
|
293
293
|
|
|
294
294
|
// Run vibecheck reality
|
|
295
295
|
try {
|
|
296
|
-
const vibecheckBin = path.join(__dirname, "..", "..", "..", "
|
|
296
|
+
const vibecheckBin = path.join(__dirname, "..", "..", "..", "vibecheck.js");
|
|
297
297
|
const cmd = `node "${vibecheckBin}" reality --url ${options.url} --max-pages 5 --max-depth 1`;
|
|
298
298
|
|
|
299
299
|
execSync(cmd, {
|