Skip to content

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

Choose a tag to compare

@heenljy heenljy released this 30 Nov 01:25
· 11 commits to main since this release

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