{"_id":"@brain0pia/pi-notify","_rev":"2-7ac8514abe4a4cdf6ec481a8107999e7","name":"@brain0pia/pi-notify","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@brain0pia/pi-notify","version":"0.1.0","keywords":["pi-package","pi-extension","telegram","notifications"],"_id":"@brain0pia/pi-notify@0.1.0","maintainers":[{"name":"brain0pia","email":"not.a.ravil@gmail.com"}],"homepage":"https://github.com/brainopia/pi-notify#readme","bugs":{"url":"https://github.com/brainopia/pi-notify/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"f472dc9088f71ddc32fa21a0e873cc94b511ef23","tarball":"https://registry.npmjs.org/@brain0pia/pi-notify/-/pi-notify-0.1.0.tgz","fileCount":11,"integrity":"sha512-gXnfLhowl+ZihsV7QnlpRxtJOOzEHXXWgXiLqo8P38LWjMDvJfuJxXPy+XA6jG5zGs4/3sCzY2g3MkcdI4urEw==","signatures":[{"sig":"MEUCIQDrqhQKnKRrHdeRzuccMJwKZrgi86bc2a4NxO47a4ADCAIgG/ZTQ38GjlAY9RI3zl1AeV7szwK/HcYCRMWqPYmw5HQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49215},"type":"module","gitHead":"fe5b854cd41e963ab3425a15f84bef4b3e67feee","scripts":{"test":"tsx --test test/**/*.test.ts","check":"tsc --noEmit"},"_npmUser":{"name":"brain0pia","email":"not.a.ravil@gmail.com"},"repository":{"url":"git+https://github.com/brainopia/pi-notify.git","type":"git"},"_npmVersion":"11.8.0","description":"Pi package that sends Telegram notifications after each completed agent response.","directories":{},"_nodeVersion":"25.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.5","typescript":"^5.9.2","@types/node":"^24.5.2","@mariozechner/pi-tui":"^0.57.1","@mariozechner/pi-coding-agent":"^0.57.1"},"peerDependencies":{"@mariozechner/pi-tui":"*","@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-notify_0.1.0_1773396979829_0.4129421037035652","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@brain0pia/pi-notify","version":"0.2.0","description":"Pi package that sends Telegram notifications after each completed agent response.","type":"module","keywords":["pi-package","pi-extension","telegram","notifications"],"repository":{"type":"git","url":"git+https://github.com/brainopia/pi-notify.git"},"homepage":"https://github.com/brainopia/pi-notify#readme","bugs":{"url":"https://github.com/brainopia/pi-notify/issues"},"publishConfig":{"access":"public"},"pi":{"extensions":["./src/index.ts"]},"peerDependencies":{"@mariozechner/pi-coding-agent":"*","@mariozechner/pi-tui":"*"},"devDependencies":{"@mariozechner/pi-coding-agent":"^0.57.1","@mariozechner/pi-tui":"^0.57.1","@types/node":"^24.5.2","tsx":"^4.20.5","typescript":"^5.9.2"},"scripts":{"check":"tsc --noEmit","test":"tsx --test test/**/*.test.ts"},"gitHead":"96e10e65af1fbab855f7a89e8b7cbdfe4c0f4b73","_id":"@brain0pia/pi-notify@0.2.0","_nodeVersion":"25.5.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-b+PNeLo0cJYAraAY9N/B70CY7MwmYuIr3eRAaRTz13Zpwm/7KB+ax7dZ7QQWZwQTvEAaz7eiZP8roatcFV4dDg==","shasum":"98073fcf8f08aa69e31eb070e6bab86ad0bb34a3","tarball":"https://registry.npmjs.org/@brain0pia/pi-notify/-/pi-notify-0.2.0.tgz","fileCount":11,"unpackedSize":56283,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFRIXe54k0umVGh0bfwLDYw+wqArpSskJB7rmN7bkjPZAiBwEvsFZUIxOdYEkezRhUkpqUa5rT9xopH9jIcr3zJfYA=="}]},"_npmUser":{"name":"brain0pia","email":"not.a.ravil@gmail.com"},"directories":{},"maintainers":[{"name":"brain0pia","email":"not.a.ravil@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-notify_0.2.0_1773480800830_0.6257350414382545"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-13T10:16:19.633Z","modified":"2026-03-14T09:33:21.109Z","0.1.0":"2026-03-13T10:16:19.968Z","0.2.0":"2026-03-14T09:33:20.998Z"},"bugs":{"url":"https://github.com/brainopia/pi-notify/issues"},"homepage":"https://github.com/brainopia/pi-notify#readme","keywords":["pi-package","pi-extension","telegram","notifications"],"repository":{"type":"git","url":"git+https://github.com/brainopia/pi-notify.git"},"description":"Pi package that sends Telegram notifications after each completed agent response.","maintainers":[{"name":"brain0pia","email":"not.a.ravil@gmail.com"}],"readme":"# `@brain0pia/pi-notify`\n\nPi package that sends a Telegram notification after each completed Pi agent response.\n\n## Install\n\n```bash\npi install npm:@brain0pia/pi-notify\n```\n\nFor local development you can also load the package directly:\n\n```bash\npi -e /absolute/path/to/pi-notify\n```\n\n## Configure\n\nCreate `~/.pi/notify.json`:\n\n```json\n{\n  \"botToken\": \"123456:ABCDEF...\",\n  \"chatId\": \"123456789\"\n}\n```\n\nOptional: add a session URL template. If present, `SESSION_ID` is replaced with the current Pi session id and the resolved link is included in each Telegram notification.\n\n```json\n{\n  \"botToken\": \"123456:ABCDEF...\",\n  \"chatId\": \"123456789\",\n  \"sessionUrlTemplate\": \"https://session-viewer.example/#SESSION_ID\"\n}\n```\n\nYou can also manage that field from Pi with the slash command:\n\n```text\n/pi-notify-url https://session-viewer.example/#SESSION_ID\n```\n\nUseful variants:\n\n- `/pi-notify-url` — show the current template\n- `/pi-notify-url off` — clear the template\n\n## Behavior\n\nAfter every `agent_end` event the extension:\n\n1. Finds the latest assistant text from the completed run.\n2. Shows a 30-second overlay countdown.\n3. Sends immediately on `Enter`.\n4. Cancels on any other key.\n5. Sends automatically when the countdown reaches zero.\n\nThe Telegram payload includes metadata (`project`, `cwd`, `timestamp`, `model`) plus the full assistant output. If `sessionUrlTemplate` is configured, the notification also includes an `Open session` link built from the current session id. Short outputs are sent as a MarkdownV2 message with a plain-text fallback on parse errors. Long outputs are sent as a short header message plus a `.md` attachment containing the full response.\n\n## Development\n\n```bash\nnpm install\nnpm test\nnpm run check\n```\n","readmeFilename":"README.md"}