The DSH (DeepSeek Harness) ecosystem follows the “everything is a plugin” philosophy, and developers usually interact with the Agent via the command line or API. If you need to converse directly with the Agent in the Feishu (Lark) client, a middle layer is required to handle message receiving/sending and protocol conversion. minyang2020/dsh-feishu-bridge is exactly such a bidirectional bridge, allowing Feishu users to interact directly with a locally running DSH Agent through a long-lived connection.
This is a bidirectional bridge for conversing directly with your DeepSeek Harness Agent in Feishu. The project is maintained by user minyang2020 and uses the MIT license. It communicates with the locally running DSH process through a Feishu long-lived connection, enabling real-time message sending and receiving.
Core Features¶
- Session Isolation and Triggering: In private chat mode, each Feishu user is automatically bound to an independent DSH session, so contexts do not interfere with one another. In group chat mode, the bot responds only when @Bot is mentioned, and replies are sent back to the group.
- Streaming and Rich Interaction: Agent replies support streaming output, displayed character by character in cardkit typewriter cards (automatically degrading to plain text when permissions are missing). Supports approval forwarding: when the Agent requests permission, the Feishu side receives a confirmation text. Supports question forwarding: when the Agent asks a question, replies can be made using an index number or option format.
- Connection and Security: Both the Feishu long-lived connection and the DSH event stream support reconnection after disconnection. The Feishu long-lived connection is actively initiated from the local machine, has zero public network dependencies, and requires no open ports. The plugin runs under the permissions of the local DSH process, and security is assured by the local environment.
Installation and Enablement¶
- Install the plugin:
Use the official command to install the plugin packagefeishu-dsh-bridge:
dsh plugin --profile <名字> add feishu-dsh-bridge
- Configure the plugin:
Add the configuration to the profile’scordis.patch.ymlfile (example):
- id: feishu-dsh-bridge
config:
appId: cli_xxxxxxxxxxxxxxxx
appSecret: your_app_secret
dshBaseUrl: http://127.0.0.1:3200
sessionCwd: D:\workspace
Typical Usage¶
- Private Chat: Search for the app name in Feishu and start a one-to-one chat to begin the conversation.
- Group Chat: Add the bot in the group settings. After that, only @Bot will trigger a response.
- Task Control: Use
/stopin the conversation to cancel the task currently in progress in the active session. - Configuration Adjustments: Bindings are persisted in the
state/mapping.jsonfile. Streaming output is enabled by default and can be disabled by setting the environment variableSTREAMING=false;STREAM_UPDATE_INTERVAL_MScan control the throttling of card refreshes.
Notes¶
- Security: The
.envfile contains real credentials, is already added to.gitignore, and must never be committed. Thestate/directory contains session binding information and should also not be committed. - Permission Activation: Permission configurations and event subscriptions on the Feishu Open Platform take effect only after a version is published. If the long-lived connection cannot be established, check whether the Feishu-side permission configuration has been published.
- Feature Limitations: Currently, only text messages are supported. Images, files, and rich text messages are not yet supported (a prompt will indicate that only text is supported).
- Network and Runtime: The bridge listens only to the local DSH loopback API, and Feishu-side credentials are isolated by tenant.
This plugin provides DSH Agents with a direct entry point to Feishu using a long-lived connection, making it suitable for scenarios where Agents need to be debugged or used within enterprise internal communication tools. For more details and source code, visit the GitHub repository.