claude-notification-plugin 1.1.63 → 1.1.65

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-notification-plugin",
3
- "version": "1.1.63",
3
+ "version": "1.1.65",
4
4
  "description": "Claude Code task-completion notifications: Telegram, desktop notifications (Windows/macOS/Linux), sound, and voice",
5
5
  "author": {
6
6
  "name": "Viacheslav Makarov",
package/bin/install.js CHANGED
@@ -423,6 +423,29 @@ public class ShortcutHelper {
423
423
  // Helpers
424
424
  // ──────────────────────────────────────
425
425
 
426
+ /**
427
+ * Deep merge: existing values always win. Defaults only fill in missing keys.
428
+ * Arrays are NOT merged — existing array replaces default entirely.
429
+ */
430
+ function deepMergeDefaults (defaults, existing) {
431
+ if (!existing || typeof existing !== 'object') {
432
+ return { ...defaults };
433
+ }
434
+ const result = { ...existing };
435
+ for (const key of Object.keys(defaults)) {
436
+ if (!(key in result)) {
437
+ result[key] = defaults[key];
438
+ } else if (
439
+ defaults[key] && typeof defaults[key] === 'object' && !Array.isArray(defaults[key])
440
+ && result[key] && typeof result[key] === 'object' && !Array.isArray(result[key])
441
+ ) {
442
+ result[key] = deepMergeDefaults(defaults[key], result[key]);
443
+ }
444
+ // else: existing scalar/array wins, do nothing
445
+ }
446
+ return result;
447
+ }
448
+
426
449
  function openTtyInput () {
427
450
  // If stdin is already a TTY (e.g. local `npm install`), use it directly
428
451
  if (process.stdin.isTTY) {
@@ -633,12 +656,7 @@ Send any message to your bot in Telegram, then press Enter.\x1b[0m`);
633
656
  },
634
657
  };
635
658
 
636
- const config = { ...defaults, ...existing };
637
- for (const key of Object.keys(defaults)) {
638
- if (defaults[key] && typeof defaults[key] === 'object' && !Array.isArray(defaults[key])) {
639
- config[key] = { ...defaults[key], ...(existing[key] || {}) };
640
- }
641
- }
659
+ const config = deepMergeDefaults(defaults, existing);
642
660
 
643
661
  // Ensure listener.claudeArgs has --model (default: opus)
644
662
  const ca = config.listener.claudeArgs || [];
package/commit-sha CHANGED
@@ -1 +1 @@
1
- 063f0897942fcf22a11c991e5675b4a1c1c323ad
1
+ ca17dbcec65a2871b105feed158245a48fdd5d78
@@ -1044,5 +1044,14 @@ async function mainLoop () {
1044
1044
 
1045
1045
  (async () => {
1046
1046
  await poller.flush();
1047
+ await poller.setMyCommands([
1048
+ { command: 'status', description: 'Status of all projects' },
1049
+ { command: 'queue', description: 'Show all queues' },
1050
+ { command: 'projects', description: 'List projects' },
1051
+ { command: 'history', description: 'Recent task history' },
1052
+ { command: 'pty', description: 'PTY session diagnostics' },
1053
+ { command: 'help', description: 'Show all commands' },
1054
+ { command: 'stop', description: 'Stop listener' },
1055
+ ]);
1047
1056
  await mainLoop();
1048
1057
  })();
@@ -219,6 +219,18 @@ export class TelegramPoller {
219
219
  }
220
220
  }
221
221
 
222
+ async setMyCommands (commands) {
223
+ try {
224
+ await fetch(`${this.baseUrl}/setMyCommands`, {
225
+ method: 'POST',
226
+ headers: { 'Content-Type': 'application/json' },
227
+ body: JSON.stringify({ commands }),
228
+ });
229
+ } catch (err) {
230
+ this.logger.error(`setMyCommands error: ${err.message}`);
231
+ }
232
+ }
233
+
222
234
  async sendDocument (buffer, filename, caption) {
223
235
  try {
224
236
  const formData = new FormData();
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.63",
4
+ "version": "1.1.65",
5
5
  "description": "Claude Code task-completion notifications: Telegram, desktop notifications (Windows/macOS/Linux), sound, and voice",
6
6
  "type": "module",
7
7
  "engines": {