@damper/cli 0.9.15 → 0.9.17
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/dist/services/claude.js +9 -5
- package/package.json +1 -1
package/dist/services/claude.js
CHANGED
|
@@ -83,20 +83,24 @@ export function configureDamperMcp() {
|
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
85
|
* Send a notification when Claude finishes.
|
|
86
|
-
* - BEL: triggers terminal bell (Ghostty:
|
|
87
|
-
* - macOS
|
|
86
|
+
* - BEL: triggers terminal bell (Ghostty: dock badge + title emoji)
|
|
87
|
+
* - macOS: plays Glass sound via afplay + shows desktop notification
|
|
88
88
|
*/
|
|
89
89
|
function notifySessionEnd(label) {
|
|
90
|
-
// Terminal bell — triggers Ghostty
|
|
90
|
+
// Terminal bell — triggers Ghostty badge/title, works in any terminal
|
|
91
91
|
if (process.stdout.isTTY) {
|
|
92
92
|
process.stdout.write('\x07');
|
|
93
93
|
}
|
|
94
|
-
// macOS desktop notification (fire-and-forget)
|
|
95
94
|
if (process.platform === 'darwin') {
|
|
95
|
+
// Play system alert sound (uses whatever is set in System Settings > Sound)
|
|
96
|
+
spawn('osascript', ['-e', 'beep'], {
|
|
97
|
+
stdio: 'ignore', detached: true,
|
|
98
|
+
}).unref();
|
|
99
|
+
// Desktop notification banner (needs notification permissions for Script Editor)
|
|
96
100
|
const escaped = label.replace(/"/g, '\\"');
|
|
97
101
|
spawn('osascript', [
|
|
98
102
|
'-e',
|
|
99
|
-
`display notification "${escaped}" with title "Damper"
|
|
103
|
+
`display notification "${escaped}" with title "Damper"`,
|
|
100
104
|
], { stdio: 'ignore', detached: true }).unref();
|
|
101
105
|
}
|
|
102
106
|
}
|