powercontext-dsh
通过 HTTP 连接 PowerContext Server 的 DeepSeek Harness 插件,提供召回、记忆、交接、经验与技能。
knqiufan
@knqiufan
⬇ 1
★ 8
main
安装
dsh plugin --profile web add github:knqiufan/powercontext-dsh
需要可复现安装时,可在仓库后追加 #commit 固定提交。
通过 HTTP 连接 PowerContext Server 的 DeepSeek Harness 插件,提供召回、记忆、交接、经验与技能。
该插件未提供要点说明,请参考仓库 README。
dsh-plugindeepseek-harness
- 安装并启动 DeepSeek Harness:
npx @deepseek-ai/dsh web - 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
- 用 dsh plugins list 确认已安装,必要时重启 Harness 生效
插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。
| 代码仓库 | github.com/knqiufan/powercontext-dsh |
| 许可证 | Apache-2.0 |
| 主要语言 | main |
| 下载量 | 1 |
| GitHub 星标 | 8 |
| 最近推送 | 2026-08-13 |
| 收录日期 | 2026-09-19 |
| 分类 | 会话与消息 |
事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。
以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。
# PowerContext for DeepSeek Harness
**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.
```bash
dsh plugin --profile web add
```
## 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 cover the common paths. Everything else is reachable through `pc_call` by OpenAPI `operationId`. Skill `project-context` documents the same workflow for the model. If the Server is unreachable, recall is skipped and the turn continues.
| Area | Tools | HTTP |
|---|---|---|
| Memory | `pc_search` `pc_remember` `pc_memory_list` `pc_memory_get` `pc_memory_revise` `pc_memory_retire` | `/v1/memory/*` |
| Context | `pc_prepare_context` `pc_capture_source` | `/v1/context/prepare`, `/v1/sources/content` |
| Handoff | `pc_handoff_activate` `pc_handoff_prepare` `pc_handoff_finalize` `pc_handoff_commit` `pc_handoff_continue` | `/v1/handoff/*` |
| Experience / Skill | `pc_experience_generate` `pc_experience_get` `pc_skill_generate` `pc_skill_get` | `/v1/experience/*`, `/v1/skill/*` |
| Review | `pc_review_list` `pc_review_get` | `/v1/artifact-candidates/*` |
| Everything else | `pc_call` | All `operationId`s (health, stats, external skills, handoff reports, …) |
See [`openapi/powercontext.yaml`](openapi/powercontext.yaml) for the full contract.
## Quick start
PowerContext Server and DeepSeek Harness are two processes. Both are required.
### Start the Server
```bash
uv tool install "powercontext[cli,server] @ git+https://github.com/oceanbase/powercontext.git@master"
powercontext server run
```
From a PowerContext checkout you can use `uv run powercontext server run` instead.
Defaults: `http://127.0.0.1:8000`, no authentication, SQLite under the user data directory (`POWERCONTEXT_HOME` overrides it).
```bash
curl http://127.0.0.1:8000/health/live
curl http://127.0.0.1:8000/health/ready
```
`live` must succeed. `ready` may be `degraded` when inference is not configured.
### Install the plugin
Install DeepSeek Harness first and make sure the web profile exists (run `dsh web` once).
**GitHub Release (recommended).** Download `powercontext-dsh-*.tgz`:
```bash
dsh plugin --profile web add ./powercontext-dsh-0.0.2.tgz
```
If the plugin is already installed from a source checkout, remove it first. On Windows, replacing a `link:` install with a tarball fails because pnpm tries to recreate nested `node_modules` symlinks.
A Release download URL works the same way.
**Source checkout:**
```bash
dsh plugin --profile web add /path/to/powercontext-dsh
```
Rebuild after TypeScript changes: `pnpm install`, `pnpm test`, `pnpm build`, then restart `dsh web`.
**npm (after publish):**
```bash
dsh plugin --profile web add powercontext-dsh
```
`uv` / `powercontext` do not install this plugin into Harness.
Optional check:
```bash
dsh --profile web --dump-config
```
The dump should contain `id: powercontext-dsh`.
Remove the plugin:
```bash
dsh plugin --profile web remove powercontext-dsh
```
### Use it
Keep the Server running, then:
```bash
dsh web
```
Open a project and chat as you normally would. The plugin recalls context and stores user input in the background. When the model needs to read or write memory, hand off work, or generate experience / skills, it calls the corresponding `pc_*` tools.
You can type `/pc doctor` in the chat to check that the Server is reachable.
## Configuration
Environment variables override patch config. Do not put secrets in files that `--dump-config` can print.
| Field | Environment variable | Default | Meaning |
|---|---|---|---|
| `baseUrl` | `POWERCONTEXT_DSH_BASE_URL` | `http://127.0.0.1:8000` | Server root URL, no trailing slash |
| `authorization` | `POWERCONTEXT_DSH_AUTHORIZATION` | empty | Full `Bearer ` |
| `scopeId` | `POWERCONTEXT_DSH_SCOPE_ID` | empty | Overrides automatic project scope |
| `timeoutMs` | — | `4000` | Shared recall + capture budget |
| `requestTimeoutMs` | — | `1000` | Single HTTP timeout |
| `maxBytes` | — | `8000` | `prepare_context` budget |
| `capturePrompts` | `POWERCONTEXT_DSH_CAPTURE_PROMPTS` | `true` | Persist user input as a Source |
| `flushOnCapture` | `POWERCONTEXT_DSH_FLUSH_ON_CAPTURE` | `false` | Flush immediately after capture |
For durable non-secret defaults, edit `~/.dsh/profiles/web/cordis.patch.yml`. Harness **replaces the whole `config` object** for that row, so restate every key you still need:
```yaml
- id: powercontext-dsh
config:
baseUrl: https://pc.example.com
timeoutMs: 4000
requestTimeoutMs: 1000
maxBytes: 8000
capturePrompts: true
flushOnCapture: false
```
### Remote Server
The plugin runs inside the Harness process. The browser never calls PowerContext. The default Server bind is `127.0.0.1`. A remote Server must listen more widely and enable auth. Put TLS in front before exposing it on a network.
```bash
export POWERCONTEXT_SERVER_HTTP_HOST=0.0.0.0
export POWERCONTEXT_SERVER_HTTP_PORT=8000
export POWERCONTEXT_SERVER_AUTH_ENABLED=true
export POWERCONTEXT_SERVER_AUTH_TOKEN=
powercontext server run
```
Publish the API root users actually use, for example `https://pc.example.com`. No trailing slash, and no `/mcp`.
```bash
export POWERCONTEXT_DSH_BASE_URL=https://pc.example.com
export POWERCONTEXT_DSH_AUTHORIZATION="Bearer "
dsh web
```
`POWERCONTEXT_DSH_AUTHORIZATION` must be the full `Bearer ` and must match `POWERCONTEXT_SERVER_AUTH_TOKEN`. Keep the token in the environment variable, not in the patch file.
Common Server variables:
| Variable | Meaning |
|---|---|
| `POWERCONTEXT_SERVER_HTTP_HOST` / `_PORT` | Listen address |
| `POWERCONTEXT_SERVER_AUTH_ENABLED` / `_TOKEN` | Static Bearer |
| `POWERCONTEXT_HOME` | Data directory |
| `POWERCONTEXT_SERVER_RUNTIME_SCHEDULE_SECONDS` | Extraction interval; unset disables the job |
| `POWERCONTEXT_SERVER_INFERENCE_GENERATION_MODEL` | Generation model used for extraction |
## Development
HTTP operations are generated from [`openapi/powercontext.yaml`](openapi/powercontext.yaml). Update that file (or set `POWERCONTEXT_OPENAPI`) and run `pnpm build` when the Server contract changes.
```bash
pnpm install
pnpm test
pnpm build
```
- Push to `main` / `master`: run `pnpm test` and `pnpm build`, and check that `lib/` plus the generated table are committed.
- Pull requests: `pnpm test` only.
- GitHub Release is manual: Actions → **Release** → Run workflow → version such as `0.1.0`. The asset is `powercontext-dsh-X.Y.Z.tgz`.
## License
[Apache License 2.0](LICENSE)
数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。