agent-purge 0.2.5 → 0.2.6

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/lib/caps.mjs CHANGED
@@ -23,8 +23,8 @@ function readMatrix() {
23
23
  }
24
24
  }
25
25
 
26
- /** 有 /purge 机制的 harness —— **只算能把内容写进系统提示词的**(目前只有 pi) */
27
- export const SLASH_IDS = new Set(["pi"]);
26
+ /** 有 /purge 机制的 harness —— **只算能把内容写进系统提示词的**(pi 的扩展钩子、dsh 的 cordis 插件) */
27
+ export const SLASH_IDS = new Set(["pi", "dsh"]);
28
28
  /** 有可写配置文件/插件的 harness(其余家只能点名启动或打补丁) */
29
29
  export const PERSIST_IDS = new Set(Object.keys(persistTargets));
30
30
  /** 能把内容真的送进 system 数组的层;user 层(上下文块/用户消息)一律不对外提供 */
@@ -64,7 +64,7 @@ const BLOCKED = { antigravity: "二进制补丁才能改它的系统提示,配
64
64
  const HOT = {
65
65
  pi: { kind: "command", needs: "slash", how: "扩展钩子 before_agent_start:/purge 或改设置,下一轮生效" },
66
66
  opencode: { kind: "state", needs: "install", how: "插件钩子 chat.system.transform 每轮读 state.json + active.md:改设置下一轮生效" },
67
- dsh: { kind: "state", needs: "install", how: "cordis 插件每轮 assemble 读 state.json + active.md:改设置下一轮生效(desktop 装完要重启一次)" },
67
+ dsh: { kind: "command", needs: "slash", how: "cordis 插件注册 /purge:改 state.json,下一句生效,不产生模型消息" },
68
68
  opencode2: { kind: "state", needs: "install", how: "v2 插件 ctx.session.hook('context') 每轮读 state.json + active.md:改设置下一轮生效" },
69
69
  };
70
70
 
@@ -122,7 +122,7 @@ export function capsFor(id, ctx = {}) {
122
122
  const slashWhy = blocked
123
123
  ? blocked
124
124
  : !SLASH_IDS.has(id)
125
- ? `${id} 没有能改系统提示词的 /purge(/purge 展开成用户消息,实测无效;只有 pi 的扩展能在 before_agent_start 重写 systemPrompt)`
125
+ ? `${id} 没有能改系统提示词的 /purge(/purge 展开成用户消息,实测无效;只有 pi 的扩展和 dsh 的 cordis 插件能做到)`
126
126
  : null;
127
127
 
128
128
  return {