Community plugin

MailComet / dsh-normal-memory

本地优先、文件原生的 DeepSeek Harness 长期记忆插件:Markdown 即事实源,中文 BM25 检索,无向量、无后台智能体

  • JavaScript
  • MIT
  • 1 stars
  • Nov 21, 2026

About this plugin

Written by the registry from verified metadata, not from the README.

dsh-normal-memory is a DSH plugin published from the MailComet/dsh-normal-memory repository.

  • Listing statusManifest verified
  • Manifest checkedNov 20, 2026
  • Packagedsh-normal-memory
  • Package version0.1.0
  • DSH engine>=0.2.2-rc.1 <0.3.0-0
  • Source commit838e125
  • Repository createdNov 20, 2026

Capabilities and topics

deepseek-harnesslocal-firstmarkdownmemory
From the repository README

README

Everything below this line is the repository's own document, cached here. This site did not write or review it.

Cached versionView on GitHub

dsh-normal-memory

Normal Memory(普通记忆)— 面向 DeepSeek Harness Desktop 的本地优先、文件原生长期记忆插件。

定位:不神奇。Markdown 是事实源,BM25 检索,显式写入,没有向量,没有后台智能体。

安装

要求 DSH 桌面端 >= 0.2.2-rc.1 < 0.3.0-0。在插件页的安装入口粘贴下面这条地址:

https://github.com/MailComet/dsh-normal-memory/releases/latest/download/dsh-normal-memory.tgz

装好后插件页出现 normal-memory 条目,重启桌面端生效。指定版本见 Releases。

也可以使用本地构建出的 <name>-<version>.tgz,或克隆本仓库后直接选择仓库根目录(lib/ 已随仓库提供)。通过 tarball 安装的插件在插件页没有“更新”按钮,升级时用新版本的地址重新安装即可。

设计要点

  • 文件即事实源:记忆是 ~/.dsh/memory 下带 YAML frontmatter 的 Markdown;MEMORY.md 与 index/ 是可重建的派生索引。
  • 两级作用域:global/ 与 projects/<项目名-hash>/。项目键优先用 git remote,回退构建标记目录,再回退 realpath。
  • 会话快照注入:每个会话冻结一份索引快照(标题+摘要),写入立即落盘但下次会话才参与注入,保护 KV 前缀缓存。空库注入 0 字节。
  • 硬预算:注入默认 8KB,项目至少占 60%;检索卡片默认 3 条 / 1200 字节,正文按需 memory_read。
  • 召回门控:纯确认语(好的/继续/ok)不触发检索。
  • 宿主主导写入:memory_write 默认进 inbox/ 候选;commit=true 走 DSH 原生审批,模型不能自批。
  • 状态与有效期:status(candidate/verified/disputed/superseded)、validUntil、evidence、aliases;读取热度记在 state/usage.json,不写回条目文件。
  • 内容安全闸:保留名防碰撞、密钥脱敏、控制字符清理、坏文件容错、单写者锁、原子写、旧版进 history/。
  • 只读维护:每 24 小时巡检一次,重复/过期/陈旧候选只生成报告与提案,不删除、不改写、不自动提交。

工具

工具作用
memory_search关键词检索(中文二元 BM25),返回标题卡片
memory_read按 id 读取正文与元数据,记录读取热度
memory_write写入候选;commit=true 请求审批后确认
memory_pin钉住/取消钉住已确认条目

数据布局

~/.dsh/memory/
├── global/{MEMORY.md,entries,inbox,archive,history}
├── projects/<name>/{scope.json,MEMORY.md,entries,inbox,archive,history}
├── index/{manifest.json,scopes.json,global.json,projects/*.json}
├── state/{usage.json,maintenance.json,snapshots/,reports/}
├── audit/<YYYY-MM>.jsonl
└── .lock

配置

在 profile 的 cordis.patch.yml 覆盖 normal-memory 行:

- id: normal-memory
  name: dsh-normal-memory
  config:
    home: ''                 # 默认 ~/.dsh/memory;开发可指向 .dev-data/memory
    injectBudgetBytes: 8000
    projectShare: 0.6
    cardBudgetBytes: 1200
    maxCards: 3
    staleAfterDays: 90
    enableMaintenance: true

开发与测试

pnpm install
pnpm test    # 30 个测试,含 DSH 接口冒烟测试
pnpm build   # src → lib(纯拷贝,无转译)
pnpm pack    # 出 tarball

运行时依赖由 DSH 桌面端提供(cordis ~4.1.0、dsh-tools/dsh-llm 0.2.2-rc.5、schemastery),唯一自带依赖是 js-yaml。无原生模块。

Badge

Listed here? Link back with this badge — paste the snippet into your repository README.

Listed on DSH Plugin badge
[![Listed on DSH Plugin](https://dsh-plugin.com/badges/listed.svg)](https://dsh-plugin.com/plugins/MailComet/dsh-normal-memory)