Repository navigation
feat: expose agent-browser as an embeddable Rust library - #11
Conversation
Chrome's stderr was piped but only read on the DevToolsActivePort fallback path. After readiness nothing read it, so once about 64 KiB of logs filled the pipe, Chrome's next stderr write blocked and froze the browser. Drain it on a detached thread for the browser's lifetime. Co-authored-by: Simon Ellefsen <stoffer@nose.dk>
…ercel-labs#2004) Kernel's create-browser API expects profile as {name, save_changes}; the bare string was rejected with HTTP 400. Save-back is now opt-in via KERNEL_PROFILE_SAVE_CHANGES (API default false), and docs no longer claim the profile is auto-created or auto-saved. Fixes vercel-labs#1473 Co-authored-by: Ivan <21055391+boatri@users.noreply.github.com> Co-authored-by: Rob Prior <83608739+robertjamesprior@users.noreply.github.com>
* fix(chat): allow WebMCP, skills and remaining browser commands Chat blocked webmcp, so the model fell back to eval. It also blocked skills, although the injected skill stub tells the model to run `skills get core`, plus read, a11y, react, vitals, pushstate and removeinitscript. Adds a test that keeps the allowlist in sync with top-level browser commands and a prompt rule to prefer WebMCP tools over eval. Fixes vercel-labs#1761 Co-Authored-By: luxleader <1044591285@qq.com> * fix(chat): fetch WebMCP schemas as JSON and keep quoted separators Co-Authored-By: luxleader <1044591285@qq.com> --------- Co-authored-by: luxleader <1044591285@qq.com>
…ts (vercel-labs#2014) * fix(auth): select usable controls and reject changed credential targets Recreate the visible-control fix from vercel-labs#1999 and bind credential entry to the selected DOM node. Reject detached or focus-redirected fields before submitting, preserve supported editing paths, and release remote handles. Co-authored-by: Jony <13896935+zyz619963502zyz@users.noreply.github.com> * test(auth): consolidate credential regression coverage Reuse the stateful login fixture for duplicate-control and credential-target checks, and exercise remote-object cleanup in one selection-to-fill test. Preserve failure, compatibility, and visible-submit assertions while removing duplicated HTTP and WebSocket setup. * fix(clippy): allow double_must_use on async_trait backend Rust 1.99 flags the #[must_use] that async_trait adds to methods returning a boxed future. --------- Co-authored-by: Jony <13896935+zyz619963502zyz@users.noreply.github.com>
…g elements (vercel-labs#2043) * fix(snapshot): stop selector-scoped snapshots duplicating and dropping elements A node is a root of a selector-scoped snapshot only when none of its AX ancestors are inside the matched subtree, so ignored wrappers no longer create extra roots. DOM.describeNode now pierces shadow roots, so shadow content under the matched element is collected. Fixes vercel-labs#2018 Co-Authored-By: Naman Satish <naman.satish@gmail.com> * test(snapshot): assert selector-scoped snapshots exclude content outside the selector --------- Co-authored-by: Naman Satish <naman.satish@gmail.com>
* feat(engine): add experimental Obscura support Reworks the contribution from vercel-labs#1410 on current agent-browser APIs. Co-authored-by: SGavrl <277843151+SGavrl@users.noreply.github.com> * docs(skills): keep engine details out of core * fix(doctor): check the obscura binary and list obscura in engine docs --------- Co-authored-by: SGavrl <277843151+SGavrl@users.noreply.github.com>
…pt (vercel-labs#2026) * fix(cdp): give auto-connect time to approve the remote-debugging prompt Chrome 144+ holds the DevToolsActivePort WebSocket handshake while it shows the remote-debugging permission prompt. The 2s verify timeout expired first, so auto-connect fell back to HTTP discovery, which triggered another prompt and then removed DevToolsActivePort from a Chrome that was still waiting. Keep the handshake open for 30s. Fixes vercel-labs#1365 Co-Authored-By: godtail <easilyjs@gmail.com> Co-Authored-By: Susindra Reddy <susindrareddy@users.noreply.github.com> * fix(cdp): stop auto-connect while Chrome shows the approval prompt --------- Co-authored-by: godtail <easilyjs@gmail.com> Co-authored-by: Susindra Reddy <susindrareddy@users.noreply.github.com>
* feat(docs): migrate agent-browser to Geistdocs * fix(docs): use workspace pnpm configuration on Vercel * fix(docs): run Vercel installs and builds through Corepack * docs: document Vercel workspace build requirements * fix(docs): scope Vercel dependency installation to docs * feat(docs): switch navbar to Vercel Labs brand Bump @vercel/geistdocs to 2.4.1 and set navbarBrand: "labs" so the docs navbar uses the Vercel Labs logo and links to vercel.com/labs instead of the default OSS branding. * chore: regenerate lockfile after merge * fix(docs): restore navigation sections * test(docs): re-pin baseline to d01253d after main advanced Main updated the contact sheet example image (vercel-labs#1871) and the browser-use provider page (vercel-labs#1879); the rename-aware merge carried both into the migrated content. Re-pin the original-state baseline to the new main commit so the contract checks pin the current originals. * docs: update Geistdocs to 2.7.5 and check the MCP route * test(docs): re-pin baseline to 526157c after main advanced * docs: port Obscura engine page to Geistdocs and re-pin baseline to efee389
…te lock (vercel-labs#2059) The maintenance tick and the idle timer awaited the state lock inside the accept loop, so a long command stopped the daemon from accepting new connections. The tick now takes the lock with try_lock and runs in its own task, skipping a busy tick. The idle timer waits for the lock in a separate select branch. Unix and Windows share the tick function. Co-authored-by: Jaden Fix <163031992+jadenfix@users.noreply.github.com>
…2057) * test(docs): drop migration-only content snapshot checks Byte-for-byte MDX, full Markdown, heading multiplicity and legacy search ranking were compared against the pre-migration commit, so any docs content edit, including each release changelog, failed CI. * test(docs): check Markdown representations against the baseline as a floor Restore the GET checks for API, .md, negotiated and legacy Markdown, and compare their bodies by original blocks in order instead of exact equality, so added content passes and a missing body still fails.
* feat(cli): trust private CAs in CLI HTTPS requests read, install, upgrade and doctor verified peers against the compiled-in Mozilla roots only, so a proxy CA deployed by MDM, a sandbox or an enterprise image failed with UnknownIssuer. --ca-cert now adds a CA to these requests on every platform, --use-system-ca selects the OS trust store, and SSL_CERT_FILE is an ambient fallback. Verification stays on. read sends the resolved trust with each request, so the daemon holds no trust state. A command-line selection is saved beside the session until close and survives daemon restarts. --ca-cert on read no longer triggers a browser launch. Co-Authored-By: Bazyli Brzóska <563469+niieani@users.noreply.github.com> * fix(cli): keep the saved CA when a new one fails and trust batched reads * fix(cli): clear saved CA trust when a batch closes the session * test(docs): let the content floor accept inserted lines and declared edits The block-level floor rejected new table rows, new lines inside code blocks, and intentional rewrites of original text, so any docs correction failed. Compare original lines in order instead, and apply rewrites declared in fixtures/docs-edits.json to the live floor. The pinned baseline is unchanged. --------- Co-authored-by: Bazyli Brzóska <563469+niieani@users.noreply.github.com>
* chore: prepare v0.39.0 release * docs(changelog): add vercel-labs#2059 to v0.39.0 * docs(changelog): add vercel-labs#2006 to v0.39.0
…-labs#2085) A lost response (EOF, reset, read timeout) after the request was written was retried up to 5 times, so click, fill, eval or navigation could run twice. Mutating and launch commands now fail with code outcome_unknown instead; read-only actions still retry, and failures before any byte was written keep the old retry and respawn behavior. Fixes vercel-labs#2032 Co-authored-by: rotemb-wond <306704340+rotemb-wond@users.noreply.github.com>
…ra binary (vercel-labs#2113) e2e_snapshot_and_click_ref depended on example.com, which no longer renders the asserted heading. It now uses a loopback fixture. The E2E job installs Obscura v0.2.4 and sets OBSCURA_BIN, which the Obscura verification tests require.
…-labs#2114) A redirect to a disallowed host is answered with a 403 page, so the navigation completed and `open` reported success. The fetch handler now records blocked documents by frame, and navigation fails when the main frame landed on one. Co-authored-by: holny <holny@foxmail.com>
…l-labs#2157) * fix(eve): update to latest eve for tool contract compatibility * fix(eve): key the install cache by sandbox id, not session id * fix(eve): drop session id fallback and require eve >=0.81.0 * refactor(eve): drop sandbox id and install cache for eve 0.81+
* fix(cli): keep commas inside --args values --args split on every comma, so a value like --disable-features=A,B reached Chrome as --disable-features=A plus a stray "B" argument. Commas now separate args only before another flag; newlines always separate. The daemon parsed AGENT_BROWSER_ARGS with the same split on auto-launch, so both paths now share split_launch_args. Fixes vercel-labs#1284, vercel-labs#1501. Co-authored-by: palkim <42205606+KimHyeongRae0@users.noreply.github.com> Co-authored-by: jin.2 <176381442+jin-2-kakaoent@users.noreply.github.com> Co-authored-by: asif786ka <6130514+asif786ka@users.noreply.github.com> * docs: describe --args comma handling on every page The /commands, /cdp-mode and /configuration pages still said commas separate launch args. Reword them and update the route fixtures: expected markdown and its hashes, and the content samples that held the old wording. Also add a test that AGENT_BROWSER_ARGS keeps commas inside values through launch_options_from_env(). * fix(cli): keep negative numbers inside --args values A comma followed by a single dash started a new arg, so --window-position=-32000,-32000 still reached Chrome split in two, which is the exact repro in vercel-labs#1833. Only a comma followed by -- now starts a new arg. Added a test for negative values and checked chrome://version shows the flag intact. --------- Co-authored-by: palkim <42205606+KimHyeongRae0@users.noreply.github.com> Co-authored-by: jin.2 <176381442+jin-2-kakaoent@users.noreply.github.com> Co-authored-by: asif786ka <6130514+asif786ka@users.noreply.github.com>
…abs#2175) * fix(mcp): reject arguments the tool schema does not declare Handlers only read the keys they know, so a misspelled key like tabId on tab_close was dropped and the tool ran with defaults, closing the current tab. tools/call now returns invalid_params naming the unknown keys and the tool's own arguments. Co-Authored-By: tlq5l <186405119+tlq5l@users.noreply.github.com> * docs(mcp): note that undeclared tool arguments are rejected --------- Co-authored-by: tlq5l <186405119+tlq5l@users.noreply.github.com>
…l-labs#2173) * fix(click): fail on hidden, disabled, or off-viewport elements click printed "✓ Done" for elements that never got the event. An element with no layout box has its center at (0,0), so the click landed on <html>. Off-viewport and disabled targets swallowed it silently, including `click @ref` on a ref the snapshot already marked [disabled]. click and dblclick now check, at the click point, that the target is visible, enabled, and inside the viewport, and say which check failed. The check fails open on engines that lack an API it uses. hover, tap, drag, check, and uncheck keep their current behavior. `is enabled` now also treats controls inside a disabled <fieldset> as disabled. Fixes vercel-labs#2056 Co-authored-by: holny <12433219+holny@users.noreply.github.com> * fix(click): catch visibility:collapse and document dblclick and --new-tab visibility:collapse hides an element the same way hidden does, but the check only matched hidden, so a click on it still landed on the element behind. The help and docs now say dblclick gets the same checks, and that click --new-tab opens the link's URL directly without them. * fix(click): keep clicks on zero-height or zero-width elements A horizontal or vertical SVG line has a bounding box with one zero dimension, but its stroke still takes clicks. Only an element with no box at all now counts as not visible. --------- Co-authored-by: holny <12433219+holny@users.noreply.github.com>
…-labs#2155) * fix(cdp): keep the attached browser across follow-up commands After `connect` (or `--cdp`), the next command without a connection flag relaunched a local browser and dropped the attach. The CLI sends a local launch envelope whenever config sets executablePath or args, and the daemon treated it as a switch to local. The daemon now remembers the external target a session attached to. A launch that names no target is pointed back at it, minus the fields only a local launch uses, so it runs the same path as an explicit `--cdp`. That keeps the existing checks in force: `--allowed-domains` and `--ca-cert` are still refused for CDP and auto-connect, and provider sessions keep their allowlist support. Action policy is checked against the resolved target, and a dead attach now fails instead of silently launching a local browser. `close` releases the attach. Tested with unit tests for the target rewrite, the allowlist and CA refusals, and policy, plus e2e tests for the kept attach, a dead attach, and close followed by a local launch. Fixes vercel-labs#2001. Co-authored-by: Saurav Sharma <75519197+aniketsaurav18@users.noreply.github.com> * Trim tests and drop the extra error suffix Keep the tests that prove the fix: the target rewrite, the allowlist refusal on an attached browser, policy, close, and e2e for the kept attach and a dead attach. Drop overlapping cases, the CA test and the ca_bundle change it needed, and the suffix appended to inherited launch errors. --------- Co-authored-by: Saurav Sharma <75519197+aniketsaurav18@users.noreply.github.com>
* fix(refs): refuse ambiguous stale-ref recovery When a ref's DOM node is gone, the resolver fell back to the Nth element with the same role and name. If duplicates were replaced or reordered, that silently clicked a different element and reported success. The fallback now recovers only when the ref was unique in its snapshot and exactly one element matches now. Otherwise it fails and tells the caller to take a new snapshot. Refs whose node still exists are unaffected. Tested with unit tests on the match selection and headless Chrome E2E tests for replaced, removed, and moved duplicate buttons. * docs(refs): explain when a stale ref fails instead of recovering Short note in the snapshot help, README, core skill, ref lifecycle reference, and docs site: a replaced element is recovered only when its role and name match exactly one element, and an ambiguous match means take a new snapshot. * test(refs): cover ambiguous fallback on the object path and update MCP hint fill resolves refs through resolve_element_object_id rather than the click path, so add an E2E test that it also refuses an ambiguous match and still recovers a unique one. The MCP snapshot tool description now tells callers to take a new snapshot when a stale ref cannot be recovered. * test(refs): cover duplicate-marked refs on the fill path and kept errors The fill path resolves refs through resolve_element_object_id, so check that a ref marked as one of several duplicates is refused there even when only one element is left. Also pin the not-found and missing-ID errors that the rewritten match loop still returns. * fix(refs): treat a detached node as stale on the object path Chrome can still resolve a backend node after it is removed from the page, so commands like get text, focus, and fill acted on the detached node and reported success. The object resolver now checks isConnected and, when the node is detached, releases it and goes through the same guarded role/name fallback as the click path. A failed check keeps the old behavior. Adds one CDP call per object-path ref command. Full E2E suite passes apart from the Obscura tests, which need OBSCURA_BIN.
|
Warning Review limit reached
This review includes 180 billable files and costs up to $45.00. View limit details
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Tiny Sweeper reviewFindingsNo active actionable findings. Advisory notes
Resolved this pass
Verdict: Incomplete · Priority: none Diagnostics and supporting detailsFull summaryPull request purpose (title): feat: expose agent-browser as an embeddable Rust library. Tiny Sweeper completed its review; deterministic results follow. Unreviewed paths
Partial review reasons
Review snapshot
Completeness: Incomplete What changedLatest push delta: unavailable — the review state has the prior reviewed head and rendered evidence, but no trusted base-to-head diff comparison; cached prompt differences are not a proven push delta. Whole pull-request changes: the diff is a large batched 0.39.1 release across CLI, native browser, MCP, dashboard, eve, and docs, adding CLI TLS trust, an experimental Obscura engine, no-resend `outcome_unknown` handling, sticky external attach, daemon idle responsiveness, MCP argument validation, auth-login field binding, Chrome stderr/prompt handling, a Geistdocs docs migration with a frozen baseline suite and CI docs job, Kernel profile payload changes, expanded chat allowlist, and eve session/install changes; the stated public Rust library extraction is not present in this diff. Features
Tests
Before merge
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
Co-authored-by: Medulla <medulla@tinyhumans.ai>
🖼️ UI wireframesDocs page (any, e.g. /commands)
Docs changelog page (/changelog)
Docs engines page (/engines/obscura) new in this PR
Docs CDP mode page (/cdp-mode)
Docs proxy page (/proxy)
Docs configuration page (/configuration)
|
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
# Conflicts: # cli/Cargo.lock # cli/Cargo.toml # cli/src/native/e2e_tests.rs
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Extract the CLI and native browser implementation into a public Rust library while keeping the binary entrypoint intact; embedders can now run commands without managing the daemon process. The migration also restores TLS forwarding for single and batch reads, keeps session trust until a close succeeds, and preserves Obscura proxy-bypass behavior. Added a library integration test and installed libnss3-tools in Ubuntu CI for the TLS integration suite. Validation: 1,469 CI-profile unit tests passed serially; strict Clippy and formatting passed; targeted TLS option unit test passed. The full local CI-profile run reached the TLS integration tests but 10 cases could not pass because this container lacks certutil; CI now installs that prerequisite.