ttmouse/dsh-dingtalk-channel0

dsh-dingtalk-channel

DingTalk IM bot channel for DeepSeek Harness: each chat drives its own agent, replies and thinking come back as messages over the Stream-mode long connection.

AI 分析

核心用途是将 DSH 的 AI 能力接入钉钉办公生态。适合企业或团队用户,通过简单的钉钉 @ 交互即可在聊天中调用 DSH 智能体解决问题。

パッケージ
dsh-dingtalk-channel
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/08/15

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ttmouse/dsh-dingtalk-channel

ドキュメント

README 全文を読む ↗

3. 配置凭证

~/.dsh/profiles/web/cordis.patch.yml 里覆盖该行(也可用 !!js process.env.… 走环境变量):

- id: dingtalk-channel
  name: 'dsh-dingtalk-channel'
  config:
    clientId: !!js process.env.DINGTALK_CLIENT_ID
    clientSecret: !!js process.env.DINGTALK_CLIENT_SECRET
    botName: 我的助手        # 用于剥离群消息 @ 前缀(不配则剥离首个 @… 词元)
    # preset: standard      # 挂进会话 agent 的 preset(部署组合了 roster 时)
    # cwd: /path/to/workspace   # 默认宿主进程 cwd
    # sessionScope: chat    # chat-sender 让共享群里每人一个 agent
    # sendReceipt: true
    # emotion: true          # 消息上贴 🤔思考中 表情,回复完成自动撤回(替代文字回执)
    requireMention: true
export DINGTALK_CLIENT_ID='ding...'
export DINGTALK_CLIENT_SECRET='...'
dsh web

dsh web 启动日志里出现 dsh-dingtalk-channel 的凭证校验通过(无缺凭证告警)后,私聊机器人发 /ping 应收到 pong

⚙️ 配置

字段默认含义
clientId / clientSecret钉钉应用凭证(必填)
botName机器人昵称;配置后只在群消息首个 @ 匹配时才剥离
cwd宿主 cwd会话 agent 工作目录
workspaceRoots[]/cd 可达目录前缀(空=任意)
provider / model宿主默认会话 agent 模型路由
presetroster 默认会话 agent 挂载的 preset
sessionScopechatchat / chat-thread(=chat) / chat-sender
sendReceipttrue每条消息先发回执(emotion 开启时被替代)
emotiontrue消息上贴 🤔思考中 表情表示已读/处理中,回复完成自动撤回
denyTools[ask_user_question, exit_plan_mode]会话 agent 禁用的工具
requireMentiontrue群聊仅被 @ 时响应
senderAllowlist[]单聊 staffId 白名单(空=应用可见范围内任何人)
groupAllowlist[]群会话白名单(空=任何群)
approvers[]可回答审批的 staffId(空=能驱动该会话的人)