pi-smart-voice-notify 0.2.2 → 0.3.0
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 +34 -0
- package/package.json +61 -61
- package/src/focus-detect.ts +474 -389
- package/src/index.test.ts +320 -5
- package/src/index.ts +437 -78
- package/src/notify-audio.ts +40 -27
- package/src/tts.ts +23 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.0] - 2026-03-23
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- Comprehensive test coverage for TTS and webhook configuration building
|
|
7
|
+
- `buildTTSServiceConfig` and `buildWebhookServiceConfig` helper functions for modular config construction
|
|
8
|
+
- Improved dependency injection for terminal focus detection
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- Updated `@mariozechner/pi-coding-agent` and `@mariozechner/pi-tui` peer dependencies to ^0.62.0
|
|
12
|
+
- Refactored TTS configuration building to be more modular and testable
|
|
13
|
+
- Improved notify-audio.ts with cleaner sound theme handling
|
|
14
|
+
- Updated focus detection logic for better cross-platform support
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- Replaced System.Windows.Media.MediaPlayer with P/Invoke to winmm.dll MCI API for reliable audio playback on Windows
|
|
18
|
+
- MediaPlayer can fail when Windows Media Foundation is not properly installed or configured
|
|
19
|
+
- Use mciSendString for notification audio playback with unique aliases per playback instance for concurrent safety
|
|
20
|
+
- Use mciSendString for TTS playback with duration detection
|
|
21
|
+
|
|
22
|
+
### Tests
|
|
23
|
+
- Added comprehensive test cases for config building functions
|
|
24
|
+
- Added tests for abortable commands and reminder playback
|
|
25
|
+
|
|
26
|
+
## [0.2.3] - 2026-03-13
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
- Integration with `pi-permission-system:permission-request` event channel for permission request notifications
|
|
30
|
+
- Automatic cancellation of permission reminders when approval/denial is received from the permission system
|
|
31
|
+
- Deduplication to prevent duplicate notifications when permission system events precede tool_call events
|
|
32
|
+
- New test coverage for permission system event integration
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
- Refactored to use shared `toRecord` utility from `pi-permission-system`, removing duplicate implementation
|
|
36
|
+
|
|
3
37
|
## [0.2.2] - 2026-03-12
|
|
4
38
|
|
|
5
39
|
### Changed
|
package/package.json
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
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 src/abortable-command.test.ts src/reminder-playback.test.ts src/index.test.ts",
|
|
23
|
-
"check": "npm run build && npm run test"
|
|
24
|
-
},
|
|
25
|
-
"keywords": [
|
|
26
|
-
"pi-package",
|
|
27
|
-
"pi",
|
|
28
|
-
"pi-extension",
|
|
29
|
-
"voice-notify",
|
|
30
|
-
"windows",
|
|
31
|
-
"desktop-notification"
|
|
32
|
-
],
|
|
33
|
-
"author": "MasuRii",
|
|
34
|
-
"license": "MIT",
|
|
35
|
-
"repository": {
|
|
36
|
-
"type": "git",
|
|
37
|
-
"url": "git+https://github.com/MasuRii/pi-smart-voice-notify.git"
|
|
38
|
-
},
|
|
39
|
-
"homepage": "https://github.com/MasuRii/pi-smart-voice-notify#readme",
|
|
40
|
-
"bugs": {
|
|
41
|
-
"url": "https://github.com/MasuRii/pi-smart-voice-notify/issues"
|
|
42
|
-
},
|
|
43
|
-
"engines": {
|
|
44
|
-
"node": ">=24"
|
|
45
|
-
},
|
|
46
|
-
"publishConfig": {
|
|
47
|
-
"access": "public"
|
|
48
|
-
},
|
|
49
|
-
"pi": {
|
|
50
|
-
"extensions": [
|
|
51
|
-
"./index.ts"
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
"peerDependencies": {
|
|
55
|
-
"@mariozechner/pi-coding-agent": "
|
|
56
|
-
"@mariozechner/pi-tui": "
|
|
57
|
-
},
|
|
58
|
-
"dependencies": {
|
|
59
|
-
"node-notifier": "^10.0.1"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "pi-smart-voice-notify",
|
|
3
|
+
"version": "0.3.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 src/abortable-command.test.ts src/reminder-playback.test.ts src/index.test.ts",
|
|
23
|
+
"check": "npm run build && npm run test"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"pi-package",
|
|
27
|
+
"pi",
|
|
28
|
+
"pi-extension",
|
|
29
|
+
"voice-notify",
|
|
30
|
+
"windows",
|
|
31
|
+
"desktop-notification"
|
|
32
|
+
],
|
|
33
|
+
"author": "MasuRii",
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/MasuRii/pi-smart-voice-notify.git"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://github.com/MasuRii/pi-smart-voice-notify#readme",
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/MasuRii/pi-smart-voice-notify/issues"
|
|
42
|
+
},
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=24"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
},
|
|
49
|
+
"pi": {
|
|
50
|
+
"extensions": [
|
|
51
|
+
"./index.ts"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"@mariozechner/pi-coding-agent": "^0.62.0",
|
|
56
|
+
"@mariozechner/pi-tui": "^0.62.0"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"node-notifier": "^10.0.1"
|
|
60
|
+
}
|
|
61
|
+
}
|