@vibecheck-ai/cli 24.0.1 → 24.0.2
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/dist/index.js +2 -2
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
"use strict";var M7t=Object.create;var Hq=Object.defineProperty;var L7t=Object.getOwnPropertyDescriptor;var j7t=Object.getOwnPropertyNames;var $7t=Object.getPrototypeOf,B7t=Object.prototype.hasOwnProperty;var t=(o,a)=>Hq(o,"name",{value:a,configurable:!0});var xs=(o,a)=>()=>(o&&(a=o(o=0)),a);var zs=(o,a)=>()=>(a||o((a={exports:{}}).exports,a),a.exports),vf=(o,a)=>{for(var l in a)Hq(o,l,{get:a[l],enumerable:!0})},HKe=(o,a,l,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of j7t(a))!B7t.call(o,d)&&d!==l&&Hq(o,d,{get:()=>a[d],enumerable:!(f=L7t(a,d))||f.enumerable});return o};var Rs=(o,a,l)=>(l=o!=null?M7t($7t(o)):{},HKe(a||!o||!o.__esModule?Hq(l,"default",{value:o,enumerable:!0}):l,o)),hEe=o=>HKe(Hq({},"__esModule",{value:!0}),o);function r5(o){return o?{reset:"",bold:"",dim:"",italic:"",red:"",green:"",yellow:"",blue:"",cyan:"",magenta:"",white:"",gray:"",black:"",bgRed:"",bgGreen:"",bgYellow:""}:{reset:fa,bold:Qi,dim:Fn,italic:aw,red:ml,green:w_,yellow:cl,blue:GKe,cyan:Sc,magenta:L4,white:dT,gray:KKe,black:j4,bgRed:ow,bgGreen:$4,bgYellow:gEe}}function Yt(o,a,l){return l?a:`${o}${a}${fa}`}function U4(o){return o>=85?w_:o>=70?cl:o>=50?Sc:ml}function Bu(o){return o||!process.stdout.isTTY||process.env.NO_COLOR!==void 0?{reset:"",bold:"",dim:"",red:"",green:"",yellow:"",blue:"",cyan:"",magenta:"",underline:""}:{reset:fa,bold:Qi,dim:Fn,red:ml,green:w_,yellow:cl,blue:GKe,cyan:Sc,magenta:L4,underline:U7t}}var fa,Qi,Fn,aw,U7t,ml,w_,cl,GKe,L4,Sc,dT,KKe,j4,ow,$4,gEe,n5,B4,yEe,a_=xs(()=>{"use strict";fa="\x1B[0m",Qi="\x1B[1m",Fn="\x1B[2m",aw="\x1B[3m",U7t="\x1B[4m",ml="\x1B[31m",w_="\x1B[32m",cl="\x1B[33m",GKe="\x1B[34m",L4="\x1B[35m",Sc="\x1B[36m",dT="\x1B[37m",KKe="\x1B[90m",j4="\x1B[30m",ow="\x1B[41m",$4="\x1B[42m",gEe="\x1B[43m";t(r5,"createPalette");t(Yt,"c");n5={critical:"\u2717",high:"\u25B2",medium:"\u25CF",low:"\u25CB",info:"\xB7"},B4={critical:ml,high:cl,medium:Sc,low:dT,info:KKe},yEe={critical:0,high:1,medium:2,low:3,info:4};t(U4,"scoreColor");t(Bu,"createColors")});var YKe=zs((oar,z7t)=>{z7t.exports={name:"@vibecheck-ai/cli",version:"24.0.
|
|
3
|
+
"use strict";var M7t=Object.create;var Hq=Object.defineProperty;var L7t=Object.getOwnPropertyDescriptor;var j7t=Object.getOwnPropertyNames;var $7t=Object.getPrototypeOf,B7t=Object.prototype.hasOwnProperty;var t=(o,a)=>Hq(o,"name",{value:a,configurable:!0});var xs=(o,a)=>()=>(o&&(a=o(o=0)),a);var zs=(o,a)=>()=>(a||o((a={exports:{}}).exports,a),a.exports),vf=(o,a)=>{for(var l in a)Hq(o,l,{get:a[l],enumerable:!0})},HKe=(o,a,l,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of j7t(a))!B7t.call(o,d)&&d!==l&&Hq(o,d,{get:()=>a[d],enumerable:!(f=L7t(a,d))||f.enumerable});return o};var Rs=(o,a,l)=>(l=o!=null?M7t($7t(o)):{},HKe(a||!o||!o.__esModule?Hq(l,"default",{value:o,enumerable:!0}):l,o)),hEe=o=>HKe(Hq({},"__esModule",{value:!0}),o);function r5(o){return o?{reset:"",bold:"",dim:"",italic:"",red:"",green:"",yellow:"",blue:"",cyan:"",magenta:"",white:"",gray:"",black:"",bgRed:"",bgGreen:"",bgYellow:""}:{reset:fa,bold:Qi,dim:Fn,italic:aw,red:ml,green:w_,yellow:cl,blue:GKe,cyan:Sc,magenta:L4,white:dT,gray:KKe,black:j4,bgRed:ow,bgGreen:$4,bgYellow:gEe}}function Yt(o,a,l){return l?a:`${o}${a}${fa}`}function U4(o){return o>=85?w_:o>=70?cl:o>=50?Sc:ml}function Bu(o){return o||!process.stdout.isTTY||process.env.NO_COLOR!==void 0?{reset:"",bold:"",dim:"",red:"",green:"",yellow:"",blue:"",cyan:"",magenta:"",underline:""}:{reset:fa,bold:Qi,dim:Fn,red:ml,green:w_,yellow:cl,blue:GKe,cyan:Sc,magenta:L4,underline:U7t}}var fa,Qi,Fn,aw,U7t,ml,w_,cl,GKe,L4,Sc,dT,KKe,j4,ow,$4,gEe,n5,B4,yEe,a_=xs(()=>{"use strict";fa="\x1B[0m",Qi="\x1B[1m",Fn="\x1B[2m",aw="\x1B[3m",U7t="\x1B[4m",ml="\x1B[31m",w_="\x1B[32m",cl="\x1B[33m",GKe="\x1B[34m",L4="\x1B[35m",Sc="\x1B[36m",dT="\x1B[37m",KKe="\x1B[90m",j4="\x1B[30m",ow="\x1B[41m",$4="\x1B[42m",gEe="\x1B[43m";t(r5,"createPalette");t(Yt,"c");n5={critical:"\u2717",high:"\u25B2",medium:"\u25CF",low:"\u25CB",info:"\xB7"},B4={critical:ml,high:cl,medium:Sc,low:dT,info:KKe},yEe={critical:0,high:1,medium:2,low:3,info:4};t(U4,"scoreColor");t(Bu,"createColors")});var YKe=zs((oar,z7t)=>{z7t.exports={name:"@vibecheck-ai/cli",version:"24.0.2",description:"The trust layer for AI-generated software. Catches phantom dependencies, ghost API routes, fake SDK methods, and hardcoded secrets \u2014 before they ship.",license:"MIT",author:"VibeCheck <hello@vibecheck.ai>",repository:{type:"git",url:"https://github.com/vibecheck-oss/vibecheck"},bugs:{url:"https://github.com/vibecheck-oss/vibecheck/issues"},homepage:"https://vibecheck.ai",keywords:["cli","vibecheck","ai","hallucination","code-quality","linter","phantom-dependency"],engines:{node:">=20.0.0"},publishConfig:{access:"public"},files:["dist/","README.md","LICENSE"],bin:{vibecheck:"./dist/index.js",vc:"./dist/index.js"},main:"./dist/index.js",exports:{".":"./dist/index.js","./runner":"./dist/runner/FileRunner.js"},scripts:{build:`node esbuild.mjs && node -e "require('fs').chmodSync('dist/index.js', '755')"`,"build:production":`node esbuild.mjs --production && node -e "require('fs').chmodSync('dist/index.js', '755')"`,prepublishOnly:`node esbuild.mjs --production && node -e "require('fs').chmodSync('dist/index.js', '755')"`,compile:"tsc -p . --noEmit",dev:"tsx src/index.ts",test:"vitest run"},dependencies:{chokidar:"^4.0.1"},optionalDependencies:{"@isl-lang/parser":"^1.0.0",playwright:"^1.49.0"},devDependencies:{"@repo/context-engine":"workspace:*","@repo/context-evolution":"workspace:*","@repo/shared-types":"workspace:*","@repo/subscriptions":"workspace:*","@vibecheck/core":"workspace:*","@vibecheck/engines":"workspace:*","@types/node":"^20.0.0","@vibecheck/codegraph":"workspace:*","@vibecheck/discovery":"workspace:*","@vibecheck/roast":"workspace:*","@vibecheck/truthpack":"workspace:*","@vibecheck/vibe-prompt":"workspace:*",esbuild:"^0.25.0",typescript:"^5.8.0",vitest:"^2.1.8"}}});var W7t,vI,Gq=xs(()=>{"use strict";W7t=YKe(),vI=W7t.version});function eYe(o){if(o||process.env.NO_COLOR!==void 0||!process.stdout.isTTY)return"none";let a=process.env.COLORTERM;return a==="truecolor"||a==="24bit"?"truecolor":process.env.TERM?.includes("256color")?"256":"16"}function K7t(o){return`\x1B[${o}m`}function XKe(o,a){if(a==="none")return[...o];let l=a==="256"||a==="truecolor",f=l?H7t:G7t;return o.map((d,g)=>{let S=Math.min(g,f.length-1);return`\x1B[${l?`38;5;${f[S]}`:f[S]}m${d}${fa}`})}function i5(o,a,l){return l==="none"?o:`${K7t(a)}${o}${fa}`}function Kq(o,a){return i5(o,"2",a)}function Y7t(o,a){return i5(o,"1",a)}function X7t(){try{return process.stdout.columns||80}catch{return 80}}function Z7t(o){return o>=86?"full":o>=50?"compact":"inline"}function tYe(o){return o in Uie}function rYe(o){let{command:a,noColor:l=!1,workspacePath:f,showTimestamp:d=!1,forceSize:g,skip:S=!1}=o;if(S||!process.stdout.isTTY&&!g)return"";let E=eYe(l),P=X7t(),R=g??Z7t(P),$=tYe(a),H=$?V7t[a]:"36",z=$?J7t[a]:"",me=[""];if(R==="full"?me.push(...XKe(QKe,E)):R==="compact"?me.push(...XKe(q7t,E)):me.push(i5(" \u26A1 VibeCheck",H,E)),$&&R!=="inline"){let se=Uie[a];me.push("");for(let He of se)me.push(i5(He,H,E))}me.push("");let te=[Kq(`v${vI}`,E)];if(z&&te.push(Kq(z,E)),R==="inline"?me.push(` ${Y7t(a,E)} ${te.join(" ")}`):me.push(` ${te.join(" \xB7 ")}`),f&&R!=="inline"){let se=Math.max(20,P-8),He=f.length>se?"..."+f.slice(f.length-se+3):f;me.push(` ${Kq(He,E)}`)}if(d){let se=new Date().toISOString().slice(0,19).replace("T"," ");me.push(` ${Kq(se,E)}`)}if(R!=="inline"){let se=Math.min(P-4,86);me.push(` ${Kq("\u2500".repeat(se),E)}`)}return me.push(""),me.join(`
|
|
4
4
|
`)}function Q7t(o){let a=QKe.join(`
|
|
5
5
|
`),l=tYe(o)?Uie[o]:Uie.scan;return`${a}
|
|
6
6
|
|
|
@@ -1454,7 +1454,7 @@ npx vibecheck-ai commitshield --staged --block
|
|
|
1454
1454
|
${Yt(Sc+Qi,"ISL VERIFY",o.noColor)}
|
|
1455
1455
|
`),console.log(` ${Yt(Fn,`Found ${a.length} ${Jf("spec",a.length)} to verify against.`,o.noColor)}`),console.log(` ${Yt(Fn,"Full contract verification requires the VibeCheck API.",o.noColor)}`),console.log(` ${Yt(Fn,"Open ISL Studio in VS Code for interactive verification.",o.noColor)}
|
|
1456
1456
|
`),0)}default:return 0}}var rO,xV,fut=xs(()=>{"use strict";rO=Rs(require("fs")),xV=Rs(require("path"));a_();xh();TS();t(lut,"findISLSpecs");t(jsr,"runISL")});var rar={};vf(rar,{formatValidationErrorBlock:()=>Put,parseArgs:()=>kut,suggestCommand:()=>Iut,suggestSubcommand:()=>WF});module.exports=hEe(rar);var lc=Rs(require("path")),uc=Rs(require("fs")),PDe=require("url");vEe();a_();TS();Jie();var e5t={VC001:{message:"Invalid or missing configuration",hint:"Run vibecheck init or check .vibecheckrc.json / vibecheck.config.json"},VC002:{message:"Engine failed during scan",hint:"Run vibecheck doctor to diagnose"},VC003:{message:"File not found or permission denied",hint:"Check paths and read permissions"},VC004:{message:"Scan timed out",hint:"Try --concurrency 1 or reduce scope"},VC005:{message:"Overlapping fixes \u2014 some could not be applied",hint:"Re-scan and fix in smaller batches"}};function Vie(o,a){let{message:l,hint:f}=e5t[o];return`${a?`${o}: ${l} \u2014 ${a}`:`${o}: ${l}`}
|
|
1457
|
-
\u2192 ${f}`}t(Vie,"formatVcError");function SEe(o){let a=(o instanceof Error?o.message:String(o)).toLowerCase(),l=o?.code??"";return/config|\.vibecheckrc|vibecheck\.config|parse.*json|invalid.*config/i.test(a)?"VC001":/enoent|eacces|eperm|permission|not found|no such file/i.test(a)||l==="ENOENT"||l==="EACCES"?"VC003":/timeout|etimedout|timed out/i.test(a)||l==="ETIMEDOUT"?"VC004":/overlap|conflict|could not apply/i.test(a)?"VC005":(/engine|scan failed|runner|discover/i.test(a),"VC002")}t(SEe,"classifyError");CC();var kYe=Rs(require("fs"));CC();var xYe=Rs(require("fs")),DEe=Rs(require("path")),TYe=Rs(require("os"));a_();CC();function h5t(){return process.env.VIBECHECK_HOME||DEe.join(TYe.homedir(),".vibecheck")}t(h5t,"vibecheckHome");function NEe(){return DEe.join(h5t(),"token")}t(NEe,"tokenFilePath");function g5t(){let o=process.env.VIBECHECK_TOKEN?.trim();if(o&&o.length>=12)return!0;try{return xYe.readFileSync(NEe(),"utf-8").trim().length>0}catch{return!1}}t(g5t,"hasCliAuthToken");var SYe=14,y5t=new Set(["roast"]);function sg(o){return y5t.has(o.command)||g5t()?null:o.json?(console.log(JSON.stringify({success:!1,error:"AUTH_REQUIRED",message:"Sign in required. Run vibecheck login with your API key or token.",command:o.command})),SYe):(console.error(""),console.error(` ${Yt(ml+Qi,"\u26D4 Sign in required",o.noColor)}`),console.error(` ${Yt(Fn,"\u2500".repeat(50),o.noColor)}`),console.error(""),console.error(` ${Yt(Qi,`vibecheck ${o.command}`,o.noColor)} needs a VibeCheck account.`),console.error(` ${Yt(Fn,"Run:",o.noColor)} ${Yt(Sc+Qi,"vibecheck login",o.noColor)}`),console.error(` ${Yt(Fn,"Or set",o.noColor)} ${Yt(cl,"VIBECHECK_TOKEN",o.noColor)} ${Yt(Fn,"for CI (same rules as login).",o.noColor)}`),console.error(` ${Yt(Fn,"Plans:",o.noColor)} ${Yt(Sc,kS("pro"),o.noColor)}`),console.error(""),SYe)}t(sg,"checkAuthRequired");a_();var OEe={type:"cli",version:"24.0.
|
|
1457
|
+
\u2192 ${f}`}t(Vie,"formatVcError");function SEe(o){let a=(o instanceof Error?o.message:String(o)).toLowerCase(),l=o?.code??"";return/config|\.vibecheckrc|vibecheck\.config|parse.*json|invalid.*config/i.test(a)?"VC001":/enoent|eacces|eperm|permission|not found|no such file/i.test(a)||l==="ENOENT"||l==="EACCES"?"VC003":/timeout|etimedout|timed out/i.test(a)||l==="ETIMEDOUT"?"VC004":/overlap|conflict|could not apply/i.test(a)?"VC005":(/engine|scan failed|runner|discover/i.test(a),"VC002")}t(SEe,"classifyError");CC();var kYe=Rs(require("fs"));CC();var xYe=Rs(require("fs")),DEe=Rs(require("path")),TYe=Rs(require("os"));a_();CC();function h5t(){return process.env.VIBECHECK_HOME||DEe.join(TYe.homedir(),".vibecheck")}t(h5t,"vibecheckHome");function NEe(){return DEe.join(h5t(),"token")}t(NEe,"tokenFilePath");function g5t(){let o=process.env.VIBECHECK_TOKEN?.trim();if(o&&o.length>=12)return!0;try{return xYe.readFileSync(NEe(),"utf-8").trim().length>0}catch{return!1}}t(g5t,"hasCliAuthToken");var SYe=14,y5t=new Set(["roast"]);function sg(o){return y5t.has(o.command)||g5t()?null:o.json?(console.log(JSON.stringify({success:!1,error:"AUTH_REQUIRED",message:"Sign in required. Run vibecheck login with your API key or token.",command:o.command})),SYe):(console.error(""),console.error(` ${Yt(ml+Qi,"\u26D4 Sign in required",o.noColor)}`),console.error(` ${Yt(Fn,"\u2500".repeat(50),o.noColor)}`),console.error(""),console.error(` ${Yt(Qi,`vibecheck ${o.command}`,o.noColor)} needs a VibeCheck account.`),console.error(` ${Yt(Fn,"Run:",o.noColor)} ${Yt(Sc+Qi,"vibecheck login",o.noColor)}`),console.error(` ${Yt(Fn,"Or set",o.noColor)} ${Yt(cl,"VIBECHECK_TOKEN",o.noColor)} ${Yt(Fn,"for CI (same rules as login).",o.noColor)}`),console.error(` ${Yt(Fn,"Plans:",o.noColor)} ${Yt(Sc,kS("pro"),o.noColor)}`),console.error(""),SYe)}t(sg,"checkAuthRequired");a_();var OEe={type:"cli",version:"24.0.2"};function wYe(){let o=process.env.VIBECHECK_TOKEN?.trim();if(o&&o.length>=12)return o;try{let a=kYe.readFileSync(NEe(),"utf-8").trim();return a.length>0?a:null}catch{return null}}t(wYe,"readCliToken");function EYe(){return(process.env.VIBECHECK_API_URL||"https://api.vibecheckai.dev").replace(/\/$/,"")}t(EYe,"apiBaseUrl");function CYe(o){let a={Accept:"application/json","X-Client-Type":OEe.type,"X-Client-Version":OEe.version};return o.startsWith("vc_")?a["X-API-Key"]=o:a.Authorization=`Bearer ${o}`,a}t(CYe,"authHeaders");function AYe(){return!!process.env.VIBECHECK_DEV_TIER?.trim()}t(AYe,"skipServerMetering");function IYe(o){return AEe(ig(o)).scansPerDay===1/0}t(IYe,"isUnlimitedScans");function Yie(){return`cli:${typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2,12)}`}`}t(Yie,"newCliScanRunId");async function Xie(o,a){if(AYe()||IYe(o))return null;let l=wYe();if(!l)return null;let f=`${EYe()}/api/v1/scans/cli/quota`,d;try{let g=await fetch(f,{method:"GET",headers:CYe(l),signal:AbortSignal.timeout(15e3)}),S=await g.json();!g.ok||!S.success||!S.data?d={ok:!1,error:"quota_fetch_failed"}:d={ok:!0,allowed:!!S.data.allowed,used:S.data.used,limit:S.data.limit,remaining:S.data.remaining}}catch{d={ok:!1,error:"quota_network_error"}}if(!d.ok){if(a.json){let{writeJson:g}=await Promise.resolve().then(()=>(xh(),eJ));g({success:!1,error:"SCAN_QUOTA_UNAVAILABLE",message:d.error==="quota_network_error"?"Could not reach VibeCheck to verify scan quota. Check your connection and try again.":"Could not verify scan quota with the server.",details:{reason:d.error}})}else a.quiet||(console.error(`
|
|
1458
1458
|
${Yt(ml+Qi,"Scan quota check failed",a.noColor)}`),console.error(` ${Yt(Fn,d.error==="quota_network_error"?"Network error talking to api.vibecheckai.dev.":"Server rejected quota request.",a.noColor)}`),console.error(""));return 1}if(!d.allowed){if(a.json){let{writeJson:g}=await Promise.resolve().then(()=>(xh(),eJ));g({error:"Daily scan limit reached.",exitCode:1})}else a.quiet||(console.error(`
|
|
1459
1459
|
${Yt(ml+Qi,"Daily Scan Limit Reached",a.noColor)}`),console.error(` ${Yt(Fn,"\u2500".repeat(50),a.noColor)}`),console.error(` ${Yt(Fn,"You've used",a.noColor)} ${Yt(Qi,`${d.used}/${d.limit}`,a.noColor)} ${Yt(Fn,"free scans today (UTC).",a.noColor)}`),console.error(` ${Yt(Fn,"Resets at next UTC midnight.",a.noColor)}
|
|
1460
1460
|
`),console.error(` ${Yt(cl,"\u26A1",a.noColor)} ${Yt(Qi,"Upgrade to Pro",a.noColor)} ${Yt(Fn,"for unlimited scans \u2192",a.noColor)} ${Yt(Sc,kS("pro"),a.noColor)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibecheck-ai/cli",
|
|
3
|
-
"version": "24.0.
|
|
3
|
+
"version": "24.0.2",
|
|
4
4
|
"description": "The trust layer for AI-generated software. Catches phantom dependencies, ghost API routes, fake SDK methods, and hardcoded secrets — before they ship.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "VibeCheck <hello@vibecheck.ai>",
|
|
@@ -53,17 +53,17 @@
|
|
|
53
53
|
"esbuild": "^0.25.0",
|
|
54
54
|
"typescript": "^5.8.0",
|
|
55
55
|
"vitest": "^2.1.8",
|
|
56
|
-
"@repo/context-evolution": "0.1.0",
|
|
57
56
|
"@repo/context-engine": "1.1.0",
|
|
58
|
-
"@
|
|
57
|
+
"@repo/context-evolution": "0.1.0",
|
|
58
|
+
"@repo/shared-types": "1.1.0",
|
|
59
59
|
"@repo/subscriptions": "1.0.0",
|
|
60
|
+
"@vibecheck/core": "2.0.0-beta.1",
|
|
60
61
|
"@vibecheck/engines": "2.0.0-beta.1",
|
|
62
|
+
"@vibecheck/codegraph": "1.1.0",
|
|
61
63
|
"@vibecheck/discovery": "1.0.0",
|
|
62
|
-
"@repo/shared-types": "1.1.0",
|
|
63
|
-
"@vibecheck/roast": "1.0.0",
|
|
64
64
|
"@vibecheck/truthpack": "1.0.0",
|
|
65
|
-
"@vibecheck/
|
|
66
|
-
"@vibecheck/
|
|
65
|
+
"@vibecheck/roast": "1.0.0",
|
|
66
|
+
"@vibecheck/vibe-prompt": "0.1.0"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "node esbuild.mjs && node -e \"require('fs').chmodSync('dist/index.js', '755')\"",
|