Bundle
@dsh-external/dsh-sound-alert
声音提示插件:有工作需要手动选择/审查,或任务完成/失败时,播放系统提示音或自定义 wav
- Source
- xcyyan520
- License
- BSD-3-Clause
- Updated
- Updated 16 days ago
Readme
# @dsh-external/dsh-sound-alert 声音提示插件:**只要有工作需要手动选择/审查,或者任务完成/失败,就播放声音提醒**。 ## 功能 | 触发场景 | 声音类型 | |---|---| | agent 调用 `ask_user_question` / `exit_plan_mode` 等需要人工选择的工具 | `review`(叮-咚) | | DSH 任务看板出现「待规划 / 待办」等需要手动处理的任务 | `review`(叮-咚) | | 一轮会话 / 一个任务正常完成 | `done`(轻快上行) | | 一轮会话 / 一个任务失败 | `failed`(低频下行) | - **会话级**:监听 DSH 官方 `session/event`,无需改动 DSH 源码。 - **任务看板级**:浏览器半区监听任务看板 localStorage(`dsh.taskBoard.v1`),状态变化时上报 host 播放声音。 - **Web 可视化设置**:DSH 设置页新增「声音提示」页面,可给每个场景配置 wav、上传音频文件、试听。 - **声音引擎**:默认 Windows 系统蜂鸣;也可配置自定义 wav(支持全局 fallback 或按事件类型单独指定)。 ## 安装 ```bash dsh plugin --profile web add link:/abs/path/to/dsh-sound-alert # 或把包放到 profile bundles 后重启 dsh web ``` 安装后**重启 dsh web** 生效。 ## Web 设置页(推荐) 安装并重启后,打开 DSH Web → **设置** → **声音提示**: - `启用声音提示`:总开关 - `同事件冷却 (ms)`:防连响间隔 - `需要人工选择/审查`:review 音效 - `任务完成`:done 音效 - `任务失败`:failed 音效 - `全局兜底音效`:没单独指定时使用 - `额外“人工选择”工具`:逗号分隔的自定义工具名 - 每个音效行都有: - **选择音频…**:从本机选 `.wav` 文件,自动上传到 `storages/sounds/` - **试听**:立即播放当前场景声音 - **音量滑块**:0-100%,保存后试听和真实事件都按该音量播放 - 点 **保存设置** 后实时生效,并持久化到本机 `storages/dsh-sound-alert.json` ## 手动 YAML 配置(可选) Web 设置页保存后会自动写入 `storages/dsh-sound-alert.json`,一般不需要手动改。若想用配置文件初始化,可以在 `%USERPROFILE%\.dsh\settings.yaml` 顶部/末尾加: ```yaml dsh-sound-alert: enabled: true cooldownMs: 1200 fallbackWav: '' reviewWav: '' doneWav: '' failedWav: '' manualTools: [] ``` 各 wav 留空时使用系统蜂鸣;wav 路径写本机绝对路径,支持中文/空格。 ## 开发 ```bash npm run build # tsc 编 host + tsdown 编 client dev_build_plugin E:/work/DeepSeek-Harness_work/create01/dsh-sound-alert dev_inject_plugin E:/work/DeepSeek-Harness_work/create01/dsh-sound-alert ```
Install
dsh plugin --profile web add github:xcyyan520/dsh-sound-alert
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-external-dsh-sound-alert from the hub
- This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.