wangbodbs/dsh-plugins--packages-dsh-feishu ↗★ 0

dsh-feishu

Talk to DeepSeek Harness from Feishu (飞书): each Feishu chat is bound to a series of DSH sessions, messages become turns, answers are pushed back, an interactive `/permission` card switches the session's file sandbox mode, a `feishu_ask` card asks the user a question with buttons plus a free-text note field (instead of the GUI dialog a Feishu user cannot see), `/model` sends a card whose buttons switch the session model, `/sessions` sends a card whose buttons switch back to an earlier conversation of the same chat (`/open <n>` still works), and `/new` / `/open` manage the chat's conversation generations. Permission requests are asked with a Feishu card too (/approval toggles the policy). Every outgoing message is a card, because Feishu plain text does not render Markdown. Inbound files and images are downloaded into the workspace. Zero runtime dependencies — hand-rolled protobuf framing over Node's built-in WebSocket. 在飞书里直接跟 DSH 对话。 适合习惯在飞书办公、需要远程交互和审批DSH任务的用户。

パッケージ
dsh-feishu
互換性
未検証
Harness ピア範囲
>=0.1.0-rc.5 <0.2.0
Cordis ピア範囲
>=4.0.0 <5
バージョン
0.7.0
ライセンス
MIT
最終更新
2026/09/29

同名パッケージの別リポジトリ

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:wangbodbs/dsh-plugins#7d6805d3e650d7766bbd141290f5ba39f1bc9344&path:packages/dsh-feishu

ドキュメント

README 全文を読む ↗

配置

两种方式,二选一:

A. GUI 设置面板(推荐) —— 「设置 → 插件 → 飞书」。

面板由插件的浏览器端提供(lib/client.js),包含:

  • 实时状态:长连接是否已建立(含 service_id)、App ID、会话数、最近一条事件类型与时间、 最近一次推送时间、最后一次错误。每 5 秒刷新一次,读的是插件自己的 GET /plugins/dsh-feishu/status。
  • 全部配置项:启用开关、App ID、App Secret、开放平台域名、会话工作目录、会话白名单、 收到消息回执、回答回推、任务运行中收到消息(插队 / 排队)。
  • 操作提示:飞书后台要配的两处(长连接订阅方式、im.message.receive_v1 与 card.action.trigger 两个事件)直接写在面板里。

保存即生效(写进 ~/.dsh/settings.yaml,0600,不用重启)——桥接会按新配置重连。

⚠️ 只有服务端的 settings 段是不够的:DSH 的设置页会枚举命名空间,但卡片必须由插件自己的 浏览器端注册到 settings.plugin.item 槽(key = 命名空间)。只装服务端那一半,设置页里 那一栏是空的。这就是 lib/client.js + package.json 的 dsh.client / exports["./client"] 存在的原因。

B. patch 行 —— 在 profile 的 ~/.dsh/profiles/web/cordis.patch.yml 末尾追加:

- id: feishu
  config:
    enabled: true
    appId: cli_xxxxxxxxxxxxxxxx
    appSecret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    cwd: /Users/you/project
    allowedChatIds: []

⚠️ 后一层 patch 替换整份 config(不是合并),已配置的字段要全部重写一遍。

键默认作用
enabledfalse总开关。关着时插件照常加载、注册工具,但不建连接
appId / appSecret''自建应用凭据
domainhttps://open.feishu.cnLark 国际版改成 https://open.larksuite.com
cwd宿主 cwd新 session 的工作目录(必须是绝对路径)
allowedChatIds[]允许驱动 agent 的会话白名单;空 = 不限制
ackReactiontrue收到消息先加一个表情回执
replyToChattrue把助手回答推回飞书
sendModesteer任务运行中收到消息怎么投递(见下)

sendMode —— 任务运行中收到消息:插队还是排队

核心的 agent inbox 有两条车道,插件把用户消息投到哪条就是这两种行为:

值走的那条效果
steer(默认)agent.steer() → next-step插队:正在跑的这一轮在下一个 step 边界就能看到这条消息,不用等它跑完。会话空闲时等价于直接开一轮
queueagent.followup() → next-turn排队:等当前这一轮彻底结束,这条消息作为下一轮开始
  • 用 steer 时,消息不会打断正在执行的工具调用 —— 它插在「下一步」的边界上,所以 20 秒的多步任务 通常下一步就会读到你的新指令;queue 则是等整个 turn 结束(有长任务时可能要等很久)。
  • 四条入站路径都遵守这个开关:普通文字、飞书附件(文件/图片)、链接正文、迟到的卡片回答。
  • 会话空闲时两者行为一致(都会立刻开一轮),只有「正在运行」时才有区别。
  • 用户 2026-09-29 的要求就是默认插队:「正在运行任务的时候通过飞书发送消息默认插队,而不是排队」。
  • 想改回排队:面板里切成「排队」,或 patch 里写 sendMode: queue。
  • 插件日志里每次投递都会打一行 投递方式=steer|queue,用来确认真的走了插队。