dsh-chat-link · Conversation Linking for DeepSeek Harness
> English | 中文
Peer-to-peer conversation linking for DeepSeek Harness (DSH) — let any two sessions talk to each other directly, like an IM. Type @ in the composer to send a message to another session; the target agent is woken up automatically and processes it.
  
---
Why
DSH natively supports intra-session multi-agent collaboration (parent/child subagents). dsh-chat-link fills the missing piece: peer-to-peer, cross-session, real-time conversation.
- Session A types
@B help me check today's tasks→ Session B is woken automatically, treats it as a task; - When B replies, A is woken again — two sessions genuinely chat, no human copy-paste courier;
- Messages persist to a local file (
~/.dsh/chat-link/), surviving DSH restarts.
Features
1. @ session mention (like invoking a skill)
- Type
@in the composer → native picker menu (session name + online/unread state, filterable); - Picking inserts a blue reference chip (
@session-name) — the same mechanism as DSH skill refs / slash commands; - On submit the chip projects to
@session-name message, and the agent forwards it to the target session.
2. Wake-up delivery
- Target online → woken instantly via DSH's native
agent.send(message, 'next-turn', true); - Target not open → message stays on the board, 3s redelivery poll delivers it when the session opens.
3. Native-feel inbox
- Sidebar entry (DOM-injected, same technique as dsh-ssh / task-board, self-healing via MutationObserver);
- Opens a center-column takeover view (not a floating card), following the DSH design system (
--dsw-*theme tokens, skins included); - Two-pane layout: unread message cards + session list; click any message/session to jump to it;
- Opening a session auto-clears its unread badge; unread count shows live on the sidebar entry.
4. Five model tools (available in every session)
| Tool | Purpose |
|---|---|
chat_link_send | Send a linked message to another session (name / sessionId / prefix addressing) |
chat_link_inbox | List and claim this session's unread linked messages |
chat_link_history | History of this session's linked messages |
chat_link_roster | List all linked sessions (name / online / unread) |
chat_link_register | Set a custom link name for this session |
5. Rename-synced naming
- Link names derive live from session titles — rename a session in the workspace and the link list updates automatically;
chat_link_registersets a custom name (takes precedence over the title).
Installation
🚀 One-line install (recommended)
bash -c "$(curl -fsSL https://raw.githubusercontent.com/KeFan-J/dsh-chat-link/main/install.sh)"The script clones the repo, installs dependencies, and mounts the plugin into the DSH web profile. Then just restart DSH (Ctrl+C → npx @deepseek-ai/dsh web) and hard-refresh the browser (Cmd+Shift+R).
> Custom install dir: bash -c "$(curl -fsSL <URL above>)" - /path/to/dir > Update: re-run the same command (auto git pull).
Manual install
#### Prerequisites
- DeepSeek Harness
0.1.0-rc.6(Web GUI vianpx @deepseek-ai/dsh web) - Node.js ≥ 22, pnpm (
corepack enableornpm i -g pnpm)
#### Steps
# 1. Clone
git clone https://github.com/KeFan-J/dsh-chat-link.git
cd dsh-chat-link
# 2. Install deps (just @deepseek-ai/dsh-tools)
pnpm install
# 3. Mount into the DSH web profile (bundle mechanism)
dsh plugin --profile web add link:$(pwd)
# 4. Restart DSH
# Ctrl+C in the terminal → run npx @deepseek-ai/dsh web again
# 5. Hard-refresh the browser (Cmd+Shift+R)> Note: DSH loads plugins from ~/.dsh/vendor/plugins/. If you deploy via the vendor directory, sync after updates: > ``bash > cp -r lib ~/.dsh/vendor/plugins/dsh-chat-link/ > ``
Usage
Way 1: @ in the composer (recommended)
1. Type @ in any session's composer; 2. Pick the target session from the menu (keep typing to filter); 3. Type your message and send — it forwards automatically, the target is woken; 4. When they reply, you get woken too (unread badge on the sidebar entry).
Way 2: Inbox panel
Click the sidebar entry:
- Read unread messages; click one to jump to its source session;
- Session list: click to jump; "Copy" button copies
@nameto the clipboard; - "Mark all read" clears the unread state.
Way 3: Just tell the agent
用 chat_link_roster 看看有哪些会话
给「XXX」发条消息说:……Architecture
┌────────────────────────── Host process ──────────────────────────┐
│ lib/index.js │
│ ├─ message board: ~/.dsh/chat-link/messages.jsonl + identity.json│
│ ├─ 5 model tools (registered globally, every session) │
│ ├─ wake-up delivery: agent.send(msg, 'next-turn', true) + 3s poll│
│ ├─ open-session-mark-read (agent/session-start) │
│ └─ HTTP routes: /api/dsh-chat-link/state · /mark-read │
└───────────────────────────────────────────────────────────────────┘
▲ fetch / events
┌────────────────────────── Browser (Client) ──────────────────────┐
│ lib/client.js (ModuleLoader bundle) │
│ ├─ '@' input trigger (framework inputTriggers protocol, chip) │
│ ├─ sidebar entry (DOM injection + MutationObserver self-heal) │
│ ├─ inbox panel (center-column takeover, --dsw-* theme tokens) │
│ └─ mutual exclusion with dsh-ssh / task-board (dsh-panel-activate)│
└───────────────────────────────────────────────────────────────────┘Privacy & Data
- All data stays local in
~/.dsh/chat-link/(message board + session identity map); - No cloud dependency, no telemetry, no external requests;
- Uninstalling (
dsh plugin --profile web remove @linxin666/dsh-chat-link) leaves your history untouched.
Compatibility
- Runtime dependency:
@deepseek-ai/dsh-tools@^0.1.0-rc.6; - Mounted via the standard DSH bundle mechanism (
dsh.bundle.patch+dsh.clientdeclaration) — no DSH source changes; - Plays well with other family plugins (dsh-ssh, task-board, git-graph, …).
License
MIT © Jinkefan
---
Made for the DeepSeek Harness plugin community.