Skip to content

Releases

v0.2.5 — 修 pnpm 安装

Choose a tag to compare

@heenljy heenljy released this 30 Nov 04:30

简体中文 | English


简体中文

核心引擎 tgz · 桌面插件 · Android 插件

本版为当前最新版本。

本说明最后更新:2026-11-30 04:45 UTC(北京时间 2026-11-30 12:45)

引擎代码与 0.2.4 完全相同,这一版只改打包元数据。

修了什么:pnpm 用户装不上

package.json 里曾有一个 optional peerDependency:

"peerDependencies": { "@deepseek-ai/dsh-tools": "*" }

dsh-tools 在 npm 上存在(0.0.1-rc.1)。pnpm 的 auto-install-peers 默认开启,会顺着这个 peer 去解析整条 DSH 依赖链,而链里有一条引用了从未发布的 @deepseek-ai/dsh-type-meta:

ERR_PNPM_FETCH_404  GET https://registry.npmjs.org/@deepseek-ai%2Fdsh-type-meta

整次 install 就此失败。npm 会跳过 optional peer,所以本地和 DSH 用户一直没暴露——只有 pnpm 用户,以及用 pnpm 构建的目录站点(Glama)会装不上。

现在 peerDependencies 与 peerDependenciesMeta 都已移除。

为什么去掉而不是修

核心引擎本来就是零依赖,这是它区别于其它记忆方案的一条。DSH 适配器在运行时用
createRequire 从宿主目录解析 dsh-tools,不需要在清单里声明——声明反而把一条
从没打算安装的依赖链拖进了所有人的 install。

版本

包 版本
核心 tan-memory 0.2.4 → 0.2.5
桌面插件 tan-memory-dsh 1.1.4 → 1.1.5
Android 插件 dsh-memory 0.5.4 → 0.5.5

资产

资产 内容 大小 SHA-256
tan-memory-0.2.5.tgz 核心引擎:引擎 + 适配器 + CLI + 文档 129,521 B 28c61eb6f628d2041256cd6fed2aa9d8d4e77c1449cc6d360a8627077f9b5049
tan-memory-dsh-1.1.5.tgz 桌面端 DSH 插件(内嵌引擎 + 管理页) 105,330 B 52e8d75b56085be5b60362952ab02a336afd279f35e114988567af1f4d120c0f
dsh-memory-0.5.5.tgz Android 侧载插件(内嵌引擎 + 管理页 + workspace_write) 101,152 B e33d6cbc95aadd873f2c83668a5b0a1fd7d573d5841247d45ef26710b17d17b8

验证

  • node --check 通过;98 项测试 / 97 通过 / 0 失败 / 1 跳过
  • decoupling.test.mjs 改为断言 dependencies / peerDependencies /
    peerDependenciesMeta 三者皆无,把「零依赖是承诺」这条钉住

许可 AGPL-3.0-only。


English

This is the current latest release.

This note was last updated: 2026-11-30 04:45 UTC

The engine code is identical to 0.2.4; this release only changes packaging metadata.

What was broken: pnpm could not install it

package.json carried an optional peer dependency:

"peerDependencies": { "@deepseek-ai/dsh-tools": "*" }

dsh-tools does exist on npm (0.0.1-rc.1). pnpm enables auto-install-peers by
default
, so it followed that peer into the whole DSH dependency graph — which contains a
reference to @deepseek-ai/dsh-type-meta, a package that was never published:

ERR_PNPM_FETCH_404  GET https://registry.npmjs.org/@deepseek-ai%2Fdsh-type-meta

The install failed there. npm skips optional peers, which is why local and DSH users never
hit it — only pnpm users, and directory sites that build with pnpm (Glama), could not
install the package
.

peerDependencies and peerDependenciesMeta are now gone.

Why remove it instead of fixing it

The core engine has zero dependencies, and that is a deliberate property. The DSH adapter
resolves dsh-tools at runtime with createRequire from the host directory; declaring
it only dragged a dependency graph nobody intends to install into everyone's install.

Versions

Package Version
Core tan-memory 0.2.4 → 0.2.5
Desktop plugin tan-memory-dsh 1.1.4 → 1.1.5
Android plugin dsh-memory 0.5.4 → 0.5.5

Assets

Asset Contents Size SHA-256
tan-memory-0.2.5.tgz Core engine: engine + adapters + CLI + docs 129,521 B 28c61eb6f628d2041256cd6fed2aa9d8d4e77c1449cc6d360a8627077f9b5049
tan-memory-dsh-1.1.5.tgz Desktop DSH plugin (embedded engine + management page) 105,330 B 52e8d75b56085be5b60362952ab02a336afd279f35e114988567af1f4d120c0f
dsh-memory-0.5.5.tgz Android sideload plugin (embedded engine + page + workspace_write) 101,152 B e33d6cbc95aadd873f2c83668a5b0a1fd7d573d5841247d45ef26710b17d17b8

Verification

  • node --check passes; 98 tests / 97 pass / 0 fail / 1 skipped
  • decoupling.test.mjs now asserts that dependencies, peerDependencies and
    peerDependenciesMeta are all absent, pinning "zero dependencies" as a promise

Licensed under AGPL-3.0-only.

v0.2.4 — 一行接入 MCP 客户端

Choose a tag to compare

@heenljy heenljy released this 30 Nov 01:25

简体中文 | English


简体中文

核心引擎 tgz · 桌面插件 · Android 插件

有新版本:v0.2.5
—— 修了 pnpm 装不上的问题(package.json 的 optional peerDependency 会拖进
一条引用了未发布包的依赖链)。引擎代码与本版完全相同。

本说明最后更新:2026-11-30 01:30 UTC(北京时间 2026-11-30 09:30)

这一版解决的是「装不上」的问题,核心检索逻辑没有改动。

一行接入 MCP 客户端

{
  "mcpServers": {
    "tan-memory": {
      "command": "npx",
      "args": ["-y", "tan-memory", "mcp"],
      "env": { "TAN_MEMORY_HOME": "~/.tan-memory" }
    }
  }
}

此前只有 node /绝对路径/adapters/mcp.js 一条路,看到「绝对路径」四个字的用户直接关页面。现在 CLI 增加了 mcp 子命令,装完就能用。

修了一个会让「装了没生效」的坑

环境变量里的路径不经过 shell 展开(MCP 客户端是直接 spawn 进程的),所以 TAN_MEMORY_HOME=~/.tan-memory 原本是字面值:

之前  dir = "~/.tan-memory"      ← 在 cwd 下建出名叫 ~ 的目录
现在  dir = /home/<user>/.tan-memory

换个客户端(cwd 不同)就会读到另一份空记忆,用户看到的是「记忆没了」。现在 ~、~/x、~\x 都展开到 home,setHome() 与 --home 同样生效。

版本

包 版本
核心 tan-memory 0.2.3 → 0.2.4
桌面插件 tan-memory-dsh 1.1.3 → 1.1.4
Android 插件 dsh-memory 0.5.3 → 0.5.4

资产

资产 内容 大小 SHA-256
tan-memory-0.2.4.tgz 核心引擎:引擎 + 适配器 + CLI + 文档 126,917 B f93aae479eb0a72bbdbec859fe2c0f90b02ed92ccdd19301264a15c966e1ccab
tan-memory-dsh-1.1.4.tgz 桌面端 DSH 插件(内嵌引擎 + 管理页) 105,309 B 7e2638fa8b842020e14850ebb36060f4ba772ea2392814e978ca6a4ef8a9f1b7
dsh-memory-0.5.4.tgz Android 侧载插件(内嵌引擎 + 管理页 + workspace_write) 101,259 B d6c7f52a026034f8d71cacf3f522a1170cd803f12954c08faba66e84dbd0b6fa

文档

  • README 换成「可追溯」定位:Agent 记住的每一条,都能追回它是在哪句话里说的
  • 删掉「核心包不通过 npm registry 分发」的旧说法
  • 补一条限制:MCP 只暴露工具,L1 与专题卡自动注入需要宿主提供提示词接口
  • 新增「备份与迁移」:导出分 lite / full 两档

验证

  • node --check 通过;98 项测试 / 97 通过 / 0 失败 / 1 跳过
  • npm pack --dry-run:14 个文件,含 bin/、adapters/mcp.js、src/engine.js、server.json,无 memory/、test/、.git
  • 把 tgz 解开按 npm 安装布局实跑:mcp 握手正常,paths 的 dir 无字面 ~

许可 AGPL-3.0-only。


English

Newer release available: v0.2.5
— fixes pnpm being unable to install (an optional peerDependency dragged in a
dependency chain referencing an unpublished package). Engine code is identical.

This note was last updated: 2026-11-30 01:30 UTC

This release is about being installable; the retrieval logic is unchanged.

One-line MCP setup

{
  "mcpServers": {
    "tan-memory": {
      "command": "npx",
      "args": ["-y", "tan-memory", "mcp"],
      "env": { "TAN_MEMORY_HOME": "~/.tan-memory" }
    }
  }
}

Previously the only path was node /absolute/path/adapters/mcp.js — anyone who saw
"absolute path" closed the page. The CLI now has an mcp subcommand.

A bug that looked like "installed but does nothing"

Environment variables are not shell-expanded (MCP clients spawn the process directly), so
TAN_MEMORY_HOME=~/.tan-memory used to be taken literally:

before  dir = "~/.tan-memory"      <- created a directory literally named ~ under cwd
after   dir = /home/<user>/.tan-memory

A different client (different cwd) then read a different, empty store. Now ~, ~/x and
~\x expand to the home directory in TAN_MEMORY_HOME, setHome() and --home.

Versions

Package Version
Core tan-memory 0.2.3 → 0.2.4
Desktop plugin tan-memory-dsh 1.1.3 → 1.1.4
Android plugin dsh-memory 0.5.3 → 0.5.4

Assets

Asset Contents Size SHA-256
tan-memory-0.2.4.tgz Core engine: engine + adapters + CLI + docs 126,917 B f93aae479eb0a72bbdbec859fe2c0f90b02ed92ccdd19301264a15c966e1ccab
tan-memory-dsh-1.1.4.tgz Desktop DSH plugin (embedded engine + management page) 105,309 B 7e2638fa8b842020e14850ebb36060f4ba772ea2392814e978ca6a4ef8a9f1b7
dsh-memory-0.5.4.tgz Android sideload plugin (embedded engine + page + workspace_write) 101,259 B d6c7f52a026034f8d71cacf3f522a1170cd803f12954c08faba66e84dbd0b6fa

Docs

  • README now leads with traceability: every fact an agent remembers traces back to the
    sentence it came from
  • removed the old "core package is not distributed through the npm registry" claim
  • added the limitation: MCP only exposes tools; L1 and topic-card auto-injection need a host
    with a prompt interface
  • new "Backup and migration" section (lite / full export)

Verification

  • node --check passes; 98 tests / 97 pass / 0 fail / 1 skipped
  • npm pack --dry-run: 14 files including bin/, adapters/mcp.js, src/engine.js,
    server.json; no memory/, test/ or .git
  • unpacked the tgz into an npm-like layout and ran it: mcp handshake works, paths reports
    no literal ~

Licensed under AGPL-3.0-only.

v0.2.3 — 导出分轻量/完整两档

Choose a tag to compare

@heenljy heenljy released this 29 Nov 22:36

简体中文 | English


简体中文

有新版本:v0.2.4
—— 增加了 mcp 子命令(npx tan-memory mcp 一行接入)和 ~ 路径展开修复;
本版只能通过 node /绝对路径/adapters/mcp.js 接入 MCP 客户端。

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

导出分成「轻量 / 完整」两档,导入端配套支持完整版还原。

资产 内容 大小 SHA-256
tan-memory-0.2.3.tgz 核心引擎:引擎 + 适配器 + CLI + 文档(含 src/ui.html) 125,034 B 29553d51f180d6ca1a9d65add6d6e34e5bb3fd989c08d01143f1234bd5da3cc7
tan-memory-dsh-1.1.3.tgz 桌面端 DSH 插件(内嵌引擎 + ui.html) 105,023 B 14ec7557a95d755dad6f853efdd4818a026f2a65e78ef95357ceef21ac204170
dsh-memory-0.5.3.tgz Android 侧载插件(内嵌引擎 + ui.html + workspace_write) 100,865 B 06a7922724512953822c791cd5bec909c1da9c2f3a8ef9551231a100312b7a28

版本

包 版本
核心 tan-memory 0.2.2 → 0.2.3
桌面插件 tan-memory-dsh 1.1.2 → 1.1.3
Android 插件 dsh-memory 0.5.2 → 0.5.3

两档导出的区别

lite(默认) full
L1 / 事实条目 / 专题卡 / 路由索引 ✅ ✅
journal/ 流水账 — ✅
reminders.md 催办清单 — ✅
archive/ 原始会话 — ✅
aliases.json / retrieval.json / entities.json — ✅

手机端实测:lite 156 KB(134 条 / 30 卡),full 22,685 KB,都未超默认 64 MB 上限。

导入

完整版 bundle 导入时会一并还原上述目录,仍走原有的 staging + rename,
旧数据先进 backups/、中途失败可回滚;轻量版导入不碰它们,旧格式 bundle 照常兼容。

导入校验也加严了:scope 取值校验,files 必须是 {name, content} 数组,
且 name 拒绝绝对路径与含 .. / 空段的路径(防目录穿越)。

验证

  • node --check 通过;92 项测试 / 91 通过 / 0 失败 / 1 跳过
  • 三个包内嵌的 engine.js、ui.html 与仓库源码 sha256 逐一相同

许可 AGPL-3.0-only。


English

Newer release available: v0.2.4
— adds the mcp subcommand (npx tan-memory mcp, one line) and a ~ expansion fix;
this version can only be reached through node /absolute/path/adapters/mcp.js.

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

Export is split into two scopes, and the import side restores full bundles.

Asset Contents Size SHA-256
tan-memory-0.2.3.tgz Core engine: engine + adapters + CLI + docs (includes src/ui.html) 125,034 B 29553d51f180d6ca1a9d65add6d6e34e5bb3fd989c08d01143f1234bd5da3cc7
tan-memory-dsh-1.1.3.tgz Desktop DSH plugin (embedded engine + ui.html) 105,023 B 14ec7557a95d755dad6f853efdd4818a026f2a65e78ef95357ceef21ac204170
dsh-memory-0.5.3.tgz Android sideload plugin (embedded engine + ui.html + workspace_write) 100,865 B 06a7922724512953822c791cd5bec909c1da9c2f3a8ef9551231a100312b7a28

Versions

Package Version
Core tan-memory 0.2.2 → 0.2.3
Desktop plugin tan-memory-dsh 1.1.2 → 1.1.3
Android plugin dsh-memory 0.5.2 → 0.5.3

The two export scopes

lite (default) full
L1 / fact entries / topic cards / route index ✅ ✅
journal/ close-out log — ✅
reminders.md reminder list — ✅
archive/ raw sessions — ✅
aliases.json / retrieval.json / entities.json — ✅

Measured on device: lite 156 KB (134 entries / 30 cards), full 22,685 KB; both stay under
the default 64 MB limit.

Import

Importing a full bundle restores the directories above through the existing staging +
rename flow: previous data goes to backups/ first and a mid-way failure rolls back.
A lite import leaves them untouched, and older bundle formats remain compatible.

Validation is stricter too: scope is checked, files must be a {name, content} array,
and name rejects absolute paths and any path containing .. or an empty segment
(directory-traversal guard).

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)

Licensed under AGPL-3.0-only.

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

Choose a tag to compare

@heenljy heenljy released this 29 Nov 20:41

简体中文 | 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.

v0.2.1 — 并入手机端引擎

Choose a tag to compare

@heenljy heenljy released this 29 Nov 18:56

简体中文 | English


简体中文

⚠️ 本版已被取代,建议用最新版

最新版本:v0.2.3

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

v0.2.1 完成了「一个核心」的合并,但仍缺后面两批修复:

问题 表现 修复版本
管理页退回简化页 设置里的「记忆」只剩「L1 摘要 + 搜索 + 新增一条」,导入 / 导出与专题卡管理不见了 v0.2.2
点「导出记忆」拿不到文件 WebView 没有 DownloadListener,<a download> 被静默吞掉,文件从未落盘 v0.2.2
只能导出轻量内容 导出包不含 journal / archive / 配置,做不到整机迁移 v0.2.3

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

把手机端跑的那版引擎并入仓库。三个包从此是同一份 src/engine.js,
不再有「仓库构建比手机端少功能」的分叉。

资产 内容 大小 SHA-256
tan-memory-0.2.1.tgz 核心引擎:引擎 + 适配器 + CLI + 文档 121,826 B f4e9ff2f87fc35e9707677a196a881aaa412d8e18b6871d8d475eb3c353fcfd1
tan-memory-dsh-1.1.1.tgz 桌面端 DSH 插件(内嵌引擎,装上后有设置里的「记忆」页) 102,098 B 36fa0547f56e52007c1bc95c1b519211d468b19ab3376c27d64b6a5f6a724f5b
dsh-memory-0.5.1.tgz Android 侧载插件(内嵌引擎 + workspace_write) 97,692 B 47b81cec53f2195d95d7772ddd6abfcaaf33ff9c218936ee9627873458c9239b

版本

包 版本
核心 tan-memory 0.2.0 → 0.2.1
桌面插件 tan-memory-dsh 1.1.0 → 1.1.1
Android 插件 dsh-memory 0.5.0 → 0.5.1

新增能力(此前只在手机端)

关键词检索通道(buildKeywordIndex / keywordHitOf)、~ 前缀(只检索不注入)、
命中率排序、新卡按 routes 自动入索引、L1「最近收尾」改为运行时拼、
shortWindowOf 剥 session- 前缀、12 项体检 + 滚动快照 + 触发率流水、
updateEntries 批量原子写。

接口变化

  • 新增 setWorkspace(dir):指定 workspace_write 的白名单根目录。
    不调用就不注册这个工具——核心库 / MCP / CLI / 桌面插件仍是 14 个工具,
    Android 插件(自动传 /storage/emulated/0/DSH)是 15 个。
  • memory:l1 段的 text 改为函数,按轮次注入会话头与「最近收尾」。
  • memory_summarize 的 duplicate_ids 标为 required,无重复时返回 []
    (旧契约会让字段取到 undefined,正是工具层 lossless JSON 会拒收的形态)。

装哪个

  • 引擎 / MCP / CLI → tan-memory-0.2.1.tgz,npm install /path/to/unpacked/package 或直接用仓库源码。
  • 桌面端 DSH → tan-memory-dsh-1.1.1.tgz,「插件 → 添加插件 → 本地目录 / tgz」。
  • Android 端 DSH → dsh-memory-0.5.1.tgz,adb push 到 /sdcard/DSH/plugins/ 后重启 App。

验证

node --test test/*.test.mjs:92 项 / 91 通过 / 0 失败 / 1 跳过,与合并前基线一致。

许可 AGPL-3.0-only,所有版本适用同一许可证。


English

⚠️ Superseded — use the latest release

Latest release: v0.2.3

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

v0.2.1 completed the "one core" merge but still lacks the next two rounds of fixes:

Issue Symptom Fixed in
Management page fell back to the simplified view Settings → Memory showed only "L1 summary + search + add one"; import/export and topic-card management were gone v0.2.2
"Export memory" produced no file The WebView has no DownloadListener, so <a download> was swallowed and nothing was written v0.2.2
Export was lite-only The bundle carried no journal / archive / config, so it could not migrate a whole install v0.2.3

Original v0.2.1 notes (kept for the record)

This release merged the engine that had been running on Android into the repository. From
here on, all three packages share one and the same src/engine.js, and the split where
"the repository build has fewer features than the phone build" is gone.

Asset Contents Size SHA-256
tan-memory-0.2.1.tgz Core engine: engine + adapters + CLI + docs 121,826 B f4e9ff2f87fc35e9707677a196a881aaa412d8e18b6871d8d475eb3c353fcfd1
tan-memory-dsh-1.1.1.tgz Desktop DSH plugin (embedded engine; adds the Memory page in Settings) 102,098 B 36fa0547f56e52007c1bc95c1b519211d468b19ab3376c27d64b6a5f6a724f5b
dsh-memory-0.5.1.tgz Android sideload plugin (embedded engine + workspace_write) 97,692 B 47b81cec53f2195d95d7772ddd6abfcaaf33ff9c218936ee9627873458c9239b

Versions

Package Version
Core tan-memory 0.2.0 → 0.2.1
Desktop plugin tan-memory-dsh 1.1.0 → 1.1.1
Android plugin dsh-memory 0.5.0 → 0.5.1

Capabilities brought over (previously Android-only)

Keyword retrieval channel (buildKeywordIndex / keywordHitOf), the ~ prefix
(searchable but never auto-injected), hit-ratio ranking, automatic routes indexing for new
cards, the runtime-composed "recent close-out" line in L1, shortWindowOf stripping the
session- prefix, 12 health checks + rolling snapshots + route-hit logging, and atomic
batch writes in updateEntries.

Interface changes

  • New export setWorkspace(dir): sets the allow-listed root for workspace_write.
    Without calling it the tool is not registered — the core library / MCP / CLI / desktop
    plugin therefore still expose 14 tools, while the Android plugin (which passes
    /storage/emulated/0/DSH automatically) exposes 15.
  • The text of the memory:l1 section became a function so it can inject the session
    header and the "recent close-out" line per turn.
  • memory_summarize's duplicate_ids is marked required and returns [] when nothing
    overlaps (the old contract let the field read undefined, which the tool layer's
    lossless JSON refuses).

Which package to install

  • Engine / MCP / CLI → tan-memory-0.2.1.tgz; npm install /path/to/unpacked/package or use the repository source directly.
  • Desktop DSH → tan-memory-dsh-1.1.1.tgz; "Plugins → Add plugin → local directory / tgz".
  • Android DSH → dsh-memory-0.5.1.tgz; adb push to /sdcard/DSH/plugins/ and restart the app.

Verification

node --test test/*.test.mjs: 92 tests / 91 pass / 0 fail / 1 skipped, identical to the pre-merge baseline.

Licensed under AGPL-3.0-only; every version uses the same license.

v0.2.0 — 首次公开发布

Choose a tag to compare

@heenljy heenljy released this 29 Nov 18:36

简体中文 | English


简体中文

⚠️ 本版已过时,请用最新版

最新版本:v0.2.3

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

v0.2.0 是「首次公开发布」的历史快照,不建议安装 —— 它缺了后面三批修复,
其中两项属于「点了没反应」级别的功能缺陷。

v0.2.0 的已知问题(均已在后续版本修掉)

问题 表现 修复版本
元词召回不到 查「角色卡」「设定」「剧情」这类只写在 topics.index.md 的 keywords 里、卡正文没有的词,一张卡都召回不到 v0.2.1
会话窗口坍缩 DSH 的 agent id 改成 session-<uuid> 后,slice(0, 8) 让所有窗口名都成了 session-,当天 journal 全落进同一个文件 v0.2.1
管理页退回简化页 设置里的「记忆」只剩「L1 摘要 + 搜索 + 新增一条」,导入 / 导出与专题卡管理都不见了(插件拍平时漏带了 ui.html) v0.2.2
点「导出记忆」拿不到文件 用 Blob + <a download>,而 DSH App 的 WebView 没有 DownloadListener,点击被静默吞掉,文件从未落盘 v0.2.2
只能导出轻量内容 导出包不含 journal / archive / 配置,做不到整机迁移 v0.2.3

后续版本补了什么

  • v0.2.1 —— 引擎并入手机端验证过的那一版:关键词检索通道、~ 只检索不注入、
    routes 自动入索引、L1「最近收尾」运行时拼、12 项体检、滚动快照、硬路由触发率流水、
    updateEntries 原子批量写;新增 setWorkspace(),让 workspace_write 只在宿主显式
    给工作区时注册(核心库 / MCP 是 14 个工具,Android 插件 15 个)。
  • v0.2.2 —— src/ui.html 换成完整管理页;导出改为服务端直接写文件、返回绝对路径。
  • v0.2.3 —— 导出分 lite / full 两档,full 带 journal、reminders、archive 原始会话
    与三份配置;导入端配套还原,走 staging + rename 可回滚;补目录穿越校验。

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

首次公开发布。同批发出三个包,各自带自己的版本号。

资产 内容 大小 SHA-256
tan-memory-0.2.0.tgz 核心引擎:引擎 + 适配器 + CLI + 文档 100,778 B 7af53494d6b5d0882ab7c81b4cba4c3182707843038ff8b109230fdde0ca2e0c
tan-memory-dsh-1.1.0.tgz 桌面端 DSH 插件(内嵌引擎,装上后有设置里的「记忆」页) 83,609 B 85911432c68639928fad5c9bde499fa80dd2439d1e01758f86d3ab9d91c9cd52
dsh-memory-0.5.0.tgz Android 侧载插件(内嵌引擎,放进 /sdcard/DSH/plugins/ 后重启) 79,163 B bf7f8670462bc6c41eb7baf83ecff414f4f153b46e721b61409255b1c7380e67

装哪个

  • 只想要引擎 / MCP / CLI → tan-memory-0.2.0.tgz。核心包不通过 npm registry 分发,
    可以用 npm install /path/to/unpacked/package 从本地目录装,或直接把仓库源码放进来。
  • 桌面端 DSH → tan-memory-dsh-1.1.0.tgz。DSH 里「插件 → 添加插件 → 本地目录 / tgz」,
    装完在「设置 → 记忆」打开管理页。
  • Android 端 DSH → dsh-memory-0.5.0.tgz。adb push 到 /sdcard/DSH/plugins/ 后重启 App。

一个必须说清的差异

这三个包全部由仓库 src/ 构建,源码在库内、AGPL 义务闭环。

但 Android 包和你手机上可能在跑的自维护版本不是同一个东西:两者共用 0.5.x 版本号,
内容不同——自维护版多了关键词检索通道、~ 前缀、routes 自动入索引、L1 动态拼接、
12 项体检等一批功能(约 +1,100 行)。装机前先确认 tgz 来源,
android-plugin/README.md 里也写了这条警告。

许可

GNU AGPL-3.0-only,见 LICENSE。本仓库所有版本适用同一许可证,
不存在采用其它许可证的历史版本。需要闭源集成可联系作者取得商业授权。

Individual and commercial use are both permitted under AGPL-3.0; a separate
commercial license is available for closed-source integration.

注:原文「一个必须说清的差异」一节已作废 —— 自 v0.2.1 起 Android 包与手机端
使用的是同一份 src/engine.js,不再有内容差异。


English

⚠️ This release is outdated — use the latest one

Latest release: v0.2.3

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

v0.2.0 is kept as the historical "first public release" snapshot and is not recommended
for installation
— it is missing the next three rounds of fixes, two of which are
"you click it and nothing happens" class defects.

Known issues in v0.2.0 (all fixed later)

Issue Symptom Fixed in
Meta-word recall misses entirely Queries like "character card", "settings" or "plot" — words that only exist in topics.index.md keywords and never in the card body — returned zero cards v0.2.1
Journal windows collapse After DSH changed the agent id to session-<uuid>, slice(0, 8) made every window name session-, so a day of journal entries all landed in one file v0.2.1
Management page fell back to the simplified view Settings → Memory showed only "L1 summary + search + add one"; import/export and topic-card management were gone (the flattened plugin package dropped ui.html) v0.2.2
"Export memory" produced no file It used Blob + <a download>; the DSH App WebView has no DownloadListener, so the click was swallowed and nothing was ever written to disk v0.2.2
Export was lite-only The bundle carried no journal / archive / config, so it could not migrate a whole install v0.2.3

What later releases added

  • v0.2.1 — merged the engine that had been validated on Android: keyword retrieval
    channel, ~ prefix (searchable but never auto-injected), automatic routes indexing,
    runtime-composed "recent close-out" line, 12 health checks, rolling snapshots, route-hit
    logging, atomic batch writes in updateEntries; plus a new setWorkspace() so that
    workspace_write is registered only when the host provides a workspace (14 tools for the
    core library / MCP, 15 for the Android plugin).
  • v0.2.2 — src/ui.html is the full management page again; export now writes the file
    server-side and returns the absolute path.
  • v0.2.3 — export has lite / full scopes; full also carries journal, reminders,
    the raw session archive and three config files; the import side restores them through the
    existing staging + rename flow with rollback; path-traversal checks added.

Original v0.2.0 notes (kept for the record)

First public release. Three packages ship together, each carrying its own version number.

Asset Contents Size SHA-256
tan-memory-0.2.0.tgz Core engine: engine + adapters + CLI + docs 100,778 B 7af53494d6b5d0882ab7c81b4cba4c3182707843038ff8b109230fdde0ca2e0c
tan-memory-dsh-1.1.0.tgz Desktop DSH plugin (embedded engine; adds the Memory page in Settings) 83,609 B 85911432c68639928fad5c9bde499fa80dd2439d1e01758f86d3ab9d91c9cd52
dsh-memory-0.5.0.tgz Android sideload plugin (embedded engine; drop into /sdcard/DSH/plugins/ and restart) 79,163 B bf7f8670462bc6c41eb7baf83ecff414f4f153b46e721b61409255b1c7380e67

Which package to install

  • Only the engine / MCP / CLI → tan-memory-0.2.0.tgz. The core package is not distributed through the npm registry; install it from a local directory with npm install /path/to/unpacked/package, or simply use the repository source.
  • Desktop DSH → tan-memory-dsh-1.1.0.tgz. In DSH: "Plugins → Add plugin → local directory / tgz", then open the Memory page under "Settings → Memory".
  • Android DSH → dsh-memory-0.5.0.tgz. adb push it to /sdcard/DSH/plugins/ and restart the app.

A difference that had to be spelled out

All three packages are built from the repository src/, so the source ships with them and the AGPL obligation is closed.

But the Android package was not the same thing as the self-maintained build that might be running on your phone: both carried the 0.5.x version number while their contents differed — the self-maintained build additionally had the keyword retrieval channel, the ~ prefix, automatic routes indexing, the runtime-composed L1 line, 12 health checks and more (about +1,100 lines). Check where a tgz comes from before installing it; android-plugin/README.md carried the same warning.

License

GNU AGPL-3.0-only, see LICENSE. Every version in this repository is under the same
license; there is no historical version released under a different one. For closed-source
integration, ask the author about a commercial license.

Individual and commercial use are both permitted under AGPL-3.0; a separate commercial
license is available for closed-source integration.

Note: the original section "a difference that had to be spelled out" is obsolete —
since v0.2.1 the Android package and the on-device build share the same src/engine.js,
with no content difference.