IAMLieutenant/dsh-tool-user-memory
DeepSeek Harness 用户记忆插件
Project Overview项目介绍
This is a natively built plugin for DeepSeek Harness that adds persistent cross-session user memory capability to DSH agents. By default, every new DSH session starts with a blank slate, and the agent has no prior knowledge of your existing preferences, project background, or communication style, forcing you to repeat all your setup information every time you start a new conversation. This plugin solves that common annoyance by storing a persistent user profile that is automatically loaded for every new session, so you never have to repeat your preferences or background information again.
It exposes two tool functions for agents to work with the memory: memory_update that creates, appends, or removes user preference entries, and memory_get that retrieves stored preferences when a personalized response is needed. Every new session automatically injects the stored user profile into the system prompt, and it consumes zero extra tokens when the profile is empty, so you don’t have to worry about unnecessary overhead when you first start using it. All preferences are stored in a plain, human-readable markdown file at $DSH_HOME/user-memory/user.md, which you can read, edit, or delete manually at any time if you need to adjust your preferences.
Installation is straightforward, and you can install it with a single command that handles all dependencies automatically, no manual setup or extra configuration required out of the box. To install it on your preferred DSH profile, just run dsh plugin --profile <profile-name> add dsh-tool-user-memory then restart your DSH session to activate the plugin. You can also install it from source by cloning the GitHub repo, building it with npm, and adding the packed tarball to your profile. The plugin is released under the permissive open-source MIT license, and all core functionality is already fully tested and stable for daily use.
这是一个专为 DeepSeek Harness 开发的原生插件,核心功能是为 DSH 代理提供跨会话的持久化用户偏好记忆。默认情况下,DSH 每次新建会话都是独立的,代理不了解用户的语言习惯、沟通风格、项目背景等信息,需要用户重新交代。该插件为代理添加了持久化用户画像存储,让每个新会话启动时就能自动读取用户偏好,无需用户重复说明。
插件提供两个核心工具和一个自动注入能力:memory_update 用于自动记录、追加或删除用户偏好,memory_get 用于需要个性化回答时主动读取用户画像,每个会话还会自动把用户画像注入系统提示词,空画像不消耗额外 token。偏好存储在 $DSH_HOME/user-memory/user.md 文件中,是人类可读的 Markdown 格式,支持手动编辑、删除,操作非常直观可控。
安装十分简便,推荐使用一条命令 dsh plugin --profile <名称> add dsh-tool-user-memory 完成安装,重启 DSH 会话即可生效。也支持从 GitHub 源码手动安装,默认零配置即可使用,支持自定义存储路径、文件大小上限等参数。本插件采用 MIT 许可开源,核心功能已完成全流程测试,稳定可用。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-tool-user-memory(IAMLieutenant/dsh-tool-user-memory)
仓库:https://github.com/IAMLieutenant/dsh-tool-user-memory
本站详情页:https://www.yhbd.top/plugins/iamlieutenant-dsh-tool-user-memory/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 3 · 最近提交 2026-08-17 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add dsh-tool-user-memory
把 IAMLieutenant/dsh-tool-user-memory 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-tool-user-memory
DeepSeek Harness 用户偏好记忆插件:让 agent 跨会话记住你的偏好——语言习惯、沟通风格、项目背景、目标……每个新会话都不必重新自我介绍。
独立开源插件 —— 作为 DeepSeek Harness 社区生态的一部分独立开发与维护 (GitHub 话题:
dsh-plugin)。 与官方仓库无关;直接通过 npm 安装,30 秒启用。
1. 项目介绍
它解决什么问题
默认情况下,DeepSeek Harness 的 agent 每次新会话都是"陌生人":不知道你偏好简洁还是详细、不知道你做什么项目、不知道你用什么语言交流——每个新会话都得重新交代一遍。
这个插件给 agent 加了一块持久化的用户画像:
- 你说一句"我喜欢简洁的中文回答",agent 把它写进记忆文件;
- 之后每一个新会话,这段记忆会自动注入系统提示词,agent 天生就知道——不用你提醒,也不用调工具。
核心能力
| 能力 | 说明 |
|---|---|
memory_update(key, value, mode?) |
agent 学到你的稳定偏好时,自动记录 / 追加 / 删除 |
memory_get(query?, limit?) |
需要个性化回答时,主动读取你的画像 |
{{user_profile}} 系统提示词注入 |
每个会话每轮自动携带你的画像(空画像零 token 成本) |
| 持久化存储 | $DSH_HOME/user-memory/user.md,人类可读、可手改、可删除 |
工作原理(30 秒版)
你说"记住:我喜欢简洁的中文回答"
→ agent 决定调用 memory_update
→ 写入 $DSH_HOME/user-memory/user.md(原子写、仅属主可读)
→ 之后每个新会话:系统提示词自动注入画像 → agent 天生认识你
2. 下载与安装
前置条件
- 已安装并跑通 DeepSeek Harness(
dshCLI;已在 0.1.0-rc.x 验证) - 无需单独安装 npm 包!
dsh plugin会替你装好
安装(推荐:一条命令)
在你想启用的 profile 上安装,例如 web:
dsh plugin --profile web add dsh-tool-user-memory
headless 或其他 profile 同理:
dsh plugin --profile headless add dsh-tool-user-memory
然后重启你的 dsh 会话(web 模式重启 dsh web),插件即生效。
安装做了两件事:1) 把包加入 profile 依赖;2) 因包声明了
dsh.bundle.patch, 自动把它激活进 profile 的 bundle 层(见下方验证)。
备用:从 GitHub 源码安装
git clone https://github.com/IAMLieutenant/dsh-tool-user-memory.git
cd dsh-tool-user-memory
npm install && npm run build
npm pack # 生成 dsh-tool-user-memory-0.1.2.tgz
dsh plugin --profile web add ./dsh-tool-user-memory-0.1.2.tgz
手动配置(可选)
默认零配置即可用。如需调整,在 profile 的 cordis.patch.yml 覆盖(按行 id tool-user-memory):
| 配置项 | 默认值 | 含义 |
|---|---|---|
path |
$DSH_HOME/user-memory/user.md |
画像文件路径 |
maxBytes |
8192 |
画像文件体积上限;超限时按最旧优先逐条淘汰 |
promptMaxBytes |
2048 |
每轮系统提示词注入的字节预算(新近优先);设为 0 注入完整画像 |
includeInPrompt |
true |
是否在每个会话的系统提示词中注入画像 |
3. 验证安装成功
方法 1:检查 profile 配置
打开 profile 的 package.json(如 $DSH_HOME/profiles/web/package.json),
dsh.profile.bundles 中应包含 dsh-tool-user-memory:
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
ruvnet/ruflo
Tencent/WeKnora
EverMind-AI/EverOS
MemTensor/MemOS
plastic-labs/honcho
agentscope-ai/ReMe
zilliztech/memsearch
vshulcz/deja-vu