pub(crate) const BROWSER_DISPATCH_KEY_TOOL: &str = r#"{
"name": "BrowserDispatchKey",
"description": "Type into whatever currently has focus in your OWN AgentMux pane (browser pane or otherwise — this one works for any pane, same scoping as UIClick). Pass exactly one of `text` (inserted atomically, handles IME correctly — use this for typing strings) or `key` (a named key: Enter, Tab, Escape, Backspace, ArrowUp/Down/Left/Right, Space). Optionally pass `selector` to focus an element first — if you omit it, the currently-focused element must already be inside your own pane, or the call fails rather than typing into whatever else happens to have focus. Pass pane (from OpenBrowser) to act on a browser pane you opened; without it this acts on your own pane.",
"inputSchema": {
"type": "object",
"properties": {
"pane": { "type": "string", "description": "Optional: the pane id OpenBrowser returned, to act on a browser pane you opened instead of your own pane. Only panes you opened are accepted." },
"selector": { "type": "string", "description": "Optional CSS selector to focus before dispatching" },
"text": { "type": "string", "description": "Text to insert — mutually exclusive with key" },
"key": { "type": "string", "description": "Named key to dispatch — mutually exclusive with text. One of: Enter, Tab, Escape, Backspace, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Space" }
}
}
}"#;