memory-eternal 0.30.4 → 0.31.0
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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/README.md +17 -1
- package/README.zh-CN.md +17 -1
- package/cursor-extension/package.json +1 -1
- package/dsh-tui-plugin/dsh-plugin.json +1 -1
- package/dsh-tui-plugin/package.json +1 -1
- package/index.js +20 -3
- package/lib/api.js +1 -1
- package/lib/client.js +1006 -21
- package/lib/web.js +2 -1
- package/orca-plugin/orca-plugin.json +1 -1
- package/package.json +2 -2
- package/web/app.js +1013 -28
- package/web/index.html +2 -1
|
@@ -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.
|
|
4
|
+
"version": "0.31.0",
|
|
5
5
|
"description": "记忆核心(Memory Eternal):对话结束后自动沉淀知识卡到本地记忆库(~/.dsh/memory-vault),支持检索 / 召回 / 审核中心。",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "EternalNight996",
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
[](https://github.com/EternalNight996/memory-eternal/stargazers)
|
|
17
17
|
[](https://www.npmjs.com/package/memory-eternal)
|
|
18
|
-
[](https://github.com/EternalNight996/memory-eternal/releases)
|
|
19
19
|
[](LICENSE)
|
|
20
20
|
|
|
21
21
|
**English (default)** · [简体中文](README.zh-CN.md)
|
|
@@ -227,6 +227,22 @@ Not everything should be injected into every session. Core memory is the small,
|
|
|
227
227
|
| **Terminal** | <code>dsh-memory tui</code> — live queue, select-all, batch approve/reject, long-form reader |
|
|
228
228
|
| **Browser** | <code>dsh-memory open</code> → http://127.0.0.1:7999 |
|
|
229
229
|
|
|
230
|
+
## 🎨 Skins
|
|
231
|
+
|
|
232
|
+
Five skins, switch in Settings → General → Theme with one click. The choice is saved locally and survives reloads.
|
|
233
|
+
|
|
234
|
+
<p align="center">
|
|
235
|
+
<img src="assets/screen/skins-gallery.png" width="900" alt="Five themes: Default, Pop, Light, Resident Evil and Spider-Man" />
|
|
236
|
+
</p>
|
|
237
|
+
|
|
238
|
+
| Skin | Style |
|
|
239
|
+
| --- | --- |
|
|
240
|
+
| **Default** | Dark base + amber accent, easy on the eyes |
|
|
241
|
+
| **Pop** | Yellow paper, black frames, hard shadows and halftone |
|
|
242
|
+
| **Light** | Warm paper + serif headings for daytime |
|
|
243
|
+
| **Resident Evil** | Umbrella lab, toxic-green scanlines, B.O.W. banner and claw |
|
|
244
|
+
| **Spider-Man** | Red/blue comic, webs, halftone, wide action banner and hanging charm |
|
|
245
|
+
|
|
230
246
|
## 📸 Screenshots
|
|
231
247
|
|
|
232
248
|
<p align="center">
|
package/README.zh-CN.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
[](https://github.com/EternalNight996/memory-eternal/stargazers)
|
|
17
17
|
[](https://www.npmjs.com/package/memory-eternal)
|
|
18
|
-
[](https://github.com/EternalNight996/memory-eternal/releases)
|
|
19
19
|
[](LICENSE)
|
|
20
20
|
|
|
21
21
|
[English (default)](README.md) · **简体中文(镜像)**
|
|
@@ -227,6 +227,22 @@ dsh-memory ledger --days 30 --json # 召回注入 / 沉淀调用 / 有用
|
|
|
227
227
|
| **终端** | <code>dsh-memory tui</code> —— 实时队列、全选、批量批/驳、长文读卡 |
|
|
228
228
|
| **浏览器** | <code>dsh-memory open</code> → http://127.0.0.1:7999 |
|
|
229
229
|
|
|
230
|
+
## 🎨 皮肤 / Skins
|
|
231
|
+
|
|
232
|
+
五套皮肤,设置 → 通用 → 主题皮肤一键切换;选择会本地保存,刷新后保持。
|
|
233
|
+
|
|
234
|
+
<p align="center">
|
|
235
|
+
<img src="assets/screen/skins-gallery.png" width="900" alt="五种主题皮肤:默认暗色、波普、明亮、生化危机、蜘蛛侠" />
|
|
236
|
+
</p>
|
|
237
|
+
|
|
238
|
+
| 皮肤 | 风格 |
|
|
239
|
+
| --- | --- |
|
|
240
|
+
| **默认暗色** | 深色底 + 琥珀强调,长时间阅读不刺眼 |
|
|
241
|
+
| **波普 Pop** | 黄底黑框、硬阴影、半调与粗黑标题 |
|
|
242
|
+
| **明亮 Light** | 暖纸面 + 衬线标题,适合白天 |
|
|
243
|
+
| **生化危机** | Umbrella 实验室、毒绿扫描线、B.O.W. 头图与巨爪 |
|
|
244
|
+
| **蜘蛛侠** | 红蓝漫画、蛛网、半调、横版动作头图与悬吊挂件 |
|
|
245
|
+
|
|
230
246
|
## 📸 截图
|
|
231
247
|
|
|
232
248
|
<p align="center">
|
|
@@ -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.
|
|
5
|
+
"version": "0.31.0",
|
|
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.
|
|
5
|
+
"version": "0.31.0",
|
|
6
6
|
"manifestVersion": "0.15",
|
|
7
7
|
"description": "Open Memory Atlas from dsh-TUI: native /audit scene plus browser launcher.",
|
|
8
8
|
"facets": {
|
package/index.js
CHANGED
|
@@ -73,6 +73,8 @@ export const Config = z.object({
|
|
|
73
73
|
skillCardsAutoSync: z.boolean().default(true),
|
|
74
74
|
// 记忆界面整体布局大小:compact / normal / large(只影响 UI,不影响召回)
|
|
75
75
|
uiScale: z.union([z.const('compact'), z.const('normal'), z.const('large')]).default('normal'),
|
|
76
|
+
// 主题皮肤:一键切换整个记忆界面(含设置页)。新增皮肤时在这里登记 id,并在 src/client 的 CSS 里加 [data-skin="id"] 块。
|
|
77
|
+
theme: z.union([z.const('default'), z.const('pop'), z.const('light'), z.const('resident'), z.const('spider')]).default('default'),
|
|
76
78
|
vaultDir: z.string().default(''),
|
|
77
79
|
dedupThreshold: z.number().min(0).max(1).default(0.62),
|
|
78
80
|
captureMinChars: z.number().default(200),
|
|
@@ -213,6 +215,21 @@ export function describeDistillFailure(primary, all = []) {
|
|
|
213
215
|
return `${head}(另有 ${rest.length} 个兜底候选失败:${summary})`
|
|
214
216
|
}
|
|
215
217
|
|
|
218
|
+
/** 蒸馏失败里属于「凭证/鉴权」的判定(issue #59:AUTH 失败时只报“蒸馏失败”,用户不知道要换 Key)。 */
|
|
219
|
+
export function isAuthFailure(failure) {
|
|
220
|
+
const text = `${(failure && failure.code) || ''} ${(failure && failure.message) || ''}`
|
|
221
|
+
return /AUTH|401|403|invalid[ _-]?(api[ _-]?key|token)|unauthori[sz]ed|authentication/i.test(text)
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/** 把蒸馏失败翻成用户能直接照做的提示:凭证类失败给出续命路径,其余保持原样。 */
|
|
225
|
+
export function humanizeDistillFailure(failure) {
|
|
226
|
+
const base = `蒸馏失败(${failure && failure.provider ? failure.provider + ':' : ''}${(failure && failure.code) || ''} ${(failure && failure.message) || ''}`
|
|
227
|
+
if (!isAuthFailure(failure)) return base
|
|
228
|
+
return base +
|
|
229
|
+
' —— 这是凭证/鉴权失败:请在「设置→记忆→高级」更新该 provider 的 API Key,' +
|
|
230
|
+
'或改用其它蒸馏模型,或关闭「蒸馏知识卡」只存原文卡(内容不会丢)'
|
|
231
|
+
}
|
|
232
|
+
|
|
216
233
|
const API_PREFIX = '/memory-eternal/api'
|
|
217
234
|
|
|
218
235
|
// DSH 宿主自动沉淀卡的署名:用可读名而非 agent 会话 id,便于在智能体筛选中归组。
|
|
@@ -879,7 +896,7 @@ export function apply(ctx, config) {
|
|
|
879
896
|
})
|
|
880
897
|
} catch { /* 账本失败不影响沉淀主流程 */ }
|
|
881
898
|
// 真失败要亮红并进提示段:此前只有笼统的「蒸馏无输出」,真实原因(如缺凭证)完全不可见。
|
|
882
|
-
if (failure) { health.fail(
|
|
899
|
+
if (failure) { health.fail(humanizeDistillFailure(failure)); touchPrompt() }
|
|
883
900
|
// 主因 + 兜底候选失败汇总:卡片 reason 与 created 日志都用这个,避免把排查者引向错误方向。
|
|
884
901
|
const why = failure ? describeDistillFailure(failure, failures) : '无可用产出'
|
|
885
902
|
if (!result) {
|
|
@@ -1033,7 +1050,7 @@ export function apply(ctx, config) {
|
|
|
1033
1050
|
'',
|
|
1034
1051
|
'⚠ 自动沉淀异常(记忆核心 memory-eternal)——' + h.reason,
|
|
1035
1052
|
'(发生时间:' + new Date(h.since).toLocaleString() + '。请在回复第一句提醒用户:自动沉淀异常 + 上述原因;'
|
|
1036
|
-
+ '并可提示用户打开 设置→记忆→用量/今日
|
|
1053
|
+
+ '并可提示用户打开 设置→记忆→用量/今日 查看「自动沉淀日志」;若原因含 AUTH/401 等鉴权失败,请更新对应 provider 的 Key 或换模型;若明确是接口/版本不匹配,再更新 memory-eternal 插件。)',
|
|
1037
1054
|
].join('\n')
|
|
1038
1055
|
disposeSection = ctx.systemPrompt.section({
|
|
1039
1056
|
name: 'memory-eternal: auto-recall',
|
|
@@ -1539,7 +1556,7 @@ export function apply(ctx, config) {
|
|
|
1539
1556
|
const cfg = settings.get() ?? {}
|
|
1540
1557
|
// 只暴露可安全展示/回填的字段
|
|
1541
1558
|
const safe = {
|
|
1542
|
-
autoCapture: cfg.autoCapture, autoRecall: cfg.autoRecall, coreMemoryEnabled: cfg.coreMemoryEnabled, workingMemoryEnabled: cfg.workingMemoryEnabled, coreMemoryLimit: cfg.coreMemoryLimit, coreMemoryMaxChars: cfg.coreMemoryMaxChars, uiScale: cfg.uiScale, recallLimit: cfg.recallLimit, recallSummaryLen: cfg.recallSummaryLen, recallIncludeBody: cfg.recallIncludeBody, secretHint: cfg.secretHint || '',
|
|
1559
|
+
autoCapture: cfg.autoCapture, autoRecall: cfg.autoRecall, coreMemoryEnabled: cfg.coreMemoryEnabled, workingMemoryEnabled: cfg.workingMemoryEnabled, coreMemoryLimit: cfg.coreMemoryLimit, coreMemoryMaxChars: cfg.coreMemoryMaxChars, uiScale: cfg.uiScale, theme: cfg.theme, recallLimit: cfg.recallLimit, recallSummaryLen: cfg.recallSummaryLen, recallIncludeBody: cfg.recallIncludeBody, secretHint: cfg.secretHint || '',
|
|
1543
1560
|
captureMinChars: cfg.captureMinChars, captureCooldownMs: cfg.captureCooldownMs, dedupThreshold: cfg.dedupThreshold, maxCardsPerDay: cfg.maxCardsPerDay,
|
|
1544
1561
|
distillEnabled: cfg.distillEnabled, dedupByLLM: cfg.dedupByLLM, captureMaxTokens: cfg.captureMaxTokens, recallMinScore: cfg.recallMinScore,
|
|
1545
1562
|
autoWeb: cfg.autoWeb, autoWebMode: cfg.autoWebMode, webPort: cfg.webPort, webCheckIntervalMs: cfg.webCheckIntervalMs, webMaxRestart: cfg.webMaxRestart, watchdogAutoSpawn: cfg.watchdogAutoSpawn, autoRestartOnDrift: cfg.autoRestartOnDrift, autoMcpSetup: cfg.autoMcpSetup,
|
package/lib/api.js
CHANGED
|
@@ -1429,7 +1429,7 @@ export function createApi(deps = {}) {
|
|
|
1429
1429
|
const cfg = getSettings() ?? {}
|
|
1430
1430
|
const env = typeof process !== 'undefined' ? process.env : {}
|
|
1431
1431
|
const safe = {
|
|
1432
|
-
autoCapture: cfg.autoCapture ?? true, autoRecall: cfg.autoRecall ?? true, coreMemoryEnabled: cfg.coreMemoryEnabled ?? true, workingMemoryEnabled: cfg.workingMemoryEnabled ?? true, coreMemoryLimit: cfg.coreMemoryLimit ?? 6, coreMemoryMaxChars: cfg.coreMemoryMaxChars ?? 2000, uiScale: cfg.uiScale || 'normal', recallLimit: cfg.recallLimit ?? 5, recallSummaryLen: cfg.recallSummaryLen ?? 130, recallIncludeBody: cfg.recallIncludeBody ?? false, secretHint: cfg.secretHint || '',
|
|
1432
|
+
autoCapture: cfg.autoCapture ?? true, autoRecall: cfg.autoRecall ?? true, coreMemoryEnabled: cfg.coreMemoryEnabled ?? true, workingMemoryEnabled: cfg.workingMemoryEnabled ?? true, coreMemoryLimit: cfg.coreMemoryLimit ?? 6, coreMemoryMaxChars: cfg.coreMemoryMaxChars ?? 2000, uiScale: cfg.uiScale || 'normal', theme: cfg.theme || 'default', recallLimit: cfg.recallLimit ?? 5, recallSummaryLen: cfg.recallSummaryLen ?? 130, recallIncludeBody: cfg.recallIncludeBody ?? false, secretHint: cfg.secretHint || '',
|
|
1433
1433
|
captureMinChars: cfg.captureMinChars ?? 200, captureCooldownMs: cfg.captureCooldownMs ?? 300000, dedupThreshold: cfg.dedupThreshold ?? 0.62, maxCardsPerDay: cfg.maxCardsPerDay ?? 60,
|
|
1434
1434
|
distillEnabled: cfg.distillEnabled ?? true, dedupByLLM: cfg.dedupByLLM ?? true, captureMaxTokens: cfg.captureMaxTokens ?? DEFAULT_CAPTURE_MAX_TOKENS, recallMinScore: cfg.recallMinScore ?? 2,
|
|
1435
1435
|
autoWeb: cfg.autoWeb ?? env.MEMORY_AUTO_WEB !== '0', autoWebMode: cfg.autoWebMode || 'init', webPort: Number(cfg.webPort) || Number(env.MEMORY_WEB_PORT) || 7999, webCheckIntervalMs: Number(cfg.webCheckIntervalMs) || 5000, webMaxRestart: Number(cfg.webMaxRestart) || 10, watchdogAutoSpawn: cfg.watchdogAutoSpawn ?? env.MEMORY_WATCHDOG === '1', autoRestartOnDrift: cfg.autoRestartOnDrift ?? true, autoMcpSetup: cfg.autoMcpSetup ?? false,
|