pub struct BuiltinTools { /* private fields */ }Expand description
Built-in tools: read_file, write_file, edit_file, list_dir, shell.
Carries the PlatformCapabilities of the current platform; tools whose
tool_required_capabilities aren’t satisfied are dropped from
tool_defs, names, and rejected by
execute.
Implementations§
Source§impl BuiltinTools
impl BuiltinTools
Sourcepub fn tool_defs(&self) -> Vec<Tool>
pub fn tool_defs(&self) -> Vec<Tool>
All tool definitions to advertise to the LLM, minus any whose required platform capabilities aren’t provided by the current platform.
Sourcepub fn subagent_tool_defs() -> Vec<Tool>
pub fn subagent_tool_defs() -> Vec<Tool>
Tool definitions for sub-agent management tools.
These are advertised to the LLM but executed externally (by the CLI’s tool registry) since they require access to the AgentEngine.
Sourcepub fn subagent_tool_names() -> Vec<String>
pub fn subagent_tool_names() -> Vec<String>
Names of sub-agent tools.
Sourcepub fn names(&self) -> Vec<String>
pub fn names(&self) -> Vec<String>
Names of all built-in tools, including every alias in TOOL_ALIASES.
Aliases are included so tool-call dispatch recognizes a call arriving under an alias name as a built-in; the canonical names are what get advertised to the model.
Source§impl BuiltinTools
impl BuiltinTools
Source§impl BuiltinTools
impl BuiltinTools
Sourcepub fn new(ctx: ToolContext) -> Self
pub fn new(ctx: ToolContext) -> Self
Create a new BuiltinTools instance with the given sandbox context, filtering tools against the current platform’s capabilities.
Sourcepub fn with_shell_executor(self, executor: Arc<dyn ShellExecutor>) -> Self
pub fn with_shell_executor(self, executor: Arc<dyn ShellExecutor>) -> Self
Route this agent’s shell execution through executor (a container /
namespace sandbox) instead of the host.
Sourcepub fn with_capabilities(
ctx: ToolContext,
platform: PlatformCapabilities,
) -> Self
pub fn with_capabilities( ctx: ToolContext, platform: PlatformCapabilities, ) -> Self
Create a BuiltinTools instance with an explicit platform capability set, for tests or hosts that need to override the compile-time default.