# Changelog All notable changes to BrowserSkill will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/). See the [Chinese changelog](CHANGELOG.zh-CN.md). Update both versions in the same PR. The CLI and extension may release separately. Protocol compatibility determines which versions can connect. ## [Unreleased] ### Fixed - Fixed `bsk sync` answering `unchanged` after `bsk hover` opened a menu that a CSS `:hover` rule shows without any DOM change: the observation from before the hover was replayed, so the menu's items never appeared and had no refs. The sync that follows a hover now captures the page. Under target control, an untargeted action needs that new sync before it is accepted, as it already does after `bsk emulate`; targeted actions keep working on the same context (#856). - Fixed VOM false-occlusion, collapsed-drawer ref leakage, and accessible-name stripping heuristics on mainstream web pages (`packages/vom`, `apps/extension/src/tools/vom/`), and avoided `--wait-for` / `--wait-not` framing-line collisions (`crates/bsk-cli`): non-`
` fixed SPA workspace shells wrapping primary landmarks stay in `L1 page` when no base-page foreground content sits behind them (without disabling invisible click-away backdrops or custom modals over `div`-soup / `sticky`-header pages), `1px` `overflow: hidden`/`clip` collapsed drawers/accordions no longer leak hidden `@eN` refs, `font-size: 0` `` icon badges and `<= 256`-char `.sr-only` / `` button labels and keeping container AX taint stripping intact, and `bsk open` / `bsk sync` / MCP `bsk_session(open|sync)` retain full rendered-VOM substring semantics (roles, badges, hrefs, and explicit `@layers` / `Lx` queries) while skipping `@vom`/`@view`/`@layers`/`Lx` framing lines for ordinary substrings. - Completed follow-up AI guardrail, documentation, and release-script alignment: added root `CLAUDE.md` pointing to `AGENTS.md` and expanded `AGENTS.md` with full Rust/frontend CI gates and browser CI job prerequisites; removed remaining stale protocol `1.4`/`1.5`/`1.8`, `0.4.2`, and pre-parity MCP claims across `docs/browser-profiles.md`, `docs/video-recording.md`, `docs/website-debugging.md`, `docs/shared-browser-control.zh-CN.md`, `docs/structured-extraction.md`, `docs/dynamic-reading.md`, and `evals/browser/cases/regression/js-dialog-control/README.md`; unified `CANONICAL_SKILL_MAX_ENTRY_BYTES` in `scripts/check-dsh-package.mjs`; and hardened `scripts/release.mjs` to enforce `scripts/check-changelog-sync.py` and fail loudly on `cargo check` or `git` errors instead of swallowing them with `|| true`. - Synchronized tab lifecycle state across the extension and daemon (`controller.ts`, `background.ts`, `session-manager/manager.ts`, `bsk-protocol`, `daemon/{ws,scopes,run_log,intent_wal}.rs`): `tool.tab_create(active: false)` now preserves an existing live default tab in `CooperationController` (matching daemon `scopes` and `run_log`), and new owner-verified `session.tab_closed` and `session.tab_replaced` WS events evict dead tab caches and atomically migrate `active_tab_id`, `run_log`, and `IntentWal` `DISPATCHED`/`UNKNOWN` freezes across Chrome tab closures and prerender/Memory Saver tab replacements. - Hardened the daemon Intent WAL and per-session tool queue (`intent_wal.rs`, `queue.rs`, `tool_pipeline.rs`): mutating tool dispatches now fail closed (`protocol_error` / `intent_wal_write_failed`, `dispatched: false`) with clean rollback when `intent_ledger.jsonl` cannot be written instead of dispatching unlogged mutations, and per-session queue workers now reserve the busy slot before gating/WAL persistence and settle+flush `IntentTicket` (`SETTLED`/`UNKNOWN`) before clearing `busy`, closing the race window where concurrent callers or `bsk debug wait` could slip past an unresolved `UNKNOWN` freeze. - Fixed `packages/vom`'s `isNoisyText` dropping ordinary Chinese/English form labels (`"开始"`, `"结束"`, `"登录"`, `"header"`, `"nav"`) and URL contexts (`https://...`), fixed wide horizontally-scrolled tables triggering false `virtual_row_recycled` click refusals in `row-anchor-spec.ts` when the first column scrolls past `-500px`, and fixed `bsk open` / MCP `bsk_session(action="open")` silently returning success on navigation timeout (`reached: "timeout"`) and clamping explicit short `timeout_ms` values up to 30,000ms. - Fixed Rust VOM parsing (`recipe::vom` and `daemon::run_log`) failing on `[field: "..."]` labels and unnamed controls without a leading space after the role token, restoring Recipe matching for caption-bound inputs and ensuring `="•••"` password masking is always recorded; also updated `run_log` context tracking on slim `delta` replies and expanded `vom_contract.json` across v0.5/v0.6 VOM annotations. - Fixed `scripts/release.mjs` updating and staging only `CHANGELOG.md` while omitting `CHANGELOG.zh-CN.md`, aligned `scripts/check-crate-skill.mjs` with the canonical 2,000-byte `SKILL.md` budget, added root `AGENTS.md` guardrails, and removed stale protocol/CLI references from repository docs and Rust test fixtures. - Fixed `bsk click`, `bsk hover` and the other commands that resolve `--selector` the same way (`fill`, `press`, `select`, `scroll-to`, `wheel`, `wait-for-element`) reporting a selector Chrome cannot parse, such as Playwright's `button:has-text("Go")` or `text=Go`, as `cdp_failed` with the raw `{"code":-32000,"message":"DOM Error while querying"}`: they now return `invalid_params` with `Invalid CSS selector: …`, as `bsk read` and `bsk extract` already did (#848). ## [0.6.0] - 2026-11-30 ### Added - `bsk open` (and MCP `bsk_session` `action: "open"`) now accepts `--wait-until` / `wait_until` (`load|domcontentloaded|networkidle|commit`, defaulting to `load`), matching `bsk navigate` so heavy SPAs do not wait for a full `load` timeout before syncing. - Release benchmarks now report empirical `pass@k`, `pass^k`, and flaky cases across independent runs of the same candidate and test plan. - **MCP 100% parity**: Added `bsk_ledger`, `bsk_debug`, `bsk_video`, and `bsk_record` first-class tools alongside full CLI parity on existing tools (`session open/stop --all`, `sync` waits/filters, `wait_ms`, `view`, full-page `screenshot` / `extract` `--out`/`--overwrite`/`--format`/`--csv-safe`, `read` `context`, `upload`/`download`, `tab_borrow`, full `emulate`, and `operation_await --out/--overwrite`), unified behind request-scoped `ClientContext`. - **Compile-time `MethodSpec` & `RpcErrorReason` SSOT**: Defined exhaustive `bsk_protocol::method::MethodSpec` metadata across all 77 RPC methods (exported to TypeScript `transport/generated/`) and exhaustive `RpcErrorReason` variants with dual CLI/MCP recovery hints (`cli_hint` / `mcp_hint`). - DeepSeek Harness (`dsh`) is now a first-class skill installation target via `bsk install-skill --harness dsh` (honoring `$DSH_HOME`, defaulting to `~/.dsh/skills`), `DSH_SESSION_ID` is recognized as an automatic host subagent scope in `ImplicitScopeRegistry`, and MCP `bsk_session(action="start")` now accepts `agent_name`, `project`, and `controller_color` controller identity labels matching `bsk session start` (#731). - Added an **Open Agent Windows minimized** preference under popup Automation settings (`bsk_interaction_preferences.openAgentWindowMinimized`, off by default) so background Agent Windows can start directly in the minimized state without flashing a normal window frame on screen, while keeping explicit foreground sessions (`--focus`) and action recording visible ([#649](https://github.com/Tencent/BrowserSkill/issues/649)). - Added `BSK_SESSION_IDLE` and `BSK_DAEMON_IDLE` environment variable fallbacks for configuring session and local daemon idle timeouts across automatic startup, `bsk daemon start`, `bsk daemon restart`, and `bsk update` restarts (CLI flags always take precedence, empty values are ignored, and `BSK_DAEMON_IDLE` is ignored in `--mode server`) ([#456](https://github.com/Tencent/BrowserSkill/issues/456)). ### Changed - Building the Rust workspace from source now requires Rust 1.89.0. This covers both the locked dependencies and file locking in the update regression tests. - **Complete `browser-driver/` boundary encapsulation, strict `CdpRunner` RAII contract, unified `--selector` DOM predicates, and structured VOM metadata**: Sealed `CdpTarget`, `CdpFrame`, `CdpFrameGraph`, `sendToTarget`, `sendGuarded`, `sendAttached`, and `getFrameGraph` inside `apps/extension/src/browser-driver/` behind `FrameDocumentHandle`, `FrameNodeHandle`, `FrameProcessBoundary`, and `TabEventSource` across all remaining upper-layer modules (`read`, `extract`, `waits`, `wheel`, `drag`, `action-guard`, `vom/facts`, `AccessibilityLease`, `debug/`, `recording-runtime`, and `geometry/frame-context`); promoted all `CdpRunner` methods to a non-optional interface backed by `delegateCdpRunner`, `createStubCdpRunner`, and deterministic RAII `withObjectGroup` / `withRemoteObject` V8 handle release (`handleSelect`, `handleFill`, `handleFocus`/`handleBlur`, `action-checks`, `file-input-transaction`, `file-drop-transaction`, `waits`, `element-geometry`, `cdpRunnerForFrame`, and `evaluate` with `return_by_value: false`, without resurrecting detached tabs or masking pre-dispatch errors); unified cross-frame, open Shadow DOM, `[data-bsk-overlay]` / `[data-bsk-overlay-host]` exclusion, sensitive `autocomplete`, and interactive ARIA role predicates across `interaction`, `CooperationController`, `human-loop`, `read`, `extract`, and `content/dom-primitives`; and converged `cooperate sync` and `observe` onto structured `@browser-skill/vom` `VomLineMetadata` (`inspectVomLine` and `VOM_DERIVED_NAME_CAP`). - **Lightweight `@wxg-prc-cpg/browser-skill-dsh-plugin` on the unified `bsk` CLI runtime**: Replaced the ~22k-LOC bespoke `bsk_*` wrapper and Web UI bundle in `packages/dsh-plugin-browserskill` with a lightweight Cordis plugin (free of `@deepseek-ai/dsh-*` host `rc` peer locks) that packages the canonical `crates/bsk-cli/skill` bundle, automatically heals host `PATH` for `~/.local/bin` (`$BSK_INSTALL_DIR`) and configured `bskPath`, and bundles an on-demand cross-platform `bsk` CLI + browser extension setup workflow (`bin/install-bsk.mjs` + `AGENT_INSTALL.md`) sharing the standard `bsk` CLI and `DSH_SESSION_ID` daemon scoping alongside restored `dsh-plugin-v*` release automation. - **Zero-tax Chrome MV3 `registration: "runtime"` dual-tier content script injection, SW-startup orphan Agent Window reaping, and shared `content/dom-primitives.ts`**: Migrated all four MV3 content-script entrypoints (`content`, `cooperation.content`, `record-frame.content`, and `long-screenshot-page.content`) out of static `manifest.json` `content_scripts` into idempotent runtime injection (`claimIdempotentContentScript`) with `noScriptStartedPostMessage: true` so ordinary browsing incurs zero content-script, `window.postMessage`, or React 19 overhead; injected Tier A (`content.js` and `long-screenshot-page.js`) per `tabId`/`documentId` via idempotent `ensureOverlayInjected` across controlled task tabs, `webNavigation.onCommitted` (including Speculation Rules prerender outermost frames, sequenced strictly after Tier B `cooperation.js` arming/repair), pre-confirmation `tab_borrow` candidate user tabs, `request_help`, `record`, and active `video` overlays while skipping uninjected tabs on `hidden` / `CAPTURE_SUPPRESS` / `INPUT_PASSTHROUGH`; dynamically registered/unregistered pure-TypeScript Tier B (`cooperation.js` and `record-frame.js`) with `persistAcrossSessions: false` when active sessions or recordings transition between `0` and `>= 1`, loading silently at `document_start` with 0 DOM listeners and 0 startup IPC until armed by Background (`COOPERATION_ARM_FRAME` / `RECORD_FRAME_START` plus 50ms per-tab subframe coalescing, `cooperation.js` co-injection in `injectRecordFrameAllFrames`, and non-destructive per-frame `injectCooperationAllFrames` repair across `tab_borrow`, `ack === undefined` frames, and dynamically inserted light-DOM or open/closed `ShadowRoot` `about:blank` / `srcdoc` subframes); tracked dedicated Agent Window `ownedTabIds` in `chrome.storage.session` (`bsk.orphan_agent_windows`) to reap orphaned pure Agent Windows on Service Worker restart without ever closing windows containing user, borrowed, or human-preserved tabs; and extracted `apps/extension/src/content/dom-primitives.ts`. - **Single daemon `tool_pipeline`, 4-module `daemon/ipc` decomposition, non-blocking persistence, and shared `cli::orchestration` kernel**: Decomposed 3,489-line `daemon/ipc.rs` into `daemon/tool_pipeline.rs` (single unified `tool.*` pipeline with RAII `AuditTicketGuard`, `SessionActivityGuard`, `ToolInflightRegistry`, `IntentWal`, and post-settlement scope/run-log reconciliation), `daemon/ipc_sessions.rs`, `daemon/ipc_transport.rs`, and a slim `daemon/ipc.rs` router; promoted exhaustive `OutcomeKind` (`bsk-protocol`) / `Outcome` (`daemon/tool_policy.rs`) routing in `daemon/queue.rs`; moved `TransferRegistry` staging/import/session-teardown I/O, `AuditStore` JSONL `sync_data()` writes (including `session.user_interrupt` markers), and monotonic-sequence `IntentWal` flushes/atomic `sync_data()` compactions out of global state `Mutex`es and Tokio worker threads via `spawn_blocking`; and extracted `cli/orchestration.rs` to share Canvas screenshot point-click validation, `open`/`sync`/action/positive timeout bounds, explicit `--session` + `--browser` conflict checks, cached VOM hydration, and 2-second `CANCEL_RESPONSE_GRACE` settlement across `bsk` CLI and `bsk mcp`. - **100% strongly typed `bsk-protocol` contracts, typed `EventFrame` payloads, out-of-band WS correlation, and native `ActionMetadata` SSOT**: Replaced all 19 remaining `serde_json::Value` RPC contracts in `Method::contract_meta` (`ToolCooperate`, `LocalAuth*`, `AuditRequest`, `LedgerRequest`, `Session*`, `BrowserList`, `ToolOperationAwait`, and `Transfer*`) with strict Rust/JSON Schema structs, replaced untyped `EventFrame.payload: Value` across Rust and TypeScript with an exhaustive 10-variant `EventFrame` discriminated union, moved `_audit_id` and `_operation_id` out of business `params` into top-level `RequestFrame` envelope fields (deleting in-place `params` mutation and `stripEnvelopeParams`), embedded `ActionMetadata` / passive `context_id` natively with `#[serde(deny_unknown_fields)]` across all 23 `Full` and 9 passive-read `*Params` structs (eliminating post-hoc `catalog.rs` JSON Schema surgery and manual 4-key copy/re-insertion in `daemon/ipc.rs`), and unified `MethodSpec.action_metadata` (`Full` / `ContextOnly` / `TabBindingContext` / `Dynamic` / `None`) as the single source of truth across `bsk-protocol` and `bsk-cli`. - **Unified daemon session teardown, strongly typed `IpcEnvelope`, and MCP host-scope lifecycle**: Converged all 6 session teardown paths across `state.rs`, `ws.rs`, `ipc.rs`, `start.rs`, `session_requests.rs`, and `sessions.rs` into `DaemonState::teardown_session(session_id, reason)` covering all 12 session-associated state tables, promoted `HOST_AGENT_ENV_KEYS` ahead of transient `mcp::` scopes so `bsk mcp` and `bsk` CLI within the same host agent thread share one implicit session (while immediately stopping orphan sessions on `stdio` EOF or disconnect read errors only for exclusive transient `mcp:` scopes), added 256-entry LRU eviction for inactive scope tombstones and idle `start_locks`, and replaced private `_`-prefixed IPC JSON fields with strongly typed `IpcEnvelope` metadata (`IpcRequestMeta` / `IpcResponseMeta`) negotiated via `StatusResult.ipc_envelope` and `DaemonInfo.ipc_envelope` (preserving bidirectional rolling-upgrade compatibility with pre-envelope `"2.0"` `bsk mcp`, CLI, and daemon processes) plus explicit extension-WS `WsCorrelation`. - **Single `TabAttachment` state machine & `FrameNodeHandle` addressing**: Collapsed `ChromiumCdp`'s 33 parallel per-tab `Map`/`Set` fields into a single `Map` discriminated union (`detached | attaching | attached | soft_detached`), made `onEvent(tabId, handler)` a tab-scoped `Disposable` subscription holding an automatic idle lease, and sealed all transient `cdpSessionId` routing inside `browser-driver/` behind `FrameNodeHandle` and `FrameDocumentHandle` across `RefStore`, VOM visual observation and capture mappings, `read`, `extract`, `observation`, `interaction`, `waits`, `human-loop`, `recording`, and `CooperationController`. - **Protocol `2.0` baseline**: Raised `PROTOCOL_VERSION` and `MIN_COMPATIBLE_PROTOCOL` to `"2.0"`, eliminated extension/daemon legacy version drift, and slimmed `apps/extension/src/transport/generated/validators.js` by over 60% (`~992 KB` -> `<= 390 KB`). - **Daemon & extension routing consolidation**: Replaced 9 independent handwritten method tables and `OnceLock` process globals with generated/exhaustive `MethodSpec` tables and explicit `ClientContext` request state. - Unified all real-browser test and regression harnesses onto `BSK_TEST_CHROME` and `BSK_TEST_CLI` (resolving Windows `.exe` binaries and stripping host agent scope env vars in isolated daemon fixtures), separated `.browser.test.ts` and `.bench.ts` from the unit Vitest configuration into `apps/extension/vitest.browser.config.ts` and `scripts/run-browser-tests.mjs` (routing `pnpm --filter @browser-skill/extension test:browser` through the runner and enforcing `skipped === 0`, non-empty suite assertions, and per-target suite coverage), and wired every extension `.browser.test.ts` suite plus `eval:browser:check` and `eval:browser:dynamic-read` into CI (#731, #732). - Converged scattered default daemon ports, WebSocket URLs, pairing/auth protocol constants, instance ID length, JSON-RPC standard error codes, and `BASE_TOOL_NAMES` into `bsk-protocol` / `bsk` SSOT exports (eliminating hand-maintained duplicates and brittle collection-length assertions), consolidated Rust integration test binaries from 51 to 6 while adding `debug = "line-tables-only"` for `dev`/`test` profiles, split extension Vitest unit runs into `unit-node` and `unit-dom` projects under `threads` pool while removing dead/trivial tests and consolidating single-helper files, replaced fixed wall-clock test sleeps with deterministic clock/mtime/readiness control, added `copyIsolatedExtension` to eliminate redundant per-port `ext:build` CI steps, and added Rust Cargo cache and batched CI steps in `.github/workflows/ci.yml`. ### Fixed - Fixed stale `1.x` `daemon.json` files blocking daemon auto-start after upgrading to protocol `2.0`: `ensure_daemon_optimistic_with_protocol` now takes the 0-RTT optimistic fast path only when the cached `protocol_version` is compatible, falling through to the live IPC probe otherwise so dead leftover Unix sockets (and stale Windows named-pipe paths) automatically start a fresh `2.0` daemon while genuinely running incompatible daemons are rejected cleanly with restart-or-update guidance across CLI (including `bsk recipe draft`) and MCP. - Eliminated false VOM `L1`/`L2` page occlusion (`L2 page … occluded by L1`) and stale narrow-screen layer baselines on responsive layouts, fixed-viewport app shells, and full-viewport negative-`z-index` backgrounds across `snapshot`, `observe`, and `sync`: `decodeDocument` and `normalizeDocument` treat CSS `visibility: hidden`/`collapse` boxes and zero-size non-root `overflow: hidden`/`clip` containing-block descendants (including `position: fixed` descendants inside `transform`/`perspective`/`contain` drawers while never clipping at `html`/`body`) as non-hit-testable (`pointerEvents: "none"`, non-clickable, non-modal) while keeping `visibility: visible` descendants actionable and multiplying ancestor group `opacity` for `rendered`; `detectBlockingLayer` excludes `html`/`body`/`main` document shells, same-frame non-dialog layout containers wrapping `
`, and backgrounds behind the document's root stacking context (`isBehindPageNormalFlow`, keeping `z-index: -1` backdrops inside positive-`z-index` modal wrappers blocking and keeping opaque app shells eligible in `applyActiveRegionPolicy` to hide behind-shell drawers); and `CooperationController` invalidates cached `state.baseline` observations on `tool.emulate` and layout-viewport changes (`FrameState.viewport`, anchored to the last full capture's `viewportBaseline` and enforced in `verifyEvidence`) so CSS `@media` breakpoint transitions without DOM mutations re-capture and re-verify fresh VOM layers instead of replaying cached `unchanged` snapshots. - Fixed saving without `--overwrite` (`bsk extract --out`, `bsk download --out`, and the other outputs committed through the same path) failing with `Incorrect function. (os error 1)` on Windows volumes that have no hard links, such as exFAT and FAT32 drives: the no-replace commit now uses a rename that fails when the destination exists instead of a hard link, so an existing file is still never overwritten (#841). - Fixed `bsk fill` failing on empty ProseMirror rich-text editors whose placeholder paragraph contains a noneditable `.ProseMirror-widget[contenteditable="false"]` (with optional empty `img.ProseMirror-separator` and single trailing `
`): `handleFill` now treats such decorated empty paragraphs as empty during value readback/clearing and accepts ProseMirror's normalized caret position inside the paragraph while still rejecting non-empty text, real images, or multi-break paragraphs. - CLI `--out` commands (`screenshot`, `get-html`, `download`, `extract`, `video stop`/`save`, `operation await`, `recipe draft`) and matching MCP tools (`bsk_inspect` screenshot/extract, `bsk_interact` download, `bsk_video` `stop`/`save`, `bsk_assist` `operation_await`) now reject unusable output destinations (empty paths, directories/trailing separators, missing parent directories, or non-directory parents) before contacting the daemon or starting a capture, reporting `local file validation failed` with an `--out` recovery hint while preserving each command's `--overwrite` semantics for existing regular files (including CSV `.meta.json` sidecar checks in MCP `extract`). - `bsk extract` now applies the page's CSS `text-transform` to the selected `` controls (such as CSRF ``, password, and file inputs whose `.value` cannot appear in `textContent`) from redacting container `read: "text"` fields in `bsk read` while stripping excluded descendant subtrees (`