pi-smart-voice-notify 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +7 -0
- package/package.json +74 -70
- package/src/config-store.ts +1 -1
- package/src/focus-detect.ts +497 -474
- package/src/index.ts +89 -23
- package/src/linux.ts +2 -32
- package/src/logging.ts +86 -72
- package/src/notify-audio.ts +12 -11
- package/src/permission-forwarding-watcher.ts +637 -577
- package/src/sound-theme.ts +15 -2
- package/src/tts.ts +110 -8
- package/src/webhook.ts +204 -4
- package/src/zellij-modal.ts +2 -2
- package/src/abortable-command.test.ts +0 -45
- package/src/index.test.ts +0 -911
- package/src/permission-forwarding-watcher.test.ts +0 -180
- package/src/reminder-playback.test.ts +0 -62
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.5.1] - 2026-05-26
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- Suppressed error notifications when the agent has pending continuation messages.
|
|
7
|
+
- Widened peer dependency ranges to `^0.74.0 || ^0.75.0`.
|
|
8
|
+
- Aligned `@types/node` dev dependency to `25.9.1`.
|
|
9
|
+
|
|
10
|
+
## [0.5.0] - 2026-05-22
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Added `PI_SMART_NOTIFY_AGENT_ERROR_GRACE_MS` to delay agent-error notifications briefly so related idle/error state can settle before notifying.
|
|
14
|
+
- Added webhook destination hardening with public HTTP(S)-only validation, private/reserved host rejection, DNS validation, and DNS-pinned dispatch.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- Added request timeouts and a 10 MiB audio response cap for remote ElevenLabs/OpenAI-compatible TTS fetches.
|
|
18
|
+
- Improved Linux focus detection and moved debug log writes onto asynchronous file logging with flush support.
|
|
19
|
+
- Reorganized checked-in tests into the dedicated `test/` directory with webhook, TTS, Linux, sound-theme, and notification coverage.
|
|
20
|
+
|
|
3
21
|
## [0.4.0] - 2026-04-30
|
|
4
22
|
|
|
5
23
|
### Added
|
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@ Windows-optimized smart notification extension for the Pi coding agent.
|
|
|
16
16
|
- **Voice** – auto-selectable TTS engines: Edge, espeak-ng, ElevenLabs, OpenAI-compatible, and Windows SAPI
|
|
17
17
|
- **Desktop toasts** – cross-platform notifications via `node-notifier` (Windows/macOS/Linux)
|
|
18
18
|
- **Webhook delivery** – optional Discord or generic HTTP webhook notifications
|
|
19
|
+
- Validates webhook targets as public HTTP(S) destinations and blocks localhost/private/reserved networks before dispatch
|
|
19
20
|
|
|
20
21
|
- **Intelligent event detection**
|
|
21
22
|
- Task completion (idle)
|
|
@@ -133,6 +134,9 @@ A starter template is provided in `config/config.example.json`. On startup, the
|
|
|
133
134
|
| `enableErrorNotification` | boolean | `true` | Notify on errors |
|
|
134
135
|
| `suppressIdleAfterError` | boolean | `true` | Skip idle notification if turn had errors |
|
|
135
136
|
|
|
137
|
+
|
|
138
|
+
Error notifications are delayed briefly before delivery so Pi can settle related turn state and suppress a redundant idle alert. Override the default 10000 ms delay with `PI_SMART_NOTIFY_AGENT_ERROR_GRACE_MS` when you need faster or slower error alerts.
|
|
139
|
+
|
|
136
140
|
*Question notifications only work when a custom `question` tool is loaded.
|
|
137
141
|
|
|
138
142
|
Forwarded permission watcher notifications use privacy-safe text, require the request `targetSessionId` to match the active Pi session, and never include raw forwarded `message` content.
|
|
@@ -188,6 +192,9 @@ Paths can be absolute or relative to the extension directory.
|
|
|
188
192
|
| `minNotificationIntervalMs` | number | `1500` | Throttle interval between same-type notifications |
|
|
189
193
|
| `debugLog` | boolean | `false` | Enable debug logging to file |
|
|
190
194
|
|
|
195
|
+
|
|
196
|
+
Webhook dispatch only attempts public `http`/`https` URLs. The extension rejects localhost-style names, `.local`/`.internal`/`.lan`/`.home.arpa` hosts, private or reserved IP literals, and hostnames whose DNS results include private or reserved addresses; validated DNS results are pinned for the outbound request. Use `PI_SMART_NOTIFY_WEBHOOK_TIMEOUT_MS` to override the default 8000 ms webhook request timeout.
|
|
197
|
+
|
|
191
198
|
## Notification Modes
|
|
192
199
|
|
|
193
200
|
| Mode | Behavior |
|
package/package.json
CHANGED
|
@@ -1,70 +1,74 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pi-smart-voice-notify",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Windows-optimized smart voice, sound, and desktop notifications for Pi coding agent.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./index.ts",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": "./index.ts"
|
|
9
|
-
},
|
|
10
|
-
"files": [
|
|
11
|
-
"index.ts",
|
|
12
|
-
"src",
|
|
13
|
-
"config/config.example.json",
|
|
14
|
-
"assets",
|
|
15
|
-
"README.md",
|
|
16
|
-
"CHANGELOG.md",
|
|
17
|
-
"LICENSE"
|
|
18
|
-
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "npx --yes -p typescript@5.7.3 -p @types/node@20.17.57 tsc -p tsconfig.json --noEmit",
|
|
21
|
-
"lint": "npm run build",
|
|
22
|
-
"test": "node --experimental-strip-types --test
|
|
23
|
-
"check": "npm run build && npm run test"
|
|
24
|
-
},
|
|
25
|
-
"keywords": [
|
|
26
|
-
"pi-package",
|
|
27
|
-
"pi",
|
|
28
|
-
"pi-extension",
|
|
29
|
-
"pi-coding-agent",
|
|
30
|
-
"coding-agent",
|
|
31
|
-
"voice-notify",
|
|
32
|
-
"desktop-notification",
|
|
33
|
-
"notifications",
|
|
34
|
-
"voice",
|
|
35
|
-
"audio",
|
|
36
|
-
"text-to-speech",
|
|
37
|
-
"tts",
|
|
38
|
-
"windows",
|
|
39
|
-
"linux",
|
|
40
|
-
"macos"
|
|
41
|
-
],
|
|
42
|
-
"author": "MasuRii",
|
|
43
|
-
"license": "MIT",
|
|
44
|
-
"repository": {
|
|
45
|
-
"type": "git",
|
|
46
|
-
"url": "git+https://github.com/MasuRii/pi-smart-voice-notify.git"
|
|
47
|
-
},
|
|
48
|
-
"homepage": "https://github.com/MasuRii/pi-smart-voice-notify#readme",
|
|
49
|
-
"bugs": {
|
|
50
|
-
"url": "https://github.com/MasuRii/pi-smart-voice-notify/issues"
|
|
51
|
-
},
|
|
52
|
-
"engines": {
|
|
53
|
-
"node": ">=24"
|
|
54
|
-
},
|
|
55
|
-
"publishConfig": {
|
|
56
|
-
"access": "public"
|
|
57
|
-
},
|
|
58
|
-
"pi": {
|
|
59
|
-
"extensions": [
|
|
60
|
-
"./index.ts"
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
|
-
"peerDependencies": {
|
|
64
|
-
"@
|
|
65
|
-
"@
|
|
66
|
-
},
|
|
67
|
-
"dependencies": {
|
|
68
|
-
"node-notifier": "^10.0.1"
|
|
69
|
-
|
|
70
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "pi-smart-voice-notify",
|
|
3
|
+
"version": "0.5.1",
|
|
4
|
+
"description": "Windows-optimized smart voice, sound, and desktop notifications for Pi coding agent.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./index.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.ts"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"index.ts",
|
|
12
|
+
"src",
|
|
13
|
+
"config/config.example.json",
|
|
14
|
+
"assets",
|
|
15
|
+
"README.md",
|
|
16
|
+
"CHANGELOG.md",
|
|
17
|
+
"LICENSE"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "npx --yes -p typescript@5.7.3 -p @types/node@20.17.57 tsc -p tsconfig.json --noEmit",
|
|
21
|
+
"lint": "npm run build",
|
|
22
|
+
"test": "node --experimental-strip-types --test test/abortable-command.test.ts test/reminder-playback.test.ts test/permission-forwarding-watcher.test.ts test/sound-theme.test.ts test/webhook.test.ts test/linux.test.ts test/index.test.ts test/tts.test.ts",
|
|
23
|
+
"check": "npm run build && npm run test"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"pi-package",
|
|
27
|
+
"pi",
|
|
28
|
+
"pi-extension",
|
|
29
|
+
"pi-coding-agent",
|
|
30
|
+
"coding-agent",
|
|
31
|
+
"voice-notify",
|
|
32
|
+
"desktop-notification",
|
|
33
|
+
"notifications",
|
|
34
|
+
"voice",
|
|
35
|
+
"audio",
|
|
36
|
+
"text-to-speech",
|
|
37
|
+
"tts",
|
|
38
|
+
"windows",
|
|
39
|
+
"linux",
|
|
40
|
+
"macos"
|
|
41
|
+
],
|
|
42
|
+
"author": "MasuRii",
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "git+https://github.com/MasuRii/pi-smart-voice-notify.git"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://github.com/MasuRii/pi-smart-voice-notify#readme",
|
|
49
|
+
"bugs": {
|
|
50
|
+
"url": "https://github.com/MasuRii/pi-smart-voice-notify/issues"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=24"
|
|
54
|
+
},
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public"
|
|
57
|
+
},
|
|
58
|
+
"pi": {
|
|
59
|
+
"extensions": [
|
|
60
|
+
"./index.ts"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"@earendil-works/pi-coding-agent": "^0.74.0 || ^0.75.0",
|
|
65
|
+
"@earendil-works/pi-tui": "^0.74.0 || ^0.75.0"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"node-notifier": "^10.0.1",
|
|
69
|
+
"undici": "^8.3.0"
|
|
70
|
+
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"@types/node": "25.9.1"
|
|
73
|
+
}
|
|
74
|
+
}
|
package/src/config-store.ts
CHANGED