docs
暂无简介
- License 许可
- AGPL-3.0
- 最近更新
- 2026-10-31
- Stars
- ★ 2
- Forks
- 0
02 资源文件 41
- 参考文档adr/0001-extension-relay-over-remote-debugging-port.md1.2 KB
- 参考文档adr/0003-downstream-never-branches-on-backend.md1.3 KB
- 参考文档adr/0004-agent-chooses-backend.md1.2 KB
- 参考文档adr/0005-extension-shares-login-state.md1.3 KB
- 参考文档adr/0006-markdown-is-the-content-view.md4.4 KB
- 参考文档adr/0007-content-never-silently-shrinks.md14.6 KB
- 参考文档adr/0008-pi-extension-is-a-subpackage.md6.7 KB
- 参考文档adr/0009-group-title-is-the-session-binding.md6.6 KB
- 参考文档adr/0010-auto-group-per-facade-connection.md4.0 KB
- 参考文档adr/0011-single-tcp-endpoint.md4.1 KB
- 参考文档adr/0012-development-never-touches-the-global-daemon.md15.2 KB
- 参考文档adr/0013-daemon-owns-session-recovery.md11.1 KB
- 参考文档adr/0014-one-deadline-propagated-end-to-end.md4.2 KB
- 参考文档adr/0015-search-is-a-cli-command.md3.4 KB
- 参考文档adr/0016-attach-proxy-comes-from-the-caller.md3.5 KB
- 参考文档agents/domain.md2.8 KB
- 参考文档agents/issue-tracker.md3.7 KB
- 参考文档agents/triage-labels.md1.1 KB
- 参考文档architecture.md23.1 KB
- 参考文档archive/2026-05-20-session-model-design.md9.0 KB
- 参考文档archive/2026-05-20-session-model-implementation.md24.0 KB
- 参考文档archive/2026-05-21-ai-userscripts-design.md9.7 KB
- 参考文档archive/2026-05-21-ai-userscripts-plan.md38.6 KB
- 参考文档archive/browser-connection.md24.6 KB
- 参考文档archive/improvements.md13.5 KB
- 参考文档archive/session-model.md11.5 KB
- 参考文档cws/listing.md5.6 KB
- 参考文档cws/privacy-policy.md1.3 KB
- 参考文档daemon.md17.4 KB
- 参考文档handoff-2026-08-refactor.md14.5 KB
- 参考文档human-input.md8.0 KB
- 参考文档issue-32-endsession-contract.md10.3 KB
- 参考文档plans/bug-a-sw-idle-termination.md11.0 KB
- 参考文档plans/issue-29-group-ownership.md7.3 KB
- 参考文档refactor-single-daemon.md18.7 KB
- 参考文档reports/bugfix-bind-and-tab-leak.md12.4 KB
- 参考文档reports/goto-network-mislabel.md11.4 KB
- 参考文档reports/issue79-sw-churn-and-install-id.md24.9 KB
- 参考文档reports/issue86-dead-tab-rebind.md5.4 KB
- 参考文档runtime-console.md2.6 KB
- 参考文档session-workspaces.md17.0 KB
03 SKILL.md 正文
browserwright — Layer 2 of the browser stack
browserwright is the AI-agent-facing layer of the browser automation stack:
- REPL in three shapes (inline heredoc, long-lived unix-socket daemon, one-off task invocation).
- Primitives that talk CDP directly (no Playwright, no Selenium): screenshot, click, JS evaluation, navigation, raw CDP escape hatch.
- Site-skills — per-host directories with
SKILL.md+memory.md+ atasks/*.pybundle. Five sites ship bundled: google, github, hacker news, wikipedia, producthunt. - Three-tier memory — global preferences, per-site notes, in-process REPL state. Append-only by default; preference writes require explicit user confirm.
Install
uv sync --extra ux
The console scripts browserwright and browserwright-daemon are both
registered automatically — they ship from this single package.
Usage
# inline heredoc (zero ceremony) — works with any backend.
browserwright <<'PY'
print(page_info())
PY
# Long-lived REPL daemon — single shared upstream ws for the whole session.
browserwright repl start
browserwright exec "print(page_info())"
browserwright repl stop
# Isolated background Chrome (zero popups, zero banner) — preferred for
# scripted / iterative work and the install wizard's default pick:
browserwright-daemon launch-chrome --port 9333 --profile /tmp/bs-isolated &
BD_PORT=9333 BD_BACKEND=cdp browserwright <<'PY'
print(page_info())
PY
# Extension backend — drives the user's daily Chrome via the store-installed
# relay extension (zero popups). See ../browserwright-daemon/README.md for setup.
BD_BACKEND=extension browserwright <<'PY'
print(page_info())
PY
# task invocation:
browserwright task wikipedia.org/lookup --title="Wikipedia"
# install wizard (defaults to isolated profile):
browserwright install
# daemon health:
browserwright doctor
# discoverability:
browserwright list-tasks
browserwright list-tasks --query="search the web"
# memory inspection:
browserwright memory show --global=true
browserwright memory show --site=github.com
Memory: dotted-key preferences
remember_preference(key, value) interprets key as a YAML frontmatter
path, not a literal flat key. Dots open new mapping levels:
| Call | Frontmatter shape |
|---|---|
remember_preference("dark_mode", True) |
dark_mode: True |
remember_preference("daemon.preferred_backend", "extension") |
daemon:<br> preferred_backend: extension |
remember_preference("ui.theme.accent", "#ff0") |
ui:<br> theme:<br> accent: '#ff0' |
That's why the install wizard's daemon.preferred_backend write produces
a nested daemon: block in global.md instead of a flat
daemon.preferred_backend: line. Verify with
browserwright memory show --global=true — the output is the full
frontmatter tree.
Tests
uv sync # dev group brings in pytest + pytest-asyncio
uv run pytest tests/
30+ unit + integration tests; all green on macOS / Python 3.11. The default suite uses subprocess mocks and an env-overridden CDP URL, so it never touches real Chrome.
Testing policy — do not hammer the user's daily Chrome
Chrome 144+ requires a fresh "Allow remote debugging?" popup for every new CDP WebSocket on the default profile, with no memory between popups. Iterative or scripted test runs that open dozens of WebSockets will spam the user with that dialog. Two safe paths:
-
Recommended for CI / iterative testing —
launch-chromeisolated profile. Spin a hidden background Chrome on a dedicated user-data-dir; nothing in the user's daily Chrome is touched and the popup never appears.browserwright-daemon launch-chrome \ --port 9333 \ --profile bs-test-profile \ --persistent & # run a daemon against that isolated Chrome, then create an cdp session # so the skill talks to it over the daemon socket (Mode B): browserwright-daemon serve & browserwright session new --backend=cdp pytest tests/Note: on macOS Chrome 148, if the user's daily Chrome is already running,
launch-chromemay not seeDevToolsActivePortwritten even though the new Chrome IS up on the requested port. Workaround:open -na "Google Chrome" --args --user-data-dir=/tmp/<unique> --remote-debugging-port=9333and grab the ws URL fromhttp://127.0.0.1:9333/json/version. -
One-shot live "does it actually work" verify against the user's real Chrome uses the
extensionbackend — install the relay extension once (Chrome Web Store, or unpacked for development) and subsequent calls all reuse the same upstream ws, zero popups.
v0.4 — Browser-extension relay (zero popups, zero banner)
browserwright-daemon v0.4 ships a Chrome-extension backend that relays CDP
through the extension's chrome.debugger permission. It bypasses both the
"Allow remote debugging?" popup and the persistent CDP banner because the
extension itself holds the debugger handle. The Skill side is wired through
browserwright install option 3; the daemon side requires Mode B
(browserwright-daemon serve — one global daemon, no --backend/--name).
End-to-end setup (run once, then forget it):
# 1. Install the extension — from the Chrome Web Store (recommended,
# auto-updating) or unpacked for development:
# store: https://chromewebstore.google.com/detail/
# browserwright-daemon-rela/okgnalaalckoaeledbjhpjiccmcdceeb
# dev: browserwright install option 3, or `browserwright-daemon
# extension-path --json` → chrome://extensions → Developer mode
# → Load unpacked → pick that directory.
# 2. Start the daemon as a Mode B relay (one global daemon, fixed socket).
browserwright-daemon serve
# 3. Click the extension icon → "Attach this tab".
# 4. Skill picks the running socket automatically:
browserwright <<'PY'
print(page_info())
PY
# 5. Persist the preference so future installs / agents keep using extension:
browserwright install # → choose 3
browserwright-daemon doctor --json lists the extension backend with
available=true once the relay is alive. The Skill install wizard's option 3
auto-flips from "(daemon reports extension backend not yet available)" to
live based on that doctor signal — no Skill release required to surface a
freshly-shipped daemon backend.
Backend chooser — pick one
| Backend | Picked via | Chrome process | Popup | Banner |
|---|---|---|---|---|
cdp (isolated profile) |
wizard option 1 (default) — browserwright-daemon launch-chrome |
dedicated background user-data-dir | ❌ | ❌ |
cdp (fingerprint browser) |
wizard option 2 — user runs AdsPower / MultiLogin / etc. | user's fingerprint browser | ❌ | ❌ |
extension |
wizard option 3 — install from Chrome Web Store (or load unpacked for development) | user's daily Chrome via chrome.debugger |
❌ | ❌ |
env |
externally-owned browser via BD_CDP_WS / BD_CDP_URL |
external (attach-owned, never closed on session end) |
❌ | ❌ |
v0.5.1 — Review remediation release
After the v0.5.0 ship landed, independent reviewer-1 produced REVIEW.md with 12 skill-side findings. v0.5.1 closes all 12 (and 2 incidental bugs that surfaced during the audit) with 229 tests passing.
Surface completeness (F-4) — 13 documented-but-missing primitives
shipped: type_text, press_key, fill_input, scroll,
dispatch_key, upload_file, wait_for_element,
wait_for_network_idle, drain_events, ensure_real_tab,
iframe_target, http_get, plus three Layer-3 re-exports
(list_site_skills, load_site_skill, run_task). EXPORTS grew
from 23 → 36. Two primitives remain deferred to v0.6 with explicit
footnotes in design.md §A.2: handle_dialog, try_recover_from_drift.
Production hardening (F-4b) — removed (2026-05) — the popup-defense
assertions previously lived in _hardening.py and gated repl start,
task, and the inline heredoc against the autoconnect backend's
Chrome 144+ popup-accumulation hazard. With autoconnect deleted, the
gate no longer has a purpose; the module and its tests were dropped.
Coverage & contract hygiene (F-7 / F-9 / F-12 / F-13 / F-16 / F-17) —
scaffold template now emits OUTPUT_SCHEMA (commented placeholder or
inferred from return {...} / return [...]); 14 more host_stem
multi-label TLD cases; args-schema rejects non-string keys; TOML emit
rejects unsafe control characters; warm_upstream flagged for removal
in v0.6.
Two incidental bug fixes surfaced during expanded coverage and
were shipped alongside: host_stem("github.com.") now strips the FQDN
trailing dot, and _validate_args_schema now rejects non-string keys
with a clear ValueError.
04 同仓库更多 Skills
ycombinator.com
暂无简介
wikipedia.org
暂无简介
producthunt.com
暂无简介
google.com
暂无简介
github.com
暂无简介
browserwright
Unified browser entrypoint for code agents. Use when an AI/code agent needs to operate a user's real browser or an isolated Chrome: open pages, click, type, fill forms, submit workflows, capture screenshots, scrape/extract page data, inspect DOM/network state, summarize what is on a page, or automate reusable browser tasks. Triggers include "use the browser", "open this page", "operate my browser", "control my Chrome", "screenshot this URL/page", "scrape this page/site", "extract data from the page", "fill out this form", "click this button", "summarize this page", "test this web app in a browser", "help me with the page I'm on", "operate my current tab", "attach to my active page", "browserwright", and "browserwright-daemon". This is the standard browser automation surface for code agents: it can drive the user's current browser via extension backend or launch/drive an isolated Chrome via CDP, with primitives for navigation, interaction, screenshots, crawling/scraping, page inspection, and reusable site skills.