dsh-plugin-memory 0.19.3 → 0.19.4

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 CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  所有记录跟随 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/) 风格;版本号与 `package.json` 保持一致。
4
4
 
5
+ ## [0.19.4] - 2026-11-12
6
+
7
+ ### Fixed
8
+
9
+ - **新版本兼容老版本 DSH**:agent 注册表读取改为「`roots()` 优先、失败回退 `list()`」——0.2.1-rc.5 … 0.2.2-rc.1 走老语义(只取根 agent,行为与旧版插件一致),0.2.2-rc.2 走 `list()`;老版用户升级插件不会出现任何行为变化。
10
+
11
+ ### Docs
12
+
13
+ - README 中英增加「双向兼容」说明:同一份 0.19.2+ 构建同时跑在老宿主与 rc.2 上,升级插件不破坏老版本。
14
+
5
15
  ## [0.19.3] - 2026-11-12
6
16
 
7
17
  ### Docs
package/README.md CHANGED
@@ -16,6 +16,8 @@
16
16
 
17
17
  > **⚠️ Using DSH 0.2.2-rc.2 or newer? Upgrade the plugin to 0.19.2+ first.** Early 0.19.x reads `ctx.agents.roots()`, which rc.2 replaced with `list()`; the resulting throw happens inside the **serial** `agent/created` listener, which rejects agent registration — the visible symptom is **sessions can no longer be created while the plugin is enabled**. 0.19.2 reads the registry compatibly (never throws) and the change needs a **full DSH restart** to take effect `/memory` and the panel stay offline-safe meanwhile.
18
18
 
19
+ > **Compatibility is two-way.** 0.19.2+ reads the agent registry with `agents.roots()` first and falls back to `agents.list()`, so the same build runs on legacy hosts (0.2.1-rc.5 … 0.2.2-rc.1) *and* on rc.2. Upgrading the plugin never breaks an older DSH install, and rc.2 support does not drop older versions.
20
+
19
21
  ## What it does
20
22
 
21
23
  A Cordis plugin that gives DSH agents **persistent, cross-session, migratable memory**: plain markdown + git (the *LLM Wiki* pattern), a `SOUL.md` persona, and a boot block **auto-injected through runtime context** — a hard guarantee, not a hope that the model decides to call a skill.
package/README.zh.md CHANGED
@@ -16,6 +16,8 @@
16
16
 
17
17
  > **⚠️ 如果你在用 DSH 0.2.2-rc.2 或更高版本,请务必先把插件升级到 0.19.2+。** 早期 0.19.x 调用了 `ctx.agents.roots()`,而 rc.2 已换成 `list()`;这次抛错发生在 **serial** 的 `agent/created` 监听器里,会**拒绝 agent 注册**——表现就是**开启插件后无法新建会话**。0.19.2 改为兼容读取(绝不抛错),升级后需要**完全重启 DSH** 才生效。
18
18
 
19
+ > **双向兼容。** 0.19.2+ 读取 agent 注册表时**优先 `agents.roots()`、失败回退 `agents.list()`**——同一份构建既支持老宿主(0.2.1-rc.5 … 0.2.2-rc.1),也支持 rc.2。老版本 DSH 用户升级插件不会坏,rc.2 支持也不会丢掉老版本。
20
+
19
21
  ## 它是干什么的
20
22
 
21
23
  一个 Cordis 插件,给 DSH 的 agent 装上**跨会话、可迁移的持久记忆**:纯 markdown + git(*LLM Wiki* 模式)、一份 `SOUL.md` 人格,以及通过 runtime context **自动注入的 boot 块**——硬保证,不靠模型自觉去调 skill。
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "versions": [
28
28
  {
29
- "version": "0.19.2",
30
- "publishTimestamp": 1794411248,
29
+ "version": "0.19.3",
30
+ "publishTimestamp": 1794411755,
31
31
  "source": {
32
32
  "type": "npm"
33
33
  },
package/lib/index.js CHANGED
@@ -275,13 +275,24 @@ export function apply(ctx, config = {}) {
275
275
  * Read the registry compatibly and never throw.
276
276
  */
277
277
  const rootAgents = () => {
278
- try {
279
- const service = ctx.agents
280
- if (service === undefined) return []
281
- if (typeof service.list === 'function') return service.list()
282
- if (typeof service.roots === 'function') return service.roots()
283
- } catch {
284
- // registry not ready yet
278
+ const service = ctx.agents
279
+ if (service === undefined) return []
280
+ // Older hosts (0.2.1-rc.5 ... 0.2.2-rc.1) expose roots(); rc.2 replaced it
281
+ // with list(). Prefer roots so root-only semantics stay identical on old
282
+ // hosts, and fall back to list() on newer ones.
283
+ if (typeof service.roots === 'function') {
284
+ try {
285
+ return service.roots()
286
+ } catch {
287
+ // fall through to list()
288
+ }
289
+ }
290
+ if (typeof service.list === 'function') {
291
+ try {
292
+ return service.list()
293
+ } catch {
294
+ // registry not ready yet
295
+ }
285
296
  }
286
297
  return []
287
298
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-plugin-memory",
3
3
  "description": "Long-term memory plugin for DeepSeek Harness: persistent cross-session markdown memory with a soul/persona file, auto-injected at every session start, plus remember/recall/consolidate/forget workflows and portable migration tooling.",
4
- "version": "0.19.3",
4
+ "version": "0.19.4",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "lib/index.js",