A DeepSeek Harness (dsh)
plugin bundle that lets a dsh agent use OpenBitFun: it bridges dsh tools to the
OpenBitFun Agent SDK Host (openbitfun-sdk-host), the standalone local JSON-RPC-over-stdio
entry point of the OpenBitFun Agent Runtime
(protocol, app).
The plugin registers one dsh tool:
| Tool | What it does |
|---|---|
openbitfun_run |
Runs one OpenBitFun agent turn against a workspace and returns OpenBitFun's final text answer. The result carries a session_id; passing it back continues the same OpenBitFun conversation (multi-turn). |
- The plugin spawns one
openbitfun-sdk-hostprocess lazily per resolved binary and speaks the SDK Host protocol:initialize,session/create,query/start,query/event(streamed assistant text),query/result(terminal status),query/cancel,session/close,shutdown. - Each dsh session is mapped to one transient OpenBitFun session on first use; the
oldest mappings are closed past
maxSessions. - Aborting the dsh tool call (user stop, timeout policy) cancels the OpenBitFun turn.
- If the host process dies, pending calls fail with the captured stderr tail and the next call respawns the host.
The host binary is located per call in this order:
- the
hostPathpatch-config option of theopenbitfunrow, - the
OPENBITFUN_SDK_HOSTenvironment variable, target/debug/target/releasewalking up from the dsh session cwd (a OpenBitFun checkout-local build),openbitfun-sdk-hostonPATH.
cargo build -p openbitfun-sdk-host-app
# binary: target/debug/openbitfun-sdk-host[.exe]The SDK Host reuses the OpenBitFun user config (provider/model) of the local
machine, so a configured OpenBitFun installation makes openbitfun_run work out of the
box.
dsh plugin --profile web add /absolute/path/to/extensions/dsh-openbitfun
dsh plugin --profile headless add /absolute/path/to/extensions/dsh-openbitfundsh plugin installs the package into the profile and, because this package
declares dsh.bundle.patch, appends dsh-openbitfun to the profile's bundle stack.
Restart the profile for the change to take effect.
Custom host binary or caps (in the profile's cordis.patch.yml):
- id: openbitfun
config:
hostPath: '/absolute/path/to/openbitfun-sdk-host'
maxSessions: 8
queryTimeoutMs: 1800000
requestTimeoutMs: 30000node test/smoke.mjsThe script boots the resolved host binary, initializes the protocol, creates a session bound to the OpenBitFun checkout root, runs one trivial query, and asserts a completed turn with non-empty assistant text.
- Local scenario only. The OpenBitFun session workspace is the dsh session cwd on the same machine; remote-workspace and peer-device paths are not exercised.
- Interactive permissions are auto-rejected by the current SDK Host
candidate (
AutoApproveAsk = false), so a OpenBitFun turn that needs an approval fails; useopenbitfun_runfor non-interactive subtasks. - Transient sessions. OpenBitFun sessions live only as long as the host connection; a dsh restart starts fresh OpenBitFun conversations. Session cleanup removes runtime stores, snapshots, and terminal bindings only — it never deletes the workspace directory.
- The SDK Host protocol is OpenBitFun's internal candidate (
stability: not_delivered), so this bridge tracks the local OpenBitFun build rather than a frozen external API.