New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

dsh-feishu-bridge

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dsh-feishu-bridge

Bridge Feishu (Lark) private chat (text + images with vision analysis) into DSH agent sessions: stable one-session mapping, explicit new-session command, cardkit typewriter streaming.

latest
npmnpm
Version
1.0.4
Version published
Weekly downloads
25
-51.92%
Maintainers
1
Weekly downloads
 
Created
Source

dsh-feishu-bridge

把飞书(Lark)私聊消息实时桥接进 DSH(DeepSeek Harness)agent 会话的 Cordis 插件,并通过飞书官方 cardkit 流式卡片实现打字机式输出。

能力

  • 监听飞书私聊文本消息(im.message.receive_v1,通过 lark-cli event consume 长连接)
  • 将消息作为用户消息注入当前 DSH agent 会话,由 agent 以完整工具能力(bash / fs / 飞书技能等)处理
  • 回复以流式卡片(streaming_mode)实时逐字上屏;卡片创建失败时自动降级为「文本确认 + markdown 完整回复」
  • 仅允许配置的 ownerOpenId 与机器人私聊

架构

飞书私聊 ──消息──▶ lark-cli 事件长连接(插件内子进程)
                        │ 注入
                        ▼
                DSH agent 会话(完整工具)
                        │ 增量文本(poll assistant/chunk)
                        ▼
                cardkit 卡片流式更新(打字机效果)

安装

npm install dsh-feishu-bridge

在 DSH 的 cordis.yml 中注册:

plugins:
  - name: dsh-feishu-bridge
    config:
      ownerOpenId: ou_xxxxxxxx        # 必填:唯一允许私聊的用户 open_id
      botOpenId: ou_yyyyyyyy          # 可选:机器人自身 open_id
      larkCliPath: /path/to/lark-cli  # 可选:lark-cli 绝对路径
      debugLog: feishu-bridge-debug.log

前置条件

  • lark-cli 已安装并完成认证(bot 身份必需;agent 若调用日历/任务等需 user 身份)
  • 飞书应用已开通权限:
    • im:message(或 im:message:send_as_bot)—— 收发消息
    • cardkit:card:write —— 流式卡片(可选,缺失时降级为非流式)
  • 应用已订阅事件:im.message.receive_v1(长连接模式)

配置项

字段必填说明默认
ownerOpenId✅唯一允许与机器人对话的用户 open_id-
botOpenId机器人自身 open_id(忽略自身回声)''
larkCliPathlark-cli 绝对路径PATH 解析
workspaceRoot子进程工作目录沙箱工作区根
updateIntervalMs卡片更新节流700
maxReplyLength回复截断长度3500
elementIdcardkit 元素 IDmd_1
debugLog调试日志文件名feishu-bridge-debug.log

License

MIT

Keywords

dsh

FAQs

Package last updated on 14 Aug 2026

Related posts