Expand description
locode-host — the one place the system touches the OS (ADR-0008).
Every side effect funnels through the Host: a path jail, shell execution with a
timeout + output cap, jailed filesystem helpers, and the shared
post-processes. Tools never call std::fs/Command directly —
they go through a Host. This crate is a sibling of locode-tools, so it defines
its own plain error types; the harness pack (which depends on both) maps them to
ToolError::Respond.
Structs§
- DirEntry
- One entry in a directory listing.
- Exec
Limits - Limits on shell execution. Defaults mirror Grok Build (the primary model).
- Exec
Output - The captured result of a command (completed, timed out, or cancelled).
- Exec
Request - A command to run through the host’s shell.
- File
Read - A file’s contents plus its stat (the stat is the freshness token edits compare).
- File
Stat - A file’s size and last-modified time.
- Host
- The injectable side-effect seam (ADR-0008). Construct once per session, share behind
an
Arc; holds the jail root + policy and the exec/truncation limits. - Host
Config - Construction-time configuration for a
Host.
Enums§
- Exec
Error - A failure to spawn or capture — not a failed command (that is a successful capture
with a non-zero
exit_code). - FsError
- A filesystem operation failure.
- Path
Error - A path-jail failure.
- Path
Policy - Whether the filesystem tools are jailed to the workspace root (ADR-0008 amendment).
Functions§
- rg_
program - The ripgrep program to invoke: the
LOCODE_RG_PATHoverride, else barergon PATH (invoked by name — PATH-hijack hygiene, per Claude Code).