powercontext-dsh:DeepSeek Harness 的长期记忆与上下文管理插件

knqiufan/powercontext-dsh

记忆与上下文已验证
收录时间 2026-08-20
页面最后更新 2026-08-20

DSH plugin 通过 HTTP 连接 PowerContext 服务器,实现记忆召回、交接与经验技能管理。

通过 HTTP 连接 PowerContext Server,为 DeepSeek Harness 提供 recall、memory、handoff、experience 和 skills 能力,解决 Agent 长期记忆问题。

install
dsh plugin --profile web add github:knqiufan/powercontext-dsh
分类
记忆与上下文
平台
DSH-Plugin
作者
knqiufan
分发方式
插件

powercontext-dsh 核心特性

自动召回上下文捕获用户输入记忆搜索与操作交接与经验技能人工审核工具

powercontext-dsh 仓库信息

knqiufan
发布者
knqiufan
仓库
knqiufan/powercontext-dsh
11
Star
1
Fork
0
Watch
0
开放 Issue
语言TypeScript
许可证Apache License 2.0
官网
仓库最近更新2026-08-19 14:41:17
仓库创建时间2026-08-14 01:42:15
主题
deepseek-harnessdsh-plugin
默认分支main

powercontext-dsh 仓库简介

PowerContext for DeepSeek Harness 是 DeepSeek Harness(DSH)的记忆与上下文插件(DSH plugin),它通过 HTTP 连接到一个正在运行的 PowerContext Server,为 Agent 提供 recall、memory、handoff、experience 和 skills 等能力。该插件不内嵌存储、不启动 Server,也不导入 Python 包,而是调用 Server 的 /v1/... OpenAPI 接口,因此需要同时运行 PowerContext Server 和 DeepSeek Harness 两个进程。它解决了 Agent 长期记忆与上下文管理的问题,在每次模型步骤前自动召回有界上下文并注入为不可信的历史证据,同时捕获当前用户输入作为内容源。

PowerContext for DeepSeek Harness 这个 DSH plugin 支持哪些核心特性?

该插件通过 HTTP 调用 Server 的 /v1/... OpenAPI 接口(不使用 MCP),在每次模型步骤前自动执行两个操作:用 POST /v1/context/prepare 召回有界上下文并注入为不可信历史证据,用 POST /v1/sources/content 捕获当前用户输入。命名工具 pc_* 暴露了 Memory、handoff、experience、skill 和只读 review 操作,例如 pc_searchpc_rememberpc_handoff_activatepc_experience_generatepc_skill_get 等。DSH 会在命名变更操作执行前请求一次性用户批准,而 review 变更操作则保持为显式的人类 /pc review 命令,破坏性和管理性 OpenAPI 操作不作为模型工具。如果 Server 不可达,召回会被跳过,对话继续。

PowerContext for DeepSeek Harness 怎么安装?

安装前需先安装 DeepSeek Harness 并确保 web profile 存在(运行一次 dsh web)。推荐使用 PowerContext CLI 的 setup dsh 命令,它会自动调用 dsh plugin --profile web add 并保持 ref 对齐。也可以从本独立仓库的 GitHub Release tarball 安装。安装命令如下:

bash
# 使用 PowerContext CLI(推荐)
powercontext setup dsh --source oceanbase/powercontext --ref master

# 或本地 checkout
powercontext setup dsh --source /path/to/powercontext

# 或手动添加插件目录
dsh plugin --profile web add /path/to/powercontext/integrations/dsh/plugins/powercontext

# 或从 tarball 安装
dsh plugin --profile web add ./powercontext-dsh-0.0.3.tgz

如果插件已从源码 checkout 安装,需先移除再安装 tarball(Windows 上替换 link: 安装会失败)。TypeScript 修改后需重新构建:pnpm installpnpm testpnpm build,然后重启 dsh web。可选检查:powercontext doctor 检查 Server,powercontext doctor dsh 检查 CLI 和插件 id。

PowerContext for DeepSeek Harness 兼容哪些 DeepSeek Harness 版本和平台?

该插件由 knqiufan 维护,采用 Apache-2.0 许可证,使用 TypeScript 编写,最近更新于 2026-08。它依赖多个官方 DSH 包(如 @deepseek-ai/dsh-agent@deepseek-ai/dsh-tools 等),并作为官方 PowerContext 仓库的一部分同步维护(位于 integrations/dsh/plugins/powercontext)。插件通过 HTTP 与 Server 通信,因此理论上兼容任何支持 HTTP 的平台,但需要同时运行 PowerContext Server 和 DeepSeek Harness。

查看更多 DSH 插件,访问 dsh-plugin.org

DSH-Plugin 常见问题