Preface

In the DSH plugin ecosystem, many developers aren’t trying to solve “can the agent run” but rather “can the agent be integrated into everyday chat.” dsh-feishu-bridge is built for exactly this scenario: it bridges Feishu / Lark messages to DeepSeek Harness (dsh), so when you message the bot in Feishu, it executes one dsh agent turn and sends the reply back to the chat.

What This Is

dsh-feishu-bridge is an independent community project maintained by wz-heng, hosted at https://github.com/wz-heng/dsh-feishu-bridge. It is not built, maintained, or endorsed by DeepSeek.

In terms of responsibilities, it does two things:

  1. Provides message bridging from Feishu / Lark to dsh;
  2. Provides a dsh plugin shell that starts and supervises the Python bridge process within a dsh profile.

It does not install Python dependencies or create a Python environment. The Python side needs to be installed by you beforehand.

Core Features

Let’s break down the capabilities.

Feishu / Lark Message Bridging

Send a message to the Feishu bot, and it will execute one dsh agent turn, sending the reply back to the current chat.

Default Deny

A fail-closed allowlist is enabled by default. Without any permissible open_id, the bot will not respond to anyone and will reject messages.

Private Chat Pairing

/pair can only be used in private chats to add an open_id to the allowlist.

Its limitations are clear:

  • Only works in private chats;
  • One-time per process;
  • Expires after 900 seconds;
  • Invalidates after 5 consecutive failed attempts.

Transport Methods

Supports two transports: ws and webhook.

When using webhook, additional configuration is required:

  • FEISHU_VERIFICATION_TOKEN
  • FEISHU_ENCRYPT_KEY

Session and Card Behavior

It supports:

  • per-chat verbosity
  • sticky sessions
  • one-time card nonces

Remote Bash Approval

It supports remote bash approval, offering Allow / Deny prompts within Feishu.

dsh Plugin Shell

dsh plugin can install this repository. The plugin shell starts and supervises the same Python bridge process rather than reimplementing the bridge logic.

SDK Canary

It performs daily canary tests against the latest releases of deepseek-harness-sdk and lark-channel-sdk.

Installation and Activation

A note upfront: whether running standalone or installed as a dsh plugin, the Python side must be installed first. The plugin will not install Python dependencies for you, nor will it bootstrap a Python environment.

Install the Python Side First

Clone the repository, create a Python 3.12 virtual environment, then install the Python package:

git clone https://github.com/wz-heng/dsh-feishu-bridge.git
cd dsh-feishu-bridge
python3.12 -m venv .venv
. .venv/bin/activate
pip install -e .

Below, set the environment variables needed for minimal operation. FEISHU_ALLOWED_OPEN_IDS is the allowlist, recommended to be explicitly configured; when not configured, it defaults to fail-closed.

export FEISHU_APP_ID=cli_xxx
export FEISHU_APP_SECRET=xxx
export FEISHU_ALLOWED_OPEN_IDS=ou_xxx
export FEISHU_TRANSPORT=ws

If using webhook, also set:

export FEISHU_TRANSPORT=webhook
export FEISHU_VERIFICATION_TOKEN=xxx
export FEISHU_ENCRYPT_KEY=xxx

Standalone Run

Start the bridge:

python -m dsh_feishu_bridge

After startup, send this to the bot in a Feishu private chat:

/pair <code>

Here, <code> is the one-time pairing code provided by the bridge. After successful pairing, the current open_id gets added to the allowlist; messages from unlisted open_ids are subsequently rejected.

Installing as a dsh Plugin

After completing the Python installation and environment variable setup above, add the repository to a specified dsh profile:

dsh plugin --profile <name> add /path/to/dsh-feishu-bridge

Here, <name> is the dsh profile name, and <path> is the local repository path. Once installed, the dsh plugin shell handles starting and supervising the Python bridge process.

Running Node Plugin Tests

To verify the Node plugin shell, you can run:

node --test tests-node/**/*.test.mjs

Use Cases and Considerations

It is well-suited for these scenarios:

  • Connecting a dsh agent to Feishu / Lark private chats, rather than maintaining a separate chat gateway;
  • Preferring to deny strangers by default, pairing before granting access;
  • Needing to perform remote bash Allow / Deny approvals directly in Feishu;
  • Wanting to manage the Python bridge process as a dsh plugin.

Notes before use:

  • It is an independent community project, not built, maintained, or endorsed by DeepSeek;
  • The DSH / harness is described as a v0.1 developer preview, and breaking changes may occur between versions;
  • The plugin runs with the current dsh process’s permissions; please inspect the source code, dependencies, licenses, and environment variables before installation to ensure they meet your security requirements;
  • The webhook transport requires FEISHU_VERIFICATION_TOKEN and FEISHU_ENCRYPT_KEY;
  • /pair is private-chat only, one-time per process, and limited by 900 seconds or 5 failed attempts;
  • The project is licensed under the MIT license.

Conclusion

The value of dsh-feishu-bridge lies in turning the “Feishu message -> dsh agent turn -> chat reply” pipeline into an installable community plugin, while preserving boundaries like default deny, pairing, approval, and plugin hosting. If you need to invoke dsh within Feishu / Lark, you can start with the local Python installation and then decide whether to integrate it into a dsh profile.

Project address: https://github.com/wz-heng/dsh-feishu-bridge