pi-smart-notify

Context-aware completion notifications for Pi coding agent sessions.

Packages

Package details

extension

Install pi-smart-notify from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-smart-notify
Package
pi-smart-notify
Version
0.1.0
Published
Aug 10, 2026
Downloads
160/mo · 14/wk
Author
rafa_canseco
License
MIT
Types
extension
Size
11.2 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-smart-notify

Context-aware completion notifications for Pi coding agent sessions.

Instead of repeating the latest user message, the extension generates a short English summary of the work that was completed:

Pi · feat/improve-checkout
Simplify the Base deposit flow — completed

Features

  • Generates a dynamic work summary of at most eight words.
  • Uses the Pi session name, Git branch, or short session ID to identify the instance.
  • Keeps the previous meaningful summary for test, greeting, acknowledgement, and thank-you turns.
  • Sends OSC 777 terminal notifications, including Ghostty attention notifications.
  • Sends native macOS Notification Center alerts through osascript.
  • Does not request a bell or notification sound.
  • Avoids displaying summaries that appear to contain credentials or secrets.
  • Adds /notify-test for manual verification.

Install

From npm:

pi install npm:pi-smart-notify

From GitHub:

pi install git:github.com/rafa-canseco/pi-smart-notify

Try it without installing:

pi -e git:github.com/rafa-canseco/pi-smart-notify

Reload an already-running Pi session after installation:

/reload

Usage

For the clearest instance identifier, give the session a descriptive name:

/name B1N-437 DepositModal

Notifications are sent automatically whenever the agent settles. Test delivery with:

/notify-test

No task name needs to be entered manually.

How summaries work

At the end of a turn, the extension asks the currently selected and authenticated Pi model for a one-line English summary. This creates one small additional model request per completed turn. If summarization fails, the notification falls back to the session identifier.

Only the current request, the final assistant result, and the previous short summary are included in the summarization request. The summary is filtered before being shown on the lock screen, but users should still avoid placing secrets in prompts.

Platform support

Platform Notification channel
Ghostty and OSC 777 terminals Terminal notification
macOS Native Notification Center alert
Other systems Terminal notification when OSC 777 is supported

Native Windows and Linux desktop notification backends are not currently included.

Development

npm install
npm run check
npm run pack:check

Install the local checkout in Pi:

pi install /absolute/path/to/pi-smart-notify

Security

Pi extensions execute with full system access. Review extension source code before installation.

License

MIT