v0.0.5
Highlights
-
CDP attach (borrow a user's running Chrome) — New
Browser(cdp=...)/--cdp <input>flag lets bridgic connect to an already-running Chrome instance instead of launching its own. Accepts a port (9222), a file (/path/to/devtools.json), a service-discovery hint, or auto-scan viafind_cdp_url(). Ownership-aware: tabs the user opened before bridgic attached stay invisible toget_tabs/close_tab(privacy boundary). On disconnect, bridgic's per-tab state is cleaned up but the user's Chrome keeps running. Seedocs/CDP_MODE.md. -
Silent downloads in CDP-borrowed mode — Downloads triggered from bridgic's tab no longer pop the "Where to save?" dialog under Chrome 138+ with "Ask where to save each file" enabled. Implementation routes
Browser.setDownloadBehavior(allowAndName)over the page-level CDP session and usesCdpDownloadRenamerto rename the GUID stub to the real filename. Working dir resolves via constructor → per-commandclient_cwd(CLI sendsos.getcwd()per request) →~/Downloads. User's other tabs keep their normal Chrome UX. -
Background snapshot pre-warming —
navigate_to/searchnow kick off a background snapshot generation so the nextget_snapshot/get_snapshot_textcall returns immediately. Three-phase evaluate fixes aroleIndexrebuild regression on large pages (DOM-heavy sites went from multi-second to sub-second snapshot times). -
Mode-aware stealth — Anti-detection JS init script now runs only in headless mode, where it's needed; headed mode skips it because the same
add_init_script()runs inside cross-origin Cloudflare Turnstile iframes and causes detectable inconsistencies. Race-proof worker stealth (page.on('worker')listener +Worker/SharedWorker/serviceWorker.registerwrap), CDPEmulation.setUserAgentOverridefor headless UA cleanup, and a new anti-toString_mkNativewrapper that returns the proper"function name() { [native code] }"string for every patched function (defeats DataDome / PerimeterX / Cloudflare.toString()probing). -
Video recording — New
start_video/stop_videotools record any active tab via CDP screencast → ffmpeg pipeline. In CDP-borrowed mode, all visible tabs (bridgic-owned and user-owned) can be recorded. -
BRIDGIC_HOMEenv var — All daemon state paths (socket, run info, logs, tmp, user config, user data) now derive from$BRIDGIC_HOME(default~/.bridgic). Set different values to run multiple independent daemon instances side-by-side without socket / lock collisions.
Bug fixes
-
Headed launch SIGTRAP on macOS 26 —
bridgic-browser open <url>withheadless=falsecould crash withbug_type=309 EXC_BREAKPOINT/SIGTRAPon first launch of the Playwright-bundled Chrome for Testing binary, producingBROWSER_CLOSEDafter 3 internal retries. The auto-switch to Apple-notarized system Chrome now triggers in all headed launches (previously requiredstealth=true). Users who must keep bundled Chromium can opt out viachannel="chromium"orexecutable_path. -
SingletonLockcrash between headed/headless on same machine —user_data_diris now split into mode-specific<base>/headedand<base>/headlesssubdirs. PublicBrowser.user_data_dirproperty still returns the base path users provided. -
go_back/go_forwardfalse positive on same-document navigation — Was reporting success when only the hash fragment changed but no actual navigation occurred. -
CDP auto-reconnect — Daemon now recovers from transient CDP socket drops instead of stuck-closed state.
-
evaluate_javascriptparity withpage.evaluatein CDP mode — Including arrow-function shorthand() => ...argument passing. -
dropdown_selecton custom comboboxes — Hidden shadow<select>options were leaking into the candidate list; now filtered out. -
Six follow-up bugs from PR #21 CR: eval
exceptionDetailshandling,go_back/forwardNonereturn, CDP session leak, video context binding, download timeout, probe timeout. -
Four CLI freeze/hang root causes identified from production daemon.log analysis.
-
Snapshot deadlock, download / video lifecycle, CDP URL redaction in logs.
CLI
--cdp <input>onopen/searchto attach to an existing Chrome. Accepts port, file path, orautoscan.- Per-command
client_cwdplumbed via socket request —bridgic-browsercommands now feelcurl -O-style for downloads (files land where you ran the command). - 7-variant mode-matrix QA harness under
scripts/qa/covers all link modes × display modes (bash scripts/qa/run-mode-matrix.sh).
Tests & docs
- Comprehensive test coverage for CDP scenarios, lifecycle contracts (I11–I15), mode matrix (V1–V7).
docs/CDP_MODE.md— full CDP attach guide.docs/INTERNALS.md— owned-page tracking, ref system, stealth design, CLI architecture deep dives.docs/KNOWN_LIMITATIONS.md— capability boundaries (e.g. Chrome "Show in Folder" bug under CDP).- README adds
BRIDGIC_HOMEmulti-instance section, storage-state cross-instance login sharing guide.
Upgrade
- Run
bridgic-browser closebefore upgrading — daemon code paths changed, the old daemon may not handle the new request shape cleanly. - Existing
user_data_dirprofiles are auto-migrated on first use: bridgic creates<base>/headedand<base>/headlesssubdirs and lazy-uses whichever matches the current mode. Old top-level profile files are left in place but ignored. cdp_urlwas renamed tocdpin the SDK and CLI for consistency. If you wrote dev-build code againstcdp_url, switch tocdp.
Full Changelog: v0.0.4...v0.0.5