dsh-audio-cue: Audio Cue Plugin for DeepSeek Harness

Introduction

DeepSeek Harness (DSH) allows developers to extend functionality via plugins. When running long-duration agent tasks, terminal output on the screen may not intuitively reflect whether the system is currently “thinking/working” or “waiting for decision.” The dsh-audio-cue plugin addresses this through audio feedback: playing background audio while working, and emitting a prompt sound when user intervention is required.

Plugin Overview

dsh-audio-cue is an audio plugin running in the DeepSeek Harness environment, maintained by Goothe13-gugu and licensed under the MIT license.

Its core function is to provide auditory feedback during agent operation, helping developers discern the current state through sound.

Core Features

  • Working Ambient Sound: Plays background audio when the session is active (thinking or executing tasks).
  • Notification Sound: Stops background audio and plays a prompt sound when the agent requests approval or asks a question.
  • Idle Fade-out: Background audio automatically fades out when work stops.
  • Web Settings Panel: Provides a visual settings interface, eliminating the need to manually edit configuration files.
  • Console API: Supports controlling plugin state via JavaScript scripts.
  • Sub-agent Support: Open turns by sub-agents are counted as “working” state, continuing to play background audio.
  • Persistent Configuration: Settings are saved on the host machine rather than in the browser.

Installation and Activation

The installation command is as follows:

dsh plugin --profile web add github:Goothe13-gugu/dsh-audio-cue

If you need to pin a specific version, you can use a tag:

dsh plugin --profile web add github:Goothe13-gugu/dsh-audio-cue#v0.1.0

After installation, you must restart the Harness configuration file for the plugin to be mounted.

Usage

Check Status

You can query the plugin’s current state via the browser console or scripts:

__DSH_AUDIO_CUE__.state()

Console API

The plugin provides the following APIs for script invocation:

__DSH_AUDIO_CUE__.state()                       // Get state
__DSH_AUDIO_CUE__.toggle()                      // Toggle on/off
__DSH_AUDIO_CUE__.setVolume(0.4)                // Set volume
__DSH_AUDIO_CUE__.setEnabled(false)             // Enable/Mute
__DSH_AUDIO_CUE__.open()                        // Open settings panel
__DSH_AUDIO_CUE__.settings()                    // Get settings
__DSH_AUDIO_CUE__.refresh()                     // Refresh config
__DSH_AUDIO_CUE__.history()                     // Get state change history
__DSH_AUDIO_CUE__.setPosition(520)              // Adjust button position

Configuration and Storage

Settings File Location

Configuration is stored in the DSH directory on the host machine, not in browser cache. The directory structure is as follows:

$DSH_HOME/dsh-audio-cue/
  ├── settings.json      # Stores mute, volume, playback mode, and sound effect selections
  └── uploads/           # Imported audio files

Data Security

The settings file is written using a “temp file + rename” approach to prevent configuration corruption caused by crashes. If the configuration file is corrupted or unreadable, the plugin uses default values. If imported sound effect files are lost, it automatically falls back to default sound effects.

State Determination Logic

The plugin subscribes to session event logs and determines the current state based on the following rules:

Event Type State
turn/start Working
turn/end Idle, clear unanswered questions
approval/asked Waiting for You
approval/decided Back to working
tool/call asking user Waiting for You
tool/result answering question Back to working
assistant/chunk / assistant/message / tool/call / tool/result / step/start / step/end Working

State changes are published via a Server-Sent Events stream (/dsh-audio-cue/events).

Precautions

  • Node.js Version: The plugin requires Node.js version 22 or higher to run.
  • Sub-agent Handling: Any session that opens a turn (including sub-agents) is considered “working”, and background audio will not be interrupted.
  • Permission Scope: The plugin runs with the permissions of the current DSH process. It is recommended to inspect the source code and license before installation.

Summary

dsh-audio-cue provides intuitive state feedback for DSH users through ambient sounds and notification sounds. Its Web panel and Console API design balances usability with programmatability.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye