dsh-plugin-memory 0.18.2 → 0.18.3

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,12 @@
2
2
 
3
3
  所有记录跟随 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/) 风格;版本号与 `package.json` 保持一致。
4
4
 
5
+ ## [0.18.3] - 2026-11-10
6
+
7
+ ### Fixed
8
+
9
+ - **双击节点提示 `no-session`**:设置面板里的图谱没有 session id,而 `/api/memory/session` 在追踪器未记录"说过话的会话"时(例如刚刷新页面还没发消息)返回 no-session。现在无 sessionId 时兜底取第一个已挂载会话(优先带工作区 cwd 的),侧栏打开就能解析出 `session/<id>/<path>` 地址。
10
+
5
11
  ## [0.18.2] - 2026-11-10
6
12
 
7
13
  ### Fixed
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "versions": [
28
28
  {
29
- "version": "0.18.1",
30
- "publishTimestamp": 1794275944,
29
+ "version": "0.18.2",
30
+ "publishTimestamp": 1794276764,
31
31
  "source": {
32
32
  "type": "npm"
33
33
  },
package/lib/index.js CHANGED
@@ -775,15 +775,22 @@ export function apply(ctx, config = {}) {
775
775
  const url = new URL(req.url ?? '/', 'http://localhost')
776
776
  const resolveAgent = (sessionId) => {
777
777
  const id = typeof sessionId === 'string' && sessionId.length > 0 ? sessionId : tracker.activeId()
778
- if (id === undefined) return undefined
779
- const direct = ctx.agents.get?.(id)
780
- if (direct !== undefined) return direct
781
- // Some hosts key the registry differently from the session id the
782
- // client sends; scanning the roots keeps the chip working either way.
783
- const roots = typeof ctx.agents.roots === 'function' ? ctx.agents.roots() : []
784
- return roots.find((agent) => agent.id === id
785
- || agent.session?.header?.id === id
786
- || agent.session?.id === id)
778
+ const roots = typeof ctx.agents?.roots === 'function' ? ctx.agents.roots() : []
779
+ if (id !== undefined) {
780
+ const direct = ctx.agents.get?.(id)
781
+ if (direct !== undefined) return direct
782
+ // Some hosts key the registry differently from the session id the
783
+ // client sends; scanning the roots keeps the chip working either way.
784
+ return roots.find((agent) => agent.id === id
785
+ || agent.session?.header?.id === id
786
+ || agent.session?.id === id)
787
+ }
788
+ // 0.18.3: the Settings panel has no session id, and the tracker only
789
+ // knows sessions that have spoken. Fall back to a mounted session
790
+ // (preferring one with a workspace) so graph/sidebar actions can
791
+ // still resolve a workspace while the user is in Settings.
792
+ return roots.find((agent) => typeof agent.session?.header?.cwd === 'string' && agent.session.header.cwd.length > 0)
793
+ ?? roots[0]
787
794
  }
788
795
  const sendJson = (status, payload) => {
789
796
  res.writeHead(status, { 'content-type': 'application/json; charset=utf-8' })
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.18.2",
4
+ "version": "0.18.3",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "lib/index.js",