patrykorwat/open-dream-rsi--plugins-deepseek_harness ↗★ 10
dsh-open-dream-rsi
Let your coding agent dream: strategies must survive counterfactual replay before they earn trust. An offline self-improvement loop over an evolving world model — no fine-tuning, the LLM stays frozen. Speaks MCP. Ships its Python server inside the package: the only requirement is a system python3 (3.10+) on PATH — no pip, no PYTHONPATH. 适合追求高质量代码生成的进阶用户。通过MCP协议通信,要求系统环境有Python 3.10+。
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:patrykorwat/open-dream-rsi#f6275d44ead1310ed2121759a43880eb28765412&path:plugins/deepseek_harnessドキュメント
README 全文を読む ↗ODR — DeepSeek Harness adapter
DeepSeek Harness (dsh)
is an all-plugin agent harness. ODR speaks MCP, and DSH ships a first-party
MCP client bridge (@deepseek-ai/dsh-mcp-client) — so this adapter is pure
configuration: a Cordis overlay that inserts the ODR MCP server as an
external stdio (or Streamable HTTP) server. DSH starts the child with its
plugin lifecycle, discovers the six odr_* tools, and exposes them as
mcp__open_dream_rsi__.
No code ships here — only two overlay files and this guide.
Files
| file | transport | use when |
|---|---|---|
odr.cordis.yml | stdio | DSH and the ODR checkout on one machine |
odr-http.cordis.yml | streamable-http | ODR served remotely (tunnel / other host) |
cordis.patch.yml + package.json | bundle (npm) | installable dsh plugin add package |
The npm bundle ships the ODR Python server inside the package
(open_dream_rsi/, stdlib-only) plus a tiny bridge (bridge.js) that
publishes where it lives; the layer inserts the in-box
@deepseek-ai/dsh-mcp-client row pointing the system python3 at the
vendored entry point (run_mcp.py). No pip, no PYTHONPATH, no build step
and no build allowance even for git installs. Bundle defaults resolve
tasks.json / .dream_rsi beside the directory dsh launches from;
override the mcp-open-dream-rsi row from your profile's cordis.patch.yml
(same id — a config override replaces the whole config).
Install as a bundle (dsh plugin add)
The bundle ships the Python server inside the package — no pip, no
PYTHONPATH. Only a system python3 (3.10+) on PATH is required. From a
directory holding your tasks.json:
# from the npm registry, a tarball, a checkout, or straight from GitHub — pick one:
dsh plugin --profile add dsh-open-dream-rsi
dsh plugin --profile add /path/to/dsh-open-dream-rsi-0.1.3.tgz
dsh plugin --profile add /path/to/open-dream-rsi/plugins/deepseek_harness
dsh plugin --profile add github:patrykorwat/open-dream-rsi#path:plugins/deepseek_harness
dsh --profile --dump-config # shows the "# == dsh-open-dream-rsi" layer
Git installs fetch sources; this bundle needs no build step and no build allowance. Pin a commit so a later push cannot silently change what runs:
dsh plugin --profile add "github:patrykorwat/open-dream-rsi#&path:plugins/deepseek_harness"
(The pin must point at a commit that already contains this directory — pnpm fetches sources, not releases.)
Install (stdio, --patch overlay)
-
Make the server importable (not on PyPI — install from the repo):
python3 -m pip install git+https://github.com/patrykorwat/open-dream-rsi, or exportPYTHONPATH=in the overlay'senv:block. -
Edit both
/ABSOLUTE/PATH/...placeholders inodr.cordis.ymlto your project'stasks.jsonand memory dir (DSH does not expand~; use absolute paths). -
Apply it once:
dsh --patch /ABS/PATH/TO/odr.cordis.yml webTo persist across runs, merge the overlay's
- insert:entry into$DSH_HOME/profiles/web/cordis.patch.yml(do not overwrite that file — it may already hold unrelated patches). Verify the layer mounted:dsh --patch /ABS/PATH/TO/odr.cordis.yml --dump-config | grep -A2 open_dream_rsi
Install (remote)
Serve the endpoint first, then apply odr-http.cordis.yml the same way.
The URL is a credential — see the note in the overlay.
Environment scrubbing
DSH scrubs the spawned child's environment (names matching
KEY|PASSWORD|SECRET|TOKEN and everything DSH_*). The stdio overlay
therefore re-passes OPENAI_BASE_URL / OPENAI_API_KEY / ODR_LLM_*
explicitly from the harness process's environment. Without them the dreamer
falls back to http://127.0.0.1:8000/v1 (vLLM/Ollama default) and
auto-detects the served model. No key is needed for a local endpoint.
Timeouts
toolCallTimeoutMs: 1800000 (30 min) replaces the 60 s default because
odr_run_once / odr_dream run bounded improvement cycles that can take
tens of minutes. odr_status, odr_recipes, odr_lessons and
odr_add_task return in milliseconds.
Verify
In a DSH session:
mcp__open_dream_rsi__odr_status— returns the loop's learned-state summary (policies, recipes, events). Expected on a fresh memory dir: zeros plus a hint, not an error.mcp__open_dream_rsi__odr_add_taskwith a small task (prompt + tests), thenmcp__open_dream_rsi__odr_run_once— the cycle needs a resolvable LLM endpoint (env, goose config, or localhost vLLM); with none reachable it reports the resolution failure instead of hanging.
Model-facing behavior notes (recipes as warm start, add-task-then-dream workflow) live in the main README's "Plug in your favourite agent" section.