Preface¶
The DSH plugin system allows external entry points to be connected to the Agent. For scenarios where you wish to call a DSH Agent in Feishu or Lark, dsh-feishu-bridge provides a bridge: it receives Feishu bot messages, forwards them to the DSH Agent, and returns the answers, process prompts, and control commands back to Feishu. Below is an introduction to its positioning, installation, configuration, and current boundaries.
What is this¶
dsh-feishu-bridge is a Feishu / Lark ↔ DeepSeek Harness (DSH) bridge plugin. Maintained by ailoushu666, license MIT, package.json version 0.2.1.
It supports feishu and lark domain, and can be used for Agent calls in one-on-one chats and group chats.
Core Features¶
- Uses Feishu WebSocket long connection to receive events, without the need for a public IP / domain / port forwarding.
- Reuses the same DSH Session for the same Feishu chat or thread, preserving context; threads are independent.
- Replies are associated with the triggering message; replies within a thread stay in that thread.
- By default, only receives messages @mentioning the bot in one-on-one chats and group chats.
- Agent tool calls return execution process prompts; intermediate replies are forwarded via a throttling queue.
- After receiving a message, returns a “Processing / Queued” receipt first; auto-stops on single-round timeout with a prompt.
- DSH autonomous round results are actively pushed back to Feishu.
- Agent option Q&A can be replied to in Feishu via number, option text, or free text.
- Supports Feishu commands:
/reset,/compact,/workspace,/mode,/model,/effort,/stop,/feedback,/goal,/plan,/export,/session,/help. - Configurable plugin settings such as
provider,model,reasoningEffort,workspace,agentPreset, etc. - App Secret and App ID are stored separately, written to the DSH credentials file and profile patch respectively.
- Internal errors uniformly return
errorMessage, without sending exception stack traces or sensitive information. - Session ID is derived via SHA-256 digest, and does not include the original
chat_id/thread_id.
Installation and Activation¶
Requirements¶
- Node.js
^22.19.0or>= 24 dsh webcan already run- Requires a Feishu enterprise self-built app, with bot capabilities enabled, long connection subscription
im.message.receive_v1, and necessary permissions
Installing the Plugin¶
First confirm the target DSH Profile; the command below installs the plugin to the web profile.
From GitHub:
npx @deepseek-ai/dsh plugin --profile web add git+https://github.com/ailoushu666/dsh-feishu-bridge.git
From local directory:
npx @deepseek-ai/dsh plugin --profile web add "<本项目目录>"
Writing Credentials¶
Write FEISHU_APP_SECRET into the DSH credentials file ~/.dsh/.credentials.yaml:
FEISHU_APP_SECRET: <App Secret>
The App Secret should only be placed in ~/.dsh/.credentials.yaml; do not save it to the project directory.
Enabling Configuration¶
Enable id: feishu-bridge in ~/.dsh/profiles/web/cordis.patch.yml, and configure appId, appSecretEnv, domain, requireMention, dmMode.
appId and appSecretEnv are required; domain supports feishu and lark. Example configuration:
- id: feishu-bridge
config:
appId: <App ID>
appSecretEnv: FEISHU_APP_SECRET
domain: feishu
requireMention: true
dmMode: open
Do not use insert to create another instance named feishu-bridge.
Starting and Verification¶
Run the command below to start DSH Web:
npx @deepseek-ai/dsh web
Wait for the output to appear:
feishu-bridge: WebSocket connected
After the steps above, basic verification can be performed:
- Send a question directly in a one-on-one chat.
- Send
@bot your questionin a group chat. - Send
/helpto view commands.
Typical Usage¶
In Feishu, you can send the following commands directly:
/reset/compact/workspace <absolute path of directory>/mode read|write|full/model <model name>/effort off|high|max/stop/feedback/goal [goal|clear|edit <goal>|pause|resume]/plan [off|description]/export/session [number|full ID]/help
Feishu Permissions¶
By default, when receiving and replying to messages @mentioning the bot in one-on-one chats and group chats, the following permissions are required:
im:message.p2p_msg:readonly
im:message.group_at_msg:readonly
im:message:send_as_bot
When group chat /reset requires admin privileges, the following is needed:
im:chat:readonly
Event subscription uses im.message.receive_v1.
Notes and Limitations¶
- Currently only handles text messages; images, rich text, files, cards, etc. are not supported.
- Answers are sent all at once, not streaming output; execution process returns tool call start and intermediate replies, but not tool results.
- Process messages, intermediate replies, autonomous round results, and questions are sent to the root message of the group chat; sessions within threads are no exception.
- No persistence of
chatId → sessionIdmapping; after DSH restarts, existing Feishu chats will rebuild new Sessions. - Do not run multiple long connection consumers for one Feishu app simultaneously, otherwise events will be distributed randomly, leading to message loss or anomalies.
- The plugin runs with the current
dshprocess permissions; check the source code andMITlicense before installing. - This article only covers verified explanations; specific behavior depends on the repository documentation and actual configuration.
Links¶
- GitHub: https://github.com/ailoushu666/dsh-feishu-bridge
- Community directory: https://www.skillhub.cn/plugins/ailoushu666/dsh-feishu-bridge