跳到正文

knqiufan/powercontext-dsh

101最近提交 2026年8月16日

powercontext-dsh DSH 插件

PowerContext-DSH 是一个 DeepSeek Harness 插件,通过 HTTP 与运行中的 PowerContext 服务器集成。它在每个模型步骤前自动回忆上下文并捕获用户输入,并公开内存、交接、体验、技能和审查等命名工具。插件不内嵌存储、不启动服务器、也不导入 Python 包。

如何安装 powercontext-dsh DSH 插件

dsh plugin --profile web add /path/to/powercontext/integrations/dsh/plugins/powercontext

复制不会执行命令。安装 powercontext-dsh DSH 插件前请核对仓库和版本。

powercontext-dsh DSH 插件数据来源

powercontext-dsh DSH 插件快照日期:2026年8月16日

discovered

powercontext-dsh DSH 插件能做什么

  • 通过 POST /v1/context/prepare 回忆有界上下文并作为历史证据注入
  • 通过 POST /v1/sources/content 捕获用户输入作为内容源
  • 提供 pc_* 工具用于内存操作(搜索、记住、列表、获取、修改、删除)
  • 提供 pc_* 工具用于交接操作(激活、准备、完成、提交、继续)
  • 提供 pc_* 工具用于体验和技能的生成与获取
  • 提供 pc_* 工具用于审查列表和获取
  • 支持通过环境变量配置远程 PowerContext 服务器及认证
  • 通过 /pc doctor 聊天命令检查服务器可达性

powercontext-dsh DSH 插件适合哪些场景

  • 在 DSH 对话中通过 PowerContext 服务器实现持久化记忆
  • 将复杂任务交接给其他代理或工作流
  • 生成和获取体验/技能条目以提升模型表现
  • 在提交前审查和管理候选工件
  • 通过自动回忆相关信息保持跨轮次上下文一致性

powercontext-dsh DSH 插件适合谁

  • 使用 DeepSeek Harness 的开发者,需要持久化记忆和上下文管理后端
  • 部署 PowerContext 服务器并希望与 DSH 集成的团队

powercontext-dsh DSH 插件的限制

  • 需要运行中的 PowerContext 服务器(不包含在内);插件不启动或管理服务器
  • 服务器必须可通过 HTTP 访问;如果不可达,则跳过回忆,本轮继续但无上下文
  • 默认服务器绑定 127.0.0.1:8000 且无认证;远程部署需配置 TLS 和认证
  • 插件不支持 MCP,仅使用 OpenAPI /v1/... 端点
  • 在 Windows 上,用 tarball 替换链接类型安装会失败(pnpm 符号链接问题)

powercontext-dsh DSH 插件的仓库 README 摘录

以下文字摘自 powercontext-dsh DSH 插件的上游仓库 knqiufan/powercontext-dsh 的 README,版权归原作者,仅作引用。

**English** | [中文](README.zh.md) DeepSeek Harness plugin that connects to a running [PowerContext](https://github.com/oceanbase/powercontext) Server over HTTP for recall, memory, handoff, experience, and skills. It does not embed storage, start the Server, or import the Python package. The same plugin is also integrated into official PowerContext at [`integrations/dsh/plugins/powercontext`](https://github.com/oceanbase/powercontext/tree/master/integrations/dsh/plugins/powercontext). This standalone repository and the in-tree plugin stay in sync: fixes and improvements land in both places. ```bash dsh plugin --profile web add <path-or-tarball> ``` ## Features The plugin calls the Server’s `/v1/...` OpenAPI surface over HTTP. It does not use MCP. Before each model step it automatically: 1. **Recalls** bounded context with `POST /v1/context/prepare` and injects it as untrusted historical evidence. 2. **Captures** the current user input as a Content Source with `POST /v1/sources/content`. Named `pc_*` tools expose the agent-safe Memory, handoff, experience, skill, and read-only review operations. DSH requests one-time user approval before named mutations run. Review mutations r

阅读完整 README仓库许可: Apache-2.0

powercontext-dsh DSH 插件常见问题

如何安装 PowerContext-DSH 插件?

确保已安装 DeepSeek Harness 并且 web 配置文件存在(运行一次 `dsh web`)。然后使用 `dsh plugin --profile web add <路径或tarball>` 安装。你也可以使用 PowerContext CLI:`powercontext setup dsh --source oceanbase/powercontext --ref master`。如果本地有 PowerContext 仓库,指向该路径。对于发布的 tarball,使用 `dsh plugin --profile web add ./powercontext-dsh-X.Y.Z.tgz`。

是否需要单独运行 PowerContext 服务器?

是的,插件通过 HTTP 连接一个正在运行的 PowerContext 服务器。它不内嵌存储也不启动服务器。你必须使用 `powercontext server run` 启动服务器(默认地址 http://127.0.0.1:8000)。服务器和插件应使用相同的 Git ref。服务器不包含在插件包中——请单独安装:`uv tool install "powercontext[cli,server] @ git+https://github.com/oceanbase/powercontext.git@master"`。

插件提供了哪些工具?

插件提供了以 `pc_` 为前缀的命名工具:内存工具(pc_search、pc_remember、pc_memory_list、pc_memory_get、pc_memory_revise、pc_memory_retire)、交接工具(pc_handoff_activate、pc_handoff_prepare、pc_handoff_finalize、pc_handoff_commit、pc_handoff_continue)、体验/技能工具(pc_experience_generate、pc_experience_get、pc_skill_generate、pc_skill_get)和审查工具(pc_review_list、pc_review_get)。它还会在每个模型步骤前自动回忆上下文并捕获用户输入。

能否将插件用于远程 PowerContext 服务器?

可以,通过环境变量 `POWERCONTEXT_DSH_BASE_URL` 配置服务器 URL(默认 http://127.0.0.1:8000)。对于远程服务器,请在服务端启用认证:设置 `POWERCONTEXT_SERVER_AUTH_ENABLED=true` 和 `POWERCONTEXT_SERVER_AUTH_TOKEN=<长随机密钥>`,然后在插件端传递 `POWERCONTEXT_DSH_AUTHORIZATION="Bearer <token>"`。在暴露到网络之前,请确保在服务器前配置 TLS。

如果 PowerContext 服务器无法访问会怎样?

如果在回忆步骤中服务器不可达,插件会跳过回忆,本轮继续但不会注入上下文。用户输入捕获也可能根据配置跳过。在服务器恢复之前,模型将无法使用内存或其他工具。你可以通过 `/pc doctor` 聊天命令检查连接状况。