git:20260322.2adc424 to git:20260911.e6b5e6c

70 added, 152 removed. Audit A to A.

What this update changes in the checks

No check changed: every fixed check gives the same answer before and after this update.

A tripped check is a label, not a verdict: read the matched text and the lines below. This week's updates that newly trip a check.

---
name: browser-agent
- description: Control a real browser via Oya Browser MCP tools. Use this skill when the user asks you to browse the web, interact with websites, fill forms, scrape data, or automate browser tasks. Provides the mental model and strategies for effective browser automation through structured markdown and numbered element IDs.
+ description: Drive real Chrome browsers through Oya Browser. Start a browser on Oya Cloud, Browserbase, Steel, Anchor or Browser Use under a persistent persona, read pages as markdown with numbered elements, click and type, solve CAPTCHAs and MFA, and hand off to a human when needed. Use when the user asks to browse a site, automate a web task, fill a form, log in somewhere, scrape, or run several browsers at once. Works through the Oya MCP tools (start_browser, analyze_page, click, type…), the `oya` CLI, or the @oya-ai/browser SDK.
---
- You have access to a real Chrome browser through Oya Browser MCP tools. The browser has real cookies, logins, extensions — sites see a real user, not a bot. You control it through structured commands, not raw HTML or CSS selectors.
-
- ## Core Mental Model
-
- The browser gives you pages as **structured markdown with numbered interactive elements**. You act by referencing element numbers:
-
- ```
- [#9 input:text placeholder="Search"] → type(9, "query")
- [#13 button "Google Search"] → click(13)
- [#4 link "Images" → /images] → click(4)
- ```
-
- **You never write CSS selectors, XPath, or pixel coordinates** (unless using coordinate tools for precise clicks). You analyze the page, read the markdown, and act by element ID.
-
- ## Workflow
-
- Every browser task follows this loop:
-
- 1. **Navigate** — go to the URL
- 2. **Analyze** — call `analyze_page` to see the page as markdown with numbered elements
- 3. **Act** — click, type, scroll, press keys using element IDs
- 4. **Re-analyze** — after actions that change the page (clicks, form submissions, scrolls), analyze again to see the new state
- 5. **Repeat** until the task is done
-
- **CRITICAL**: Always call `analyze_page` after navigation or significant interactions. Element IDs change between analyses. Never assume an old ID is still valid.
-
- ## Available Tools
-
- ### Page Understanding
- - **`analyze_page()`** — Returns full page as markdown with `[#id type "label"]` annotations. Always start here.
- - **`screenshot()`** — Capture visible viewport as PNG. Use when you need to verify visual state or when markdown isn't enough.
- - **`read_elements(selector?, limit?)`** — Lighter than analyze_page, returns element metadata without full markdown.
-
- ### Navigation
- - **`navigate(url)`** — Go to a URL. Wait for page load automatically.
- - **`scroll(direction, amount?)`** — Scroll `"up"` or `"down"` by N pixels (default 500). Returns updated page analysis.
- - **`wait(selector, timeout?)`** — Wait for a CSS selector to appear (max 10s default).
+ # Oya Browser
- ### Element Interaction
- - **`click(element_id)`** — Click an element by its ID from `analyze_page`. Scrolls element into view automatically.
- - **`type(element_id, text)`** — Clear field and type text into an input/textarea/contenteditable.
- - **`press_key(key)`** — Press Enter, Escape, Tab, ArrowDown, ArrowUp, Backspace, or any key.
+ Oya gives you real Chrome browsers behind one API. Each browser runs as a **persona**: a fingerprint, cookie jar and proxy that stay the same across runs, so a site sees the same device every time. You drive it by page structure, not selectors: read the page as markdown with numbered elements, then act on the numbers.
- ### Mouse & Keyboard (Low-Level)
- - **`click_coordinates(x, y)`** — Click at exact pixel position. Use with screenshot when element IDs don't work.
- - **`mouse_move(x, y)`** — Hover without clicking. Triggers tooltips, dropdown menus, hover states.
- - **`double_click(element_id?, x?, y?)`** — Double-click by element ID or coordinates. For text selection, file opening.
- - **`keyboard_type(text)`** — Type into whatever is currently focused. No element targeting.
- - **`drag(from_x, from_y, to_x, to_y)`** — Drag between two points. For sliders, drag-and-drop, range selection.
+ ## Setup (once)
- ### Tab Management
- - **`list_tabs()`** — Show all open tabs with IDs.
- - **`open_tab(url?)`** — Open new tab, optionally navigating to URL.
- - **`switch_tab(tab_id)`** — Switch to a tab by ID.
- - **`close_tab(tab_id?)`** — Close a tab (default: active tab).
+ 1. The user needs an API key from https://browser.getoya.ai (Dashboard → API keys). Ask for it; never invent one.
+ 2. `export OYA_API_KEY=...` — the CLI and SDK read it.
+ 3. Use whichever interface you have:
+ - **MCP tools** (best inside an agent). If they are missing, the user can add them:
+ `claude mcp add --transport http oya https://browser.getoya.ai/mcp/pool --header "Authorization: Bearer $OYA_API_KEY"`
+ - **CLI**: `npm install -g @oya-ai/cli`
+ - **SDK**, in code: `npm install @oya-ai/browser`
- ### Pool (Multi-Browser)
- - **`pool_status()`** — Show connected browsers in the pool.
+ ## Over MCP
- ## Strategy Guide
+ 1. `start_browser` — starts a browser and makes every other tool drive it. Optional: `persona` (`"auto"`, `"default"` or an id), `provider`, `url`.
+ 2. `navigate(url)`, then `analyze_page()`.
+ 3. Act: `click(element_id)`, `type(element_id, text)`, `press_key(key)`, `scroll(direction, amount?)`.
+ 4. `analyze_page()` again after anything that changes the page. Element ids are reassigned on every analysis.
+ 5. `stop_browser()` when you are done. A running browser costs money.
- ### Reading `analyze_page` Output
+ Also available: `screenshot`, `wait(selector)`, `click_coordinates(x, y)`, `mouse_move(x, y)`, `double_click`, `keyboard_type(text)`, `drag`, `pool_status`.
- The output has two parts:
+ If a tool says no browser is running, call `start_browser`. If `pool_status` already lists browsers (the user's desktop app, say), you can drive those without starting one.
- **1. Header** — metadata about the page:
- ```
- ---
- url: https://example.com
- title: Example
- viewport: 1280x720
- scroll: 0% (0px / 3200px)
- elements: 47 total, 23 visible
- ---
- ```
+ ## Over the CLI
- **2. Body** — full page as markdown with inline element annotations:
+ ```bash
+ oya start --persona auto # prints the browser id
+ oya goto https://example.com # newest browser; --id <id> picks one
+ oya ask "Find the pricing page and summarize the plans" # needs a model, set with `oya init`
+ oya status # health and recent commands
+ oya open # the live view, for a human
+ oya rm <id> # stop it; `oya rm --all` stops everything
```
- # Welcome to Example
- [#1 link "Home" → /] [#2 link "About" → /about] [#3 link "Login" → /login]
+ Add `--json` to any command for machine-readable output.
- ## Search
- [#9 input:text placeholder="Search..."]
- [#10 button "Search"]
+ ## In code (SDK)
- ## Results
- - [#11 link "First result" → /result/1]
- - [#12 link "Second result" → /result/2]
- ```
+ ```ts
+ import { Oya } from "@oya-ai/browser";
- **3. Element Index** — grouped by visibility:
- ```
- ### Visible
- [#9] input: Search...
- [#10] button: Search
- ### Off-screen (scroll to reveal)
- [#35] link: Footer link
+ const oya = new Oya(); // reads OYA_API_KEY
+ const browser = await oya.browser.start({ persona: "auto", captcha: "auto" });
+ try {
+ await browser.goto("https://example.com");
+ const { markdown, elements } = await browser.analyze();
+ const link = elements.find((e) => e.visible && e.text?.includes("More information"));
+ if (link) await browser.click(link.id);
+ } finally {
+ await browser.stop();
+ }
```
- ### Handling Common Patterns
+ `browser.cdpUrl` connects Playwright or Puppeteer: `chromium.connectOverCDP(browser.cdpUrl)`.
- **Forms**: Find the input elements, type into each, then click submit:
- ```
- analyze_page → find [#5 input:email], [#6 input:password], [#7 button "Sign in"]
- type(5, "user@example.com")
- type(6, "password123")
- click(7)
- ```
+ ## Reading analyze_page
- **Dropdowns/Selects**: Click to open, then click the option:
- ```
- click(dropdown_id)
- analyze_page → find the option elements that appeared
- click(option_id)
- ```
+ A header (url, title, viewport, scroll position, element counts), the page as markdown with elements inline, then an index split into visible and off-screen:
- **Infinite scroll**: Scroll down, re-analyze to see new content:
```
- scroll("down", 800)
- → returns updated analysis with new elements
+ [#9 input:text placeholder="Search"] → type(9, "query")
+ [#13 button "Search"] → click(13)
+ [#4 link "Pricing" → /pricing] → click(4)
```
- **Modals/Dialogs**: When a modal is open, `analyze_page` automatically scopes to the modal content. The header will say `modal: "dialog name"`.
-
- **Pagination**: Look for "Next", "More", or page number links in the element index.
-
- ### Site-Specific Tips
-
- **LinkedIn**:
- - Feed posts use `data-urn` attributes — the analyzer detects these
- - Messaging opens with `aria-hidden` on main content — the analyzer handles this
- - Use the search bar input, type query, press Enter
- - Connection buttons: look for "Connect" or "Follow" button elements
-
- **X (Twitter)**:
- - Tweet compose: click the "Post" or compose area, then type
- - Interactions: like/retweet/reply buttons detected via `data-testid`
- - Thread navigation: click "Show replies" or individual tweets
-
- **Reddit**:
- - Uses web components (`<shreddit-post>`) — the analyzer traverses shadow DOM
- - Vote buttons and comment links are properly detected
- - Subreddit navigation: use the search or navigate directly
+ Off-screen elements need a `scroll` first. While a modal is open, the analysis is scoped to it.
- **HackerNews**:
- - Layout tables are handled as containers (not data tables)
- - Vote arrows show as `[#N button "upvote"]`
- - Comment reply links show as `[#N link "reply to username"]`
- - Comment links show context: `[#N link "189 comments" on "Post Title"]`
+ ## Patterns
- **Amazon**:
- - Product cards detected via `data-asin` and `data-cel-widget`
- - Search: type in the search box, press Enter
- - Add to cart: find the "Add to Cart" button element
+ - **Forms**: type into each field, click submit, then analyze to confirm it worked.
+ - **Dropdowns**: click to open, analyze, click the option.
+ - **Infinite scroll**: `scroll("down", 800)` returns a fresh analysis.
+ - **Nothing clickable by id**: take a `screenshot`, then `click_coordinates(x, y)`. Hover with `mouse_move` to reveal menus.
- ### When Element IDs Don't Work
+ ## Personas
- Sometimes elements aren't detected or clickable by ID. Fallback strategy:
+ - `"auto"` picks the least recently used persona under its concurrency cap; `"default"` is the key's own.
+ - A persona's device never changes. Don't try to refresh a fingerprint; for another device of the same kind, clone the persona (`oya personas clone <id>`).
+ - Logged-in state lives on the persona. If the user signed in through the Oya desktop app, start on that persona and the site is already logged in.
- 1. **Take a screenshot** → visually identify the target
- 2. **Use `click_coordinates(x, y)`** → click at the pixel position you see in the screenshot
- 3. **Use `mouse_move(x, y)`** → hover first to reveal hidden elements (dropdowns, tooltips)
- 4. **Use `keyboard_type(text)`** → type into whatever is focused without targeting
+ ## CAPTCHA, MFA and humans
- ### Error Recovery
+ - `captcha: "auto"` (SDK) solves CAPTCHAs as they appear; `browser.solveCaptcha()` solves one on demand.
+ - `browser.completeMfa()` enters a TOTP code when the persona has one sealed. If it returns a `liveViewUrl`, a person has to approve (push, passkey, SMS): give the user that URL and wait.
+ - CLI takeover: `oya takeover <id>`, the human works in `oya open --id <id>`, then `oya release <id>` and `oya resume <id>`.
+ - Never type the user's passwords or codes into a page unless they gave them to you for that site.
- - **"Element not found"** → IDs are stale. Call `analyze_page` again.
- - **Click didn't work** → The element may need scrolling first, or try `click_coordinates` with screenshot.
- - **Page didn't load** → Check URL, try `navigate` again, or `wait` for a specific selector.
- - **Modal blocking** → `analyze_page` will scope to the modal. Dismiss it with Escape or clicking X.
- - **Content truncated** → Very long page. Scroll down and re-analyze to see more content.
+ ## Rules
- ## Important Rules
+ 1. Analyze before acting; never guess an element id.
+ 2. Re-analyze after every page change.
+ 3. Navigate straight to URLs instead of clicking through menus.
+ 4. Stop every browser you start.
+ 5. "Every persona is at its concurrency cap" (429): stop a browser or ask the user to raise the cap. Don't retry in a loop.
+ 6. "Element not found": the ids are stale, analyze again. A page that won't load: retry `navigate` once, then `wait` for a selector or take a screenshot.
- 1. **Always analyze before acting.** Never guess element IDs.
- 2. **Re-analyze after major actions.** Element IDs change after page changes.
- 3. **Scroll to find elements.** If an element is in the "Off-screen" index, scroll first.
- 4. **Read the element index.** It tells you exactly what's visible and what's not.
- 5. **Use screenshot as backup.** When markdown isn't enough, see the page visually.
- 6. **Don't over-analyze.** If you already see the element you need, act immediately.
- 7. **Be efficient.** Navigate directly to URLs when possible instead of clicking through menus.
+ Docs: https://browser.getoya.ai/docs · For agents: https://browser.getoya.ai/llms.txt