@burtson-labs/bandit-stealth-cli 1.7.120 → 1.7.121

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 (2) hide show
  1. package/dist/cli.js +1 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -1225,7 +1225,7 @@ ${(()=>{let G=`Bandit insights \u2014 ${new Date(s).toISOString().slice(0,10)}`,
1225
1225
  <h1>You're signed in.</h1>
1226
1226
  <p>Bandit picked up your session. You can close this tab and return to your terminal.</p>
1227
1227
  </div>
1228
- </body></html>`;t(B1r,"startLoopbackListener");t(z1r,"openBrowser");t(U1r,"buildDefaultDeviceLabel");t(J1r,"runOAuthSignIn")});var due=Nt((M4r,q1r)=>{q1r.exports={name:"@burtson-labs/bandit-stealth-cli",version:"1.7.120",description:"Bandit \u2014 a local-first AI coding agent for your terminal. Same runtime as the Bandit Stealth VS Code / Cursor extension.",keywords:["ai","agent","cli","coding-agent","llm","ollama","local-first","bandit","burtson-labs","terminal","repl","developer-tools"],homepage:"https://burtson.ai",bugs:{email:"team@burtson.ai"},license:"MIT",author:{name:"Burtson Labs",email:"team@burtson.ai",url:"https://burtson.ai"},bin:{bandit:"./dist/cli.js"},main:"dist/cli.js",files:["dist/cli.js","README.md","LICENSE"],engines:{node:">=20"},publishConfig:{access:"public"},scripts:{typecheck:"tsc -p tsconfig.json --noEmit",build:"node build.mjs","build:publish":"node build.mjs --publish",dev:"node build.mjs --watch",start:"node dist/cli.js",smoke:"node build.mjs && node dist/__smoke__/smoke.js",integration:"node build.mjs && node dist/__integration__/ollama.js",eval:"node build.mjs && node dist/__eval__/eval.js",benchmark:"node build.mjs && node dist/__eval__/benchmark.js","gen-logo":"node scripts/gen-logo.mjs","preview-banner":"node scripts/preview-banner.mjs",clean:"rm -rf dist",prepack:"node scripts/prepack.mjs",postpack:"node scripts/postpack.mjs",prepublishOnly:"pnpm run clean && pnpm run typecheck && pnpm run build:publish"},dependencies:{"pdf-parse":"^2.4.5"},devDependencies:{"@burtson-labs/agent-core":"workspace:*","@burtson-labs/host-kit":"workspace:*","@burtson-labs/stealth-core-runtime":"workspace:*","@types/node":"^20.11.0","@types/pdf-parse":"^1.1.5","@types/pngjs":"^6.0.5",esbuild:"^0.28.0",pngjs:"^7.0.0",typescript:"^5.4.0"}}});var mbr={};module.exports=qYe(mbr);var Zm=hu(require("fs")),kOe=hu(require("os")),gm=hu(require("path")),l9=hu(require("readline")),mue=hu(require("child_process")),Jp=hu(BV()),b6=hu(J6e());var jF=hu(require("fs")),q6e=hu(require("os")),_6=hu(require("path")),eZ=hu(require("child_process"));function N2(a){return a==="~"?q6e.homedir():a.startsWith("~/")?_6.join(q6e.homedir(),a.slice(2)):a}t(N2,"expandHome");var t9=16*1024,YV=32*1024,cft=1e4,D0r=3e4,W6e=200,V6e=new Set(["node_modules",".git","dist","build","out",".next",".turbo","coverage","target","__pycache__",".venv","venv"]);function I0r(a){let s=t(d=>{let f=d.match(/^(.*?)\{([^}]+)\}(.*)$/);if(!f)return[d];let[,v,x,I]=f;return x.split(",").map(R=>`${v}${R.trim()}${I}`)},"braceExpand"),l=a.match(/^([^*{}]+?)\/\*\*\/(.+)$/);if(l){let[,d,f]=l;return{includes:s(f),subDir:d}}return{includes:s(a),subDir:""}}t(I0r,"expandGlobForGrep");var LF=class{constructor(s,l,d={}){this.workspaceRoot=s;this.languageAdapters=l;this.options=d;this._readFiles=new Set}static{t(this,"CliToolExecutionContext")}markFileRead(s){this._readFiles.add(N2(s))}hasFileBeenRead(s){return this._readFiles.has(N2(s))}async readFile(s){return jF.promises.readFile(N2(s),"utf-8")}async writeFile(s,l){let d=N2(s);if(this.options.approveWrite&&!await this.options.approveWrite(d,l))throw new Error(`Write to ${d} rejected by user`);await jF.promises.mkdir(_6.dirname(d),{recursive:!0}),await jF.promises.writeFile(d,l,"utf-8")}async listFiles(s,l){let d=N2(l??this.workspaceRoot),f=A0r(s),v=[];return await lft(d,d,f,v),v.slice(0,W6e).sort()}async listDirectoryEntries(s){let l=N2(s),d=await jF.promises.readdir(l,{withFileTypes:!0}),f=[];for(let v of d){if(v.name.startsWith("."))continue;let x=v.isDirectory();if(v.isSymbolicLink())try{x=(await jF.promises.stat(_6.join(l,v.name))).isDirectory()}catch{x=!1}f.push(x?`${v.name}/`:v.name)}return f.sort()}async searchCode(s,l,d){let f=N2(l??this.workspaceRoot);return this.runRipgrep(s,f,d).catch(()=>this.runGrep(s,f,d))}async runCommand(s,l,d){let f=l.map(N2),v=d?N2(d):this.workspaceRoot;return new Promise(x=>{let I="",R="",B=eZ.spawn(s,f,{cwd:v,shell:process.platform==="win32",env:{...process.env}}),q=setTimeout(()=>{B.kill("SIGTERM"),x({stdout:I.slice(0,YV),stderr:R+`
1228
+ </body></html>`;t(B1r,"startLoopbackListener");t(z1r,"openBrowser");t(U1r,"buildDefaultDeviceLabel");t(J1r,"runOAuthSignIn")});var due=Nt((M4r,q1r)=>{q1r.exports={name:"@burtson-labs/bandit-stealth-cli",version:"1.7.121",description:"Bandit \u2014 a local-first AI coding agent for your terminal. Same runtime as the Bandit Stealth VS Code / Cursor extension.",keywords:["ai","agent","cli","coding-agent","llm","ollama","local-first","bandit","burtson-labs","terminal","repl","developer-tools"],homepage:"https://burtson.ai",bugs:{email:"team@burtson.ai"},license:"MIT",author:{name:"Burtson Labs",email:"team@burtson.ai",url:"https://burtson.ai"},bin:{bandit:"./dist/cli.js"},main:"dist/cli.js",files:["dist/cli.js","README.md","LICENSE"],engines:{node:">=20"},publishConfig:{access:"public"},scripts:{typecheck:"tsc -p tsconfig.json --noEmit",build:"node build.mjs","build:publish":"node build.mjs --publish",dev:"node build.mjs --watch",start:"node dist/cli.js",smoke:"node build.mjs && node dist/__smoke__/smoke.js",integration:"node build.mjs && node dist/__integration__/ollama.js",eval:"node build.mjs && node dist/__eval__/eval.js",benchmark:"node build.mjs && node dist/__eval__/benchmark.js","gen-logo":"node scripts/gen-logo.mjs","preview-banner":"node scripts/preview-banner.mjs",clean:"rm -rf dist",prepack:"node scripts/prepack.mjs",postpack:"node scripts/postpack.mjs",prepublishOnly:"pnpm run clean && pnpm run typecheck && pnpm run build:publish"},dependencies:{"pdf-parse":"^2.4.5"},devDependencies:{"@burtson-labs/agent-core":"workspace:*","@burtson-labs/host-kit":"workspace:*","@burtson-labs/stealth-core-runtime":"workspace:*","@types/node":"^20.11.0","@types/pdf-parse":"^1.1.5","@types/pngjs":"^6.0.5",esbuild:"^0.28.0",pngjs:"^7.0.0",typescript:"^5.4.0"}}});var mbr={};module.exports=qYe(mbr);var Zm=hu(require("fs")),kOe=hu(require("os")),gm=hu(require("path")),l9=hu(require("readline")),mue=hu(require("child_process")),Jp=hu(BV()),b6=hu(J6e());var jF=hu(require("fs")),q6e=hu(require("os")),_6=hu(require("path")),eZ=hu(require("child_process"));function N2(a){return a==="~"?q6e.homedir():a.startsWith("~/")?_6.join(q6e.homedir(),a.slice(2)):a}t(N2,"expandHome");var t9=16*1024,YV=32*1024,cft=1e4,D0r=3e4,W6e=200,V6e=new Set(["node_modules",".git","dist","build","out",".next",".turbo","coverage","target","__pycache__",".venv","venv"]);function I0r(a){let s=t(d=>{let f=d.match(/^(.*?)\{([^}]+)\}(.*)$/);if(!f)return[d];let[,v,x,I]=f;return x.split(",").map(R=>`${v}${R.trim()}${I}`)},"braceExpand"),l=a.match(/^([^*{}]+?)\/\*\*\/(.+)$/);if(l){let[,d,f]=l;return{includes:s(f),subDir:d}}return{includes:s(a),subDir:""}}t(I0r,"expandGlobForGrep");var LF=class{constructor(s,l,d={}){this.workspaceRoot=s;this.languageAdapters=l;this.options=d;this._readFiles=new Set}static{t(this,"CliToolExecutionContext")}markFileRead(s){this._readFiles.add(N2(s))}hasFileBeenRead(s){return this._readFiles.has(N2(s))}async readFile(s){return jF.promises.readFile(N2(s),"utf-8")}async writeFile(s,l){let d=N2(s);if(this.options.approveWrite&&!await this.options.approveWrite(d,l))throw new Error(`Write to ${d} rejected by user`);await jF.promises.mkdir(_6.dirname(d),{recursive:!0}),await jF.promises.writeFile(d,l,"utf-8")}async listFiles(s,l){let d=N2(l??this.workspaceRoot),f=A0r(s),v=[];return await lft(d,d,f,v),v.slice(0,W6e).sort()}async listDirectoryEntries(s){let l=N2(s),d=await jF.promises.readdir(l,{withFileTypes:!0}),f=[];for(let v of d){if(v.name.startsWith("."))continue;let x=v.isDirectory();if(v.isSymbolicLink())try{x=(await jF.promises.stat(_6.join(l,v.name))).isDirectory()}catch{x=!1}f.push(x?`${v.name}/`:v.name)}return f.sort()}async searchCode(s,l,d){let f=N2(l??this.workspaceRoot);return this.runRipgrep(s,f,d).catch(()=>this.runGrep(s,f,d))}async runCommand(s,l,d){let f=l.map(N2),v=d?N2(d):this.workspaceRoot;return new Promise(x=>{let I="",R="",B=eZ.spawn(s,f,{cwd:v,shell:process.platform==="win32",env:{...process.env}}),q=setTimeout(()=>{B.kill("SIGTERM"),x({stdout:I.slice(0,YV),stderr:R+`
1229
1229
  [process timed out]`,exitCode:124})},D0r);B.stdout?.on("data",G=>{I+=G.toString(),I.length>YV&&B.kill("SIGTERM")}),B.stderr?.on("data",G=>{R+=G.toString()}),B.on("close",G=>{clearTimeout(q),x({stdout:I.slice(0,YV),stderr:R.slice(0,4*1024),exitCode:G??0})}),B.on("error",G=>{if(clearTimeout(q),G.code==="ENOENT"){x({stdout:"",stderr:`spawn ${s} ENOENT \u2014 '${s}' not found on PATH. Verify the tool is installed (\`which ${s}\` in a fresh terminal). If you use nvm/asdf/volta, your shim PATH may not be inherited; relaunching this CLI from the same terminal session that has \`${s}\` on PATH usually fixes it.`,exitCode:127});return}x({stdout:"",stderr:G.message,exitCode:1})})})}async watchCommand(s,l,d,f){let v=l.map(N2),x=d?N2(d):this.workspaceRoot;return new Promise(I=>{let R="",B="",q=!1,G=!1,W=eZ.spawn(s,v,{cwd:x,shell:process.platform==="win32",env:{...process.env}}),ve=t(Pe=>{G||(G=!0,I({stdout:R.slice(0,YV),stderr:B.slice(0,4*1024),exitCode:Pe,endedEarly:q}))},"finish"),be=setTimeout(()=>{try{W.kill("SIGTERM")}catch{}let Pe=setTimeout(()=>{try{W.kill("SIGKILL")}catch{}ve(null)},1e3);W.once("close",bt=>{clearTimeout(Pe),ve(typeof bt=="number"?bt:null)})},f);W.stdout?.on("data",Pe=>{if(R+=Pe.toString(),R.length>YV)try{W.kill("SIGTERM")}catch{}}),W.stderr?.on("data",Pe=>{B+=Pe.toString()}),W.on("close",Pe=>{G||(clearTimeout(be),q=!0,ve(typeof Pe=="number"?Pe:null))}),W.on("error",Pe=>{G||(clearTimeout(be),q=!0,B+=Pe.message,ve(1))})})}runRipgrep(s,l,d){return new Promise((f,v)=>{let x=["--color=never","--line-number","--max-count=25","--max-filesize=1M",...[...V6e].map(q=>["--glob",`!${q}`]).flat()];d&&x.push("--glob",d),x.push(s,l);let I="",R=eZ.spawn("rg",x,{shell:!1}),B=setTimeout(()=>{R.kill("SIGTERM"),f(I.slice(0,t9))},cft);R.stdout?.on("data",q=>{I+=q.toString(),I.length>t9&&R.kill("SIGTERM")}),R.on("close",q=>{clearTimeout(B),q!=null&&q>=2&&I.length===0?v(new Error(`rg exited with code ${q}`)):f(I.slice(0,t9))}),R.on("error",v)})}runGrep(s,l,d){return new Promise((f,v)=>{let x=[...V6e].map(be=>["--exclude-dir",be]).flat(),I=d?I0r(d):{includes:[],subDir:""},R=I.includes.flatMap(be=>["--include",be]),B=I.subDir?`${l}/${I.subDir}`:l,q=["-rn","-E","--color=never",...x,...R,s,B],G="",W=eZ.spawn("grep",q,{shell:!1}),ve=setTimeout(()=>{W.kill("SIGTERM"),f(G.slice(0,t9))},cft);W.stdout?.on("data",be=>{G+=be.toString(),G.length>t9&&W.kill("SIGTERM")}),W.on("close",be=>{clearTimeout(ve),be!=null&&be>=2&&G.length===0?v(new Error(`grep exited with code ${be}`)):f(G.slice(0,t9))}),W.on("error",v)})}};function A0r(a){let s=N0r(a);return l=>s.test(l.replace(/\\/g,"/"))}t(A0r,"compileGlob");function N0r(a){let s="^";for(let l=0;l<a.length;l++){let d=a[l];if(d==="*")a[l+1]==="*"?(s+=".*",l++,a[l+1]==="/"&&l++):s+="[^/]*";else if(d==="?")s+="[^/]";else if(d==="{"){let f=a.indexOf("}",l);if(f===-1){s+="\\{";continue}let v=a.slice(l+1,f).split(",").map(O0r).join("|");s+=`(?:${v})`,l=f}else/[.+^$()|\\]/.test(d)?s+="\\"+d:s+=d}return s+="$",new RegExp(s)}t(N0r,"globToRegex");function O0r(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}t(O0r,"escapeRegex");async function lft(a,s,l,d){if(d.length>=W6e)return;let f;try{f=await jF.promises.readdir(a,{withFileTypes:!0})}catch{return}for(let v of f){if(d.length>=W6e)return;if(V6e.has(v.name))continue;let x=_6.join(a,v.name),I=_6.relative(s,x);v.isDirectory()?await lft(x,s,l,d):v.isFile()&&l(I)&&d.push(x)}}t(lft,"walk");var fft=hu(require("child_process")),VP=hu(require("fs")),_ft=hu(require("os")),Z6e=hu(require("path")),dft=hu(require("crypto"));function H6e(){let a=dft.randomBytes(4).toString("hex");return Z6e.join(_ft.tmpdir(),`bandit-paste-${Date.now()}-${a}.png`)}t(H6e,"freshTempPath");function Zle(a,s,l={}){try{let d=fft.spawnSync(a,s,{...l,encoding:void 0});return{stdout:Buffer.isBuffer(d.stdout)?d.stdout:Buffer.from(d.stdout??""),code:d.status}}catch{return{stdout:Buffer.alloc(0),code:null}}}t(Zle,"tryExec");async function Hle(){return process.platform==="darwin"?F0r():process.platform==="linux"?M0r():process.platform==="win32"?R0r():null}t(Hle,"readClipboardImage");function F0r(){let a=H6e(),s=`set pngData to (the clipboard as \xABclass PNGf\xBB)
1230
1230
  set outFile to (open for access (POSIX file "${a}") with write permission)
1231
1231
  write pngData to outFile
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burtson-labs/bandit-stealth-cli",
3
- "version": "1.7.120",
3
+ "version": "1.7.121",
4
4
  "description": "Bandit — a local-first AI coding agent for your terminal. Same runtime as the Bandit Stealth VS Code / Cursor extension.",
5
5
  "keywords": [
6
6
  "ai",