Conversation
AI-native browser automation from the command line. Like playwright-cli but with composite actions (bap act), semantic selectors, and structured extraction. Key features: - Composite actions: execute multi-step flows in one command (40x token reduction) - Semantic selectors: role:, text:, label:, placeholder:, testid:, css:, xpath:, coords: - Structured extraction: --fields, --schema, --list modes - Smart observation: --full, --forms, --navigation, --max filters - Background daemon server: persists across CLI invocations - Skill installer: supports 13 AI coding agent platforms - Full playwright-cli compatibility (e<N> refs, all basic commands) Commands: open, goto, click, fill, type, press, select, check, uncheck, hover, screenshot, snapshot, observe, act, extract, config, recipe, sessions, tabs, tab-new, tab-select, frames, frame-switch, eval, close, close-all, install-skill Includes 58 unit tests (selector parsing + composite step parsing), SKILL.md for AI agent integration, and migration guide from playwright-cli.
…ations - Lead with CLI as primary interface for AI agents, MCP as secondary - Add integration instructions for Claude Code, Claude Desktop, Codex CLI, Codex Desktop, Gemini CLI, and Manus - Add CLI SKILL.md at repo root for discoverability - Add architecture diagram showing CLI and MCP paths side-by-side - Reorder packages table to put CLI and MCP first - Add selector reference table - Add bap install-skill section for 13+ agent platforms
- Trim description to ~300 chars for optimal metadata tier cost - Add Error Handling section with 8 common failure/fix patterns - Fix heading hierarchy (H3 after H1 → consistent H2 usage) - Improve progressive disclosure (reference SELECTORS.md for details) - Remove markdown file link that triggered false validation failure - All 20 validation checks pass, all 9 lint rules pass
Add 6 fused operations (observe-act-observe, navigate-observe, incremental observe, selector caching, response tiers, speculative prefetch) across protocol, server, client, MCP, and CLI packages. Harden for production: fix speculative prefetch race condition with 5-guard rewrite, add element registry max size cap (LRU eviction), comprehensive client cleanup on disconnect, structured request logging with client/request IDs and timing, multi-node CI matrix with coverage reporting, and community docs (CONTRIBUTING.md, SECURITY.md). Add fusion schema validation tests and element registry eviction tests.
Add fused navigate+observe, act+post-observe, response tiers, and --observe/--tier flags to all three SKILL.md files (root, CLI package, MCP skills directory). Update recipes and efficiency rules.
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.
Summary
@browseragentprotocol/clipackage — AI-native browser automation from the command linebap act), semantic selectors, and structured extractionWhat's included
Core infrastructure:
src/cli.ts— main entry, argv parsing, server lifecyclesrc/server/manager.ts— detached daemon with PID file at~/.bap/server.pidsrc/selectors/parser.ts— 10 selector types includinge<N>playwright-cli compatsrc/selectors/composite-parser.ts—bap actstep syntax parsersrc/output/—.bap/directory management, concise AI-friendly output formattingsrc/config/state.ts— global flags +~/.bap/config.jsonpersistenceCommands (26):
Navigation:
open,goto,back,forward,reloadInteraction:
click,fill,type,press,select,check,uncheck,hoverObservation:
observe,snapshot,screenshotKiller features:
act(composite),extract(structured),config,recipeSessions:
sessions,tabs,tab-new,tab-select,frames,frame-switchUtility:
eval,close,close-all,install-skillSkill files:
skills/bap-browser/SKILL.md— teaches AI agents how to use the CLIskills/bap-browser/agents/openai.yaml— OpenAI Codex agent configskills/bap-browser/references/SELECTORS.md,MIGRATION.mdTests: 58 unit tests (selector parsing + composite step parsing)
Test plan
pnpm build— all 7 packages build successfullypnpm typecheck— 10/10 packages passpnpm test— 8/8 packages pass (CLI: 58/58 tests)pnpm lint— 0 errors/warningsbap open https://example.com --headless→bap config→bap install-skill --dry-run→bap close-allnpm pack --dry-run— 15.1 KB, 8 files