Preface¶
When using DSH for intelligent agent conversations, if you also need to communicate with other agents on the same machine (such as Claude Code), manually copying messages is inconvenient. dsh-peer-link is a DSH plugin that enables DSH sessions to exchange messages with other local agent sessions via Unix sockets.
It registers the current DSH process as a discoverable peer and routes messages from peers to specific DSH sessions. It also provides tools for the DSH side to view peers and send messages.
Plugin Positioning¶
- Plugin repository:
czm15053/dsh-peer-link package.jsonname:@deepseek-ai/dsh-peer-link- Maintainer:
czm15053 - License:
MIT - Positioning: A peer-to-peer messaging tool that connects DSH sessions with other local agent sessions, such as Claude Code.
Note: The repository path, package name, and README title are not entirely consistent. For installation, use the given command with the repository address.
Core Capabilities¶
Below are the main capabilities provided:
- DSH process registers as a single peer with the name format
dsh-<pid>, which can be discovered by Claude Code’sListAgents/SendMessage. - Each DSH session has a unique short ID, and messages carry the
@dsh-<pid>:<session>identifier. DSH internally forwards messages to the corresponding session based on this identifier. - When a peer message is received, it is injected into the corresponding DSH session as a user message bubble, visible on the web side.
- Provides a
peer_sendtool for sending messages to peers; thetargetcan be a session message number, peer name, or socket path. - Provides a
peer_listtool for listing active peers, with optional filtering bycwddirectory and sorting by creation time. peer_listhas an interactive toolview that supports sorting, searching, popup sending, and refreshing.- Peer information displays the first line of the conversation context, making it easy to understand what the session is doing.
Installation and Enabling¶
Installing the Plugin¶
Install from the GitHub repository:
dsh plugin --profile web add "github:czm15053/dsh-peer-link"
If you have a local repository path, you can also use:
dsh plugin --profile web add link:<repo-path>
Start after installation:
dsh --profile web
Configuration on the Claude Code Side¶
To connect DSH sessions with Claude Code sessions, Claude Code version 2.1.224 or higher is required. First, run:
claude update
Then configure in ~/.claude/settings.json:
{
"env": {
"CLAUDE_CODE_HARBOR_KITE": "1"
},
"crossSessionInbound": "accept"
}
CLAUDE_CODE_HARBOR_KITE is used to bypass the feature flag. Setting crossSessionInbound to accept means accepting cross-session messages; if not set, messages will be held pending confirmation.
After configuration, each Claude session generates a socket file in /tmp/cc-socks/ with permissions set to 0600.
Typical Usage¶
Here is an example of communication between Claude Code and a DSH session.
-
In Claude Code, use
ListAgentsto view active peers and find entries similar todsh-<pid>. -
Use
SendMessageto send to the target peer, for example:
to: "dsh-<pid> [ref]"
message: "@dsh-<pid>:<session-short-id> Hello, this is a test message"
Here, <session-short-id> is the DSH session short ID. After DSH receives it, the message is forwarded to the corresponding session and injected as a user message bubble.
-
On the DSH side, after receiving a message, you can use the
peer_sendtool to reply. Thetargetcan be a session message number, peer name, or socket path. -
If you need to confirm which peers are available, use
peer_list. It supports filtering by directory, sorting by creation time, and the interactive toolview also supports searching, popup sending, and refreshing.
Dependencies and Building¶
package.json declares the following peer dependencies, all with version requirement >=0.1.0-rc.0:
{
"peerDependencies": {
"@deepseek-ai/dsh-agent": ">=0.1.0-rc.0",
"@deepseek-ai/dsh-llm": ">=0.1.0-rc.0",
"@deepseek-ai/dsh-system-prompt": ">=0.1.0-rc.0",
"@deepseek-ai/dsh-tools": ">=0.1.0-rc.0"
}
}
package.json also includes:
{
"private": true
}
Local build and test:
npm install
npm run build
npm test
Use Cases and Notes¶
Suitable scenarios:
- Running both DSH and Claude Code on the same machine.
- Wanting DSH sessions to discover and reply to other local agent sessions.
- Needing to distinguish message sources and destinations across multiple DSH sessions.
Notes for use:
- On the DSH side, the peer name is
dsh-<pid>, and multiple DSH sessions are distinguished by the<session>short ID. - On the Claude Code side, version 2.1.224 or higher is required, and the env block and
crossSessionInboundmust be configured as described above. - If
crossSessionInbound: "accept"is not set, messages will enter a pending confirmation state first. - The plugin registers tools and processes messages; before installation, check the source code, license, and origin. The plugin runs with the permissions of the current DSH process.
- DSH’s “everything is a plugin” philosophy reflects the plugin ecosystem approach; the community directory is an independent site with no official affiliation with DeepSeek / High-Flyer.
Conclusion¶
dsh-peer-link turns DSH sessions into peers discoverable by other local agent sessions, and provides sending and viewing capabilities through peer_send and peer_list. For scenarios requiring peer-to-peer messaging between DSH and local agents like Claude Code, it is a readily usable DSH plugin.
Directory page:
https://www.skillhub.cn/plugins/czm15053/dsh-peer-link
GitHub:
https://github.com/czm15053/dsh-peer-link