Introduction¶
When running multiple parallel development sessions in DeepSeek Harness (DSH), passing messages between sessions is usually cumbersome: you end up writing them in GitHub issues, in shared files, or manually copy-pasting. This plugin turns cross-session, cross-machine messaging into a single tool call, without needing to leave the current session.
What It Is¶
dsh-relay-client is a DSH plugin maintained by chenvinc, categorized under “Workflow.” It implements messaging between sessions and between sessions and machines via the control plane provided by a locally running pcpanel. The plugin does not modify the DSH core, nor does it patch other plugins—it simply bundles itself into the profile.
Core Features¶
- relay_bind: Binds the current session to a logical name, such as
po,fe, ormacbook/dsh-proj/backend. - relay_unbind: Unregisters an alias for the current session.
- relay_forget: Removes a known node from the directory.
- relay_send: Sends a message to another session, supporting unicast
toand carbon-copycc, with optionaltypeandthreadfields. - Auto-injection: A background poller checks the local panel’s inbox and automatically injects incoming messages into the target session, following the
Agent.followup→steer→inboxthree-level fallback. - Three-level addressing: Addresses follow the format
machine / workspace / alias. Cross-machine delivery is handled by the panel’s federation layer; the plugin itself only connects to the local machine. - State persistence: Bindings are written to
~/.dsh/state/relay-client/state.json(overridable viaRELAY_CLIENT_STATE_DIR) and automatically restored on restart. - HTTP endpoints: Exposes two local endpoints for panel or
curlinteractions: GET /relay-client/status: Current bindings and connection statusPOST /relay-client/bind//unbind: Explicit bind/unbind (requiressession_id)
Prerequisites¶
A locally running pcpanel is required, providing the /api/relay/* control plane (default address: http://127.0.0.1:8765). For cross-machine communication, the remote side must also run a panel, discover each other automatically via UDP 8766, and register each other in the directory. Without a panel, the plugin can still load, but relay_send will fail.
Installation & Activation¶
- Navigate to the DSH profile directory (example path):
cd ~/.dsh/profiles/web
- Install the plugin:
pnpm add dsh-relay-client # or npm install dsh-relay-client
- Add
dsh-relay-clienttodsh.profile.bundlesin that profile’spackage.json. - Fill in
base/machine_id/workspaceincordis.patch.yml(see the installation docs for detailed steps). - Ensure
machine_idexactly matches the local panel’sconfig.relay.machine_id; otherwise, cross-machine three-level addressing will fail.
Typical Usage¶
Invoke the tool within a session:
You: Bind a name, then tell the backend session that the API contract is finalized.
Agent: (calls relay_bind to bind as "po")
Agent: (calls relay_send, to=backend, type=contract, content=...)
Tool list:
relay_bind: Binds the current session to a logical name (automatically uses the currentsessionIdwhen called within a session).relay_unbind: Unregisters an alias for the current session.relay_forget: Removes a known node from the directory.relay_send: Sends a message, supportingto/ccthree-level addresses,type, andthread.
Design Trade-offs¶
- Control-plane / data-plane separation: The panel handles the registry, addressing, and audit; message injection goes through DSH’s native
Agent.followup—no new messaging kernel is introduced. - Explicit identity binding: The background timer has no access to the current session, so the logical name must be declared by the session itself via
relay_bind, or explicitly passed through the HTTP endpoint. - Persistent, recoverable state: Bindings are written locally to
~/.dsh/state/relay-client/state.jsonand automatically restored on restart. - No token authentication on the LAN (consistent with the panel). For public-facing access, add your own reverse proxy and authentication.
Verification¶
npm test # 64 mock tests (no real DSH / panel required)
npm run test:integration # Real end-to-end path; requires a running pcpanel relay service
Use Cases & Cautions¶
Ideal for developers who need to pass structured messages between DSH sessions or across multiple machines on the same local network. The plugin runs with the current DSH process’s permissions; review the source code and license before installing.
Summary¶
dsh-relay-client turns cross-session and cross-device messaging into a single tool call—no need to leave the current session. It leverages pcpanel as the control plane, supporting three-level addressing, automatic injection, and state persistence. It’s well-suited for scenarios that require messaging capabilities within DSH workflows.
- Plugin directory: https://www.skillhub.cn/plugins/chenvinc/dsh-relay-client
- Source repository: https://github.com/chenvinc/dsh-relay-client