Introduction¶
DeepSeek Harness (DSH) uses a plugin-based architecture, allowing interaction with projects through instant messaging tools. When building agents, applications usually need the ability to receive and send messages. Traditional solutions often rely on HTTP callbacks, requiring the application to expose a public address. This can be difficult to implement in certain network environments or highly security-sensitive scenarios.
The dsh-feishu-bot plugin addresses this issue. It establishes a connection through a Feishu app bot and uses a persistent WebSocket connection instead of a public callback, without exposing any URL. It also supports secure app binding via a QR code, eliminating the tedious steps of manually copying the App ID and App Secret.
Introduction to dsh-feishu-bot¶
dsh-feishu-bot is a networking utility plugin developed by user 452926826. Its core value lies in connecting DSH’s project management and conversation capabilities to the Feishu environment, enabling developers to operate Harness resources directly from the Feishu client.
Core Features¶
The plugin mainly provides the following capabilities:
- Persistent connection communication: Uses WebSocket to maintain a persistent connection with Feishu, supports automatic reconnection and heartbeat detection, and requires no public callback URL.
- Secure binding: On first use, create and authorize a Feishu app via the QR code displayed in the terminal. After the app is created, credentials (including the App Secret) are stored locally only and are not written into the code repository.
- Resource management: List, select, and create DSH projects and conversations through Feishu commands.
- Operation approval: When a tool requests an operation, the plugin sends a pending approval notification through Feishu and supports approving or rejecting via the
/approveor/rejectcommands. - Message broadcasting: Broadcast conversation completion notifications to additional Feishu groups (configured via environment variables).
Installation and Configuration¶
Before installing, ensure that Node.js 20 or higher is installed on the system.
Installation command:
dsh plugin --profile web add github:452926826/dsh-feishu-bot
Optional environment variables:
After installation, you can fine-tune the behavior through environment variables:
# 指定项目根目录
export FEISHU_PROJECTS_ROOT='/absolute/path/to/projects'
# 限制允许操作 Harness 的飞书群组(推荐生产环境使用)
export FEISHU_ALLOWED_CHATS='oc_xxx,oc_yyy'
# 广播完成通知至额外群组(源对话也会收到通知)
export FEISHU_NOTIFY_CHATS='oc_ops,oc_owner'
Common Commands¶
In the conversation with the bot on Feishu, use the following commands to operate:
/lp: List all current projects./up + project name or index: Select an existing project. The index is based on the output of/lp./np + project name: Create and select a new project under the current project root directory./lc: List all conversations under the current project./uc: Enter the most recently completed conversation and return its last two messages./uc + index: Select and enter a conversation based on the index from/lc./nc: Create and select a new conversation in the current project./approve: Approve the current pending operation./reject: Reject the current pending operation./help: Display help information.
Notes¶
- QR code validity: The binding QR code displayed in the terminal usually expires after 10 minutes. After expiration, restart DSH to regenerate it.
- Credential storage: Binding credentials are stored at
~/.dsh/feishu-bot/credentials.jsonwith file permissions 0600. - Permission isolation: Regular bot messages are submitted to Harness as user instructions and have the same permissions as the currently active DSH profile. We recommend configuring
FEISHU_ALLOWED_CHATSto limit interactive groups and avoid unintended operations. - License: The plugin does not explicitly specify license information.
- Build dependencies: If you encounter a
protobufjsbuild warning during installation, you can addallowBuilds: protobufjs: trueto the correspondingpnpm-workspace.yaml.