huoxue1/harness-lark

Lark/Feishu channel plugin, providing Feishu communication capabilities for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)

Project Overview项目介绍

This repository is a native plugin built exclusively for DeepSeek Harness (DSH) that adds full communication and integration capabilities for Lark (Feishu) instant messaging and native productivity tools. It adapts natively to DSH’s Cordis plugin system and supports a wide range of features including IM message send/receive, streaming interactive cards, Feishu cloud document operations, Wiki/Drive/Base/Calendar/Task management, user OAuth authorization, built-in slash commands, and DSH approval workflow integration. Users can install the plugin via a single command with the DSH CLI, deploy it via the pre-configured Docker image provided by the maintainer, or install it manually directly from source code.

Every individual Lark chat session maps to a persistent DSH agent, and all conversation context is retained across messages and DSH restarts. Users can use built-in slash commands to check session status, switch AI models, change the working directory, reset conversation context, manage permission settings, and more. Group chat access can be configured with custom policies, and the default setting disables group chat to reduce potential security risks from untrusted interactions. This plugin is targeted at developers who need to connect their DSH agent to a Lark or Feishu enterprise IM environment.

This plugin is released under the permissive open source MIT license, and it requires Node.js version 22 or newer and a working local DSH installation to run. Before installing, users must create a custom application on the Lark open platform and correctly retrieve the app ID and app secret credentials. After installation, users need to export these credentials as environment variables, then start DSH to successfully activate the plugin. For security, the project documentation recommends keeping the default out-of-the-box configuration and not enabling open group chat access for untrusted users.

这是专为 DeepSeek Harness 开发的原生插件,为 DSH 提供飞书(Lark/Feishu)全渠道通信与交互能力,适配 DSH 的 Cordis 插件体系。它支持消息收发、流式交互卡片、飞书云文档/知识库/云盘/多维表格/日历/任务操作、用户 OAuth 授权、斜杠命令、DSH 审批流程对接等能力,可通过 DSH CLI 一键安装,也支持 Docker 部署和源码手动安装。

每个飞书会话都会映射一个持久化的 DSH Agent,上下文会跨消息、跨重启保留。用户可通过斜杠命令查看状态、切换模型、修改工作目录、重置上下文、管理权限设置等。群聊支持按规则设置访问策略,默认禁用群聊避免安全风险,适合需要将 DSH Agent 接入飞书企业IM的开发者使用。

本插件使用 MIT 许可证,依赖 Node.js 22+ 版本和已部署的 DeepSeek Harness,需要提前在飞书开放平台创建应用并获取凭据。安装后需将飞书应用凭据配置到环境变量,启动 DSH 即可运行。安全层面建议保留默认配置,不要随意开启群聊访问权限。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 7 stars - very few users, little community feedback星标只有 7,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add harness-lark

把 huoxue1/harness-lark 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

harness-lark

Lark/飞书(Feishu)渠道插件,为 DeepSeek Harness 提供飞书通信能力。通信部分参考 openclaw-lark(MIT, ByteDance Ltd.),适配 dsh 的 Cordis 插件体系。

English | 中文 | 📖 安装文档(GitHub Pages)

用 Docker 一键部署(自带插件的 deepseek-harness-lark 镜像)或手动安装插件,见安装文档。

功能

类别 能力
💬 IM 消息收发 WebSocket 长连接接收消息、文本/卡片回复、@提及、群聊/私聊策略、重连去重
🃏 交互卡片 + 流式回复 思考过程(reasoning)流式 → 生成(answer)流式 → 最终结果更新到卡片,含可折叠思考面板、耗时/token footer
🖼️ 媒体 图片/文件/音频的上传、下载与发送
📄 文档/Wiki/Drive 创建/读取/更新云文档(docx)、知识库节点、云盘文件
📊 Base/表格/日历/任务 多维表格(bitable)、电子表格、日历事件、任务
🔐 用户 OAuth 设备授权码流程(RFC 8628),用户级 token 管理
👍 表情反馈 收到消息回复 Get 表情(处理中),完成后换成 DONE
🔐 飞书审批卡片 dsh 审批请求(如 bash 沙箱升级)以带「批准/拒绝」按钮的卡片发到会话,点击即应答,超时自动拒绝
⌨️ 斜杠命令 /status /model /cd /permission /setting /help 本地命令(不进模型)

架构

  • 会话模型:每个飞书会话(chat_id)映射一个持久的 dsh agent(ctx.agents.resume 优先,失败则 create),上下文跨消息、跨重启保留。
  • 通信层:@larksuiteoapi/node-sdk 的 WSClient 长连接 + EventDispatcher 路由(参考 openclaw-lark 的 monitor.ts / lark-client.ts)。注意 SDK v1.65+ 需要显式 start({ eventDispatcher })(旧版构造时自动连接),且事件为 schema 2.0 格式(message.message_type 而非 msg_type)——harness-lark 两者均已适配。
  • 回复通路:飞书消息 → agent.followup();assistant/chunk(reasoning-delta / text-delta)→ 流式卡片;turn/end → 完成卡片并换表情。
  • 模型切换:/model 通过 installModelSelection 的 ModelSelectionRef 运行时改写,下一轮生效。
  • 工具注册:所有飞书能力以 dsh 工具(ctx.tools.register + defineTool)暴露给模型。

斜杠命令

命令 说明
/status 查看当前模型、工作目录、会话状态
/model 列出可用模型;/model <provider/model> 切换
/cd 查看工作目录;/cd <绝对路径> 修改(下次会话/重启后生效)
/new 新建上下文(清空当前对话历史,别名 /reset)
/stop 停止当前正在进行的回复
/permission 查看/切换会话权限预设(/permission <预设名>,如 danger-full-access)
/setting 查看设置项;/setting permission [预设名] 设置新会话默认权限;/setting model [模型] 设置新会话默认模型
/help 列出所有命令

群聊中命令可带 @机器人 前缀(如 @机器人 /status),插件会自动剥离提及前缀。

安装

前置条件

  • Node.js ≥ 22(含 pnpm)
  • 已安装 DeepSeek Harness(dsh CLI,可通过 npx @deepseek-ai/dsh web 或从源码运行)
  • 飞书开放平台应用(凭据:appId、appSecret;推荐开启长连接模式,无需公网回调地址)
  • 飞书开放平台后台:事件订阅 → 订阅方式选择「使用长连接接收事件」,并订阅 im.message.receive_v1 事件

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-docs-panel 下一个 Next lunheng-article-pipeline-dsh →