Files
oh-my-pi/packages/coding-agent/src/prompts/tools/bash.md
T
can1357 5ff277349c refactor(coding-agent): consolidated tool surface onto xd:// devices and hub
- Added the `xd://` virtual device protocol (`internal-urls/xd-protocol.ts`, `tools/xdev.ts`): tools declaring `loadMode: "discoverable"` are unmounted from the request tools array and driven via `read xd://` (list/docs+schema) and `write xd://<tool>` (execute), gated by the `tools.xdev` setting (default on) and inlined into the system prompt.
- Merged the `irc`, `job`, and `launch` tools into a single `hub` tool (`tools/hub/`, `async/job-manager.ts`): messaging keeps `send`/`inbox`/`list`, job control maps to `wait`/`cancel`/`jobs`, process supervision keeps `start`/`logs`/`stop`/`restart`/`describe` with `ps`, and the unified `wait` races background jobs against peer messages; SDK `IrcTool`/`JobTool`/`LaunchTool` are replaced by `HubTool`.
- Removed the hidden `resolve` tool in favor of the `xd://resolve`/`xd://reject`/`xd://propose` resolution devices, auto-including `write` whenever a deferrable tool or plan mode is present.
- Removed the BM25 tool-discovery system: the `search_tool_bm25` tool, the `tool-discovery` module, the `tools.discoveryMode`/`mcp.discoveryMode`/`mcp.discoveryDefaultServers`/`tools.essentialOverride` settings, per-tool MCP selection, and the `mcp_tool_selection` message type.
- Unified tool presentation on `ToolLoadMode` (`essential`|`discoverable`), replacing the custom-tool `xdev?: boolean` opt-out; custom, extension, MCP, RPC host, image-generation, and TTS tools now default to `discoverable`, and added a `satisfies` predicate to `SoftToolRequirement`.
- Removed the standalone `ssh` command tool and `ssh/ssh-executor` (the `ssh://` read/write/search protocol stays), and made `--tools` address hidden built-ins.
- Updated collab-web to render `xd://` dispatches and `hub` op families, dropped the `search_tool_bm25`/`ssh`/`report-finding` renderers, refreshed tool docs and prompts, and migrated the affected tests and changelogs.
2026-07-15 15:16:29 +02:00

2.0 KiB
Raw Blame History

Runs commands in a persistent shell session.

Use ONLY for: single binary call or short pipeline that COMPUTES a fact (wc -l, sort | uniq -c, comm, diff). {{#if hasLaunch}}Services, watchers, debuggers, REPLs → hub (op:"start").{{/if}} {{#if hasEval}}Inline scripts, heredocs, shell control flow, $(…), multi-stage pipelines, &&-chains, quote/JSON escaping → eval cells.{{else}}Inline scripts, heredocs, shell control flow, $(…), multi-stage pipelines, &&-chains → purpose-built tool or checked-in script.{{/if}}

- `cwd` sets working dir (not `cd dir && …`). `env: { NAME: "…" }` for multiline/quote-heavy values; `"$NAME"` to expand. - `pty: true` only for real terminal needs (`sudo`, `ssh`); default `false`. - Multiple calls run concurrently; NEVER split order-dependent commands — chain with `&&` in one call (`;` only to continue past failure). - Internal URIs (`skill://`, `agent://`, …) auto-resolve to FS paths. {{#if asyncEnabled}}- `async: true` defers reporting for finite commands needing no later input.{{/if}} {{#if hasGrep}}- NEVER shell out to search: `grep`/`rg` → built-in `grep`.{{/if}} {{#if hasRead}}{{#if hasGlob}}- NEVER use `ls` or `find` — `ls` → `read`, `find` → `glob`. NON-NEGOTIABLE.{{/if}}{{/if}} - Avoid head/tail/redirections: stderr merged, output auto-truncated, full capture at `artifact://`. {{#if hasLaunch}}- NEVER launch daemons/watchers/servers/debuggers/REPLs through bash — use `hub` (`op:"start"`).{{/if}}

{{#if asyncEnabled}}- timeout: nonzero clamped 1–3600, killed on elapse. async: true defers reporting only, doesn't extend timeout.{{/if}} {{#if autoBackgroundEnabled}}- Long foreground calls may auto-background; result arrives as follow-up — NOT a failure. Need inline? Raise timeout{{#if asyncEnabled}} or async: true{{/if}}.{{/if}}

  • Long output truncated, test/lint filtered to failures. Footer links full capture. No footer = what you see is exact output.