dsh-tabbit 0.2.3 → 0.3.2

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 +133 -0
  2. package/LICENSE +21 -0
  3. package/README.en.md +141 -0
  4. package/README.md +70 -76
  5. package/client/client.js +390 -0
  6. package/cordis.patch.yml +76 -5
  7. package/lib/core/index.js +756 -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 +454 -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 +476 -0
  22. package/lib/update-check.js +343 -0
  23. package/lib/web-fetch/index.js +219 -0
  24. package/package.json +55 -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,133 @@
1
+ # Changelog
2
+
3
+ ## 0.3.2
4
+
5
+ - `tabbit_browser` gains `list_tasks: true`: a zero-side-effect readback of
6
+ the browser tasks this session already has open (which one an omitted
7
+ `task` would target next), read from the in-memory session registry only.
8
+ A memory jog for when the model has lost track after a gap in the
9
+ conversation, instead of guessing a task name or opening a redundant one.
10
+ - `claim_tabs` now works when the task already exists, not only when the
11
+ same call creates it. Runtime Service silently drops a creation-time
12
+ `--claim-tab` on a reused task, so previously the plugin threw
13
+ `CLAIM_REQUIRES_NEW_TASK` and forced starting a fresh task just to attach
14
+ a tab the user pointed at mid-conversation. It now falls back to the
15
+ standalone `claim` CLI command for tasks the session already knows about,
16
+ so an already-open tab can join ongoing browser state instead of always
17
+ starting over.
18
+ - Fixed the bundled `SKILL.md`'s frontmatter parser assuming LF-only line
19
+ endings: a copy checked out or published with CRLF endings would have had
20
+ its raw YAML header served to the model as skill content instead of being
21
+ stripped.
22
+
23
+ ## 0.3.1
24
+
25
+ - Fixed the web client plugin never activating on current DSH hosts — the web
26
+ UI showed `dsh-tabbit: pending (waiting for service: conversationEvents)`.
27
+ The DSH client runtime refactor (already part of `0.1.2-alpha.1`) renamed the
28
+ `conversationEvents` service to `uiConversation` and moved node registration
29
+ from `service.register()` to `service.events.register()`. The client plugin
30
+ now injects `uiConversation`; the `/tabbit-info` status card, the `@tab`
31
+ composer source, and the watching-instance hint all had been blocked behind
32
+ that pending inject and work again. The `conversation.chat.node` keyed slot
33
+ registration and the Definition contract (`match`/`start`/`update`/
34
+ `buildViewNode`) are unchanged.
35
+
36
+ ## 0.3.0
37
+
38
+ - Major upgrade: browser automation now runs through the native
39
+ `tabbit_browser` tool — real Playwright code executing in the user's Tabbit
40
+ Browser profile with shared login state, screenshots into model context,
41
+ automatic interruption recovery, and multi-instance resolution — plus a
42
+ browser-backed `web_fetch` provider, `@tab` page mentions in the dsh web
43
+ composer, a dedicated page-access permission, and a `/tabbit` diagnostics
44
+ command. The bundled skill now teaches the tool workflow instead of the
45
+ `tabbit-cli` shell workflow. Requires Node 22.19 or newer (was 20).
46
+ - Adopted the renamed `tabbit-cli` launcher that current Tabbit Browser
47
+ builds register (with fallback to the legacy `tabbit-playwright` name), and
48
+ the per-instance `.product` labels in the instance registry.
49
+ - New model-free tab inventory: `ctx.tabbit.listAllTabs()` and the loopback
50
+ route `GET /tabbit/tabs` list every tab of the running browser profile
51
+ (including the user's own tabs) by talking to the Runtime Service endpoint
52
+ directly — no launcher process, no task, no side effects, ~1ms steady-state.
53
+ Requires a 1.11.16+ Tabbit Browser; the browser is never launched for a
54
+ listing, offline instances report as unavailable instead.
55
+ - The `@` mention menu in the dsh web composer now lists the user's own
56
+ browser tabs alongside agent task pages (active tab first; only http(s)
57
+ pages are offered, since chrome://, extension, and blank/new-tab pages
58
+ cannot deliver content when mentioned), under a "网页标签" group shown
59
+ below DSH's built-in file/session mentions, with up to 50 candidates
60
+ instead of 8. Mentioning a user tab fetches a fresh copy of that URL's
61
+ content through the shared browser fetch task — the user's actual tab is
62
+ never claimed, moved, or focused. The extracted page text no longer lands
63
+ in the sent message itself: the composer sends a short `@Title` mention,
64
+ and the full text is delivered to the model as a separate, collapsed
65
+ "Context injection" entry via an `agent/pre-step` hook — the same delivery
66
+ path DSH's own `@file`/`@session` mentions use — so a mentioned page's
67
+ content never floods the visible chat bubble. `tabbit_browser` gained
68
+ `list_tabs: true` for the model-facing version of the same inventory, paired
69
+ with `claim_tabs` to attach a specific user tab to a new task.
70
+ - Windows support: the launcher is discovered under
71
+ `%LOCALAPPDATA%\Tabbit\LocalAgent\bin\tabbit-cli.exe`, instance selection
72
+ defers to the native CLI when the instance registry is not readable, and the
73
+ environment preflight falls back to runtime-process detection.
74
+ - The environment preflight (`tabbit_browser_install`), the daily plugin
75
+ update check, and the `tabbit_plugin_update` tool carry over from 0.2.x.
76
+ The update check now reads the npm registry for the latest version (with
77
+ release notes served from the published tarball), and stays silent for
78
+ browser-managed (preinstalled) copies, which update together with Tabbit
79
+ Browser.
80
+ - The bundled skill gained references for the runtime interaction helpers
81
+ (`tabbit.observe`, `pasteText`, `triggerAndObserve`, …) and AI-mode ARIA
82
+ snapshot recipes for canvas-backed and visually complex surfaces. It is now
83
+ named `tabbit`, deliberately matching the shared skill Tabbit Browser
84
+ installs into `~/.agents/skills/tabbit/`: DSH's same-name precedence
85
+ prefers that browser-managed copy, and the bundled one is the fallback for
86
+ machines without a current browser. The `/tabbit` diagnostics command was
87
+ renamed to `/tabbit-info` to leave the `/tabbit` slash entry to the skill.
88
+ - Task finishing adapted to the new runtime semantics (plain `finish` now
89
+ retains tabs as a resumable group): the plugin always passes an explicit
90
+ `--keep` or `--discard`, which behaves correctly on both CLI generations,
91
+ so `finish` without `keep_tabs` and end-of-session cleanup reliably close
92
+ task tabs.
93
+ - DSH `0.1.2-alpha.1` also ships its own direct-HTTP `web_fetch` provider and
94
+ pins the `web` service to it; the bundle patch now re-pins `fetchProvider`
95
+ to this plugin's browser-backed provider, keeping JS rendering, login
96
+ state, the page-access/intranet permission gates, and the browser's proxy
97
+ environment (the built-in fetcher connects directly to resolved public IPs
98
+ and refuses every domain on fake-ip proxy setups).
99
+ - Requires DSH `0.1.2-alpha.1` or newer, whose standard agent preset ships
100
+ with `web_fetch` enabled — the bundled "Tabbit mode" preset is gone, and
101
+ plugin activation removes a previously installed managed copy (marker
102
+ protocol respected: user-owned copies are never touched).
103
+
104
+ ## 0.2.3
105
+
106
+ - Fixed the bundle's `cordis.patch.yml` loader entry to use the npm package
107
+ name `dsh-tabbit` instead of the non-existent package `tabbit-browser`. This
108
+ resolves the `Cannot find package 'tabbit-browser'` load failure that
109
+ affected fresh installs after the package was renamed in 0.2.1.
110
+
111
+ ## 0.2.2
112
+
113
+ - Install and update commands now use the npm package (`dsh plugin add
114
+ dsh-tabbit`) as the primary route — prebuilt tarball, CDN-served, and
115
+ counted in npm download stats; the `github:` source remains documented as
116
+ a fallback.
117
+
118
+ ## 0.2.1
119
+
120
+ - Renamed the package to `dsh-tabbit` and published it to npm; updated all
121
+ remaining references (daily update-check changelog URL, install commands in
122
+ the plugin, skill, and READMEs) from `Tabbit-Browser/dsh-plugin` to
123
+ `Tabbit-Browser/dsh-tabbit`.
124
+
125
+ ## 0.2.0
126
+
127
+ - Added a daily plugin update check. Loading the skill compares the installed
128
+ plugin version with the published changelog — cached for 24 hours, at most
129
+ one request per day, silent when offline — and, when outdated, asks the user
130
+ whether to update, showing what the new version added.
131
+ - Added the `tabbit_plugin_update` tool. It records a version the user declined
132
+ so the skill stops announcing it, and can force a recheck after a plugin
133
+ 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,141 @@
1
+ # dsh-tabbit — Tabbit's Official DeepSeek Harness Plugin
2
+
3
+ **English** | [简体中文](README.md) | [Changelog](CHANGELOG.md)
4
+
5
+ ![Tabbit Browser for DeepSeek Harness](assets/dsh-tabbit-banner.png)
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
+ ## Community & Support
52
+
53
+ Scan the QR code below to join the **dsh-tabbit Developer Group** to share feedback, ask questions, and discuss new features:
54
+
55
+ ![dsh-tabbit Developer Group](assets/dsh-tabbit-developer-community-qr.png.jpg)
56
+
57
+ ## Settings
58
+
59
+ ### Basic configuration
60
+
61
+ dsh Settings → `tabbit`, or `$DSH_HOME/settings.yaml`
62
+
63
+ ```yaml
64
+ tabbit:
65
+ instance: "" # explicit 16-hex instance id (/tabbit-info lists them); usually leave empty
66
+ launcherPath: "" # override; default discovers tabbit-cli, falls back to tabbit-playwright; %LOCALAPPDATA%\Tabbit\LocalAgent\bin\tabbit-cli.exe on Windows
67
+ pageAccess: ask # ask (once per session) | always | never
68
+ intranetFetch: ask # web_fetch to intranet/loopback targets: ask (once per session+origin) | always | never
69
+ ```
70
+
71
+ ### Instance resolution priority
72
+
73
+ Priority order when this machine has more than one Tabbit build installed:
74
+
75
+ 1. an explicit `tabbit.instance` setting;
76
+ 2. **the Tabbit instance currently viewing dsh-web** (auto-detected: the
77
+ client plugin pings `/tabbit/instance-hint` on page load, and the server
78
+ traces the loopback socket's peer process up its parent chain to match the
79
+ instance registry's `browserPid`; macOS only — naturally misses when a
80
+ non-Tabbit browser has the page open) — "execute in whichever Tabbit
81
+ you're viewing dsh in";
82
+ 3. an inherited `TABBIT_PLAYWRIGHT_INSTANCE` environment variable (the
83
+ authoritative channel in the embedded form: Tabbit injects its own
84
+ instance id when it launches its bundled dsh);
85
+ 4. automatic registry selection (the single online instance; an ambiguity
86
+ error listing the candidates otherwise — on Windows, when the registry
87
+ isn't readable, the native CLI picks for itself).
88
+
89
+ Check the currently effective source anytime with `/tabbit-info`
90
+ (`execution instance: ... (via ...)`).
91
+
92
+ **Full access note**: dsh's `danger-full-access` permission preset writes the
93
+ session's approval policy as `never` (dsh's definition: auto-deny every ask).
94
+ This plugin's permission gate detects that override and **auto-allows**
95
+ instead of issuing an ask that's guaranteed to be denied — full access means
96
+ full access (bash is already unrestricted in that mode, so gating only the
97
+ browser tool has no defensive value). Exception: a deployment-level default
98
+ of `never` (not a session override) isn't visible to the public API and still
99
+ gets denied — that combination gets a denial message pointing at the
100
+ `tabbit.pageAccess: always` escape hatch.
101
+
102
+ ## Permissions & Security
103
+
104
+ - Because the agent shares the user's real login state, `pageAccess` is a
105
+ dedicated permission independent of filesystem/sandbox permissions, and
106
+ asks for user confirmation by default.
107
+ - Authorization is remembered: once a tool call succeeds, this session won't
108
+ ask again; failures aren't recorded (a retry after failure asks again).
109
+
110
+ ## Development
111
+
112
+ Developing and testing this project depends on a local
113
+ [deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) checkout.
114
+ The `@deepseek-ai/*` packages published on npm generally lag too far behind
115
+ to install directly as dependencies, so you need to build a harness checkout
116
+ locally first, then point the repo's `.dsh-harness` symlink at it with the
117
+ script below (that path is already ignored in `.gitignore`). That's the only
118
+ place you configure it — neither `tsconfig.json` nor `package.json` needs
119
+ any changes.
120
+
121
+ Get and build deepseek-harness (skip if you already have one):
122
+ ```bash
123
+ git clone https://github.com/deepseek-ai/deepseek-harness && cd deepseek-harness && pnpm install && pnpm build && cd ..
124
+ ```
125
+
126
+ Point this repo at it — replace `/path/to/deepseek-harness` with your actual checkout path:
127
+ ```bash
128
+ npm run link-harness -- /path/to/deepseek-harness # or set DSH_HARNESS_PATH
129
+ ```
130
+
131
+ Install and build:
132
+ ```bash
133
+ pnpm install && pnpm build # tsc → lib/
134
+ npm test # build + node --test tests/
135
+ ```
136
+
137
+ ## Known limitations / Roadmap
138
+
139
+ - Mentioning bookmarks/favorites isn't supported yet.
140
+ - Screenshots entering context require a model route that accepts image input.
141
+ - Windows regression testing is limited.
package/README.md CHANGED
@@ -1,113 +1,107 @@
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) | **简体中文** | [Changelog](CHANGELOG.md)
4
4
 
5
- ![Tabbit Browser for DeepSeek Harness](tabbit-for-dsh.png?v=2)
5
+ ![Tabbit Browser for DeepSeek Harness](assets/dsh-tabbit-banner.png)
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
29
 
31
- Install Node.js 20 or newer, then install DSH:
32
-
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
39
-
40
- Install Node.js LTS in PowerShell:
35
+ ### 其他安装模式
41
36
 
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:
42
+ > 本包取代早期的 `tabbit-browser` skill-only 插件;npm 上的 0.2.x 版本也由本版本接续——0.2.x 用户经每日更新检查会收到升级提示,重跑安装命令即可原地升级。
47
43
 
48
- ```powershell
49
- npm install -g @deepseek-ai/dsh
50
- ```
44
+ ## 社区与交流
51
45
 
52
- Run `dsh --version` again to confirm DSH works.
46
+ 欢迎扫描下方二维码加入 **dsh-tabbit 开发者交流群**,交流使用心得、反馈问题与探讨新特性:
53
47
 
54
- ### 2. Install the tabbit-browser plugin
48
+ ![dsh-tabbit 开发者交流群](assets/dsh-tabbit-developer-community-qr.png.jpg)
55
49
 
56
- ```sh
57
- dsh plugin --profile web add dsh-tabbit
58
- ```
50
+ ## 设置
59
51
 
60
- This installs the npm package (prebuilt tarball, CDN-served). If the npm
61
- registry is unreachable, fall back to the GitHub source:
52
+ ### 基本配置
53
+ dsh Settings tabbit,或 `$DSH_HOME/settings.yaml`
62
54
 
63
- ```sh
64
- dsh plugin --profile web add github:Tabbit-Browser/dsh-tabbit
55
+ ```yaml
56
+ tabbit:
57
+ instance: "" # 显式指定 16 位大写 hex 实例 id(/tabbit-info 可列出);通常留空即可
58
+ launcherPath: "" # 默认自动发现:优先 ~/.local/bin/tabbit-cli,回退 tabbit-playwright;Windows 为 %LOCALAPPDATA%\Tabbit\LocalAgent\bin\tabbit-cli.exe
59
+ pageAccess: ask # ask(每会话询问一次)| always | never
60
+ intranetFetch: ask # web_fetch 访问内网/回环目标:ask(每会话每 origin 询问一次)| always | never
65
61
  ```
66
62
 
67
- ### 3. Start DSH
68
-
69
- ```sh
70
- dsh web
71
- ```
63
+ ### 实例解析优先级
72
64
 
73
- ## How it works
65
+ 当本机有多个 Tabbit 版本时的优先级配置
74
66
 
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`:
67
+ 1. `tabbit.instance` 显式设置;
68
+ 2. **正在查看 dsh-web 的 Tabbit 实例**(自动检测:页面加载时 client 插件向 `/tabbit/instance-hint` 打点,服务端由 loopback socket 对端进程沿父链匹配实例注册表的 `browserPid`;仅 macOS,非 Tabbit 浏览器打开时自然不命中)——"在哪个 Tabbit 里看,就在哪个 Tabbit 里执行";
69
+ 3. 继承的 `TABBIT_PLAYWRIGHT_INSTANCE` 环境变量(嵌入形态:Tabbit 启动打包的 dsh 时注入自己的实例 id,即为权威通道);
70
+ 4. 注册表自动选择(唯一在线实例;歧义时报带实例列表的引导错误。Windows 上注册表不可读时委托原生 CLI 自行选择)。
76
71
 
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.
72
+ 当前生效来源可用 `/tabbit-info` 命令查看(`execution instance: ... (via ...)`)。
80
73
 
81
- The environment check also:
74
+ Full access 说明:dsh 的 `danger-full-access` 权限预设会给会话写入审批策略 `never`(dsh 定义为"自动拒绝一切询问")。本插件的权限门检测到该覆盖时**自动放行**,不再发出注定被拒的询问——Full access 就是完全访问(该模式下 bash 本就不受限,单拦浏览器工具没有防御价值)。例外:部署级把审批默认配成 `never`(非会话覆盖)时公开 API 读不到,仍会被拒;无审批通道的组合(如某些 headless 编排)会得到指明 `tabbit.pageAccess: always` 出路的拒绝信息。
82
75
 
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`.
76
+ ## 权限及安全
86
77
 
87
- ## Requirements
78
+ - 基于对用户数据安全和用户登录态权限的考量,设计了独立的 `pageAccess` 权限,该权限独立于文件系统/沙箱权限,默认需用户确认。
79
+ - 授权记录:某工具调用成功后,本会话后续调用不再重复询问;失败不记入(失败后重试会再次询问)。
88
80
 
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.
81
+ ## 开发
95
82
 
96
- ## Notes and limitations
83
+ 项目的开发和测试依赖本地的 [deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) 环境。
84
+ 由于 `@deepseek-ai/*` 系列包在 npm 上的发布版本普遍滞后,不能直接作为依赖安装,因此需要先在本地构建好一份 harness 检出,再通过下方脚本将仓库内的 .dsh-harness 符号链接指向它(该路径已在 .gitignore 中忽略)。
85
+ 整个流程只需配置这一处,`tsconfig.json` 和 `package.json` 均无需改动。
97
86
 
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.
87
+ Deepseek Harness 代码获取及安装(如果已安装请忽略)
88
+ ```bash
89
+ git clone https://github.com/deepseek-ai/deepseek-harness && cd deepseek-harness && pnpm install && pnpm build && cd ..
90
+ ```
103
91
 
104
- ## Development
92
+ 将本机的 Deepseek 环境路径修改并 ln 到本项目,将 `/path/to/deepseek-harness` 改为你的实际目录。
93
+ ```bash
94
+ npm run link-harness -- /path/to/deepseek-harness # 或设置环境变量 DSH_HARNESS_PATH
95
+ ```
105
96
 
106
- ```sh
107
- npm test
108
- npm pack --dry-run
97
+ 安装和编译
98
+ ```bash
99
+ pnpm install && pnpm build # tsc → lib/
100
+ npm test # 构建 + node --test tests/
109
101
  ```
110
102
 
111
- ## License
103
+ ## 已知限制 / 路线图
112
104
 
113
- MIT
105
+ - 收藏夹/书签的提及暂不支持。
106
+ - 截图进上下文要求当前模型路由支持图像输入。
107
+ - Windows 版本回归测试有限。