atd-tools-shell
Built-in shell tools for the ATD (Agent Tool Dispatch) reference runtime.
Tools provided
| Tool id | Struct | Purpose |
|---|---|---|
ref:shell.exec |
ShellExecTool |
Run a command via /bin/sh -c (Unix) or cmd /C (Windows). |
ref:shell.pwsh |
ShellPwshTool |
Run a command via pwsh -NoProfile -Command, when PowerShell is available. |
Both tools enforce a timeout (SIGTERM → grace → SIGKILL on Unix), a hard byte
cap on stdout/stderr, and the runtime's capability gate. They return
{exit_code, stdout, stdout_truncated, stderr, stderr_truncated, duration_ms}
— a nonzero exit_code is a normal business result, not a tool error.
Timeouts and a missing shell are errors (success: false).
Usage
Pair this crate with atd-runtime:
use ;
use Registry;
use Arc;
let mut registry = new;
registry.register;
registry.register;
Or get them preregistered via
atd-ref-server.
For the pattern behind writing your own tool, see
atd-tools-echo — the documented template.
License
Apache-2.0.