dsh-plugin-tool-management 0.21.0 → 0.21.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/CHANGELOG.md +35 -0
- package/README.md +5 -4
- package/README_EN.md +5 -4
- package/docs/images/icon.png +0 -0
- package/docs/images/icon.svg +1 -0
- package/docs/update.md +1 -0
- package/lib/client.js +718 -148
- package/lib/context-inject-frame.js +36 -5
- package/lib/context-inject.js +1 -1
- package/lib/index.js +29 -5
- package/lib/memories/snapshot.js +17 -9
- package/lib/op-registry.js +3 -0
- package/lib/ops/trash.js +12 -1
- package/lib/settings-sidecars.js +37 -0
- package/lib/sidebar-settings.js +13 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,40 @@
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
## [0.21.1] - 2026-10-18
|
|
14
|
+
|
|
15
|
+
### 新增
|
|
16
|
+
|
|
17
|
+
- **侧栏入口**:侧栏加一行「工具管理」,兼容页可随时关闭 / 开启(默认开启)。
|
|
18
|
+
- **插件行显示名**:中文显示「工具管理」,英文显示 "Tools Management"。
|
|
19
|
+
|
|
20
|
+
### 变更
|
|
21
|
+
|
|
22
|
+
- **「工具」改名「工具管理」**:设置分区、侧栏入口与界面指路文案一并对齐。
|
|
23
|
+
- **场景一条一行**:单列排列,描述固定第二行,开关与 ⋯ 右对齐。
|
|
24
|
+
- **来源卡头目录下移**:目录改到标题下一行,窄面板里也照常显示。
|
|
25
|
+
- **归档会话行放宽**:标题、目录与日期不再挤在一起。
|
|
26
|
+
- **会话页标题去掉加粗**:目录卡头与其余页一致。
|
|
27
|
+
- **令牌提示压成一行**。
|
|
28
|
+
- **模式横幅按钮**:「退出模式」红字红框;「锁定」加粗,悬停才泛琥珀。
|
|
29
|
+
- **场景卡片精简**:锁定键只在进入场景后出现在「退出模式」旁,提示词标签只留异常两种。
|
|
30
|
+
- **回收站详情补全**:场景与记忆补上条目信息,技能条目套用技能详情排版。
|
|
31
|
+
- **提示词页场景提示**:与 MCP 页同一句。
|
|
32
|
+
|
|
33
|
+
### 修复
|
|
34
|
+
|
|
35
|
+
- **MCP 备注改到编辑页**:详情页只读,并带一格空备注位。
|
|
36
|
+
- **MCP 关掉后状态灯立刻变灰**。
|
|
37
|
+
- **先打文字再打斜杠没有菜单**。
|
|
38
|
+
- **场景开关与 ⋯ 没有垂直居中**。
|
|
39
|
+
- **场景里的技能被删除后就退不出场景**。
|
|
40
|
+
- **归档会话行内按钮没有边框**。
|
|
41
|
+
- **锁定键悬停时字色变黑**。
|
|
42
|
+
- **回收站详情里的技能来源显示成 uuid**。
|
|
43
|
+
- **开关圆角与官方不一致**:方肩改为正圆角。
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
13
47
|
## [0.21.0] - 2026-10-17
|
|
14
48
|
|
|
15
49
|
适配 DSH 0.2.1-rc.2。
|
|
@@ -44,6 +78,7 @@
|
|
|
44
78
|
- **「已清空」通知按原因分叉**:官方接管时说明是官方在送、旧内容作废;用户关掉或子会话不适用时说明这里不发送。
|
|
45
79
|
- **注入的首份内容不再带「取代」声明**:「同一类内容以最新一份为准」只在替换旧消息时发,「只列了启用的技能」这类边界陈述每份都发。
|
|
46
80
|
- **提示词块补一句效力声明**:说明这些规则要遵循、你在对话里说的优先。
|
|
81
|
+
- **对抗性审查收口**:场景域「this one」改「it」(兼容多场景同时启用的历史态);提示词域「for this machine」改「right now」(场景预设接管时不是机器全局);记忆段截断标记与折叠行不再重复;有记忆被截掉但信号放不下时强制追加标记(不再静默截断);记忆段截断时 how 行点名 `memory_manager_list` 给出查询出口。
|
|
47
82
|
|
|
48
83
|
---
|
|
49
84
|
|
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ dsh plugin --profile web add dsh-plugin-tool-management@latest # web 版
|
|
|
23
23
|
dsh plugin --profile desktop add dsh-plugin-tool-management@latest # 桌面版
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
装完 web 版硬刷新浏览器(Cmd/Ctrl+Shift+R),桌面版重启应用,设置 →
|
|
26
|
+
装完 web 版硬刷新浏览器(Cmd/Ctrl+Shift+R),桌面版重启应用,设置 → **工具管理**。插件只写自己的文件,不改技能源文件;重启与升级后配置都在。
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
@@ -83,7 +83,7 @@ dsh plugin --profile desktop add dsh-plugin-tool-management@latest # 桌面
|
|
|
83
83
|
dsh plugin --profile desktop remove dsh-plugin-tool-management # 桌面版 · 卸载
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
装完 web 版硬刷新浏览器、桌面版重启应用,设置 →
|
|
86
|
+
装完 web 版硬刷新浏览器、桌面版重启应用,设置 → **工具管理** 出现八栏即成功。界面改动即时生效,宿主侧改动需重启(web 重启 `dsh web`,桌面重启桌面应用)。
|
|
87
87
|
|
|
88
88
|
也可以让模型代劳:
|
|
89
89
|
|
|
@@ -159,6 +159,7 @@ dsh plugin --profile web add dsh-plugin-tool-management@latest
|
|
|
159
159
|
|
|
160
160
|
- **「兼容」页**:宿主版本、能力可用数、每个动作走原生 / 适配 / 不可用、降级项与原因;三个写入口:访问令牌、注入设置、模型工具表。
|
|
161
161
|
- **兼容页功能总览**:一行一个功能点,宿主契约四条(子智能体人设委派 / 工具限制 / 创建时序 / Web 准入)与「裸模块解析」四包都列在这里,升级后哪一处悄悄不工作一眼可见。
|
|
162
|
+
- **侧栏入口**:侧栏里多一行「工具管理」,点开就是同一套八页;兼容页那颗「关闭侧栏 / 开启侧栏」随时能把这一行撤掉或挂回去(默认挂出,与「设置 → 工具管理」并存)。
|
|
162
163
|
- **命令行**:`node scripts/doctor.mjs`(体检)、`node scripts/host-deps.mjs --fix`(依赖对齐)。
|
|
163
164
|
- **压制型预设**(`minimal` 这类)下本插件的注入默认停用,可在「兼容」页按域强制打开。
|
|
164
165
|
- **关掉「技能」「提示词」的勾选 = 连宿主那份一起停**(这两域在标准预设下由官方送);其余三域勾选完全生效。
|
|
@@ -196,7 +197,7 @@ dsh plugin --profile web add dsh-plugin-tool-management@latest
|
|
|
196
197
|
| `tokenDisabled` | `true` = 令牌保留在配置里但当前不生效(兼容页「关闭保护」写的就是这一行)。写操作不再要求令牌,明文查看仍然要。 |
|
|
197
198
|
| `maxBodyBytes` | 请求体上限,默认 88 MiB。 |
|
|
198
199
|
|
|
199
|
-
**磁盘上的明文(必读)**:打码**只发生在界面展示**;MCP 的 `env` / `headers` 与插件自己的 `token` 在 `cordis.patch.yml`(及各 profile 副本)里始终明文,改配置前整份文件会备份进 `~/.dsh/tool-management/backups/`(不加密、不轮转、卸载也不回收)—— 一份密钥最多有 `5 ×(含它的 patch 文件数)+ 1` 份明文副本。令牌门禁**管不到磁盘读取**,防线是操作系统的文件权限。清理入口:**设置 →
|
|
200
|
+
**磁盘上的明文(必读)**:打码**只发生在界面展示**;MCP 的 `env` / `headers` 与插件自己的 `token` 在 `cordis.patch.yml`(及各 profile 副本)里始终明文,改配置前整份文件会备份进 `~/.dsh/tool-management/backups/`(不加密、不轮转、卸载也不回收)—— 一份密钥最多有 `5 ×(含它的 patch 文件数)+ 1` 份明文副本。令牌门禁**管不到磁盘读取**,防线是操作系统的文件权限。清理入口:**设置 → 工具管理 → 兼容 → 「清理旧备份」**。
|
|
200
201
|
|
|
201
202
|
- **浏览器**:读写走 cookie,不需要令牌;**明文密钥**(显示密钥 / 导出)要令牌。令牌在「兼容」页的「访问令牌」块管理:本次启动填一次管到 DSH 退出;写进配置文件要重启生效。
|
|
202
203
|
- **销毁方向一律要当场再输一次当前令牌**(关闭保护 / 修改 / 删除)—— 本次启动解锁过不算。
|
|
@@ -212,7 +213,7 @@ dsh plugin --profile web add dsh-plugin-tool-management@latest
|
|
|
212
213
|
| 装完没有页面 | 硬刷新;不行重启 DSH。 |
|
|
213
214
|
| 重复 MCP 页签 | 删 `cordis.patch.yml` 里的旧 loader 行后重启。 |
|
|
214
215
|
| 改坏配置 DSH 起不来 | 从 `~/.dsh/tool-management/backups/` 取最近的 `cordis.patch.yml.<层级>.bak-<时间戳>` 覆盖回去(每份 patch 各留 5 份)。 |
|
|
215
|
-
| 升级 DSH 后动作不可用 | 设置 →
|
|
216
|
+
| 升级 DSH 后动作不可用 | 设置 → 工具管理 → **兼容** 看原因;`doctor.mjs` → `host-deps.mjs --fix`。 |
|
|
216
217
|
| 升级 DSH 后装不上 / 提示 peer 不符 | 兼容范围逐代带上界(当前一代到 `<0.2.2`),跨 minor 升级要等插件同步适配(装新宿主前先升插件)。 |
|
|
217
218
|
| 模型调不到某条工具 | 「兼容」页的**模型工具表**看它是不是被关了(出厂默认关着 19 条);面板和脚本不受影响。 |
|
|
218
219
|
| `approval=never` 还要确认吗 | 不弹卡,直接放行并记日志;想问回来切回「工作区内修改」。 |
|
package/README_EN.md
CHANGED
|
@@ -23,7 +23,7 @@ dsh plugin --profile web add dsh-plugin-tool-management@latest # web
|
|
|
23
23
|
dsh plugin --profile desktop add dsh-plugin-tool-management@latest # desktop
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
Hard-refresh the browser after installing for web (Cmd/Ctrl+Shift+R), or restart the desktop app after installing for desktop — a **Tools** panel in Settings means it worked. The plugin only writes its own files, never touches skill sources, and your configuration survives restarts and upgrades.
|
|
26
|
+
Hard-refresh the browser after installing for web (Cmd/Ctrl+Shift+R), or restart the desktop app after installing for desktop — a **Tools Management** panel in Settings means it worked. The plugin only writes its own files, never touches skill sources, and your configuration survives restarts and upgrades.
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
@@ -81,7 +81,7 @@ dsh plugin --profile desktop add dsh-plugin-tool-management@latest # desktop
|
|
|
81
81
|
dsh plugin --profile desktop remove dsh-plugin-tool-management # desktop · uninstall
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
Hard-refresh the browser (web) or restart the desktop app, then a **Tools** panel with eight tabs means it worked. Client changes hot-reload; host-side changes need the client restarted (`dsh web` / the desktop app).
|
|
84
|
+
Hard-refresh the browser (web) or restart the desktop app, then a **Tools Management** panel with eight tabs means it worked. Client changes hot-reload; host-side changes need the client restarted (`dsh web` / the desktop app).
|
|
85
85
|
|
|
86
86
|
You can also ask the model:
|
|
87
87
|
|
|
@@ -157,6 +157,7 @@ For the desktop app, swap `web` for `desktop` and end with "remind me to restart
|
|
|
157
157
|
|
|
158
158
|
- **Host tab**: host version, usable capability count, per-action routing (native / adapter / unavailable), degradations and reasons; three write entries: access token, injection settings, model tool table.
|
|
159
159
|
- **Compatibility page overview**: one row per feature point. The four host contracts (subagent persona delegation / tool restriction / creation ordering / Web admission) and the "bare module resolution" block all live there — a feature that silently stops working after a host upgrade shows up at a glance.
|
|
160
|
+
- **Sidebar entry**: a "Tools Management" row in the sidebar opens the same eight pages; the Host tab's "Hide from sidebar / Show in sidebar" button adds or removes that row at any time (on by default, alongside Settings → Tools Management).
|
|
160
161
|
- **Command line**: `node scripts/doctor.mjs` (health check), `node scripts/host-deps.mjs --fix` (align dependencies).
|
|
161
162
|
- Under a **suppressing preset** such as `minimal`, this plugin's injection is off by default; the Host tab can force any domain back on.
|
|
162
163
|
- Unchecking "Skills" or "Prompt" really stops them — under standard presets the host delivers those two itself; the other three domains follow the checkbox exactly.
|
|
@@ -194,7 +195,7 @@ The six recycle bins each own one directory under `trash/`: `{skills,memories,su
|
|
|
194
195
|
| `tokenDisabled` | `true` = the token stays in the config but is not enforced (this is the line written by "Turn protection off"). Writes no longer need it; revealing plaintext still does. |
|
|
195
196
|
| `maxBodyBytes` | Request body cap, 88 MiB by default. |
|
|
196
197
|
|
|
197
|
-
**Plaintext on disk (read this)**: masking is **display-only**; MCP `env` / `headers` and the plugin's own `token` stay in cleartext inside `cordis.patch.yml` (and each profile copy), and every config change copies the whole file into `~/.dsh/tool-management/backups/` — unencrypted, never rotated, not reclaimed on uninstall. One secret can therefore exist as `5 × (patch files holding it) + 1` plaintext copies. The token gate decides *who may read plaintext over HTTP*; it does nothing about *reading the files*, where the only defence is your filesystem permissions. **To clean up: Settings → Tools → Host → "Clean old backups"**.
|
|
198
|
+
**Plaintext on disk (read this)**: masking is **display-only**; MCP `env` / `headers` and the plugin's own `token` stay in cleartext inside `cordis.patch.yml` (and each profile copy), and every config change copies the whole file into `~/.dsh/tool-management/backups/` — unencrypted, never rotated, not reclaimed on uninstall. One secret can therefore exist as `5 × (patch files holding it) + 1` plaintext copies. The token gate decides *who may read plaintext over HTTP*; it does nothing about *reading the files*, where the only defence is your filesystem permissions. **To clean up: Settings → Tools Management → Host → "Clean old backups"**.
|
|
198
199
|
|
|
199
200
|
- **Browser**: reads and writes go through cookies, no token needed; **plaintext credentials** (reveal / export) do. The token is managed in the **Access token** block on the Host tab.
|
|
200
201
|
- **Every destructive direction asks for the current token again** (turn protection off / change / delete). Being unlocked this run does not count.
|
|
@@ -209,7 +210,7 @@ The six recycle bins each own one directory under `trash/`: `{skills,memories,su
|
|
|
209
210
|
| Pages missing after install | Hard refresh; restart DSH if that fails. |
|
|
210
211
|
| Duplicate MCP tabs | Remove the stale loader row from `cordis.patch.yml`, restart. |
|
|
211
212
|
| Broken config, DSH won't boot | Restore the newest `cordis.patch.yml.<level>.bak-<timestamp>` from `~/.dsh/tool-management/backups/` (5 per patch file). |
|
|
212
|
-
| Action stopped working after a DSH upgrade | Settings → Tools → **Host** for the reason; `doctor.mjs` → `host-deps.mjs --fix`. |
|
|
213
|
+
| Action stopped working after a DSH upgrade | Settings → Tools Management → **Host** for the reason; `doctor.mjs` → `host-deps.mjs --fix`. |
|
|
213
214
|
| Won't install / peer mismatch after a DSH upgrade | Each generation has its own upper bound (the current one stops below 0.2.2); a minor upgrade needs a matching plugin release (upgrade the plugin before the host). |
|
|
214
215
|
| The model cannot call a tool it should have | Check the **Model tool table** on the Host tab — 19 tools ship switched off. The panel and scripts are unaffected either way. |
|
|
215
216
|
| Still asked to confirm with `approval=never`? | No card appears — straight through with a log line. Switch back to "workspace write" to get the questions again. |
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1792285388879" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1697" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M592 336h-416c-52.928 0-96 43.072-96 96v416c0 52.928 43.072 96 96 96h416c52.928 0 96-43.072 96-96v-416c0-52.928-43.072-96-96-96z m32 512a32 32 0 0 1-32 32h-416c-17.632 0-32-14.336-32-32v-416c0-17.632 14.368-32 32-32h416c17.664 0 32 14.368 32 32v416z" p-id="1698"></path><path d="M720 208h-416a32 32 0 0 0 0 64h416c17.664 0 32 14.368 32 32v416a32 32 0 1 0 64 0v-416c0-52.928-43.072-96-96-96zM528 752h-288a32 32 0 1 0 0 64h288a32 32 0 1 0 0-64z" p-id="1699"></path><path d="M848 80h-416a32 32 0 0 0 0 64h416c17.664 0 32 14.368 32 32v416a32 32 0 1 0 64 0v-416c0-52.928-43.072-96-96-96z" p-id="1700"></path></svg>
|
package/docs/update.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| 版本 | 发布 | 主题 |
|
|
6
6
|
| ------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
7
|
+
| [0.21.1](../CHANGELOG.md#0211---2026-10-18) | 2026-10-18 | 侧栏加「工具管理」入口与插件行显示名;场景改单列、描述第二行、开关与 ⋯ 居中,锁定键挪进模式横幅;来源目录挪到标题下、归档会话行放宽;开关圆角对齐官方;回收站详情补全条目信息;修好技能被删后退不出场景、斜杠菜单在行内不弹等一批问题 |
|
|
7
8
|
| [0.21.0](../CHANGELOG.md#0210---2026-10-17) | 2026-10-17 | 适配 DSH 0.2.1-rc.2:人设工具限制提到创建时生效、面板可挂反代子路径、Web 鉴权补调用方身份、提示词页显示 ~/.agents/AGENTS.md;兼容页补四条宿主契约行与「裸模块解析」一块;注入模板文案改英文(自己的内容原样注入) |
|
|
8
9
|
| [0.20.3](../CHANGELOG.md#0203---2026-10-17) | 2026-10-17 | 界面与官方对齐一批(焦点环、圆角、等宽字体);修好 MCP 连接失败状态灯不红、新建记忆弹窗误关丢内容、焦点环盖掉宿主「不要轮廓」设定(#18) |
|
|
9
10
|
| [0.20.2](../CHANGELOG.md#0202---2026-10-16) | 2026-10-16 | 界面降噪一批:行尾动作收进 ⋯、没在用的分组默认折叠、会话整行可点勾选;修好折叠卡片要点两次才展开与 npm 包带上演示视频 |
|