Introduction

Under the plugin-based extension paradigm of DSH, the agent runtime can integrate different message channels via plugins. itr-del/dsh-feishu is a Feishu (Lark) IM bridge plugin for DeepSeek Harness (dsh), suitable for integrating Feishu direct messages into an active dsh session.

The core problem it solves is: establishing a mapping between Feishu DM users and dsh sessions, enabling developers to conduct multi-round text conversations with dsh agents via Feishu direct messaging.

What is it

The one-sentence positioning of dsh-feishu is: Feishu (Lark) IM bridge for DeepSeek Harness (dsh).

This plugin is maintained by itr-del, licensed under MIT, and has version 0.1.0 in package.json.

It is primarily used to integrate Feishu custom bots into dsh text conversation scenarios and maintain a persistent dsh session corresponding to each Feishu DM user.

Core Features

The following are verified features:

  1. One Feishu DM user corresponds to one persistent dsh session
    The session identifier is:
   feishu:<open_id>
  1. Support multi-round conversations across reconnections
    The same DM user can continue to use existing session context after reconnecting.

  2. Filter DeepSeek DSML tool call markers in outbound text
    The plugin processes DSML tool call markers in the text returned to Feishu to prevent them from appearing directly in user-visible messages.

  3. Pure ESM, no TypeScript compilation steps
    The plugin runs in ESM mode and does not require additional TypeScript compilation.

  4. No telemetry, fully local
    Verified materials describe it as having no telemetry and running completely locally.

The default plugin configuration is as follows:

{
  "appId": "",
  "appSecret": "",
  "defaultProvider": "deepseek-official",
  "defaultModel": "deepseek-v4-flash"
}

Installation and Usage

1. Install dsh

First, install DeepSeek Harness globally:

npm install -g @deepseek-ai/dsh

2. Add the plugin

Install the dsh-feishu plugin:

dsh plugin add dsh-feishu

3. Configure the Feishu App

Create a Custom App on the Feishu Open Platform and copy the appId and appSecret.

Event subscriptions need to be set up as follows:

  • Set up to use long connections to receive events/callbacks.
  • Add events:
im.message.receive_v1

Permissions to grant:

im:message
im:message.p2p_msg

After completing the permission configuration, publish the version.

4. Set up environment variables and run

The following environment variables are listed as required in verified materials:

export DEEPSEEK_API_KEY="sk-..."
export FEISHU_APP_ID="cli_..."
export FEISHU_APP_SECRET="..."

Then start the dsh web:

dsh web

After startup is complete, send a message to the bot in a Feishu direct chat to initiate a session.

Typical Usage

Following the steps above, the typical usage flow is as follows:

  1. Send a text message to the bot in a Feishu direct chat.
  2. The plugin integrates the message into the dsh session.
  3. The dsh agent returns a text reply.
  4. The plugin sends the reply back to the Feishu direct chat.

The same Feishu DM user corresponds to the same persistent session:

feishu:<open_id>

Therefore, when continuing to send messages in that DM session later, multi-round conversations can be conducted based on the existing session.

Applicable Scenarios and Notes

Who is this for

This plugin is suitable for the following scenarios:

  • Building or running agents with dsh and accessing them via Feishu direct chat.
  • A Feishu text bridge solution that needs to run locally, is MIT licensed, and has no telemetry.
  • Only need DM text messages; do not need image, file, card, or group chat capabilities.

Limitations

Limitations in verified materials include:

  • Only supports text messages.
  • Does not process images, files, cards, or posts.
  • Group chat is not supported yet, only DM.

Regarding streaming replies, there are inconsistent descriptions in existing materials; therefore, this article does not list it as a confirmed capability.

Security Notes

FEISHU_APP_SECRET and DEEPSEEK_API_KEY are sensitive credentials and should not be committed to the code repository or exposed in logs.

The plugin runs with the permissions of the current dsh process. It is recommended to check the source code and license before installation; this plugin is licensed under MIT.

Links