Skip to main content

dsh-im

141Stars25Forks6Issues0Watchers

Integrates nine IM channels and Public AI Office into DeepSeek Harness, supporting multi-robot independent workspaces with credentials.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
JavaScript
License
MIT
Branch
main
ai-agentschatbotcordisdeepseekdeepseek-harnessdingtalk-botdiscord-botdsh

Install

cmdweb profile
$ dsh plugin --profile web add @xmanrui/dsh-im

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin xmanrui/dsh-im for me: review the repository at https://github.com/xmanrui/dsh-im first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

At a Glance

Integrates nine IM chat tools (WeChat, Feishu, DingTalk, WeCom, QQ, Slack, Telegram, Discord, WhatsApp) and public AI Office into DeepSeek Harness, allowing users to invoke Harness for conversation, generation, and automation directly from IM without leaving the chat. Each channel can connect multiple bots with independent management.

Core Features

  • Merges nine mainstream IM platforms (WeChat, Feishu, DingTalk, WeCom, QQ, Slack, Telegram, Discord, WhatsApp) into a single "IM Bot" settings entry, with each channel using its own QR code or credential flow for onboarding
  • Supports connecting multiple bots to the same channel; each bot card independently saves workspace, credentials, connection status, and chat-session mappings, allowing viewing, testing, reconnecting, or removal without affecting others
  • Enables local Harness to actively connect to public AI Office for reverse bridging following the office-harness.v1 protocol, requiring no local public IP, port forwarding, or WebSocket
  • Provides a Harness command panel for each bot: /help, /new, /status, /models, /model, /stop, /steer, /compact, /workspace, /workspacelist, /sessionlist, /session, plus interactive Q&A and remote approval
  • Displays streaming responses and progress based on platform capabilities: Feishu streaming cards, Slack official streaming messages, WeCom native "thinking" status, QQ/Telegram/Discord via message editing for progressive display
  • Uploads JPEG, PNG, WebP, and GIF sent as image files to Harness for recognition; 5 MB per image, 20 MB total per message, maximum 20 images

Technical Implementation

  • Language: JavaScript / TypeScript (ESM, "type": "module", React 18 for Web UI)
  • Key Dependencies: dingtalk-stream (DingTalk Stream long-lived connection), @tencent-connect/qqbot-nodejs (QQ channels), @wecom/aibot-node-sdk (WeCom), qrcode (QR code binding; react / @whiskeysockets/baileys and others as secondary dependencies)
  • Architecture Pattern: Single cordis plugin @xmanrui/dsh-im, injected into DSHCordis runtime via cordis.patch.yml; also declares dsh.bundle.patch (injects plugin registration) and dsh.client.inject (injects five client packages: @deepseek-ai/dsh-client-connection, -runtime, -ui-settings, -ui-slots, -locale). Host exposes RPC to nine channels; Client registers an "IM Bot" Tab in the settings page
  • Entry Files: plugin-src/host/index.mjs (Host orchestration), plugin-src/client/index.js (Client settings entry); runtime packaged to lib/index.js and lib/client.js, with src/ being Host shared channel implementation under original repo naming conventions (scaffold is plugin-src/host/channels)

Use Cases

DSH users want to invoke Harness anytime even when interrupted by IM/web office tools: sales or customer service teams connect IM channels to DSH, enabling colleagues or external users to trigger code generation, document summarization, and image recognition within familiar chat windows; multi-account/multi-project users need to assign different workspaces and Agent Presets to each bot, preventing cross-talk in group chats; users need public collaboration platforms to reverse-call local DSH without exposing ports. Users can also have configured bots converse with each other for automated chaining.

Prerequisites & Compatibility

DependencyMinimum VersionNotes
Node.js>=22.19From package.json:engines.node
DSH (cordis/connection/credentials/webServer/typertGateway/slots/locale/workspaces)Not declared in package.jsonPlugin depends on above Host and Client services; recommended to use DSH 0.1.0-rc.6+ from the same author's other plugins
PlatformmacOS / Windows / LinuxHandled by DSH Web profile; no OS-specific features
Native ModulesNoneOnly uses IM vendor SDKs and qrcode; no native bindings like node-pty, node:sqlite

Installation

dsh plugin --profile web add github:xmanrui/dsh-im

Configuration Options

ConfigTypeDescriptionDefault
rpcAuthorityString (loopback or trusted-host)Browser origin accepted for IM management RPC (QR code, credential submission, bot add/remove). loopback is local only; trusted-host extends to Connection-trusted LANloopback
Per-channel bot credentialsConfigured separately per channel in dsh settings pageExample: Feishu App ID/Secret, Slack Bot Token + App Token, Telegram Bot Token, DingTalk Client ID/Secret, WeCom Bot ID/Secret, QQ AppID/AppSecret, WhatsApp device QR code; tokens are only written to local credential storageEmpty after initial install
AI Office Base URL (experimental)https URL (http allowed for loopback)Public Office address for reverse connection; cannot include username/password or query; path normalized to /AI Office Connector unavailable when not configured

FAQ

Q: What is the relationship between this plugin and other DSH IM plugins?

A: dsh-im is a unified merged package that puts nine IM channels into a single "IM Bot" settings entry. When installing via bin/dsh-im.mjs or from GitHub source, it reads ~/.dsh/profiles/<profile>/package.json and automatically removes the three legacy standalone packages @xmanrui/dsh-feishu, @xmanrui/dsh-weixin, @xmanrui/dsh-dingtalk; legacy QR code bindings and credentials are preserved and can continue to be seen in dsh-im cards.

Q: How many bots can be added per IM channel?

A: Any number. Each bot appears as an independent card in the settings page, with credentials, connection status, workspace, chat-session mapping, connection testing, reconnection, and removal all effective at the bot level. New bots default to the Host's current working directory, with Preset inheriting from Harness's agent-presets.default.

Q: What's the difference between /model, /steer, and /stop commands?

A: /model views or switches the model used in the current session, accepting either a number from /models output or Provider/ModelID; /steer <supplemental instruction> appends text instructions to the task currently running in the chat; /stop immediately stops the running task initiated by the current chat, preserving queued messages. All three only affect the chat that invokes them, even when multiple chats are bound to the same Harness session.

Q: What image formats are supported? Is there a size limit?

A: All nine channels recognize JPEG, PNG, WebP, and GIF sent as image files; 5 MB per image, 20 MB total per message, maximum 20 images per message. Exceeding limits is intercepted by src/channels/shared/image-prompt.mjs and a Chinese error message is shown to the user, preventing the request from reaching Harness.

Q: What is AI Office? Is it usable now?

A: AI Office is a reverse channel that enables local Harness to actively connect to public Office, working via office-harness.v1 protocol: first handshake via POST /api/harness/connector/heartbeat, then receive SSE downstream tasks via GET /api/harness/connector/stream, with 90-second leases renewed every 30 seconds. Currently marked as "Experimental Feature" in the settings page left Tab; requires Base URL and Device Token from public Office to enable first.

Q: Why can't I access the management page from external/LAN?

A: This is intentional. plugin-src/host/rpc-authority.mjs locks IM management RPC to loopback by default to prevent sensitive operations like QR code links, credential submissions, and bot add/remove from being called externally. If确实要把 dsh web 暴露到受信局域网内,可以在 profile 的 cordis.patch.yml 里写 config: { rpcAuthority: trusted-host };该模式只是复用 Connection 已信任的 Host authority,并不是用户认证。

Q: How do I completely uninstall?

A: Run dsh plugin --profile web remove @xmanrui/dsh-im, or use npx -y github:xmanrui/dsh-im uninstall in the plugin package installation directory. After restarting dsh web, the "IM Bot" entry in settings will be removed, but saved Secrets and Device Tokens remain in local credential storage.

Q: Can anyone execute bot commands?

A: Yes. Any user within the platform's visible scope who can send messages to the bot can trigger commands like /session and /workspace, thereby writing subsequent messages to the bound session and invoking its available tools. So confirm visible users are trusted before deploying a bot; Telegram security mode can add whitelists, where group chat commands are ignored under that mode.

Getting Started Difficulty

Beginner — One-step installation, settings page has complete Chinese/English guidance for nine channels, most channels support zero-config QR code; but credential sources for each channel require users to separately apply in respective IM platform developer backends, so first-time setup duration depends on familiarity with IM platforms.

Known Issues & Limitations

  • AI Office Connector is explicitly marked as "Experimental Feature" in settings page Tab (plugin-src/client/index.js:61); protocol version office-harness.v1 may still evolve
  • workspace-command.mjs and compact-command.mjs contain fallback branches for "listing workspaces / switching workspaces / context compression not currently supported for this bot", meaning some channels' /workspace, /workspacelist, /sessionlist, /compact commands will directly prompt users that the feature is not supported
  • IM management RPC defaults to loopback only; to open management page in a trusted LAN, must explicitly set rpcAuthority: trusted-host in profile's cordis.patch.yml (plugin-src/host/rpc-authority.mjs:7-11); this mode only reuses Host/Origin protection, not user authentication
  • WhatsApp maintains login via WhatsApp Web long-lived connection; phone disconnection or server-initiated disconnect will put the bot in "offline" state, requiring re-QR code to rebind device
  • Switching workspace only clears old chat-session mappings for that bot; it does not delete, clear, or archive any old Sessions; cross-workspace binding clears all old mappings for that bot's chats; evaluate whether visible users are trusted before deploying
  • Plugin ID contains keyword restrictions: rpcAuthority only accepts loopback or trusted-host; writing other values throws TypeError at Host startup
  • DSH (DeepSeek Harness) version requirement is not declared in package.json; needs actual verification with host version; plugin uses relatively new injection points like ctx.typertGateway, ctx.workspaces, ctx.slots

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/xmanrui/dsh-im)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory