dsh-tabbit 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +100 -0
  2. package/LICENSE +21 -0
  3. package/README.en.md +116 -0
  4. package/README.md +55 -81
  5. package/client/client.js +389 -0
  6. package/cordis.patch.yml +77 -2
  7. package/lib/core/index.js +742 -0
  8. package/lib/installer/detect.js +374 -0
  9. package/lib/installer/download.js +247 -0
  10. package/lib/installer/index.js +254 -0
  11. package/lib/mentions/index.js +595 -0
  12. package/lib/permissions/index.js +136 -0
  13. package/lib/runtime/cli.js +229 -0
  14. package/lib/runtime/client.js +431 -0
  15. package/lib/runtime/codec.js +126 -0
  16. package/lib/runtime/endpoint.js +248 -0
  17. package/lib/runtime/errors.js +126 -0
  18. package/lib/runtime/instances.js +287 -0
  19. package/lib/runtime/net.js +143 -0
  20. package/lib/runtime/peer.js +132 -0
  21. package/lib/tool-browser/index.js +425 -0
  22. package/lib/update-check.js +343 -0
  23. package/lib/web-fetch/index.js +219 -0
  24. package/package.json +53 -16
  25. package/skills/tabbit/SKILL.md +66 -0
  26. package/skills/tabbit/references/interaction-helpers.md +150 -0
  27. package/skills/tabbit/references/platform-invocation.md +174 -0
  28. package/skills/{tabbit-browser → tabbit}/references/playwright-recipes.md +11 -3
  29. package/skills/tabbit/references/runtime-recovery.md +104 -0
  30. package/README.zh-CN.md +0 -114
  31. package/index.js +0 -352
  32. package/installer.js +0 -568
  33. package/skills/tabbit-browser/SKILL.md +0 -274
  34. package/skills/tabbit-browser/agents/openai.yaml +0 -4
  35. package/skills/tabbit-browser/references/interaction-helpers.md +0 -103
  36. package/skills/tabbit-browser/references/platform-invocation.md +0 -45
  37. package/skills/tabbit-browser/references/runtime-recovery.md +0 -95
  38. package/update-check.js +0 -177
  39. /package/skills/{tabbit-browser → tabbit}/references/information-extraction.md +0 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,100 @@
1
+ # Changelog
2
+
3
+ ## 0.3.0
4
+
5
+ - Major upgrade: browser automation now runs through the native
6
+ `tabbit_browser` tool — real Playwright code executing in the user's Tabbit
7
+ Browser profile with shared login state, screenshots into model context,
8
+ automatic interruption recovery, and multi-instance resolution — plus a
9
+ browser-backed `web_fetch` provider, `@tab` page mentions in the dsh web
10
+ composer, a dedicated page-access permission, and a `/tabbit` diagnostics
11
+ command. The bundled skill now teaches the tool workflow instead of the
12
+ `tabbit-cli` shell workflow. Requires Node 22.19 or newer (was 20).
13
+ - Adopted the renamed `tabbit-cli` launcher that current Tabbit Browser
14
+ builds register (with fallback to the legacy `tabbit-playwright` name), and
15
+ the per-instance `.product` labels in the instance registry.
16
+ - New model-free tab inventory: `ctx.tabbit.listAllTabs()` and the loopback
17
+ route `GET /tabbit/tabs` list every tab of the running browser profile
18
+ (including the user's own tabs) by talking to the Runtime Service endpoint
19
+ directly — no launcher process, no task, no side effects, ~1ms steady-state.
20
+ Requires a 1.11.16+ Tabbit Browser; the browser is never launched for a
21
+ listing, offline instances report as unavailable instead.
22
+ - The `@` mention menu in the dsh web composer now lists the user's own
23
+ browser tabs alongside agent task pages (active tab first; only http(s)
24
+ pages are offered, since chrome://, extension, and blank/new-tab pages
25
+ cannot deliver content when mentioned), under a "网页标签" group shown
26
+ below DSH's built-in file/session mentions, with up to 50 candidates
27
+ instead of 8. Mentioning a user tab fetches a fresh copy of that URL's
28
+ content through the shared browser fetch task — the user's actual tab is
29
+ never claimed, moved, or focused. The extracted page text no longer lands
30
+ in the sent message itself: the composer sends a short `@Title` mention,
31
+ and the full text is delivered to the model as a separate, collapsed
32
+ "Context injection" entry via an `agent/pre-step` hook — the same delivery
33
+ path DSH's own `@file`/`@session` mentions use — so a mentioned page's
34
+ content never floods the visible chat bubble. `tabbit_browser` gained
35
+ `list_tabs: true` for the model-facing version of the same inventory, paired
36
+ with `claim_tabs` to attach a specific user tab to a new task.
37
+ - Windows support: the launcher is discovered under
38
+ `%LOCALAPPDATA%\Tabbit\LocalAgent\bin\tabbit-cli.exe`, instance selection
39
+ defers to the native CLI when the instance registry is not readable, and the
40
+ environment preflight falls back to runtime-process detection.
41
+ - The environment preflight (`tabbit_browser_install`), the daily plugin
42
+ update check, and the `tabbit_plugin_update` tool carry over from 0.2.x.
43
+ The update check now reads the npm registry for the latest version (with
44
+ release notes served from the published tarball), and stays silent for
45
+ browser-managed (preinstalled) copies, which update together with Tabbit
46
+ Browser.
47
+ - The bundled skill gained references for the runtime interaction helpers
48
+ (`tabbit.observe`, `pasteText`, `triggerAndObserve`, …) and AI-mode ARIA
49
+ snapshot recipes for canvas-backed and visually complex surfaces. It is now
50
+ named `tabbit`, deliberately matching the shared skill Tabbit Browser
51
+ installs into `~/.agents/skills/tabbit/`: DSH's same-name precedence
52
+ prefers that browser-managed copy, and the bundled one is the fallback for
53
+ machines without a current browser. The `/tabbit` diagnostics command was
54
+ renamed to `/tabbit-info` to leave the `/tabbit` slash entry to the skill.
55
+ - Task finishing adapted to the new runtime semantics (plain `finish` now
56
+ retains tabs as a resumable group): the plugin always passes an explicit
57
+ `--keep` or `--discard`, which behaves correctly on both CLI generations,
58
+ so `finish` without `keep_tabs` and end-of-session cleanup reliably close
59
+ task tabs.
60
+ - DSH `0.1.2-alpha.1` also ships its own direct-HTTP `web_fetch` provider and
61
+ pins the `web` service to it; the bundle patch now re-pins `fetchProvider`
62
+ to this plugin's browser-backed provider, keeping JS rendering, login
63
+ state, the page-access/intranet permission gates, and the browser's proxy
64
+ environment (the built-in fetcher connects directly to resolved public IPs
65
+ and refuses every domain on fake-ip proxy setups).
66
+ - Requires DSH `0.1.2-alpha.1` or newer, whose standard agent preset ships
67
+ with `web_fetch` enabled — the bundled "Tabbit mode" preset is gone, and
68
+ plugin activation removes a previously installed managed copy (marker
69
+ protocol respected: user-owned copies are never touched).
70
+
71
+ ## 0.2.3
72
+
73
+ - Fixed the bundle's `cordis.patch.yml` loader entry to use the npm package
74
+ name `dsh-tabbit` instead of the non-existent package `tabbit-browser`. This
75
+ resolves the `Cannot find package 'tabbit-browser'` load failure that
76
+ affected fresh installs after the package was renamed in 0.2.1.
77
+
78
+ ## 0.2.2
79
+
80
+ - Install and update commands now use the npm package (`dsh plugin add
81
+ dsh-tabbit`) as the primary route — prebuilt tarball, CDN-served, and
82
+ counted in npm download stats; the `github:` source remains documented as
83
+ a fallback.
84
+
85
+ ## 0.2.1
86
+
87
+ - Renamed the package to `dsh-tabbit` and published it to npm; updated all
88
+ remaining references (daily update-check changelog URL, install commands in
89
+ the plugin, skill, and READMEs) from `Tabbit-Browser/dsh-plugin` to
90
+ `Tabbit-Browser/dsh-tabbit`.
91
+
92
+ ## 0.2.0
93
+
94
+ - Added a daily plugin update check. Loading the skill compares the installed
95
+ plugin version with the published changelog — cached for 24 hours, at most
96
+ one request per day, silent when offline — and, when outdated, asks the user
97
+ whether to update, showing what the new version added.
98
+ - Added the `tabbit_plugin_update` tool. It records a version the user declined
99
+ so the skill stops announcing it, and can force a recheck after a plugin
100
+ update or a connectivity change.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tabbit-Browser
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md ADDED
@@ -0,0 +1,116 @@
1
+ # dsh-tabbit — Tabbit's Official DeepSeek Harness Plugin
2
+
3
+ **English** | [简体中文](README.md)
4
+
5
+ ![Tabbit Browser for DeepSeek Harness](tabbit-for-dsh.png?v=2)
6
+
7
+ A DeepSeek Harness (dsh) plugin bundle for Tabbit Browser. Through this
8
+ plugin, dsh calls on Tabbit to complete agent tasks: real pages, real login
9
+ state, real interactions, driven through a native code-first tool (not shell
10
+ round-trips). Use it for web automation, information extraction, QA, and
11
+ benchmarks.
12
+
13
+ ## What you get
14
+
15
+ | Component | Description |
16
+ |---|---|
17
+ | `tabbit_browser` | Read and operate web pages using Tabbit's real, built-in CLI mode. |
18
+ | Browser-backed `web_fetch` | Re-points dsh's `web_fetch` to Tabbit itself (dsh's built-in direct fetcher has no JS rendering, no login state, and bypasses the system proxy — under a fake-IP proxy setup it refuses every domain). |
19
+ | "Web tabs" `@` mention | Type `@` in the dsh Web UI input box to list pages open in this session's browser tasks **and every tab in the user's browser** — pick one to add as context. |
20
+ | Dedicated "page access" permission | Full permission controls. Because dsh shares the user's cookies when it reaches Tabbit pages, it confirms `pageAccess` (asked once per session by default) and `intranetFetch` (per-request approval when `web_fetch` targets an intranet address). |
21
+ | `tabbit_browser_install` tool | Environment preflight: detects an installed stable Tabbit build and verifies the launcher and Runtime Service; downloads Tabbit as a dsh background job when it's missing or outdated. |
22
+ | `tabbit_plugin_update` tool | Plugin update check: asks npm for the latest release at most once a day, and silently installs a suitable version in the background. |
23
+ | `/tabbit-info` command | Type `/tabbit-info` in the dsh input box for diagnostics: launcher, instance list (with product names), effective instance and its source, permission settings, task occupancy. |
24
+ | `tabbit` skill | Teaches the model best practices for using Tabbit. Defaults to Tabbit's own official skill at `~/.agents/skills/tabbit/` (it evolves with the browser runtime); this plugin bundles a fallback copy. |
25
+
26
+ ## Installation
27
+
28
+ ### Prerequisites
29
+
30
+ - A stable Tabbit Browser build ([international edition](https://www.tabbit.ai) or [China edition](https://www.tabbit.com/), `1.9.0` or newer) that has been launched at least once (this registers the CLI launcher on first launch).
31
+ - Node.js `>=22.19` and dsh `>=0.1.1-rc.2` (install dsh with `npm install -g @deepseek-ai/dsh`). On hosts below `0.1.2-alpha.1`, the built-in `web_fetch` tool is unavailable in Web app sessions (`tabbit_browser` is unaffected).
32
+
33
+ ### Install dsh-tabbit
34
+
35
+ ```bash
36
+ dsh plugin --profile web add dsh-tabbit # primary npm route
37
+ ```
38
+
39
+ ### Other install methods
40
+
41
+ ```bash
42
+ dsh plugin --profile web add github:Tabbit-Browser/dsh-tabbit # fallback when npm is unreachable
43
+ dsh plugin --profile web add link:/path/to/dsh-tabbit # local development
44
+ ```
45
+
46
+ > This package supersedes the earlier `tabbit-browser` skill-only plugin, and
47
+ > continues on from the 0.2.x line published on npm — 0.2.x users get an
48
+ > upgrade notice from the daily update check, and simply re-running the
49
+ > install command upgrades in place.
50
+
51
+ ## Settings
52
+
53
+ ### Basic configuration
54
+
55
+ dsh Settings → `tabbit`, or `$DSH_HOME/settings.yaml`
56
+
57
+ ```yaml
58
+ tabbit:
59
+ instance: "" # explicit 16-hex instance id (/tabbit-info lists them); usually leave empty
60
+ launcherPath: "" # override; default discovers tabbit-cli, falls back to tabbit-playwright; %LOCALAPPDATA%\Tabbit\LocalAgent\bin\tabbit-cli.exe on Windows
61
+ pageAccess: ask # ask (once per session) | always | never
62
+ intranetFetch: ask # web_fetch to intranet/loopback targets: ask (once per session+origin) | always | never
63
+ ```
64
+
65
+ ### Instance resolution priority
66
+
67
+ Priority order when this machine has more than one Tabbit build installed:
68
+
69
+ 1. an explicit `tabbit.instance` setting;
70
+ 2. **the Tabbit instance currently viewing dsh-web** (auto-detected: the
71
+ client plugin pings `/tabbit/instance-hint` on page load, and the server
72
+ traces the loopback socket's peer process up its parent chain to match the
73
+ instance registry's `browserPid`; macOS only — naturally misses when a
74
+ non-Tabbit browser has the page open) — "execute in whichever Tabbit
75
+ you're viewing dsh in";
76
+ 3. an inherited `TABBIT_PLAYWRIGHT_INSTANCE` environment variable (the
77
+ authoritative channel in the embedded form: Tabbit injects its own
78
+ instance id when it launches its bundled dsh);
79
+ 4. automatic registry selection (the single online instance; an ambiguity
80
+ error listing the candidates otherwise — on Windows, when the registry
81
+ isn't readable, the native CLI picks for itself).
82
+
83
+ Check the currently effective source anytime with `/tabbit-info`
84
+ (`execution instance: ... (via ...)`).
85
+
86
+ **Full access note**: dsh's `danger-full-access` permission preset writes the
87
+ session's approval policy as `never` (dsh's definition: auto-deny every ask).
88
+ This plugin's permission gate detects that override and **auto-allows**
89
+ instead of issuing an ask that's guaranteed to be denied — full access means
90
+ full access (bash is already unrestricted in that mode, so gating only the
91
+ browser tool has no defensive value). Exception: a deployment-level default
92
+ of `never` (not a session override) isn't visible to the public API and still
93
+ gets denied — that combination gets a denial message pointing at the
94
+ `tabbit.pageAccess: always` escape hatch.
95
+
96
+ ## Permissions & Security
97
+
98
+ - Because the agent shares the user's real login state, `pageAccess` is a
99
+ dedicated permission independent of filesystem/sandbox permissions, and
100
+ asks for user confirmation by default.
101
+ - Authorization is remembered: once a tool call succeeds, this session won't
102
+ ask again; failures aren't recorded (a retry after failure asks again).
103
+
104
+ ## Development
105
+
106
+ ```bash
107
+ pnpm install && pnpm build # tsc → lib/
108
+ npm test # build + node --test tests/
109
+ ```
110
+
111
+ ## Known limitations / Roadmap
112
+
113
+ - Mentioning bookmarks/favorites isn't supported yet.
114
+ - `claim_tabs` isn't usable end-to-end.
115
+ - Screenshots entering context require a model route that accepts image input.
116
+ - Windows regression testing is limited.
package/README.md CHANGED
@@ -1,113 +1,87 @@
1
- # tabbit-browser for DeepSeek Harness
1
+ # dsh-tabbit Tabbit 的 DeepSeek Harness 官方插件
2
2
 
3
- **English** | [简体中文](README.zh-CN.md)
3
+ [English](README.en.md) | **简体中文**
4
4
 
5
5
  ![Tabbit Browser for DeepSeek Harness](tabbit-for-dsh.png?v=2)
6
6
 
7
- A plugin for DeepSeek Harness (DSH) that gives the agent control over your Tabbit Browser: real pages, real login state, and real interactions, driven through `tabbit-cli` the task-isolated Playwright CLI owned by the browser itself. Use it for web automation, information extraction, QA, and benchmarks.
7
+ Tabbit Browser DeepSeek Harness(dsh)插件包(bundle)。dsh 可以通过此插件调用 Tabbit 完成 Agent 任务:真实页面、真实登录态、真实交互,经原生 code-first 工具驱动(不走 shell 转发)。适用于网页自动化、信息提取、QA 与评测。
8
8
 
9
- ## What you get
9
+ ## 能力
10
10
 
11
- | Component | Description |
12
- | --------- | ----------- |
13
- | `tabbit-browser` skill | The working guide for browser automation: persistent task spaces, locators and waits, screenshots, receipts and recovery. Discovered and loaded automatically with the plugin — no separate skill install. The model loads it via `skill({ name: "tabbit-browser" })` or `/tabbit-browser`. |
14
- | `tabbit_browser_install` tool | Environment preflight: detects installed stable Tabbit editions, requires version `1.9.0` or newer, and verifies the `tabbit-cli` resident runtime. When Tabbit is missing or outdated, it starts a DSH background job that downloads the region-appropriate installer. |
15
- | `tabbit_plugin_update` tool | Plugin update check: compares the installed plugin version with the published changelog at most once a day, silently skips offline failures, and records a version the user declined. When a newer release exists, the skill loads with an update notice showing what the new version added. |
11
+ | 能力 | 说明 |
12
+ |---|---|
13
+ | **`tabbit_browser`** | 用户使用真实的 Tabbit 内置的 CLI 模式执行网页读取和网页操作。 |
14
+ | **浏览器代理的 `web_fetch`** | dsh `web_fetch` 改接到 Tabbit 上(dsh 自带的直连抓取器无 JS 渲染、无登录态、不走系统代理——在 fake-ip 代理环境下所有域名都会被它拒绝)。 |
15
+ | **"网页标签"输入框提及 `@`** | dsh Web UI 输入框敲 `@`,会列出本会话浏览器任务中打开的页面**以及用户浏览器里的全部标签页**,可以选中成为上下文。 |
16
+ | **独立"页面读取"权限** | 完善的权限控制。因为与用户共享 cookie,dsh 访问 Tabbit 网页时会确认权限`pageAccess`(默认每会话询问一次)+ `intranetFetch`(web_fetch 访问内网目标默认逐次审批)。 |
17
+ | **`tabbit_browser_install` 工具** | 环境预检:检测已装稳定版 Tabbit、校验 launcher 与 Runtime Service;缺装/过旧时以 dsh 后台任务下载 Tabbit。 |
18
+ | **`tabbit_plugin_update` 工具** | 插件更新检查:每天最多查一次 npm 上的最新发布,有合适版本会离线静默安装; |
19
+ | **`/tabbit-info` 命令** | 在 dsh 输入框内输入 `/tabbit-info` 可诊断:launcher、实例列表(含产品名)、生效实例及来源、权限设置、任务占用。 |
20
+ | **`tabbit` skill** | 告知模型使用 Tabbit 的最佳实践。默认使用 Tabbit 自带的 `~/.agents/skills/tabbit/` 的官方 skill(随浏览器 Runtime 同步演进)。本插件内为兜底版本。 |
16
21
 
17
- ## Installation
22
+ ## 安装
18
23
 
19
- ### 1. Check or install DeepSeek Harness
24
+ ### 前置条件
20
25
 
21
- Check whether DSH is already installed:
26
+ - 已安装稳定版 Tabbit Browser([国际版](https://www.tabbit.ai) [国内版](https://www.tabbit.com/),≥1.9.0),且启动过(首次启动时注册 CLI launcher);
27
+ - Node ≥ 22.19、dsh ≥ 0.1.1-rc.2(dsh 安装:`npm install -g @deepseek-ai/dsh`)。低于 0.1.2-alpha.1 的宿主上,网页版会话里内置的 `web_fetch` 工具不可用(`tabbit_browser` 不受影响)。
22
28
 
23
- ```sh
24
- dsh --version
25
- ```
26
-
27
- If the command prints a version number, continue to the next step. If it is not found, install it for your operating system.
28
-
29
- #### macOS
30
-
31
- Install Node.js 20 or newer, then install DSH:
32
29
 
33
- ```sh
34
- brew install node
35
- npm install -g @deepseek-ai/dsh
30
+ ### 安装 dsh-tabbit
31
+ ```bash
32
+ dsh plugin --profile web add dsh-tabbit # npm 主路线
36
33
  ```
37
34
 
38
- #### Windows
35
+ ### 其他安装模式
39
36
 
40
- Install Node.js LTS in PowerShell:
41
-
42
- ```powershell
43
- winget install OpenJS.NodeJS.LTS
37
+ ```bash
38
+ dsh plugin --profile web add github:Tabbit-Browser/dsh-tabbit # npm 不可达时的回退
39
+ dsh plugin --profile web add link:/path/to/dsh-tabbit # 本地开发
44
40
  ```
45
41
 
46
- Reopen PowerShell after the installation, then install DSH:
47
-
48
- ```powershell
49
- npm install -g @deepseek-ai/dsh
50
- ```
42
+ > 本包取代早期的 `tabbit-browser` skill-only 插件;npm 上的 0.2.x 版本也由本版本接续——0.2.x 用户经每日更新检查会收到升级提示,重跑安装命令即可原地升级。
51
43
 
52
- Run `dsh --version` again to confirm DSH works.
44
+ ## 设置
53
45
 
54
- ### 2. Install the tabbit-browser plugin
46
+ ### 基本配置
47
+ dsh Settings → tabbit,或 `$DSH_HOME/settings.yaml`
55
48
 
56
- ```sh
57
- dsh plugin --profile web add dsh-tabbit
49
+ ```yaml
50
+ tabbit:
51
+ instance: "" # 显式指定 16 位大写 hex 实例 id(/tabbit-info 可列出);通常留空即可
52
+ launcherPath: "" # 默认自动发现:优先 ~/.local/bin/tabbit-cli,回退 tabbit-playwright;Windows 为 %LOCALAPPDATA%\Tabbit\LocalAgent\bin\tabbit-cli.exe
53
+ pageAccess: ask # ask(每会话询问一次)| always | never
54
+ intranetFetch: ask # web_fetch 访问内网/回环目标:ask(每会话每 origin 询问一次)| always | never
58
55
  ```
59
56
 
60
- This installs the npm package (prebuilt tarball, CDN-served). If the npm
61
- registry is unreachable, fall back to the GitHub source:
62
-
63
- ```sh
64
- dsh plugin --profile web add github:Tabbit-Browser/dsh-tabbit
65
- ```
66
-
67
- ### 3. Start DSH
68
-
69
- ```sh
70
- dsh web
71
- ```
72
-
73
- ## How it works
74
-
75
- After installation, the bundle automatically registers its skill provider. The model loads the skill via `skill({ name: "tabbit-browser" })` or `/tabbit-browser`. Before the first browser operation in a task, the skill calls `tabbit_browser_install`:
76
-
77
- - **`ready`** — a stable Tabbit edition at `1.9.0` or newer is installed and the runtime is running; the agent continues with the `tabbit-cli` workflow.
78
- - **`restart-required`** — the installed version is sufficient, but the `tabbit-cli` runtime is not running; the user is asked to restart Tabbit Browser once.
79
- - **`background`** — no stable edition is installed, or none reaches `1.9.0`; the tool starts a DSH background job that reads the operating system's configured region (macOS reads the system locale, Windows calls the system region API) and downloads the matching stable installer: the domestic build from `tabbit.com` for mainland China, or the international build from `tabbit.ai` for every other or unknown region. It selects the right Windows x64, macOS Apple Silicon, or macOS Intel package, saves it to the user's `Downloads` folder, reports download progress, and notifies the absolute installer path on completion.
57
+ ### 实例解析优先级
80
58
 
81
- The environment check also:
59
+ 当本机有多个 Tabbit 版本时的优先级配置
82
60
 
83
- - Treats the runtime as available when multiple Tabbit instances are running; the agent sets `TABBIT_PLAYWRIGHT_INSTANCE` from the CLI's hint instead of reporting the instance ambiguity as an unavailable runtime.
84
- - Diagnoses the DSH sandbox mode required to invoke the CLI on the current platform: Windows reports `cliSandboxMode: danger-full-access`, other platforms report `default`.
85
- - Caches a successful environment check per agent session and re-checks only after a Runtime/launcher failure or an installation change, via `refresh: true`.
61
+ 1. `tabbit.instance` 显式设置;
62
+ 2. **正在查看 dsh-web Tabbit 实例**(自动检测:页面加载时 client 插件向 `/tabbit/instance-hint` 打点,服务端由 loopback socket 对端进程沿父链匹配实例注册表的 `browserPid`;仅 macOS,非 Tabbit 浏览器打开时自然不命中)——"在哪个 Tabbit 里看,就在哪个 Tabbit 里执行";
63
+ 3. 继承的 `TABBIT_PLAYWRIGHT_INSTANCE` 环境变量(嵌入形态:Tabbit 启动打包的 dsh 时注入自己的实例 id,即为权威通道);
64
+ 4. 注册表自动选择(唯一在线实例;歧义时报带实例列表的引导错误。Windows 上注册表不可读时委托原生 CLI 自行选择)。
86
65
 
87
- ## Requirements
66
+ 当前生效来源可用 `/tabbit-info` 命令查看(`execution instance: ... (via ...)`)。
88
67
 
89
- - A stable Tabbit Browser at version `1.9.0` or newer: either the international `Tabbit` or the domestic `Tabbit Browser` — installing either one is enough. If it is missing or outdated, the plugin downloads the installer for you.
90
- - The current DSH profile provides `ctx.skills`, `ctx.tools`, and `ctx.jobs` together with the corresponding model tools.
91
- - `dsh-tool-jobs` provides background job control and completion notifications for the current agent.
92
- - The current DSH profile provides a Bash/Shell tool running on the same host machine as Tabbit Browser.
93
- - The shell's execution environment can reach the Browser-owned Runtime Service.
94
- - On Windows, DSH's `read-only` and `workspace-write` restricted tokens cannot write to the Runtime named pipe. The skill first runs the normal `tabbit-cli tasks` connection probe and requests no permission at all when it succeeds. Only when the Browser, launcher, and Runtime processes are all detected but the connection returns `BROWSER_RUNTIME_UNAVAILABLE` does it ask the user to switch the current DSH session to Full Permission — and it then stops the task immediately, without retrying or continuing browser operations.
68
+ Full access 说明:dsh `danger-full-access` 权限预设会给会话写入审批策略 `never`(dsh 定义为"自动拒绝一切询问")。本插件的权限门检测到该覆盖时**自动放行**,不再发出注定被拒的询问——Full access 就是完全访问(该模式下 bash 本就不受限,单拦浏览器工具没有防御价值)。例外:部署级把审批默认配成 `never`(非会话覆盖)时公开 API 读不到,仍会被拒;无审批通道的组合(如某些 headless 编排)会得到指明 `tabbit.pageAccess: always` 出路的拒绝信息。
95
69
 
96
- ## Notes and limitations
70
+ ## 权限及安全
97
71
 
98
- - Mainland China uses the domestic `tabbit.com` download source; all other regions use the international `tabbit.ai` source.
99
- - The background download reports progress and notifies the absolute installer path when it finishes. It never opens the `.dmg`/`.exe` automatically.
100
- - Development builds are not detected.
101
- - The plugin does not provide native browser tools such as `tabbit_browser_evaluate`.
102
- - If DSH's Bash runs in a sandbox such as E2B or a remote container that cannot access the local GUI browser, this skill cannot make Tabbit automation work there.
72
+ - 基于对用户数据安全和用户登录态权限的考量,设计了独立的 `pageAccess` 权限,该权限独立于文件系统/沙箱权限,默认需用户确认。
73
+ - 授权记录:某工具调用成功后,本会话后续调用不再重复询问;失败不记入(失败后重试会再次询问)。
103
74
 
104
- ## Development
75
+ ## 开发
105
76
 
106
- ```sh
107
- npm test
108
- npm pack --dry-run
77
+ ```bash
78
+ pnpm install && pnpm build # tsc → lib/
79
+ npm test # 构建 + node --test tests/
109
80
  ```
110
81
 
111
- ## License
82
+ ## 已知限制 / 路线图
112
83
 
113
- MIT
84
+ - 收藏夹/书签的提及暂不支持。
85
+ - `claim_tabs` 端到端暂不可用。
86
+ - 截图进上下文要求当前模型路由支持图像输入。
87
+ - Windows 版本回归测试有限。