memory-eternal 0.11.0 → 0.13.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.
@@ -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.11.0",
4
+ "version": "0.13.0",
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.11.0",
3
+ "version": "0.13.0",
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.11.0",
3
+ "version": "0.13.0",
4
4
  "description": "记忆核心(Memory Eternal):对话结束后自动沉淀知识卡到本地记忆库(~/.dsh/memory-vault),支持检索 / 召回 / 审核中心。",
5
5
  "author": {
6
6
  "name": "EternalNight996",
package/README.en.md CHANGED
@@ -20,7 +20,7 @@
20
20
  <p align="center">
21
21
  <img src="https://img.shields.io/badge/DeepSeek%20Harness-plugin-3B82F6" alt="DSH plugin" />
22
22
  <img src="https://img.shields.io/npm/v/memory-eternal" alt="npm version" />
23
- <img src="https://img.shields.io/badge/release-v0.11.0-FF7A45" alt="v0.11.0" />
23
+ <img src="https://img.shields.io/badge/release-v0.13.0-FF7A45" alt="v0.13.0" />
24
24
  <a href="https://eternalnight996.github.io/memory-eternal/"><img src="https://img.shields.io/badge/Live%20Demo-online-FF7A45" alt="Live demo" /></a>
25
25
  <img src="https://img.shields.io/github/stars/EternalNight996/memory-eternal?style=flat" alt="GitHub stars" />
26
26
  <img src="https://img.shields.io/github/license/EternalNight996/memory-eternal" alt="license" />
@@ -48,6 +48,22 @@
48
48
 
49
49
  ---
50
50
 
51
+ ## 🧩 Supported platforms
52
+
53
+ | Platform / host | Memory Atlas UI | Review / approve | Knowledge graph | Entry and status |
54
+ |---|---|---|---|---|
55
+ | **DSH desktop / Web** | Fully embedded | ✅ | ✅ | Sidebar “Memory”, supported |
56
+ | **Orca** | Sidebar launcher | In Web UI | In Web UI | Right sidebar “Memory”, [new in this release](orca-plugin/README.md) |
57
+ | **dsh-tui** | Native `/audit` + `/memory` | Native scene | Native scene | [new in this release](dsh-tui-plugin/README.md) |
58
+ | **Codex** | Opens browser | In Web UI | In Web UI | [`memory-open` skill](skills/memory-open/SKILL.md), new in this release |
59
+ | **Claude Code** | Browser / Pane | In Web UI | In Web UI | `/memory-eternal:memory-open`, new in this release |
60
+ | **Cursor** | Embedded Webview | ✅ | ✅ | [Extension Webview](cursor-extension/README.md), new in this release |
61
+ | **Pure Web** | Canonical implementation | ✅ | ✅ | `http://127.0.0.1:7999/` |
62
+
63
+ > Principle: **one Web UI is the single source of truth**. Hosts that can embed use a Webview; hosts that cannot get a thin launcher only. Every entry opens the same version, so DSH and Web never drift.
64
+
65
+ ---
66
+
51
67
  ## ✨ What problem does it actually solve
52
68
 
53
69
  | What you hit | Before | After |
@@ -82,7 +98,7 @@ cd ~/.dsh/profiles/web && pnpm add memory-eternal@latest
82
98
  # right after a release, @latest can be held back by pnpm's minimum-release-age gate or a cached
83
99
  # packument (it silently stays on the old version): pin the version instead — pnpm adds it to the
84
100
  # workspace's minimumReleaseAgeExclude automatically
85
- cd ~/.dsh/profiles/web && pnpm add memory-eternal@0.11.0
101
+ cd ~/.dsh/profiles/web && pnpm add memory-eternal@0.13.0
86
102
 
87
103
  # verify the version, then restart the host
88
104
  node -e "console.log(require('memory-eternal/package.json').version)"
@@ -390,14 +406,16 @@ curl http://127.0.0.1:7999/memory-eternal/api/web-info # is the standalone we
390
406
 
391
407
  | Version | Date | Highlights |
392
408
  |---|---|---|
393
- | **v0.11.0** | 2026-10-22 | **Memory Atlas stable release**: the full V5 UI lands — 4-column library cards with daily resurface and mini connection graphs; review top type bar + queue + right verdict sidebar (no bottom bar, no popups); knowledge graph page head/cluster legend + DPR, grid and edge rendering optimizations; four runtime status cards; reader TOC and related memories; Jinwu brand icon; click-to-zoom QR codes; onboarding starts with Star/Fork; GitHub/Gitee/npm shipped together. |
394
- | **v0.11.0-rc.1** | 2026-10-21 | **V5 preview RC**: Memory Atlas dark ember theme, 228px rail and topbar; V5 card grid and page head; audit top type bar + queue + verdict preview + select-all batch approve/reject; smaller graph default; first-run guide (👍 emphasised), reader TOC/related memory, and support rail (community/sponsor/legacy/bug report); public demo updated to V5. |
409
+ | **v0.13.0** | 2026-10-23 | **Full TUI + native dsh-tui audit**: the terminal client now covers library, audit, graph, status, recycle, settings, long-form reader and search; audit gains select-all and batch approve/reject; `--live` talks to the local API (read-only by default, `--write` to mutate); a native dsh-tui `/audit` scene replaces the browser-only entry. |
410
+ | **v0.12.0** | 2026-10-22 | **Cross-host launchers**: Orca right-sidebar Memory panel, dsh-tui `/memory`, Codex / Claude `memory-open` skill, and a Cursor / VS Code Webview extension; README gains a platform support table; one Web UI stays the single source of truth — Webview where it works, a thin launcher everywhere else, with no new agent permissions. |
395
411
 
396
412
  <details>
397
413
  <summary>Older release notes (v0.10.52 and earlier · 79 releases, click to expand)</summary>
398
414
 
399
415
  | Version | Date | Highlights |
400
416
  |---|---|---|
417
+ | **v0.11.0** | 2026-10-22 | **Memory Atlas stable release**: the full V5 UI lands — 4-column library cards with daily resurface and mini connection graphs; review top type bar + queue + right verdict sidebar (no bottom bar, no popups); knowledge graph page head/cluster legend + DPR, grid and edge rendering optimizations; four runtime status cards; reader TOC and related memories; Jinwu brand icon; click-to-zoom QR codes; onboarding starts with Star/Fork; GitHub/Gitee/npm shipped together. |
418
+ | **v0.11.0-rc.1** | 2026-10-21 | **V5 preview RC**: Memory Atlas dark ember theme, 228px rail and topbar; V5 card grid and page head; audit top type bar + queue + verdict preview + select-all batch approve/reject; smaller graph default; first-run guide (👍 emphasised), reader TOC/related memory, and support rail (community/sponsor/legacy/bug report); public demo updated to V5. |
401
419
  | **v0.10.54** | 2026-10-20 | **More reliable distillation with local models (#48), plus a refreshed README with new screenshots**. ① **#48**: a local 30B model takes 40-60s to cold start while the distill timeout was **hardcoded to 45s**, so every cold start aborted; the timeout is now configurable via **captureTimeoutMs** (still 45s by default, 120000+ recommended for local inference) and **a timeout retries the same candidate once with a longer budget** instead of switching models. ② **The second shape of #48**: when the provider does not report max-tokens, a truncated answer only shows up as unterminated JSON, so a dedicated **TRUNCATED_OUTPUT** code now joins MAX_TOKENS on the "double the output budget and retry the same candidate" ladder. ③ The settings page gains a distill timeout (ms) field. ④ **README refresh**: all real screenshots (cards, a graph with 897 nodes / 4257 edges, health overview, audit centre, settings) plus a "what problem does it solve" comparison table and a clearer value proposition and star call-to-action (both languages). npm test now runs **440 checks** |
402
420
  | **v0.10.53** | 2026-10-20 | **Health panel (reliability line): all previously invisible state in one place**. A new "Health" card at the top of the usage page shows: ① **database** (journal mode, writability, last health check, with doctor guidance when bad); ② **backups** (count and age of the newest, amber past 7 days, red at zero); ③ **auto capture** (last success/failure with reason); ④ **versions** (disk / resident / host, plus a Start check button because align needs the npm registry and cannot run automatically). Data comes from existing endpoints: /overview now includes a **backups summary** (count/newestAt/last five filenames) alongside /capture-log and /align. Also **fixes a white-screen bug**: the card initially used tf(), which only exists in the ConfigPanel scope, so opening the usage page blanked the whole app; the panel checker gained two gates — **page alive (textLen<20 counts as blank)** and **Runtime.exceptionThrown capture** — because a blank page previously passed the overflow assertions. Adds tests/health-panel.test.mjs (4 checks). npm test now runs **437 checks** |
403
421
  | **v0.10.52** | 2026-10-19 | **Redaction hole in the diagnostic bundle (privacy fix; upgrade recommended)**. The 0.10.51 one-command bundle had a gap: the home directory appears in **JSON-escaped form** (C:\\Users\\x) inside doctor/align --json output and meta.json, while only the plain and forward-slash variants were replaced, so the bundle could still be grepped for the home path. All three variants (plain, forward slash, JSON escaped) now become <home>, with a test assert added for the escaped form; a freshly generated bundle on this machine verifies as **no home path and no sk- keys**. If you already generated and shared a bundle with 0.10.51, please regenerate it before sharing. npm test now runs **433 checks** |
package/README.md CHANGED
@@ -20,7 +20,7 @@
20
20
  <p align="center">
21
21
  <img src="https://img.shields.io/badge/DeepSeek%20Harness-plugin-3B82F6" alt="DSH plugin" />
22
22
  <img src="https://img.shields.io/npm/v/memory-eternal" alt="npm version" />
23
- <img src="https://img.shields.io/badge/release-v0.11.0-FF7A45" alt="v0.11.0" />
23
+ <img src="https://img.shields.io/badge/release-v0.13.0-FF7A45" alt="v0.13.0" />
24
24
  <a href="https://eternalnight996.github.io/memory-eternal/"><img src="https://img.shields.io/badge/Live%20Demo-online-FF7A45" alt="Live demo" /></a>
25
25
  <img src="https://img.shields.io/github/stars/EternalNight996/memory-eternal?style=flat" alt="GitHub stars" />
26
26
  <img src="https://img.shields.io/github/license/EternalNight996/memory-eternal" alt="license" />
@@ -48,6 +48,22 @@
48
48
 
49
49
  ---
50
50
 
51
+ ## 🧩 支持平台
52
+
53
+ | 平台 / 宿主 | Memory Atlas UI | 待审 / 批驳 | 知识星图 | 入口与状态 |
54
+ |---|---|---|---|---|
55
+ | **DSH 桌面版 / Web** | 完整内嵌 | ✅ | ✅ | 左栏「记忆」,已支持 |
56
+ | **Orca** | 侧栏启动器 | Web 内完成 | Web 内完成 | 右栏「记忆」,[本版新增](orca-plugin/README.md) |
57
+ | **dsh-tui** | 原生 `/audit` + `/memory` | 原生场景 | 原生场景 | [本版新增](dsh-tui-plugin/README.md) |
58
+ | **Codex** | 浏览器打开 | Web 内完成 | Web 内完成 | [`memory-open` skill](skills/memory-open/SKILL.md),本版新增 |
59
+ | **Claude Code** | 浏览器打开 / Pane | Web 内完成 | Web 内完成 | `/memory-eternal:memory-open`,本版新增 |
60
+ | **Cursor** | Webview 内嵌 | ✅ | ✅ | [扩展 Webview](cursor-extension/README.md),本版新增 |
61
+ | **纯 Web** | 主实现 | ✅ | ✅ | `http://127.0.0.1:7999/` |
62
+
63
+ > 原则:**一套 Web UI 作为唯一真源**;能内嵌的宿主用 Webview,不能内嵌的宿主只做轻量启动器,不复制第二套 UI。所有入口打开同一版本,避免 DSH / Web 版本漂移。
64
+
65
+ ---
66
+
51
67
  ## ✨ 它到底解决什么问题
52
68
 
53
69
  | 你遇到的 | 以前的做法 | 用了之后 |
@@ -81,7 +97,7 @@ cd ~/.dsh/profiles/web && pnpm add memory-eternal@latest
81
97
 
82
98
  # 刚发新版时 @latest 可能被 pnpm 的最小发布年龄门槛/元数据缓存挡住(静默停在旧版):
83
99
  # 直接指定版本号最快,pnpm 会自动把它加进 workspace 的 minimumReleaseAgeExclude
84
- cd ~/.dsh/profiles/web && pnpm add memory-eternal@0.11.0
100
+ cd ~/.dsh/profiles/web && pnpm add memory-eternal@0.13.0
85
101
 
86
102
  # 验版本(应等于上面装的号),然后重启对应宿主生效
87
103
  node -e "console.log(require('memory-eternal/package.json').version)"
@@ -422,14 +438,16 @@ curl http://127.0.0.1:7999/memory-eternal/api/web-info # 独立 web 是否活
422
438
 
423
439
  | 版本 | 日期 | 关键改动 |
424
440
  |---|---|---|
425
- | **v0.11.0** | 2026-10-22 | **Memory Atlas 正式版**:V5 UI 全量落地 —— 记忆库 4 列知识卡 + 今日回看 + 固定/连接微缩图;待审顶部类型条 + 队列 + 右侧判词栏(无底部栏、无弹窗);知识星图 V5 页头/连接簇图例 + DPR/网格/边渲染优化;运行状态四张状态卡;读卡器右侧目录/相关记忆;金乌品牌图标;二维码点击放大;首次引导先 Star/Fork;GitHub/Gitee/npm 三端同步。 |
426
- | **v0.11.0-rc.1** | 2026-10-21 | **V5 预览 RC**:Memory Atlas 深色余烬视觉、228px 侧栏与顶栏;记忆库 V5 卡片网格 + 页头;审核顶部类型条 + 队列 + 判词预览 + 全选批量批准/驳回;星图默认缩小;首次引导(重点 👍)、读卡器目录/相关记忆与左栏交流群/赞助/旧程序/异常反馈;公开 Demo 同步 V5。 |
441
+ | **v0.13.0** | 2026-10-23 | **完整 TUI + dsh-tui 原生审核**:终端客户端补齐记忆库、待审、星图、运行状态、回收站、设置、长文读卡器与搜索;待审支持全选/批量批驳;`--live` 直连本地 API(默认只读,`--write` 才写);新增 dsh-tui 原生 `/audit` 场景,不再只是打开浏览器。 |
442
+ | **v0.12.0** | 2026-10-22 | **跨宿主入口**:Orca 右侧栏「记忆」启动器、dsh-tui `/memory` 命令、Codex / Claude `memory-open` skill、Cursor / VS Code Webview 扩展;README 新增平台支持表;坚持一套 Web UI 唯一真源,能内嵌的用 Webview,不能内嵌的只做启动器;不新增 agent 权限。 |
427
443
 
428
444
  <details>
429
445
  <summary>更早的更新日志(v0.10.52 及以前 · 共 79 版,点开查看)</summary>
430
446
 
431
447
  | 版本 | 日期 | 关键改动 |
432
448
  |---|---|---|
449
+ | **v0.11.0** | 2026-10-22 | **Memory Atlas 正式版**:V5 UI 全量落地 —— 记忆库 4 列知识卡 + 今日回看 + 固定/连接微缩图;待审顶部类型条 + 队列 + 右侧判词栏(无底部栏、无弹窗);知识星图 V5 页头/连接簇图例 + DPR/网格/边渲染优化;运行状态四张状态卡;读卡器右侧目录/相关记忆;金乌品牌图标;二维码点击放大;首次引导先 Star/Fork;GitHub/Gitee/npm 三端同步。 |
450
+ | **v0.11.0-rc.1** | 2026-10-21 | **V5 预览 RC**:Memory Atlas 深色余烬视觉、228px 侧栏与顶栏;记忆库 V5 卡片网格 + 页头;审核顶部类型条 + 队列 + 判词预览 + 全选批量批准/驳回;星图默认缩小;首次引导(重点 👍)、读卡器目录/相关记忆与左栏交流群/赞助/旧程序/异常反馈;公开 Demo 同步 V5。 |
433
451
  | **v0.10.54** | 2026-10-20 | **本地大模型蒸馏更稳(#48)+ README 焕新与最新截图**。① **#48**:本地 30B 模型冷启动要 40–60 秒,而蒸馏超时**硬编码 45 秒** → 每次冷启动必报 ABORTED;现在超时可配 **captureTimeoutMs**(默认仍 45s,本地推理建议 120000+),且**超时后自动用更长超时重试同一候选一次**(不直接换模型)。② **#48 的第二种形态**:模型不给 max-tokens finish 时,截断只表现为「JSON 未闭合」→ 新增独立错误码 **TRUNCATED_OUTPUT**,与 MAX_TOKENS 一起走「加倍输出预算重试同一候选」的阶梯。③ 配置页新增「蒸馏超时(毫秒)」输入项。④ **README 焕新**:全部换成真实运行截图(知识卡 / 知识图谱 897 节点 4257 连线 / 健康概览 / 审核中心 / 配置页)+ 新增「它到底解决什么问题」对照表 + 更清晰的卖点与 Star 引导(中英同步)。npm test 共 **440 项** |
434
452
  | **v0.10.53** | 2026-10-20 | **健康面板(可靠性线):把看不见的状态集中一处**。在「用量/今日」顶部新增「🩺 健康概览」:① **知识库**(journal 模式 / 可写 / 最后一次体检时间,异常时给 doctor 指引);② **备份**(数量 + 最近一次多久前,>7 天标黄、0 备份标红);③ **自动沉淀**(最近一次成功/失败与原因);④ **版本**(磁盘 / 常驻 / 宿主;未检查时给「开始检查」按钮,因为 align 要联网比 npm 不能自动跑)。数据来自既有接口:/overview 新增 **backups 摘要**(count/newestAt/最近 5 个文件名),加上 /capture-log 与 /align。**顺带修一个白屏 bug**:健康卡最初误用了 ConfigPanel 作用域的 tf() → 点开「用量/今日」整页白屏;同时给 panel-check 补了两道闸 —— **页面存活(textLen<20 判空白页)** 与 **Runtime.exceptionThrown 捕获**,因为「白屏没有横向溢出」原本会让检查通过。新增 tests/health-panel.test.mjs(4 项)。npm test 共 **437 项** |
435
453
  | **v0.10.52** | 2026-10-19 | **诊断包脱敏补漏(隐私修复,建议尽快升级)**。0.10.51 的「一键诊断包」有个漏点:doctor/align --json 与 meta.json 里的家目录是 **JSON 转义形态**(C:\\Users\\x),而我只替换了原样/正斜杠两种写法 → 包里仍能 grep 到家目录明文。现在三种写法(原样、正斜杠、JSON 转义)都替换成 <home>,并在测试里加了一条「JSON 转义形态不能漏」的断言;本机重新生成诊断包实测:**无家目录明文、无 sk- 密钥**。**如果你已经用 0.10.51 生成过诊断包并分享出去,建议重新生成一次再分享。** npm test 共 **433 项** |
@@ -0,0 +1,41 @@
1
+ # Cursor / VS Code extension — Memory Atlas
2
+
3
+ 在 Cursor / VS Code 左侧 Activity Bar 添加「Memory Atlas」,用 Webview 加载同一套 Memory Atlas Web UI。
4
+
5
+ ## 安装
6
+
7
+ 1. 安装依赖并打包扩展:
8
+
9
+ ```bash
10
+ cd cursor-extension
11
+ npx @vscode/vsce package
12
+ ```
13
+
14
+ 2. Cursor / VS Code:
15
+
16
+ ```text
17
+ Extensions → ... → Install from VSIX
18
+ ```
19
+
20
+ 或开发模式:
21
+
22
+ ```bash
23
+ code --extensionDevelopmentPath=.
24
+ ```
25
+
26
+ ## 使用
27
+
28
+ - 左侧 Activity Bar 出现 Memory Atlas 图标
29
+ - 面板内 iframe 加载 `http://127.0.0.1:7999/?embed=1`
30
+ - 命令面板:`Memory Atlas: Open`
31
+
32
+ ## 前提
33
+
34
+ - `memory-eternal` 的本地 Web 服务在 `127.0.0.1:7999` 运行
35
+ - 启动命令:`dsh-memory open`
36
+
37
+ ## 说明
38
+
39
+ - 这是真正的 Webview 内嵌,不是外部浏览器跳转
40
+ - 与 DSH/Web 共用同一份 `web/app.js`,版本一致
41
+ - 不新增 agent 权限;审批仍在 Web UI 由人完成
@@ -0,0 +1,58 @@
1
+ 'use strict'
2
+
3
+ const vscode = require('vscode')
4
+
5
+ const URL = 'http://127.0.0.1:7999/?embed=1'
6
+
7
+ function frameHtml(webview) {
8
+ const csp = [
9
+ "default-src 'none'",
10
+ 'frame-src http://127.0.0.1:7999',
11
+ `style-src ${webview.cspSource} 'unsafe-inline'`,
12
+ `font-src ${webview.cspSource}`,
13
+ ].join('; ')
14
+ return `<!doctype html>
15
+ <html lang="zh-CN">
16
+ <head>
17
+ <meta charset="utf-8">
18
+ <meta http-equiv="Content-Security-Policy" content="${csp}">
19
+ <meta name="viewport" content="width=device-width, initial-scale=1">
20
+ <style>
21
+ html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #1e2228; }
22
+ iframe { width: 100%; height: 100%; border: 0; display: block; background: #1e2228; }
23
+ </style>
24
+ </head>
25
+ <body><iframe src="${URL}" title="Memory Atlas"></iframe></body>
26
+ </html>`
27
+ }
28
+
29
+ class MemoryAtlasViewProvider {
30
+ resolveWebviewView(view) {
31
+ view.webview.options = { enableScripts: true }
32
+ view.webview.html = frameHtml(view.webview)
33
+ }
34
+ }
35
+
36
+ function activate(context) {
37
+ context.subscriptions.push(
38
+ vscode.window.registerWebviewViewProvider('memory-eternal.view', new MemoryAtlasViewProvider(), {
39
+ webviewOptions: { retainContextWhenHidden: true },
40
+ }),
41
+ )
42
+
43
+ context.subscriptions.push(
44
+ vscode.commands.registerCommand('memory-eternal.open', () => {
45
+ const panel = vscode.window.createWebviewPanel(
46
+ 'memory-eternal.panel',
47
+ 'Memory Atlas',
48
+ vscode.ViewColumn.One,
49
+ { enableScripts: true, retainContextWhenHidden: true },
50
+ )
51
+ panel.webview.html = frameHtml(panel.webview)
52
+ }),
53
+ )
54
+ }
55
+
56
+ function deactivate() {}
57
+
58
+ module.exports = { activate, deactivate }
Binary file
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "memory-eternal",
3
+ "displayName": "Memory Atlas",
4
+ "description": "Memory-eternal: open the local Memory Atlas library, review queue and knowledge graph in a Cursor/VS Code webview.",
5
+ "version": "0.13.0",
6
+ "publisher": "EternalNight996",
7
+ "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/EternalNight996/memory-eternal"
11
+ },
12
+ "engines": {
13
+ "vscode": "^1.80.0"
14
+ },
15
+ "categories": [
16
+ "Other"
17
+ ],
18
+ "activationEvents": [
19
+ "onView:memory-eternal.view",
20
+ "onCommand:memory-eternal.open"
21
+ ],
22
+ "main": "./extension.js",
23
+ "contributes": {
24
+ "viewsContainers": {
25
+ "activitybar": [
26
+ {
27
+ "id": "memory-eternal",
28
+ "title": "Memory Atlas",
29
+ "icon": "icon.png"
30
+ }
31
+ ]
32
+ },
33
+ "views": {
34
+ "memory-eternal": [
35
+ {
36
+ "id": "memory-eternal.view",
37
+ "name": "记忆",
38
+ "type": "webview"
39
+ }
40
+ ]
41
+ },
42
+ "commands": [
43
+ {
44
+ "command": "memory-eternal.open",
45
+ "title": "Memory Atlas: Open"
46
+ }
47
+ ]
48
+ },
49
+ "files": [
50
+ "extension.js",
51
+ "icon.png",
52
+ "README.md"
53
+ ]
54
+ }
@@ -0,0 +1,119 @@
1
+ # dsh-TUI plugin — `/memory`
2
+
3
+ 在 dsh-TUI 里增加一个用户命令:
4
+
5
+ ```text
6
+ /memory
7
+ ```
8
+
9
+ 执行后确保 `memory-eternal` 的本地 Web 服务存活,并打开同一套 Memory Atlas Web UI。
10
+
11
+ 另一个命令:
12
+
13
+ ```text
14
+ /audit
15
+ ```
16
+
17
+ 在 dsh-tui 内直接打开**原生审核场景**:读取真实待审队列、`s` 全选、`a` 批准、`r` 驳回、`Esc` 退出。它不打开浏览器,也不复制 Web UI。
18
+
19
+ ## 先看效果(不需要 dsh-tui)
20
+
21
+ 完整 TUI 原型:
22
+
23
+ ```bash
24
+ node dsh-tui-plugin/demo.mjs
25
+ ```
26
+
27
+ 包含:
28
+
29
+ - `1` 记忆库:搜索、类型、今日回看、读卡
30
+ - `2` 待审:类型、全选、批量批准/驳回、判词
31
+ - `3` 知识星图:连接簇、相关卡
32
+ - `4` 运行状态:知识库/备份/沉淀日志
33
+ - `5` 回收站:恢复、彻底删除
34
+ - `6` 设置:开关、主题
35
+ - `Enter` 读卡器
36
+ - `/` 搜索
37
+ - `?` 帮助
38
+
39
+ 静态预览单页:
40
+
41
+ ```bash
42
+ node dsh-tui-plugin/demo.mjs --once --no-color
43
+ node dsh-tui-plugin/demo.mjs --once --no-color --screen=library
44
+ node dsh-tui-plugin/demo.mjs --once --no-color --screen=settings
45
+ node dsh-tui-plugin/demo.mjs --once --no-color --screen=audit --select-all
46
+ node dsh-tui-plugin/demo.mjs --once --no-color --screen=reader
47
+ node dsh-tui-plugin/demo.mjs --once --no-color --screen=reader --scroll=60
48
+ ```
49
+
50
+ 按键:
51
+
52
+ - `1–6` 切换页面
53
+ - `Tab` 循环页面
54
+ - `↑↓` / `j k` 移动
55
+ - `←→` / `t` 切换类型
56
+ - `Enter` 读卡 / 切换设置
57
+ - `L` 直接打开长文读卡器;`j/k` 滚动,`PgUp/PgDn` 翻页,`g/G` 首尾
58
+
59
+ 实时数据模式:
60
+
61
+ ```bash
62
+ # 只读:读取真实待审卡和正文
63
+ node dsh-tui-plugin/demo.mjs --live
64
+
65
+ # 写入:允许真实批准 / 驳回,谨慎使用
66
+ node dsh-tui-plugin/demo.mjs --live --write
67
+ ```
68
+
69
+ 实时模式默认走 `http://127.0.0.1:7999/memory-eternal/api`,可用
70
+ `MEMORY_ETERNAL_API` 覆盖。API 不可用时自动回退到示例数据。
71
+ - `Space` 多选 / 切换设置
72
+ - `s` 或 `Ctrl+A` 全选 / 反选
73
+ - `a` 批准,`r` 驳回
74
+ - 回收站:`r` 恢复,`d` 彻底删除
75
+ - `/` 搜索,`Esc` 返回 / 清空
76
+ - `?` 帮助,`q` 退出
77
+
78
+ 每个页面的底部快捷键会随当前页面更新,例如待审页显示全选/批驳,设置页显示切换,回收站显示恢复/删除。
79
+
80
+ `demo-audit.mjs` 保留为纯审核页备份。
81
+
82
+ ## 安装
83
+
84
+ 在 `memory-eternal` 仓库根目录:
85
+
86
+ ```bash
87
+ # 本地 profile(推荐先用这个验证)
88
+ dsh plugin --profile dsh-tui add ./dsh-tui-plugin
89
+ ```
90
+
91
+ 或手动:
92
+
93
+ 1. 把本目录复制到 dsh-TUI profile 的 node_modules;
94
+ 2. 在 profile 的 `cordis.patch.yml` 中加入:
95
+
96
+ ```yaml
97
+ - insert:
98
+ - id: memory-eternal-tui
99
+ name: 'memory-eternal-tui'
100
+ ```
101
+
102
+ 3. 重启 dsh-TUI。
103
+
104
+ ## 使用
105
+
106
+ ```text
107
+ /memory
108
+ ```
109
+
110
+ - 优先执行 `dsh-memory open`(确保 7999 存活 + 打开浏览器)
111
+ - 找不到 CLI 时直接打开 `http://127.0.0.1:7999/`
112
+ - 不会在 TUI 内嵌 WebView,也不复制第二套 UI
113
+ - 审批仍在 Web 里由人完成,不新增 agent 工具
114
+
115
+ ## 要求
116
+
117
+ - `memory-eternal` 已安装在当前机器
118
+ - 终端能执行 `dsh-memory`(否则走 URL 兜底)
119
+ - dsh-TUI >= 0.9.0(commands seam)
@@ -0,0 +1,3 @@
1
+ - insert:
2
+ - id: memory-eternal-tui
3
+ name: 'memory-eternal-tui'