Introduction¶
DeepSeek Harness (DSH) adopts an “everything is a plugin” architecture. When integrating Feishu/Lark messages into DSH, you typically need to develop a Webhook service yourself to receive and forward messages. The dsh-lark-connector plugin provides a persistent connection via the official Feishu/Lark SDK, routing Feishu/Lark messages directly into DSH sessions. After the Agent processes them, replies are sent back through Feishu/Lark without an extra message relay service.
Features¶
This plugin provides the following core capabilities:
- Feishu WebSocket persistent connection: Uses the official SDK to receive real-time messages without deploying an external Webhook.
- Direct and group chat support: Direct chat messages are responded to directly; group chats only respond to explicit text messages that mention the bot.
- Image recognition capability: Supports PNG/JPEG/WebP/GIF formats, automatically downloads and persists images to DSH attachment storage for processing by vision models.
- Session isolation and recovery: Each Feishu
chatmaps to an independent DSH session, supporting FIFO-order processing. - Native DSH session titles: Uses the Feishu chat title as the DSH session title and annotates messages with sender information.
- Workspace assignment: Can assign Feishu sessions to a specified DSH workspace.
- Default configuration for new sessions: Configure Agent preset, Provider/Model, and Workspace in the Web settings page, applied to subsequently created Feishu sessions.
- Reliable replies: Supports chunking overlong text, and uses bounded deduplication by message ID to prevent duplicate processing.
- Credentials management: Supports saving App ID, App Secret, etc. through the DSH credentials service or environment variables.
- lark-cli integration: Automatically syncs credentials to lark-cli and provides configuration check tools.
- Bilingual Web interface: Settings page copy follows the current DSH language.
Installation and Enabling¶
The plugin is published on npm. Replace the installation path with the actual source code path:
dsh plugin --profile web add /path/to/dsh-lark-connector
After installation, restart the DSH Web Host. The plugin registers as lark-connector.
Configuration¶
Web Settings Page¶
In DSH settings, on the “Feishu Connector” page, configure the following items:
- App ID: Feishu application ID
- App Secret: Feishu application secret
- Brand: Brand identifier, usually
feishuorlark - lark-cli path: Path to the lark-cli executable; leave blank to search from system PATH
- Feishu session Workspace: Specify the DSH workspace to which Feishu sessions belong
- Default configuration for new sessions: Agent preset, Provider, Model, etc.
- Card display options: Whether to add the THINKING emoji, whether to use interactive card streaming updates, whether to display tool calls, etc.
Environment Variables¶
Credentials can be configured via environment variables. Environment variables take precedence over values saved in the Web page:
| Variable Name | Description |
|---|---|
LARK_APP_ID |
Feishu application App ID |
LARK_APP_SECRET |
Feishu application secret |
LARK_BRAND |
Brand, usually feishu |
LARK_CLI_PATH |
Path to the lark-cli executable |
lark-cli Integration¶
The plugin provides two DSH tools:
lark_setup: Checks lark-cli and official Agent Skills; can optionally run the official installer.lark_status: Views application configuration, CLI version, and connection status.
Usage and Notes¶
Typical Usage¶
- Create an app on the Feishu Open Platform, enable bot capability, and subscribe to the
im.message.receive_v1event. - Configure credentials such as App ID and App Secret on the DSH Web settings page.
- Use the
lark_setuptool to check the environment. - Mention the bot in a Feishu group chat to start interacting.
Notes¶
- Group chat response: Group chats only respond to explicit text messages that mention the bot.
- Attachment limits: Images that exceed the per-message attachment limit are ignored.
- Environment variable precedence: Environment variables take precedence over credentials saved in the Web page.
- Archiving behavior: After a chat is archived, a new visible session is automatically created.
Ecosystem and Maintenance¶
dsh-lark-connector is a community plugin maintained by developer 4t145.
- License: MIT
- Repository: https://github.com/4t145/dsh-lark-connector
- Plugin catalog: https://www.skillhub.cn/plugins/4t145/dsh-lark-connector