v0.4.3 — Real browser automation (chromedp)
Real browser automation (chromedp)
internal/browser gains a real, JavaScript-capable browser backend. Previously it was HTTP-only with an InteractiveClient that merely described the click/type/submit it would perform; now those actions drive an actual headless Chrome/Chromium via chromedp — pure Go, no CGO.
What's new
browser.ChromeClient— manages one persistent headless-Chrome session over the DevTools Protocol: navigate, click, fill, select, submit, read text, screenshot, and state-preserving re-navigation. Multi-step flows (navigate → fill → click → submit) share live page state.- The interactive tools now execute for real.
browser.click/browser.type/browser.select/browser.submitperform live actions when a browser is installed. All existing security pre-checks still run in both modes: cross-domain blocking, never-type-into-password-fields, and submit confirmation. browser.read_page(new tool) — loads a URL in the live browser (executing JavaScript) and returns the rendered title + visible text, for JS-heavy pages wherebrowser.navigate(static HTTP fetch) returns little.browser.navigateandbrowser.extract_linksstay HTTP-only and fast.browser.screenshotis now real — returns a base64 PNG data URI of the rendered page when Chrome is available.
Graceful degradation
Chrome/Chromium is an external runtime dependency. ChromeClient detects the binary across platform-standard locations; when none is found, Available() is false, the interactive tools fall back to the pre-v0.4.3 validated-description behaviour, and browser.read_page / browser.screenshot return a clear "install Chrome" error rather than crashing. The single static binary is unchanged — Chrome is only needed at runtime for the live features.
Dependencies & build
Adds github.com/chromedp/chromedp (pure Go, no CGO) and its transitive tree (12 direct deps now). The zero-CGO single-binary commitment is preserved; cross-compiles verified for linux/arm64 and windows/amd64; govulncheck reports no vulnerabilities in the new dependency tree.
Tests
6 live integration tests against real headless Chrome (navigate + title/text, JavaScript rendering, fill+click reflecting on the live DOM, PNG screenshot, interactive live-click, and RenderText). They're gated behind AIBUTLER_BROWSER_TESTS=1 so they run locally / on demand but skip on standard CI (GitHub runners ship Chrome, but cold startup there is too slow to gate on). Full repo go test -race -count=1 ./... passes across all 128 packages.
Also de-flaked a pre-existing competing-consumer bus test that surfaced on this release's CI (it asserted a non-guaranteed fairness property; now asserts the deterministic exactly-once invariant + a robust distribution check).
Full changelog: https://github.com/LumabyteCo/aibutler/blob/main/CHANGELOG.md