Conversation
New @axl/extension-browser package providing six Playwright-backed tools: browser_navigate, browser_screenshot, browser_click, browser_type, browser_scroll, and browser_read. The browser runs headless and is opt-in through the --browser flag or the TUI settings toggle. - Screenshots save to disk and auto-open in the OS image viewer - Prompt guidance so the model prefers the browser for JS-heavy pages - TUI renderer shows clean tool labels instead of raw output - Browser process closes on toggle-off, runtime rebuild, and daemon shutdown - Full wiring through protocol, daemon, runtime, SDK, CLI, TUI, and web - URL safety checks reject file://, credentials, and non-http schemes - 31 tests covering policy, tool behavior, validation, and screenshot save Signed-off-by: Tanvi Reddy <reddyplayer22@gmail.com>
The session.create and session.configure RPC handlers in daemon.ts destructured request params by name but omitted browser, so the flag was silently dropped before reaching the session manager. This left the browser tool stuck on its initial state: toggling it off in settings had no effect because update.browser arrived as undefined. Both handlers now forward browser alongside webFetch and webSearch. Signed-off-by: Tanvi Reddy <reddyplayer22@gmail.com>
Adds five tools to the browser extension: - browser_back / browser_forward: navigate session history - browser_wait: wait for a selector to become visible (bounded timeout) - browser_eval: evaluate a JS expression and return a JSON-safe result - browser_select: choose an option in a select dropdown Each has a TUI renderer and unit tests. The five tools bring the registered browser roster to eleven. Verified live against Chromium. Signed-off-by: Tanvi Reddy <reddyplayer22@gmail.com>
Signed-off-by: Tanvi Reddy <reddyplayer22@gmail.com>
The new browser extension package files were authored by me. Correct the SPDX copyright headers and REUSE.toml entries from the template default to my name. Signed-off-by: Tanvi Reddy <reddyplayer22@gmail.com>
The release package bundles the CLI with esbuild. Because the browser extension depends on Playwright, esbuild tried to bundle playwright-core, which fails on its dynamic chromium-bidi requires. Mark playwright and playwright-core external so they are not bundled, and declare playwright as an optional dependency of the published package so it installs for browser use without being forced on every install. The browser tools load it through a runtime dynamic import and fail loudly when absent. Signed-off-by: Tanvi Reddy <reddyplayer22@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Add browser automation as an opt-in first-party extension that the model can use when no programmatic interface exists, while keeping browser state daemon-owned and every client a consistent projection:
web_fetchfor static pages and reach for the browser only when a page needs JavaScript or interactionFixes
Advances #72 (
axl-backlog:sandbox.browser-tool). Satisfies acceptance criteria 1 (opt-in, nothing while disabled) and 6 (daemon-owned state). Criterion 2 (sandbox confinement), criterion 5 (per-site authenticated browsing), and full typed-RPC exposure remain follow-ups.Approach
@axl/extension-browserpackage exposingbrowser_navigate,browser_screenshot,browser_click,browser_type,browser_scroll,browser_read,browser_back,browser_forward,browser_wait,browser_eval, andbrowser_select.browserselection flag wired through the protocol (config.tools, session selection, and thesession.configureresult), daemon, runtime, SDK projector, CLI (--browser/--no-browser), and the TUI settings toggle..axl-screenshots/,.axl-downloads/) and open screenshots in the host viewer on macOS, Linux, and Windows.How was this tested?
pnpm typecheck,pnpm lint,pnpm format:check,pnpm check:boundaries,pnpm check:generated, andpnpm build: all passed.@axl/extension-browserunit tests: 42 passed, covering policy flag generation, URL safety rejection, every tool's input validation, screenshot-to-disk, and the eleven-tool roster.uvx reuse lint: passed with 589 of 589 files carrying copyright and license information.pnpm audit --audit-level high: no known vulnerabilities.git diff --check: passed.browser_navigate,browser_eval(returneddocument.title),browser_wait,browser_back, andbrowser_forwardall executed correctly; the settings toggle removed the tools when disabled and the model fell back toweb_fetch.file://, credential URLs,ftp://,javascript:, andchrome://are all rejected before the browser is touched./private/var, OCI tests needing/proc/self/mountinfo, one flaky daemon queue-drain test) are unrelated to this change; this branch touches no kernel, sandbox, or queue code.Learning
launchPersistentContextand CDP model as the automation reference; chose persistent context so the user-data directory stays workspace-scoped.web_fetchfirst, since browser automation is slower and only needed for JavaScript-rendered or interactive pages.browserselection flag had to be threaded through every RPC handler explicitly; a missing field in the daemon'ssession.createandsession.configuredestructuring silently dropped it and defeated the toggle.Note for reviewers
The wire protocol gained a required
browserfield onconfig.tools, session selection, and thesession.configureresult, but the wire version was left at 16. Please confirm whether this warrants a version bump.Checklist
AI assistance