- Implement the OMP Browser Relay extension with WebSocket communication and CDP RPC execution. - Add browser relay server, daemon management, and bridge multiplexing in the coding agent. - Introduce CLI commands and settings schema options for configuring and installing the relay. - Add utility functions and test suites supporting environment parsing and relay lifecycle handling.
2.5 KiB
Drives real Chromium tab; full puppeteer access via JS.
- Static content? `read` the URL. Browser only for JS execution, auth, interactive actions. - `open` → `run` — tabs survive calls and subagents, open once reuse. - `run` scope: `page`, `browser`, `tab`, `display`, `assert`, `wait` available. `wait(fn)` polls until truthy — use instead of polling inside `tab.evaluate`.-
tabhelpers (drop to raw puppeteerpagefor anything uncovered): Element handles:tab.ref("e5")/tab.id(n)return a handle you call methods on directly —(await tab.id(n)).click(). Handles are NOT selectors:tab.click/type/fill/waitFor*take STRING selectors only. Snapshot refs work in any selector slot:tab.click("e5")≡tab.click("aria-ref=e5"). Simple:tab.goto,tab.click,tab.type,tab.fill,tab.press,tab.scroll,tab.scrollIntoView,tab.drag,tab.uploadFile,tab.select,tab.screenshot,tab.extract,tab.evaluate. Screenshots:tab.screenshot({ selector?, fullPage?, silent? })saves tobrowser.screenshotDir, or OS temp when unset, then returns the path. It NEVER accepts a path. Waits:tab.waitFor,tab.waitForSelector,tab.waitForUrl,tab.waitForResponse,tab.waitForNavigation. Snapshots:tab.observe()→ accessibility tree;tab.ariaSnapshot()→ ARIA YAML with[ref=eN].Gotchas:
tab.fillNEVER works for<select>— usetab.select.tab.waitForNavigationmust start BEFORE the trigger click.- Navigation and re-renders (virtualized lists, SPA updates) invalidate ids/refs — re-observe or re-snapshot, then act in the same cell.
- Stalled actions fail fast with named error, never whole-cell timeout.
- Raw request interception is run-scoped: run end removes
requesthandlers, disables interception, releases held requests.
-
app.path→ NEVER tamper with a real desktop app (no stealth patches). -
app.relay: true→ drive the user's own Chrome tabs via the omp browser relay (auto-started; needs the OMP Browser Relay extension installed).app.targetpicks a tab by URL/title substring; without it the visible tab is adopted without stealing focus. -
Selectors: CSS + puppeteer
aria/…,text/…,xpath/…,pierce/…. Playwright-only pseudos (:has-text(),:visible) are REJECTED.