Expand description
Axum route handlers for /agentmux/browser/*.
Functions§
- authorized 🔒
- back
POST /agentmux/browser/back— walk the pane’s history one step back. Routed through CDP (Page.goBack) rather thanBrowserPaneManager::go_backto keep the resolver cache honest: the target URL changes after the hop, so we invalidate the cache entry.- click_
element POST /agentmux/browser/click_element— synthesize a real mouse click on the first element matchingselector. DispatchesInput.dispatchMouseEvent(mousePressed + mouseReleased) at the element’s centroid.- dispatch_
key POST /agentmux/browser/dispatch_key— send text or a named key to whatever has focus in the pane. Optionally focuses a selector first.- eval
POST /agentmux/browser/eval— run arbitrary JS in the pane’s renderer, return the serialized value.- focus_
element POST /agentmux/browser/focus_element— call.focus()on the first matching element. Does not synthesize a mouse event; useclick_elementwhen you want the full mouse-gesture semantics.- focus_
info POST /agentmux/browser/focus_info— report the currentdocument.activeElementof the pane as anElement. See §5.2.- forward
POST /agentmux/browser/forward— walk the pane’s history one step forward. Seebackfor the target-cache rationale.- navigate
POST /agentmux/browser/navigate— navigate the pane to a new URL via CDPPage.navigate. (We could callBrowserPaneManager::navigatedirectly, but routing through CDP keeps the resolver’s URL cache consistent — a subsequent request will re-probe/jsonif the target id changes.)- ok_body 🔒
- open_
cdp_ 🔒for_ block - query
POST /agentmux/browser/query— find DOM elements matching a CSS selector in the specified pane. SeeSPEC_BROWSER_DOM_API.md§5.2 for response shape.- reload
POST /agentmux/browser/reload— reload the current page.ignore_cache(default false) maps to the CDP flag — true is the equivalent of Ctrl+F5 (bypass the http cache). The pane’s current URL is preserved, so no target-cache invalidation is needed.- screenshot
POST /agentmux/browser/screenshot— capture a PNG of the pane’s rendered viewport. Uses CDPPage.captureScreenshot.