dsh-hypatia-auto-memory 1.1.0 → 1.1.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/README.md CHANGED
@@ -101,7 +101,7 @@ collect fiber dispose ──▶ the same flush for every session still open, per
101
101
  before the queue stops; the model call finishes at the next start
102
102
  (a restart, a config-change restart, or a crash: the startup
103
103
  consolidation backfill)
104
- agent/session-start ──▶ rules/taboos inject()
104
+ agent/created ──▶ rules/taboos inject()
105
105
  ```
106
106
 
107
107
  - **Transport** is a private `hypatia mcp` process: JSON-RPC over stdio on the
package/README.zh-CN.md CHANGED
@@ -87,7 +87,7 @@ session/disposed ──▶ final flush + consolidation, thresholds waived (DSH
87
87
  collect fiber 拆除 ──▶ 对每个仍打开的会话做同样的收尾,并在队列停止前落盘;模型
88
88
  调用留到下次启动完成(重启、配置变更重启,或崩溃:启动时的
89
89
  consolidation backfill)
90
- agent/session-start ──▶ rules/taboos inject()
90
+ agent/created ──▶ rules/taboos inject()
91
91
  ```
92
92
 
93
93
  - **传输**是一个私有的 `hypatia mcp` 进程:在 subprocess service 上通过 stdio 走
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-hypatia-auto-memory",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Event-driven Hypatia memory for DSH: automatic conversation logging via session events, queued background consolidation (span summaries + work-unit extraction) with a dedicated model route, and recall injection — zero per-call model work in the main session.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -62,6 +62,8 @@
62
62
  },
63
63
  "devDependencies": {
64
64
  "@deepseek-ai/cordis": "^4.0.2",
65
+ "@deepseek-ai/cordis-plugin-loader": "^1.0.5",
66
+ "@deepseek-ai/dsh-agent": "^0.1.7-rc.1",
65
67
  "@deepseek-ai/dsh-api-remotes": "^0.1.7-rc.1",
66
68
  "@deepseek-ai/dsh-api-session-controller": "^0.1.7-rc.1",
67
69
  "@deepseek-ai/dsh-client-locale": "^0.1.7-rc.1",
@@ -73,7 +75,10 @@
73
75
  "@deepseek-ai/dsh-client-ui-settings-plugins": "^0.1.7-rc.1",
74
76
  "@deepseek-ai/dsh-client-ui-slots": "^0.1.7-rc.1",
75
77
  "@deepseek-ai/dsh-llm": "^0.1.7-rc.1",
78
+ "@deepseek-ai/dsh-session": "^0.1.7-rc.1",
76
79
  "@deepseek-ai/dsh-storage-domain": "^0.1.7-rc.1",
80
+ "@deepseek-ai/dsh-tools": "^0.1.7-rc.1",
81
+ "@deepseek-ai/dsh-user-approval": "^0.1.7-rc.1",
77
82
  "@types/react": "^18.2.0",
78
83
  "lightningcss": "^1.32.0",
79
84
  "react": "^18.2.0",
package/src/recall.js CHANGED
@@ -136,13 +136,24 @@ export function createRecall({ ctx, cli, shelf = DEFAULT_SHELF, getConfig, statu
136
136
  }))
137
137
  }
138
138
 
139
- ctx.on('agent/session-start', (payload) => {
139
+ function preload(agent) {
140
140
  const config = getConfig()
141
141
  if (config.enabled === false || config.recall.enabled === false) return
142
- void preloadRulesAndTaboos(payload.agent).catch((error) => {
142
+ void preloadRulesAndTaboos(agent).catch((error) => {
143
143
  status.warn(`rules preload failed: ${String(error)}`)
144
144
  })
145
- })
145
+ }
146
+
147
+ // dsh renamed this event: it emitted `agent/session-start` up to v0.1.5, and
148
+ // `agent/created` from v0.1.6 on. The plugin supports >=0.1.7 only, so the old
149
+ // name never fires — and `ctx.on` accepts any string, so subscribing to a name
150
+ // dsh no longer emits fails silently. `test/events.type-check.ts` pins every
151
+ // event this plugin subscribes to against cordis's `Events` interface.
152
+ ctx.on('agent/created', ({ agent }) => { preload(agent) })
153
+
154
+ // An agent created before this fiber attached never emits again. Upstream
155
+ // plugins cover that window the same way, by seeding the live registry once.
156
+ for (const agent of (ctx.agents?.list?.() ?? [])) preload(agent)
146
157
 
147
158
  return { preloadRulesAndTaboos }
148
159
  }