Introduction

DSH provides session, model, and tool calling capabilities. In actual use, an external entry point is often needed: sending messages directly in Feishu (Lark) for the DSH session to process and echo the generation process back to Feishu. dsh-feishu-bridge is the DSH plugin that does this. It bridges Feishu messages to DSH sessions, and after AI processing, replies in real-time using streaming interactive cards without relying on public webhooks.

Plugin Positioning

dsh-feishu-bridge is maintained by fengs2021, with version declared as 1.1.0 in package.json and a license of MIT (from package.json). It is not an independent chat service, but a bridging plugin running within the DSH host process: Feishu channels connect to DSH, while DSH’s sessions, models, and tools are still provided by DSH. Below is an introduction to its core capabilities, installation methods, typical usage, and limitations to confirm before deployment.

Core Capabilities

  • Feishu private chat / direct messages enter DSH sessions, maintaining multi-turn context.
  • Responds when @-ing the bot in group chats; requires configuration of botOpenId.
  • CardKit 2.0 streaming interactive cards for real-time updates: Chain of Thought, body, and tool chain partitioned display, token-level typewriter effect, and native collapsible panels.
  • Automatically agents.resume after DSH restart, restoring the same DSH session.
  • Supports /help, /reset, and /status slash commands.
  • Automatically sends a follow-up text message if a long reply exceeds the limit (8000 characters).
  • Automatic backoff reconnection on disconnection, with a range of 2s to 30s maximum.
  • Limits chat users via an open_id allowlist; an empty allowlist means everyone.
  • Idempotent deduplication based on message_id to avoid duplicate processing of event replays.
  • Registers the feishu channel to the DSH global registry, supporting de_channel_send / de_notify to send text, images, and files to Feishu.

Installation and Enablement

Prerequisites for running:

  • DeepSeek Harness is running with dsh web.
  • lark-cli is installed and a bot identity is selected (tenant_access_token).
  • The Feishu custom application has bot capabilities, and the application permission scope covers the target users/groups.
  • The application requires im:message permission; events use Feishu Open Platform long-connection subscription, so no public webhook/callback URL is needed.

Installation steps:

git clone https://github.com/fengs2021/dsh-feishu-bridge.git ~/.dsh/plugins/dsh-feishu-bridge
cd ~/.dsh/plugins/dsh-feishu-bridge && npm install

# register into the web profile:
#   dependencies += "dsh-feishu-bridge": "link:/root/.dsh/plugins/dsh-feishu-bridge"
#   dsh.profile.bundles += "dsh-feishu-bridge"
cd ~/.dsh/profiles/web && pnpm install

systemctl restart dsh-web

First, clone the plugin to the DSH plugins directory and install dependencies, then register it into the web profile’s dependencies and dsh.profile.bundles, and finally install web profile dependencies and restart dsh-web.

Typical Usage

Send messages directly to the bot in Feishu; in group chats, @ the bot to trigger DSH processing.

Slash commands:

/help
/reset
/status

/help displays help, /reset clears context, and /status shows session status.

DSH can also push to Feishu actively:

de_channel_send channels=feishu content=...

Available when sending attachments:

attachments=[{kind:'image'|'file', path|url|base64, fileName?}]

The target defaults to the most recent Feishu session, but can be explicitly specified:

target: 'p2p:oc_xxx'

Configuration and Limitations

  • botOpenId is used for group chat @ detection; it can be obtained via startup auto-detection, logs when @-ing in groups, or the Feishu console.
  • An empty allowlist means all open_ids can chat; if non-empty, only the specified open_ids can chat.
  • If text mode replies exceed maxReplyChars (default 3500), they will be split into segments; if the card preview limit of 8000 characters is exceeded, a text message will be sent as a follow-up.
  • Card streaming update default minimum interval is 1200ms, card polling interval is 600ms, and the maximum wait time for a single round is 600000ms.
  • Card updates must use PATCH /open-apis/im/v1/messages/:message_id with a card JSON string; PUT + msg_type cannot be used.
  • The streaming listener affects all LLM calls; reference material suggests not reverting to async.

Applicable Scenarios and Notes

Suitable for deployment scenarios where you want to chat with DSH via Feishu, need to send DSH proactive notifications to Feishu, or require card-based process echo.

Notes to consider:

  • The plugin runs in the DSH host process and follows the permissions of the current dsh process. You should check the source code, dependencies, and license before installing.
  • The Feishu custom application must have bot capabilities, the permission scope must cover the target users/groups, and the im:message permission must be available.
  • Group chat response depends on botOpenId and the application’s permission scope.
  • Events are subscribed to via the Feishu Open Platform’s long-connection, so no public webhook/callback URL is needed, but lark-cli must still be able to access the Feishu Open Platform normally.
  • This plugin version is 1.1.0 with an MIT license.

Links

  • Plugin Directory Page: https://www.skillhub.cn/plugins/fengs2021/dsh-feishu-bridge
  • GitHub Repository: https://github.com/fengs2021/dsh-feishu-bridge