dshbase

Plugin directory / Network / dsh-adapter-feishu

dsh-adapter-feishu

Verified · install-tested on dsh AtinyFurina

✓ Actively maintained Builds on 9 official DSH packages Pure TypeScript

View on GitHub ↗ ← Back to plugin directory

1Stars
0Forks
0Open issues
TypeScriptLanguage
2026-08-14Last push
Cross-platformPlatform

What it does

Feishu/Lark adapter — receive and send messages in Feishu via long-connection WebSocket, no public IP needed.

Our take
Works — verified, early-stage project

Feishu/Lark adapter — receive and send messages in Feishu via long-connection WebSocket, no public IP needed. It installs cleanly and boots without issues in our testing. It's early-stage but functional.

“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

README

dsh-adapter-feishu

DeepSeek Harness 的飞书适配 Cordis 插件。使用飞书「长连接」模式(WebSocket),
不需要公网 IP、域名或内网穿透,大陆网络直连可用。

工作原理

  • 飞书长连接推送 im.message.receive_v1 事件(@机器人 或与机器人单聊)。
  • 每个飞书会话(chatId)对应一个 DSH Agent,会话上下文持久保留。
  • Agent 的回复按 900ms 增量流式发回飞书,自动分片,群聊自动 @ 发送者。
  • 机器人自己的消息、重复推送的事件都会被过滤。

安装(本机部署方式)

  1. 依赖安装(一次性):

    npm.cmd install --prefix C:\Users\AtinyFurina.dsh\profiles --no-save @larksuiteoapi/node-sdk

  2. 插件文件放在 web 配置目录:

    C:\Users\AtinyFurina.dsh\profiles\web\plugins\dsh-adapter-feishu\index.mjs

  3. 在 C:\Users\AtinyFurina.dsh\profiles\web\cordis.patch.yml 中加一行:

    • id: ./plugins/dsh-adapter-feishu/index.mjs
      config:
      appId: cli_xxxxxxxx
      appSecret: xxxxxxxxxxxxxxxx

    保存后配置文件会被热加载;未生效时重启 dsh web。

飞书控制台操作清单

  1. 打开 https://open.feishu.cn/app 创建「企业自建应用」。
  2. 凭证与基础信息 → 记录 App ID 与 App Secret。
  3. 添加应用能力 → 启用「机器人」。
  4. 权限管理 → 开通:
    • im:message 获取与发送单聊、群组消息
    • im:message.p2p_msg 获取用户发给机器人的单聊消息
    • im:message.group_at_msg 获取群组中 @机器人的消息
    • im:message:send_as_bot 以应用身份发消息
  5. 事件与回调 → 事件订阅 → 订阅方式选「使用长连接接收事件」→ 添加事件「接收消息 im.message.receive_v1」。
  6. 版本管理与发布 → 创建版本并发布(企业自建应用需管理员审核或自动通过)。
  7. 在飞书里搜索机器人名字,加进群或单聊,发消息即可。

配置项

  • appId / appSecret 必填。
  • cwd 给 Agent 的工作目录,默认 dsh 进程的工作目录。
  • chunkSize 单条飞书消息最大字符数,默认 2000。
  • flushIntervalMs 回复增量发送间隔(ms),默认 900。
  • mentionSender 群聊回复时是否 @ 发送者,默认 true。
  • allowChats 白名单 chatId;非空时只处理这些会话。
  • denyChats 黑名单 chatId。
  • resetCommand 发该指令重置当前会话上下文,默认 /reset。
  • stateFile 会话映射持久化文件,默认插件目录下 state.json。
  • verbose 是否打印调试日志。

注意

管理命令(飞书里发给机器人)

  • /help 查看命令列表
  • /ws 列出所有工作区及其会话
  • /ws add <目录路径> 注册新工作区
  • /ws use <编号|id|路径> 本对话绑定该工作区(下条消息新建会话)
  • /agents 列出所有工作区中的所有会话(活跃/运行中/存档)与未归入工作区的活跃会话
  • /use 本对话接管已有会话,续写其上下文
  • /bind 查看本对话当前绑定
  • /reset 重置本对话会话

注意

  • 长连接模式仅支持企业自建应用;飞书要求事件回调 3 秒内返回,
    本插件在回调内只做入队,Agent 执行完全异步,满足该约束。
  • 每个应用最多 50 个长连接;同一应用多客户端部署时事件随机发给其中一个。

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install dsh-adapter-feishu for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

This plugin is GitHub source (not published to npm) — install it straight from the repo:

Web profile:

dsh plugin --profile web add github:AtinyFurina/dsh-adapter-feishu

Headless (CLI) profile:

dsh plugin --profile headless add github:AtinyFurina/dsh-adapter-feishu

Test report

Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.

When to use it

Receive and send messages in Feishu over a long-connection WebSocket, so you can run a bot with no public IP.

Who it's for

Users behind NAT or a home network who want a Feishu bot without exposing a server to the internet.

For developers — extending it

Event handling and reply shaping are the seams — add interactive cards, buttons, and multi-user routing.

Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Network

Browse all 7795 plugins →