JMOKSZ/dsh-lark-bridge: Enabling Feishu Bots to Drive Local DSH Agents

Preface

DSH can integrate different message entry points through plugins. For scenarios where DSH agent needs to run locally, JMOKSZ/dsh-lark-bridge provides a Feishu/Lark entry: send messages to the bot in Feishu, and the bot delegates tasks to the local DSH agent via the official long connection.

Below are its positioning, verified capabilities, installation methods, operation methods, and considerations.

What Is This

JMOKSZ/dsh-lark-bridge is a Feishu entry plugin maintained by JMOKSZ, licensed under MIT.

It enables Feishu bots to drive the local DSH agent, supporting attachments, interactive Q&A/approvals, streaming progress cards, and proactive push notifications. The plugin uses the official long connection (WebSocket), requiring no public IP or reverse proxy.

Core Capabilities

The plugin provides the following capabilities:

  • Streaming reply cards (enabled by default), displaying thinking, answer drafts, and tool call panels in real time.
  • Proactive push: the feishu_send tool can push text/cards to conversations.
  • Interactive Q&A and approvals: ask_user_question and tool approvals are rendered as button cards.
  • Attachment handling: images/files/videos/audio are automatically downloaded and saved.
  • Rich text: post messages automatically extract plain text.
  • Multi-session: each Feishu chat maintains an independent DSH session.
  • Group chat: by default, only responds when mentioned.
  • Commands: /new, /status, /whoami, /help.

Prerequisites

First, ensure your local environment meets the following requirements:

  1. DSH CLI, pnpm, and Node.js ≥ 22 are installed.

  2. Prepare a valid LLM key.

  3. Prepare Feishu app credentials and enable the following permissions:

im:message
im:message:send_as_bot
im:message.group_at_msg
im:chat
im:resource
im:message:update

Installation

The following command installs the plugin from GitHub and binds it to the lark profile:

dsh plugin --profile lark add github:JMOKSZ/dsh-lark-bridge --ignore-scripts

Environment Variable Configuration

All credentials come from environment variables and are not written to configuration files.

Required variables:

LARK_APP_ID
LARK_APP_SECRET

Optional variables:

LARK_WORKSPACE

Example:

export LARK_APP_ID=cli_xxx
export LARK_APP_SECRET=xxx
export LARK_WORKSPACE=/path/to/work

Running

Start the plugin according to the verified usage example:

LARK_APP_ID=cli_xxx LARK_APP_SECRET=xxx LARK_WORKSPACE=/path/to/work dsh --profile lark

After startup, the Feishu bot receives messages through the long connection and delegates tasks to the local DSH agent.

Typical Usage

  1. Direct chat: send messages directly; group chat: mention the bot before sending messages.

  2. Sending images/files/videos/audio: automatically downloaded and processed, with optional text descriptions.

  3. When selection/approval is needed: click card buttons, or reply directly with numbers/text.

  4. Using commands:

/new
/status
/whoami
/help

Applicable Scenarios and Considerations

Suitable for scenarios where DSH agent needs to run locally and tasks are initiated from Feishu, especially when attachments, interactive approvals, streaming progress, and proactive push are required.

Considerations:

  • The plugin runs with the permissions of the current dsh process; before installation, it is recommended to review the repository source code and the MIT license to confirm its Feishu messaging, attachment download, and DSH agent behavior meet expectations.
  • LARK_APP_ID and LARK_APP_SECRET are required; LARK_WORKSPACE is optional.
  • The attachment size limit is 104857600 bytes, with Feishu’s limit at 100MB.
  • This plugin uses the MIT license; the DSH plugin directory is a community site, not an official app store.

Links

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye