dsh-plugin-tool-management 0.8.0 → 0.9.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.
- package/CHANGELOG.md +67 -1
- package/README.md +53 -48
- package/README_EN.md +47 -44
- package/docs/images/1-EN.png +0 -0
- package/docs/images/1.png +0 -0
- package/docs/images/2-EN.png +0 -0
- package/docs/images/2.png +0 -0
- package/docs/images/3-EN.png +0 -0
- package/docs/images/3.png +0 -0
- package/docs/images/4-EN.png +0 -0
- package/docs/images/4.png +0 -0
- package/docs/images/5-EN.png +0 -0
- package/docs/images/5.png +0 -0
- package/docs/images/6-EN.png +0 -0
- package/docs/images/6.png +0 -0
- package/docs/images/7-EN.png +0 -0
- package/docs/images/7.png +0 -0
- package/docs/images/8-EN.png +0 -0
- package/docs/images/8.png +0 -0
- package/docs/update.md +39 -0
- package/lib/agents-md/preset-id.js +1 -1
- package/lib/agents-md/service.js +46 -9
- package/lib/approval-policy.js +1 -1
- package/lib/client.js +431 -135
- package/lib/compat/preset-reach.js +155 -93
- package/lib/compat/probe.js +6 -4
- package/lib/context-inject.js +304 -0
- package/lib/hub.js +155 -13
- package/lib/imports/upload.js +34 -14
- package/lib/index.js +870 -226
- package/lib/mcp/state-section.js +46 -15
- package/lib/rules/archive-engine.js +182 -57
- package/lib/rules/archive.js +57 -1
- package/lib/rules/service.js +386 -156
- package/lib/scene-prompt-sync.js +101 -12
- package/lib/skills/catalog.js +125 -0
- package/lib/skills/core.js +38 -4
- package/lib/skills/service.js +36 -10
- package/lib/subagents/catalog.js +15 -5
- package/lib/subagents/service.js +39 -28
- package/lib/subagents/tools.js +18 -13
- package/package.json +14 -9
- package/screenshots.json +8 -8
- package/docs/images/1/345/234/272/346/231/257.png +0 -0
- package/docs/images/1/345/234/272/346/231/257_en.png +0 -0
- package/docs/images/2MCP.png +0 -0
- package/docs/images/2MCP_en.png +0 -0
- package/docs/images/3/346/212/200/350/203/275.png +0 -0
- package/docs/images/3/346/212/200/350/203/275_en.png +0 -0
- package/docs/images/4/345/255/220/346/231/272/350/203/275/344/275/223.png +0 -0
- package/docs/images/4/345/255/220/346/231/272/350/203/275/344/275/223_en.png +0 -0
- package/docs/images/5/346/217/220/347/244/272/350/257/215.png +0 -0
- package/docs/images/5/346/217/220/347/244/272/350/257/215_en.png +0 -0
- package/docs/images/6/350/256/260/345/277/206.png +0 -0
- package/docs/images/6/350/256/260/345/277/206_en.png +0 -0
- package/docs/images/7/344/274/232/350/257/235.png +0 -0
- package/docs/images/7/344/274/232/350/257/235_en.png +0 -0
- package/docs/images/8/345/205/274/345/256/271.png +0 -0
- package/docs/images/8/345/205/274/345/256/271_en.png +0 -0
- package/lib/prompt-sections.js +0 -148
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,72 @@
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
+
## [0.9.0] - 2026-09-16
|
|
14
|
+
|
|
15
|
+
### 新增
|
|
16
|
+
|
|
17
|
+
- **五个域各有自己的上下文注入**(用户裁定):场景和记忆 / MCP / 技能 / 子智能体 / 提示词各发一条消息、轨迹里各占一行;只改一个域只重发那一条,域被关掉或清空时单独发一条「已清空」。
|
|
18
|
+
- **提示词与技能目录两个新域**:官方那两条行挂得到就让官方送(标准等),挂不到(极简)才由插件兜底,不会出现两份;场景提示词与 `~/.dsh/AGENTS.md` 在官方语义里是同一件事,合并为一个「提示词」域。
|
|
19
|
+
- **兼容页「注入」块**:总开关「极简模式也注入」+ 五个域勾选,设置存 `tool-management/inject-settings.json`。
|
|
20
|
+
- **模型侧信息补全**:技能同名标出 `shadowed by <root>`(被覆盖)与 `preferred`(首选),启用被覆盖的副本不再回 OK 而无效;`skill_manager_list` / `prompt_manager_list` 给出源文件路径;MCP 备注进 `mcp_manager_list` 输出(字段 `user-hint`);未运行的服务器也显示工具描述(按「上次运行时」缓存),超两行默认折叠。
|
|
21
|
+
- **AGENTS.md 预设库记住「最近一次应用」**:手改过全局文件也能答出「来自预设 X(此后文件有变)」,不再退化成全列。
|
|
22
|
+
- **`npm run sync:profile`**:把构建产物镜像进 DSH profile——profile 里是硬链接拷贝,构建新增的文件不会自动过去。
|
|
23
|
+
|
|
24
|
+
### 变更
|
|
25
|
+
|
|
26
|
+
- **注入不再依赖系统提示词段**(用户裁定):四个域从 `systemPrompt.section()` 改走官方自己用的那条通道(`agent/pre-step` 合成消息)——persona `complete` 的预设(极简)再也压不掉;内容没变不重发,引导语压成一句。
|
|
27
|
+
- **域名与顺序**:`记忆` → **场景和记忆**、`全局提示词` → **提示词**;从左到右 **场景和记忆 → MCP → 技能 → 子智能体 → 提示词**(注入块、可达矩阵、注入消息三处一致)。
|
|
28
|
+
- **兼容页「预设注入边界」与页脚重写**:页脚区分「可调用 ≠ 已知晓」——工具任何预设下都可调用,但呈现由预设决定(`ptc` 会把工具编成生成 SDK,要在 `run_code` 里调)。
|
|
29
|
+
- **破坏性**:四个工具族改名——`agentsmd_*` → `prompt_manager_*`、`rule_manager_*` → `memory_manager_*`、`skill_mcp_manager_*` → `mcp_manager_*`、`subagent_list/run` → `subagent_manager_list/run`;提示词或工作流里点名过旧名的一起改。
|
|
30
|
+
- **插件文件全部收进 `tool-management/` 并按域改名**(`agents-md/` → `prompts/`、`agents/` → `subagents/`、`rules-index.json` → `memories-index.json`、`state.json` → `skills-state.json` 等),启动时自动迁移(只搬不删、绝不覆盖)。
|
|
31
|
+
- **四个列表工具默认只列生效条目**(各带 `all=true` 看全量,表头给出全量口径);工具描述精简 37%。
|
|
32
|
+
- **MCP 详情页运行状态改成标题右侧的彩色标签**;备注的模型侧前缀统一为「用户提示:」。
|
|
33
|
+
- **场景记忆段排版重做**:场景上提到 `##`、条目挂在各自场景下;名称恒为标题、显式描述进括号;bundle 补一行附件目录与文件名;正文文件 `SKILL.md` → `<名>.md`(旧名只读兼容,不迁移)。
|
|
34
|
+
|
|
35
|
+
### 修复
|
|
36
|
+
|
|
37
|
+
- **子智能体人设弹窗三个毛病一起修**:候选不自动拉、已启用模式的名单进不去、「关闭」后再「启动」清空勾选;现在自动展开也拉候选,**点行首即可展开 / 收起名单**,右侧按钮只管启用 / 停用,停用后再启用记得勾选。
|
|
38
|
+
- **「预设注入边界」三处口径纠正**:子智能体列答「人设目录到不到得了模型」;技能 / 提示词列以官方为准(官方那条行挂着就是绿的);MCP 列按提示词平面作答(被压制即红框)。
|
|
39
|
+
- **每个场景块恒有一行加粗的「场景说明:」**(未填描述给默认句)。
|
|
40
|
+
- **场景内的开关统一收归档案**(四域同口径,模型工具同样拒绝);改档案立即生效、失败如实回报。
|
|
41
|
+
- **人设域与 MCP / 技能进场景按档案勾选集全量对齐**(整段未定义 = 全部停用),退出按快照双向还原。
|
|
42
|
+
- **场景接管提示词时四条状态共用一套事实**:只有场景绑定的那份可「重新应用」;删除保护扩成引用清单;文件被手改时两页都标出「文件里不是它」。
|
|
43
|
+
- **场景退出后 MCP 行「开关已关、进程已停、却仍显示已运行」**:补丁说停用即不可能在运行,显示跟着控制面走。
|
|
44
|
+
- **「N 个工具」不再把停用工具算进去**(有停用时显示 `可用/总数`);工具全被停用的服务器不进段。
|
|
45
|
+
- **场景名与记忆名相同会「吃掉」整个场景**:统一为「根下的一级目录恒为场景」(发现 / 定位 / 导入三处)。
|
|
46
|
+
- **进场景被关掉的人设,退出没开回来**:快照名单落盘读回时被剥掉,现在原样透传。
|
|
47
|
+
- **未启用的场景不再整片标红**:记忆页里「场景未启用」此前与真问题(游离记忆、被同名覆盖)共用同一个错误色,整块红读起来像出了错;现在未启用 = 灰色置灰(标签同色),红色只留给真问题——场景页与档案编辑器里的「未启用」标签同步改灰。
|
|
48
|
+
- **小项**:注入边界提示不再点名工具(此前让模型去用刚用过的工具);`skill_manager_list` 修影子技能误报停用;删 `subagent_manager_list` 空参数 `scene`、修 `create_skill` 老文案。
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## [0.8.5] - 2026-09-16
|
|
53
|
+
|
|
54
|
+
### 新增
|
|
55
|
+
|
|
56
|
+
- 场景级 MCP 服务器备注:场景档案的 MCP 段可为每台勾选的服务器写专属备注,进入该场景时覆盖全局备注(写入 notes.json),退出场景时按快照恢复改动前的备注;未配场景备注的服务器照常使用全局备注。
|
|
57
|
+
- 未运行服务器的工具可见性:新增「已知工具」侧车(`dsh-plugin-tool-management-mcp-tools.json`),枚举到 live 工具时按服务器记下名单——未运行的服务器不再永远显示 0 工具,工具勾选框也能列出最后一次见过的工具。从未运行过的服务器可在编辑弹窗点「启动服务器读取工具」:临时启用、轮询等工具注册(≤30s)、记入名单后恢复原启停状态。
|
|
58
|
+
|
|
59
|
+
### 变更
|
|
60
|
+
|
|
61
|
+
- 新增技能 / 子智能体 / MCP 一律默认不启动(用户裁定,三域同口径):新建与导入的技能显式写入停用名单;新建/导入/回收站恢复的人设默认停用;新增 MCP 服务器创建即停用(显式传 `enabled: true` 才创建即启动)。启动与否由用户手动开启。
|
|
62
|
+
- 场景档案 MCP「编辑」弹窗重做:行内备注输入框移除,「选工具」改为「编辑」,点击打开固定尺寸次级弹窗——第一栏备注、第二栏工具勾选(含全选/清空),有备注的服务器行显示「有备注」标签。
|
|
63
|
+
- 系统提示词注入段文案优化:子智能体人设段措辞改为「可从下面的人设中选用」(此前读起来像"只能调用这几个"),并补充委派机制说明;场景记忆段标题下加固定引导语,让模型明确这是当前场景的常驻参考知识;MCP 备注前缀由「用户备注:」统一为「备注:」。
|
|
64
|
+
- peer 依赖去掉 semver 上界(`>=0.1.5-rc.2 <0.2.0-0` → `>=0.1.5-rc.2`):宿主跨 minor 升级不再被 pnpm peer 校验挡住安装,兼容性改由运行时能力探测兜底。
|
|
65
|
+
|
|
66
|
+
### 修复
|
|
67
|
+
|
|
68
|
+
- 历史页「已移除」标签红灰两色统一为灰色:此前红色 = 从未登记、灰色 = 曾登记被移除,颜色区分无实际意义。
|
|
69
|
+
- 目录真实存在但没有「重新登记」按钮:`canRegister` 判定从「宿主会话索引命中」放宽为「磁盘目录真实存在」(带 stat 缓存,同一目录只探一次盘),与 `registerWorkspace` 的 realpath 目录校验一致——目录在即可一键重新登记;目录已删除的组显示「⚠ 目录已不存在」提示。
|
|
70
|
+
- MCP 状态段缓存不刷新:MCP 工具加载完成(`tools/change`)与进/退/切换场景后均主动重算状态段——此前段停留在「空/旧集合」的缓存值,出现「切换 MCP 后系统提示词没有 MCP 段」「退出场景后备注看似没恢复」的现象。
|
|
71
|
+
- 退出场景备注永不回退:rules-index.json 读盘时的快照规范化按白名单解析,漏掉了 `snapshot.mcpNotes`——进入时拍下的恢复名单一读回来就被剥掉,退出模式拿不到名单、备注永远停在场景值。现已透传该字段(并补进入覆盖/退出恢复/未勾选不触碰三条直证回归测试;未勾选服务器的场景备注不再在进入时覆盖其全局备注)。
|
|
72
|
+
|
|
73
|
+
### 说明
|
|
74
|
+
|
|
75
|
+
- 人设"文件缺失 = 全部启用"的老数据兼容语义保留:只有首次新建/导入/恢复时物化现状并排除新名;已有技能与人设的启用状态不动。
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
13
79
|
## [0.8.0] - 2026-09-15
|
|
14
80
|
|
|
15
81
|
### 新增
|
|
@@ -117,7 +183,7 @@
|
|
|
117
183
|
- 导入技能删进回收站拿不回来:按作用域分岔,用户级来源按 key 重新解析路径。
|
|
118
184
|
- 技能回收站显示字面量 `undefined`。
|
|
119
185
|
- 面板不随宿主语言切换、两页硬编码中文、词条键写错导致界面露原始键名。
|
|
120
|
-
- `
|
|
186
|
+
- `subagent_manager_run` 确认门早于参数校验:人设不存在时不再先弹卡。
|
|
121
187
|
- 删除链路前置实现检查:在任何破坏性步骤之前校验所需方法。
|
|
122
188
|
- 英文界面下兼容页结论条仍是中文:改为客户端按当前语言拼。
|
|
123
189
|
- 两处过时文案(AGENTS.md 应用说明、创建技能确认卡落点)。
|
package/README.md
CHANGED
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
[](package.json)
|
|
6
6
|
[](https://github.com/ouli-1242/dsh-plugin-tool-management)
|
|
7
|
+
|
|
7
8
|
[](https://dsh.market/)
|
|
9
|
+
[](https://awesome-dsh-plugin.com)
|
|
10
|
+
[](https://dshfind.com/zh/plugins/ouli-1242/dsh-plugin-tool-management)
|
|
8
11
|
|
|
9
12
|
**简体中文** · [English](README_EN.md) · [Changelog](CHANGELOG.md) · [版本更新概要](docs/update.md)
|
|
10
13
|
|
|
@@ -23,38 +26,33 @@ dsh plugin --profile web add dsh-plugin-tool-management@latest
|
|
|
23
26
|
|
|
24
27
|
| | |
|
|
25
28
|
|:---:|:---:|
|
|
26
|
-
|  |  |
|
|
27
30
|
| **场景** | **MCP** |
|
|
28
|
-
|  |  |
|
|
29
32
|
| **技能** | **子智能体** |
|
|
30
|
-
|  |  |
|
|
31
34
|
| **提示词** | **记忆** |
|
|
32
|
-
|  |  |
|
|
33
36
|
| **会话** | **兼容** |
|
|
34
37
|
|
|
35
38
|
## 核心亮点
|
|
36
39
|
|
|
37
|
-
|
|
40
|
+
一句话:**把「工作 / 写作 / 编程」各配成一套场景,点一下整套切换;插件管的东西,模型都看得见。**
|
|
41
|
+
|
|
42
|
+
| 亮点 | 说明 |
|
|
38
43
|
|---|---|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
| 导入导出成对 | 技能 / 子智能体 / 提示词 / 记忆都有导出:勾选条目 → 打包 zip 到指定目录(只读源文件) |
|
|
52
|
-
| 子智能体 | 一个文件一个人设,**启停开关**决定是否注入上下文;即用即弃不进 History,自动继承场景记忆 |
|
|
53
|
-
| 上下文可见性 | 人设目录与「当前可用的 MCP server + 你的备注」进入系统提示词,模型自己知道有什么可用 |
|
|
54
|
-
| 前缀缓存友好 | 注入段只由「启用场景 + 文件内容」决定,逐字节稳定 |
|
|
55
|
-
| 兼容体检 | 「兼容」页一屏看清宿主能力、每个动作走原生还是适配、哪些降级 |
|
|
56
|
-
| 模型工具 | **14 个**(`skill_mcp_manager_*` / `skill_manager_*` / `agentsmd_*` / `rule_manager_*` / `subagent_*`) |
|
|
57
|
-
| 界面 | 自有设计系统,**八栏**,中英双语、跟随宿主语言 |
|
|
44
|
+
| 一键换场景 | 每个场景各配一套:用哪些 MCP 服务器、哪些技能、哪些人设、哪些记忆;点一下整套切换,关掉自动还原 |
|
|
45
|
+
| 记忆自动送到模型眼前 | 每个场景下写几段 `.md` 就是它的资料库,正文自动进上下文,不用每次复制粘贴 |
|
|
46
|
+
| 给 MCP 服务器写备注 | 像「A 不可用时改用 B 兜底」这种话写进备注,模型看得到,会照做 |
|
|
47
|
+
| 单个工具也能关 | 一台服务器里只停掉某个工具,模型看不见也调不到;「重启」只重连,不会偷偷改变开关 |
|
|
48
|
+
| 技能状况一眼看穿 | 哪些在生效、哪些被同名技能覆盖、哪一份是首选,都标得清清楚楚 |
|
|
49
|
+
| 子智能体 = 一个文件一个角色 | 写一份角色说明就能派活;跑完只回结果、不占你的会话记录;哪些角色能用还能按场景定 |
|
|
50
|
+
| 提示词备好几套 | AGENTS.md 可以存多份(简洁模式 / 教学口吻……),一键切换;场景可以各自绑一份 |
|
|
51
|
+
| 会话不再丢 | 归档按项目分组、能搜、能批量恢复;Claude Code / Cursor / Codex 的聊天记录都能导进来 |
|
|
52
|
+
| 模型一定看得见 | 插件管的内容(记忆 / MCP / 技能 / 子智能体 / 提示词)会主动告诉模型,每个域各发一条、内容没变不重复;极简模式下默认不注入(跟随预设),可在「兼容」页逐项打开 |
|
|
53
|
+
| 锁住就不怕手滑 | 场景可以上锁:五个域整体只读,先解锁才能改 |
|
|
54
|
+
| 删了能找回,配好能带走 | 删除都进回收站,随时恢复;技能 / 记忆 / 人设 / 提示词都能勾选打包成 zip,也能再导回来 |
|
|
55
|
+
| 安全、不添乱 | 密钥默认打码、看明文要令牌;只写自己的文件,技能源文件一个不动,升级重启配置都在 |
|
|
58
56
|
|
|
59
57
|
## 快速开始
|
|
60
58
|
|
|
@@ -75,7 +73,7 @@ dsh plugin --profile web add dsh-plugin-tool-management@latest
|
|
|
75
73
|
装完提醒我硬刷新浏览器。
|
|
76
74
|
```
|
|
77
75
|
|
|
78
|
-
模型可用 14
|
|
76
|
+
模型可用 14 个工具管理上述功能(`mcp_manager_*` / `skill_manager_*` / `prompt_manager_*` / `memory_manager_*` / `subagent_*`);脚本走 `POST /dsh-plugin-tool-management/api`(`{op, args}` 协议)。
|
|
79
77
|
|
|
80
78
|
---
|
|
81
79
|
|
|
@@ -83,10 +81,10 @@ dsh plugin --profile web add dsh-plugin-tool-management@latest
|
|
|
83
81
|
|
|
84
82
|
### 场景与记忆
|
|
85
83
|
|
|
86
|
-
- **场景 = 分组,记忆 = `.md` 文件**。`memories/<场景>/<名>.md
|
|
84
|
+
- **场景 = 分组,记忆 = `.md` 文件**。`memories/<场景>/<名>.md`,整篇正文自动注入上下文,文件名支持中文。
|
|
87
85
|
- **单选启用**:同时只启用一个场景(其余置灰),关掉全部 = 只注入「全局」与 `_shared`。新场景默认不启动。
|
|
88
|
-
- **场景绑提示词**:切换场景直接改写 `~/.dsh/AGENTS.md`(覆盖前 5
|
|
89
|
-
- **场景档案**:每个场景搭配 MCP 工具集 / 技能集 / 子智能体 /
|
|
86
|
+
- **场景绑提示词**:切换场景直接改写 `~/.dsh/AGENTS.md`(覆盖前 5 代备份,关掉自动恢复基线);预设挂不到官方 AGENTS.md 通道时(极简),改为把这份正文直接注入上下文。
|
|
87
|
+
- **场景档案**:每个场景搭配 MCP 工具集 / 技能集 / 子智能体 / 记忆(任意组合);打开场景即应用并收窄注入,关闭按快照原文恢复(开关是唯一入口)。勾选集语义:**勾的启用、没勾的停用,整段没建 = 一个都没勾 = 该域全部停用**(所以「没配 MCP 工具集」的场景进去就是全部 MCP 停用,退出再开回来)。**场景内这四个域(含提示词)的开关一律禁用**——改环境请进档案编辑器,保存即生效。
|
|
90
88
|
- **导入**:`.md` / `.zip`(目录名 = 场景,bundle 带附件),同名跳过绝不覆盖,超限逐条回报。
|
|
91
89
|
- **导出**:勾选记忆打包成 zip,保留「场景/名称」层级;bundle 型连目录里的附件一起打进去。只读源文件。
|
|
92
90
|
- **注入预算**:默认 64 KiB,放不下的跳过并列出清单。删除进回收站。
|
|
@@ -97,30 +95,36 @@ dsh plugin --profile web add dsh-plugin-tool-management@latest
|
|
|
97
95
|
|
|
98
96
|
- **一个文件一个人设**:`agents/<人设>.md`,frontmatter 全可选。
|
|
99
97
|
- **工具限制按 Agent 预设**:每个预设一份白/黑名单(互相排斥),运行期按当前预设生效——堵掉旧「全体并集」名单换预设后子代理起不来的坑。
|
|
100
|
-
- **即用即弃**:`
|
|
101
|
-
- **启停开关**:停用的人设不注入上下文、模型不可见(文件不动);新建 / 导入 /
|
|
102
|
-
-
|
|
98
|
+
- **即用即弃**:`subagent_manager_run` 带人设运行、只回传结果、不进 History,自动继承场景记忆。场景可绑定可用人设。
|
|
99
|
+
- **启停开关**:停用的人设不注入上下文、模型不可见(文件不动);新建 / 导入 / 恢复自动启用。**进场景按档案勾选集全量对齐**(勾了的开、没勾的关,整段没建 = 全关),退出按进场景前的开关精确还原;场景内这个开关会被禁用,要改请进档案编辑器。
|
|
100
|
+
- **人设目录自动注入**:只列名字 + 描述,模型知道有哪些人设可委派;人设名可改,场景绑定自动跟着改。
|
|
103
101
|
|
|
104
102
|
### MCP 服务
|
|
105
103
|
|
|
106
104
|
- **增删改查 + 即改即生效**:写入 `cordis.patch.yml`,HMR 自动生效。
|
|
107
105
|
- **工具级开关**:单个工具可独立停用(模型看不见也调不到),整台支持批量。
|
|
106
|
+
- **停着也能看清单**:服务器没在跑时仍显示上次见过的工具名与描述(标「上次运行时」);从没跑过的可以一键「启动服务器读取工具」。
|
|
108
107
|
- **密钥打码**:默认 `••••••`,「显示密钥」要令牌。
|
|
109
108
|
- **迁移与备份**:跨项目级/全局迁移失败自动回滚;JSON 导出导入。
|
|
110
|
-
-
|
|
109
|
+
- **状态与备注自动注入**:只列当前真正可用的 server,你的备注作为决策提示带给模型;级别分「全局 / 应用级」,新增默认全局。注:极简这类压制型预设默认不注入(模型可用 `mcp_manager_list` 读取服务器名、启停、工具数与备注)——想让它也注入,到「兼容」页的「注入」块打开开关。
|
|
111
110
|
|
|
112
111
|
### 技能
|
|
113
112
|
|
|
114
113
|
- **来源一览**:项目级 / DSH / Agents / Codex / Claude / 自定义目录,按来源分组。
|
|
115
114
|
- **两组权限相反**:默认来源(DSH / 导入技能)必须读取但技能可删;外部目录可停用/移除但技能只读。
|
|
116
115
|
- **移除 ≠ 停用**:移除 = 连目录都不扫(文件零改动,可恢复);停用 = 仍列出但不可调用。
|
|
117
|
-
-
|
|
116
|
+
- **同名技能一眼看出谁在生效**:真实生效的那份标「首选」,被同名覆盖的标出来源;启用被覆盖的副本会明说「这样不会生效」。
|
|
117
|
+
- **自定义目录 / ZIP 导入导出 / 回收站**。
|
|
118
|
+
- **目录可注入**:预设没挂官方技能目录行(如极简)时,由本插件的注入域按「兼容」页的开关兜底送达(名字 + 简介;正文照旧读文件)。
|
|
118
119
|
|
|
119
120
|
### 提示词预设
|
|
120
121
|
|
|
121
122
|
- 多套 `~/.dsh/AGENTS.md` 基线,一键应用(宿主每轮重读该文件,下一轮对话生效),保留 5 代备份。
|
|
122
|
-
-
|
|
123
|
-
-
|
|
123
|
+
- **记得「最近一次应用的是哪份」**:就算你手改过 `AGENTS.md`,模型问「现在用的哪份预设」也答得出来源(会注明「此后文件有变」)。
|
|
124
|
+
- **描述**:每条预设可写一句「这份是干什么的」,只显示在插件界面里;它存在同目录的 `meta.json`,不进 AGENTS.md,也就不会被注入上下文。
|
|
125
|
+
- 新建即可写正文,编辑可改 id(= 目录改名,场景绑定自动跟着改)。**被引用的不能删**(场景绑定 / `AGENTS.md` 当前内容 / 退出场景要恢复的那一份),删除进回收站。
|
|
126
|
+
- **正文可注入**:预设没挂官方 AGENTS.md 行(如极简)时,`~/.dsh/AGENTS.md` 的正文由本插件的注入域兜底(64 KiB 上限;可在「兼容」页关掉)。
|
|
127
|
+
- **场景接管期间「应用」只对场景绑定的那一份可用**(应用别的预设会绕过场景绑定,正是「显示 A、实际注入 B」的来源);要换提示词请到场景页改绑定,或先退出场景。
|
|
124
128
|
|
|
125
129
|
### 历史会话
|
|
126
130
|
|
|
@@ -133,8 +137,8 @@ dsh plugin --profile web add dsh-plugin-tool-management@latest
|
|
|
133
137
|
插件运行期用宿主同一批 `@deepseek-ai/*` 库——必须是同一份物理模块,否则判断退化成猜。
|
|
134
138
|
|
|
135
139
|
- **「兼容」页**:宿主版本、能力可用数、每个动作走原生/适配/不可用、降级项与原因。只读。
|
|
136
|
-
- **命令行**:`node scripts/doctor.mjs`(体检)、`node scripts/host-deps.mjs --fix
|
|
137
|
-
- `minimal`
|
|
140
|
+
- **命令行**:`node scripts/doctor.mjs`(体检)、`node scripts/host-deps.mjs --fix`(依赖对齐)、`npm run sync:profile`(把构建产物镜像到 profile 里那份本地安装 —— `file:` 装的是硬链接拷贝,构建新增的文件不会自动过去)。
|
|
141
|
+
- `minimal` 这类**压制型预设**(persona `complete` / 关闭运行时上下文)下,本插件的注入**默认停用**(跟随预设的设计意图),提示词与技能也因官方那两行没挂而缺席 —— 兼容页逐列标出,同一页的「注入」块可以按域强制打开。
|
|
138
142
|
|
|
139
143
|
---
|
|
140
144
|
|
|
@@ -142,15 +146,16 @@ dsh plugin --profile web add dsh-plugin-tool-management@latest
|
|
|
142
146
|
|
|
143
147
|
| 内容 | 位置 |
|
|
144
148
|
|---|---|
|
|
145
|
-
| MCP 定义 |
|
|
146
|
-
| 技能策略 / 自定义目录 | `~/.dsh/tool-management/state.json` |
|
|
147
|
-
| 技能 / 记忆 / 人设 / 预设 | `~/.dsh/tool-management/{skills,memories,
|
|
148
|
-
| 子智能体启停 | `~/.dsh/tool-management/
|
|
149
|
-
| 回收站 | `~/.dsh/tool-management/trash/` |
|
|
149
|
+
| MCP 定义 | `~/.dsh/cordis.patch.yml`(插件只写它;改前自动备份到 hub 的 `backups/`) |
|
|
150
|
+
| 技能策略 / 自定义目录 | `~/.dsh/tool-management/skills-state.json` |
|
|
151
|
+
| 技能 / 记忆 / 人设 / 预设 | `~/.dsh/tool-management/{skills,memories,subagents,prompts}/` |
|
|
152
|
+
| 子智能体启停 | `~/.dsh/tool-management/subagents-index.json` |
|
|
153
|
+
| 回收站 | `~/.dsh/tool-management/trash/{skills,subagents,prompts,scenes}-trash/` |
|
|
150
154
|
| 归档账本 / 保留期 | `~/.dsh/tool-management/history-*.json` |
|
|
151
|
-
| 记忆索引 / 场景 / 档案 | `~/.dsh/tool-management/
|
|
152
|
-
|
|
|
153
|
-
|
|
|
155
|
+
| 记忆索引 / 场景 / 档案 | `~/.dsh/tool-management/memories-index.json` |
|
|
156
|
+
| MCP 侧车(停用表 / 已知工具 / 备注 / 设置) | `~/.dsh/tool-management/mcp-*.json` |
|
|
157
|
+
| 注入设置(五个域开关 / 压制型预设口径) | `~/.dsh/tool-management/inject-settings.json` |
|
|
158
|
+
| 运行日志 / patch 备份 | `~/.dsh/tool-management/tool-management.log` · `backups/` |
|
|
154
159
|
|
|
155
160
|
**插件安装目录里不存用户数据**(`dsh plugin update` 会整体替换该目录)。
|
|
156
161
|
|
|
@@ -174,8 +179,8 @@ dsh plugin --profile web add dsh-plugin-tool-management@latest
|
|
|
174
179
|
| 改坏配置 DSH 起不来 | 取最近的 `.bak-<时间戳>` 恢复。 |
|
|
175
180
|
| 升级 DSH 后动作不可用 | 设置 → 工具 → **兼容** 看原因;`doctor.mjs` → `host-deps.mjs --fix`。 |
|
|
176
181
|
| `approval=never` 还要确认吗 | 不弹卡,直接放行并记日志;想问回来切回「工作区内修改」。 |
|
|
177
|
-
| `
|
|
178
|
-
| 场景绑了 A 人设,官方 `subagent` 还跑别的 | 两条通道:本插件只管 `
|
|
182
|
+
| `subagent_manager_run` 报 spawn 不可用 | 宿主没注册 spawn provider;挂载 `@deepseek-ai/dsh-subagent-spawn-in-process` 后重启。 |
|
|
183
|
+
| 场景绑了 A 人设,官方 `subagent` 还跑别的 | 两条通道:本插件只管 `subagent_manager_run`;官方 `subagent` / `subagent_fork` 无确认门、不认人设。 |
|
|
179
184
|
|
|
180
185
|
---
|
|
181
186
|
|
|
@@ -184,7 +189,7 @@ dsh plugin --profile web add dsh-plugin-tool-management@latest
|
|
|
184
189
|
```bash
|
|
185
190
|
npm install
|
|
186
191
|
npm run build # tsc + 同步客户端
|
|
187
|
-
npm test # 构建 + i18n +
|
|
192
|
+
npm test # 构建 + i18n + 冒烟测试(装配与渲染不抛错)
|
|
188
193
|
npm run check:i18n # 词典自检
|
|
189
194
|
npm run doctor # 宿主兼容体检
|
|
190
195
|
```
|
package/README_EN.md
CHANGED
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
[](package.json)
|
|
6
6
|
[](https://github.com/ouli-1242/dsh-plugin-tool-management)
|
|
7
|
+
|
|
7
8
|
[](https://dsh.market/)
|
|
9
|
+
[](https://awesome-dsh-plugin.com)
|
|
10
|
+
[](https://dshfind.com/zh/plugins/ouli-1242/dsh-plugin-tool-management)
|
|
8
11
|
|
|
9
12
|
[简体中文](README.md) · **English** · [Changelog](CHANGELOG.md) · [Release overview](docs/update.md)
|
|
10
13
|
|
|
@@ -23,38 +26,33 @@ Hard-refresh the browser (Cmd/Ctrl+Shift-R) afterwards — a **Tools** panel in
|
|
|
23
26
|
|
|
24
27
|
| | |
|
|
25
28
|
|:---:|:---:|
|
|
26
|
-
|  |  |
|
|
27
30
|
| **Scenes** | **MCP** |
|
|
28
|
-
|  |  |
|
|
29
32
|
| **Skills** | **Subagents** |
|
|
30
|
-
|  |  |
|
|
31
34
|
| **Prompts** | **Memories** |
|
|
32
|
-
|  |  |
|
|
33
36
|
| **Sessions** | **Host** |
|
|
34
37
|
|
|
35
38
|
## Highlights
|
|
36
39
|
|
|
37
|
-
|
|
40
|
+
In one line: **set up a scene for each kind of work — "day job / writing / coding" — and switch the whole stack with one click. Everything the plugin manages, the model can actually see.**
|
|
41
|
+
|
|
42
|
+
| Highlight | What it means |
|
|
38
43
|
|---|---|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
| Import pairs with export | Skills / subagents / prompts / memories all export too: pick items → zip into a directory you choose (read-only on sources) |
|
|
52
|
-
| Subagents | One file per persona, with an **on/off toggle** deciding whether it is injected; run-and-discard, never enters History, inherits scene memories |
|
|
53
|
-
| Context visibility | The persona catalog and "currently usable MCP servers + your notes" enter the system prompt, so the model knows what is available |
|
|
54
|
-
| Prefix-cache friendly | Section text depends only on enabled scenes + file contents, byte-stable |
|
|
55
|
-
| Compatibility check | The **Host** tab shows host capabilities, per-action routing, and degradations at a glance |
|
|
56
|
-
| Model tools | **14** (`skill_mcp_manager_*` / `skill_manager_*` / `agentsmd_*` / `rule_manager_*` / `subagent_*`) |
|
|
57
|
-
| UI | Custom design system, **eight tabs**, bilingual, follows host language |
|
|
44
|
+
| One-click scene switch | Each scene carries its own set: which MCP servers, which skills, which personas, which memories; flip it on and the whole stack follows, turn it off and everything comes back |
|
|
45
|
+
| Memories reach the model on their own | Write a few `.md` files under a scene and they become its knowledge base — injected automatically, no copy-pasting every session |
|
|
46
|
+
| Notes for MCP servers | Write "if A is down, fall back to B" as a note — the model sees it and acts on it |
|
|
47
|
+
| Disable a single tool | Keep a server but mute one tool: invisible and uncallable; "Restart" only reconnects and never flips switches |
|
|
48
|
+
| Skills at a glance | Which copy is in effect, which is shadowed by a same-name skill, which is preferred — all marked in the list |
|
|
49
|
+
| Subagent = one file, one role | Write a role file and delegate; only the result comes back and it never clutters your History; which roles are available can follow the scene |
|
|
50
|
+
| Several prompt presets | Keep multiple AGENTS.md baselines (terse mode, teaching tone, …), switch with one click; a scene can bind its own |
|
|
51
|
+
| Sessions no longer lost | Archive grouped by project, searchable, batch-restorable; import transcripts from Claude Code / Cursor / Codex |
|
|
52
|
+
| The model always sees it | Everything the plugin manages (memories / MCP / skills / subagents / prompts) is announced to the model — one message per domain, republished only on change; under Minimal nothing is injected by default (follows the preset), force any domain on in the Host tab |
|
|
53
|
+
| Lock it and relax | Lock a scene to make all five domains read-only; unlock first to change anything |
|
|
54
|
+
| Deleted is not gone | Deletes land in a recycle bin and can be restored; skills / memories / personas / presets zip out and back in |
|
|
55
|
+
| Safe by default | Secrets masked, plaintext needs a token; only the plugin's own files are written, skill sources stay untouched, and your config survives restarts and upgrades |
|
|
58
56
|
|
|
59
57
|
## Quick start
|
|
60
58
|
|
|
@@ -75,7 +73,7 @@ dsh plugin --profile web add dsh-plugin-tool-management@latest
|
|
|
75
73
|
Then remind me to hard-refresh the browser.
|
|
76
74
|
```
|
|
77
75
|
|
|
78
|
-
The model can manage everything above via 14 tools (
|
|
76
|
+
The model can manage everything above via 14 tools (`mcp_manager_*` / `skill_manager_*` / `prompt_manager_*` / `memory_manager_*` / `subagent_*`); scripts use `POST /dsh-plugin-tool-management/api` (`{op, args}` protocol).
|
|
79
77
|
|
|
80
78
|
---
|
|
81
79
|
|
|
@@ -86,7 +84,7 @@ The model can manage everything above via 14 tools (see highlights); scripts use
|
|
|
86
84
|
- **A scene = a group, a memory = a `.md` file**. `memories/<scene>/<name>.md`, the whole body is injected, file names can be non-ASCII.
|
|
87
85
|
- **Single-choice toggle**: only one scene at a time (others greyed out); turning all off = only `global` and `_shared` inject. New scenes start off.
|
|
88
86
|
- **Scene-bound prompt**: switching scenes rewrites `~/.dsh/AGENTS.md` (5-gen backup, auto-restore on exit).
|
|
89
|
-
- **Scene profile**: every scene combines MCP tools / skills / subagents / memories (any mix); opening a scene applies and narrows injection, closing restores verbatim (the toggle is the only entry).
|
|
87
|
+
- **Scene profile**: every scene combines MCP tools / skills / subagents / memories (any mix); opening a scene applies and narrows injection, closing restores verbatim (the toggle is the only entry). Checked means on, unchecked means off, and **a missing section means nothing is checked — so that whole domain is off** (a scene with no MCP section therefore stops every MCP server, and exit starts them again). While a scene is active those switches (MCP, skills, subagents, prompts) are disabled — edit the profile instead; saves take effect immediately.
|
|
90
88
|
- **Import**: `.md` / `.zip` (dir name = scene, bundles carry attachments), same names skipped never overwritten, over-limit items reported.
|
|
91
89
|
- **Export**: pick memories and zip them, keeping the `scene/name` layout; bundle memories bring their attachments along. Sources are read-only.
|
|
92
90
|
- **Injection budget**: default 64 KiB, oversized memories skipped with a list. Deletes go to recycle bin.
|
|
@@ -97,30 +95,34 @@ The model can manage everything above via 14 tools (see highlights); scripts use
|
|
|
97
95
|
|
|
98
96
|
- **One file per persona**: `agents/<persona>.md`, frontmatter entirely optional.
|
|
99
97
|
- **Tool limits per Agent preset**: each preset gets its own allow/deny list (mutually exclusive), effective at runtime by the current preset — fixes the old "union of all presets" list that broke subagents after a preset switch.
|
|
100
|
-
- **Run and discard**: `
|
|
101
|
-
- **On/off toggles**: a disabled persona is not injected and invisible to the model (file untouched); newly created / imported / restored personas start enabled.
|
|
98
|
+
- **Run and discard**: `subagent_manager_run` runs with the persona, returns only the result, never enters History, inherits scene memories. Scenes can bind which personas are available.
|
|
99
|
+
- **On/off toggles**: a disabled persona is not injected and invisible to the model (file untouched); newly created / imported / restored personas start enabled. Entering a scene applies the profile's persona list exactly (checked on, everything else off; no section = all off) and exit restores the pre-scene switches. Inside a scene these toggles are disabled — edit the scene profile instead (saves take effect immediately).
|
|
102
100
|
- **Persona catalog enters the system prompt**: names + descriptions only, so the model knows what it can delegate to; personas are renameable, scene bindings follow.
|
|
103
101
|
|
|
104
102
|
### MCP servers
|
|
105
103
|
|
|
106
104
|
- **CRUD + immediate effect**: writes to `cordis.patch.yml`, HMR picks it up.
|
|
107
105
|
- **Per-tool switches**: disable individual tools (invisible to the model, blocked at call), whole-server batch.
|
|
106
|
+
- **Stopped servers still show their tools**: a server that is not running keeps the tool names and descriptions last seen (marked "as of last run"); one that has never run can be probed with "start server to read tools".
|
|
108
107
|
- **Secret masking**: defaults to `••••••`, "Reveal" needs a token.
|
|
109
108
|
- **Migrate & back up**: cross-project/global migration rolls back on failure; JSON export/import.
|
|
110
|
-
- **Status & notes enter the system prompt**: only currently usable servers are listed, and your notes travel along as decision hints; levels are "global / app", new servers default to global.
|
|
109
|
+
- **Status & notes enter the system prompt**: only currently usable servers are listed, and your notes travel along as decision hints; levels are "global / app", new servers default to global. Note: a persona-complete preset such as minimal suppresses that section — there the model reads server names, enablement, tool counts and notes with `mcp_manager_list`.
|
|
111
110
|
|
|
112
111
|
### Skills
|
|
113
112
|
|
|
114
113
|
- **Sources at a glance**: project / DSH / Agents / Codex / Claude / custom dirs, grouped by source.
|
|
115
114
|
- **Opposite permissions**: default sources must be read but skills can be deleted; external dirs can be disabled/removed but skills are read-only.
|
|
116
115
|
- **Remove ≠ disable**: remove = directory not scanned at all (files untouched, restorable); disable = still listed but not callable.
|
|
117
|
-
- **Same-name
|
|
116
|
+
- **Same-name skills: see which copy is in effect**: the winning copy is marked "preferred", shadowed ones name the source that wins, and enabling a shadowed copy says so instead of pretending it worked.
|
|
117
|
+
- **Custom dirs / ZIP import & export / recycle bin**.
|
|
118
118
|
|
|
119
119
|
### Prompt presets
|
|
120
120
|
|
|
121
121
|
- Multiple `~/.dsh/AGENTS.md` baselines, one-click apply (the host re-reads that file every turn, so it takes effect on the next turn), 5-gen backup.
|
|
122
|
+
- **Remembers the preset applied last**: even after you hand-edit `AGENTS.md`, the model can still answer "which preset is this from" (flagged "changed since").
|
|
122
123
|
- **Description**: one line saying what a preset is for — shown in this panel only. It lives in a sibling `meta.json`, never in AGENTS.md, so it is never injected into prompts.
|
|
123
|
-
- Create with body inline, edit can change id (= dir rename, scene bindings follow).
|
|
124
|
+
- Create with body inline, edit can change id (= dir rename, scene bindings follow). A referenced preset cannot be deleted (bound by a scene, currently in AGENTS.md, or the baseline to restore on scene exit); deletes go to recycle bin.
|
|
125
|
+
- **While a scene drives the baseline, Apply only works for that scene's bound preset** (applying another one would bypass the binding — that is exactly how "shows A, injects B" happened); rebind it on the Scenes page or exit the scene first.
|
|
124
126
|
|
|
125
127
|
### Archived sessions
|
|
126
128
|
|
|
@@ -133,8 +135,8 @@ The model can manage everything above via 14 tools (see highlights); scripts use
|
|
|
133
135
|
The plugin uses the host's own `@deepseek-ai/*` libraries at runtime — they must be the same physical modules, or every "adapt to host" decision degrades into guesswork.
|
|
134
136
|
|
|
135
137
|
- **Host tab**: host version, usable capability count, per-action routing (native/adapter/unavailable), degradations & reasons. Read-only.
|
|
136
|
-
- **Command line**: `node scripts/doctor.mjs` (check), `node scripts/host-deps.mjs --fix` (align deps).
|
|
137
|
-
- Under `minimal`
|
|
138
|
+
- **Command line**: `node scripts/doctor.mjs` (check), `node scripts/host-deps.mjs --fix` (align deps), `npm run sync:profile` (mirror the build into the profile's local install — a `file:` install is a hard-linked copy, so files ADDED by a build never show up there on their own).
|
|
139
|
+
- Under a **suppressing preset** such as `minimal` (persona `complete` / runtime context off) this plugin's injection is **off by default** (following the preset's intent), and the prompt and the skills are missing because their official rows are not mounted — the Host tab marks this per column, and its "Injection" block can force any domain back on.
|
|
138
140
|
|
|
139
141
|
---
|
|
140
142
|
|
|
@@ -142,15 +144,16 @@ The plugin uses the host's own `@deepseek-ai/*` libraries at runtime — they mu
|
|
|
142
144
|
|
|
143
145
|
| Content | Location |
|
|
144
146
|
|---|---|
|
|
145
|
-
| MCP definitions |
|
|
146
|
-
| Skill policy / custom dirs | `~/.dsh/tool-management/state.json` |
|
|
147
|
-
| Skills / memories / personas / presets | `~/.dsh/tool-management/{skills,memories,
|
|
148
|
-
| Subagent toggles | `~/.dsh/tool-management/
|
|
149
|
-
| Recycle bin | `~/.dsh/tool-management/trash/` |
|
|
147
|
+
| MCP definitions | `~/.dsh/cordis.patch.yml` (written by the plugin; pre-write copies land in the hub's `backups/`) |
|
|
148
|
+
| Skill policy / custom dirs | `~/.dsh/tool-management/skills-state.json` |
|
|
149
|
+
| Skills / memories / personas / presets | `~/.dsh/tool-management/{skills,memories,subagents,prompts}/` |
|
|
150
|
+
| Subagent toggles | `~/.dsh/tool-management/subagents-index.json` |
|
|
151
|
+
| Recycle bin | `~/.dsh/tool-management/trash/{skills,subagents,prompts,scenes}-trash/` |
|
|
150
152
|
| Archive ledger / retention | `~/.dsh/tool-management/history-*.json` |
|
|
151
|
-
| Memory index / scenes / profiles | `~/.dsh/tool-management/
|
|
152
|
-
|
|
|
153
|
-
|
|
|
153
|
+
| Memory index / scenes / profiles | `~/.dsh/tool-management/memories-index.json` |
|
|
154
|
+
| MCP sidecars (disabled tools / known tools / notes / settings) | `~/.dsh/tool-management/mcp-*.json` |
|
|
155
|
+
| Injection settings (five domain switches / suppressing-preset policy) | `~/.dsh/tool-management/inject-settings.json` |
|
|
156
|
+
| Runtime log / patch backups | `~/.dsh/tool-management/tool-management.log` · `backups/` |
|
|
154
157
|
|
|
155
158
|
**No user data is stored inside the plugin's install directory** (`dsh plugin update` replaces it wholesale).
|
|
156
159
|
|
|
@@ -174,8 +177,8 @@ The plugin uses the host's own `@deepseek-ai/*` libraries at runtime — they mu
|
|
|
174
177
|
| Broken config, DSH won't boot | Restore the newest `.bak-<timestamp>`. |
|
|
175
178
|
| Action stopped after DSH upgrade | Settings → Tools → **Host** for the reason; `doctor.mjs` → `host-deps.mjs --fix`. |
|
|
176
179
|
| Still asked to confirm in `approval=never`? | No card appears — straight through with a log line; switch back to "workspace write" to get asked again. |
|
|
177
|
-
| `
|
|
178
|
-
| Scene binds persona A, but official `subagent` ran something else | Two channels: this plugin only governs `
|
|
180
|
+
| `subagent_manager_run` reports spawn unavailable | Host has no spawn provider; mount `@deepseek-ai/dsh-subagent-spawn-in-process` and restart. |
|
|
181
|
+
| Scene binds persona A, but official `subagent` ran something else | Two channels: this plugin only governs `subagent_manager_run`; official `subagent` / `subagent_fork` have no gate and don't know about personas. |
|
|
179
182
|
|
|
180
183
|
---
|
|
181
184
|
|
|
@@ -184,7 +187,7 @@ The plugin uses the host's own `@deepseek-ai/*` libraries at runtime — they mu
|
|
|
184
187
|
```bash
|
|
185
188
|
npm install
|
|
186
189
|
npm run build # tsc + sync client
|
|
187
|
-
npm test # build + i18n +
|
|
190
|
+
npm test # build + i18n + smoke tests (mount & render)
|
|
188
191
|
npm run check:i18n # dictionary self-check
|
|
189
192
|
npm run doctor # host compatibility check
|
|
190
193
|
```
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/update.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
| 版本 | 发布 | 主题 |
|
|
6
6
|
|---|---|---|
|
|
7
|
+
| [0.9.0](#090---2026-09-16) | 2026-09-16 | 注入改走上下文通道(极简可注入)+ 五域各自注入 + 场景接管一致性修复 |
|
|
8
|
+
| [0.8.5](#085---2026-09-16) | 2026-09-16 | 历史页标签统一 + 目录存在即可重新登记 + 场景 MCP 备注 + 新增三域默认不启动 |
|
|
7
9
|
| [0.8.0](#080---2026-09-15) | 2026-09-15 | 场景锁定 + 子智能体开关 + 四域导出 |
|
|
8
10
|
| [0.7.0](#070---2026-09-15) | 2026-09-15 | 回收站全量 + 预设注入可见性 + 密钥令牌化 |
|
|
9
11
|
| [0.6.0](#060---2026-09-14) | 2026-09-14 | 宿主兼容体检 + 兼容页 |
|
|
@@ -13,6 +15,43 @@
|
|
|
13
15
|
|
|
14
16
|
---
|
|
15
17
|
|
|
18
|
+
## 0.9.0 - 2026-09-16
|
|
19
|
+
|
|
20
|
+
- **注入改走「上下文注入」,极简这类预设也压不掉了**:记忆 / MCP 清单 / 子智能体目录 / 提示词此前是系统提示词段,persona `complete` 的预设(极简)会把它们整段压掉,模型什么都看不到。现在改走官方自己用的那条通道(每步请求前注入一条消息)、内容没变不重发;**极简这类预设下默认不注入**(跟随预设),到「兼容」页的「注入」块可以打开「极简模式也注入」,并按域勾选你要注入的。
|
|
21
|
+
- **每个域一条自己的注入**:五个域各发各的消息、轨迹里各自一行(行名就是自己的名字);只改一个域只重发那一条,某域被关掉或清空时单独发一条「已清空」,旧目录不会继续被当成现状。
|
|
22
|
+
- **提示词与技能目录也进了注入通道**:官方那两条行在极简下没挂、此前用户没得选;现在官方挂得到就让官方送、挂不到才由插件兜底,任何预设下都看得到且不会出现两份。场景提示词与 `~/.dsh/AGENTS.md` 合并为一个「提示词」域。
|
|
23
|
+
- **域名与顺序**:`记忆` 改叫 **场景和记忆**、`全局提示词` 改叫 **提示词**;从左到右 场景和记忆 → MCP → 技能 → 子智能体 → 提示词。
|
|
24
|
+
- **子智能体"高级选项"的三个坑一起修**:候选数据不自动拉、已启用模式的名单进不去、停用后再启用清空勾选;现在点行首(名字 + 状态)即可展开 / 收起名单,右侧按钮仍只管启用 / 停用。
|
|
25
|
+
- **「预设注入边界」三处口径纠正**:子智能体列改答"人设目录到不到得了模型"(极简 + 打开注入 = 绿);技能 / 提示词列以官方为准(官方那条行挂着就是绿的);MCP 列按提示词平面作答(被压制即红框)。
|
|
26
|
+
- **每个场景块恒有一行加粗的「场景说明:」**:没填描述就给默认句,光秃秃的 `## 场景:X` 模型读不懂。
|
|
27
|
+
- **场景内的「开关」统一收归档案**(四域同口径):MCP / 技能 / 来源 / 子智能体的开关在场景里一律禁用,去档案编辑器里改(模型侧同名工具也拒绝);**改档案立即生效**,不用退出再进一次。
|
|
28
|
+
- **人设域与 MCP / 技能进场景按档案勾选集全量对齐**:勾了开、没勾关(整段没建 = 全关),退出按进场景前的状态精确还原。
|
|
29
|
+
- **修复:场景里「应用」能绕过场景绑定**(你实测的「显示 A、实际注入 B」):现在只有场景绑定的那份可「重新应用」,删除保护改成引用清单,AGENTS.md 被手改时两页都标出「文件里不是它」。
|
|
30
|
+
- **修复:场景名与记忆名相同会把整个场景「吃掉」**:现在统一为「**根下的一级目录恒为场景**」;另修「进场景被关掉的人设退出没开回来」「场景退出后 MCP 行还显示已运行」。
|
|
31
|
+
- **修复:「N 个工具」不算停用工具**(有停用时显示 `可用/总数`);工具全停用的服务器不再进段。
|
|
32
|
+
- **技能同名重复现在看得见了**:`skill_manager_list` 标出 `shadowed by <root>` 与 `preferred`——同名组里只有一份生效,启用被覆盖的那份会回 OK 却无效,现在会直接说明。
|
|
33
|
+
- **AGENTS.md 预设库会记住「最近一次应用的是哪份」**:手改一次全局文件之后也能答出「来自预设 X(此后文件有变)」。
|
|
34
|
+
- **备注终于可读,路径也给了**:`mcp_manager_list` 输出每台服务器的备注(模型侧字段 `user-hint`);`skill_manager_list` / `prompt_manager_list` 补源文件路径;未运行的 MCP 服务器也有工具描述(按「上次运行时」缓存),描述超两行默认折叠。
|
|
35
|
+
- **四个列表工具默认只列生效的条目**(`all=true` 看全量);**工具描述精简 37%**。
|
|
36
|
+
- **参考信息段排版 + MCP 详情页标签化**:场景上提到 `##`、条目挂在各自场景下,名称恒为标题、显式描述进括号,bundle 补附件目录与文件名,正文文件 `SKILL.md` → `<名>.md`(旧数据只读兼容);运行状态挪到 MCP 详情页标题右侧做成彩色标签。
|
|
37
|
+
- **数据全部收进 `tool-management/`,名字按域对齐**(`agents-md/` → `prompts/`、`agents/` → `subagents/`、`rules-index.json` → `memories-index.json`、`state.json` → `skills-state.json` 等);**升级自动搬**(只搬不删、绝不覆盖、失败下次再试)。
|
|
38
|
+
- **四个工具族改名(破坏性)**:`agentsmd_*` → `prompt_manager_*`、`rule_manager_*` → `memory_manager_*`、`skill_mcp_manager_*` → `mcp_manager_*`、`subagent_list/run` → `subagent_manager_list/run`;提示词、工作流或文档里点名过旧名的要一起改。
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 0.8.5 - 2026-09-16
|
|
43
|
+
|
|
44
|
+
- **新增技能 / 子智能体 / MCP 一律默认不启动**:创建与导入都不自动开启,由你手动打开(三域同口径)。
|
|
45
|
+
- 历史页「已移除」标签红灰两色统一为灰色(此前红色 = 从未登记、灰色 = 曾登记被移除,区分无实际意义)。
|
|
46
|
+
- 目录真实存在但没有「重新登记」按钮的问题修复:只要磁盘目录在,就能一键重新登记(带 stat 缓存,同一目录只探一次盘)。
|
|
47
|
+
- 目录已删除的工作区组补明确状态:组头显示「⚠ 目录已不存在」,悬停说明原因与处理方式(会话仍可恢复/删除)。
|
|
48
|
+
- peer 依赖去掉 semver 上界:宿主跨 minor 升级不再挡住插件安装,兼容性由运行时能力探测兜底。
|
|
49
|
+
- 系统提示词注入段文案优化:子智能体段明确"人设是可用选项而非唯一可选",并补充委派机制说明;场景记忆段加固定引导语(常驻参考知识)。
|
|
50
|
+
- 新增场景级 MCP 备注:场景档案的 MCP 段可为勾选的服务器写专属备注,进入场景覆盖全局备注、退出恢复原备注;MCP 备注前缀统一为「备注:」。
|
|
51
|
+
- 未运行的 MCP 服务器现在也能看到工具数和勾选工具(按「最后见过的工具名」记录兜底)。
|
|
52
|
+
- 场景档案 MCP 编辑改为固定尺寸弹窗:第一栏备注、第二栏工具勾选,「选工具」并入「编辑」。
|
|
53
|
+
- 从未运行过的服务器:编辑弹窗里点「启动服务器读取工具」即可读取工具名单(读完后自动恢复原启停状态)。
|
|
54
|
+
|
|
16
55
|
## 0.8.0 - 2026-09-15
|
|
17
56
|
|
|
18
57
|
- **场景锁定**:锁住后 MCP / 技能 / 子智能体 / 记忆 / 提示词整体只读(勾没勾的都不能动);未启动不能上锁,锁定中关不掉也切不走。
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// ① 文件系统安全:不含路径分隔符与 Windows 非法字符、不以点开头/结尾、
|
|
6
6
|
// 不是 `.` / `..`、不是 Windows 保留设备名;
|
|
7
7
|
// ② 一个保留字:`__last-applied__`(apply 的备份槽,不是用户预设)。
|
|
8
|
-
//
|
|
8
|
+
// 这套口径由提示词服务(agents-md/ 目录)与场景绑定(`scenes[].prompt`)共用,避免两处漂移。
|
|
9
9
|
// 约定镜像 @deepseek-ai/dsh-agent-presets 的「id 即目录名」,但放宽了字符集。
|
|
10
10
|
/** id 长度上限(字符数;目录名过长在 Windows 上还受 MAX_PATH 约束)。 */
|
|
11
11
|
export const PRESET_ID_MAX = 64;
|