Introduction

The extension method for DeepSeek Harness (DSH) is “everything is a plugin”: Agent capabilities can be connected to different frontends through plugins, without needing to implement each frontend separately. For developers already handling messages in IMs, a common requirement is to connect the DSH agent to Feishu (Lark), WeCom (WeChat Work), or Telegram, and complete multi-turn conversations within existing chat tools. Below is an introduction to the dsh-im-hub plugin.

What is it

dsh-im-hub is a multi-platform IM gateway plugin for DeepSeek Harness, maintained by ThreeBody6666, and licensed under MIT. The current version in package.json is 0.2.3.

Its positioning is to connect the DSH agent to common IMs, supporting the following platforms:

  • Feishu (Lark)
  • WeCom (WeChat Work)
  • Telegram

Core Capabilities

First, let’s talk about the connection methods it provides:

  • Feishu (Lark): Supports official WebSocket long connections, and also supports webhook mode; International Lark is configured via adapters.lark.
  • WeCom: Supports application message callbacks, uses WXBizMsgCrypt for AES-256-CBC decryption, and performs SHA1 signature verification.
  • Telegram: Uses Bot API long polling and splits messages according to the 4096-character limit.
  • Mock: Provides stdin and local HTTP endpoints for testing.

In terms of session management, it provides agent sessions isolated by chat:

  • Retains multi-turn context
  • Serial processing of conversation turns within each chat
  • Idle sessions are recycled based on configuration

In terms of access control, every adapter supports an allowedUserIds whitelist. If allowedUserIds is empty, it means everyone is allowed to access; it is recommended to explicitly fill in the user IDs allowed to access in production environments.

It also provides a set of Slack-style commands:

/help
/reset
/status
/model

Regarding configuration, dsh-im-hub supports two types of entry points:

  • Visual setting cards in the Web GUI (applicable to v0.2.0 and above)
  • YAML configuration located in cordis.patch.yml

Installation and Startup

Use the official installation command to add the plugin to the im profile:

dsh plugin --profile im add dsh-im-hub

Then start DSH using the same profile:

dsh --profile im

If using a local checkout for development and debugging, you can install using a local path:

dsh plugin --profile im add link:D:/projects/dsh-im-hub

Configuration

The plugin entry for dsh-im-hub in cordis.patch.yml is disabled by default. Before enabling an adapter, you need to modify the plugin configuration first.

Taking Telegram as an example, at minimum you need to enable the adapter, fill in the Bot token, and configure the allowed user IDs:

- id: dsh-im-hub
  disabled: false
  config:
    adapters:
      telegram:
        enabled: true
        token: '123456:ABC-DEF...'
        allowedUserIds: [123456789]

Where:

  • enabled controls whether the adapter is enabled
  • token is the Telegram Bot token
  • allowedUserIds is a list of Telegram user IDs allowed to chat with this Bot

When allowedUserIds is empty, it means everyone is allowed to access. It is recommended to explicitly set the whitelist in production environments.

If the plugin runs in the Web GUI and the version is not lower than v0.2.0, it can be configured in the settings interface:

Settings → Plugins → Configurable plugins → IM Gateway (dsh-im-hub)

Credential-type fields are stored on the server and displayed as a write-only badge in the Web GUI.

Prerequisites for Connecting to Each Platform

Telegram

Telegram requires obtaining a Bot token from @BotFather, and then filling it into adapters.telegram.token.

Feishu / Lark

The Feishu long connection mode is suitable for self-built enterprise applications. Before connecting, the following configurations need to be completed:

  • Subscribe to events: im.message.receive_v1
  • Grant message permissions:
    • im:message:send_as_bot
    • im:message:p2p_msg
    • im:message:group_msg or group_at_msg

International Lark uses adapters.lark configuration.

WeCom

WeCom (WeChat Work) uses the callback server method and does not provide a long connection mode. The callback server needs a publicly accessible HTTPS URL, which can also be exposed via tunnel.

Use Cases and Precautions

dsh-im-hub is suitable for the following scenarios:

  • Want to connect DSH agent to Feishu, WeCom, or Telegram
  • Need to retain multi-turn context in chat tools
  • Need to limit the scope of accessible agents by user ID
  • Need to do local testing with a Mock adapter without introducing real platform credentials

Precautions before use:

  • The plugin runs with the current DSH process permissions
  • You should check the plugin source code before installing
  • You should confirm the license and runtime environment requirements; this plugin license is MIT
  • The community plugins directory is an independent site with no official affiliation with DeepSeek or Hypi, and should not be interpreted as an official app store

Links

GitHub repository:

https://github.com/ThreeBody6666/dsh-im-hub

Community plugins directory: You can search for the plugin name dsh-im-hub in the DSH community plugins directory.