core/registry
Tool registry and dispatch. All tools are registered here and exposed to the conversation loop.
Values
pub fn all_tools(
conn: sqlight.Connection,
user_key: String,
) -> List(tool.Tool)
All available tools (auto-deny approval). Requires DB connection for memory tool.
pub fn all_tools_with_approval(
conn: sqlight.Connection,
user_key: String,
on_approval: fn(String, String) -> Bool,
) -> List(tool.Tool)
All available tools with a custom bash approval callback.
pub fn dispatch_from(
tools: List(tool.Tool),
name: String,
args_json: String,
) -> Result(String, String)
Dispatch a tool call from a custom tool list.
pub fn find_in(
tools: List(tool.Tool),
name: String,
) -> Result(tool.Tool, String)
Look up a tool by name from a custom tool list.
pub fn schemas_from(tools: List(tool.Tool)) -> List(json.Json)
Return just the JSON schemas from a custom tool list.
pub fn to_definitions_from(
tools: List(tool.Tool),
) -> List(completions.ToolDefinition)
Convert a custom tool list to ToolDefinition for the completions API.