import type { CommandSpec } from '../args' import { GLOBAL_FLAGS } from '../args' export const BROWSER_BASIC_COMMAND_SPECS: CommandSpec[] = [ { path: ['snapshot'], summary: 'Capture an accessibility snapshot of the active browser tab', usage: 'orca snapshot [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'worktree'] }, { path: ['screenshot'], summary: 'Capture a viewport screenshot of the active browser tab', usage: 'orca screenshot [--format ] [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'format', 'worktree'] }, { path: ['click'], summary: 'Click a browser element by ref', usage: 'orca click --element [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'element', 'worktree'] }, { path: ['fill'], summary: 'Clear and fill a browser input by ref', usage: 'orca fill --element --value [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'element', 'value', 'worktree'] }, { path: ['type'], summary: 'Type text at the current browser focus', usage: 'orca type --input [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'input', 'worktree'] }, { path: ['select'], summary: 'Select a dropdown option by ref', usage: 'orca select --element --value [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'element', 'value', 'worktree'] }, { path: ['scroll'], summary: 'Scroll the browser viewport', usage: 'orca scroll --direction [--amount ] [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'direction', 'amount', 'worktree'] }, { path: ['goto'], summary: 'Navigate the active browser tab to a URL', usage: 'orca goto --url [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'url', 'worktree'] }, { path: ['back'], summary: 'Navigate back in browser history', usage: 'orca back [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'worktree'] }, { path: ['reload'], summary: 'Reload the active browser tab', usage: 'orca reload [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'worktree'] }, { path: ['eval'], summary: 'Evaluate JavaScript in the browser page context', usage: 'orca eval --expression [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'expression', 'worktree'] }, { path: ['wait'], summary: 'Wait for element, text, URL, load state, JS condition, or timeout', usage: 'orca wait [--selector ] [--timeout ] [--text ] [--url ] [--load ] [--fn ] [--state ] [--worktree ] [--json]', allowedFlags: [ ...GLOBAL_FLAGS, 'selector', 'timeout', 'text', 'url', 'load', 'fn', 'state', 'worktree' ] }, { path: ['check'], summary: 'Check a checkbox/radio by ref', usage: 'orca check --element [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'element', 'worktree'] }, { path: ['uncheck'], summary: 'Uncheck a checkbox/radio by ref', usage: 'orca uncheck --element [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'element', 'worktree'] }, { path: ['focus'], summary: 'Focus a browser element by ref', usage: 'orca focus --element [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'element', 'worktree'] }, { path: ['clear'], summary: 'Clear an input element by ref', usage: 'orca clear --element [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'element', 'worktree'] }, { path: ['select-all'], summary: 'Select all text in an input by ref', usage: 'orca select-all --element [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'element', 'worktree'] }, { path: ['keypress'], summary: 'Press a key (Enter, Tab, Escape, ArrowDown, etc.)', usage: 'orca keypress --key [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'key', 'worktree'] }, { path: ['pdf'], summary: 'Export the active browser tab as PDF', usage: 'orca pdf [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'worktree'] }, { path: ['full-screenshot'], summary: 'Capture a full-page screenshot (beyond viewport)', usage: 'orca full-screenshot [--format ] [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'format', 'worktree'] }, { path: ['hover'], summary: 'Hover over a browser element by ref', usage: 'orca hover --element [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'element', 'worktree'] }, { path: ['drag'], summary: 'Drag from one element to another', usage: 'orca drag --from --to [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'from', 'to', 'worktree'] }, { path: ['upload'], summary: 'Upload files to a file input element', usage: 'orca upload --element --files [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'element', 'files', 'worktree'] }, { path: ['tab', 'list'], summary: 'List open browser tabs', usage: 'orca tab list [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'worktree'] }, { path: ['tab', 'switch'], summary: 'Switch the active browser tab', usage: 'orca tab switch (--index | --page ) [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'index', 'worktree'] }, { path: ['tab', 'create'], summary: 'Create a new browser tab in the current worktree', usage: 'orca tab create [--url ] [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'url', 'worktree'] }, { path: ['tab', 'profile', 'list'], summary: 'List browser session profiles available to browser tabs', usage: 'orca tab profile list [--json]', allowedFlags: [...GLOBAL_FLAGS] }, { path: ['tab', 'profile', 'create'], summary: 'Create a browser session profile for browser tabs', usage: 'orca tab profile create --label [--scope ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'label', 'scope'] }, { path: ['tab', 'profile', 'delete'], summary: 'Delete a browser session profile used by browser tabs', usage: 'orca tab profile delete --profile [--json]', allowedFlags: [...GLOBAL_FLAGS, 'profile'] }, { path: ['tab', 'close'], summary: 'Close a browser tab', usage: 'orca tab close [--index ] [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'index', 'worktree'] }, { path: ['exec'], summary: 'Run any agent-browser command against the active browser tab', usage: 'orca exec --command "" [--worktree ] [--json]', allowedFlags: [...GLOBAL_FLAGS, 'command', 'worktree'] } ]