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.

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.
ToolContext
Context for tool execution - defines the sandbox root.

Enums§

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

Constants§

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.
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.
tool_required_capabilities
The capabilities a built-in tool requires to function.