refactor(browserstack): extract the v2 provider plugin
Summary
Extract BrowserStack into private @agent-device/browserstack for #3309. Preserve shared WebDriver behavior. Install with agent-device plugins add @agent-device/browserstack before connecting.
Head 589c8d3f38f46ed60cd41d0e1fb4ccb5c0fea640 targets 0.22 at 2408a3702d487c9bad93776eba5fd71383351e8f, after #4578 merged. Actual layer: 80 files/2142 gross lines; default-main: 419 files/12879 gross, including integration changes.
Validation
Earlier b41/854 failed typecheck/Numeric Ranges and R11. The private build-config owner removes the tsdown declaration edge and boundary escapes. Intermediate8f8 omitted project declarations; current root/SDK/consumer references supply them. At 589, type-only Rolldown and its lock importer are devDependencies. Fresh independent source recheck found no actionable repair/interactions findings. Fallow944 passed.
Current iOS smoke failed: attempt1 reached General but Back was unconfirmed; attempts2–3 failed destination waits. Completed trace diagnosis found no proven source cause. Selected-node geometry/ref generation/native hit identity are missing. Apple aggregate propagates this failure. No base-pass or infrastructure waiver exists.
Pinned pnpm11.17/Node26.8.1 frozen install, full-repository format, root and four consumer builds passed. At clean589, the requested packed checker passed: isolated installation, strict exports, typed rejection and fixture-backed CLI connect. Scratch tarballs were removed. Broad local tests/typecheck/lint/gates remain deferred to CI.
Rank thread resolved. Sentinel589 has no visible findings; lockfile and one out-of-diff finding were omitted. Size589 succeeded, with verified digest; this proves Size only.
Real packed BrowserStack/video-log evidence remains open. Keep private:true until placeholder/trusted publisher and usable publication are verified. Planned0.22 guidance stays per maintainer decision.
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.