dsh-cherry-bridge 0.2.0 → 0.2.1
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.
- package/README.en.md +7 -7
- package/README.md +6 -5
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +668 -35
- package/docs/e2e-checklist.md +49 -1
- package/lib/client.js +264 -31
- package/package.json +1 -1
- package/src/AGENTS.md +103 -14
- package/src/connection.ts +174 -2
- package/src/deviceStore.ts +314 -1
- package/src/httpApi.ts +234 -27
- package/src/index.ts +13 -0
- package/src/tools.ts +148 -9
- package/ui/AGENTS.md +21 -0
- package/ui/src/App.tsx +26 -10
- package/ui/src/DeviceCard.tsx +106 -4
- package/ui/src/PairingWizard.tsx +80 -5
- package/ui/src/ToolScopePanel.tsx +19 -6
- package/ui/src/api.ts +111 -17
- package/ui/src/i18n.ts +39 -0
- package/ui/src/styles.css +24 -0
- package/ui/src/types.ts +7 -0
package/README.en.md
CHANGED
|
@@ -36,17 +36,17 @@ flowchart TB
|
|
|
36
36
|
|
|
37
37
|
> **DSH version requirement**: `>=0.2.0-rc.2 <0.3.0-0` (declared via `engines.dsh` in `package.json`; when unmet the bundle is skipped and its settings-page row disabled — `dsh plugin allow-version` grants an explicit exemption; 0.3.0 needs a fresh compatibility pass before the range widens).
|
|
38
38
|
>
|
|
39
|
-
> **Cherry Studio compatibility**: desktop **2.1.4 – 2.1.
|
|
39
|
+
> **Cherry Studio compatibility**: desktop **2.1.4 – 2.1.10 is verified** — the `v3` custom-address QR needs **2.1.8+**, and the `v2` QR of 2.1.4 – 2.1.7 works too. 2.1.9/2.1.10 differ from 2.1.8 on the remote-access face by exactly one robustness fix in the desktop's write chain (PR #22593, no client impact), and were smoke-tested on a real 2.1.10 (create a session → send → wait → read). Outside that range is unverified: the handshake negotiates protocol version `[1]` only, so an incompatible peer fails loudly as `unreachable` instead of misbehaving. The protocol packages are pinned to `0.7.0` / `0.2.5` — 2.1.10 still ships that same pair.
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
42
|
# From npm (recommended, pinned)
|
|
43
|
-
npx @deepseek-ai/dsh plugin --profile web add dsh-cherry-bridge@0.2.
|
|
43
|
+
npx @deepseek-ai/dsh plugin --profile web add dsh-cherry-bridge@0.2.1
|
|
44
44
|
|
|
45
45
|
# Install the latest npm release
|
|
46
46
|
npx @deepseek-ai/dsh plugin --profile web add dsh-cherry-bridge
|
|
47
47
|
|
|
48
48
|
# From GitHub source (same commit as the npm release)
|
|
49
|
-
npx @deepseek-ai/dsh plugin --profile web add github:SAXEM1997/dsh-cherry-bridge#v0.2.
|
|
49
|
+
npx @deepseek-ai/dsh plugin --profile web add github:SAXEM1997/dsh-cherry-bridge#v0.2.1
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
The package ships `cordis.patch.yml` (`package.json`'s `dsh.bundle.patch` points
|
|
@@ -107,7 +107,7 @@ cherry_interactions → see pending question/approval cards; cherry_respond answ
|
|
|
107
107
|
|
|
108
108
|
| Tool | What it does |
|
|
109
109
|
| --- | --- |
|
|
110
|
-
| `cherry_devices` | List every paired device and its connection state (`connected`/`connecting`/`offline`/`disabled`/`identity-mismatch`). |
|
|
110
|
+
| `cherry_devices` | List every paired device and its connection state (`connected`/`connecting`/`offline`/`disabled`/`identity-mismatch`). `action: "forget"` makes named addresses go away (removed from the dial list, and not re-learned when the desktop advertises them again, until `remember` or a re-pair); `action: "remember"` lifts that mark so the next handshake may learn them again. Both write actions require `device` and `hosts`. |
|
|
111
111
|
| `cherry_agents` | List the agents available on a device (paginated). A truncated answer always carries `truncated` + `truncationReason` (`limit` or `safety-bound`, the latter the 1000-item internal ceiling); when the stop point can be named it also carries a `resumeCursor`: replay it as `cursor` with the same device and filters to continue from that stop point (`limit` then bounds the next answer). A token from another tool, device or filter set is refused **locally**, never forwarded. |
|
|
112
112
|
| `cherry_workspaces` | List an agent's **registered** workspaces, and whether a system workspace exists. A truncated answer always carries `truncated` + `truncationReason`; when the stop point can be named it also carries a `resumeCursor` — replay it as `cursor` with the same filters to continue. |
|
|
113
113
|
| `cherry_sessions` | List an agent's sessions, optionally filtered by workspace. A truncated answer always carries `truncated` + `truncationReason` (`limit` or `safety-bound`); when the stop point can be named it also carries a `resumeCursor`: replay it as `cursor` with the same device and **identical filters** to continue (`limit` then bounds the next answer); a token from another tool, device or filter set is refused **locally**. |
|
|
@@ -217,9 +217,9 @@ subscription was lost and could not be rebuilt, so the outcome is
|
|
|
217
217
|
The plugin is also a **web client bundle** (`package.json`'s `dsh.client`,
|
|
218
218
|
exporting `./client`). Through the `settings.section` slot it registers a
|
|
219
219
|
**`cherry-remote`** page (nav label “Cherry Bridge”): device cards
|
|
220
|
-
(enable/disable/remove
|
|
221
|
-
scope panel, and live state pushed over the
|
|
222
|
-
(`/cherry-remote/api/events`).
|
|
220
|
+
(enable/disable/remove, plus forget/restore for an address), a pairing wizard
|
|
221
|
+
(paste → 6-digit code → verdict), a scope panel, and live state pushed over the
|
|
222
|
+
same-origin SSE feed (`/cherry-remote/api/events`).
|
|
223
223
|
|
|
224
224
|
The 14 tools appear **per workspace**, by **hiding, not refusing** (in an
|
|
225
225
|
out-of-scope session they never enter the tool table, saving context):
|
package/README.md
CHANGED
|
@@ -34,17 +34,17 @@ flowchart TB
|
|
|
34
34
|
|
|
35
35
|
> **DSH 版本需求**:`>=0.2.0-rc.2 <0.3.0-0`(由 `package.json` 的 `engines.dsh` 声明;不满足时 bundle 被跳过、设置页里该插件的行被禁用,确需在区间外使用可用 `dsh plugin allow-version` 精确豁免。0.3.0 需重新评估兼容性后再放开)。
|
|
36
36
|
>
|
|
37
|
-
> **Cherry Studio 兼容范围**:桌面端 **2.1.4 – 2.1.
|
|
37
|
+
> **Cherry Studio 兼容范围**:桌面端 **2.1.4 – 2.1.10 已核对**——`v3` 自定义地址二维码需 **2.1.8+**,2.1.4–2.1.7 的 `v2` 二维码同样可用。2.1.9/2.1.10 与 2.1.8 在 remote-access 面上只差桌面端发送链的一处健壮性修复(PR #22593,不影响客户端),并在 2.1.10 真机上跑过「建会话 → 发送 → 等待 → 读取」冒烟。区间外未经验证:握手只协商协议版本 `[1]`,不兼容时会以 `unreachable` 明确失败,不会静默出错。协议包钉在 `0.7.0` / `0.2.5`,2.1.10 携带的还是同一对版本。
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
# 从 npm 安装(推荐,钉住版本)
|
|
41
|
-
npx @deepseek-ai/dsh plugin --profile web add dsh-cherry-bridge@0.2.
|
|
41
|
+
npx @deepseek-ai/dsh plugin --profile web add dsh-cherry-bridge@0.2.1
|
|
42
42
|
|
|
43
43
|
# 安装 npm 最新发布版
|
|
44
44
|
npx @deepseek-ai/dsh plugin --profile web add dsh-cherry-bridge
|
|
45
45
|
|
|
46
46
|
# 从 GitHub 源码安装(与 npm 发布同一提交)
|
|
47
|
-
npx @deepseek-ai/dsh plugin --profile web add github:SAXEM1997/dsh-cherry-bridge#v0.2.
|
|
47
|
+
npx @deepseek-ai/dsh plugin --profile web add github:SAXEM1997/dsh-cherry-bridge#v0.2.1
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
本包自带 `cordis.patch.yml`(`package.json` 的 `dsh.bundle.patch` 指向它),
|
|
@@ -98,7 +98,7 @@ cherry_interactions → 看待答的提问/审批卡;cherry_respond 作答
|
|
|
98
98
|
|
|
99
99
|
| 工具 | 作用 |
|
|
100
100
|
| --- | --- |
|
|
101
|
-
| `cherry_devices` | 列出已配对设备及连接状态(`connected`/`connecting`/`offline`/`disabled`/`identity-mismatch
|
|
101
|
+
| `cherry_devices` | 列出已配对设备及连接状态(`connected`/`connecting`/`offline`/`disabled`/`identity-mismatch`)。`action: "forget"` 可遗忘指定地址(从拨号列表移除,且桌面再广播也不会被重新学习,直到 `remember` 或重新配对);`action: "remember"` 撤销该标记(下次握手可重新学习);两者都需要 `device` 与 `hosts`。 |
|
|
102
102
|
| `cherry_agents` | 列出某设备上可用的 agent(分页)。被截断时必带 `truncated`+`truncationReason`(`limit` 或 `safety-bound`,后者是 1000 条内部上限);停点可命名时还给出 `resumeCursor`——用同一 device 与过滤条件把它回传为 `cursor` 即可从停点继续(此时 `limit` 约束的是下一次回答);跨工具/设备/过滤条件的令牌会被**本地拒绝**,不会转发给对端。 |
|
|
103
103
|
| `cherry_workspaces` | 列出某 agent 的**已注册**工作区,以及是否存在系统工作区。被截断时必带 `truncated`+`truncationReason`;停点可命名时还给出 `resumeCursor`——用相同过滤条件回传为 `cursor` 即可续读。 |
|
|
104
104
|
| `cherry_sessions` | 列出某 agent 的会话,可按工作区过滤。被截断时必带 `truncated`+`truncationReason`(`limit` 或 `safety-bound`),停点可命名时还给出 `resumeCursor`——用同一 device 与**相同过滤条件**把它回传为 `cursor` 即可从停点继续(此时 `limit` 约束的是下一次回答);跨工具/设备/过滤条件的令牌会被**本地拒绝**。 |
|
|
@@ -169,7 +169,8 @@ cherry_interactions → 看待答的提问/审批卡;cherry_respond 作答
|
|
|
169
169
|
|
|
170
170
|
插件同时是 **web client bundle**(`package.json` 的 `dsh.client`,导出 `./client`),通过
|
|
171
171
|
`settings.section` 槽位注册 **`cherry-remote`**(导航标签「Cherry 互联」)页面:
|
|
172
|
-
|
|
172
|
+
设备卡片(启用/停用/删除,地址的「忘记 / 恢复」)、配对向导(粘贴 → 6 位验证码 → 终态)、
|
|
173
|
+
启用范围面板,以及经
|
|
173
174
|
`/cherry-remote/api/events` SSE 推送的实时状态。
|
|
174
175
|
|
|
175
176
|
14 个工具**按工作区**决定是否出现,机制是**隐藏而非拒绝**(不在范围的会话里不进工具表,省上下文):
|