Skip to content

feat(dsh): add DeepSeek Harness plugin - #1239

Merged
Teingi merged 4 commits into
oceanbase:masterfrom
knqiufan:feat/dsh-plugin
Aug 14, 2026
Merged

feat(dsh): add DeepSeek Harness plugin#1239
Teingi merged 4 commits into
oceanbase:masterfrom
knqiufan:feat/dsh-plugin

Conversation

@knqiufan

@knqiufan knqiufan commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

Not linked to an existing issue.

Rationale for this change

DeepSeek Harness is a supported agent host. PowerContext already has Codex and HTTP/MCP surfaces; this change adds a first-class DSH plugin so a running Server can recall bounded context and maintain Memory from dsh web without embedding Python or MCP.

What changes are included in this PR?

  • Add integrations/dsh/plugins/powercontext (powercontext-dsh): Cordis plugin that recalls via POST /v1/context/prepare, captures prompts as Source evidence, and exposes named pc_* HTTP tools. Server or transport failures fail open.
  • Add powercontext setup dsh and powercontext doctor dsh. Setup installs the plugin with dsh plugin --profile web add. Doctor checks that dump-config lists id: powercontext-dsh.
  • Require a built lib/index.js so a Git checkout can be loaded. On Windows, launch dsh.cmd and decode CLI output as UTF-8.
  • Generate the JS operations table from openapi/powercontext.yaml (make js-api-generate / js-api-generate-check / js-test).
  • Document the integration in en/zh how-to, configuration, troubleshoot, interfaces, and the root README.

Are there any user-facing changes?

Yes. New commands: powercontext setup dsh and powercontext doctor dsh. New docs: Configure DeepSeek Harness. No Server API or storage format changes. Existing Codex setup is unchanged.

How was this change tested?

  • uv run python -m pytest tests/test_dsh_cli.py tests/e2e/test_dsh_http_chain.py tests/test_js_operations.py tests/test_system_cli.py -k dsh (11 passed)
  • pnpm --dir integrations/dsh/plugins/powercontext test (47 passed)
  • uv run python scripts/generate_js_operations.py --check
  • Manual on Windows with a local checkout:
    • uv run powercontext setup dsh --source .
    • uv run powercontext doctor dshplugin: ok - powercontext-dsh is installed
    • dsh --profile web --dump-config lists id: powercontext-dsh
    • dsh web on http://127.0.0.1:3080 returns HTTP 200
    • curl /health/live, /health/ready, POST /v1/memory/remember, POST /v1/context/prepare against a local Server

Give DeepSeek Harness the same Server-backed recall and Memory tools as Codex, with a fail-open HTTP client and setup/doctor CLI.
CI quality failed because hooks rewrote tsconfig, generated lib files, and two Python sources.
The quality job has no Node toolchain. Leave plugin vitest on make js-test for local runs.

@Teingi Teingi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the DeepSeek Harness integration. I am requesting changes for two blocking issues: prompt capture currently loses message provenance, and the generic OpenAPI tool exposes operations beyond the intended agent-facing surface. Please address the inline comments before merging.

Comment thread integrations/dsh/plugins/powercontext/src/recall.ts
Comment thread integrations/dsh/plugins/powercontext/src/tools.ts Outdated

@Teingi Teingi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Teingi
Teingi merged commit 9e23c33 into oceanbase:master Aug 14, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants