@damper/cli 0.9.14 → 0.9.16

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.
@@ -81,6 +81,29 @@ export function configureDamperMcp() {
81
81
  // Write back
82
82
  fs.writeFileSync(CLAUDE_SETTINGS_FILE, JSON.stringify(settings, null, 2));
83
83
  }
84
+ /**
85
+ * Send a notification when Claude finishes.
86
+ * - BEL: triggers terminal bell (Ghostty: dock badge + title emoji)
87
+ * - macOS: plays Glass sound via afplay + shows desktop notification
88
+ */
89
+ function notifySessionEnd(label) {
90
+ // Terminal bell — triggers Ghostty badge/title, works in any terminal
91
+ if (process.stdout.isTTY) {
92
+ process.stdout.write('\x07');
93
+ }
94
+ if (process.platform === 'darwin') {
95
+ // Play sound directly (reliable, doesn't need notification permissions)
96
+ spawn('afplay', ['/System/Library/Sounds/Glass.aiff'], {
97
+ stdio: 'ignore', detached: true,
98
+ }).unref();
99
+ // Desktop notification banner (needs notification permissions for Script Editor)
100
+ const escaped = label.replace(/"/g, '\\"');
101
+ spawn('osascript', [
102
+ '-e',
103
+ `display notification "${escaped}" with title "Damper"`,
104
+ ], { stdio: 'ignore', detached: true }).unref();
105
+ }
106
+ }
84
107
  /**
85
108
  * Check if tmux is available
86
109
  */
@@ -229,6 +252,7 @@ export async function launchClaude(options) {
229
252
  });
230
253
  }
231
254
  clearTerminalTitle();
255
+ notifySessionEnd(`Claude finished: ${taskLabel}`);
232
256
  console.log(pc.dim('\n─────────────────────────────────────────\n'));
233
257
  return { cwd, taskId, apiKey };
234
258
  }
@@ -634,6 +658,7 @@ export async function launchClaudeForReview(options) {
634
658
  });
635
659
  }
636
660
  clearTerminalTitle();
661
+ notifySessionEnd(`Review finished: ${reviewLabel}`);
637
662
  }
638
663
  /**
639
664
  * Launch Claude to resolve merge conflicts
@@ -667,6 +692,7 @@ async function launchClaudeForMerge(options) {
667
692
  });
668
693
  }
669
694
  clearTerminalTitle();
695
+ notifySessionEnd('Merge conflict resolution finished');
670
696
  }
671
697
  /**
672
698
  * Check if Claude Code CLI is installed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@damper/cli",
3
- "version": "0.9.14",
3
+ "version": "0.9.16",
4
4
  "description": "CLI tool for orchestrating Damper task workflows with Claude Code",
5
5
  "author": "Damper <hello@usedamper.com>",
6
6
  "repository": {