Preface

When building an agent in DSH, a common requirement is: the session is already established, but you want to send messages and view results in Feishu temporarily, rather than just staring at the Web interface. If the Feishu bot requires a public network callback, the integration cost is higher. dsh-fschannel chooses to use the official Feishu @larksuite/channel SDK’s WebSocket long connection, eliminating the need for a public network callback address to directly bridge DSH Web sessions and Feishu/Lark chats.

What is this

dsh-fschannel is a DeepSeek Harness (DSH) plugin. Once a DSH Web session is bound to a Feishu/Lark chat, messages from Feishu enter that DSH session and are processed by the Agent; the processing results are automatically sent back to Feishu.

The repository username is cershuang, and the source code repository is:

https://github.com/cershuang/dsh-fschannel

The license is MIT. DSH’s extension mechanism is “everything is a plugin”; the community directory is an independent site with no official affiliation with DeepSeek / Huafan, and this article does not describe it according to the official app store standards.

Core Capabilities

Session and Feishu Chat Binding

The plugin supports one-to-one binding between DSH Web sessions and Feishu chats. The binding relationship is persisted to:

$DSH_HOME/feishu-bindings.json

Once a session enters the “pending binding” state, the chat containing the next Feishu message will complete the binding. This allows you to create the session in the Web interface first, and then complete the association in a Feishu private chat or group.

Message Channel

The plugin uses the @larksuite/channel SDK to establish a WebSocket long connection, requiring no configuration of a public network callback address. In group chats, it defaults to responding only to @mentions of the bot; single-member groups can be untagged. When a message is received in an unbound chat, the plugin can return a guided prompt according to configuration.

At the message delivery level, the plugin provides SDK-level deduplication (30s) and serial delivery per chat. When the Agent is processing, the Feishu side will indicate the queue position of the current message.

When a message is received, the plugin can automatically add emoji feedback; whether to enable this and which emoji to use in different stages can be configured.

Streaming Output and Cards

The plugin supports streaming card output: opening the card at the start of a turn, presenting the reply character by character, and retaining the final result after the turn ends. The output content supports Markdown tables, code blocks, and embedded images.

If the Feishu side lacks card permissions, the plugin will fall back to a regular message. You can also set:

output: 'plain'

to send a regular message for every step.

Image Processing and Sending

Images sent from Feishu are first cached and not processed immediately; when the next text message arrives, the plugin passes the image path to the Agent, which processes it combined with the text message using visual recognition capabilities. This capability requires @anionex/dsh-vision-toolkit to be ready, and requires the runtime to be ready.

The plugin also provides a session image gallery and performs automatic repair on historical feishu/image logs.

The Agent can also send results back to Feishu during a turn:

  • Call send_feishu_image to send images, supporting PNG/JPEG/WebP/GIF, and the image path must be within the session workspace.
  • Call send_feishu_file to send files, with a size limit of ≤30 MiB.

Feishu-side Commands

The plugin provides an entry point for model and effort control on the Feishu side. Sending phrases like “Adjust model”, “Switch model”, “Adjust effort” will pop up a card with model and effort buttons.

You can also use commands directly:

/model
/model list
/model use <provider>/<model>
/model effort <off|high|max>
/status
/stop
/help

Where /model, /model list, /model use, and /model effort are used to query or switch models and thinking intensity; /status, /stop, and /help are used to view status, stop the current turn, and view commands.

Installation and Enablement

Prerequisites:

Node 22.19+
dsh CLI
pnpm

Credentials are recommended to be saved in the DSH credential database:

$DSH_HOME/.credentials.yaml

The .env file should only contain path configurations.

When installing according to the README, the following order is usually executed:

cp example.env .env
npm install && npm run build
dsh plugin --profile web add file:<plugin repository path>
dsh web

Here you first copy the example environment file, then build the client package, then install it to the web profile using the file: method, and finally start dsh web to apply the changes. The <plugin repository path> in the installation command is the local plugin repository path; do not manually concatenate a remote installation command based on the owner/repo name.

If pnpm reports an error due to a protobufjs build script:

ERR_PNPM_IGNORED_BUILDS

You need to add the following to the profile’s pnpm-workspace.yaml:

allowBuilds:
  protobufjs: false

After modifying the plugin source code, you need to rebuild and reinstall:

npm run build
dsh plugin --profile web add file:<plugin repository path>
dsh web

Typical Usage

  1. After creating a new session in the Web interface, click “Connect Feishu” on the session header to put the session into a pending binding state.

  2. Private chat with the bot in Feishu, or @ the bot in a group and send a message to complete the binding between that chat and the current DSH session.

  3. Continue sending messages in Feishu afterwards; the messages will enter that DSH session; the Agent’s replies will be automatically sent back to the Feishu chat.

  4. If you need new sessions to default to pending binding, you can open “Settings → Feishu Bot” and enable “New session defaults to connecting to Feishu”, or click “New session and connect to Feishu”.

Suitable Scenarios and Notes

Suitable scenarios for this type of plugin are: you are already using DSH Web sessions and want to connect the same session to Feishu/Lark for mobile access, group chats, or daily collaboration entry points; you also want the Agent to be able to send images and files to Feishu, and use commands like model switching, stopping, and status viewing.

Before use, it is recommended to check the following items:

  • The plugin will run as a DSH plugin and read local paths and files with the current dsh process permissions. You should check the source code and license yourself before installing.
  • The license is MIT.
  • Credentials are recommended to be saved in $DSH_HOME/.credentials.yaml, and .env should only contain path configurations.
  • The HTTP API /feishu/* only accepts access from 127.0.0.1.
  • Streaming cards rely on Feishu card capabilities; they will automatically fall back to regular messages if card permissions are missing.
  • Image caching and recognition rely on @anionex/dsh-vision-toolkit and require the runtime to be ready.
  • send_feishu_image supports PNG/JPEG/WebP/GIF, and the path must be within the session workspace; send_feishu_file is limited to ≤30 MiB.
  • Group chats default to responding only to @mentions of the bot; single-member groups can be untagged.
  • After a dsh upgrade, the plugin itself, registration lines, and binding data are preserved; no need to re-patch.

Links

Source code repository:

https://github.com/cershuang/dsh-fschannel

Community directory clue:

https://www.skillhub.cn/plugins/cershuang/dsh-fschannel

The link to this directory comes from a clue and has not been verified in this documentation; if you need to rely on the source code, prioritize using the repository address.