@burtson-labs/bandit-stealth-cli 1.7.431 → 1.7.433
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/cli.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2086,7 +2086,7 @@ Upgrade it with:
|
|
|
2086
2086
|
`)),l}async function tce(r,i){let o=dRt(r);if(o===null)return process.stdout.write(z.dim("No graph run to resume. Start one with: ")+z.cyan("BANDIT_GRAPH=1 bandit graph demo")+z.dim(" or ")+z.cyan('bandit graph plan "\u2026" --run')+`
|
|
2087
2087
|
`),null;if(!o.ok)return process.stdout.write(z.red(`Can't resume: ${o.error}
|
|
2088
2088
|
`)),null;let{spec:l,checkpoint:u,nodePrompts:_}=o.file,h=l.nodes.filter(I=>!_[I.id]).map(I=>I.id);if(h.length>0)return process.stdout.write(z.red(`Can't resume: run file has no prompts for: ${h.join(", ")}
|
|
2089
|
-
`)),null;let C=NCe(_,i);return U$({cwd:r,spec:l,executors:C,nodePrompts:_,resumeFrom:u})}var $$,g6,$Y=Vi(()=>{"use strict";$$=ko(QC(),1);av();g6=["read_file","list_files","ls","search_code","find_directory"];t(DCe,"graphRunPath");t(fRt,"saveRunFile");t(dRt,"loadRunFile");t(NCe,"executorsFromPrompts");t(U$,"runSpecLive");t(tce,"resumeSpecLive")});var nce=Pt((eEr,xYn)=>{xYn.exports={name:"@burtson-labs/bandit-stealth-cli",version:"1.7.
|
|
2089
|
+
`)),null;let C=NCe(_,i);return U$({cwd:r,spec:l,executors:C,nodePrompts:_,resumeFrom:u})}var $$,g6,$Y=Vi(()=>{"use strict";$$=ko(QC(),1);av();g6=["read_file","list_files","ls","search_code","find_directory","glob","web_fetch","web_search","read_pdf","read_memory","list_artifacts","fetch_image"];t(DCe,"graphRunPath");t(fRt,"saveRunFile");t(dRt,"loadRunFile");t(NCe,"executorsFromPrompts");t(U$,"runSpecLive");t(tce,"resumeSpecLive")});var nce=Pt((eEr,xYn)=>{xYn.exports={name:"@burtson-labs/bandit-stealth-cli",version:"1.7.433",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:{url:"https://github.com/Burtson-Labs/bandit-agent-framework/issues",email:"team@burtson.ai"},license:"Apache-2.0",author:{name:"Burtson Labs",email:"team@burtson.ai",url:"https://burtson.ai"},repository:{type:"git",url:"git+https://github.com/Burtson-Labs/bandit-agent-framework.git",directory:"apps/bandit-cli"},type:"module",bin:{bandit:"./dist/cli.js"},main:"dist/cli.js",files:["dist/cli.js","README.md","LICENSE"],engines:{node:">=20"},publishConfig:{access:"public"},scripts:{test:"vitest run",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","@types/react":"^19.2.2",esbuild:"^0.28.0",ink:"^7.0.4","ink-text-input":"^6.0.0",pngjs:"^7.0.0",react:"^19.2.0",typescript:"^5.4.0",vitest:"^4.0.10"}}});import*as zJ from"child_process";import*as I1 from"fs";import*as Pw from"path";function IYn(r){let i=process.env.HOME||"";return i&&r.startsWith(i)?`~${r.slice(i.length)}`:r}function DYn(){return new Promise(r=>{let i=zJ.spawn("npm",["view",OCe,"version"],{shell:!1,stdio:["ignore","pipe","pipe"]}),o="";i.stdout?.on("data",u=>{o+=u.toString()});let l=setTimeout(()=>{i.kill("SIGTERM"),r(null)},8e3);i.on("close",u=>{clearTimeout(l),r(u===0?o.trim():null)}),i.on("error",()=>{clearTimeout(l),r(null)})})}function NYn(r){return(r??"").trim().split(/\s+/).filter(Boolean).some(i=>PYn.has(i.toLowerCase()))}function OYn(r,i){let o=[...r].map(h=>h.role).lastIndexOf("user");if(o===-1)return null;let l=r[o],u=typeof l.content=="string"?l.content:"",_=i&&i.trim()?i.trim():u;return _?{prompt:_,trimmedConversation:r.slice(0,o)}:null}function RYn(r,i){let o=t(N=>N.replace(/[^0-9.]/g,"").split(".").map(B=>parseInt(B,10)||0),"parse"),[l,u,_]=o(r),[h,C,I]=o(i);return l!==h?l<h?-1:1:u!==C?u<C?-1:1:_!==I?_<I?-1:1:0}function BYn(r){return UY.find(i=>i.name===r)}function FYn(){let r=UY.map(i=>` ${z.cyan("/"+i.name.padEnd(14))} ${z.dim(i.description)}`);return[z.bold("All slash commands:"),...r,"",z.dim("Tip: prefix any file with @ to pin it, or run /help permissions for the permission model.")].join(`
|
|
2090
2090
|
`)}function LYn(){return[z.bold("Permission choices"),"",` ${z.accent("allow once")} ${z.dim("Run only this call.")}`,` ${z.accent("allow turn")} ${z.dim("Allow calls like this until the agent finishes the current turn.")}`,` ${z.dim(" ")}${z.dim("Best pick when the model is making a batch of similar edits.")}`,` ${z.accent("allow session")} ${z.dim("Allow them until you exit Bandit.")}`,` ${z.accent("always allow")} ${z.dim("Save the rule to .bandit/settings.json so it survives restarts.")}`,` ${z.accent("deny")} ${z.dim("Block the call. Bandit should not retry it.")}`,` ${z.accent("deny + note")} ${z.dim("Block it and tell Bandit what to do instead.")}`,"",z.dim(" The card shows the exact rule each choice stores, under the highlighted"),z.dim(" option. For shell commands the rule covers a command shape \u2014 approving"),z.dim(" `git status` grants `git status \u2026`, not every command."),"",z.bold("Permission modes")+z.dim(" \u2014 /auto to change"),` ${z.accent("ask")} ${z.dim("Every non-allowlisted call prompts. Default.")}`,` ${z.accent("auto")} ${z.dim("Routine work runs unprompted: reading, editing files in this")}`,` ${z.dim(" ")}${z.dim("project, running builds and tests. Everything else still asks.")}`,` ${z.accent("dangerous")} ${z.dim("Nothing prompts. CI and sandboxes only; not settable from /auto.")}`,"",z.bold("What auto mode never does without asking"),z.dim(" Deleting files \xB7 writing outside the project \xB7 force-push and history"),z.dim(" rewrites \xB7 global installs and publishes \xB7 touching credential files \xB7"),z.dim(" sending data off the machine \xB7 mutating a connected service."),z.dim(" That floor holds even if a saved allow rule would cover the call."),"",z.dim(" /permissions review what ran unattended and which grants are active"),z.dim(" /doctor explain the current setup and next best actions")].join(`
|
|
2091
2091
|
`)}function jYn(){let r=[z.bold("Bandit commands"),z.dim("Use /help all for the full list, /help permissions for approval choices."),""],i=new Set;for(let l of MYn){let u=l.names.map(_=>BYn(_)).filter(_=>!!_);if(u.length!==0){r.push(z.bold(l.title));for(let _ of u)i.add(_.name),r.push(` ${z.cyan("/"+_.name.padEnd(14))} ${z.dim(_.description)}`);r.push("")}}let o=UY.filter(l=>!i.has(l.name)&&l.name!=="quit");return o.length>0&&(r.push(z.dim(`Also available: ${o.map(l=>"/"+l.name).join(", ")}`)),r.push("")),r.push(z.dim("Fast path: /doctor \u2192 /connect or /init \u2192 ask for the change \u2192 /review \u2192 /test \u2192 /commit")),r.join(`
|
|
2092
2092
|
`)}function $Yn(r){let i=[],o=r.accomplishments,l=Math.max(1,Math.round((Date.now()-(r.firstSeenAt??Date.now()))/864e5)),u=r.ai?.storyline&&r.ai.storyline.length>0?r.ai.storyline:r.localStory;if(u.length>0){let N=Math.min(process.stdout.columns||80,100),B=Math.max(40,N-4);i.push(z.bold("Your story")+z.dim(` \xB7 ${r.ai?.storyline?.length?r.ai.modelLabel:"local synthesis"}`)),i.push("");for(let J of u){let j=J.replace(/\s+/g," ").trim().split(" "),ne="";for(let ie of j)ne.length===0?ne=ie:ne.length+1+ie.length<=B?ne+=" "+ie:(i.push(" "+ne),ne=ie);ne&&i.push(" "+ne),i.push("")}}if(i.push(z.bold("How you use Bandit")),i.push(""),i.push(` ${z.dim("sessions ")} ${z.accent(String(r.sessions.length))} ${z.dim("over "+l+" day"+(l===1?"":"s"))}`),i.push(` ${z.dim("prompts ")} ${z.accent(String(r.totalPrompts))} ${z.dim("~"+(r.totalApproxTokens>=1e3?(r.totalApproxTokens/1e3).toFixed(1)+"K":r.totalApproxTokens)+" tokens")}`),(r.streak.current>0||r.streak.longest>0)&&i.push(` ${z.dim("streak ")} ${z.accent(r.streak.current+" day"+(r.streak.current===1?"":"s"))} ${z.dim("(longest "+r.streak.longest+")")}`),r.peakDay&&i.push(` ${z.dim("peak day ")} ${z.accent(r.peakDay.date)} ${z.dim(r.peakDay.prompts+" prompts")}`),i.push(""),i.push(z.bold("What got done")),i.push(` ${z.dim("files touched ")} ${z.accent(String(o.filesTouched))} ${z.dim("("+o.filesWritten+" written, "+o.editsApplied+" edited)")}`),o.gitOperations>0&&i.push(` ${z.dim("git ops ")} ${z.accent(String(o.gitOperations))} ${z.dim("("+o.commitsMade+" commits)")}`),o.testsRun>0&&i.push(` ${z.dim("tests run ")} ${z.accent(String(o.testsRun))}`),o.subagentsSpawned>0&&i.push(` ${z.dim("subagents ")} ${z.accent(String(o.subagentsSpawned))}`),o.languages.length>0){let N=o.languages.slice(0,5).map(B=>`${B.label} ${z.dim("("+B.count+")")}`).join(z.dim(", "));i.push(` ${z.dim("languages ")} ${N}`)}if(r.work.themes.length>0){i.push(""),i.push(z.bold("Bigger arcs"));for(let N of r.work.themes.slice(0,4)){let B=[`${N.turns} turn${N.turns===1?"":"s"}`,N.filesTouched>0?`${N.filesTouched} files`:"",N.testsRun>0?`${N.testsRun} tests`:"",N.externalActions>0?`${N.externalActions} external`:"",N.subagentsSpawned>0?`${N.subagentsSpawned} subagents`:""].filter(Boolean).join(", ");i.push(` ${z.cyan(N.title)} ${z.dim(B?"\u2014 "+B:"")}`),N.outcomes.length>0&&i.push(z.dim(` ${N.outcomes[0]}`)),N.sampleTitles.length>0&&i.push(z.dim(` ${N.sampleTitles[0]}`))}}if(r.work.highlights.length>0){i.push(""),i.push(z.bold("Largest work highlights"));for(let N of r.work.highlights.slice(0,5))i.push(` ${z.cyan(N.date)} ${z.accent(N.area)} ${z.dim("\xB7 "+N.category)}`),i.push(z.dim(` ${N.title}`)),i.push(z.dim(` ${N.summary}`)),N.outcome&&i.push(z.dim(` ${N.outcome}`))}if(o.topFiles.length>0){i.push(""),i.push(z.bold("Most-touched files"));for(let N of o.topFiles.slice(0,5))i.push(` ${z.cyan(N.path)} ${z.dim("\xD7"+N.touches)}`)}let _=[...r.toolStats.entries()].map(([N,B])=>({name:N,calls:B.calls,errors:B.errors,rate:B.calls>0?B.errors/B.calls:0})).sort((N,B)=>B.calls-N.calls).slice(0,6);if(_.length>0){i.push(""),i.push(z.bold("Top tools"));for(let N of _){let B=Math.round(N.rate*100),J=N.calls>=5&&B>=25?" "+z.yellow("\u26A0 "+B+"% error rate"):"";i.push(` ${z.cyan(N.name.padEnd(16))} ${z.accent(String(N.calls).padStart(4))} ${z.dim("calls")}${J}`)}}let h=[...r.errorClusters.entries()].flatMap(([N,B])=>B.map(J=>({tool:N,error:J.error,count:J.count}))).sort((N,B)=>B.count-N.count);if(h.length>0){let N=h[0],B=N.error.replace(/\s+/g," ").slice(0,70);i.push(""),i.push(z.bold("Top friction")),i.push(` ${z.cyan(N.tool)} ${z.dim("\xD7"+N.count)} ${z.dim(B+(N.error.length>70?"\u2026":""))}`)}let C=r.sentiment;if(C.satisfied+C.happy+C.excited+C.frustrated+C.unsatisfied>0){let N=[];C.excited>0&&N.push(z.green("excited ")+z.bold(String(C.excited))),C.happy>0&&N.push(z.green("happy ")+z.bold(String(C.happy))),C.satisfied>0&&N.push(z.green("satisfied ")+z.bold(String(C.satisfied)));let B=[];if(C.unsatisfied>0&&B.push(z.yellow("unsatisfied ")+z.bold(String(C.unsatisfied))),C.frustrated>0&&B.push(z.red("frustrated ")+z.bold(String(C.frustrated))),i.push(""),i.push(z.bold("How you felt")),N.length>0&&i.push(` ${N.join(z.dim(" \xB7 "))}`),B.length>0&&i.push(` ${B.join(z.dim(" \xB7 "))}`),C.notable.length>0){i.push(z.dim(" Frustration moments:"));for(let J of C.notable.slice(0,3))i.push(z.dim(' "')+z.dim(J)+z.dim('"'))}}return i.push(""),i.push(z.dim(" Full report (HTML + AI summary): ")+z.cyan("/insights")),i.join(`
|
package/package.json
CHANGED