DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-project-memory

J

dsh-project-memory

Manifest valid2

Project-level persistent memory plugin for deepseek-harness: auditable Markdown memory files with memory_load_context / upsert / finalize / forget tools. Zero-dependency, installable via dsh plugin add.

hasBundlePatch

dsh-project-memory

deepseek-harness 的「项目级持久记忆」插件:让模型跨会话读写当前项目 memory/ 目录下的可审计 Markdown 记忆文件——落盘为普通文本,可 git 审计 / diff,不依赖模型内部上下文。

通用、零外部依赖:不预置任何项目知识,装到哪个项目就服务于哪个项目。

工具

四个工具,名字均可用 toolPrefix 加前缀:

工具作用
memory_load_context会话/任务开始加载相关记忆;关键词检索 + 全量 catalog 清单
memory_upsert仅在用户明确要求「记住 / 以后都按这个来」时写入或更新一条记忆
memory_finalize任务收尾把结论沉淀为一条 reference 记忆(固定文件,避免文件膨胀)
memory_forget遗忘:删除正文文件 + 对应索引行(保护 MEMORY.mdreference.md

特性

  • 文件即记忆memory/MEMORY.md(纯索引)+ memory/*.md(正文)。
  • 索引格式- [类别] 主题:一句话摘要 → 文件名.md
  • 敏感信息拦截:token / cookie / password / 密钥 / JWT / .env 命中即拒存(返回 ok:false)。
  • 工作区感知根目录:优先 sandboxPolicy.resolve({ session })(会话 cwd),回退 config.memoryRootprocess.cwd()
  • 检索:中英分词 + 多字段 + 正文 + 新鲜度加权;catalog 可当「列记忆」用。
  • 防膨胀maxReferenceEntries 给 reference 设上限,自动裁最旧。

安装

方式 A:一键安装(Bundle,推荐)

本仓库是一个 dsh Bundle(package.json 声明了 dsh.bundle.patch)。其他用户用 dsh plugin 直接装到自己的 profile:

# Git 源(锁定 commit 更稳)
dsh plugin --profile web add github:<owner>/dsh-project-memory#<sha>

# 或 npm(若已 pnpm publish)
dsh plugin --profile web add dsh-project-memory

# 或 tarball(pnpm pack 产物)
dsh plugin --profile web add ./dsh-project-memory-0.1.0.tgz

装完重启 dsh 进程生效(node 半侧无热加载)。插件零外部依赖、无构建步骤,git 源装上即可用;若 pnpm 对 git 依赖提示 allowBuilds,按提示在 profile 的 pnpm-workspace.yaml 加一行后重跑。

校验 / 移除:

dsh --profile web --dump-config | grep -A2 project-memory
dsh plugin --profile web remove dsh-project-memory

方式 B:手动本地插件(不打包也行)

插件是零依赖的单文件 .ts,不走包管理也可以:

  1. 下载 memory-plugin.ts 到本机。
  2. 在你 profile 的 cordis.patch.yml 加一行(name 用绝对路径):
- insert:
    - id: project-memory
      name: '/absolute/path/to/memory-plugin.ts'
      # config:
      #   toolPrefix: ''            # 需要命名空间时,如 'proj_' → proj_memory_upsert
      #   memoryRoot: ./memory      # 默认 = 会话工作区 /memory
      #   maxReferenceEntries: 200  # reference.md 最多保留条数
  1. 重启 dsh。

配置

默认说明
memoryRoot会话工作区 /memory记忆根目录(绝对或相对,相对按会话工作区解析)
indexFilenameMEMORY.md索引文件名
referenceFilenamereference.md收尾沉淀固定文件名
toolPrefix''工具名与 systemPrompt 节名的前缀
maxReferenceEntries无限制reference.md 最多保留条数,超出裁最旧

触发规则(插件会自动注入为系统提示节)

  • 会话/任务开始:memory_load_context 载入相关记忆。
  • 仅当用户明确要求「记住 / 以后都按这个来 / 以后都这样做」:memory_upsert
  • 非平凡任务收尾:memory_finalize 沉淀一条。
  • 过期或被取代的记忆:memory_forget 删除。
  • 绝不存密钥:写工具会拒绝并返回 ok:false

30 秒验证

  1. 会话 A:记住:这个项目用 pnpm 打包。 → 确认调用了 memory_upsert 且成功。
  2. 会话 B(新会话,勿复制 A 的对话):这个项目怎么打包? → 确认调用了 memory_load_context 并复述 pnpm。

兼容性

  • 测试于 deepseek-harness(Node ≥ 22)。Bundle 入口为预编译 memory-plugin.js;本地 .ts 方式(方式 B)由 Node 原生 type-stripping 加载(开发环境 tsx)。
  • 零外部依赖:运行期只 import node:fs / node:pathdefineToolContext 等均已内联/本地化,因此本地插件、Bundle、user preset 任一形态都能直接加载,不会踩 @deepseek-ai/* 解析不到的 ERR_MODULE_NOT_FOUND

License

MIT

Versions

Latest versionPublishedSize
0.1.0

Comments

Loading…

From the same category

dsh-infinite-gen-4

by Minglink

DeepSeek v4.1 flash 网络安全红队工具(无限四代) — jailbreak prompts and test suite for DeepSeek 求 Star 收藏 ⭐欢迎大家提交项目的改进

Sessions & MessagesManifest valid

1.9k

MIT

JavaScript

Sep 18, 2026

dsh plugin --profile web add dsh-infinite-gen-4

by liangmianya

A visual, non-linear conversation workspace plugin for DeepSeek Harness ; A canvas-based session explorer and branching workspace for DeepSeek Harness.

Terminal & ClientsSessions & MessagesManifest valid

414

240/wk

MIT

JavaScript

Aug 26, 2026

dsh plugin --profile web add dsh-synapse

by ranxianglei

基本稳定可用 100K tokens is enough. Universal context-compression proxy for ALL AI coding agents,10w上下文足矣

Sessions & MessagesManifest valid

233

49.4k/wk

MIT

TypeScript

Sep 21, 2026

dsh plugin --profile web add billion-context

by Nwflower

Import 14+ external agent chat histories (Claude Code, Codex, ChatGPT, Cursor, Gemini, Reasonix, opencode, ZCode, Grok Build, OpenClaw, Pi, Hermes, Kimi CLI, DSH) into DeepSeek Harness as resumable se

Development & InfrastructureSessions & MessagesManifest valid

193

MIT

JavaScript

Sep 21, 2026

dsh plugin --profile web add dsh-chat-import

by Totoro-qaq

DeepSeek Harness plugin for previewable cross-preset session migration. Fixed-schema handoffs preserve state, source-model intent, and unresolved images; the original session stays untouched.

Tools & CapabilitiesSessions & MessagesDevelopment & InfrastructureManifest valid

165

MIT

JavaScript

Sep 21, 2026

dsh plugin --profile web add dsh-plugin-bridge

by Anionex

deepseek harness对话和代码状态回退插件 | DSH — rewind conversation and workspace state, powered by a persistent Change Ledger

Tools & CapabilitiesSessions & MessagesTerminal & ClientsManifest valid

117

BSD-3-Clause

JavaScript

Sep 14, 2026

dsh plugin --profile web add @anionex/dsh-turn-rewind