pub(crate) const RUN_COMMAND_TOOL: &str = r#"{
"name": "RunCommand",
"description": "Run a keyboard shortcut's command (an id from ListShortcuts, e.g. split:right, tab:new, files:refresh) as if its key were pressed, in the window that holds your own pane. Pass target to focus a pane anywhere in that window first (it switches to the pane's tab); without it the command acts on the focused pane. A pane's own commands (files:*, editor:*, doctab:*, term:copy/paste/clear) need that pane focused or targeted. Commands keep the protections a user has: tab:close asks before closing, files:trash can be undone. pane:close needs target, and closes that pane the way ClosePane does: a pane you're in closes at once, another agent's pane waits 15 seconds for its user to keep it (the answer says it's pending). term:paste is refused when the clipboard has a line break and the shell hasn't turned on bracketed paste, since pasting would run that line. files:deletePermanently is refused (it can't be undone). Returns whether it ran, and why not if it didn't.",
"inputSchema": {
"type": "object",
"properties": {
"command": { "type": "string", "description": "Command id from ListShortcuts" },
"target": { "type": "string", "description": "Optional: id of a pane in your window, in any tab, or of one of a pane's tabs, to focus first: the window switches to that tab and the pane shows it" }
},
"required": ["command"]
}
}"#;