How to use dsh-interconnect
Enable WebSocket communication between multiple DSH instances using a shared secret: exchange text messages, push session lifecycle events, and enumerate peer's online sessions.
This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.
This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.
Quick start
dsh-interconnect
— source: plugin_wiki.wiki_content
Install & verify
dsh plugin --profile web add dsh-interconnect
Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.
— source: plugins.install
Key points
- 全走持久 WebSocket 链接:跨实例、跨机器投递消息、枚举 live session、探测活性(
send/reply/ping/list经/interconnect/link的msg/query帧) /interconnect/linkWebSocket 端点:双向实时事件推流,含心跳与指数退避重连;也承载- 事件 fan-out(HTTP + WebSocket),入站事件以
interconnect/event发出 - 共享密钥鉴权(
DSH_INTERCONNECT_TOKEN,bearer,fail-closed,timing-safe 比较) interconnect_send:向对端实例的指定 session 投递消息;可选delivery选投递模式、resume唤醒离线 session
— source: plugin_wiki.readme_en (fallback readme_raw)
FAQ
What can regular users do after installing this plugin?
Enable multiple machines or DSH instances to exchange text messages via shared-key WebSocket channels, push session lifecycle events to each other, and list the sessions currently running on the peer; the model can also actively address and deliver using four interconnect_* tools.
What needs to be done after installation for both ends to communicate?
Set the same DSH_INTERCONNECT_TOKEN shared key in the credential store of both DSH instances (without a token, the auth endpoint will fail-closed and return 403), then write the peer's instanceId and reachable origin into the local config.peers mapping, which automatically establishes persistent connections to each peer when activated.
What do the reason field values mean when message delivery fails?
Different failures require different responses: session-not-live indicates the peer's session is not running (change target or use resume); unreachable indicates transport or authentication failure (may retry); resume-refused / resume-failed relates to wake-up; session-owned-by-subagent indicates the session is routed through subagent; no-sender-known means the reply cannot find the sender record.
— source: plugin_wiki.faq_json
Compatibility
- DSH: 未声明
- Node: >=22.0.0
- Platforms: 跨平台
— source: plugin_wiki.compatibility_json
Pitfalls
Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.
— source: general rule