Repository navigation
feat: browser tool router and external Playwright tier (phase 1, PR 1) - #121
Merged
Merged
Conversation
BrowserBackend interface, BrowserToolCatalog (32 names, Tier A table), BrowserRouter (R2 table, 30 min identity guard, no fallback), MCPServer/scoped/mappingTools wiring, OAB-Browser-Backend header, external Playwright backend (loopback-only URL, no redirects, fixed error classes, listener uid check, explicit trust), no-tailscale guard, docs. Managed stdio child is PR 2; Apple Events tier is Phase 2. Ran on macmini (/private/tmp/oab-computer-p1): swift build ok; swift test all green incl. new Browser*/PortOwner/ExternalPlaywright suites (31 tests); oab-computer --upstream browser=http://localhost:8794/mcp exits 64; scripts/check-no-private-identifiers.sh ok; scripts/test-pw-mcp-check.sh ok.
Ran: scripts/check-no-private-identifiers.sh (ok); swift test --filter Browser on macmini (24 tests, 0 failures).
This was referenced Nov 14, 2026
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.
Phase 1, PR 1 of the browser_* tiers work (design: #118, ADR
docs/adr/browser-tiers.md, requirementsdocs/requirements/browser-tiers.md).What changed
BrowserBackendinterface,BrowserToolCatalog(32 names, Tier A table),BrowserRouter(R2 table, 30 min identity guard, no fallback,OAB-Browser-Backendheader).tools/listshows only what the active backend serves;observesees none and gets the unchanged unknown-tool error.MCPServer.browser, forwarded byscoped(to:)andmappingTools(_:); connection key from the MCP session id or the attach session.--upstream browser=URL: literal127.0.0.1/::1only (exit 64 otherwise), no redirects, fixed error classes, listener-owner uid must equal ours (libproc, fail closed), constructible only with an explicitBrowserTrust. Other--upstreamnames are unchanged.tailscaleguard underSources/InstanceMCPCore/Browser/inscripts/test-pw-mcp-check.shand an XCTest.browser_*names not in the catalog are filtered; documented in README,docs/tool-profiles.md,docs/parity-checklist.md.Phase order
The requirements doc defines no numbered phases. Order follows the task text and the doc's dependencies: interface and router, then the Playwright tier, then installer, wizard and Apple Events. This PR has no child process. Follow-up PR 2:
StdioMCPClient, managed stdio child,sys_infobackend line. Not included: wizard, installer, Apple Events tier, Linux (#119).Tests (macmini, clone under /private/tmp)
swift buildok;swift testall green, including newBrowserRouterTests,BrowserServerWiringTests,BrowserToolCatalogTests,BrowserUpstreamURLTests,BrowserNoTailscaleTests,ExternalPlaywrightRedirectTests,ExternalPlaywrightErrorTests,PortOwnerProbeTests,BrowserSecretHygieneTests, and the updatedBrowserProfileTests.check-no-private-identifiers.shandtest-pw-mcp-check.shpass.test-packaging.shnot run (known macOS 27 pkgbuild issue; CI decides).