memory-eternal 0.30.3 → 0.30.5

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.3",
4
+ "version": "0.30.5",
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.3",
3
+ "version": "0.30.5",
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.3",
3
+ "version": "0.30.5",
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.3-FF7A45)](https://github.com/EternalNight996/memory-eternal/releases)
18
+ [![release](https://img.shields.io/badge/release-v0.30.5-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)
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.3-FF7A45)](https://github.com/EternalNight996/memory-eternal/releases)
18
+ [![release](https://img.shields.io/badge/release-v0.30.5-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) · **简体中文(镜像)**
@@ -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.3",
5
+ "version": "0.30.5",
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.3",
5
+ "version": "0.30.5",
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.3",
3
+ "version": "0.30.5",
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
@@ -213,6 +213,21 @@ export function describeDistillFailure(primary, all = []) {
213
213
  return `${head}(另有 ${rest.length} 个兜底候选失败:${summary})`
214
214
  }
215
215
 
216
+ /** 蒸馏失败里属于「凭证/鉴权」的判定(issue #59:AUTH 失败时只报“蒸馏失败”,用户不知道要换 Key)。 */
217
+ export function isAuthFailure(failure) {
218
+ const text = `${(failure && failure.code) || ''} ${(failure && failure.message) || ''}`
219
+ return /AUTH|401|403|invalid[ _-]?(api[ _-]?key|token)|unauthori[sz]ed|authentication/i.test(text)
220
+ }
221
+
222
+ /** 把蒸馏失败翻成用户能直接照做的提示:凭证类失败给出续命路径,其余保持原样。 */
223
+ export function humanizeDistillFailure(failure) {
224
+ const base = `蒸馏失败(${failure && failure.provider ? failure.provider + ':' : ''}${(failure && failure.code) || ''} ${(failure && failure.message) || ''}`
225
+ if (!isAuthFailure(failure)) return base
226
+ return base +
227
+ ' —— 这是凭证/鉴权失败:请在「设置→记忆→高级」更新该 provider 的 API Key,' +
228
+ '或改用其它蒸馏模型,或关闭「蒸馏知识卡」只存原文卡(内容不会丢)'
229
+ }
230
+
216
231
  const API_PREFIX = '/memory-eternal/api'
217
232
 
218
233
  // DSH 宿主自动沉淀卡的署名:用可读名而非 agent 会话 id,便于在智能体筛选中归组。
@@ -879,7 +894,7 @@ export function apply(ctx, config) {
879
894
  })
880
895
  } catch { /* 账本失败不影响沉淀主流程 */ }
881
896
  // 真失败要亮红并进提示段:此前只有笼统的「蒸馏无输出」,真实原因(如缺凭证)完全不可见。
882
- if (failure) { health.fail(`蒸馏失败(${failure.provider}):${failure.code} ${failure.message}`); touchPrompt() }
897
+ if (failure) { health.fail(humanizeDistillFailure(failure)); touchPrompt() }
883
898
  // 主因 + 兜底候选失败汇总:卡片 reason 与 created 日志都用这个,避免把排查者引向错误方向。
884
899
  const why = failure ? describeDistillFailure(failure, failures) : '无可用产出'
885
900
  if (!result) {
@@ -1033,7 +1048,7 @@ export function apply(ctx, config) {
1033
1048
  '',
1034
1049
  '⚠ 自动沉淀异常(记忆核心 memory-eternal)——' + h.reason,
1035
1050
  '(发生时间:' + new Date(h.since).toLocaleString() + '。请在回复第一句提醒用户:自动沉淀异常 + 上述原因;'
1036
- + '并可提示用户打开 设置→记忆→用量/今日 查看「自动沉淀日志」;若原因是接口/版本不匹配,需更新 memory-eternal 插件。)',
1051
+ + '并可提示用户打开 设置→记忆→用量/今日 查看「自动沉淀日志」;若原因含 AUTH/401 等鉴权失败,请更新对应 provider 的 Key 或换模型;若明确是接口/版本不匹配,再更新 memory-eternal 插件。)',
1037
1052
  ].join('\n')
1038
1053
  disposeSection = ctx.systemPrompt.section({
1039
1054
  name: 'memory-eternal: auto-recall',