dsh-attention
安全与治理 活跃维护

dsh-attention

bigfurma-bot/dsh-attention

这个轻量级工具在需要用户决策的审批事件触发时,会同时播放提示音并闪烁浏览器标签页标题,无需手动刷新页面即可及时获知待处理审批提醒,操作简单无额外学习成本。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
NOASSERTION
开源协议
60 KB
仓库大小
3 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:bigfurma-bot/dsh-attention
git clone https://github.com/bigfurma-bot/dsh-attention.git
git clone git@github.com:bigfurma-bot/dsh-attention.git
README.md main

dsh-attention

Approval attention watcher for DeepSeek Harness (DSH):
when anything needs the owner's decision — folder-access escalation, tool
approval, plugin activation — the browser plays a bell and flashes the tab
title, so an away-from-keyboard owner always knows their agent is blocked.

What rings the bell

Ask type Detection Automatic?
Sandbox / folder-access escalations durable approval/asked session-log events yes
Tool approvals (any session or subagent) same log channel yes
Plugin activations (cordis_run client packages) private host-runner registry, invisible on the bus — your agent calls attn_ring when a run returns "awaiting approval" agent-side; the ring auto-clears itself when the verdict lands (v1.1.0)

Behavior: chime on first sighting → repeat every 20 s while unanswered →
title flashes 🔔 N approvals waiting → restored on resolution.
Sub-second auto-granted asks stay silent by design (no false alarms).
Audio unlocks on your first interaction with the page (browser autoplay
policy); asks that arrive earlier still flash the title and chime on first click.

Flashing tab title and approval card

The sound

Ships with a bell recording embedded at build time, plus a fully synthesized
Web Audio struck-bell fallback (noise-burst clink + inharmonic partials +
room tail) if decoding ever fails.

Bell recording from Mixkit under the
Mixkit Sound Effects Free License.

Swap in your own notification sound

# 1. transcode any wav/mp3 to compact opus and base64 it
ffmpeg -y -i my-chime.wav -ac 1 -ar 48000 -c:a libopus -b:a 32k my-chime.ogg
base64 -w0 my-chime.ogg > my-chime.b64

# 2. inject into client.js (byte-exact, no hand editing)
node scripts/embed-chime.mjs my-chime.b64 /path/to/this/repo/client.js

Then reinstall and restart.

Install

cd ~/.dsh/profiles/web
rm -rf node_modules/@deepseek-ai/dsh-attention        # drop any stale copy
pnpm add --force "file:/path/to/this/repo"

Add the composition row to ~/.dsh/profiles/web/cordis.patch.yml:

- insert:
    - id: attention
      name: '@deepseek-ai/dsh-attention'

Restart DSH web. Verify:

curl -s http://127.0.0.1:3080/attention/state   # -> {"ok":true,"pending":[],...}

The host half declares inject: ['webServer']; keep that if you fork, or the
polling route silently skips at boot.

Agent tools

Registered for every session:

Tool Purpose
attn_ring ring manually — use right after any "awaiting user approval" result; auto-expires (default 30 min), and since v1.1.0 also auto-clears the moment any cordis activation verdict (approve / reject / cancel / fail) lands
attn_clear hush courtesy rings once answered (e.g. one rung before ask_user_question); activation rings no longer need it
attn_debug counters: waterfall vs durable-log sightings, cordis resolutions seen, active rings

No config keys.

License

MIT — see LICENSE. The bundled bell recording is subject to the
Mixkit Sound Effects Free License.