feat(browser): native Go browser facade with HTTP-direct driver (#382) - #400
Merged
Conversation
Pure-Go, no-CGO, no-Chromium headless browser for static / server-rendered
HTML pages. Lives at cmd/sin-code/internal/native_browser behind a
Driver interface so future Playwright/Chromium drivers plug in without
caller changes.
Files:
internal/native_browser/browser.go — Browser + BrowserSession
(Navigate / Snapshot / Click /
Fill / Submit / Screenshot /
WaitFor)
internal/native_browser/driver.go — Driver interface + 3 impls:
HTTPDirectDriver (net/http +
golang.org/x/net/html),
HTTPOnlyDriver (MCP-delegate
stub = ErrNotImplemented),
StubDriver (deterministic
test driver)
internal/native_browser/browser_test.go — races-clean suite, 13 cases,
httptest-backed
Hook-ups:
internal/mcpclient/registry.go — namespace native_browser__*
internal/catalog/source_external.go — catalog entry
internal/permission_defaults.go — split policy (issue #382):
read-only verbs = allow,
click/fill/submit = ask (M4)
internal/permission_defaults_test.go — TestBrowserPolicySplit asserts
Real Playwright / Chromium layering lands in a follow-up release behind
the same Driver interface — no caller changes required.
M2 honored: net/http + x/net/html only, no CGO. M4 honored: mutating
verbs stay at "ask" until the user explicitly approves.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🏆 CEO Audit — A+ (100.0/100)
📥 Download full report (Markdown)
|
🏆 CEO Audit — A+ (100.0/100)
📥 Download full report (Markdown) Run ID:
|
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.
Browser facade with HTTP-direct driver (no CGO). Policy split M4: read-only allow, mutating ask. 17 tests race-clean.