dsh-plugin-tool-management 0.17.0 → 0.18.5

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 (84) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/README.md +19 -4
  3. package/README_EN.md +19 -4
  4. package/docs/images/1-EN.png +0 -0
  5. package/docs/images/1.png +0 -0
  6. package/docs/images/2-EN.png +0 -0
  7. package/docs/images/2.png +0 -0
  8. package/docs/images/3-EN.png +0 -0
  9. package/docs/images/3.png +0 -0
  10. package/docs/images/4-EN.png +0 -0
  11. package/docs/images/4.png +0 -0
  12. package/docs/images/5-EN.png +0 -0
  13. package/docs/images/5.png +0 -0
  14. package/docs/images/6-EN.png +0 -0
  15. package/docs/images/6.png +0 -0
  16. package/docs/images/7-EN.png +0 -0
  17. package/docs/images/7.png +0 -0
  18. package/docs/images/8-EN.png +0 -0
  19. package/docs/images/8.png +0 -0
  20. package/docs/update.md +29 -0
  21. package/lib/client.js +1662 -161
  22. package/lib/compat/capability-specs.js +321 -0
  23. package/lib/compat/host-probe.js +261 -0
  24. package/lib/compat/host-roots.js +168 -0
  25. package/lib/compat/probe-types.js +6 -0
  26. package/lib/compat/probe.js +9 -720
  27. package/lib/context-inject-contract.js +114 -0
  28. package/lib/context-inject-frame.js +147 -0
  29. package/lib/context-inject-select.js +127 -0
  30. package/lib/context-inject-surface.js +97 -0
  31. package/lib/context-inject.js +10 -478
  32. package/lib/exports/transcript.js +223 -0
  33. package/lib/http-api.js +229 -0
  34. package/lib/hub.js +2 -0
  35. package/lib/index.js +138 -868
  36. package/lib/mcp/inspect-probe.js +199 -0
  37. package/lib/mcp/manager.js +30 -548
  38. package/lib/mcp/tool-visibility.js +388 -0
  39. package/lib/memories/archive-engine.js +142 -5
  40. package/lib/memories/archive.js +10 -1
  41. package/lib/memories/discovery.js +261 -0
  42. package/lib/memories/export-plan.js +42 -0
  43. package/lib/memories/memories-types.js +1 -0
  44. package/lib/memories/service.js +4 -38
  45. package/lib/memories/snapshot.js +10 -252
  46. package/lib/op-registry.js +21 -0
  47. package/lib/ops/compat.js +11 -0
  48. package/lib/ops/quick-prompts.js +26 -0
  49. package/lib/ops/scene-records.js +40 -0
  50. package/lib/ops/scene-sync.js +71 -1
  51. package/lib/ops/sessions.js +34 -14
  52. package/lib/ops/snapshot.js +18 -12
  53. package/lib/prompts/quick-service.js +211 -0
  54. package/lib/scene-linkage.js +184 -0
  55. package/lib/sessions/archive-schemas.js +121 -0
  56. package/lib/sessions/path-key.js +46 -0
  57. package/lib/sessions/workspace.js +29 -166
  58. package/lib/settings-sidecars.js +143 -0
  59. package/lib/skills/core-types.js +8 -0
  60. package/lib/skills/core-util.js +81 -0
  61. package/lib/skills/core.js +56 -2326
  62. package/lib/skills/dir-watch.js +71 -0
  63. package/lib/skills/frontmatter.js +96 -0
  64. package/lib/skills/homes.js +14 -0
  65. package/lib/skills/import-pipeline.js +231 -0
  66. package/lib/skills/manager-state.js +800 -0
  67. package/lib/skills/official.js +269 -0
  68. package/lib/skills/provider-registration.js +89 -0
  69. package/lib/skills/service.js +5 -240
  70. package/lib/skills/skill-roots.js +287 -0
  71. package/lib/skills/skill-trash.js +265 -0
  72. package/lib/skills/system-trash.js +97 -0
  73. package/lib/skills/upload-pipeline.js +374 -0
  74. package/lib/slash-settings.js +25 -0
  75. package/lib/subagents/persona-parse.js +312 -0
  76. package/lib/subagents/persona-types.js +5 -0
  77. package/lib/subagents/persona-write.js +93 -0
  78. package/lib/subagents/run-provider.js +159 -0
  79. package/lib/subagents/service.js +14 -638
  80. package/lib/subagents/tool-filter.js +98 -0
  81. package/lib/token-config.js +240 -0
  82. package/lib/tool-table-switch.js +163 -0
  83. package/lib/tools/scene.js +40 -9
  84. package/package.json +3 -2
package/CHANGELOG.md CHANGED
@@ -10,6 +10,76 @@
10
10
 
11
11
  ---
12
12
 
13
+ ## [0.18.5] - 2026-10-05
14
+
15
+ 会话导出分三档累进(仅正文 → + 工具 → + 思考)+ 导出弹窗放大到看得到列表 + 导入可以挑工作区;修好行内「恢复」必报操作失败。
16
+
17
+ ### 新增
18
+
19
+ - **导出分三档,累进**:仅正文 → 正文 + 工具 → 正文 + 工具 + 思考,每一档都是上一档的超集。
20
+ - 中间档是这一节存在的理由:**要工具、不要思考**。思考是模型对自己干了什么的叙述,没有工具调用就没有它叙述的对象 —— 反向那一档(带思考不带工具)没有意义,所以三档只可能是这一个顺序。
21
+ - 附件(图片 / 文件的名字与大小)跟工具一起进中间档:它属于「对话里出现过什么」,不属于「模型想了什么」。
22
+ - 工具结果按上限截断并写明原文总长(一次文件读取就能有几 MB),不设限的话一个会话就能导出上百 MB。
23
+ - 附加段各自成节,且载荷整段缩进 —— 工具结果可以是任意文件内容,不缩进的话它里面的 `## User` 会在再导入时把你的轮次劈开。
24
+ - 后两档是给人看的,不是拿来回流的:再导入时工具输出与思考会并入助手正文;要回流对话请用「仅正文」。
25
+ - JSONL 的 `content` 仍是字符串而不是块数组 —— 块数组会让导入侧把思考又拼回正文,等于把这次修的缺陷原地复活。
26
+ - **导入会话可以挑工作区**:三条路并存 —— 从已登记的工作区下拉里选、浏览一个文件夹、直接粘绝对路径。留空仍归未分组。
27
+ - 下拉只列活登记的那几个。「已移除」的游离目录不冒充工作区(它按定义就是没登记),要用那个目录请走「浏览」。
28
+ - **导出弹窗从 560×640 放大到 720×760**:字段由五行压成三行(格式|导出内容 并一行、会话范围|工作区 并一行),省下的位置全给会话列表。只有列表内滚,提示 / 目录 / 动作行常驻不动。其余四页的导出弹窗与回收站尺寸不变。
29
+
30
+ ### 修复
31
+
32
+ - **归档列表每行「恢复」必弹「操作失败」**:宿主官方 `unarchiveSession` 是 `Promise<void>`,我们的门面把它的返回值原样透传,op 层再去读 `archivedSessionIds` 就抛 TypeError。崩溃点在**构造回执那一行** —— 宿主其实已经恢复成功、工作区记账也补回来了,用户看到的却是一句失败,而且列表不刷新,得手动刷一下才发现它好了。现在回执由门面按权威归档集合自造,op 层不再读注册表的返回值。
33
+ - **导出的正文里混着思考**:取文本那一步只判「这个对象有没有 text 字段」,而思考块 `{type:'reasoning', text}` 恰好符合,于是思考一直和正文拼在一起导出去。现在按块类型取文本 —— 同一条缺陷 0.16.x 已在子智能体侧修过,导出侧是它的第二个出口。
34
+ - 副作用要说清:**同一份会话在 0.18.5 前后的导出产物对不上**,少掉的那段就是当初混进来的思考。
35
+ - 因此「只有思考、没有正文」的助手轮次在简洁档会第一次变成导不出来,跳过原因里会写明是档位问题、不是内容丢了。
36
+
37
+ ### 变更
38
+
39
+ - **导入弹窗那一格改叫「工作区」**(原来叫「项目目录」),与导出弹窗的筛选同名同义;文件要求那一行跟着改口。
40
+ - **恢复回执不再带 `archivedSessionIds`**:界面只用 `ok` / `error` / `workspace`,而归档集合可能有几千条,每次单点恢复都全量回传一遍没有意义。
41
+
42
+ ---
43
+
44
+ ## [0.18.0] - 2026-10-01
45
+
46
+ 斜杠命令「工具」段 + 快捷提示词(含场景绑定)+ 兼容页两段开关与挂载实况。
47
+
48
+ ### 新增
49
+
50
+ - **斜杠命令「工具」段**:对话输入框打 `/` 就能进场景、启停技能 / MCP 服务器 / 子智能体 / 提示词 / 记忆,点完菜单不关、接着点下一条。走宿主官方 `inputTriggers` 通道(不改官方包),只放可逆动作。
51
+ - 六个域各一行,点一行原地进入该域条目(面包屑「工具 › 技能」);启用项绿色对勾、停用项空心框,右侧灰字是条目自己的备注,域行右侧是当前态摘要。
52
+ - 条目按域内唯一的 `key` 定位(技能与 MCP 服务器会重名);点下去先叠本地乐观状态,写成功后按官方口让菜单重取一次候选。
53
+ - 每个外部技能目录多一行「目录名 · 目录」,开得也关得;列表全量给出不截断,技能按来源目录、记忆按场景分组,已启用的在前。
54
+ - 场景域不列两个恒开的保留场景;记忆域默认带上「全局」那一组并钉在最前面。
55
+ - 半截 token 直接按 Enter 会被拦下,不会当普通消息发给模型。
56
+ - **快捷提示词**:提示词页拆成「全局提示词」与「快捷提示词」两段。快捷词不注入上下文,在 `/` 的「快捷提示词」段点一下把正文原样贴进输入框(不自动发送);与预设两份存储(`hub/quick-prompts/`),每条一颗开关管它在不在 `/` 里。
57
+ - 新 op 8 条(list / create / update / toggle / remove + 回收站三条)逐条登记进 `op-registry`,写侧与五个管理域同一条门禁。
58
+ - 数据纪律与预设同级:删除进回收站、可勾选导出成 zip、随整机迁移快照走。
59
+ - **场景可以绑定一组快捷提示词**:「修改场景」里那颗下拉默认「当前启用的」= 不绑、进出不碰;勾了的进场景启用、其余停用,退出按快照还原。空表是合法值(= 进入后全部停用)。
60
+ - **兼容页「斜杠命令入口」一组**:两段各一颗勾选框(新 op `slash-settings`)+ 一枚「已生效 / 未生效」标签(挂载实况由客户端按段上报);功能总览同步多一行。
61
+ - **一条全局轻提示 `showPluginToast`**(右下角):斜杠命令是在对话页按下的,`Notice` 长在页签里、那时设置页根本没挂载。
62
+
63
+ ### 修复
64
+
65
+ - **`scene_manager_switch` 退出场景的回执说「什么都没改」**:判据把"目标就是当前场景"的早退与"真的退掉一个场景"混成同一个形状,模型每次退出拿到的都是 `OK: already in scene「」`。
66
+ - **`/` 菜单进 / 出场景不应用、也不恢复档案**:「启用集合与当前模式恒等」这条原本靠每个调用方各调两个 op 维持,`/` 那一行只调了一个。现在收到服务端兜住,面板 / `/` / 模型工具都只发一次调用。
67
+ - **分组卡片点标题收不起来**(MCP 页 0.11.0 起、提示词页两处):写进"收起 = true"那张表里的值取反错了,每次点击都把同一个值写回去。
68
+
69
+ ### 变更
70
+
71
+ - **档案摘要与切换回执补上「模型工具表」这一档**:`scene_manager_list` 多一格「工具表方案「X」」,切换回执多一句「切到方案「X」(关 N 条)」/「按进场景前的快照还原」;名单本来没变就一句都不说。模型侧不提快捷提示词。
72
+ - **`/` 的「工具 › 提示词」域里两类提示词都是启停行**,贴文字改由「快捷提示词」那一段常驻承担(两个源、两件事)。
73
+ - **提示词页两组换成技能那样的可折叠卡片**(卡片头 = 组名 + 条数);快捷那组卡片头给「全选 / 取消全选」,全局那组不给(单选)。
74
+ - **全局提示词的「应用 / 重新应用」两颗文字按钮换成一颗药丸开关**(在「编辑」左边):亮着的再点一次 = 重新写回 `AGENTS.md`。
75
+ - **「修改场景」弹窗分两模块**(基本信息 / 场景绑定),快捷提示词的勾选清单换成段卡片(段头计数 + 全选,段体按内容长)。
76
+ - **模型工具表里「提示词」这一组改口「全局提示词」**,两条工具的说明点明只管写进 `AGENTS.md` 的基线;没有为快捷提示词新增模型工具。
77
+ - **含下拉与勾选清单的字段外层 `label` 改 `div`**:嵌套 label 会把"点段头空白"转给勾选清单里第一颗复选框。
78
+ - **场景档案弹窗的段脚注撤了**(同一件事在段头计数、未定义提示与脚注各说一遍)。
79
+ - **「新增提示词」弹窗删掉「或从现有预设复制」那一格**(`agentsmd-create` 的 `from` 参数保留,只是界面不再给入口)。
80
+
81
+ ---
82
+
13
83
  ## [0.17.0] - 2026-09-30
14
84
 
15
85
  对抗性审查收尾:三批(P0/P1/P2 表 19 条 + §5 脆弱性地图 F1–F12)与随后一轮复审(14 条发现 + 2 条替代项)全部处理完毕,逐条到终态;P0 / P1 每条都先复现坏行为再修。报告与终态处置表在 `review/`(本地工作稿,按 `.gitignore` 不入版本库)。
package/README.md CHANGED
@@ -41,7 +41,8 @@ dsh plugin --profile web add dsh-plugin-tool-management@latest
41
41
 
42
42
  | 亮点 | 说明 |
43
43
  | --------------------------- | ----------------------------------------------------------------------------------------- |
44
- | 一键换场景 | 每个场景各配一套 MCP / 技能 / 人设 / 记忆,进入时整套切换、退出时还原;模型也能按你说的切 |
44
+ | 一键换场景 | 每个场景各配一套 MCP / 技能 / 人设 / 记忆(绑了的话还有快捷提示词),进入时整套切换、退出时还原;模型也能按你说的切 |
45
+ | 不离开对话就能管 | 在对话输入框打 `/` 出「工具」段:进场景、启停技能 / MCP / 子智能体 / 提示词 / 记忆,点一下就生效 |
45
46
  | 记忆自动送到模型眼前 | 每个场景下写几段 `.md` 就是它的资料库,正文自动进上下文,不用每次复制粘贴 |
46
47
  | 给 MCP 服务器写备注 | 「A 不可用时改用 B 兜底」这类话写进备注,模型每轮都看得到,会照做 |
47
48
  | 单个工具也能关 | 一台服务器里可以只停某个工具,模型看不见也调不到;「重启」只重连,不改开关状态 |
@@ -75,10 +76,20 @@ dsh plugin --profile web add dsh-plugin-tool-management@latest
75
76
 
76
77
  ## 功能
77
78
 
79
+ ### 斜杠命令(在对话里直接管)
80
+
81
+ - **打 `/` 出「工具」段**:六行 —— 场景 / 技能 / MCP 服务器 / 子智能体 / 提示词 / 记忆。点一行原地进入这一域的条目(顶栏面包屑点「工具」回上一级),再点一条直接生效。**点完菜单不关**,接着点下一条也行 —— 连点多个开关是主要用法。
82
+ - **状态看得见**:启用项图标位是绿色对勾、停用项是空心框,右侧灰字是条目自己的备注(场景说明 / 技能描述 / MCP 备注 / 人设描述 / 预设描述 / 记忆描述,超 40 字截断;没写备注才退回「已启用 / 未启用」);域行右侧给当前态摘要(`当前:工作`、`3 启用 / 1 停用`),不点进去也知道现在什么状况。点下去立刻翻转(本地乐观状态),写失败会翻回来并说明原因。
83
+ - **条目多也不挡路**:每个域全量列出,靠面板自己滚动;技能按来源目录分组、记忆按场景分组,组内已启用的排前面。每个外部技能目录另给一行「目录名 · 目录」,钉在本组最上面,点它就是启停整个来源(开着也列,所以也关得掉;关掉时它里面的技能整组收起,重新启用当场又摆回来)。场景域里两个恒开的保留项(「全局」与公共基线)不出现,但记忆域默认带上「全局」那几条,并把这一组钉在最前面 —— 它们不属于当前场景,却对任何对话都成立。
84
+ - **只放可逆动作**:进场景与各类启停。再点当前场景 = 退出场景(只注入全局与公共基线);只有全局提示词那一档关不掉(基线没有"全部不应用"这一态),点当前那一份只回一句「当前就是它」。增删改、导入导出、改配置仍各归各页。
85
+ - **走宿主官方通道**:用 DSH 的输入触发器接口注册(官方技能菜单同一条路),不 patch 官方包;宿主没有该服务时这个入口不出现,「兼容」页会照实说明。两段各一颗开关(「工具」/「快捷提示词」),在「兼容 → 注入」块的「斜杠命令入口」一组里,行末那枚标签说的是本次启动真挂上没;两段各挂各的源,关掉一个不影响另一个;两段都关掉后 `/` 菜单回到出厂样子(修改后重启 DSH 即可生效)。
86
+ - **「工具 › 提示词」里两类提示词都在,每一行都是启停**:全局那组 = 哪一份写进 `AGENTS.md`(单选,各带分组标题),快捷那组 = 这条还开不开着(与提示词页那颗药丸开关同一个动作、同一份状态)。这一域里连已经关着的快捷词也列 —— 管理那一层不该因为被管起来就找不到。
87
+ - **另起一段「快捷提示词」管取用**:只列开着的那几条,点一行把存好的那段话原样替换进输入框,**不自动发送**(发送键留给你),所以那一行不带对勾 —— 它不是启停。
88
+
78
89
  ### 场景与记忆
79
90
 
80
91
  - **场景 = 分组,记忆 = `.md` 文件**:`memories/<场景>/<名>.md`,整篇正文自动注入上下文,文件名支持中文。
81
- - **「启用」与「进入」是两件事**:启用决定注入按哪个场景走(单选,全关 = 只注入「全局」与 `_shared`);进入才按档案整套切换 MCP / 技能 / 人设,并把绑定的提示词写进 `AGENTS.md`。界面开关与 `scene_manager_switch` 都两轴齐动。
92
+ - **「启用」与「进入」是两件事**:启用决定注入按哪个场景走(单选,全关 = 只注入「全局」与 `_shared`);进入才按档案整套切换 MCP / 技能 / 人设(绑了的话还有快捷提示词),并把绑定的提示词写进 `AGENTS.md`。**两者必须恒等,而这条恒等由服务端兜住**:`rules-set-active` 先把运行时切到位再写启用集合(切不动就一个字都不写),所以面板开关、`/` 菜单、模型工具哪个入口都只发一次调用就两轴齐动。
82
93
  - **场景档案**:每个场景搭配 MCP 工具集 / 技能集 / 子智能体 / 记忆(任意组合)。语义是**勾的启用、没勾的停用**,整段没建 = 该域全部停用;退出按进场景前的快照还原。场景内这三个域的开关照常可用,改动会同步写进档案。
83
94
  - **场景锁定**:锁定后 MCP / 技能 / 子智能体 / 记忆 / 提示词五个域的增删改整体只读(界面与服务端双侧拦截);场景自身的启停、MCP 重启、导出不受影响。
84
95
  - **删除场景 = 连记忆一起删**:场景记录、档案与全部记忆进同一条回收站条目,恢复时按原路径整条放回;使用中的场景拒绝删除。改名会连带改目录与档案。
@@ -118,12 +129,16 @@ dsh plugin --profile web add dsh-plugin-tool-management@latest
118
129
  - **记得「最近一次应用的是哪份」**:就算你手改过 `AGENTS.md`,也答得出来源(会注明"此后文件有变")。
119
130
  - 每条预设可写一句"这份是干什么的",只存在插件侧、不进 `AGENTS.md`。
120
131
  - **被引用的不能删**(场景绑定 / 当前内容 / 退出场景要恢复的那一份),删除进回收站。
121
- - 场景接管期间「应用」= 把该场景改绑到那一份(同步写进场景档案);锁定时拒绝。
132
+ - **生效与否就是卡片左边那颗开关**:点亮 = 把这一份写进 `AGENTS.md`;已经亮着的那颗再点一次 = 重新写回(把被手改的文件拉回来)。基线没有"全部不应用"这一态,所以这颗开关关不掉 —— 想换一份就点亮另一份(单选)。
133
+ - 场景接管期间点亮另一份 = 把该场景改绑到那一份(同步写进场景档案);锁定时拒绝。
134
+ - **快捷提示词**(同页第二段):存一段常用的话,之后在对话框打 `/` 点一下就原样贴进输入框,可直接编辑再发送。它**不注入上下文**,卡片上那颗开关只管一件事 —— 这条还在不在 `/` 的「快捷提示词」段里出现(关掉时正文与备注都留着;同一颗开关在「工具 › 提示词」那一域里也拨得动)。只由你自己点出来;与全局基线分开存,删除进回收站,也能导出与随迁移快照带走。
135
+ - **场景可以绑定一组快捷提示词**:「修改场景」里「提示词预设」下面那颗下拉,默认「当前启用的(保持现状)」= 不绑、进出不碰;改成「按场景勾选」后,进入本场景只启用你勾的那几条、其余停用,**退出场景按进场景前的开关还原**。一条都不勾是"进入后全部停用",和"不绑"是两件事。
136
+ - **两组各自是一张可折叠卡片**(点卡片头收起 / 展开,打了字自动展开)。快捷那组的卡片头有一颗「全选 / 取消全选」,只作用于当前可见的那几条;全局那组没有 —— 那一档是单选,"全部应用"没有意义。
122
137
 
123
138
  ### 历史会话
124
139
 
125
140
  - 按项目分组、搜索、批量恢复 / 永久删除、保留期自动清理;工作区登记被删后可一键重新登记。
126
- - 导入 Claude Code / Cursor / Codex / 任意文本;导出 Markdown / JSONL。**导出是可读转录,不是完整备份**:只保留 user / assistant 的文本块,工具调用、图片、思考过程与 token 统计都不在里面。要留全量请用「归档」。
141
+ - 导入 Claude Code / Cursor / Codex / 任意文本,工作区可以从已登记的里挑、浏览文件夹或直接给路径;导出 Markdown / JSONL,分三档**累进**:仅正文 → 正文 + 工具 → 正文 + 工具 + 思考。**导出仍是可读转录,不是完整备份**:附加段每块有上限并明说截断,token 统计不在里面。要留全量请用「归档」。
127
142
 
128
143
  ### 宿主兼容
129
144
 
package/README_EN.md CHANGED
@@ -41,7 +41,8 @@ In one line: **configure "work / writing / coding" each as a scene and switch th
41
41
 
42
42
  | Highlight | What it means |
43
43
  | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
44
- | One-click scene switch | Each scene carries its own MCP / skills / personas / memories; entering applies them, leaving restores. The model can switch them for you too |
44
+ | One-click scene switch | Each scene carries its own MCP / skills / personas / memories (plus a bound set of quick prompts, if you set one); entering applies them, leaving restores. The model can switch them for you too |
45
+ | Manage without leaving chat | Type `/` in the composer for a “Tools” section: enter a scene, toggle skills / MCP / subagents / prompts / memories — one click, done |
45
46
  | Memories reach the model | A few `.md` files under a scene become its knowledge base — injected automatically, no copy-pasting |
46
47
  | Notes for MCP servers | Write "if A is down, fall back to B" as a note; the model sees it every turn and acts on it |
47
48
  | Disable a single tool | Keep a server but mute one tool: invisible and uncallable. "Restart" only reconnects and never flips your switches |
@@ -75,10 +76,20 @@ Then remind me to hard-refresh the browser.
75
76
 
76
77
  ## Features
77
78
 
79
+ ### Slash commands (manage from the chat box)
80
+
81
+ - **Type `/` to get a “Tools” section**: six rows — scenes / skills / MCP servers / subagents / prompts / memories. Click a row to drop into that domain's items in place (the breadcrumb's “Tools” step goes back), click an item to apply it. **The menu stays open after a click** — keep toggling the next one; batch toggling is the main use.
82
+ - **State is visible**: enabled items carry a green check in the icon slot, disabled ones an empty box, and the grey text on the right is the item's own note (scene description / skill description / MCP note / persona description / preset description / memory description, clipped to 40 chars; rows without one fall back to “Enabled / Not enabled”). Each domain row shows a summary (`now: Work`, `3 on / 1 off`), so you know where you stand without opening it. The check flips the moment you click (optimistic); a failed write flips back and says why.
83
+ - **Long lists stay usable**: every domain lists all of its items and the panel scrolls; skills group by source directory, memories by scene, enabled rows first inside each group. Each external skill directory also gets one "directory name · directory" row pinned at the top of its group — clicking it toggles the entire source (it is listed while enabled too, so you can switch it off here; its skills collapse with it and come straight back when it is enabled again). The two always-on reserved scenes ("Global" and the shared baseline) don't appear under scenes, but the memories domain includes the global ones by default and pins that group at the top: they aren't in the current scene yet they hold in every conversation.
84
+ - **Only reversible actions**: entering a scene and the various toggles. Clicking the scene that's already active leaves it (only global and shared keep injecting); the one thing that can't be switched off is the global prompt — there is no "apply nothing" state for a baseline, so clicking the preset already in effect just says it is the current one. Create / delete / edit / import / export stay on their own pages.
85
+ - **Built on the host's official channel**: registered through DSH's input-trigger interface (the same one the official skills menu uses) — no patching of official packages. If the host lacks that service the entry simply never appears and the compatibility page says so. Each section gets its own checkbox (“Tools” / “Quick prompts”) inside the “Slash command entry” group under “Compatibility → Injection”, and the tag at the end of each row says whether it really mounted this startup. The two sections register independently, so switching one off leaves the other alone; turning both off restores the stock `/` menu (restart DSH for the slash-command change to take effect).
86
+ - **“Tools › Prompts” holds both kinds of prompt, and every row there is a switch**: the global group is which baseline is written into `AGENTS.md` (single choice), the quick group is whether that snippet is on at all — the same action and the same state as the pill switch on the Prompts page. Quick prompts that are switched off stay listed here: the place you manage things from should not hide an item the moment you manage it.
87
+ - **A separate “Quick prompts” section is for reuse**: only the enabled ones appear, and one click replaces the typed token with the saved text in the composer — **nothing is sent for you**; the send key stays yours. Those rows carry no check mark on purpose: clicking one inserts text, it doesn't toggle state.
88
+
78
89
  ### Scenes & memories
79
90
 
80
91
  - **A scene = a group, a memory = a `.md` file**: `memories/<scene>/<name>.md`, the whole body is injected; file names may be non-ASCII.
81
- - **"Enabled" and "entered" are two axes.** Enabled decides which scene the injection follows (single-select; none enabled = only `global` and `_shared` inject). Entering applies the scene's whole MCP / skills / personas set and writes its bound prompt into `~/.dsh/AGENTS.md` (5 generations of backups, restored on exit). Both the UI toggle and `scene_manager_switch` move the two axes together.
92
+ - **"Enabled" and "entered" are two axes.** Enabled decides which scene the injection follows (single-select; none enabled = only `global` and `_shared` inject). Entering applies the scene's whole MCP / skills / personas set and writes its bound prompt into `~/.dsh/AGENTS.md` (5 generations of backups, restored on exit). **They stay identical, and the server is what holds that invariant**: `rules-set-active` brings the runtime in line before it writes the enabled set — and writes nothing at all if the runtime refuses — so every entry point (the UI toggle, the `/` menu, the model tool) needs a single call.
82
93
  - **Scene profile**: each scene combines MCP tools / skills / subagents / memories. The rule is *ticked = on, unchecked = off*, and a section that was never created means that whole domain is off. Leaving restores the pre-scene state verbatim. While a scene is active, the switches in those three domains still work and are written back into its profile; only locking freezes them.
83
94
  - **Scene lock**: once locked, create/update/delete across MCP / skills / subagents / memories / prompts is read-only (UI disabled plus a server-side guard). Creating, renaming, binding a prompt, activating or entering a scene, the recycle bin, MCP restart and exports stay outside the frozen list. A scene must be running to lock, and a locked scene cannot be turned off until you unlock it.
84
95
  - **Deleting a scene deletes its memories too**: record, profile and every memory land in one recycle-bin entry and come back as a whole. A running scene refuses deletion; renaming follows through to the directory and profiles.
@@ -119,12 +130,16 @@ Then remind me to hard-refresh the browser.
119
130
  - **It remembers the last applied preset**: even after you hand-edit `AGENTS.md`, the origin is still reported (flagged "the file changed since").
120
131
  - Each preset can carry a one-line description that lives in a sibling `meta.json` — shown in this panel, never injected.
121
132
  - **A referenced preset cannot be deleted** (scene binding / current `AGENTS.md` content / the copy to restore on scene exit); deletes go to the recycle bin.
122
- - **While a scene drives the baseline, Apply rebinds that scene** to the chosen preset (written into the scene profile, realigned immediately); it is refused only while the scene is locked. The global baseline is restored from the snapshot on exit.
133
+ - **The switch on the left of a card is the answer to “is this one in effect”**: flip it on and that preset is written into `AGENTS.md`; clicking the one that is already on writes it again (undoing hand edits). There is no "apply nothing" state for a baseline, so this switch cannot be turned off — light up a different one instead (single choice).
134
+ - **While a scene drives the baseline, flipping another one rebinds that scene** to the chosen preset (written into the scene profile, realigned immediately); it is refused only while the scene is locked. The global baseline is restored from the snapshot on exit.
135
+ - **Quick prompts** (the second section on the same page): save a piece of text you keep typing, then hit `/` in the composer and click it — it lands verbatim in the input, ready to edit and send. It is **never injected**; its switch controls exactly one thing — whether the row still shows up in the `/` “Quick prompts” section (text and note survive when it's off; the same switch is reachable under “Tools › Prompts”). Stored apart from the baselines, deletable to the recycle bin, exportable and included in the migration snapshot.
136
+ - **A scene can bind a set of quick prompts**: a new dropdown under “Prompt preset” in “Edit scene”. The default, “The enabled ones (keep as is)”, means the scene does not touch this domain at all; switch it to “Pick per scene” and entering that scene enables exactly the checked ones and disables the rest, **leaving the scene restores the switches as they were before entering**. Checking nothing is "disable all inside this scene", which is the opposite of "not bound".
137
+ - **Both groups are collapsible cards** (click the header to fold, and a search query forces them open). The quick group's header carries a “Select all / Deselect all” button that applies to the currently visible rows only; the global group has none — that one is single choice, so "apply every baseline" has no meaning.
123
138
 
124
139
  ### Archived sessions
125
140
 
126
141
  - Grouped by project, searchable, batch restore / delete, retention auto-cleanup; a workspace whose registration was deleted is rebuilt from the session directories and can be re-registered in one click.
127
- - Import Claude Code / Cursor / Codex / any text; export Markdown / JSONL. **An export is a readable transcript, not a full backup**: only user/assistant text blocks survive — tool calls, images, reasoning and token stats are dropped. Use archiving when you need the full record.
142
+ - Import Claude Code / Cursor / Codex / any text — pick a registered workspace, browse to a folder, or give a path directly; export Markdown / JSONL in three cumulative modes: text only → plus tool calls and results and attachment names → plus reasoning. **An export is still a readable transcript, not a full backup**: the added blocks are capped and say so, and token stats are not included. Use archiving when you need the full record.
128
143
 
129
144
  ### Host compatibility
130
145
 
Binary file
package/docs/images/1.png CHANGED
Binary file
Binary file
package/docs/images/2.png CHANGED
Binary file
Binary file
package/docs/images/3.png CHANGED
Binary file
Binary file
package/docs/images/4.png CHANGED
Binary file
Binary file
package/docs/images/5.png CHANGED
Binary file
Binary file
package/docs/images/6.png CHANGED
Binary file
Binary file
package/docs/images/7.png CHANGED
Binary file
Binary file
package/docs/images/8.png CHANGED
Binary file
package/docs/update.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  | 版本 | 发布 | 主题 |
6
6
  | ---------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
7
+ | [0.18.5](#0185---2026-10-05) | 2026-10-05 | 会话导出分三档累进(仅正文 → 正文 + 工具 → 正文 + 工具 + 思考,工具结果有上限并明说截断)+ 导出弹窗放大到 720×760、字段压成三行把位置还给会话列表 + 导入会话可以从已登记工作区里挑 / 浏览文件夹 + 修好归档列表每行「恢复」必弹「操作失败」(其实已经恢复了)与导出的正文里混着思考 |
8
+ | [0.18.0](#0180---2026-10-01) | 2026-10-01 | 斜杠命令「工具」段(对话里打 `/` 就能进场景、启停六个域,点完不关)+ 快捷提示词(`/` 里点一下贴进输入框;场景可绑定一组)+ 兼容页两段开关与挂载实况 + 提示页药丸开关与可折叠卡片 + 修好分组卡片收不起来、退出场景回执说「什么都没改」、`/` 进 / 出场景不跟着切档案 |
7
9
  | [0.17.0](#0170---2026-09-30) | 2026-09-30 | 对抗性审查收尾(三批 19 条 + 复审 14 条 + 2 条替代项,全部处理):修好 3 处数据丢失与 2 处凭据外泄、停用 MCP 工具仍可调用等**执行侧**守卫失效、场景回收站与记忆索引的恢复问题;MCP 工具全名的切分收敛成一套规则、服务器名含 `__` 的歧义会出声提示 |
8
10
  | [0.16.6](#0166---2026-09-30) | 2026-09-30 | 官方内置技能补全 web 侧:web 照注的沙盒诊断技能可见可停 + Office 三件套 web 也暴露 + 补上接管后缺失的 LibreOffice Kit 路径段(0.16.5 桌面已缺) |
9
11
  | [0.16.5](#0165---2026-09-30) | 2026-09-30 | 桌面版误报 5 条「两份拷贝」修掉(身份逐包核对)+ 「全部可用」与红卡不再同屏 + 官方内置技能接入管理(桌面版注入的 4 个可启停;web 不出现) |
@@ -27,6 +29,33 @@
27
29
 
28
30
  ---
29
31
 
32
+ ## 0.18.5 - 2026-10-05
33
+
34
+ - **导出分三档,累进**:仅正文 → 正文 + 工具 → 正文 + 工具 + 思考,每档都是上一档的超集。工具结果按上限截断并写明原文一共多长 —— 一次文件读取就能有几 MB,不设限的话一个会话就能导出上百 MB。
35
+ - **中间档是「要工具、不要思考」**:思考是模型对自己干了什么的叙述,没有工具调用就没有它叙述的对象,所以反向那一档没有意义。附件跟着工具走中间档 —— 它属于「对话里出现过什么」,不属于「模型想了什么」。
36
+ - **导出的正文里不再混着思考**:此前取文本只判「有没有 text 字段」,思考块恰好符合,所以它一直和正文拼在一起出去。同一份会话在 0.18.5 前后的产物对不上,少掉的那段就是当初混进来的思考。
37
+ - **导出弹窗放大**(560×640 → 720×760):字段从五行压成三行 —— 格式与导出内容并一行、会话范围与工作区并一行(两个正交条件,没合成一个下拉),省下的位置全给会话列表。只有列表内滚,提示 / 目录 / 动作行常驻。其余四页的导出弹窗与回收站不变。
38
+ - **导入会话可以挑工作区了**:从已登记的工作区里选、浏览一个文件夹、或直接粘绝对路径,三条路并存;留空仍归未分组。那一格也跟着改口叫「工作区」,与导出弹窗的筛选同名。
39
+ - **后两档是给人看的,不是拿来回流的**:再导入时工具输出与思考会并入助手正文。要接着聊用「仅正文」。
40
+ - **修好归档列表每行的「恢复」**:点一下必弹「操作失败」,可宿主其实已经恢复成功、工作区记账也补回来了 —— 回执在构造时读了一个宿主根本不返回的字段,抛了。现在回执由插件自己按权威归档集合构造。
41
+
42
+ ---
43
+
44
+ ## 0.18.0 - 2026-10-01
45
+
46
+ - **斜杠命令「工具」段**:对话输入框打 `/` 就能进场景、启停技能 / MCP 服务器 / 子智能体 / 提示词 / 记忆,点完菜单不关、接着点下一条。走宿主官方 `inputTriggers` 通道(不碰官方包),只放可逆动作,读写复用面板那批接口。
47
+ - **快捷提示词**:提示词页拆成「全局提示词」与「快捷提示词」两段;快捷词不注入上下文,在 `/` 的「快捷提示词」段点一下把正文原样贴进输入框(不自动发送),每条一颗开关管它在不在那里。
48
+ - **场景可以绑定一组快捷提示词**:「修改场景」里那颗下拉默认「当前启用的」= 不绑、进出不碰;勾了的进场景启用、其余停用,退出按快照还原。
49
+ - **兼容页多一组「斜杠命令入口」**:两段各一颗开关 + 一枚「已生效 / 未生效」标签(为什么没生效写在悬停里),功能总览同步多一行。
50
+ - **新增一条全局轻提示**:斜杠命令是在对话页按下的,面板内的提示条长在页签里、到不了那里。
51
+ - **提示词页两组换成可折叠卡片**;全局那段的两颗「应用 / 重新应用」文字按钮换成一颗药丸开关 —— 亮着的再点一次就是重新写回 `AGENTS.md`。
52
+ - **「修改场景」弹窗分两模块**(基本信息 / 场景绑定),快捷提示词的勾选清单换成段卡片(段头计数 + 全选,段体按内容长)。
53
+ - **模型侧说得更全一点**:工具表里「提示词」这一组改口「全局提示词」;档案摘要与切换回执补上「工具表方案」这一档(名单本来没变就一句都不说)。快捷提示词不提 —— 模型看不到也改不了。
54
+ - **修好三处**:分组卡片点标题收不起来(MCP 页从 0.11.0 起就这样);`scene_manager_switch` 每次退出场景都报成「什么都没改」;`/` 里进 / 出场景不跟着切档案(这条恒等改由服务端兜)。
55
+ - **数据纪律不降级**:快捷提示词删除进回收站、可勾选导出、随整机迁移快照走;场景锁定期间整体只读。
56
+
57
+ ---
58
+
30
59
  ## 0.17.0 - 2026-09-30
31
60
 
32
61
  - **记忆索引:一次读失败不再等于「整份配置被清空」**:读不到(杀软 / 索引器占住)时以前当成「没有索引」,随后任何一次写都会把空索引落盘 —— 打开面板就可能触发。现在只有文件真的不存在才算新用户,其余读失败一律拒写并如实显示。