@burtson-labs/bandit-stealth-cli 1.7.519 → 1.7.523

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 +21 -12
  2. package/dist/cli.js +1529 -1517
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -87,7 +87,7 @@ guard, not a guarantee of correctness; `BANDIT_VERIFY_BEFORE_DONE=0` disables 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.
89
89
  - **Agentic tool use** — reads files, searches code, runs commands, writes changes
90
- - **Auditable approval gate** — writes show a colored diff, shell commands show the full command/cwd/risk, and `Allow once` / `Allow session` / `Always for target` scopes are recorded in turn traces
90
+ - **Auditable approval gate** — writes show a colored diff, shell commands show the full command/cwd/risk, and `Allow once` / `Allow session` / `Always for target` scopes are recorded in turn traces. Cards come one at a time (`1 of 3` when a batch needs several decisions, with `apply to all N pending` for siblings of the same tool, never for destructive calls) and collapse to one line once answered
91
91
  - **Pre-write validation** — TypeScript, Python, JSON, C# syntax-checked before the agent can write
92
92
  - **Post-write validation** — JSON edits are re-parsed after write; failure feeds back to the agent on the next turn so it self-corrects without you flagging it
93
93
  - **Skills system** — agent activates specialized skills based on your prompt, and can create its own
@@ -254,20 +254,28 @@ Every decision is one line in `~/.bandit/audit/bandit-audit-<date>.jsonl` (origi
254
254
 
255
255
  ---
256
256
 
257
+ ## Bandit Stash (cloud)
258
+
259
+ `bandit stash <file>` saves a file to your Bandit Stash and prints its link (`bandit stash` alone lists every verb; it is not `git stash`). Each save is a new item with a new link. To keep one link for a document you update, such as a status page or a daily briefing, save new versions in place: `bandit stash briefing.md --replace <url|key>` overwrites that item, and `bandit stash briefing.md --replace` with no target overwrites your newest item saved under the same file name (or saves a new one when there is none). The key, the owner link and any share links stay the same; Stash keeps the previous version.
260
+
261
+ ---
262
+
257
263
  ## Bandit Crew (cloud)
258
264
 
259
265
  Bandit Crew is the set of named AI teammates on your Bandit account (create them here, in the Bandit app under Settings → Crew, or in Slack). `bandit crew run Riley "research Acme's 2026 pricing changes and draft a one-page brief"` starts a task on your account and follows it in the terminal: each step prints as it happens (searching, reading, writing files), and when the Bandit wants to do something that affects other people the command asks `Approve? [y/N]`. There is no flag that pre-approves a side effect; without a terminal to answer in, the command prints the `bandit crew approve <id> <approvalId>` and `decline` lines to run later. The result prints with its Stash link, sources, step count and model.
260
266
 
261
- | Command | Does |
262
- | ------------------------------------------- | --------------------------------------------------------------------------------------------- |
263
- | `bandit crew list` | The Bandits on your crew |
264
- | `bandit crew create <Name> --job "<text>"` | Add a Bandit (one-word name; the job description is its instructions; `--tools`, `--model`) |
265
- | `bandit crew remove <Name>` | Remove one |
266
- | `bandit crew run <Name> "<task>"` | Start a task and follow it (`--context <file\|->` adds material; `--no-wait` returns at once) |
267
- | `bandit crew tasks [--status active]` | Your recent tasks; `--json` for scripts |
268
- | `bandit crew show <id>` | One task: steps, approvals, result and files (a short id from `tasks` works) |
269
- | `bandit crew approve <id>` / `decline <id>` | Answer a pending approval |
270
- | `bandit crew stop <id>` | Stop a running task between steps |
267
+ | Command | Does |
268
+ | ------------------------------------------------ | -------------------------------------------------------------------------------------------------- |
269
+ | `bandit crew list` | The Bandits on your crew, each with its display name and `@handle` |
270
+ | `bandit crew create "<Name>" --job "<text>"` | Add or update a Bandit (the job description is its instructions; `--handle`, `--tools`, `--model`) |
271
+ | `bandit crew remove <Bandit>` | Remove one |
272
+ | `bandit crew run <Bandit> "<task>"` | Start a task and follow it (`--context <file\|->` adds material; `--no-wait` returns at once) |
273
+ | `bandit crew tasks [<Bandit>] [--status active]` | Your recent tasks, optionally one Bandit's; `--json` for scripts |
274
+ | `bandit crew show <id>` | One task: steps, approvals, result and files (a short id from `tasks` works) |
275
+ | `bandit crew approve <id>` / `decline <id>` | Answer a pending approval |
276
+ | `bandit crew stop <id>` | Stop a running task between steps |
277
+
278
+ A Bandit has a display name with spaces ("Captain Jack", up to 40 characters: letters, digits, spaces and `. , ' - _ & ( ) ! ?`) and a one-word handle for mentions (`@captain-jack`: lowercase letters, digits and `-`, starting with a letter). `create` derives the handle from the name unless `--handle` sets it; creating with an existing display name (any case) updates that Bandit, and a `--handle` already used by a Bandit with another name is refused. Wherever a command takes `<Bandit>` you can give the handle, `@handle`, the display name in any case, or its compact form (`CaptainJack`). `bandit crew run Captain Jack find three case studies` works without quotes: the CLI matches the longest name at the start against your crew (so "Captain Jackson" is not read as "Captain Jack"), and when a name fits more than one Bandit it lists them with their handles and exits without starting a task.
271
279
 
272
280
  Inside a session the same verbs are `/crew list`, `/crew run Riley "…"`, `/crew tasks`, `/crew show <id>`. Tasks run on the gateway on your own plan and credits, the same as the chat app and Slack; a task started from the terminal never gets the Slack `post_to_channel` tool. The gateway host is the one your completions URL points at (`BANDIT_GATEWAY_URL` overrides it). Offline mode refuses `bandit crew` like the other Bandit Cloud features.
273
281
 
@@ -396,7 +404,7 @@ Workspace config overrides user config. Secrets belong in the user-level file, n
396
404
 
397
405
  Plan mode is read-only: the agent reads files, searches and runs read-only commands (`git status`, `ls`, `grep`), and every edit, file write, state-changing command and network write is refused, so it ends with a plan instead of changes. Start a session in it with `bandit --read-only` (also for one-shot prompts: `bandit --read-only "how would you add caching here?"`), or switch with shift+tab or `/plan`; `BANDIT_PERMISSION_MODE=plan` does the same. `--read-only` cannot be combined with `--auto`.
398
406
 
399
- Terminal `--auto` mode runs routine work immediately and reviews other actions with the selected provider/model. The reviewer considers the raw user requests in the current session, the proposed action and bounded local metadata. Requested cleanup can proceed without a blanket deletion prompt; uncertain effects or missing authorization still ask. External, system and irreversible actions need explicit authorization. Reviews use no tools, have a 12-second deadline, and their decisions appear in the turn log and `/permissions`. Explicit policy rules and security guards remain in force. Targeted edits to existing user-owned temporary helper files can qualify as task-related scratch work when the host verifies file ownership and location; this does not authorize arbitrary temporary-file deletion or replacement. Model review is fallible; `ask` mode remains available when every ungranted action should be reviewed by you.
407
+ Terminal `--auto` mode runs routine work immediately and reviews other actions with the selected provider/model. Reads (`read_file`, `list_files`, `search_code`, read-only commands) run anywhere, outside the workspace included, and are recorded in the auto ledger; the exception is secrets and credentials (`~/.ssh`, `~/.aws`, `~/.bandit-keys`, `.env*`, keychains, cloud CLI credential folders, key material, `secrets.*`/`tokens.*`/`password.*` files), which ask in every mode. Writes and edits outside the workspace, network calls and destructive commands keep their rules. The reviewer considers the raw user requests in the current session, the proposed action and bounded local metadata. Requested cleanup can proceed without a blanket deletion prompt; uncertain effects or missing authorization still ask. External, system and irreversible actions need explicit authorization. Reviews use no tools, have a 12-second deadline, and their decisions appear in the turn log and `/permissions`. Explicit policy rules and security guards remain in force. Targeted edits to existing user-owned temporary helper files can qualify as task-related scratch work when the host verifies file ownership and location; this does not authorize arbitrary temporary-file deletion or replacement. Model review is fallible; `ask` mode remains available when every ungranted action should be reviewed by you.
400
408
 
401
409
  Interactive sessions expose `monitor_job`, `check_monitor`, and `cancel_monitor`. Ask the agent to monitor a particular run and specify its cadence and authorized response, for example: “Check this run every five minutes; if it fails, collect its logs and diagnose it.” The monitor returns immediately and uses a timer to run the approved status command. A terminal result resumes the agent, including when other jobs are still running. Follow-up actions go through the normal permissions gate.
402
410
 
@@ -582,6 +590,7 @@ bandit-agent --model qwen2.5-coder:32b
582
590
  - **Custom hooks** — your own `PreToolUse` shell scripts can veto any tool call; configure globally (`~/.bandit/settings.json`) or per-project.
583
591
  - **Workspace trust** — a repository's own `.bandit/settings.json` cannot run hooks, add allow rules or widen the permission mode until you run `bandit trust` in that folder (or set `BANDIT_TRUST_PROJECT_SETTINGS=1` in CI); see [the settings file](#settings-file--hooks-permissions-security-guard). A clone is read-only configuration until you say otherwise.
584
592
  - **Secret hygiene** — API keys are redacted in `/config` output and never logged. The optional [telemetry](#telemetry-opt-in) exporter sends no prompt or reply text, and runs the tool arguments it does send through secret redaction.
593
+ - **Secret masking in tool output** — command output, file contents, search results, MCP results and error text are masked before the model, the terminal, the session file, the turn log or telemetry see them: `‹redacted github token gho_…, 40 chars›`, with a `1 secret masked in this output` line under the result. Known token formats (GitHub, OpenAI/Anthropic/OpenRouter `sk-…`, AWS, Slack, Stripe, Burtson `bai_`, Google, Azure connection strings, PEM private keys, JWTs) and secret-named values in env/ini/yaml/json output are covered. Commands whose purpose is printing a credential (`gh auth token`, `gcloud auth print-access-token`, `kubectl config view --raw`, `security find-generic-password -w`, `op read`, `printenv`, …) ask in every mode and their output is masked even when you approve them; the card says so. To use a credential in a follow-up step, keep it in-process: `gh`, `aws`, `az`, `gcloud` and `kubectl` authenticate on their own, and in your shell `GH_TOKEN=$(gh auth token) gh api …` never prints the value. `BANDIT_NO_SECRET_REDACTION=1` turns pattern masking of ordinary output off for debugging; credential commands stay masked.
585
594
  - **Local sessions** — stored as JSONL under `~/.bandit/sessions/`. Inspect at any time.
586
595
  - **Turn logs** — each turn is logged to `<project>/.bandit/turns/` (your prompt, tool calls and short excerpts of tool output). When Bandit creates `.bandit/`, it writes `.bandit/.gitignore` so these logs, checkpoints and pasted images are not committed. It never overwrites an existing `.bandit/.gitignore`. If your project's `.bandit/` predates this, add `turns/` and `checkpoints/` to it yourself.
587
596