@burtson-labs/bandit-stealth-cli 1.7.488 → 1.7.490

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 (3) hide show
  1. package/README.md +31 -21
  2. package/dist/cli.js +1453 -1431
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -64,6 +64,19 @@ The variable and the flag accept for that run only and write nothing. `--help`,
64
64
 
65
65
  ## What it does
66
66
 
67
+ The CLI keeps common coding tools available and loads other tool groups on
68
+ demand to reduce prompt size. `BANDIT_TOOL_EXPOSURE=all` exposes all registered
69
+ tools immediately; it does not restore older tool descriptions. Tool permissions
70
+ and execution checks still apply to deferred tools. If a provider failure
71
+ switches the agent to text tool calling, its prompt retains the groups already
72
+ loaded during that turn. Compact prompts keep the tool-group directory so
73
+ smaller models can discover tools that have not been loaded yet.
74
+
75
+ After an edit, a failed check or a background job's start does not count as
76
+ completed verification. The agent receives at most one reminder to verify the
77
+ requested result or report what remains unverified. This is a bounded prompt
78
+ guard, not a guarantee of correctness; `BANDIT_VERIFY_BEFORE_DONE=0` disables it.
79
+
67
80
  - **Copying with the mouse** — drag over anything on screen (history, the reply, the prompt) and release: the text is copied to the clipboard and **Copied to clipboard** shows at the lower right for two seconds. Text that wrapped onto several rows copies as one line; real line breaks are kept and colours are dropped. A plain click copies nothing. The copy goes through `pbcopy` / `wl-copy` / `xclip` / `clip`, plus an OSC 52 escape over SSH and in tmux so it reaches your local clipboard; with `BANDIT_NO_CLIPBOARD=1` the notice says **Copy unavailable** instead. `/copy` still lets you choose the latest response or one of its code blocks, preserving the source text without terminal wrapping: `/copy response`, `/copy code 2`, `/copy choose`. `/links` lists recent response and artifact URLs; `/copy link` copies the latest, and `/copy 2` copies the second listed URL. `/copy help` shows the shortcuts.
68
81
  - **Clicking prompts** — question choices, Continue/Submit, permission choices (allow once/turn/session, deny, Confirm, Cancel) and follow-up suggestions react to a click. Arrow keys, digits and Enter keep working, and Alt+1–3 still picks a suggestion.
69
82
  - **Scrolling and native selection** — the mouse wheel scrolls the terminal's own scrollback as usual: the first wheel tick hands the mouse back to the terminal (that one tick does not scroll), and the next key you type takes it again. While it is handed back, and whenever you hold **Shift** (most terminals), **Option** (iTerm2) or **Fn** (Terminal.app), dragging is the terminal's own selection, copied with its shortcut (Cmd+C on macOS, usually Ctrl+Shift+C elsewhere). Only what is visible on screen can be selected with the in-app drag; for older text scroll up and use the native selection. `BANDIT_MOUSE=0` turns the mouse features off entirely and leaves the mouse to the terminal.
@@ -198,24 +211,21 @@ Servers spawn lazily on first invocation, persist for the session, and get clean
198
211
 
199
212
  ## Recommended models
200
213
 
201
- Bandit auto-detects each model's capabilities and takes the native tool-calling
202
- path when supported. All four cloud models emit native tool calls reliably —
203
- that is not what separates them.
214
+ Bandit uses native tool calling when supported by the selected provider.
204
215
 
205
216
  ### Cloud — Bandit gateway (API key)
206
217
 
207
- | Model | Notes |
208
- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
209
- | `bandit-logic-2` | **Start here.** Fastest (1.3–1.7s warm, and steady under concurrent load), 256K context, and the model that handled a one-prompt "write a PDF with a diagram" end to end. Frontier coding model. |
210
- | `bandit-core-2` | Highest score on our 26-fixture agent eval (20/26 vs 19/26), but roughly 3× the wall time for the same suite. Reach for it when quality matters more than latency. 256K context. |
211
- | `bandit-logic` | Self-hosted. Fast in isolation (~6.5s) but latency degrades sharply when more than one session uses it at once. Agent-tuned, thinking mode, 64K context. |
212
- | `bandit-core-1` | Self-hosted, lightweight. Same concurrency limit as `bandit-logic`, and availability has been uneven — measured between 8s and 112s for the same trivial prompt on the same day. Check before relying on it. |
218
+ | Model | Notes |
219
+ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
220
+ | `bandit-logic` | Default: Kimi K3 through Ollama Cloud, with vision, reasoning and native tools. Advertised context: 1M; the harness keeps conservative working budgets. |
221
+ | `bandit-logic-2` | Compatibility alias for the same K3 backend. Existing saved sessions continue to work. |
222
+ | `bandit-core-2` | Existing general-purpose cloud model. |
223
+ | `bandit-core-1` | Lightweight self-hosted model. |
213
224
 
214
- > **Concurrency matters more than the benchmark.** `bandit-logic` and
215
- > `bandit-core-1` run on our own hardware and serve roughly one request at a
216
- > time: two simultaneous sessions are enough to stall both. `bandit-logic-2`
217
- > and `bandit-core-2` are cloud-backed and hold their latency under load. If
218
- > you are fanning work out in parallel, use the cloud pair.
225
+ K3 replaces K2.7 Code in the Logic routes. The initial three-task compatibility
226
+ screen passed; that small sample is not a comparative quality or latency claim.
227
+ Cloud Logic uses the existing frontier subscription, usage and credit rules.
228
+ Use an explicit Qwen model with the Ollama provider for local inference.
219
229
 
220
230
  ### Local — Ollama
221
231
 
@@ -223,7 +233,7 @@ Pull one with `ollama pull <model>`.
223
233
 
224
234
  | Model | Where | Notes |
225
235
  | ------------------------ | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
226
- | `qwen3.6:27b` | Local / Mac 48GB+, high-VRAM GPU (~17 GB) | **Best local pick.** Same family as `bandit-logic`, runs offline. Probes the filesystem instead of asking for clarification — real agent behavior. |
236
+ | `qwen3.6:27b` | Local / Mac 48GB+, high-VRAM GPU (~17 GB) | **Best local pick.** Runs offline. Probes the filesystem instead of asking for clarification — real agent behavior. |
227
237
  | `gemma4:26b` | Local / Mac 32GB+ (~17 GB) | Solid alternative when Qwen 3.6 is too heavy for your hardware. Multimodal, 128K context. |
228
238
  | `gemma4:e4b` | Local / laptop-class (~3 GB) | Lightweight pick that punches above its weight. Validated on real Bandit runs — clean tool sequencing (`ls` → narrow → `read_file`), no hallucinated paths. Right pick when you want a local agent that doesn't pin your fans. |
229
239
  | `gemma4:31b` | Local / Mac 64GB+, GPU node | Bigger context, better reasoning for complex refactors. |
@@ -442,11 +452,11 @@ Tear the pod down when you're done. ~$2/hr for an H100 SXM × 15-20 min agent se
442
452
 
443
453
  **Recommended models for rented GPU:**
444
454
 
445
- | Model | Size | What it's good at |
446
- | ------------------- | ------ | --------------------------------------------------------------------------------------------------- |
447
- | `qwen3.6:27b` | ~17 GB | Same model as `bandit-logic`. Native tool calling, vision, 256K context. Best general-purpose pick. |
448
- | `qwen2.5-coder:32b` | ~20 GB | Code-specialist post-train. Strongest on file edits and refactors. |
449
- | `qwen3.6:35b` | ~24 GB | Bigger Qwen 3.6 variant — slower, marginally better reasoning. |
455
+ | Model | Size | What it's good at |
456
+ | ------------------- | ------ | --------------------------------------------------------------------- |
457
+ | `qwen3.6:27b` | ~17 GB | Native tool calling, vision, 256K context. Best general-purpose pick. |
458
+ | `qwen2.5-coder:32b` | ~20 GB | Code-specialist post-train. Strongest on file edits and refactors. |
459
+ | `qwen3.6:35b` | ~24 GB | Bigger Qwen 3.6 variant — slower, marginally better reasoning. |
450
460
 
451
461
  **Avoid for agent work:** `gpt-oss:120b` and similar reasoning-tuned models. They're post-trained for OpenAI's harmony tool-call format, not the XML protocol Bandit uses for non-native models — they tend to narrate intent without emitting tool calls. Great for math/proofs in chat, poor for filesystem agent loops.
452
462
 
@@ -457,7 +467,7 @@ Tear the pod down when you're done. ~$2/hr for an H100 SXM × 15-20 min agent se
457
467
  - **Local-first by default** — with `provider=ollama`, nothing leaves your machine.
458
468
  - **Approval gate** — all file writes show a unified diff before touching disk (unless `BANDIT_AUTO_APPROVE=1`).
459
469
  - **Command allowlist** — `run_command` only executes from an internal allowlist (git, gh, kubectl, helm, brew, standard *nix tools). Arbitrary shell is refused.
460
- - **Container sandbox (opt-in)** — `bandit --sandbox` or `BANDIT_SANDBOX=1` runs every agent `run_command` / `watch_command` inside a short-lived Docker or Podman container with the same policy as the Stealth IDE: one workspace mount, no network, no Linux capabilities, read-only root, `no-new-privileges`, bounded CPU/memory/pids/output/time, your uid:gid. Fail-closed once enabled — no runtime means the command is refused, never quietly run on the host. Image: `ghcr.io/burtson-labs/stealth-sandbox` (node, git, ripgrep, python3, C toolchain); override with `BANDIT_SANDBOX_IMAGE`. Enterprise-managed installs should set `BANDIT_SANDBOX=1` in the environment.
470
+ - **Container sandbox (opt-in)** — `bandit --sandbox` or `BANDIT_SANDBOX=1` runs every agent `run_command` / `watch_command` inside a short-lived Docker or Podman container with the same policy as the Stealth IDE: one workspace mount, no network, no Linux capabilities, read-only root, `no-new-privileges`, bounded CPU/memory/pids/output/time, your uid:gid. On a cluster with neither, Apptainer or Singularity run the same image (pulled by digest into a SIF under `$APPTAINER_CACHEDIR/stealth-sandbox` or `~/.bandit/sandbox-apptainer`), as you, with the network namespace checked before every command and the command refused when it cannot be isolated (`sandbox/README.md`, Apptainer). `BANDIT_SANDBOX_RUNTIME=apptainer` (or `docker`, `podman`, `singularity`, comma-separated) picks the runtime. Fail-closed once enabled — no runtime means the command is refused, never quietly run on the host. Image: `ghcr.io/burtson-labs/stealth-sandbox`, chosen from the project's files — the base (node, git, ripgrep, python3, C toolchain) or the dotnet, go, rust or python image built on it; override with `BANDIT_SANDBOX_IMAGE` (a stack name or an image reference). `BANDIT_SANDBOX_INSTALL_NETWORK=1` gives install commands (`npm install`, `pip install`, `dotnet restore`, `go mod download`, …, run on their own) the network; every other command stays offline. Enterprise-managed installs should set `BANDIT_SANDBOX=1` in the environment.
461
471
  - **Pre-tool security guard** (default-on) — configure `security.guard` in your [settings file](#settings-file--hooks-permissions-security-guard) to extend or explicitly disable blocking of catastrophic commands (`rm -rf /`, `curl … | sh`, disk wipes, credential exfil, writes to `/etc` or `~/.ssh`) before they run. Defense-in-depth against the model, applied in both CLI and IDE.
462
472
  - **Custom hooks** — your own `PreToolUse` shell scripts can veto any tool call; configure globally (`~/.bandit/settings.json`) or per-project.
463
473
  - **Secret hygiene** — API keys are redacted in `/config` output and never logged. The optional [telemetry](#telemetry-opt-in) exporter never sends prompt/response text and redacts metadata.