@burtson-labs/bandit-stealth-cli 1.7.516 → 1.7.518
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/README.md +8 -6
- package/dist/cli.js +1644 -1625
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -82,7 +82,7 @@ completed verification. The agent receives at most one reminder to verify the
|
|
|
82
82
|
requested result or report what remains unverified. This is a bounded prompt
|
|
83
83
|
guard, not a guarantee of correctness; `BANDIT_VERIFY_BEFORE_DONE=0` disables it.
|
|
84
84
|
|
|
85
|
-
- **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
|
|
85
|
+
- **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 Stash links; `/copy link` copies the latest, and `/copy 2` copies the second listed URL. `/copy help` shows the shortcuts.
|
|
86
86
|
- **Clicking prompts and menus** — question choices, Continue/Submit, permission choices (allow once/turn/session, deny, Confirm, Cancel), the MCP trust check, the theme and session pickers, the `/` command list, the `@` file list and follow-up suggestions react to a click. In a choice list a click highlights an option and a click on the highlighted one answers with it (as Enter does), so the default takes one click and any other two; a `/` command or `@` file is inserted with one click. Arrow keys, digits and Enter keep working, and Alt+1–3 still picks a suggestion. Clicks need a terminal with SGR (1006) mouse reporting: the Stealth IDE terminal, VS Code's, iTerm2, Terminal.app, kitty, WezTerm, Alacritty and GNOME Terminal have it.
|
|
87
87
|
- **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`, `--no-mouse` or `"mouse": false` in `~/.bandit/config.json` turns the mouse features off entirely and leaves the mouse to the terminal.
|
|
88
88
|
- **Clickable web links** — labeled links retain their destinations through the live renderer. Stealth opens them in your browser; other terminals use their own link gesture and hyperlink support.
|
|
@@ -219,7 +219,7 @@ MCP tools ask before they run, because Bandit cannot see what a server does with
|
|
|
219
219
|
|
|
220
220
|
## Chrome, Edge and Brave — Stealth for Chrome
|
|
221
221
|
|
|
222
|
-
The **Bandit Stealth for Chrome** extension lets a session read and act on pages in your own browser: pages behind your sign-in, JavaScript apps, the real console. Setup, once: (1) install the extension
|
|
222
|
+
The **Bandit Stealth for Chrome** extension lets a session read and act on pages in your own browser: pages behind your sign-in, JavaScript apps, the real console. Setup, once: (1) install the extension from the [Chrome Web Store](https://chromewebstore.google.com/detail/cflcnhiodhhcgimefhbaeeomkckinkgh) (it installs in Edge and Brave too; a development build: **Load unpacked** in `chrome://extensions` with Developer mode on); (2) `bandit chrome install`; (3) reopen the browser. Sessions then connect by themselves, or `/chrome connect` in one already running: no restart, no new session. `bandit chrome install --browser all` registers every browser it knows; otherwise every browser found. Sessions connect quietly, in the background, and print nothing while the browser is closed. `bandit chrome doctor` checks the setup, and says so when the extension has never connected (it is not loaded in the browser yet). One-shot runs (`bandit "…"` in scripts and CI) attach only with `--chrome`, so a script never gains a browser just because the host is installed; `/chrome auto always` changes that, `/chrome auto off` (or `--no-chrome` for one session) turns auto-connect off. The setting lives in `~/.bandit/config.json` as `chrome.auto` and is read from there only, never from a repo's `.bandit/config.json`. The same MV3 extension (`apps/stealth-chrome` in this repository) loads in Chrome, Microsoft Edge, Brave, Chromium, Vivaldi and Arc. The agent loop stays on your machine; the browser reaches it through a native messaging host that is this same CLI.
|
|
223
223
|
|
|
224
224
|
```bash
|
|
225
225
|
bandit chrome install # registers this bandit as the extension's host in every Chromium browser found
|
|
@@ -229,6 +229,8 @@ bandit # interactive: connects to the open brows
|
|
|
229
229
|
bandit --chrome "open the staging site, reproduce the bug from issue #412 and tell me what the console says" # one-shot needs --chrome
|
|
230
230
|
```
|
|
231
231
|
|
|
232
|
+
**Chat in the side panel.** The panel's main view is a chat: type a task (Enter sends, Shift+Enter starts a new line) and Bandit does it in that browser, without a terminal. The host process the browser starts runs the session itself, with the same provider and model resolution as `bandit` (the panel's model picker lists what your provider reports: Ollama's installed models, an OpenAI-compatible server's `/models`, or the configured Bandit Cloud model), the same system prompt and browser rules, and the same permission gate: the security guard, hooks, explicit `ask` and `deny` rules, the mode, the auto review, the browser risk tiers with the critical floor, sensitive sites, refusals and the audit file. Cards appear in the panel and are answered there: **Allow once** or **Deny** for a permission, the options or a typed answer for a question. **Ask** (the default) asks before actions on a site; **Auto** runs ordinary steps without asking, while sending, paying, publishing and deleting still ask. A panel session has the browser tools, `ask_user` and `todo_write` and nothing else: no shell, no file tools, no `web_fetch` or `web_search`, no MCP servers, no subagents, no memory writes. Sessions are saved under `~/.bandit/sessions/`, recorded against the private folder `~/.bandit/chrome/panel`, so `bandit --resume` lists them. One session uses the browser at a time: while a terminal session is attached (auto-connect included) the panel says so and does not start a task, and `/chrome disconnect` in that session frees it; while a panel task runs, a terminal session's attach is refused with a one-line reason and the session runs without the browser until the task ends. **Stop** in the panel or on the page ends the task. A panel that is closed and reopened gets the transcript back from the host. If the browser restarts the extension, the host process ends with it: the next host restores the last panel session from the past 12 hours with your messages and Bandit's answers, without its step lines and cards, and a task that was running does not finish.
|
|
233
|
+
|
|
232
234
|
`bandit browser …` is the same command under a neutral name. Inside a session, `/chrome` shows the connection, the granted sites and whether auto-connect is on, `/chrome connect` attaches right away, `/chrome doctor` runs the setup check, `/chrome disconnect` detaches for the rest of the session, and `bandit doctor` reports the browser status with the rest. When a task reads like browser work and nothing is connected, the agent says so in one line and tells you how to connect; it never pretends to have clicked.
|
|
233
235
|
|
|
234
236
|
The manifest goes to each browser's own place (macOS `~/Library/Application Support/<Browser>/NativeMessagingHosts`, Linux `~/.config/<browser>/NativeMessagingHosts`, Windows `HKCU\\Software\\<Vendor>\\<Browser>\\NativeMessagingHosts`). The manifest allows the unpacked build's id (pinned by the manifest key) and each store listing's id (`apps/stealth-chrome/src/extensionId.ts`). To allow another id, such as a store listing's before this CLI knows it, use `--extension-id <id>`, `BANDIT_CHROME_EXTENSION_IDS=<id>[,<id>]`, or `"chrome": { "extensionIds": ["<id>"] }` in `~/.bandit/config.json` (global config only), then run `bandit chrome install` again.
|
|
@@ -535,7 +537,7 @@ bandit-agent --model qwen2.5-coder:32b
|
|
|
535
537
|
|
|
536
538
|
- **Endpoint.** Bandit reads `OLLAMA_HOST` the way Ollama's own client does (`node:port`, `http://node:port`, `0.0.0.0`), after `--ollama-url`, `OLLAMA_URL` and the config file. The line under the banner says which endpoint is in use and where it came from.
|
|
537
539
|
- **Context window.** Ollama's own default is 4,096 tokens on GPUs under 24 GB. Bandit always asks for a window per request (at least 16,384; 24,576 for most 7–14B models, 32,768 for 27B and up; never more than the model's own), so `OLLAMA_CONTEXT_LENGTH` and custom Modelfiles are not needed. Bandit's instructions and tool definitions take about 5,500 tokens before your files. Set the window with `--num-ctx`, `BANDIT_NUM_CTX` or `"ollama": { "numCtx": 32768 }`. After the first reply Bandit checks what Ollama loaded and warns when part of the model spilled to the CPU, with a window that would fit. A GPU under 24 GB does not limit you to 4,096: Ollama loads the window Bandit asks for and puts what does not fit on the CPU, which is slower (qwen3:8b at 16,384 on an 8 GB card: about a fifth on the CPU, replies about 5× slower), never a failure. The window is really fixed only when the server ignores the request's: Ollama's OpenAI-compatible `/v1` endpoint, `llama-server -c`, LM Studio or vLLM with a set window, or a gateway that drops options. If the KV cache is what does not fit, `OLLAMA_KV_CACHE_TYPE=q8_0` in the Ollama server's environment halves it (qwen3:8b at 16,384 then fits an 8 GB card); set it where `ollama serve` runs, not in Bandit.
|
|
538
|
-
- **Small windows: small-context mode.** With Ollama below 16,384 tokens (other providers only when forced, since their window for a model Bandit does not list is a guess; or with `--small-context`, `BANDIT_SMALL_CONTEXT=on`, `"ollama": { "smallContext": "on" }`) Bandit switches to a small-context agent and says so at startup: a short prompt and 7 tools (read, search, list, edit, write, run, test) with short definitions, 800–1,200 tokens in all instead of 5,500; tool output cut to a share of the window; older results shortened first; the reply's room reserved; thinking off unless `/think on`. Subagents, git, web, document, memory and
|
|
540
|
+
- **Small windows: small-context mode.** With Ollama below 16,384 tokens (other providers only when forced, since their window for a model Bandit does not list is a guess; or with `--small-context`, `BANDIT_SMALL_CONTEXT=on`, `"ollama": { "smallContext": "on" }`) Bandit switches to a small-context agent and says so at startup: a short prompt and 7 tools (read, search, list, edit, write, run, test) with short definitions, 800–1,200 tokens in all instead of 5,500; tool output cut to a share of the window; older results shortened first; the reply's room reserved; thinking off unless `/think on`. Subagents, git, web, document, memory and Bandit Stash tools are off. Measured on 5 public benchmark tasks (one-file bug fixes, a new function with tests, a four-file rename), qwen3.6:27b passed 14/15 at 4,096 (three seeds), 5/5 at 6,144 and 5/5 at 8,192 tokens, where the full agent passed 0/5 and 0/5 (and 4/5 at 8,192, with three runs stopped at the iteration limit); qwen3:8b passed 2/10, 4/10 and 2/10 (full agent 0/5, 0/5, 2/5), so an 8B model fails most tasks at these windows either way. What it cannot do: at 4,096 there is room for about one 40-line file at a time, so a task that needs two files in view at once goes back and forth between them (the Go task ran into the iteration limit in all three 4,096 runs, twice after making the fix); long command output is cut to its start and end; earlier steps are shortened to one line; there are no subagents. At 16,384 and above nothing changes; `--no-small-context` keeps the full agent at any window. It is a different thing from the REPL's `/compact` command, which shortens the current conversation.
|
|
539
541
|
- **Login nodes.** Started over SSH on a Slurm login node (outside a job), Bandit prints a one-line reminder to start an interactive job. It never blocks. `BANDIT_NO_LOGIN_HINT=1` hides it.
|
|
540
542
|
- **Home quota.** `BANDIT_HOME` moves what grows (`sessions/`, `crashes/`, `training/`, and the Apptainer sandbox image when `APPTAINER_CACHEDIR` is unset) to scratch. Settings stay in `~/.bandit` (`config.json`, `settings.json`, `mcp-servers.json`, `lessons.md`, `terms.json`; a few KB) so a scratch purge never signs you out. Each project also gets a `.bandit/` folder with turn logs and checkpoints.
|
|
541
543
|
- **Resume after reconnecting.** Sessions are saved with the directory they started in. `bandit --continue` (or `-c`) resumes the latest session of the current directory from any login; `bandit --resume` lists this directory's sessions first.
|
|
@@ -581,7 +583,7 @@ Telemetry is off unless you turn it on ([Telemetry](#telemetry-opt-in)). Bandit
|
|
|
581
583
|
|
|
582
584
|
- `web_fetch`, `fetch_image` (any URL; private, loopback and link-local addresses are refused unless `BANDIT_ALLOW_PRIVATE_WEB_FETCH=1`), `web_search` (Tavily, only with a Tavily key);
|
|
583
585
|
- `git_push`, `git_pull`;
|
|
584
|
-
- the Bandit
|
|
586
|
+
- the Bandit Stash tools (`publish_artifact`, `share_artifact`, `email_artifact`, …; Stash was called Artifacts, the tool names keep the old word), which exist only when Bandit Cloud is the provider. Bandit Stash is cloud storage for files you save and share by link (`bandit stash <file>`, `/stash`); it is not `git stash`;
|
|
585
587
|
- MCP tools, unless the server's entry says `"local": true` (then its read-named tools, such as `list…`/`get…`, run without asking; its other tools still ask).
|
|
586
588
|
|
|
587
589
|
Plan mode refuses all of them. In auto mode (`--auto`), the CLI's reviewer model decides whether such a call is one you asked for, and can let it run without a card; `list_artifacts`, `get_artifact` and MCP read-named tools run there without review. `dangerous` mode runs everything. An allow rule in `.bandit/settings.json` (for example `"web_fetch:https://docs.example.com/*"`) lets matching calls run without asking. `run_command` always asks in the default mode; `--sandbox` runs commands with no network. Graph runs (`bandit graph`, `bandit spec`) cannot ask, so they leave out `web_fetch` and `web_search` unless `BANDIT_GRAPH_WEB=1`.
|
|
@@ -592,8 +594,8 @@ Plan mode refuses all of them. In auto mode (`--auto`), the CLI's reviewer model
|
|
|
592
594
|
|
|
593
595
|
- Bandit connects only to your model server and to loopback addresses. An HTTP request to any other host fails at once with a message naming the host.
|
|
594
596
|
- The update check, models.dev and telemetry are off.
|
|
595
|
-
- `web_fetch`, `web_search`, `fetch_image` and the
|
|
596
|
-
- Bandit Cloud features are refused with a message: the `bandit` provider, sign-in, `/remote`, `/usage`, `/
|
|
597
|
+
- `web_fetch`, `web_search`, `fetch_image` and the Bandit Stash tools are not offered to the model. `git_push`, `git_pull` and MCP tools from servers not marked `"local": true` are refused.
|
|
598
|
+
- Bandit Cloud features are refused with a message: the `bandit` provider, sign-in, `/remote`, `/usage`, `/stash`, `bandit runner`, `bandit stash` and `bandit upgrade`.
|
|
597
599
|
|
|
598
600
|
Offline mode does not control the commands the agent runs with `run_command` (they ask first in the default mode; use `--sandbox` for no network), what a stdio MCP server you configured does on its own, or `docker`/`podman`/`apptainer` pulling the sandbox image (set `BANDIT_SANDBOX_REGISTRY_MIRROR` or load the image beforehand).
|
|
599
601
|
|