kiterunner1/dsh-attention-beep ↗★ 0

dsh-attention-beep

DSH 提示音 + 卡死看门狗 + 命令守卫:任务结束或命令卡死时用人声提醒,自动中断卡住的 pwsh 调用并把「怎么继续」写回工具结果,并在 spawn 之前拦掉已知的性能陷阱写法。仅 Windows。 / Beeps, a stuck-command watchdog and a command guard for DeepSeek Harness. Windows only. 仅限Windows用户,适合需要防止命令卡死、拦截性能陷阱并获取声音提醒的场景。

Package
dsh-attention-beep
Compatibility
Unverified
Cordis peer range
^4.0.1
Version
0.3.0
License
MIT
Last updated
Sep 15, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:kiterunner1/dsh-attention-beep

配置

全部配置都在 loader 行的 config 里(默认值见 cordis.patch.yml),用户层按 id 覆盖,或直接在「设置 → 提示音」里改(写入 $DSH_HOME/settings.yaml,改动实时生效):

- id: attention-beep
  config:
    enabled: true
    scope: root              # 提示音:root | all(子代理是否也响)
    watchScope: all          # 看门狗:root | all(子代理卡死也管)
    watchTools: [pwsh]
    humanWaitTools: [ask_user_question]   # 在飞期间整轮判定完全停摆(别塞进 watchTools)
    warnMs: 120000
    killMs: 180000
    preWarnMs: 60000
    silenceMs: 60000
    sampleIntervalMs: 10000
    hardCeilingMs: 120000    # 0 = 关闭;>0 时即使还在烧 CPU 也打断(防死循环)
    autoKill: true
    observeOnly: false       # 演练模式:只响铃 / 写日志 / 发通知
    escalateToTurnCancel: true
    escalateGraceMs: 45000
    maxAutoActionsPerSession: 3
    stallTimeoutMs: 180000
    stallAutoResume: false   # 整轮层只响铃、绝不取消回合(防「你思考时被打断」)
    guardEnabled: true
    guardAllow: []           # 命令里含这些子串就跳过守卫
    protectList: [npm install, pnpm build, git clone, ...]   # 省略 = 用内置名单
    logPath: ''              # 空 = 默认 /logs/attention-beep.log;"" 关闭
    events:
      toolTimeout: { enabled: true, sound: voice:toolTimeout }

sound 支持三种写法:voice:(内置人声)、预设名(ding / chime / notify / tada / alarm / error / default / recycle / ring / beep,均为 %WINDIR%\Media\*.wav)、任意 .wav / .mp3 绝对路径。文件不存在时回退 beep。

事件日志:$DSH_HOME/logs/attention-beep.log,完整 JSONL 事件流(warn / action / settled-aborted / resume / sound / breaker / stall / guard),超过 2 MB 轮转一次。