memory-eternal 0.30.2 → 0.30.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://anthropic.com/claude-code/plugin.schema.json",
3
3
  "name": "memory-eternal",
4
- "version": "0.30.2",
4
+ "version": "0.30.4",
5
5
  "description": "记忆核心(Memory Eternal):对话结束后自动沉淀知识卡到本地记忆库(~/.dsh/memory-vault),支持检索 / 召回 / 审核中心。",
6
6
  "author": {
7
7
  "name": "EternalNight996",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memory-eternal",
3
- "version": "0.30.2",
3
+ "version": "0.30.4",
4
4
  "description": "记忆核心(Memory Eternal):对话结束后自动沉淀知识卡到本地记忆库(~/.dsh/memory-vault),支持检索 / 召回 / 审核中心。",
5
5
  "author": {
6
6
  "name": "EternalNight996",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memory-eternal",
3
- "version": "0.30.2",
3
+ "version": "0.30.4",
4
4
  "description": "记忆核心(Memory Eternal):对话结束后自动沉淀知识卡到本地记忆库(~/.dsh/memory-vault),支持检索 / 召回 / 审核中心。",
5
5
  "author": {
6
6
  "name": "EternalNight996",
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  [![GitHub stars](https://img.shields.io/github/stars/EternalNight996/memory-eternal?style=flat)](https://github.com/EternalNight996/memory-eternal/stargazers)
17
17
  [![npm](https://img.shields.io/npm/v/memory-eternal)](https://www.npmjs.com/package/memory-eternal)
18
- [![release](https://img.shields.io/badge/release-v0.30.2-FF7A45)](https://github.com/EternalNight996/memory-eternal/releases)
18
+ [![release](https://img.shields.io/badge/release-v0.30.4-FF7A45)](https://github.com/EternalNight996/memory-eternal/releases)
19
19
  [![license](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
20
20
 
21
21
  **English (default)** · [简体中文](README.zh-CN.md)
@@ -295,3 +295,16 @@ _Verses from 《蛊真人》(Reverend Insanity). Kept in the original Chinese
295
295
 
296
296
  <p align="right"><sub>——《蛊真人》· 大爱仙尊</sub></p>
297
297
 
298
+ ---
299
+
300
+ ## 🌟 Contributors
301
+
302
+ Thanks to everyone who helped memory-eternal get better.
303
+
304
+ | Contributor | Contribution |
305
+ | --- | --- |
306
+ | [@aloneangel45](https://github.com/aloneangel45) | Found and fixed [#54](https://github.com/EternalNight996/memory-eternal/issues/54) — `memory_recall` / `memory_note` were never registered when the `tools` service mounted late ([#58](https://github.com/EternalNight996/memory-eternal/pull/58)) |
307
+ | [@EternalNight996](https://github.com/EternalNight996) | Author and maintainer |
308
+
309
+ Have a fix worth landing? Open an issue or a pull request — accepted contributions are listed here.
310
+
package/README.zh-CN.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  [![GitHub stars](https://img.shields.io/github/stars/EternalNight996/memory-eternal?style=flat)](https://github.com/EternalNight996/memory-eternal/stargazers)
17
17
  [![npm](https://img.shields.io/npm/v/memory-eternal)](https://www.npmjs.com/package/memory-eternal)
18
- [![release](https://img.shields.io/badge/release-v0.30.2-FF7A45)](https://github.com/EternalNight996/memory-eternal/releases)
18
+ [![release](https://img.shields.io/badge/release-v0.30.4-FF7A45)](https://github.com/EternalNight996/memory-eternal/releases)
19
19
  [![license](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
20
20
 
21
21
  [English (default)](README.md) · **简体中文(镜像)**
@@ -295,3 +295,16 @@ _「大爱」二字,是全篇最大的反讽。面板左栏底部同步轮播
295
295
 
296
296
  <p align="right"><sub>——《蛊真人》· 大爱仙尊</sub></p>
297
297
 
298
+ ---
299
+
300
+ ## 🌟 贡献者
301
+
302
+ 感谢每一位让记忆核心更好用的人。
303
+
304
+ | 贡献者 | 贡献 |
305
+ | --- | --- |
306
+ | [@aloneangel45](https://github.com/aloneangel45) | 发现并修复 [#54](https://github.com/EternalNight996/memory-eternal/issues/54) —— `tools` 服务晚挂载时 `memory_recall` / `memory_note` 从未注册([#58](https://github.com/EternalNight996/memory-eternal/pull/58)) |
307
+ | [@EternalNight996](https://github.com/EternalNight996) | 作者与维护者 |
308
+
309
+ 有想落地的修复?欢迎开 issue 或 PR —— 每个被合并的贡献都会出现在这里。
310
+
@@ -2,7 +2,7 @@
2
2
  "name": "memory-eternal",
3
3
  "displayName": "Memory Atlas",
4
4
  "description": "Memory-eternal: open the local Memory Atlas library, review queue and knowledge graph in a Cursor/VS Code webview.",
5
- "version": "0.30.2",
5
+ "version": "0.30.4",
6
6
  "publisher": "EternalNight996",
7
7
  "license": "MIT",
8
8
  "repository": {
@@ -2,7 +2,7 @@
2
2
  "$schema": "urn:dsh-std:community-draft:dsh-plugin:0.15",
3
3
  "id": "memory-eternal-tui",
4
4
  "name": "memory-eternal-tui",
5
- "version": "0.30.2",
5
+ "version": "0.30.4",
6
6
  "manifestVersion": "0.15",
7
7
  "description": "Open Memory Atlas from dsh-TUI: native /audit scene plus browser launcher.",
8
8
  "facets": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memory-eternal-tui",
3
- "version": "0.30.2",
3
+ "version": "0.30.4",
4
4
  "description": "Memory Atlas for dsh-TUI: /audit scene with reason/severity, batch confirmation and reject reasons.",
5
5
  "type": "module",
6
6
  "main": "main.js",
package/index.js CHANGED
@@ -1191,8 +1191,12 @@ export function apply(ctx, config) {
1191
1191
  }
1192
1192
  }, 'memory-eternal: news digest section')
1193
1193
 
1194
- const tools = ctx.get('tools')
1195
- if (tools !== undefined) {
1194
+ // toolsRegistered 只在**真的注册成功**后置真:/config 与 /diagnostics 都读它,不能把
1195
+ // 「尝试过」当成「已注册」——注册抛错时用户看到 registered 却依然没有工具,比静默更难排查(#54)。
1196
+ // toolsAttempted 只负责挡住重复尝试(晚到回调可能被重放)。
1197
+ let toolsAttempted = false
1198
+ let toolsRegistered = false
1199
+ const registerMemoryToolsNow = (tools) => {
1196
1200
  tools.register(defineTool({
1197
1201
  name: 'memory_recall',
1198
1202
  description:
@@ -1316,6 +1320,33 @@ export function apply(ctx, config) {
1316
1320
  + '。注意:这是草稿,不会进入记忆库。'
1317
1321
  },
1318
1322
  }))
1323
+ logCapture('system', 'boot', '记忆工具已注册(memory_recall / memory_note)')
1324
+ }
1325
+
1326
+ const registerMemoryTools = (tools) => {
1327
+ if (toolsAttempted || !tools || typeof tools.register !== 'function') return
1328
+ toolsAttempted = true
1329
+ try {
1330
+ registerMemoryToolsNow(tools)
1331
+ toolsRegistered = true
1332
+ } catch (error) {
1333
+ // 晚到回调里的异常不该打断宿主;失败必须留痕,别退回静默(#54)。
1334
+ logCapture('system', 'fail', '记忆工具注册失败:' + (error?.message || error))
1335
+ }
1336
+ }
1337
+
1338
+ // tools 服务在部分宿主版本(如 DSH 0.1.7-rc.2)可能晚于插件 apply 挂载(#54):
1339
+ // 先走同步快路径,若尚未就绪则通过 ctx.inject(['tools']) 在服务就绪时补注册。
1340
+ const tools = ctx.get('tools')
1341
+ if (tools !== undefined) {
1342
+ registerMemoryTools(tools)
1343
+ } else if (typeof ctx.inject === 'function') {
1344
+ ctx.inject(['tools'], (child) => {
1345
+ const lateTools = child.get('tools')
1346
+ if (lateTools !== undefined) registerMemoryTools(lateTools)
1347
+ })
1348
+ } else {
1349
+ logCapture('system', 'warn', '未检测到 tools 服务,memory_recall / memory_note 未注册')
1319
1350
  }
1320
1351
 
1321
1352
  // 沉淀停滞探测:只有「有轮次在跑」且「管线 15 分钟一个活口都没有」才报(真死才报)。
@@ -1429,7 +1460,7 @@ export function apply(ctx, config) {
1429
1460
  name: 'deepseek-harness',
1430
1461
  label: 'DeepSeek Harness(当前宿主)',
1431
1462
  installed: true,
1432
- memoryRecallTool: !!ctx.get('tools'),
1463
+ memoryRecallTool: toolsRegistered,
1433
1464
  autoCapture: (settings.get() ?? {}).autoCapture !== false,
1434
1465
  autoRecall: (settings.get() ?? {}).autoRecall !== false,
1435
1466
  vaultDir: vaultDir(),
@@ -1538,7 +1569,7 @@ export function apply(ctx, config) {
1538
1569
  name: 'deepseek-harness',
1539
1570
  label: 'DeepSeek Harness(当前宿主)',
1540
1571
  installed: true,
1541
- memoryRecallTool: !!ctx.get('tools'),
1572
+ memoryRecallTool: toolsRegistered,
1542
1573
  autoCapture: cfg.autoCapture !== false,
1543
1574
  autoRecall: cfg.autoRecall !== false,
1544
1575
  vaultDir: vaultDir(),
@@ -1900,3 +1931,4 @@ export function apply(ctx, config) {
1900
1931
  ensureVault(root).catch((error) => console.error('[memory-eternal] ensureVault failed:', error))
1901
1932
  }, 'memory-eternal: ensure vault')
1902
1933
  }
1934
+
package/lib/api.js CHANGED
@@ -627,6 +627,7 @@ export function createApi(deps = {}) {
627
627
  vaultDir: vaultRoot,
628
628
  vaultSource: dshD && dshD.vaultSource,
629
629
  workspace: dshD && dshD.workspace,
630
+ memoryRecallTool: dshD ? !!dshD.memoryRecallTool : undefined,
630
631
  cards: countsD ? countsD.total : undefined,
631
632
  health: healthD,
632
633
  captureLog: logD,