memory-eternal 0.9.13 → 0.9.14
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.en.md +1 -0
- package/README.md +1 -0
- package/lib/client.js +17 -17
- package/lib/minhash.js +99 -0
- package/lib/vault.js +122 -27
- package/package.json +2 -2
- package/web/app.js +19 -19
|
@@ -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.9.
|
|
4
|
+
"version": "0.9.14",
|
|
5
5
|
"description": "璁板繂鏍稿績锛圡emory Eternal锛夛細鐭ヨ瘑鍗¤嚜鍔ㄦ矇娣€/鍙洖锛岀粺涓€ ~/.dsh/memory-vault锛屼細璇濈粨鏉熻嚜鍔ㄥ叆搴撹繘寰呭鏍搞€?,
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "EternalNight996",
|
package/README.en.md
CHANGED
|
@@ -312,6 +312,7 @@ Diagnostics:
|
|
|
312
312
|
|
|
313
313
|
| Version | Date | Highlights |
|
|
314
314
|
|---|---|---|
|
|
315
|
+
| **v0.9.14** | 2026-09-28 | **Deep graph optimisation, algorithm and rendering (P0-1 / P0-3 / P1-1 / P1-2 / P1-3 / P2-2).** Server: ① **on-disk graph cache** keyed by fingerprint (measured **422ms → 11ms** at 596 cards); ② **hashed bigrams** (`Set<number>` instead of `Set<string>`; capture de-duplication keeps the string version, so semantics are unchanged) plus a **counting sort** for the rare-gram index (202 → **54ms**); ③ **MinHash + LSH** candidate generation (48-dim signatures, 24 bands, unioned with the rare-gram index and then **verified exactly**; Jaccard calls 15,148 → 6,797). Client: ④ **node sprite cache** (pre-rendered per kind\|radius-bucket\|zoom-bucket, one `drawImage` replaces path+gradient per node); ⑤ **label bitmap cache** (text widths cached per label\|ratio, roundRect+fillText → drawImage); ⑥ **static edge layer** (grid+edges rendered into an offscreen bitmap, rebuilt only when transform/size/filter/theme/layout-tick change; hover and selection reuse it, with focus edges redrawn on top and a veil to approximate the old dimming); ⑦ **interaction degradation + first-paint skeleton** (800ms after open, while dragging, and during wheel-zoom only 1/3 of edges and small circle nodes are drawn with no labels, restoring full quality when idle). Adds `lib/minhash.js`, `src/client/graph-sprites.js` and 3 test files; `npm test` now runs **119 checks** |
|
|
315
316
|
| **v0.9.13** | 2026-09-28 | **Seven fixes from user feedback.** ① **Version tracking**: Plugin info now shows **running (loaded by host) / on disk / npm latest** side by side, with an amber warning when disk is newer ("X is installed on disk but the running process still has Y — restart to apply") plus a "Check for updates" button (server-side npm lookup, 10-minute cache, 4s timeout). ② **Copy failure**: the memory dialog runs inside an iframe without clipboard-write permission, so `navigator.clipboard.writeText` is always rejected — it now tries the Clipboard API, falls back to `document.execCommand('copy')`, and finally shows the text in a read-only box with a Select-all button; the iframe also gets `allow="clipboard-write; clipboard-read"`. ③ **Silent save**: the result now appears right next to the Save button (⏳ Saving… / ✅ Saved / ⚠ error) and the button label changed from the wrong "Exporting…" to "Saving…". ④ **Recycle bin**: restore / purge / empty-all now report success and failure, and the empty state explains itself and disables the buttons. ⑤ **Button feedback everywhere**: the audit centre's approve / reject / delete used to swallow everything in `catch {}`; it now counts successes/failures and reports them (and warns when nothing is selected). ⑥ **Graph zoom jank**: new `src/client/graph-lod.js` — **viewport culling** (off-screen nodes/edges are skipped) + a **label budget** (≤120 nodes draw all; ≤300 draw 160; ≤600 draw 90; more draw 60, prioritising focus, hover, search hits and highest degree) + **text-width caching** + **shadows off for large graphs**. ⑦ Adds `tests/graph-lod.test.mjs` (5 checks); `npm test` now runs **108 checks** |
|
|
316
317
|
| **v0.9.12** | 2026-09-28 | **New "Report a bug" entry (🐞 in the left rail)**: the dialog takes your description and then either ① **opens a pre-filled GitHub issue** (title, body, diagnostics and the `bug` label already filled — one more click on Submit files it), or ② **copies a ready-made AI prompt** (paste it into your chat and the AI runs `gh issue list` to de-duplicate, files the issue and reports the URL back). **Why not one-click submission?** GitHub forbids anonymous issue creation, a token shipped inside the plugin would be extracted by decompiling, and OAuth/relay needs hosted infrastructure — hence "pre-fill + one click". Diagnostics come from the new `/memory-eternal/api/diagnostics` endpoint and are **auto-redacted** (home directory → `~`; `sk-` / `ghp_` / `github_pat_` / `api_key:` → `***`; truncated to 2400 chars), and the issue URL is truncated by **binary search** so it can never exceed the length limit (`URLSearchParams` inflates CJK by roughly 9x). Adds `lib/feedback.js` (pure functions) and `tests/feedback.test.mjs` (4 checks: redaction, diagnostic fields and length cap, pre-filled URL encoding/truncation, bilingual prompt); `npm test` now runs **103 checks** |
|
|
317
318
|
| **v0.9.11** | 2026-09-28 | **Fixed `watchdog --reap` killing itself**: when you run `node lib/watchdog.js --reap` directly, the caller's own command line also contains `watchdog.js` on the same port and is not in the lock — so the reaper SIGTERMed **itself**, showing up as "no output at all + exit code 1" (going through `dsh-memory watchdog --reap` was unaffected because its command line lacks `watchdog.js`, which is why it only showed up on the direct path). The protected set now always includes `keepPid`, the current pid and the parent pid, and any other process whose command line carries `--reap` is skipped; output now uses `fs.writeSync(2, …)` so `process.exit` cannot truncate it. Regression test added for "self and parent must never be killed" (using a real idle child process as the target instead of a fake pid). `npm test` runs **98 checks** |
|
package/README.md
CHANGED
|
@@ -336,6 +336,7 @@ curl http://127.0.0.1:7999/memory-eternal/api/web-info # 独立 web 是否活
|
|
|
336
336
|
|
|
337
337
|
| 版本 | 日期 | 关键改动 |
|
|
338
338
|
|---|---|---|
|
|
339
|
+
| **v0.9.14** | 2026-09-28 | **图谱算法与渲染深度优化(P0-1 / P0-3 / P1-1 / P1-2 / P1-3 / P2-2)**。服务器侧:① **建图落盘缓存** —— 按指纹缓存 nodes+edges,命中直接读文件(596 卡实测 **422ms → 11ms**);② **bigram 哈希化**(`Set<number>` 取代 `Set<string>`,写卡去重仍用字符串版、语义不变)+ 稀有 gram 倒排改**计数排序**(202 → **54ms**);③ **MinHash + LSH** 候选生成(48 维签名、24 band,与稀有倒排取并集后**精确校验**,jaccard 调用 15,148 → 6,797)。客户端侧:④ **节点精灵缓存**(按 kind\|半径桶\|缩放档 预渲染,每帧一次 `drawImage` 取代 path+gradient);⑤ **标签位图缓存**(文字宽度按 label\|ratio 缓存,roundRect+fillText → drawImage);⑥ **边静态层**(网格+边画进离屏位图,只在变换/尺寸/过滤/主题/布局 tick 变化时重建;悬停/选中直接复用位图,焦点邻边另画亮层 + 整体压暗近似原效果);⑦ **交互降级与首屏骨架**(打开后 800ms、拖拽、滚轮期间只画 1/3 边 + 小圆节点、不画标签,停手自动恢复)。新增 `lib/minhash.js`、`src/client/graph-sprites.js` 与 3 个测试文件,`npm test` 共 **119 项** |
|
|
339
340
|
| **v0.9.13** | 2026-09-28 | **按用户反馈修 7 项**。① **版本跟踪**:配置页「插件信息」同时显示**运行中(宿主加载)/ 磁盘安装 / npm 最新**三个版本;磁盘比运行中新时给橙色警告(「磁盘已安装 X,但当前进程仍加载 Y —— 重启后才生效」),并新增「🔄 检查更新」(服务端查 npm,10 分钟缓存 + 4s 超时)。② **复制失败**:记忆弹窗在 iframe 里、默认没有 clipboard-write 权限,`navigator.clipboard.writeText` 必然被拒 —— 现在先试 Clipboard API,失败退 `document.execCommand('copy')`,再失败就把内容摊进只读文本框并给「全选」;iframe 加 `allow="clipboard-write; clipboard-read"`。③ **保存没有提示**:保存结果显示在保存按钮旁(⏳ 保存中… / ✅ 已保存 / ⚠ 错误),文案从错误的「导出中…」改为「保存中…」。④ **回收中心**:恢复 / 彻底删除 / 清空都有成功与失败提示,空库给说明与禁用态。⑤ **通用按键反馈**:审核中心的批准 / 驳回 / 删除原先 `catch{}` 吞掉一切,现逐条统计成功失败并提示;未选卡片也提示。⑥ **图谱缩放卡顿**:新增 `src/client/graph-lod.js` —— **视口剔除**(屏幕外节点/边不画)+ **标签预算**(≤120 全画 / ≤300 画 160 / ≤600 画 90 / 更多画 60,优先焦点、悬停、搜索命中、高度数)+ **文本宽度缓存** + **大图关阴影**。⑦ 新增 `tests/graph-lod.test.mjs`(5 项),`npm test` 共 **108 项** |
|
|
340
341
|
| **v0.9.12** | 2026-09-28 | **新增「反馈异常」入口(左栏 🐞)**:弹窗里填完问题描述后可 ① **一键打开 GitHub 预填 issue**(标题 / 正文 / 诊断信息 / `bug` 标签都已填好,再点一次 Submit 即提交),或 ② **复制一段给 AI 的提示词**(贴进对话框,让 AI 先用 `gh issue list` 查重、再建 issue 并回报链接)。**为什么不做「点一下直接提交」**:GitHub 不允许匿名创建 issue;插件内置 token 会被反编译提取;OAuth / 中转需要自建服务 —— 所以走「预填 + 一次点击」。诊断信息由新接口 `/memory-eternal/api/diagnostics` 生成并**自动脱敏**(home 目录 → `~`,`sk-` / `ghp_` / `github_pat_` / `api_key:` 等 → `***`,截断到 2400 字符),issue 链接用**二分截断**保证不超长(`URLSearchParams` 会把中文膨胀约 9 倍)。新增 `lib/feedback.js`(纯函数层)与 `tests/feedback.test.mjs`(4 项:脱敏 / 诊断字段与限长 / 预填链接编码与截断 / 中英双语提示词),`npm test` 共 **103 项** |
|
|
341
342
|
| **v0.9.11** | 2026-09-28 | **修复 `watchdog --reap` 把自己杀掉**:直接运行 `node lib/watchdog.js --reap` 时,调用者自己的命令行同样含 `watchdog.js` + 同端口、且不在锁里 —— reap 于是把**自己** SIGTERM 了,表现为「一条输出都没有 + 退出码 1」(走 `dsh-memory watchdog --reap` 时因命令行不含 `watchdog.js` 而侥幸没事,所以只在直跑时暴露)。现在保护集合固定包含 `keepPid` / 当前 pid / 父进程 pid,并跳过命令行带 `--reap` 的其它进程;输出改成 `fs.writeSync(2, …)` 同步写,不再被 `process.exit` 截断。回归测试补「自己与父进程都不得被杀」(用真实空转子进程当靶子,不再用假 pid)。`npm test` **98 项** |
|