ZHI-QI/dsh-okf-memory 预览 preview

ZHI-QI/dsh-okf-memory

dsh-okf-memory: 会话记忆 → OKF 知识沉淀插件(神经自我学习驱动)。Session-to-OKF memory plugin: predictive recall, uncertainty-driven capture, reinforcement feedback, consolidation & forgetting.

Project Overview项目介绍

This is a native memory plugin built exclusively for DeepSeek Harness (DSH) that automatically captures high-value content from conversations and stores it as long-term memory following the OKF v0.1 specification. It supports cross-session memory recall and updates memory weights based on user interactions like selection, skipping, and error correction, to continuously improve the accuracy of Agent responses over time. It can be installed in one line via the DSH CLI from npm, GitHub source, or a local checked out copy, and regular usage does not require any extra build steps after installation.

After installation, no manual command input is required to use the plugin. It automatically injects a memory discipline system prompt into the Agent, letting the Agent autonomously decide what content to store or retrieve, while also allowing users to manually trigger memory operations with explicit instructions. Five built-in tools cover all common memory management workflows: writing new memory, searching by keyword, reading full memory content, forgetting unwanted entries, and exporting graph data for visualization. It is ideal for DSH users who need to accumulate long-term context knowledge and improve Agent output quality.

The plugin is released under the open source MIT license, and has no extra runtime dependencies for end users. The only required peer dependency, @deepseek-ai/cordis, is provided by the DSH runtime, so any peer dependency warning that appears during installation can be safely ignored. By default, the memory library is stored at ~/.dsh/memory/, and users can customize the path via the OKF_MEMORY_ROOT environment variable or the plugin’s settings. A full set of test scripts is also included for developers to debug and validate functionality.

这是一款专为 DeepSeek Harness 开发的原生插件,核心功能是将会话中的高价值内容按照 OKF v0.1 规范自动沉淀为长期记忆,支持跨会话自动唤起,并通过用户选择、跳过、纠错等操作作为学习信号持续更新记忆权重,让 Agent 回答越来越准确。用户可通过 DSH 命令行工具一键从 npm、GitHub 源码或本地检出安装,普通使用无需额外构建步骤。

安装完成后无需手动输入命令,插件会自动为 Agent 注入记忆纪律系统提示,让 Agent 自主判断需要记忆和检索的内容,也支持用户主动输入指令触发记忆写入或查询。插件内置 okf_remember、okf_search 等 5 个工具,分别对应写入记忆、关键词召回、精读记忆、撤回记忆和导出图谱数据,满足不同场景下的记忆管理需求,适合需要长期积累上下文知识、优化 Agent 输出的 DSH 日常用户。

该插件遵循 MIT 开源协议,零额外运行时依赖,仅需要的 peer 依赖 @deepseek-ai/cordis 由 DSH 运行时提供,安装过程中出现的 peer 依赖警告可以忽略。默认记忆库存储路径为 ~/.dsh/memory/,可通过环境变量 OKF_MEMORY_ROOT 或插件设置自定义修改,还自带完整的测试脚本供开发者调试功能。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • 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-okf-memory

把 ZHI-QI/dsh-okf-memory 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-okf-memory

English | 简体中文

会话记忆 → OKF 知识沉淀插件(神经自我学习驱动)

把会话中高价值内容按 OKF v0.1 规范自动沉淀为长期记忆,跨会话自动唤起。Agent 越用越准:每次选择、跳过、纠错都是学习信号,记忆权重持续更新。

Session-to-OKF memory plugin with neuro-self-learning: predictive recall, uncertainty-driven capture, reinforcement feedback, consolidation & forgetting.

记忆图谱 · 神经自我学习

dshfind

特性

  • 记忆四阶段闭环:捕获 → 概念化 → 沉淀 → 唤起
  • OKF v0.1 合规:每个概念是标准 Markdown 文档(frontmatter 硬要求 type),index.md 渐进式目录 + log.md 变更历史,交叉链接用包内绝对路径
  • 神经自我学习驱动:预测性唤起(先预测再检索校验)、不确定性量化(置信低扩大探索)、预测误差驱动捕获(用户纠正/首次披露触发写入)、权重衰减+归档(巩固与遗忘)
  • 强化反馈回路:score = relevance × weight × recency,用户选中候选权重↑、跳过权重↓
  • 技术选型记忆(TechChoice):前端/后端/语言/方案/配置 按维度沉淀候选表 + 当前使用;三档选择规则(多候选展示、单候选直用、领域命中按维度)
  • 写入许可门:type 合法性 → 去重(互补不复制,互建交叉链接)→ OKF 符合性校验
  • 记忆图谱可视化(M2):client 面板在 DSH 对话视图渲染力导向记忆图谱——节点大小=权重、颜色=类型;搜索命中→脉冲光环+⚡命中+神经传导;滚轮缩放/拖拽平移/拖节点/悬停详情
  • 图谱数据接口:okf_graph 工具 + service.graph 输出 {nodes,edges,timeline} JSON,契约稳定,可被任意前端复用

安装

# 任意 profile(如 web):已发布到 npm,一行安装,免构建授权
dsh plugin --profile web add dsh-okf-memory
# 或从本地 checkout(开发用):
dsh plugin --profile web add ./dsh-okf-memory
# 或从 GitHub 源码(需 prepare 构建并向用户授权构建):
dsh plugin --profile web add github:ZHI-QI/dsh-okf-memory

已发布到 npm:dsh-okf-memory@0.1.0 → https://www.npmjs.com/package/dsh-okf-memory

插件零运行时依赖(peer 依赖 @deepseek-ai/cordis 由 dsh 运行时提供,安装时若有 peer 警告可忽略),安装即用,无需构建脚本。

如何使用

装好后你无需手敲命令。插件会给 Agent 注入一段「记忆纪律」系统提示,让它在会话里自主判断该记什么、该查什么,并调用下面的工具完成。你也可以随时显式地说「记住XX」或「查一下记忆里关于XX的」来主动触发。

5 个工具一览

工具 作用 什么时候用
okf_remember 写入一条记忆(自动去重、校验、落盘) 有值得沉淀的新知识时
okf_search 按关键词召回,按权重/近因排序 开场预取、回答前找相关记忆
okf_read 精读某条全量(含交叉链接),并记录一次使用反馈 需要完整细节时
okf_forget 撤回一条记忆 记错 / 不需要时
okf_graph 导出记忆图谱 JSON(nodes/edges/timeline) 可视化 / 传递图谱数据

让它记住(写入)

  • 自动(推荐):你在对话里披露新事实、拍板决策、纠正 Agent、提到技术选型时,Agent 会自己判断是否值得记,不用你开口。
  • 手动:直接说「记住…」即可触发,例如 记住,我的三家门店是韶山/湘乡/塘厦,共用局域网共享文件夹。

什么才算「值得记」:新背景事实/偏好、决策及理由、可复用方法论/流程/经验教训、用户纠正、被确认的反直觉结论、技术选型。 不记:寒暄、单轮临时任务、已有记忆的重复内容、未验证的猜测(猜测归入 Idea,等成熟再沉淀)。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-tokenslash 下一个 Next dsh-icon-console →