{"_id":"@async23/pi-notify","_rev":"2-93a8808f63468802625b57df33991640","name":"@async23/pi-notify","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@async23/pi-notify","version":"0.1.0","keywords":["pi-package","pi-coding-agent","notifications","macos","ghostty","tmux"],"license":"MIT","_id":"@async23/pi-notify@0.1.0","maintainers":[{"name":"async23","email":"gearrr005@gmail.com"}],"homepage":"https://github.com/Async23/pi-packages/tree/main/packages/notify#readme","bugs":{"url":"https://github.com/Async23/pi-packages/issues"},"os":["darwin"],"pi":{"extensions":["./extensions/index.ts"]},"dist":{"shasum":"98b5edcd68faef97f2fdc88b15e1d04bd7559c8f","tarball":"https://registry.npmjs.org/@async23/pi-notify/-/pi-notify-0.1.0.tgz","fileCount":9,"integrity":"sha512-FZui330mB3cI5dxjU9rR8PhqN4uh/VnFbtOFNPzFeM8BBiXWpMhpTHQWu+C08tGCVe3iZBS4+yPsONOwbmHCKQ==","signatures":[{"sig":"MEYCIQCkwo0Y8IFq3NwuxR4p3GcVW8ekE3o4oGi7Yhqgto6mJAIhAP2d9H5CMH7pI02055XWUltqz4E4ihhcQJNmgUUQaXBx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":953800},"type":"module","gitHead":"9d43ffc261c0f33d890fdc8e1ca01752da9d4910","_npmUser":{"name":"async23","email":"gearrr005@gmail.com"},"repository":{"url":"git+https://github.com/Async23/pi-packages.git","type":"git","directory":"packages/notify"},"_npmVersion":"11.17.0","description":"Native macOS completion notifications for Pi with tmux click-to-focus","directories":{},"_nodeVersion":"26.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-notify_0.1.0_1784526063572_0.49375593314052435","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@async23/pi-notify","version":"0.1.1","description":"Native macOS completion notifications for Pi with tmux click-to-focus","type":"module","license":"MIT","os":["darwin"],"keywords":["pi-package","pi-coding-agent","notifications","macos","ghostty","tmux"],"repository":{"type":"git","url":"git+https://github.com/Async23/pi-packages.git","directory":"packages/notify"},"homepage":"https://github.com/Async23/pi-packages/tree/main/packages/notify#readme","bugs":{"url":"https://github.com/Async23/pi-packages/issues"},"peerDependencies":{"@earendil-works/pi-coding-agent":"*"},"publishConfig":{"access":"public"},"pi":{"extensions":["./extensions/index.ts"]},"gitHead":"b3f7f44e21aaf9d20ce9a7d5f96a5c8781fd5127","_id":"@async23/pi-notify@0.1.1","_nodeVersion":"26.5.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-rpSWHIES1ESOw+bhs1awQxM6uEZRyUNaFMNlxTuyfzNcGUOQrjLc84LJO61njRfPdNkHZLy+lHWSgem9Sglu8Q==","shasum":"801a146b0e55ebdbc0cc700bf90bf15cff227c79","tarball":"https://registry.npmjs.org/@async23/pi-notify/-/pi-notify-0.1.1.tgz","fileCount":9,"unpackedSize":955100,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDnz0RT5MQxPnJtCLiCt/rXLzj0c80QaEtFsHOc/0yetgIhAON1d7V0TDRyiE4OKjTfOuLDCvD+AhsWYTTj/7C05PsV"}]},"_npmUser":{"name":"async23","email":"gearrr005@gmail.com"},"directories":{},"maintainers":[{"name":"async23","email":"gearrr005@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-notify_0.1.1_1784571904204_0.6106233545795583"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-20T05:41:03.332Z","modified":"2026-07-20T18:25:04.549Z","0.1.0":"2026-07-20T05:41:03.743Z","0.1.1":"2026-07-20T18:25:04.382Z"},"bugs":{"url":"https://github.com/Async23/pi-packages/issues"},"license":"MIT","homepage":"https://github.com/Async23/pi-packages/tree/main/packages/notify#readme","keywords":["pi-package","pi-coding-agent","notifications","macos","ghostty","tmux"],"repository":{"type":"git","url":"git+https://github.com/Async23/pi-packages.git","directory":"packages/notify"},"description":"Native macOS completion notifications for Pi with tmux click-to-focus","maintainers":[{"name":"async23","email":"gearrr005@gmail.com"}],"readme":"# @async23/pi-notify\n\nNative macOS completion notifications for the Pi coding agent, with Ghostty/tmux click-to-focus.\n\n## Features\n\n- Notifies on `agent_settled`, after retries, compaction retries, and queued follow-ups finish.\n- Shows the tmux coordinates and Pi session or project name.\n- Uses the latest user prompt as the subtitle and the final outcome as the body.\n- Reports terminal provider errors and cancelled tasks explicitly, including `cyber_policy`, instead of treating them as successful completion.\n- Plays the macOS `Glass` sound by default.\n- Clicking the notification activates Ghostty and selects the original tmux pane.\n- Keeps one notification per Pi session instead of collapsing concurrent sessions together.\n- Logs delivery metadata only, not prompt or answer contents.\n\n## Requirements\n\n- macOS\n- [terminal-notifier](https://github.com/julienXX/terminal-notifier):\n\n  ```bash\n  brew install terminal-notifier\n  ```\n\nGhostty and tmux are optional. Notifications still work without them, but click-to-focus requires both.\n\n## Install\n\n```bash\npi install npm:@async23/pi-notify\n```\n\nRestart Pi after installation, or run `/reload` in an existing session.\n\nFor local development:\n\n```bash\npi install /absolute/path/to/pi-packages/packages/notify\n```\n\nDo not load both the package and a separate copy of `pi-notify.ts`, or every completion will send two notifications.\n\n## Setup\n\nThe package works immediately through Homebrew's `terminal-notifier` and uses its bundled Pi icon.\n\nFor a dedicated `Pi Notifier` sender in macOS Notification settings, run once:\n\n```text\n/pi-notify-setup\n```\n\nThen verify notification delivery and click-to-focus:\n\n```text\n/pi-notify-test\n```\n\nThe setup command creates:\n\n```text\n~/Applications/Pi Notifier.app\n```\n\nmacOS may ask for notification permission the first time it sends a notification.\n\n## Notification content\n\n```text\nTitle:    0:21:1 · session or project name\nSubtitle: latest user prompt\nBody:     final assistant response, terminal error, or cancellation status\n```\n\nLong text and image markers are cleaned before display.\n\n## Commands\n\n| Command | Description |\n| --- | --- |\n| `/pi-notify-setup` | Install or refresh the dedicated macOS notifier app |\n| `/pi-notify-test` | Send a test notification and test tmux click-to-focus |\n\n## Configuration\n\nOptional environment variables:\n\n| Variable | Purpose |\n| --- | --- |\n| `PI_NOTIFY_DISABLED=1` | Disable notifications |\n| `PI_NOTIFY_SOUND=name` | Change the macOS sound; defaults to `Glass` |\n| `PI_NOTIFY_APP=/path/app` | Override the notifier app path |\n| `PI_NOTIFY_FOCUS_SCRIPT=/path/script` | Override the tmux focus script |\n| `PI_NOTIFY_LOG_PATH=/path/log` | Override the metadata log path |\n| `PI_NOTIFY_DISABLE_LOG=1` | Disable metadata logging |\n\nThe default log is:\n\n```text\n~/.pi/agent/logs/pi-notify.log\n```\n\nIt records timestamps, delivery method, session ID, and tmux coordinates only.\n\n## Fallback order\n\n```text\nPi Notifier.app\n→ Homebrew terminal-notifier\n→ Ghostty AppleScript\n→ macOS AppleScript\n```\n\nThe AppleScript fallbacks can display notifications but cannot guarantee exact tmux pane selection when clicked.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}