diff --git a/CHANGELOG.md b/CHANGELOG.md index f7231b3e..ed7af1bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,16 +5,42 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/). Starting from 0.2.0, CLI / Extension / DSH Plugin share the same version number. -## [Unreleased] +## [0.3.3] - 2026-10-14 ### Changed - **Breaking — DSH Plugin:** replace `browser_session`, `browser_page`, `browser_inspect`, `browser_interact`, `browser_tabs`, and `browser_assist` with the corresponding `bsk_*` names to coexist with other browser plugins. - Actions, arguments, results, and the `browser-skill` skill name are unchanged. + The tool-name migration leaves actions, arguments, results and the + `browser-skill` skill name unchanged. + Old tool names are not registered as aliases. Upgrade the CLI and extension + to the coordinated 0.3.3 release before upgrading the plugin. Update hardcoded calls and tool policies, restart the host, and reload the skill - in existing conversations. See the [migration guide](packages/dsh-plugin-browserskill/README.md#breaking-tool-api-migration-unreleased). + in existing conversations. See the [migration guide](packages/dsh-plugin-browserskill/README.md#breaking-tool-api-migration-033). +- CLI releases require verified Windows EV signing before publication. Builds, + internal signing and final publication are separate stages. Windows archives + contain the verified signed executable, and `version.json` hashes the final archives. +- External links and manually created tabs that land in a background Agent Window + are routed to a normal user window, preserving task popups and human-assistance + or recording flows. Pending external tabs are excluded from default tool targeting. +- English and Chinese privacy policies describe task video capture, the + `offscreen` permission, browser-local retention, authorized video exports and + deletion. The main READMEs document video recording and the DSH migration. + +### Added + +- [Task video recording](docs/video-recording.md): opt-in, silent H.264 MP4 capture + of one authorized tab through CLI, DSH or extension controls, with preview, + export, deletion and recovery of playable partial recordings. Recordings have + a 10-minute duration limit, a 256 MiB size limit and 24-hour retention. +- [Structured extraction](docs/structured-extraction.md): discover and export + loaded tables and lists as JSON/CSV, retaining column order, page/frame sources, + merged-cell metadata and explicit completeness information. DSH bounds rows + returned to the model context. +- [Element condition waits](docs/wait-for-element.md) in the CLI, extension and + DSH `bsk_page` tool, with explicit deadlines and recovery guidance. +- CLI browser-selector errors list connected browsers when no instance matches. ### Fixed @@ -29,6 +55,22 @@ Starting from 0.2.0, CLI / Extension / DSH Plugin share the same version number. background-execution lease resends the override and waits for a rendered frame; the input is sent only once the page reports `visible`, and otherwise still fails before dispatch. +- Fill editable controls and editor paragraphs through their editing host while + preserving the target paragraph's scope; reject noneditable targets and use a + consistent line model for reading editor text. +- Downloads detect when the browser ignores the requested transfer directory and + validate the final path before importing a file. +- Element waits enforce state and deadline contracts, treat absent elements as + hidden, and retry selectors after stale-node lookups. +- Structured extraction preserves DOM values and bounded partial results, keeps + split grid rows together, and respects nested row ownership and frame visibility. +- CLI navigation exits with code 4 when its lifecycle wait times out; DSH retains + the created session when start-with-URL navigation times out. +- Video recording keeps startup cancellable, bounds capture waits, recovers from + navigation and transient overlay-discovery failures, prevents control-overlay + flashes, and selects an H.264 level appropriate for larger frames. +- Avoid unnecessary debugger cancellation and incomplete tab cleanup in Yandex; + preserve task-popup provenance and recover transient focus changes. ## [0.3.2] - 2026-09-30 diff --git a/Cargo.lock b/Cargo.lock index b56a2a20..27bea178 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -134,7 +134,7 @@ dependencies = [ [[package]] name = "bsk" -version = "0.3.2" +version = "0.3.3" dependencies = [ "anyhow", "base64", @@ -176,7 +176,7 @@ dependencies = [ [[package]] name = "bsk-protocol" -version = "0.3.2" +version = "0.3.3" dependencies = [ "indexmap", "schemars", diff --git a/Cargo.toml b/Cargo.toml index 925b13ae..604bd625 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ members = [ default-members = ["crates/bsk-cli"] [workspace.package] -version = "0.3.2" +version = "0.3.3" edition = "2024" rust-version = "1.85" license = "MIT" @@ -43,7 +43,7 @@ rand = "0.8" uuid = { version = "1", features = ["v4", "serde"] } # Workspace crates (version required for `cargo publish` of dependents) -bsk-protocol = { version = "0.3.2", path = "crates/bsk-protocol" } +bsk-protocol = { version = "0.3.3", path = "crates/bsk-protocol" } [profile.release] strip = "symbols" diff --git a/README.md b/README.md index 1e3c82da..566fa947 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,8 @@ Use the `bsk` CLI with Cursor, Claude Code, Codex, OpenClaw, CodeBuddy, WorkBudd | **Choose the right browser** | Name browser instances, bind a task to a specific profile, or pair an agent running on a server with a browser on your computer. | | **Review what happened** | Reopen browser-local debugging history, export evidence as JSON, or enable a separate operation audit to review task activity. | | **Extract structured data** | Export loaded tables and lists as JSON/CSV with column names, page/frame sources, merged-cell metadata and explicit coverage. See [structured extraction](docs/structured-extraction.md). | +| **Record a task as video** | Ask the agent to record one authorized tab as a silent MP4, then preview, save or delete the video from the extension. See [task video recording](docs/video-recording.md). | +| **Wait for page conditions** | Wait for a requested element condition with an explicit timeout before continuing a workflow. See [element waits](docs/wait-for-element.md). | Watch a browser task in action: @@ -158,6 +160,8 @@ In WorkBuddy/CodeBuddy, or hosts that reap command children, the agent should re The [DSH plugin](packages/dsh-plugin-browserskill/README.md) adds native `bsk_*` tools, browser task previews, and screenshot results to the DeepSeek Harness Web UI. It uses the same `bsk` CLI and extension and includes its own BrowserSkill skill. +**Upgrading to 0.3.3:** update the CLI and extension before the plugin. The six `browser_*` tools have been renamed to `bsk_*`, without aliases for the old names. Update custom tool calls and policies, restart the DSH profile, and invoke `/browser-skill` again in existing conversations. See the [migration guide](packages/dsh-plugin-browserskill/README.md#breaking-tool-api-migration-033). + With DeepSeek Harness, pnpm, and `bsk` installed and the extension connected, add the plugin to your profile: ```sh @@ -217,7 +221,7 @@ The name is set in BrowserSkill; it is not automatically taken from Chrome's pro Keep the browser and its logins on your computer while the agent, CLI, and daemon run on a server. Pair the extension with that server over authenticated WSS; the browser initiates the connection, so your computer needs no inbound port. -The built-in server supports device pairing, renewal, and revocation. Remote mode currently does not support file upload or download. [Remote connection guide](docs/remote-extension-connection.md) +The built-in server supports device pairing, renewal, and revocation. The `bsk upload` and `bsk download` file-transfer commands remain local-only. Authorized video exports can write to the CLI machine, including a remote server; Save MP4 as in the extension writes to the browser computer. [Remote connection guide](docs/remote-extension-connection.md) ## Browser control and privacy @@ -234,12 +238,13 @@ These browser settings apply to existing and new sessions. Legacy `--unattended` BrowserSkill does not operate a mandatory cloud service or collect product telemetry. Automation results go to your selected daemon or gateway and the agent using it; that agent or service may process or retain them under its own policies. The extension does not independently call an AI provider. -| Optional history | Where it is saved | What to know | +| Optional history and recordings | Where it is saved | What to know | | --- | --- | --- | | **Website debugging** | The current browser profile, including in remote mode | Retains captured evidence, including available bodies and field values. Stopped records expire after 30 days, with a 50-record / 50 MiB retention budget and earlier eviction when necessary. Stop capture before deleting a record. | | **Operation audit** | The daemon's host, under `BSK_HOME/audit` | Off by default. Records task and operation metadata, excluding input values, page bodies, screenshots, and file contents. Ended tasks expire after 30 days. | +| **Task video** | The current browser profile; exported copies at the chosen destination | Opt-in, silent capture of one authorized tab, limited to 10 minutes / 256 MiB per video. Recordings expire 24 hours after creation; the temporary video budget is 1 GiB. The library supports preview, export and deletion. | -Both offer export and deletion. Stopping a task or disconnecting does not delete saved history; expiration is applied during history access or cleanup. Exported copies and copies already received by an agent or gateway must be managed separately. Known secrets are filtered from debugging evidence, but redaction cannot guarantee that all sensitive data is removed. +These features offer export and deletion. Stopping a task or disconnecting does not delete retained history or videos; expiration is applied during access or cleanup. Exported copies and copies already received by an agent or gateway must be managed separately. Known secrets are filtered from debugging evidence, but redaction cannot guarantee that all sensitive data is removed. Video frames are not automatically redacted; review visible content before sharing. [Privacy policy](apps/extension/PRIVACY.md) · [Operation audit](docs/operation-audit.md) · [Debugging retention and limits](docs/website-debugging.md#history-and-export) @@ -281,6 +286,9 @@ Stop the daemon in its owning host or supervisor, update with `bsk update --yes | Install and verify with an agent | [Agent setup](AGENT_INSTALL.md) | | Investigate a website or API | [Website debugging](docs/website-debugging.md) | | Capture long pages | [Full-page screenshots](docs/long-screenshot.md) | +| Record and save a task video | [Task video recording](docs/video-recording.md) | +| Export tables or lists | [Structured extraction](docs/structured-extraction.md) | +| Wait for an element condition | [Element waits](docs/wait-for-element.md) | | Use a specific account or profile | [Browser profiles](docs/browser-profiles.md) | | Connect a server-side agent | [Remote browser connections](docs/remote-extension-connection.md) | | Run in a sandbox | [Sandboxed agents](docs/sandboxed-agents.md) | diff --git a/README.zh-CN.md b/README.zh-CN.md index f851205e..9e4d19e4 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -35,6 +35,8 @@ Cursor、Claude Code、Codex、OpenClaw、CodeBuddy、WorkBuddy、Pi、Hermes Ag | **选对浏览器和账号** | 为浏览器实例命名,让任务绑定指定 Profile;也可以让服务器上的 Agent 连接你电脑上的浏览器。 | | **回看任务过程** | 重新打开浏览器本地的调试历史、导出 JSON,或单独开启操作审计,查看任务执行记录。 | | **提取结构化数据** | 将已加载的表格和列表导出为 JSON/CSV,保留列名、页面/frame 来源、合并单元格信息和完整性标记。见[结构化提取说明](docs/structured-extraction.md)。 | +| **录制任务视频** | 让 Agent 将一个已授权标签页录制为无声 MP4,再从扩展中预览、保存或删除视频。见[任务视频录制](docs/video-recording.md)。 | +| **等待页面条件** | 设置明确的超时,等待目标元素满足指定条件后再继续操作。见[元素等待](docs/wait-for-element.md)。 | 看看 Agent 如何完成一次浏览器任务: @@ -158,6 +160,8 @@ bsk session stop [DSH 插件](packages/dsh-plugin-browserskill/README.md) 在 DeepSeek Harness Web UI 中提供原生 `bsk_*` 工具、浏览器任务预览和截图结果。它使用同一套 `bsk` CLI 与扩展,并自带 BrowserSkill skill。 +**升级到 0.3.3:**先更新 CLI 和扩展,再更新插件。六个 `browser_*` 工具已改名为 `bsk_*`,不保留旧名称别名。请更新自定义工具调用和策略,重启 DSH profile,并在已有对话中重新调用 `/browser-skill`。详见[迁移指南](packages/dsh-plugin-browserskill/README.md#breaking-tool-api-migration-033)。 + 安装好 DeepSeek Harness、pnpm 和 `bsk`,连接扩展后,将插件加入你的 profile: ```sh @@ -217,7 +221,7 @@ bsk session start --browser "工作账号" --no-focus --json 保留本机浏览器和登录态,让 Agent、CLI 与 daemon 在服务器运行。扩展通过经过鉴权的 WSS 与服务器配对,由浏览器主动建立连接,本机无需开放入站端口。 -内置服务端支持设备配对、续期和撤销授权。远程模式目前不支持文件上传和下载。详见[远程连接指南](docs/remote-extension-connection.md)。 +内置服务端支持设备配对、续期和撤销授权。`bsk upload` 和 `bsk download` 文件传输命令仍仅支持本地模式。经过授权的视频导出可以写入 CLI 所在计算机,包括远程服务器;扩展中的“另存为 MP4”写入浏览器所在计算机。详见[远程连接指南](docs/remote-extension-connection.md)。 ## 浏览器控制与隐私 @@ -234,12 +238,13 @@ bsk session start --browser "工作账号" --no-focus --json BrowserSkill 没有必须使用的云服务,也不收集产品遥测。自动化结果交给你选定的 daemon 或网关,以及使用它的 Agent;对应 Agent 或服务可能按自身政策处理或保留数据。扩展不会自行调用 AI 提供商。 -| 可选历史记录 | 保存位置 | 需要知道的事 | +| 可选历史与视频记录 | 保存位置 | 需要知道的事 | | --- | --- | --- | | **网站调试** | 当前浏览器配置中,远程模式也一样 | 保存采集到的数据,包括可获取的正文和字段值。已停止记录 30 天后过期,保留预算为 50 条/50 MiB,达到限制时可能提前清理。删除记录前需先停止采集。 | | **操作审计** | daemon 所在主机的 `BSK_HOME/audit` | 默认关闭。记录任务与操作元数据,不记录输入值、页面正文、截图或文件内容。已结束任务 30 天后过期。 | +| **任务视频** | 当前浏览器配置;导出副本保存在指定位置 | 主动开启后,录制一个已授权标签页的无声视频;单个视频上限为 10 分钟/256 MiB,创建 24 小时后过期,临时视频预算为 1 GiB。视频库支持预览、导出和删除。 | -两者均可导出和删除。结束任务或断开连接不会删除已保存的历史,过期记录会在访问历史或执行清理时处理。导出的文件、Agent 或网关已经收到的副本需要另行管理。调试数据会过滤已知敏感信息,但不能保证完全脱敏。 +这些功能均支持导出和删除。结束任务或断开连接不会删除保留的历史或视频,过期数据会在访问或清理时处理。导出的文件、Agent 或网关已经收到的副本需要另行管理。调试数据会过滤已知敏感信息,但不能保证完全脱敏。视频画面不会自动脱敏,分享前请检查可见内容。 [隐私政策](apps/extension/PRIVACY.zh-CN.md) · [操作审计](docs/operation-audit.md) · [调试历史与保留限制](docs/website-debugging.md#history-and-export) @@ -281,6 +286,9 @@ dsh plugin --profile web update @wxg-prc-cpg/browser-skill-dsh-plugin --latest | 让 Agent 安装并验证连接 | [安装指南](AGENT_INSTALL.md) | | 排查网站或接口问题 | [网站调试](docs/website-debugging.md) | | 截取长页面 | [长截图](docs/long-screenshot.md) | +| 录制并保存任务视频 | [任务视频录制](docs/video-recording.md) | +| 导出表格或列表 | [结构化提取](docs/structured-extraction.md) | +| 等待元素条件 | [元素等待](docs/wait-for-element.md) | | 使用指定账号或 Profile | [浏览器 Profile](docs/browser-profiles.md) | | 连接服务器上的 Agent | [远程浏览器连接](docs/remote-extension-connection.md) | | 在沙盒中使用 | [沙盒环境配置](docs/sandboxed-agents.md) | diff --git a/apps/extension/PRIVACY.md b/apps/extension/PRIVACY.md index 0215a7be..2c550c00 100644 --- a/apps/extension/PRIVACY.md +++ b/apps/extension/PRIVACY.md @@ -1,6 +1,6 @@ # BrowserSkill — Privacy Policy -**Last updated:** September 30, 2026 +**Last updated:** October 14, 2026 This Privacy Policy describes how the **BrowserSkill** browser extension (the "Extension") handles information when you install and use it. BrowserSkill is published as part of the open-source [BrowserSkill](https://github.com/Tencent/BrowserSkill) project. The source code is publicly auditable. @@ -14,10 +14,12 @@ BrowserSkill lets a user-directed AI agent drive a Chromium browser through the ## 2. Single Purpose -The Extension exposes browser automation primitives to the user's selected BrowserSkill daemon or compatible gateway so an AI agent can interact with web pages on the user's behalf. Local connections use loopback WebSocket; remote connections use authenticated WSS. Remote upload and download are unsupported in this version. +The Extension exposes browser automation primitives to the user's selected BrowserSkill daemon or compatible gateway so an AI agent can interact with web pages on the user's behalf. Local connections use loopback WebSocket; remote connections use authenticated WSS. The `bsk upload` and `bsk download` file-transfer commands are limited to local mode; authorized video exports use a separate mechanism described below. Optional website debugging helps the user or their agent inspect requests, page behavior and performance in the same authorized browser task, with browser-local history for later review. +Optional task video recording captures one authorized tab as a silent MP4 so the user can review or save the task's visible progress. It is separate from semantic action recording and website debugging. + ## 3. Data the Extension Accesses Depending on the commands the user (via their AI agent) sends to the selected daemon or gateway and the features the user starts in the Extension, it may access the following categories of data **on the user's local device**: @@ -31,15 +33,17 @@ Depending on the commands the user (via their AI agent) sends to the selected da | **Local extension storage** | A randomly generated 8-character instance ID, an optional user-supplied label, feature preferences including the audit toggle, and optionally a paired endpoint and device credential. | Used to recognize this browser instance and restore user settings. | | **File transfers requested by the agent** | Local files explicitly supplied to `bsk upload`, and the file created by a single `bsk download` action. | Required to attach a task file to a web page or return a browser-generated download to the invoking local agent. | | **Screenshot exports requested by the user** | Screenshot image data, including full-page captures, and a suggested filename when the user chooses to save an image from the preview. | Used to save the requested image through the browser's Save As dialog. | +| **Task video recordings** | Rendered frames of the selected task tab; a silent MP4; and metadata such as tab title, task/tab IDs, timestamps, duration, quality, size, completion state and interruption reason. | Used to record an explicitly requested task, recover playable partial recordings, and let the user preview, export or delete the result. | | **OS notifications** | System notifications for tab-borrow approval and agent requests for human assistance. | Used to request per-tab consent when browser confirmation is enabled, or alert the user to a task that needs manual action, such as login or verification, when human-help requests are enabled. | ## 4. Data Collection Boundaries - The Extension sends automation results only to the daemon or gateway the user selects. BrowserSkill's authors do not receive telemetry or operate a mandatory hosted service. - The Extension does not independently call LLM, AI or cloud APIs and contains no AI provider API keys. -- BrowserSkill does not enumerate the browser's browsing-history database, bookmarks, saved passwords or autofill databases. Website debugging creates its own history of the selected tab's activity during capture; this is separate from the browser's browsing-history database. Download handling supports user-requested screenshot exports and the download initiated by an active local `bsk download` call; it does not enumerate download history. +- BrowserSkill does not enumerate the browser's browsing-history database, bookmarks, saved passwords or autofill databases. Website debugging creates its own history of the selected tab's activity during capture; this is separate from the browser's browsing-history database. Download handling supports user-requested screenshot and MP4 exports and the download initiated by an active local `bsk download` call; it does not enumerate download history. - Website debugging starts only when explicitly requested by the user or their agent. Each capture targets one task-created or borrowed tab per task, including network evidence from its frames. Merely opening a tab or moving it into the Agent Window does not authorize capture. During capture, supported manual actions in the selected page are recorded as well as agent actions. - Stopping capture, returning or closing its tab, ending its task, or disconnecting stops new collection but does not delete saved debugging history. After a browser or extension restart, unfinished captures are recovered as interrupted rather than automatically resumed. +- Video recording starts only when explicitly requested by the user or their agent and targets one task-created or borrowed tab. It captures that tab's rendered content, including visible manual activity, without following switches to other task tabs. It does not request microphone or system audio. Recording stops at its time or size limit, or when its tab, task or connection ends; interrupted recordings may retain a playable partial result. Closing the extension popup does not stop an active recording. - Automation uses the existing browser profile. Controlled pages may expose personal data and signed-in website sessions; pairing with a server allows its Agent to operate those pages. - The Extension includes no analytics, advertising, fingerprinting or cross-site tracking system and does not sell user data. @@ -47,7 +51,7 @@ Depending on the commands the user (via their AI agent) sends to the selected da The Extension requests the following Chrome permissions. Each is used solely for the single purpose described above. -- **`debugger`** — Attach the Chrome DevTools Protocol to tabs selected for automation or user-initiated capture, so BrowserSkill can observe, interact with, and capture those pages. During explicitly started website debugging, it also reads network headers and bodies, console and performance evidence, observes page actions and field values, and applies explicitly configured task-local HTTP rules and request replays. +- **`debugger`** — Attach the Chrome DevTools Protocol to tabs selected for automation or user-initiated capture, so BrowserSkill can observe, interact with, and capture those pages. For explicitly requested task videos, it captures rendered frames from the authorized tab. During explicitly started website debugging, it also reads network headers and bodies, console and performance evidence, observes page actions and field values, and applies explicitly configured task-local HTTP rules and request replays. - **`activeTab`** — Allow temporary access to the active tab when the user invokes the Extension, for user-initiated Quick Actions. - **`scripting`** — Inject the full-page screenshot helper into the selected page when it is missing, such as after an extension reload. - **`webNavigation`** — Track page navigation and frames so captures, recordings, and human-help completion checks follow the correct document. @@ -56,8 +60,9 @@ The Extension requests the following Chrome permissions. Each is used solely for - **`alarms`** — Periodically wake the service worker to keep the selected connection alive and renew remote device authorization. - **`idle`** — Detect when the device returns from idle/locked so the Extension can promptly re-establish the selected WebSocket connection after the machine wakes. No idle data is stored or transmitted. - **`notifications`** — Request user approval before borrowing a user-owned tab when browser confirmation is enabled, and alert the user when an active task requests human assistance, such as login or verification, when human-help requests are enabled. Notifications support the user's browser task and are not used for advertising or promotional messages. -- **`downloads`** — Save screenshots, including full-page captures, when the user explicitly exports them from the preview. Also correlate and route the one browser download initiated by an active `bsk download` command. If that claimed transaction fails, BrowserSkill cancels an in-progress file or removes its completed temporary browser file. It is not used to enumerate download history or alter unrelated downloads. -- **`storage`** — Persist a random instance ID, optional label, and feature preferences in `chrome.storage.local`. Remote credentials and website debugging history are stored separately in extension-origin IndexedDB, outside these settings. +- **`downloads`** — Save screenshots, including full-page captures, and recorded MP4 videos when the user explicitly exports them. Track the requested video's download to distinguish successful saves from canceled or failed saves and release its temporary download URL. Also correlate and route the one browser download initiated by an active `bsk download` command. If that claimed transaction fails, BrowserSkill cancels an in-progress file or removes its completed temporary browser file. It is not used to enumerate download history or alter unrelated downloads. +- **`offscreen`** — Run the video encoder worker and manage temporary video download URLs in an extension-owned offscreen document, allowing explicitly started recording and MP4 finalization to continue when the popup closes. This does not capture other tabs, the desktop or audio. +- **`storage`** — Persist a random instance ID, optional label, and feature preferences in `chrome.storage.local`, and track pending video exports in `chrome.storage.session`. Remote credentials, website debugging history and the video catalog are stored separately in extension-origin IndexedDB; video files and recovery fragments use the origin-private file system (OPFS). - **Host permission ``** — Inject a small status overlay (showing "Agent Active") on pages controlled by the agent, and enable automation across whatever sites the user directs the agent to. Remote connections also use this permission for the selected endpoint. Remote page-content access requires a task-created or explicitly borrowed tab. ## 6. Where Data Goes @@ -70,16 +75,20 @@ Website debugging history is saved in the current browser profile even when conn Screenshot exports are saved through the browser's Save As dialog to a location the user chooses. Exporting an image does not itself send the file to a daemon, gateway or external service; screenshots requested by an agent are returned as task results as described above. +Video frames are encoded and temporarily saved in the current browser profile. Opening the local video library does not upload its recordings. Save MP4 as writes to the browser computer through the browser's Save As dialog. An authorized `bsk video save` or `stop --out` request transfers video bytes through the selected daemon or gateway and writes to the specified path on the CLI machine, which may be a remote server. The original connection owner with a valid recording access grant can retrieve the retained video after its task ends, until the recording expires or is deleted. Merely knowing a recording ID does not grant access. An agent or gateway receiving an exported video may retain or share it under its own policies. + When explicitly configured by the user or agent during an active capture, HTTP rules can block or modify requests or supply mock responses. Request replay sends a new request to the same HTTP(S) origin as the source request and current page, using the page's current browser session, including cookies supplied by the browser. Replays can send supplied headers and bodies to that website and change its server-side data. Merely opening history or reading evidence does not replay requests. ## 7. Data Retention - The instance ID, optional label, and feature preferences persist in `chrome.storage.local` until the user uninstalls the Extension or clears extension storage. -- Outside website debugging, page content, screenshots, DOM snapshots, and other observed data are returned to the selected daemon or gateway in response to commands and may be temporarily retained for an active recording or screenshot export until that operation ends or its results are released. Website debugging evidence follows the separate history retention rules below. +- Outside website debugging and task video recording, page content, screenshots, DOM snapshots, and other observed data are returned to the selected daemon or gateway in response to commands and may be temporarily retained for an active semantic action recording or screenshot export until that operation ends or its results are released. Website debugging evidence and task videos follow the separate retention rules below. - Website debugging saves redacted evidence to extension-origin IndexedDB during capture and when capture stops. Stopped records expire after **30 days**, with automatic cleanup when history is read or written. History has retention budgets of **50 records / 50 MiB of serialized data**; older stopped records may be removed earlier to stay within these budgets, while active captures are protected from this cleanup. These budgets do not describe the exact disk size of IndexedDB. Per-capture limits can omit or evict individual requests, bodies and other evidence sooner. - Website debugging history survives task completion and disconnection. Users can delete stopped records from the history page; clearing extension storage or uninstalling removes local history. Previously exported files and copies already received by an agent or gateway are not deleted by these actions or by automatic expiration. +- Task videos, recovery fragments and their catalog survive task completion and disconnection. Recordings expire **24 hours after creation** and expired data is removed on startup or catalog access. Each video is limited to **10 minutes / 256 MiB**, with a **1 GiB** temporary video budget that includes recovery and finalization files; browser storage limits may prevent a recording from starting earlier. Unexpired recordings are not silently deleted to make room. Users can delete retained videos from the library; clearing all extension-local data or uninstalling removes local video data. +- Video access grants are stored in the browser catalog and, for CLI access, in the CLI's private per-user application directory. Video commands remove expired CLI grant files. Grant expiration does not delete exported videos on disk. - Upload and download bytes are staged by the local daemon in a private, session-scoped directory. Download staging is removed after it is copied to the requested destination. Upload staging is retained until the session ends so a later form submission can still read the attached file. Remaining staging is removed when the session ends or disconnects, or when the daemon next starts after a crash. -- Screenshot files saved by the user and files copied to the requested download destination remain on disk until the user deletes them. Closing a task, clearing extension storage or uninstalling the Extension does not delete these files. +- Screenshot and MP4 files saved by the user, authorized CLI video exports, and files copied to the requested download destination remain on disk until the user deletes them. Closing a task, deleting a retained recording, clearing extension storage or uninstalling the Extension does not delete these exported files. - Operation audit is separate from website debugging and is off by default. When enabled, the selected daemon stores task and operation metadata in `BSK_HOME/audit` (by default `.bsk/audit` under the user home directory). Records include timestamps, tool types, website origins, element names with basic redaction, statuses, and error codes. Input values, page bodies, screenshots, scripts, and file contents are excluded from operation audit; these exclusions do not apply to website debugging history described above. Ended tasks are retained for 30 days and pruned when history is loaded, audit is enabled, a task starts, or the task list is queried. Users can export or delete ended tasks from the audit page. Exported copies are not automatically removed. @@ -91,6 +100,7 @@ Users can at any time: - Uninstall the Extension from `chrome://extensions`, which removes extension storage. Audit files on the daemon host and exported copies must be deleted separately. - Stop website debugging from Quick Actions → Website debugging, or ask the agent to stop capture. Open its history page to review or export records and delete stopped records, including when no daemon is connected. Stop an active capture before deleting its record. +- Stop video recording from its extension panel or ask the agent to stop it; stopping a video leaves the browser task running. Use the recent recordings page to preview, save or delete retained videos, including after a task ends. CLI users can use `bsk video stop`, `save` and `discard`. Stop an active recording before deleting it. - Turn operation audit off in Quick Features to stop collecting new audit operations while retaining existing audit history. Previously recorded tasks still receive their final lifecycle status. This switch does not stop website debugging capture or delete its history. - Close the Agent Window to stop all agent automation immediately. - Enable confirmation before borrowing and deny tab-borrow prompts to keep existing tabs off-limits. @@ -110,6 +120,8 @@ Remote page reads and operations require task-owned tabs; merely moving a user t Website debugging redacts recognized credential headers (such as Authorization, Cookie and Set-Cookie), sensitive URL parameters, JSON/form keys and common credential text patterns before retaining evidence. Observed credential, payment and file-input fields are omitted or redacted. This filtering does not guarantee that arbitrary request/response bodies, console messages, page text or field values contain no personal or confidential information. Treat retained and exported evidence as potentially sensitive, review it before sharing, and delete copies that are no longer needed. See [website debugging](../../docs/website-debugging.md) for capture, redaction and retention limits. +Video captures rendered pixels. Website-debugging redaction rules do not automatically mask video frames, so visible personal information and entered text can appear in recordings. Review videos before exporting or sharing them. See [task video recording](../../docs/video-recording.md) for access, recovery and retention details. + ## 11. Open Source and Auditability BrowserSkill is open source. Anyone can verify the claims in this policy by reading the source code in the project repository. The Extension contains no obfuscated or minified code paths that hide network calls. diff --git a/apps/extension/PRIVACY.zh-CN.md b/apps/extension/PRIVACY.zh-CN.md index 738c35d8..91f714a3 100644 --- a/apps/extension/PRIVACY.zh-CN.md +++ b/apps/extension/PRIVACY.zh-CN.md @@ -1,6 +1,6 @@ # BrowserSkill 隐私政策 -**最后更新:** 2026 年 9 月 30 日 +**最后更新:** 2026 年 10 月 14 日 本隐私政策说明 **BrowserSkill** 浏览器扩展(下称"本扩展")在您安装和使用过程中如何处理信息。BrowserSkill 作为开源项目 [BrowserSkill](https://github.com/Tencent/BrowserSkill) 的一部分发布,源代码完全公开,可供审计。 @@ -14,10 +14,12 @@ BrowserSkill 让用户指定的 AI 助手通过 `bsk` 命令行工具操作 Chro ## 2. 单一用途 -本扩展向用户选择的 BrowserSkill 守护进程或兼容网关提供浏览器自动化能力,让 AI 助手按用户要求操作网页。本地连接使用回环 WebSocket,远程连接使用经过鉴权的 WSS。当前版本的远程模式不支持上传和下载。 +本扩展向用户选择的 BrowserSkill 守护进程或兼容网关提供浏览器自动化能力,让 AI 助手按用户要求操作网页。本地连接使用回环 WebSocket,远程连接使用经过鉴权的 WSS。`bsk upload` 和 `bsk download` 文件传输命令仅支持本地模式;授权的视频导出使用下文说明的独立机制。 可选的网站调试功能让用户或其 Agent 在同一项已授权的浏览器任务中检查请求、页面行为和性能,并将调试历史保存在浏览器本地,供后续查看。 +可选的任务视频录制会将一个已授权标签页录制为无声 MP4,供用户回看或保存任务的可见过程。它独立于语义操作录制和网站调试。 + ## 3. 本扩展会访问的数据 根据用户(通过其 AI 助手)发送给所选守护进程或网关的指令,以及用户在扩展中主动开启的功能,本扩展可能会在**用户本地设备上**访问以下数据: @@ -31,15 +33,17 @@ BrowserSkill 让用户指定的 AI 助手通过 `bsk` 命令行工具操作 Chro | **扩展本地存储** | 一个随机生成的 8 位十六进制实例 ID、可选的用户自定义标签、功能偏好(包括审计开关),以及可选的远程端点和设备凭据。 | 用于识别此浏览器实例并恢复用户设置。 | | **Agent 请求的文件传输** | 用户明确提供给 `bsk upload` 的本地文件,以及单次 `bsk download` 操作产生的文件。 | 用于将任务文件附加到网页,或将浏览器生成的下载交给发起请求的本地 Agent。 | | **用户请求的截图导出** | 用户在预览页选择保存图片时的截图数据(包括长截图)及建议文件名。 | 用于通过浏览器的“另存为”对话框保存用户请求的图片。 | +| **任务视频录制** | 选定任务标签页的渲染画面、无声 MP4,以及标签页标题、任务/标签页 ID、时间、时长、画质、大小、完成状态和中断原因等元数据。 | 用于录制明确请求的任务、恢复可播放的部分视频,并让用户预览、导出或删除结果。 | | **系统通知** | 标签页借用授权通知,以及 Agent 请求人工协助的通知。 | 用于在浏览器借用确认开启时获取用户对该标签页的同意;或在允许请求人工协助时,提醒用户处理任务中需要手动完成的步骤,例如登录或验证。 | ## 4. 数据收集边界 - 自动化结果仅发送到用户选择的守护进程或网关。BrowserSkill 作者不接收遥测数据,也不提供必须使用的中间托管服务。 - 本扩展不会自行调用 LLM、AI 或云 API,不包含 AI 提供商的 API 密钥。 -- 本扩展不会枚举浏览器的浏览历史数据库、书签、保存的密码或自动填充数据库。网站调试会单独记录采集期间选定标签页的活动,这些调试历史与浏览器的浏览历史数据库相互独立。下载处理用于用户请求的截图导出,以及当前本地 `bsk download` 指令发起的下载;不会枚举下载历史。 +- 本扩展不会枚举浏览器的浏览历史数据库、书签、保存的密码或自动填充数据库。网站调试会单独记录采集期间选定标签页的活动,这些调试历史与浏览器的浏览历史数据库相互独立。下载处理用于用户请求的截图和 MP4 导出,以及当前本地 `bsk download` 指令发起的下载;不会枚举下载历史。 - 网站调试仅在用户或其 Agent 明确发起时开始。每项任务的单次采集只针对一个由该任务创建或借用的标签页,包括其 frame 的网络数据。仅打开标签页或将其移入代理窗口不会授予采集权限。采集期间,选定页面中受支持的手动操作与 Agent 操作都会被记录。 - 停止采集、归还或关闭目标标签页、结束任务或断开连接,会停止收集新数据,但不会删除已保存的调试历史。浏览器或扩展重启后,未完成的采集会以中断状态恢复,不会自动继续采集。 +- 视频录制仅在用户或其 Agent 明确请求时开始,只针对一个由任务创建或借用的标签页,记录其渲染画面,包括可见的手动操作;不会跟随任务切换到其他标签页。不请求麦克风或系统音频。达到时长或大小限制,或目标标签页、任务、连接结束时会停止录制;中断的视频可能保留可播放的部分结果。关闭扩展弹窗不会停止正在进行的录制。 - 自动化使用现有浏览器配置。受控页面可能包含个人数据和已登录的网站会话;配对服务器后,其 Agent 可以操作这些页面。 - 本扩展不包含分析统计、广告、指纹识别或跨网站跟踪系统,也不出售用户数据。 @@ -47,7 +51,7 @@ BrowserSkill 让用户指定的 AI 助手通过 `bsk` 命令行工具操作 Chro 本扩展申请以下 Chrome 权限,每一项都仅用于上述单一用途: -- **`debugger`** —— 将 Chrome DevTools Protocol 附加到选定的自动化或用户主动截图的标签页,使 BrowserSkill 能够观察、操作和截取这些页面。在明确开启的网站调试期间,也用于读取网络请求/响应头及正文、控制台和性能数据,观察页面操作及字段值,以及执行明确配置的任务内 HTTP 规则和请求重放。 +- **`debugger`** —— 将 Chrome DevTools Protocol 附加到选定的自动化或用户主动截图的标签页,使 BrowserSkill 能够观察、操作和截取这些页面。明确请求录制任务视频时,用于采集已授权标签页的渲染画面。在明确开启的网站调试期间,也用于读取网络请求/响应头及正文、控制台和性能数据,观察页面操作及字段值,以及执行明确配置的任务内 HTTP 规则和请求重放。 - **`activeTab`** —— 用户调用扩展时,临时访问当前标签页,用于用户主动发起的快捷功能。 - **`scripting`** —— 选定页面缺少长截图辅助脚本时补充注入,例如扩展重新加载后。 - **`webNavigation`** —— 跟踪页面导航和 frame,让截图、录制与人工协助完成检查对应到正确的文档。 @@ -56,8 +60,9 @@ BrowserSkill 让用户指定的 AI 助手通过 `bsk` 命令行工具操作 Chro - **`alarms`** —— 周期性唤醒 service worker,保持所选 WebSocket 连接并续期远程授权。 - **`idle`** —— 检测设备从空闲或锁定状态恢复,以便及时重新建立所选 WebSocket 连接;不保存或传输空闲状态数据。 - **`notifications`** —— 浏览器借用确认开启时,请求用户授权借用已有标签页;在允许请求人工协助时,提醒用户处理当前任务中的登录、验证等手动步骤。通知仅服务于用户的浏览器任务,不用于广告或推广。 -- **`downloads`** —— 用户在预览页主动导出时保存截图,包括长截图;同时关联和处理当前 `bsk download` 命令发起的单次下载。如果已认领的传输失败,BrowserSkill 会取消进行中的下载,或删除已完成的浏览器临时文件;不会枚举下载历史或更改无关下载。 -- **`storage`** —— 在 `chrome.storage.local` 中保存随机实例 ID、可选标签及功能偏好。远程凭据和网站调试历史与这些设置分开,保存在扩展来源的 IndexedDB 中。 +- **`downloads`** —— 用户主动导出时保存截图(包括长截图)和录制的 MP4 视频。跟踪该视频的下载结果,区分成功、取消与失败,并释放临时下载 URL。同时关联和处理当前 `bsk download` 命令发起的单次下载。如果已认领的传输失败,BrowserSkill 会取消进行中的下载,或删除已完成的浏览器临时文件;不会枚举下载历史或更改无关下载。 +- **`offscreen`** —— 在扩展自身的离屏文档中运行视频编码 worker,并管理临时视频下载 URL,让明确启动的录制和 MP4 生成可以在弹窗关闭后继续进行。不用于采集其他标签页、桌面或音频。 +- **`storage`** —— 在 `chrome.storage.local` 中保存随机实例 ID、可选标签及功能偏好,在 `chrome.storage.session` 中跟踪尚未完成的视频导出。远程凭据、网站调试历史和视频目录与这些设置分开,保存在扩展来源的 IndexedDB 中;视频文件及恢复片段保存在来源私有文件系统(OPFS)中。 - **主机权限 ``** —— 在助手控制的页面上注入状态浮层(提示"代理已激活"),并支持用户引导助手访问任意网站。远程连接也使用此权限访问用户选择的端点。远程页面内容访问要求标签页由任务创建或明确借用。 ## 6. 数据流向 @@ -70,16 +75,20 @@ BrowserSkill 让用户指定的 AI 助手通过 `bsk` 命令行工具操作 Chro 截图导出通过浏览器的“另存为”对话框保存到用户选择的位置。导出图片本身不会将文件发送给守护进程、网关或外部服务;Agent 请求的截图仍按上述方式作为任务结果返回。 +视频画面在当前浏览器配置中编码并暂存。仅打开本地视频库不会上传视频。“另存为 MP4”通过浏览器的“另存为”对话框写入浏览器所在计算机。经过授权的 `bsk video save` 或 `stop --out` 请求会通过所选守护进程或网关传输视频数据,写入 CLI 所在计算机的指定路径;该计算机可能是远程服务器。任务结束后,持有有效视频访问授权的原连接所有者仍可读取已保留的视频,直到视频过期或被删除。仅知道视频 ID 不会获得访问权限。收到导出视频的 Agent 或网关可能按自身政策保留或分享视频。 + 在采集期间,用户或 Agent 明确配置的 HTTP 规则可以阻止或修改请求,或提供模拟响应。请求重放会向与原请求及当前页面相同的 HTTP(S) 来源发送一次新请求,使用页面当前的浏览器会话,包括由浏览器提供的 Cookie。重放可将指定的请求头和正文发送给该网站,并改变其服务端数据。仅打开历史或读取调试数据不会重放请求。 ## 7. 数据保留 - 实例 ID、可选标签和功能偏好会保存在 `chrome.storage.local` 中,直到用户卸载本扩展或清除扩展存储。 -- 网站调试以外的页面内容、截图、DOM 快照等观察数据,会作为对指令的响应返回给所选守护进程或网关;录制或截图导出等操作可在扩展中暂存数据,直到相关操作结束或结果释放。网站调试数据遵循下述独立的历史保留规则。 +- 网站调试和任务视频录制以外的页面内容、截图、DOM 快照等观察数据,会作为对指令的响应返回给所选守护进程或网关;语义操作录制或截图导出等操作可在扩展中暂存数据,直到相关操作结束或结果释放。网站调试数据和任务视频遵循下述独立的保留规则。 - 网站调试在采集期间及停止时,将经过脱敏处理的数据保存到扩展来源的 IndexedDB。已停止的记录在 **30 天**后过期,读取或写入历史时自动清理。历史保留预算为 **50 条记录/50 MiB 序列化数据**;较早的已停止记录可能提前清理,以满足这些预算,正在采集的记录受到保护,不参与此类清理。这些预算不代表 IndexedDB 的实际磁盘占用量。单次采集的容量限制也可能更早省略或移除部分请求、正文及其他数据。 - 网站调试历史在任务结束或断开连接后仍会保留。用户可在历史页面删除已停止的记录;清除扩展存储或卸载扩展会删除本地历史。这些操作以及自动过期不会删除此前导出的文件,也不会删除 Agent 或网关已经收到的副本。 +- 任务视频、恢复片段及其目录在任务结束或断开连接后仍会保留。视频在**创建 24 小时后**过期,启动或访问目录时清理过期数据。单个视频限制为 **10 分钟/256 MiB**,临时视频预算为 **1 GiB**,包括恢复片段和生成最终文件时的占用;浏览器存储限制可能更早阻止录制开始。不会为腾出空间而静默删除尚未过期的视频。用户可在视频库中删除保留的视频;清除扩展全部本地数据或卸载扩展会删除本地视频数据。 +- 视频访问授权保存在浏览器目录中;通过 CLI 访问时,也保存在 CLI 的用户私有应用目录中。视频命令会清理已过期的 CLI 授权文件。授权过期不会删除磁盘上已导出的视频。 - 上传和下载字节由本地守护进程暂存在私有、按 session 隔离的目录中。下载暂存文件在复制到指定目标后删除;上传暂存文件保留到 session 结束,以便页面稍后提交表单时仍可读取附件。session 结束、连接断开或守护进程在崩溃后再次启动时,会清理剩余暂存文件。 -- 用户保存的截图文件,以及复制到指定下载目标的文件,会保留在磁盘上,直到用户自行删除。结束任务、清除扩展存储或卸载扩展不会删除这些文件。 +- 用户保存的截图和 MP4、经授权的 CLI 视频导出,以及复制到指定下载目标的文件,会保留在磁盘上,直到用户自行删除。结束任务、删除保留的视频、清除扩展存储或卸载扩展不会删除这些已导出的文件。 - 操作审计独立于网站调试,默认关闭。开启后,所选守护进程会在 `BSK_HOME/audit`(默认用户目录下的 `.bsk/audit`)保存任务与操作元数据,包括时间、工具类型、网站来源、经过基础脱敏的元素名称、状态和错误码;操作审计不保存输入值、页面正文、截图、脚本或文件内容,这些排除项不适用于上述网站调试历史。已结束的任务保留 30 天,在服务加载、开启审计、创建任务或查询列表时清理。用户可在审计页导出或删除已结束的记录。导出的副本不参与自动清理。 @@ -91,6 +100,7 @@ BrowserSkill 让用户指定的 AI 助手通过 `bsk` 命令行工具操作 Chro - 在 `chrome://extensions` 中卸载本扩展,从而清除扩展存储;守护进程所在主机的审计文件与自行导出的副本需要另行删除。 - 通过快捷功能中的“网站调试”停止采集,或让 Agent 停止采集。进入其历史页面查看、导出记录或删除已停止的记录;无需连接守护进程也可使用历史页面。删除正在采集的记录前,需先停止采集。 +- 在扩展的视频面板停止录制,或让 Agent 停止;停止视频不会结束浏览器任务。通过最近录制页面预览、保存或删除保留的视频,任务结束后仍可使用。CLI 用户可使用 `bsk video stop`、`save` 和 `discard`。删除正在录制的视频前,需先停止录制。 - 在快捷功能中关闭操作审计,停止收集新的审计操作并保留已有审计记录;已记录任务仍会更新最终生命周期状态。此开关不会停止网站调试采集,也不会删除其历史。 - 关闭代理窗口,立即停止所有助手自动化操作。 - 开启借用前确认,并拒绝借用请求,使已有标签页保持不可访问。 @@ -110,6 +120,8 @@ BrowserSkill 让用户指定的 AI 助手通过 `bsk` 命令行工具操作 Chro 网站调试会在保留数据前,对可识别的凭据请求头/响应头(如 Authorization、Cookie 和 Set-Cookie)、敏感 URL 参数、JSON/表单键名及常见凭据文本模式进行脱敏。页面观察中的凭据、支付和文件输入字段会被省略或脱敏。这种过滤不能保证任意请求/响应正文、控制台消息、页面文本或字段值均不含个人或机密信息。请将已保存及导出的调试数据视为可能包含敏感信息,分享前先检查,并删除不再需要的副本。采集、脱敏和保留限制详见[网站调试](../../docs/website-debugging.md)。 +视频记录渲染后的画面。网站调试的脱敏规则不会自动遮盖视频帧,因此可见的个人信息和输入文字可能出现在视频中。导出或分享前请检查视频内容。访问控制、恢复和保留细节见[任务视频录制](../../docs/video-recording.md)。 + ## 11. 开源与可审计性 BrowserSkill 是开源项目,任何人都可以通过阅读项目仓库中的源代码来核实本政策中的所有声明。本扩展不包含会隐藏网络调用的混淆或压缩代码路径。 diff --git a/apps/extension/package.json b/apps/extension/package.json index 49fa99d3..d3e2704e 100644 --- a/apps/extension/package.json +++ b/apps/extension/package.json @@ -1,6 +1,6 @@ { "name": "@browser-skill/extension", - "version": "0.3.2", + "version": "0.3.3", "private": true, "type": "module", "scripts": { diff --git a/packages/dsh-plugin-browserskill/README.md b/packages/dsh-plugin-browserskill/README.md index 9d1476d7..61e10a84 100644 --- a/packages/dsh-plugin-browserskill/README.md +++ b/packages/dsh-plugin-browserskill/README.md @@ -54,9 +54,9 @@ dsh plugin --profile web update @wxg-prc-cpg/browser-skill-dsh-plugin --latest Restart that dsh profile after upgrading. This command updates the plugin; update the `bsk` CLI and browser extension separately when a release requires it. -### Breaking tool API migration (unreleased) +### Breaking tool API migration (0.3.3) -The next coordinated release replaces all six `browser_*` tool names with stable +The coordinated 0.3.3 release replaces all six `browser_*` tool names with stable BrowserSkill-specific names. This avoids collisions with other browser plugins such as `dsh-builtin-browser`; both plugins keep their own tools and sessions. @@ -69,7 +69,8 @@ such as `dsh-builtin-browser`; both plugins keep their own tools and sessions. | `browser_tabs` | `bsk_tabs` | | `browser_assist` | `bsk_assist` | -Actions, parameters, results, and `/browser-skill` are unchanged. The old tool +The tool-name migration leaves actions, parameters, results and `/browser-skill` +unchanged. The old tool names are not registered as aliases. After upgrading, restart the DSH profile and invoke `/browser-skill` again in existing conversations to load the new instructions. Update hardcoded tool calls, allow/deny lists, and `toolOrder` entries to the new @@ -78,8 +79,9 @@ names. Do not replay old calls unchanged: another plugin may own those names. Existing conversation logs and screenshot attachments are left intact. New `bsk_inspect` results use the screenshot view; old `browser_inspect` cards may use DSH's generic renderer and do not retain the custom thumbnail/preview interaction. -This migration must ship as a breaking release, with the shared CLI/extension/plugin -version coordinated by the release process, rather than as a patch to 0.3.2. +This is a breaking change from 0.3.2. Upgrade the CLI and browser extension to +0.3.3 before upgrading this plugin to use the new video, extraction and element-wait +capabilities. Updating the npm package does not update either component. ## Tools @@ -259,35 +261,29 @@ The [Release dsh plugin workflow](https://github.com/Tencent/BrowserSkill/blob/m publishes the package and this README to npm. Pushing a `dsh-plugin-vX.Y.Z` tag triggers it; ordinary commits to `main` do not. -Before publishing the plugin with `wait-for-element`, publish compatible CLI -and extension builds containing [#407](https://github.com/Tencent/BrowserSkill/pull/407). +Before publishing the 0.3.3 plugin, publish the coordinated 0.3.3 CLI and extension. +Element waits require the implementation introduced in [#407](https://github.com/Tencent/BrowserSkill/pull/407). The `cli-v0.3.0`, `cli-v0.3.1`, and `cli-v0.3.2` releases do not include this command. Confirm the compatible CLI and extension release artifacts are available before pushing the plugin tag; publishing the npm package alone does not upgrade either component on users' machines. Older installations can still use the [single-action recovery path](skill/references/interaction-details.md#element-waits). -1. Commit this README and any other changes intended for the release. -2. From the repository root, run the - [release script](https://github.com/Tencent/BrowserSkill/blob/main/scripts/release.mjs) - with a new stable version, replacing `` below. The script updates the - CLI, extension, and DSH plugin versions, commits the version changes, and creates - their release tags: +1. Prepare a release PR that updates the shared CLI, extension and plugin version, + local Cargo lock entries, changelog and relevant documentation. Merge it after + validation and record the merge commit. +2. Tag that commit as `ext-v` and wait for the browser extension to become + available. Then tag the same commit as `cli-v` and wait for the complete + CLI release, including [Windows signing](../../docs/windows-signing.md). +3. Create `dsh-plugin-v` on that same merge commit and push only that tag: ```sh - node scripts/release.mjs + git tag -a dsh-plugin-v -m "Release DSH plugin " + git -c push.followTags=false push origin refs/tags/dsh-plugin-v ``` -3. Push the version commit to the release branch, then push the DSH plugin tag - created by the script, using the same ``: - - ```sh - git push origin HEAD - git push origin dsh-plugin-v - ``` - - This publishes the DSH plugin. Push the CLI and extension tags separately when - those components are ready for release, respecting the compatibility order above. +4. Approve the `npm-publish` environment deployment in GitHub Actions when required, + then verify the published npm version and `latest` dist-tag. The workflow checks the version, runs typechecks and tests, builds the package, and publishes it to npm. diff --git a/packages/dsh-plugin-browserskill/package.json b/packages/dsh-plugin-browserskill/package.json index b83befdb..2a813975 100644 --- a/packages/dsh-plugin-browserskill/package.json +++ b/packages/dsh-plugin-browserskill/package.json @@ -1,7 +1,7 @@ { "name": "@wxg-prc-cpg/browser-skill-dsh-plugin", "description": "DeepSeek Harness tool plugin that exposes BrowserSkill browser automation (bsk_* tools) to the model", - "version": "0.3.2", + "version": "0.3.3", "license": "MIT", "publishConfig": { "access": "public", diff --git a/packages/dsh-plugin-browserskill/tests/tools.test.ts b/packages/dsh-plugin-browserskill/tests/tools.test.ts index cfa9ed9f..b9bb992b 100644 --- a/packages/dsh-plugin-browserskill/tests/tools.test.ts +++ b/packages/dsh-plugin-browserskill/tests/tools.test.ts @@ -370,9 +370,12 @@ describe("session.start", () => { [false, "--focus"], ])("maps noFocus=%s to %s", async (noFocus, flag) => { const { tools, calls } = setup({ "session start": START_REPLY("s1") }); - await tools - .get("browser_session") - ?.execute({ action: "start", ...(noFocus === undefined ? {} : { noFocus }) }, makeExec()); + const tool = tools.get("bsk_session"); + if (!tool) throw new Error("bsk_session not registered"); + await tool.execute( + { action: "start", ...(noFocus === undefined ? {} : { noFocus }) }, + makeExec(), + ); expect(calls[0].args.filter((arg) => arg === "--focus" || arg === "--no-focus")).toEqual( flag ? [flag] : [], );