Skip to content

v0.2.2 — 管理页 UI 恢复 + 导出落盘

Choose a tag to compare

@heenljy heenljy released this 29 Nov 20:41
· 12 commits to main since this release

简体中文 | English


简体中文

有新版本:v0.2.3
—— 多了导出范围(lite / full)与完整版导入还原,本版只支持轻量导出。

本说明最后更新:2026-11-29 23:20 UTC

以下为 v0.2.2 原始说明(保留存档)

管理页 UI 恢复 + 「导出记忆」真正落盘。两处都来自手机端实测。

资产 内容 大小 SHA-256
tan-memory-0.2.2.tgz 核心引擎:引擎 + 适配器 + CLI + 文档(含 src/ui.html) 123,108 B 55ac026e3940744b9fad4ca9ea082c99f416357ce7d56b92ff40a5e28c142a88
tan-memory-dsh-1.1.2.tgz 桌面端 DSH 插件(内嵌引擎 + ui.html) 103,442 B dd2a5d7908798f21c5ea9a814185a4a990952e6dc65b8c0e652892d490b6a33c
dsh-memory-0.5.2.tgz Android 侧载插件(内嵌引擎 + ui.html + workspace_write) 99,031 B aa42d37884a0f698d3907be23e1a6cfb1c4dbdbf25fe4d103b0455615fea5d6b

版本

包 版本
核心 tan-memory 0.2.1 → 0.2.2
桌面插件 tan-memory-dsh 1.1.1 → 1.1.2
Android 插件 dsh-memory 0.5.1 → 0.5.2

修了什么

1. 管理页退回简化页。 根因是 11-28 插件拍平时没把 src/ui.html 带进部署包,
engine 落到了内置兜底页(不是升级改坏的)。src/ui.html 换成手机端验证过的完整页。

顺带说明:仓库构建的两个插件包一直带 ui.html(package/vendor/tan-memory/src/ui.html,
与 engine.js 同级,命中 uiCandidates() 第 2 优先级)。退化发生在手机端那个扁平的
5 文件包上。从本版起建议只用仓库构建的 tgz。

2. 「导出记忆」点了没文件。 旧实现是 Blob + <a download>,DSH App 的 WebView
没有 DownloadListener,点击被静默吞掉,文件从未写盘。改为服务端直接写:

  • GET /memory/api/export?save=1&dir=<DSH|Download|Documents> → { ok, path, bytes }
  • 不带 save 时保持原 attachment 下载行为,向后兼容
  • 大小上限(DSH_MEMORY_BUNDLE_MAX_BYTES)对两条路径都生效
  • 页面导出按钮改为位置选择弹窗:选目录 → 保存 → 显示完整路径(可长按复制)并尝试写剪贴板

验证

  • node --check 通过;92 项测试 / 91 通过 / 0 失败 / 1 跳过
  • 三个包内的 engine.js、ui.html 与仓库源码 sha256 逐一相同
  • 手机端实测三个落盘位置均成功(entries=134、topics=30、routeIndex 齐全)

许可 AGPL-3.0-only。


English

Newer release available: v0.2.3
— adds export scopes (lite / full) and full-bundle import restore; this version only
exports the lite bundle.

This note was last updated: 2026-11-29 23:20 UTC

Original v0.2.2 notes (kept for the record)

Management-page UI restored, and "Export memory" now really writes a file. Both changes came
from on-device testing.

Asset Contents Size SHA-256
tan-memory-0.2.2.tgz Core engine: engine + adapters + CLI + docs (includes src/ui.html) 123,108 B 55ac026e3940744b9fad4ca9ea082c99f416357ce7d56b92ff40a5e28c142a88
tan-memory-dsh-1.1.2.tgz Desktop DSH plugin (embedded engine + ui.html) 103,442 B dd2a5d7908798f21c5ea9a814185a4a990952e6dc65b8c0e652892d490b6a33c
dsh-memory-0.5.2.tgz Android sideload plugin (embedded engine + ui.html + workspace_write) 99,031 B aa42d37884a0f698d3907be23e1a6cfb1c4dbdbf25fe4d103b0455615fea5d6b

Versions

Package Version
Core tan-memory 0.2.1 → 0.2.2
Desktop plugin tan-memory-dsh 1.1.1 → 1.1.2
Android plugin dsh-memory 0.5.1 → 0.5.2

What was fixed

1. The management page fell back to the simplified view. The root cause was that the
11-28 plugin flattening did not carry src/ui.html into the deployed package, so the engine
fell back to its built-in page (not something an upgrade broke). src/ui.html is now the
full page validated on device.

For the record: both plugin packages built from this repository always carried ui.html
(package/vendor/tan-memory/src/ui.html, next to engine.js, matching the second
uiCandidates() entry). The regression happened in the flat 5-file package on the phone.
From this version on, prefer the tgz built from the repository.

2. "Export memory" produced no file. The old implementation used Blob + <a download>,
but the DSH App WebView has no DownloadListener, so the click was swallowed and nothing was
ever written. Export now writes server-side:

  • GET /memory/api/export?save=1&dir=<DSH|Download|Documents> → { ok, path, bytes }
  • without save the previous attachment download behaviour is kept (backwards compatible)
  • the size cap (DSH_MEMORY_BUNDLE_MAX_BYTES) applies to both paths
  • the page's export button opens a location picker: choose a directory → save → show the full
    path (long-press to copy) and try to write it to the clipboard

Verification

  • node --check passes; 92 tests / 91 pass / 0 fail / 1 skipped
  • the engine.js and ui.html embedded in all three packages match the repository source
    byte for byte (sha256)
  • on device all three destinations worked (entries=134, topics=30, routeIndex present)

Licensed under AGPL-3.0-only.