用途:更新 peon-ping 的配置,包括音量、音效包轮换、分类开关、活动音效包等设置。
配置文件位置:${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hooks/peon-ping/config.json。
主要设置:volume(0.0–1.0 音量);default_pack(当前音效包名,旧键 active_pack 作为回退);enabled(总开关);pack_rotation(按会话轮换的音效包数组,空数组只用 default_pack);pack_rotation_mode(random 默认随机、round-robin 顺序循环、session_override 使用 /peon-ping-use 的显式分配,无效或缺失回退 default_pack 并移除过期分配,旧值 agentskill 为别名);categories(按布尔值开关 session.start、task.acknowledge、task.complete、task.error、input.required、resource.limit、user.spam);disabled_sounds(按包→分类→文件名禁用具体音效,若某分类全部禁用则该分类静音);annoyed_threshold 与 annoyed_window_seconds(触发 user.spam 的快速提示次数与时间窗);silent_window_seconds(短于该秒数的任务不播放 task.complete);session_ttl_days(默认 7,过期会话分配天数);desktop_notifications(默认 true,独立于声音的弹窗开关);use_sound_effects_device(仅 macOS,默认 true 走 Sound Effects 设备,false 走 afplay 默认输出)。
更新方式:用 Read 工具读取配置,用 Edit 工具修改字段,再向用户确认。
常用 CLI:peon notifications off 或 peon popups off 关闭弹窗;peon sounds list [pack]、peon sounds disable <category> <file> [--pack=<name>]、peon sounds enable <category> <file> [--pack=<name>] 管理音效;peon packs bind <pack>(可加 --pattern、--install)、peon packs unbind(可加 --pattern)、peon packs bindings 管理目录绑定;bash "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/hooks/peon-ping/peon.sh packs list 列出可用包。
目录绑定:path_rules 为 { "pattern": "<glob>", "pack": "<name>" } 数组,使用 Python fnmatch 语法,首个匹配生效,优先于 default_pack 和 pack_rotation,但被 session_override 覆盖。
限制:use_sound_effects_device 仅影响 macOS;移动端通知为独立开关,不受 desktop_notifications 影响;其余平台与效果资料暂未提供。