{"_id":"@2008muyu/pi-notify","_rev":"4-3d2c08aadd81b12389159442ae2da2fc","name":"@2008muyu/pi-notify","dist-tags":{"latest":"1.1.2"},"versions":{"1.0.0":{"name":"@2008muyu/pi-notify","version":"1.0.0","keywords":["pi-package","pi-extension","notification"],"author":{"name":"2008muyu"},"license":"MIT","_id":"@2008muyu/pi-notify@1.0.0","maintainers":[{"name":"2008","email":"506634967@qq.com"}],"homepage":"https://github.com/2008muyu/pi-notify#readme","bugs":{"url":"https://github.com/2008muyu/pi-notify/issues"},"pi":{"image":"https://github.com/2008muyu/pi-notify/raw/main/docs/screenshot.png","extensions":["./extensions/pi-notify.ts"]},"dist":{"shasum":"e73a45634270fef43f22c282af9426ca7e1ef748","tarball":"https://registry.npmjs.org/@2008muyu/pi-notify/-/pi-notify-1.0.0.tgz","fileCount":3,"integrity":"sha512-mq7AR2SkR42EYTSc0of+SURf13FeQwDEFU48XQqoIvnL7K4gOlujOiqOt6/c2BJu5WiL/mMVXDVjG9J512S4XA==","signatures":[{"sig":"MEYCIQC3Q8/hzGowedkyXw9zld8Em+56iLyT026yiPWKoX7sTAIhAKq/q+M2E6nZ6+oAtz1Hhk5iRfeM2maeJnOqb0OvGICc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28097},"gitHead":"b7346f576c2daaf8d11fd265ae3d3a0da2c13d36","_npmUser":{"name":"2008","email":"506634967@qq.com"},"repository":{"url":"git+https://github.com/2008muyu/pi-notify.git","type":"git"},"_npmVersion":"11.6.2","description":"Notification extension for pi: tab status, sound, terminal bell, Bark push to iPhone","directories":{},"_nodeVersion":"24.13.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@earendil-works/pi-coding-agent":">=0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-notify_1.0.0_1780549258793_0.42637707856215723","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@2008muyu/pi-notify","version":"1.1.0","keywords":["pi-package","pi-extension","notification"],"author":{"name":"2008muyu"},"license":"MIT","_id":"@2008muyu/pi-notify@1.1.0","maintainers":[{"name":"2008","email":"506634967@qq.com"}],"homepage":"https://github.com/2008muyu/pi-notify#readme","bugs":{"url":"https://github.com/2008muyu/pi-notify/issues"},"pi":{"image":"https://github.com/2008muyu/pi-notify/raw/main/docs/screenshot.png","extensions":["./extensions/pi-notify.ts"]},"dist":{"shasum":"a11983fa977afc3df9a09dcddbfc62256095aeb0","tarball":"https://registry.npmjs.org/@2008muyu/pi-notify/-/pi-notify-1.1.0.tgz","fileCount":3,"integrity":"sha512-A24ASrpLEY4EBNjugyp6H1RSVtidyjqQGHj2/S61w1zH/B6+DxGOeNWvcxymuXmMtMxfDW1o2zy3gxUWemjNdQ==","signatures":[{"sig":"MEUCIQCvMB3hWUi/DHEcA17gBTLroKWKt03Mk7PpPlOBYZRqRwIgJuG2ssK5UIf6zCyf4EXIbc4JYOYXoE/4Zqchbl4mn8s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30298},"gitHead":"a11540e76b975c14ab34896acfebdd5212920236","_npmUser":{"name":"2008","email":"506634967@qq.com"},"repository":{"url":"git+https://github.com/2008muyu/pi-notify.git","type":"git"},"_npmVersion":"11.6.2","description":"Notification extension for pi: tab status, sound, terminal bell, Bark push to iPhone","directories":{},"_nodeVersion":"24.13.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@earendil-works/pi-coding-agent":">=0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-notify_1.1.0_1780551981111_0.1395479651942355","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@2008muyu/pi-notify","version":"1.1.1","keywords":["pi-package","pi-extension","notification"],"author":{"name":"2008muyu"},"license":"MIT","_id":"@2008muyu/pi-notify@1.1.1","maintainers":[{"name":"2008","email":"506634967@qq.com"}],"homepage":"https://github.com/2008muyu/pi-notify#readme","bugs":{"url":"https://github.com/2008muyu/pi-notify/issues"},"pi":{"image":"https://github.com/2008muyu/pi-notify/raw/main/docs/screenshot.png","extensions":["./extensions/pi-notify.ts"]},"dist":{"shasum":"73de54d6b74080d033e9f1c2262140f556e14655","tarball":"https://registry.npmjs.org/@2008muyu/pi-notify/-/pi-notify-1.1.1.tgz","fileCount":3,"integrity":"sha512-K50/+mXNWh0tv6NPtdbpSlUKfx+3h4bNVU6cWdwO5g4RgGyNWaf+82+gQVmGSvWx2lNSFyiNPFkD2++PYCxs4Q==","signatures":[{"sig":"MEUCIQC53k9QOQOkMYWId91p5wDWaZK5cNs50hTKm27G997xLQIgdZOg/CV/W9FUfqiLvGUrKXB4XfFmaM4hBLCWe5HNwmI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30588},"gitHead":"79871c66fb47ebad75a1fc9d458ad9222b4b9faf","_npmUser":{"name":"2008","email":"506634967@qq.com"},"repository":{"url":"git+https://github.com/2008muyu/pi-notify.git","type":"git"},"_npmVersion":"11.6.2","description":"Notification extension for pi: tab status, sound, terminal bell, Bark push to iPhone","directories":{},"_nodeVersion":"24.13.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@earendil-works/pi-coding-agent":">=0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-notify_1.1.1_1780575012021_0.25120818007397605","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@2008muyu/pi-notify","version":"1.1.2","description":"Notification extension for pi: tab status, sound, terminal bell, Bark push to iPhone","keywords":["pi-package","pi-extension","notification"],"author":{"name":"2008muyu"},"license":"MIT","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/2008muyu/pi-notify.git"},"pi":{"extensions":["./extensions/pi-notify.ts"],"image":"https://github.com/2008muyu/pi-notify/raw/main/docs/screenshot.png"},"peerDependencies":{"@earendil-works/pi-coding-agent":">=0.1.0"},"gitHead":"79871c66fb47ebad75a1fc9d458ad9222b4b9faf","_id":"@2008muyu/pi-notify@1.1.2","bugs":{"url":"https://github.com/2008muyu/pi-notify/issues"},"homepage":"https://github.com/2008muyu/pi-notify#readme","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-O53pzJTWjOBtN+ifNKbGD4KVVqsRL+IbkWT88UJnMPnFA3KNXwfABRVZ+xgpUaQrdv5w3C/VeJ55n5jT81KykQ==","shasum":"06f6a04464e0240054db3276cc4e9b82a2b85c86","tarball":"https://registry.npmjs.org/@2008muyu/pi-notify/-/pi-notify-1.1.2.tgz","fileCount":3,"unpackedSize":30722,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIG3T2SLXZ+0vV4Qk54tQgcSq7haBw3DGI1g9Z36a9oBTAiAYtabUADkP0q6/pQBtNNxJ/6Ews9m5Z40e3c3P5RzF5Q=="}]},"_npmUser":{"name":"2008","email":"506634967@qq.com"},"directories":{},"maintainers":[{"name":"2008","email":"506634967@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-notify_1.1.2_1780629428505_0.8146913658542283"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-04T05:00:58.584Z","modified":"2026-06-05T03:17:08.785Z","1.0.0":"2026-06-04T05:00:58.946Z","1.1.0":"2026-06-04T05:46:21.264Z","1.1.1":"2026-06-04T12:10:12.174Z","1.1.2":"2026-06-05T03:17:08.632Z"},"bugs":{"url":"https://github.com/2008muyu/pi-notify/issues"},"author":{"name":"2008muyu"},"license":"MIT","homepage":"https://github.com/2008muyu/pi-notify#readme","keywords":["pi-package","pi-extension","notification"],"repository":{"type":"git","url":"git+https://github.com/2008muyu/pi-notify.git"},"description":"Notification extension for pi: tab status, sound, terminal bell, Bark push to iPhone","maintainers":[{"name":"2008","email":"506634967@qq.com"}],"readme":"# pi-notify\n\n> Notification extension for [pi coding agent](https://github.com/earendil-works/pi-coding-agent) — tab status, system sounds, terminal bell, and Bark push to iPhone.\n\n[中文版](#中文说明)\n\n---\n\n## Features\n\n- **Tab title + footer status** — shows ⏳ running / ✅ complete / ❌ error on your terminal tab and footer\n- **System notification sound** — plays a custom `.wav` / `.mp3` / `.aiff` file when the agent finishes\n- **Loop mode** — notification sound loops until you press any key or start a new interaction\n- **Terminal bell** — optional BEL (`\\x07`) on completion\n- **OSC 9 notification** — desktop notification popup (iTerm2, Ghostty, WezTerm, Windows Terminal)\n- **Bark push** — sends push notification to your iPhone via [Bark](https://github.com/Finb/Bark)\n- **Fully configurable** — `/notify` interactive settings panel, all options are toggleable\n- **Sound preview** — `/notify-sound` lets you browse and preview system sounds before selecting\n\n## Installation\n\n```bash\n# via git\npi install git:github.com/2008muyu/pi-notify\n\n# or via npm (once published)\npi install npm:pi-notify\n```\n\nThen restart pi (or run `:reload` in pi).\n\n## Usage\n\n### `/notify` — Settings Panel\n\nOpens an interactive settings panel with cursor persistence — toggles are applied inline without losing your place.\n\n| Option | Description |\n|--------|-------------|\n| ✅ Sound | Enable/disable notification sounds |\n| ✅ Terminal bell | Enable/disable BEL (`\\x07`) |\n| ✅ Loop sound | Enable/disable looping notification sound |\n| ✅ OS notification | Enable/disable OSC 9 desktop notification |\n| ✅ Bark push | Set Bark device key for iPhone push |\n| ♪ Sound file | Pick a custom notification sound |\n\nNavigate with **↑↓**, toggle with **Enter**, exit with **Esc**.\n\n### `/notify-sound` — Sound Picker\n\nBrowse and preview system sounds before selecting one as your notification sound.\n\n- **↑↓** navigate list\n- **Space** preview sound\n- **Enter** select and save\n- **Esc** cancel\n\n## Configuration\n\nConfiguration is stored in `~/.pi/agent/pi-notify.json`. You can also use environment variables:\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `PI_NOTIFY_SOUND` | `true` | Enable/disable sounds |\n| `PI_NOTIFY_BELL` | `true` | Enable/disable terminal bell |\n| `PI_NOTIFY_LOOP` | `false` | Enable/disable looping |\n| `PI_NOTIFY_OS_NOTIFY` | `true` | Enable/disable OSC 9 notifications |\n| `BARK_KEY` / `PI_NOTIFY_BARK_KEY` | — | Bark device key |\n| `BARK_SERVER` | `https://api.day.app` | Bark server URL |\n\n## How It Works\n\n1. When the agent starts (`agent_start`), the extension sets the tab title to ⏳ and prepares for notifications\n2. When the agent ends (`agent_end`), it triggers:\n   - Terminal bell (optional)\n   - OSC 9 desktop notification (optional)\n   - System sound playback (custom file or system default)\n   - Bark push to iPhone (if configured)\n3. **Loop mode**: the sound keeps playing in a background PowerShell process. Press any key or start a new conversation to stop it\n4. Error handling catches all failures silently — the extension never blocks the agent\n\n## Publishing to the pi Community\n\nThis package can be distributed through:\n\n### Via GitHub (recommended)\n\nUsers can install directly from GitHub:\n\n```bash\npi install git:github.com/2008muyu/pi-notify\n```\n\n### Via npm\n\nTo publish to npm and make it installable via `pi install npm:pi-notify`:\n\n1. Ensure you have an [npm account](https://www.npmjs.com/signup)\n2. Update `package.json` with the correct registry metadata\n3. Run:\n\n```bash\nnpm login\nnpm publish\n```\n\n### Via the pi Package Registry\n\nCheck [pi packages documentation](https://github.com/earendil-works/pi-coding-agent/blob/main/docs/packages.md) for the official community registry once available.\n\n---\n\n## License\n\nMIT\n\n---\n\n# 中文说明\n\n## 简介\n\n**pi-notify** 是 [pi 编程助手](https://github.com/earendil-works/pi-coding-agent) 的通知扩展，提供终端标签状态、系统提示音、响铃和 iPhone 推送功能。\n\n## 功能\n\n- **终端标签页 + 底部状态栏** — 显示 ⏳ 运行中 / ✅ 完成 / ❌ 错误\n- **自定义提示音** — Agent 完成时播放自定义 `.wav` / `.mp3` / `.aiff` 文件\n- **循环模式** — 提示音持续循环，按任意键或开始新对话即停\n- **终端响铃** — 可选的 BEL 提示音\n- **桌面通知** — OSC 9 弹窗通知（iTerm2、Ghostty、WezTerm、Windows Terminal）\n- **Bark 推送** — 通过 [Bark](https://github.com/Finb/Bark) 推送到 iPhone\n- **完全可配置** — `/notify` 交互式面板，所有选项即开即关\n- **声音预览** — `/notify-sound` 浏览和试听系统音效\n\n## 安装\n\n```bash\n# 通过 GitHub\npi install git:github.com/2008muyu/pi-notify\n\n# 或通过 npm（发布后）\npi install npm:pi-notify\n```\n\n安装后重启 pi（或运行 `:reload`）。\n\n## 使用方法\n\n### `/notify` — 设置面板\n\n光标位置保持的交互式设置面板，开关项即时生效不跳转。\n\n| 选项 | 说明 |\n|------|------|\n| ✅ Sound | 启用/禁用提示音 |\n| ✅ Terminal bell | 启用/禁用终端响铃 |\n| ✅ Loop sound | 启用/禁用循环播放 |\n| ✅ OS notification | 启用/禁用桌面通知 |\n| ✅ Bark push | 设置 Bark 设备密钥 |\n| ♪ Sound file | 选择自定义提示音 |\n\n**↑↓** 导航，**Enter** 切换/进入，**Esc** 退出。\n\n### `/notify-sound` — 声音选择器\n\n浏览和试听系统音效，选定后设为通知音。\n\n- **↑↓** 浏览列表\n- **Space** 试听\n- **Enter** 选定并保存\n- **Esc** 取消\n\n## 配置\n\n配置文件位于 `~/.pi/agent/pi-notify.json`，也支持环境变量：\n\n| 变量 | 默认值 | 说明 |\n|------|--------|------|\n| `PI_NOTIFY_SOUND` | `true` | 启用/禁用声音 |\n| `PI_NOTIFY_BELL` | `true` | 启用/禁用终端响铃 |\n| `PI_NOTIFY_LOOP` | `false` | 启用/禁用循环 |\n| `PI_NOTIFY_OS_NOTIFY` | `true` | 启用/禁用桌面通知 |\n| `BARK_KEY` / `PI_NOTIFY_BARK_KEY` | — | Bark 设备密钥 |\n| `BARK_SERVER` | `https://api.day.app` | Bark 服务器地址 |\n\n## 工作原理\n\n1. Agent 开始运行 → 标签页显示 ⏳\n2. Agent 完成 → 触发：\n   - 终端响铃（可选）\n   - OSC 9 桌面通知（可选）\n   - 播放提示音（自定义文件或系统默认）\n   - Bark 推送（已配置时）\n3. **循环模式**：提示音在后台 PowerShell 进程中持续播放，按任意键或开始新对话即停止\n4. 所有失败静默处理，绝不阻塞 Agent\n\n## 发布到 pi 社区\n\n### 通过 GitHub（推荐）\n\n用户可以直接从 GitHub 安装：\n\n```bash\npi install git:github.com/2008muyu/pi-notify\n```\n\n### 通过 npm\n\n```bash\nnpm login\nnpm publish\n```\n\n然后用户可通过 `pi install npm:pi-notify` 安装。\n\n### 通过 pi 官方包管理器\n\n待官方社区注册中心上线后，可参考 [pi packages 文档](https://github.com/earendil-works/pi-coding-agent/blob/main/docs/packages.md) 发布。\n\n---\n\n## 许可证\n\nMIT\n","readmeFilename":"README.md"}