Skip to main content

Module dispatch

Module dispatch 

Source
Expand description

Subprocess-side tool dispatcher.

Replicates the per-tool logic from proyecto/crates/plugins/browser/src/tool.rs::Browser*Tool::call without requiring an AgentContext (which the subprocess cannot construct). Each branch matches the in-tree behaviour 1:1; the goal is bit-for-bit parity, not feature evolution.

When the in-tree tool.rs gains new args / behaviours, mirror the change here. Same applies to tool_defs.rs for the schema. CI lint follow-up 81.17.c.tool-defs-drift-test validates that this file stays in sync.

Functions§

dispatch_browser_tool
Match tool_name against the 12 browser_* tools and dispatch to the matching BrowserPlugin::execute flow. Returns a JSON Value ready to land in the tool.invoke reply’s result field, or ToolInvocationError for the host’s RemoteToolHandler decoder.