IM webhook and local notifications on turn completion, errors, or approval (Feishu/WeCom/DingTalk/Slack/Discord/custom).
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:whyihaveyou/dsh-suite#path:/packages/plugins/plugin-notify
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
DSH 插件:回合完成 / 出错 / 待审批时,把通知推到 IM webhook + 本机系统通知。 社区现有
dsh-notification只弹本机窗口;本插件做远程 IM webhook(飞书 / 企业微信 / 钉钉 / Slack / Discord / 自定义),是差异化能力。
DSH plugin: push turn-completion / error / approval notifications to IM webhooks plus a local system notification. Unlike
dsh-notification(local-only popup), this sends remote IM webhooks (Feishu / WeCom / DingTalk / Slack / Discord / custom).
特性 / Features
监听 DSH 持久的
session/event流,命中三类事件即发通知:turn/end(reason=completed)→ task_done(回合完成,含标题 + 结果摘要 + 耗时)turn/end(reason=error/aborted/blocked/max-tokens/interrupted)→ errorapproval/asked(来自@deepseek-ai/dsh-user-approval)→ approval_requested(待审批)
配置驱动,6 种通道:飞书、企业微信、钉钉、Slack、Discord、自定义(POST JSON)。
本机通知:macOS 走
osascript display notification,非 macOS 自动跳过。免打扰时段 (v0.2):配置
dnd.start/dnd.end(HH:MM,支持跨天如23:00-08:00)。时段内事件照常监听记录(console 标注「免打扰…事件照记不通知」),但不弹本机通知、不发任何 webhook。内容可配置 (v0.2):
includeSession/includeDuration开关通知文本里的「会话」「耗时」行,默认均开启。发射是不可逆副作用:POST 失败只
console.warn,绝不重试、绝不阻塞 agent 循环。Listens on DSH's durable
session/eventfirehose and notifies on three event kinds:turn/end(reason=completed) → task_done (title + result summary + duration)turn/end(reason=error/aborted/blocked/max-tokens/interrupted) → errorapproval/asked(from@deepseek-ai/dsh-user-approval) → approval_requested
Config-driven, 6 channels: Feishu, WeCom, DingTalk, Slack, Discord, custom JSON.
Local notification via
osascripton macOS; skipped elsewhere.Do-not-disturb window (v0.2):
dnd.start/dnd.end(HH:MM, cross-midnight like23:00-08:00works). Inside the window events are still observed/logged ("免打扰…事件照记不通知") but no local popup and no webhook is sent.Configurable content (v0.2):
includeSession/includeDurationtoggle the 会话/耗时 lines (both default on).Emission is irreversible: failed POSTs only
console.warn, never retried, never block the loop.
安装 / Install
dsh plugin --profile <name> add @dsh-suite/plugin-notify
(本地开发:dsh plugin --profile <name> add ./packages/plugins/plugin-notify)
配置 / Configuration
在 profile 的 cordis.patch.yml 里给插件行加 config(Schemastery schema,见 export const Config):
Add a config block to this plugin's row in the profile's cordis.patch.yml:
- id: plugin-notify
name: '@dsh-suite/plugin-notify'
config:
webhooks:
feishu: 'https://open.feishu.cn/open-apis/bot/v2/hook/xxxx' # 飞书
wecom: 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxx' # 企业微信
dingtalk: 'https://oapi.dingtalk.com/robot/send?access_token=xxxx' # 钉钉
slack: 'https://hooks.slack.com/services/T/B/xxxx' # Slack
discord: 'https://discord.com/api/webhooks/xxxx/xxxx' # Discord
custom: 'https://example.com/hook' # 自定义 JSON
events: ['task_done', 'error', 'approval_requested'] # 触发过滤,缺省三者全开
local: true # 本机系统通知(macOS)
timeoutMs: 5000 # 单次 POST 超时
| 字段 / Field | 默认 / Default | 说明 / Meaning |
|---|---|---|
webhooks.* |
空 / empty | 各通道 webhook 地址;留空该通道不发送 / empty = that channel disabled |
events |
['task_done','error','approval_requested'] |
触发通知的事件白名单 / notification event whitelist |
local |
true |
是否发本机系统通知 / also send a local notification |
timeoutMs |
5000 |
单次 webhook 超时 / per-request timeout |
消息格式 / Message shape
飞书/企业微信/钉钉发送 text 卡片,Slack 发 { text },Discord 发 { content },
custom 发 { text, kind, title, sessionId, durationMs, time }。文本内容统一为:
Feishu/WeCom/DingTalk send a text card; Slack { text }; Discord { content };
custom posts { text, kind, title, sessionId, durationMs, time }. The text body:
【任务完成】帮我查一下 Kuramoto 临界指数
摘要:临界指数为 γ⁻ = γ⁺ = 1…
耗时:3 分 42 秒
会话:session-1
验证 / Verification
- ✅ 纯 ESM 编译(
pnpm build) - ✅
dsh.bundle+cordis.patch.yml装载进真实 DSH profile(--dump-config含本行) - ✅
turn/end→ 通知派发路径(缺省无 key 场景,turn/end(reason=error)已触发) - ⚠️ 真实 IM 投递(需真实 webhook URL 与外部网络)——未闭环,见下
Blocked / not closed: 本环境无真实 webhook 地址,远程投递只验证到「POST 已发起、失败仅
console.warn」,未验证到对方 IM 收到消息。
设计准则 / Design principles
遵守 dsh-plugin-design-principles.md:inject 声明依赖(#3)、ctx.on 注册即 effect(#1)、
发射副作用只补偿不阻塞(#9)、事件走类型化 session/event(#15)。
Theme & Skin Compatibility / 主题与皮肤兼容
This plugin renders no own host UI (its surface is host-provided / tool / event only), so it is
naturally theme-compatible. If a Web UI panel is added later, it must follow the DSH Web styling
contract — colors via --dsw-alias-* tokens, no hardcoded literals — and emit
data-dsh-plugin / data-dsh-part / data-dsh-surface (L1 + L2 of the
dsh-web skin-center contract).
本插件不渲染自有宿主 UI(仅经宿主提供的表面 / 工具 / 事件暴露),天然与主题兼容。日后若加 Web UI 面板,
须遵循 DSH Web 样式契约(颜色走 --dsw-alias-* 令牌、不写硬编码色值),并输出
data-dsh-plugin / data-dsh-part / data-dsh-surface 语义属性(dsh-web 皮肤中心契约 L1 + L2)。
Links
More in this category
xmanrui/dsh-im★ 1518
Connect IM bots to DeepSeek Harness via QR codes or bot credentials (9 channels: Feishu, WeChat, DingTalk, WeCom, QQ, Slack, Telegram, Discord, and WhatsApp).
shaobeichen/dsh-pocket★ 1381
Remote phone access to the DSH Web UI: scan a QR code for LAN or public (cloudflared tunnel) access with real-time sync, a mobile-adaptive layout, and a settings tab.
inclusionAI/Avernet#deepseek-harness-channel-bcn★ 572
Connects DeepSeek Harness to Avernet's Bot Collaboration Network over WebSocket V2, with automatic onboarding, isolated agent sessions, tool-call events, and multi-bot routing tools.
omdsh-dev/dsh-notification★ 85
Desktop notifications for turn completions, with per-outcome controls and keyword rules.
omdsh-dev/dsh-lark★ 55
Lark/Feishu bot channel for DeepSeek Harness: each chat drives its own agent, and tool approvals, model questions, and plan reviews return as cards answered by a button or a reply. Switch workspace and model from the chat (`/cd`, `/model`, `/new`), and run several bots that keep separate sessions and can hand turns to each other in one group.
THEWOLFWALKER/dsh-notifier★ 54
DSH notification & remote-control plane: one `notify()` API across 28 outbound channels, six inbound control channels, phone approvals/questions/task control, a Native DSH Notify & Control UI, live outbound hot-apply, multi-agent routing, and zero runtime dependencies.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.