npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xiaoqiong0v0/opencode-sound-notify

v1.1.8

Published

OpenCode plugin: play notification sounds on session events (idle, error, permission asked).

Readme

opencode-sound-notify

OpenCode 插件:在会话事件触发时播放提示音,让用户无需盯着屏幕也能感知状态变化。

安装

npm install @xiaoqiong0v0/opencode-sound-notify

opencode.json 中添加:

{
  "plugin": ["@xiaoqiong0v0/opencode-sound-notify"]
}

配置

首次加载自动生成配置文件 ~/.config/opencode/sound-notify.jsonc

{
  // 默认提示音文件路径,留空使用内置 default.wav
  "sound": "",
  // 按事件单独指定提示音路径,key=事件名,value=wav 文件路径
  "sounds": {
    "session.error": "",
    "permission.asked": ""
  },
  // 触发提示音的事件列表
  "events": ["session.idle", "session.error", "permission.asked"],
  // 全局默认防抖间隔(ms),未单独配置的事件使用此值
  "defaultDebounceMs": 30000,
  // 全局最小间隔(ms),所有声音播放不能低于此间隔,覆盖单独配置
  "minIntervalMs": 3000,
  // 按事件单独配置防抖间隔(ms),覆盖 defaultDebounceMs
  "debounceMs": {
    "permission.asked": 5000
  },
  // 语言: "zh" 或 "en"
  "lang": "en",
  // 是否启用
  "enabled": true
}

| 字段 | 默认值 | 说明 | |------|--------|------| | sound | 内置 assets/default.wav | 默认 .wav 路径 | | sounds | {} | 按事件单独配置,key=事件名,value=wav 路径 | | events | ["session.idle", "session.error", "permission.asked"] | 触发事件列表 | | defaultDebounceMs | 30000 | 全局默认防抖间隔 | | minIntervalMs | 3000 | 全局最小间隔,所有声音不能小于此值,设为 0 关闭 | | debounceMs | {} | 按事件单独配置,key=事件名,value=防抖间隔(ms) | | lang | "en" | 语言设置 | | enabled | true | 总开关 |

内置音频对应关系:

| 事件 | 内置文件 | 音效 | |------|----------|------| | session.idle | assets/default.wav | 默认 | | session.error | assets/error.wav | 短促蜂鸣 | | permission.asked | assets/ask.wav | 双音提醒 |

支持的事件

| 事件 | 说明 | |------|------| | session.idle | 会话空闲(任务完成) | | session.error | 会话出错 | | permission.asked | 权限询问 | | session.created | 新会话创建 | | session.updated | 会话更新 | | session.status | 会话状态变更 |

运行时开关

不写配置,重启恢复。支持三种方式:

  1. 对话:对 AI 说"关声音" / "mute" / "开声音" / "声音开关"
  2. 命令:在 TUI 输入 /sound-toggle on|off|toggle
  3. 工具:AI 自动调用 sound_toggle

平台支持

| 平台 | 播放方式 | |------|----------| | Windows | PowerShell SoundPlayer | | macOS | afplay | | Linux | paplay (PulseAudio) / aplay (ALSA) |