claude-notification-plugin 1.1.10 → 1.1.13

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/README.md CHANGED
@@ -48,7 +48,8 @@ claude-notify install
48
48
  claude-notify uninstall
49
49
  ```
50
50
 
51
- This removes hooks, config, CLI wrappers, plugin registration, and the npm global package.
51
+ This removes hooks, CLI wrappers, plugin registration, and the npm global package.
52
+ Your config file (`~/.claude/claude-notify.config.json`) is preserved so settings survive reinstalls.
52
53
 
53
54
  ## Configuration
54
55
 
@@ -293,7 +294,7 @@ Alternative: add **@userinfobot** to a chat and it will reply with the ID.
293
294
 
294
295
  ```
295
296
  claude-notify install Reinstall plugin registration, Telegram config, hooks
296
- claude-notify uninstall Remove plugin, hooks, config, CLI wrappers
297
+ claude-notify uninstall Remove plugin, hooks, CLI wrappers (config preserved)
297
298
  claude-notify listener <action> Manage the Telegram Listener daemon
298
299
  Actions: start, stop, status, setup, logs, restart
299
300
  ```
@@ -378,8 +378,8 @@ async function setupListener () {
378
378
  taskTimeoutMinutes: L.taskTimeoutMinutes ?? 30,
379
379
  maxQueuePerWorkDir: L.maxQueuePerWorkDir ?? 10,
380
380
  maxTotalTasks: L.maxTotalTasks ?? 50,
381
- logDir: L.logDir || path.join(home, '.claude'),
382
- taskLogDir: L.taskLogDir || path.join(home, '.claude'),
381
+ logDir: L.logDir || path.join(HOME, '.claude'),
382
+ taskLogDir: L.taskLogDir || path.join(HOME, '.claude'),
383
383
  projectPath: L.projects?.default?.path || '',
384
384
  };
385
385
 
package/bin/uninstall.js CHANGED
@@ -5,7 +5,7 @@ import path from 'path';
5
5
  import { execSync } from 'child_process';
6
6
  import {
7
7
  HOME, CLAUDE_DIR,
8
- CONFIG_PATH, STATE_PATH, PID_PATH, RESOLVER_PATH, LISTENER_LOG_PATH,
8
+ STATE_PATH, PID_PATH, RESOLVER_PATH, LISTENER_LOG_PATH,
9
9
  SETTINGS_PATH, INSTALLED_PLUGINS_PATH, KNOWN_MARKETPLACES_PATH,
10
10
  HOOK_COMMAND, PLUGIN_KEY, MARKETPLACE_KEY,
11
11
  } from './constants.js';
@@ -241,8 +241,8 @@ if (fs.existsSync(SETTINGS_PATH)) {
241
241
  }
242
242
  }
243
243
 
244
- // Remove config, state, resolver, and listener files
245
- for (const file of [CONFIG_PATH, STATE_PATH, RESOLVER_PATH, PID_PATH, LISTENER_LOG_PATH]) {
244
+ // Remove state, resolver, and listener files (config is preserved for reinstall)
245
+ for (const file of [STATE_PATH, RESOLVER_PATH, PID_PATH, LISTENER_LOG_PATH]) {
246
246
  if (fs.existsSync(file)) {
247
247
  fs.unlinkSync(file);
248
248
  console.log(`Removed ${path.basename(file)}`);
package/commit-sha CHANGED
@@ -1 +1 @@
1
- 87470f0ddd7c4de3cdcbe91886dc3285b942c595
1
+ 03f882a91dd04b8467a10dc0c80af8040eaa54cd
@@ -390,9 +390,12 @@ async function sendDesktopNotification (config, message) {
390
390
  }
391
391
  try {
392
392
  const { default: notifier } = await import('node-notifier');
393
+ const iconPath = new URL('../claude_img/claude.png', import.meta.url).pathname
394
+ .replace(/^\/([a-zA-Z]:)/, '$1');
393
395
  notifier.notify({
394
396
  title: 'Claude Code',
395
397
  message,
398
+ icon: iconPath,
396
399
  sound: false,
397
400
  wait: false,
398
401
  });
@@ -676,21 +679,21 @@ process.stdin.on('end', async () => {
676
679
  process.exit(0);
677
680
  }
678
681
 
679
- const title = eventType === 'Notification'
680
- ? 'Claude waiting for input'
681
- : 'Claude finished coding';
682
+ const statusEmoji = eventType === 'Notification' ? '⏸' : '✅';
683
+ const desktopStatus = eventType === 'Notification' ? 'Waiting' : 'Finished';
682
684
 
683
685
  const branch = getBranch(cwd);
684
- const branchLine = branch ? `\nBranch: ${branch}` : '';
685
- const branchLineHtml = branch ? `\nBranch: <b>${escapeHtml(branch)}</b>` : '';
686
+ const label = branch ? `@${project}/${branch}` : `@${project}`;
687
+ const labelHtml = branch
688
+ ? `@<b>${escapeHtml(project)}</b>/<b>${escapeHtml(branch)}</b>`
689
+ : `@<b>${escapeHtml(project)}</b>`;
686
690
 
687
691
  const triggerLine = config.debug ? `\nTrigger: ${eventType}` : '';
688
692
 
689
- let message =
690
- `${title}\n\nProject: ${project}${branchLine}\nDuration: ${duration}s${triggerLine}`;
693
+ const desktopMessage = `${desktopStatus}: ${label}`;
691
694
 
692
695
  let telegramMessage =
693
- `${escapeHtml(title)}\n\nProject: <b>${escapeHtml(project)}</b>${branchLineHtml}\nDuration: ${duration}s${triggerLine}`;
696
+ `${statusEmoji} ${labelHtml} (duration: ${duration}s)${triggerLine}`;
694
697
 
695
698
  if (config.telegram.includeLastCcMessageInTelegram && event.last_assistant_message) {
696
699
  const maxLen = 3500;
@@ -702,18 +705,14 @@ process.stdin.on('end', async () => {
702
705
  }
703
706
 
704
707
  if (config.debug) {
705
- const debugBlockMd = '\n\n*Debug:*\n'
706
- + (config.voice.enabled ? `\nVoice: ${getVoicePhrase(duration)}` : '')
707
- + `\n\nHook input:\n\`\`\`json\n${JSON.stringify(event, null, 2)}\n\`\`\``;
708
708
  const debugBlockHtml = '\n\n<b>Debug:</b>\n'
709
709
  + (config.voice.enabled ? `\nVoice: ${escapeHtml(getVoicePhrase(duration))}` : '')
710
710
  + `\n\nHook input:\n<pre>${escapeHtml(JSON.stringify(event, null, 2))}</pre>`;
711
- message += debugBlockMd;
712
711
  telegramMessage += debugBlockHtml;
713
712
  }
714
713
 
715
714
  await sendWebhook(config, {
716
- title,
715
+ title: `${desktopStatus}: ${label}`,
717
716
  project,
718
717
  branch: branch || undefined,
719
718
  duration,
@@ -722,7 +721,7 @@ process.stdin.on('end', async () => {
722
721
  hookEvent: event,
723
722
  });
724
723
 
725
- state._telegramText = `\u{1F916} ${telegramMessage}`;
724
+ state._telegramText = telegramMessage;
726
725
  await sendTelegram(config, state);
727
726
  delete state._telegramText;
728
727
  if (eventType === 'Stop') {
@@ -730,7 +729,7 @@ process.stdin.on('end', async () => {
730
729
  }
731
730
  saveState(state);
732
731
 
733
- await sendDesktopNotification(config, message);
732
+ await sendDesktopNotification(config, desktopMessage);
734
733
  playSound(config);
735
734
  speakResult(config, duration);
736
735
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "claude-notification-plugin",
3
3
  "productName": "claude-notification-plugin",
4
- "version": "1.1.10",
4
+ "version": "1.1.13",
5
5
  "description": "Claude Code task-completion notifications: Telegram, desktop notifications (Windows/macOS/Linux), sound, and voice",
6
6
  "type": "module",
7
7
  "engines": {