Skip to main content

Crate leviath_tools

Crate leviath_tools 

Source
Expand description

Native built-in tools for Leviath agents.

Provides file system and shell tools sandboxed to a working directory.

Re-exports§

pub use validate::*;

Modules§

validate
Structural validation of tool-call arguments against declared schemas.

Structs§

BuiltinTools
Built-in tools: read_file, write_file, edit_file, list_dir, shell.
PlatformCapabilities
The set of ToolCapabilitys the current platform provides.
ProcessGroupReaper
SIGKILLs a shell’s whole process group when dropped.
ShellEnvPolicy
The resolved [security] shell_env decision for one run.
ToolContext
Context for tool execution - defines the sandbox root.

Enums§

ToolCapability
A platform feature a built-in tool depends on.

Constants§

SUBAGENT_TOOLS
The tool names routed to the sub-agent handler (they run against the daemon’s agent engine, not the builtin/MCP executors). One list, shared by the CLI’s dispatch routing and the runtime’s crash-replay synthesis, so the two can’t drift.
SUBMIT_OUTPUT_TOOL
The tool an agent calls to hand back the run’s final output.
TOOL_ALIASES
Alias → canonical built-in tool name.

Traits§

ShellExecutor
Redirects shell command execution off the host into a sandbox.

Functions§

canonical_tool_name
Resolve name through TOOL_ALIASES to its canonical built-in name.
child_command
Build a child-process command with no console window.
is_null_device
Is path the platform’s discard device?
is_subagent_tool
Whether name is a sub-agent tool.
own_process_group
Put cmd in its own process group, so the whole command tree can be signalled as one. leviath_sys::configure_detached does this for a std::process::Command; the tool lane uses tokio’s, which has its own (Unix-only) setter. A no-op where the platform has no process groups - there, killing the direct child is all that exists.
submit_output_description
The submit_output tool’s description, built from the output shape resolved for the stage rather than fixed at compile time.
tool_name_spellings
Every name that refers to the same tool as name: the name itself, its canonical form, and every alias of that canonical form.
tool_required_capabilities
The capabilities a built-in tool requires to function.