class

Smith::Tools::Registry

Inherits Reference < Object

Constructors

default(approver : Approver = AutoApprover.new, todos : Smith::TodoList = Smith::TodoList.new, jobs : BashJobs | Nil = nil, bash_timeout : Int32 = Bash::DEFAULT_TIMEOUT, max_output_bytes : Int32 = Bash::MAX_OUTPUT_BYTES, web_allow_private : Bool = false, web_max_bytes : Int32 = WebFetch::DEFAULT_MAX, search : Smith::Web::SearchProvider | Nil = nil) : Registry

Factory helper to register default standard toolset.

todos defaults to a fresh list for the same reason approver defaults to allowing everything: the Registry stays usable as a plain library component. Callers that want to observe or persist the plan — the CLI — pass their own list in.

Source
new(approver : Approver = AutoApprover.new, hooks : Smith::Hooks::Runner = Smith::Hooks::Runner.new)
Source

Instance methods

approver

Defaults to allowing everything so Registry stays usable as a plain library component. Callers that have a user in front of them — the CLI — must attach a real approver.

Source
approver=(approver : Approver)

Defaults to allowing everything so Registry stays usable as a plain library component. Callers that have a user in front of them — the CLI — must attach a real approver.

Source
checkpoints

Snapshots taken before a mutating call, so a run can be undone. nil leaves the registry exactly as it was.

Source
checkpoints=(checkpoints : Smith::Checkpoints::Store | Nil)

Snapshots taken before a mutating call, so a run can be undone. nil leaves the registry exactly as it was.

Source
execute_call(name : String, args : JSON::Any) : String
Source
execute_calls(calls : Array(CallRequest)) : Array(Smith::LLM::ContentBlock)

Executes a batch of tool requests. Runs adjacent parallel-safe tools concurrently via Fibers.

Source
get(name : String) : Tool | Nil
Source
hooks

Same reasoning as approver: an empty runner keeps Registry usable as a plain library component, and the CLI attaches the configured one.

Source
hooks=(hooks : Smith::Hooks::Runner)

Same reasoning as approver: an empty runner keeps Registry usable as a plain library component, and the CLI attaches the configured one.

Source
register(tool : Tool)
Source
specs
Source
unregister(name : String) : Bool

Used by the mode switch, which registers exit_plan_mode only while plan mode is active. Returns whether anything was actually removed.

Source