knqiufan/powercontext-dsh ↗★ 11
powercontext-dsh
DeepSeek Harness plugin that connects to a PowerContext Server over HTTP for recall, memory, handoff, experience, and skills.
AI 분석
核心用途是连接 PowerContext 服务以增强 Agent 的上下文召回与记忆能力。适合需要跨项目、跨会话进行经验和技能管理的复杂任务。必要条件是同时运行 PowerContext 服务端。
설치
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:knqiufan/powercontext-dshConfiguration
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:
- 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.
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.
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 |