Skip to main content

register_into

Function register_into 

Source
pub fn register_into(config: &Config, registry: &mut ToolRegistry)
Expand description

Register every trusted, loaded plugin tool into registry — the single production choke point crate::agent::Agent::with_parts calls (so every Agent construction path gets plugin tools “for free”, the same way crate::lsp/crate::formatters/crate::checkpoint’s observers are wired unconditionally from crate::agent::build_tool_context). A no-op, with nothing printed, when crate::Config::plugins_enabled is false (default-off byte-identity). When enabled but not yet trusted, prints ONE line to stderr (never silent — see PluginLoadOutcome::BlockedPendingTrust’s doc comment) and registers nothing. When loaded, registers every tool and prints a one-time-per-call warning for any hook a trusted plugin declared (see the module doc comment’s “Honest, deliberate gaps” section) plus any manifest parse warning.