Expand description
Subprocess-side tool dispatcher.
Maps each browser_* tool name to a BrowserPlugin::execute
flow without requiring an AgentContext (which the subprocess
cannot construct). Tool argument schemas live in
tool_defs.rs — keep the two in sync when adding or changing
a tool.
Functions§
- dispatch_
browser_ tool - Match
tool_nameagainst thebrowser_*tools and dispatch to the matchingBrowserPlugin::executeflow. Returns a JSONValueready to land in thetool.invokereply’sresultfield, orToolInvocationErrorfor the host’sRemoteToolHandlerdecoder. - resolve_
plugin_ or_ legacy - Resolve the
BrowserPluginthat should service thistool.invokecall. Four cases: - resolve_
plugin_ or_ legacy_ gated - Variant of
resolve_plugin_or_legacythat lets the caller opt out of the legacy per-agent_idfallback (dispatch case 3). Wired frommain.rs::on_toolvia [ProfileLimits::legacy_per_agent_enabled]. The 0.4.0 plan is to flip the env default so this off-path becomes the norm.