LittleBlackTong/dsh-plugin-heartbeat

Project Overview项目介绍

This is a purpose-built plugin for DeepSeek Harness that adds a configurable scheduled heartbeat functionality to root agents. You can install it directly via the DSH CLI with the command dsh plugin --profile <profile> add dsh-plugin-heartbeat, which automatically loads its bundle manifest into your active profile. It includes a dedicated settings panel in DSH that lets you adjust all core parameters, and any changes you save take effect immediately without requiring a full restart of DSH. It runs as a host-layer Cordis plugin that only attaches timers to root agents, skipping child agents to avoid unnecessary runtime overhead.

When an agent is busy, heartbeat messages are queued to avoid interrupting the current task, and only one pending message is kept at any time to avoid inbox clutter. It includes an exponential backoff mechanism that increases the interval between heartbeats if there is no user reply, reducing unnecessary notifications during long periods of inactivity. A hard stop feature will disable the timer entirely after a configurable number of missed replies, only restarting when the user sends a new message. This plugin is ideal for users who leave DSH sessions open for long periods and want regular proactive updates from their agent.

The plugin is released under the open source MIT license, and has no dependencies on other DSH plugins, so it works cleanly alongside other tools like dsh-plugin-memory. Heartbeats only run while DSH is active, and stop automatically when the app is closed, with each root agent session getting its own independent timer. A common installation pitfall to avoid is manually adding a duplicate entry to your cordis.patch.yml, which will cause a duplicate ID error and prevent DSH from starting. You can customize the heartbeat prompt template via a separate configuration entry without modifying core plugin files.

这是一款专为DeepSeek Harness打造的原生插件,作用是给根代理添加可配置的定时唤醒心跳,让代理能主动汇报进度、风险和卡点,无需用户手动触发。它作为宿主层的Cordis插件运行,监听代理创建事件,仅为根代理绑定独立定时器,跳过子代理。每次心跳会注入一条合成的插件来源用户消息,不会打断正在运行的代理,会自动排队并替换重复消息避免堆积。

它支持退避间隔机制,初始10分钟触发一次,无用户回复则后续间隔自动翻倍延长,避免冷场时频繁打扰。还具备硬停保护功能,连续多次无用户回复后会彻底停止心跳,直到用户发送新消息才重启计时。轻量唤醒设计会在投递前压缩长对话历史,限制心跳输出长度,减少上下文消耗,适合长时间开放的DSH会话场景。

可通过DSH官方插件命令行安装,自带bundle manifest,安装后会自动挂载到配置文件,重启DSH即可生效,支持在设置面板修改参数,保存后即时生效无需重启。用户可自定义心跳提示词,配置存储在独立文件,遵循MIT许可开源。需要注意不要手动在配置文件添加重复条目,避免启动失败。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
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 dsh-plugin-heartbeat

把 LittleBlackTong/dsh-plugin-heartbeat 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-plugin-heartbeat

A heartbeat plugin for DeepSeek Harness: wakes the agent on a configurable interval so it proactively reports progress, risks, and blockers — or just checks in.

DeepSeek Harness 的「心跳」插件:给 agent 装一个定时唤醒的闹钟,让它主动开口 —— 汇报进展、风险、卡点,或者没事贫两句。类似 OpenClaw 的心跳模式。

怎么工作

  • Host 平面的 Cordis 插件,监听 agent/created,给每个 root agent(子 agent 跳过)挂一个独立定时器。
  • 每次心跳通过 agent.followup() 注入一条合成 user 消息(source.kind === 'plugin'):
    • agent 空闲 → 立即开新一轮,主动说话;
    • agent 忙 → 消息排队,当前轮结束立刻处理 —— 不打断、不丢失;
    • 连续忙时多拍心跳 → 只保留一条待处理(inbox.replace 原地替换,不堆积)。
  • 退避间隔(v0.4.0):初始 10 分钟;无人回复则下一拍 20 分钟、再下一拍 30 分钟([base, 2×base, 3×base] 自动推导,可 backoffSeconds 显式覆盖)。冷场越久,吵得越稀。
  • 硬停保证(v0.4.0,token 保护):连续 pauseAfterMissed(默认 3)拍没有真人回复 → 拆掉定时器彻底停止,绝不再投递;只有你的下一条消息能复活它,并从初始 10 分钟档重新计时。聊天活跃时每次你说话都会重置相位——心跳只在真正的冷场后才开口。
  • 轻量唤醒(v0.4.0):投递前先请宿主的 compaction 服务把长历史压成 checkpoint 摘要(compactBeforeBeat,默认开,失败不影响投递),注入的指令明确「不调工具、不复盘历史、≤5 句」——每拍消耗的上下文尽量小。
  • 每小时封顶(可选):maxBeatsPerHour(默认 0=关)给任何 60 分钟窗口设心跳上限,防「断续回复反复重置退避」的极端烧法。
  • 注入的消息在对话流里渲染为一条折叠的 context 小行,不是整块用户气泡。

安装

dsh plugin --profile <profile> add dsh-plugin-heartbeat

(包内置 dsh.bundle manifest,dsh plugin add 会把它自动挂进 profile 的 bundles 层;dsh-market 里的一键安装同此通道。)

重启 DSH 后生效。之后在 设置 → 心跳 Heartbeat 面板里随时改频率、开关与暂停阈值,保存即热应用(无需重启)。

⚠️ 不要再往 profile 的 cordis.patch.yml 里手写 - insert: {id: dsh-heartbeat, ...}: 那会与 bundle manifest 的自动挂载产生两条同名 entry,整个 profile 会以 duplicate loader entry id "dsh-heartbeat" 启动失败(2026-08-18 实机事故, 当时撞的是 memory 插件的同名条目)。运行期配置走 <dshHome>/heartbeat.json; 覆盖 composition 键(如 prompt)用不带 insert 的 id 覆盖条目,见下。

配置

键 默认 含义
enabled true 总开关(用户层存在 <dshHome>/heartbeat.json)
intervalSeconds 600 初始心跳周期(钳制在 30–86400 秒);退避后续档自动 ×2、×3
pauseAfterMissed 3 硬停阈值:连续 N 拍无真人回复 → 拆定时器彻底停止;用户下一条消息复活并回初始档重新计时。0 = 关闭
backoffSeconds 未设 显式退避档位数组(如 [600, 900, 1800],仅 composition)
compactBeforeBeat true 投递前先压缩历史为 checkpoint 摘要(仅 composition,无 compaction 服务时自动跳过)
maxBeatsPerHour 0 每 60 分钟滑动窗口的心跳上限(0=关闭,仅 composition)
prompt 内置 每拍投递的指令模板,{{time}} 会替换为当前时间(仅 composition 配置)
configFile <dshHome>/heartbeat.json 用户配置文件路径(enabled / intervalSeconds / pauseAfterMissed)

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-gadgets 下一个 Next dsh-cost-chip →