Expand description
Sandboxed filesystem and process tools for the Paigasus Helikon AI SDK.
This crate provides agent Tools that
operate inside a Sandbox — a directory opened as an OS-confined
capability (cap-std), so ReadTool, WriteTool, and EditTool
cannot escape it via .., absolute paths, or symlinks.
§Containment and BashTool
BashTool runs commands through a pluggable ExecutionBackend, so its
containment depends on the backend it is given. HostBackend (the default)
is a cwd-pinned shell and NOT a security boundary — the cap-std
containment that jails the filesystem tools does not extend to a spawned
child process, which can read and write anything this process can (absolute
paths, .., ~, and the network). With no
PermissionPolicy installed the
control layer is permissive, so a host-backed BashTool runs ungated —
pair it with a PermissionPolicy or DenyRule::tool("Bash"). The
OsSandboxBackend (behind the os-sandbox feature) instead enforces
containment at the OS layer — on Linux via Landlock + seccomp (filesystem
reads/writes + syscalls + network), on macOS via Seatbelt (sandbox-exec;
write-only filesystem containment + an all-or-nothing network toggle). Each
backend reports what it enforces via ExecutionBackend::guarantees, surfaced
in the tool’s description.
Structs§
- Bash
Tool - A shell tool backed by a pluggable
ExecutionBackend. - Bash
Tool Builder - Builder for
BashTool. Obtain one viaBashTool::builder. - Edit
Tool - Replace an exact string in a sandbox file. Refuses (does not guess) when
old_stringis missing or ambiguous. - Exec
Output - The captured result of one command run. Non-zero exit, timeout, and truncation are normal results the model inspects — never errors.
- Exec
Request - A request to run one shell command.
#[non_exhaustive]so per-call knobs (stdin, env overrides) can be added later without a breaking change. - Host
Backend - The default, cwd-pinned execution backend. See the module docs: not a security boundary.
- Host
Backend Builder - Builder for
HostBackend. - Read
Tool - Read a UTF-8 text file relative to the sandbox root, optionally windowed by
line. Read-only; allowed under
Planmode. - Resource
Limits - Resource limits applied to a command via
setrlimit(unix). EachNoneleaves the inherited limit. SeeHostBackendfor the default policy. - Sandbox
- A directory opened as an OS-confined capability. Filesystem operations
performed through this handle are resolved relative to the root and cannot
escape it (
.., absolute paths, and escaping symlinks are rejected). - Sandbox
Guarantees - What a backend enforces, surfaced to docs / traces / the tool description.
- Write
Tool - Create or overwrite a file relative to the sandbox root, creating parent directories inside the sandbox as needed.
Enums§
- Isolation
- The isolation level enforced on one axis (filesystem / network / syscalls).
- Sandbox
Error - Errors from constructing a
Sandbox. In-invokeboundary violations usepaigasus_helikon_core::ToolError::Denied, not this type.
Traits§
- Execution
Backend - A backend that runs one shell command under some containment tier.