2303572348/deepseek-harness-memory1

deepseek-harness-memory

Claude Code-style long-term memory for dsh: markdown memory files with frontmatter, MEMORY.md index, session-start prompt injection, and a memory tool.

AI Analysis

通过 Markdown 文件 and 提示词注入为 DSH 引入长期记忆机制。支持项目路径归一化映射,适合需要智能体在跨会话、跨分支开发中保持上下文和项目背景记忆的用户。

Package
deepseek-harness-memory
Version
0.1.3
License
MIT
Last updated
Aug 14, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:2303572348/deepseek-harness-memory

配置(cordis.patch.yml 覆盖 memory 行的 config)

默认说明
memoryRoot~/.dsh/memory记忆根目录
scopeautoauto(有工作区用 workspace,否则 user)/ user / workspace
maxIndexLines200注入的 MEMORY.md 行数上限
maxIndexBytes25000注入的 MEMORY.md 字节上限
maxList200注入/列出的记忆文件数上限
includeInPrompttrue是否注入系统提示词
importClaudeMemorytruelist/注入时若 dsh 侧为空,回退只读 Claude Code 同 key 目录
projectAliases{}路径 key → 统一 key 的映射(见下)

projectAliases:同一项目的多 checkout 归一

Claude Code 按工作区路径切分记忆,同一项目(不同分支/多个 checkout)的记忆会散落在多个目录。projectAliases 把这些路径 key 映射到一个统一 key,使记忆属于项目而非路径——在任何 checkout 里工作,读写同一份记忆:

projectAliases:
  C--work-my-project-a: my-project
  C--work-my-project-b: my-project

新增 checkout 时,把它的路径 key 加一行映射即可。别名配置应写在 profile 的 cordis.patch.yml 覆盖层(该行 config 为整行替换,需同时重述其他字段)。