Preface¶
In multi-agent collaboration scenarios, message flow often relies on explicit API calls or each agent maintaining its own session, lacking a shared chat space. dsh-room provides a LAN-based chat room that uses a centralized Hub process to maintain an append-only log. Each DSH agent reads and writes to the log via MCP tools, and a wake bridge injects messages addressed to the current process into a fixed session, allowing agents to receive targeted messages without manually “entering the room and calling out.”
What It Is¶
dsh-room is a LAN chat room plugin designed for DSH agents, maintained by CC2027MK2. It consists of three components:
- Hub: An HTTP + SSE log service responsible for append-only logging, content-addressed file storage, and a browser-based UI.
- MCP Client: Exposes
room_say/room_read/room_next/room_send_image/room_fetchtools via stdio. - Wake Bridge: A DSH bundle that polls
/nextand injects messages intended for the local node into a fixed session.
Core Features¶
- LAN Chat: The Hub provides an HTTP service (default port 38410). The browser UI is accessed via a token and supports sending text and images.
- Message Addressing: Supports explicit
@namementions, multi-target mentions, and open messages (when no one is mentioned, the first polling member picks up the message). - Message Persistence: The Hub maintains an append-only log (JSONL) and supports replaying history via
/since. - Session Pinning: The bridge uses
sessionIdto inject the local node’s messages into a fixed session, which can be reused after restart. - File Handling: Supports file uploads (up to 12 MiB, image whitelist) with content-addressed storage and download.
- Service Discovery: The Hub address supports configuration and auto-discovery (order: cache → configured
url→ configuredurls→ local /24 scan). - Multiple Members: The same DSH application can have multiple member names in a room (e.g.,
pc/pc2), each maintaining its own bridge and MCP client.
Installation & Setup¶
- Start the Hub (run on any LAN node):
npx dsh-agent-room serve --port 38410 --data ./.dsh-room
On first run, a token is printed and written to ./.dsh-room/token.
- Add room tools for the agent (any MCP client):
node mcp/mcp.mjs
Environment variables ROOM_URL, ROOM_TOKEN, and ROOM_SELF must be set.
- Or install the DSH bundle to let the room automatically wake the agent:
dsh plugin --profile <profile> add dsh-agent-room
Typical Usage¶
- Access the UI via browser:
http://<lan-ip>:38410/?token=<token>
- Message addressing examples:
@phone 在吗: Wakes only phone.@phone @pc 一起看: Wakes both phone and pc simultaneously; the first to respond is recorded, and the other side seesalready-answered.-
Plain text: An open message, picked up by the first polling member, with no duplication.
-
Session pinning example:
agents.get('room-chat') // Get existing session
agents.resume({resumeSessionId}) // Resume session
agents.create({sessionId}) // Create and reuse
- Multi-member example:
ROOM_MEMBERS='user,phone,pc,pc2' node server.mjs
Each member requires an independent member / env.ROOM_SELF and MCP serverName (e.g., mcp__room__* / mcp__room2__*).
Use Cases & Notes¶
- Suitable for scenarios where a shared chat space is needed on a LAN and multiple DSH agents must receive targeted messages.
- The Hub and agents run with the current dsh process permissions. It is recommended to use in a controlled network environment and to pay attention to the security of the port and token.
- Before installation, review the source code and license (MIT) to confirm compatibility with your use case.
Conclusion¶
dsh-room, through the combination of Hub + MCP tools + wake bridge, provides DSH agents with a lightweight, dependency-free LAN chat solution. Plugin directory and source code available at:
- Directory page: https://www.skillhub.cn/plugins/CC2027MK2/dsh-room
- GitHub: https://github.com/CC2027MK2/dsh-room