DeepSHPlugins
dsh-feishu-chat 项目预览
GITHUB / COMMUNITY PROJECT

dsh-feishu-chat

工具与集成JavaScriptMIT

基于飞书官方 WebSocket 长连接的 DSH 双向聊天桥:消息路由到所选工作区的最新会话并自动回复,可在设置页切换机器人凭证与工作区。

1 StarsQing45 更新时间 2026-08-17
访问 GitHub 仓库
dsh-feishu-chat 项目预览

项目介绍

中文

基于飞书官方 WebSocket 长连接的 DSH 双向聊天桥:消息路由到所选工作区的最新会话并自动回复,可在设置页切换机器人凭证与工作区。

English

Two-way Feishu (Lark) chat bridge for DeepSeek Harness over the official WebSocket long connection: messages route to the bound workspace's latest session and replies return automatically; bot credentials and workspace routing are configurable from the settings page.

项目信息与收录信号

快照 2026-09-11
作者 / 组织
Qing45
仓库
Qing45/dsh-feishu-chat
GitHub Stars
1
Forks
0
开发语言
JavaScript
许可证
MIT
最近推送
2026-08-17
Manifest
数据中检测到声明

公开仓库不自动等于可商用;许可证与当前兼容性以原项目文档为准。Manifest 和数据评分不构成安装安全认证。

数据评分

52/ 100
维护活跃
83
文档与实用信息
100
生态关注度
9
安装便捷信号
75
项目声明信号
100

README 含完整安装与使用说明;关注度尚低(1)。

评分来自已有数据快照的五维模型,仅作浏览参考,不是实际使用评测或安全检测结论。

安装与使用

所有项目资料与许可均以对应 GitHub 仓库为准。

dsh plugin --profile web add dsh-feishu-chat

复制命令不会自动执行。请先阅读仓库文档,确认环境要求与许可证。

项目截图

仓库 README

GitHub 原文

已保存的仓库文档快照;文档抓取时间未记录,可能与上方目录介绍处于不同版本。安装前请核对当前仓库说明。

dsh-feishu-chat

Feishu (Lark) bot bridge for DeepSeek Harness: send a message to your Feishu bot and your DSH agent answers; the agent can also push messages back to Feishu.

中文说明

Features

  • Connect your Feishu bot by filling in App ID / App Secret — install the plugin, open 设置 → 飞书, paste the two values from Feishu Open Platform → your app → 凭证与基础信息, click 保存并重新连接, and the long connection comes up immediately. No config files to edit by hand.
  • Switch the bound workspace at any time — the same settings page lists every workspace the profile knows about (name + path + last activity). Click any row to retarget inbound Feishu messages to that workspace; the choice persists and the router reroutes live without restarting the harness.
  • Two-way chat — Feishu messages arrive over the official WebSocket long connection (im.message.receive_v1) and are delegated to a subagent of the bound workspace's latest session; the text reply is sent back to the same chat automatically.
  • Agent → Feishu tool — the model gets a feishu_send_message tool, so any session can push a message to the last chat that contacted DSH (or a given chat_id).
  • Robust long connection — protobuf frame decode (pbbp2), automatic ack, ping keep-alive, fragment merging (sum/seq), and reconnect with backoff, all in-process; stopping or updating the plugin tears everything down cleanly.

Install

# from npm (once published) or from this repo:
dsh plugin --profile web add dsh-feishu-chat
# or directly from GitHub:
dsh plugin --profile web add github:Qing45/dsh-feishu-chat

Then restart dsh web and open 设置 → 飞书:

  1. Connect the bot — fill in the App ID and App Secret (Feishu Open Platform → your app → 凭证与基础信息), click 保存并重新连接. The status line turns green when the long connection is up.
  2. Pick the workspace — the workspace list shows every workspace the profile knows about (name + path + last activity). Click any row to bind it; inbound Feishu messages will be routed to that workspace's latest session from now on. Switch any time, no restart needed.
⚠️ This plugin is community third-party code — installing it runs it with your own permissions. Check the source before installing. Credentials stay local in $DSH_HOME/feishu-bot/config.json and are never committed or uploaded.

How it works

PieceFileRole
Host entrylib/index.jsCordis plugin (export const name + export function apply), wires config, router, WS client, tool and HTTP routes
Feishu APIlib/feishu.jsnode:https helpers: tenant token, send message, WS endpoint
WS clientlib/ws.jsin-process long connection: protobuf pbbp2.Frame, auto-ack, ping, fragment merge, reconnect
Routerlib/router.jsinbound message → resolve parent agent (initiator → live agent → resume) → subagent → reply
Configlib/config.js$DSH_HOME/feishu-bot/config.json persistence
Routeslib/routes.jsHTTP routes for the settings UI (same-origin writes only)
Clientclient/client.jswindow.__ModuleLoader__.load bundle registering the 设置 → 飞书 section

The package is a standard DSH bundle: package.json declares dsh.bundle.patch (layer insertion) and dsh.client (web bundle), and cordis.patch.yml inserts the plugin row into the profile tree.

Development / local install without a GUI restart

The profile's own patch layer ($DSH_HOME/profiles/<profile>/cordis.patch.yml) is hot-reloaded:

pnpm --dir "$DSH_HOME/profiles/web" add /path/to/dsh-feishu-chat

Then append to cordis.patch.yml:

- insert:
    - id: feishu-bot
      name: 'dsh-feishu-chat'

Refresh the browser — the settings section appears without restarting the harness.

Caveats

  • One subagent is spawned per inbound message (no queueing); replies may arrive out of order under a burst.
  • The TLS verification is relaxed (rejectUnauthorized: false) so the long connection works behind corporate MITM proxies / broken certificate stores; review this trade-off for your environment.
  • The tool name is feishu_send_message; chat_id defaults to the most recent chat that contacted DSH.

License

MIT

使用前核对

安装步骤、兼容版本与授权范围以原项目当前文档为准。Stars 和评分是快照中的导航信号。

安装与排错 · 项目问题反馈

同类项目