Introduction

DeepSeek Harness (Cordis) provides the base framework for building agents. When integrating with Instant Messaging (IM), it is usually necessary to configure a public IP and a callback server to receive events. This plugin is based on the official @larksuiteoapi/node-sdk and uses an official WebSocket long-lived connection to receive events, eliminating the need to configure a callback server.

The plugin is maintained by tkwkeven and provides two plugin entry points: one for message channel bridging and another for recovery notifications after a process restart. After installation, it automatically inserts configuration into Harness’s cordis.patch.yml.

Features

  • Message channel bridging: WebSocket long-lived connection-based message channel bridging, supporting both Feishu China and Lark International.
  • Parallel task sessions: Supports creating independent, persistent Harness sessions that run in their respective topics, with real-time streaming interaction cards.
  • Media handling: Supports inbound media (files, voice, video) and outbound media (via slash commands or model tags), with automatic fallback for oversized files and cloud storage upload.
  • Cloud document support: Supports reading and generating Feishu cloud documents.
  • Process recovery notifications: After a process restart completes, sends a recovery reminder to the chat that initiated the restart.
  • No public environment required: Can run without configuring a public IP or callback server.

Installation and Activation

Before installing, ensure Node.js 22.19 or later is installed and DeepSeek Harness is installed.

Run the following command to install:

pnpm dsh plugin --profile web add https://github.com/tkwkeven/dsh-lark-all/releases/download/v1.0.0/dsh-lark-all-1.0.0.tgz

After installation, the plugin automatically inserts configuration into Harness’s cordis.patch.yml. You need to ensure that the App Secret has been resolved through the Harness credential service and that permissions have been configured on the Feishu Open Platform.

Typical Usage

Basic Commands

Send the following commands in the chat to perform a connectivity check or view status:

  • /bot-ping: Connectivity check; returns pong.
  • /bot-help: View command help.
  • /bot-status: View connection status.

Parallel Task Sessions

Send a message beginning with 任务: in the chat to create an independent session:

任务:帮我调研一下开源社区的 Cordis 插件生态
ptc任务:写一个 PowerShell 脚本批量重命名文件

During task execution, streaming cards are shown, and the completion report is delivered as a reply. Continue sending messages in the task topic to continue that session.

Sending Media

Files, images, voice, or video can be sent using slash commands or model tags:

/bot-send-file C:\path\to\demo.txt
/bot-send-image C:\path\to\photo.png

A model can also attach media by outputting [lark-file: path] on a separate line in a reply.

Receiving Media

Received files, voice, and video are automatically downloaded to the <cwd>/.lark-inbox/ directory; text files are accompanied by content previews. If the original image exceeds attachment limits, it will automatically fall back to a workspace file.

Considerations and Applicable Scenarios

  • Dependency requirements: Requires Node.js >= 22.19 and depends on related peer dependencies from @larksuiteoapi/node-sdk and DeepSeek Harness.
  • Credential security: The App Secret is not written to the plugin configuration; it must be resolved through the Harness credential service. It is recommended to inject the App ID via environment variables.
  • Platform configuration: Permissions must be configured on the Feishu Open Platform, and “Use long-lived connections to receive events” must be enabled in “Events and Callbacks”.
  • Runtime permissions: The plugin runs with the permissions of the current DSH process. Review the source code and license before installation.

Conclusion

By integrating message channel and operational notification features, this plugin reduces the integration cost of DeepSeek Harness in Feishu/Lark environments. See the GitHub repository for more configuration details and source code.