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 和評分是快照中的導航訊號。

安裝與排錯 · 專案問題反饋

同類專案