claude-notification-plugin 1.1.43 → 1.1.49

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.43",
3
+ "version": "1.1.49",
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/commit-sha CHANGED
@@ -1 +1 @@
1
- b460aaa05a941c411fb010c938655a256ff5ad57
1
+ ff5e9a94bfde76173bc7c0b2658c5bb14b4503ea
@@ -6,6 +6,9 @@ const COMMANDS = [
6
6
  '/history', '/stop', '/help',
7
7
  ];
8
8
 
9
+ // Telegram bot commands to silently ignore (not tasks, not our commands)
10
+ const IGNORED_COMMANDS = ['/start'];
11
+
9
12
  /**
10
13
  * Parse a Telegram message into a command or task.
11
14
  *
@@ -32,6 +35,11 @@ export function parseMessage (text) {
32
35
  const parts = trimmed.split(/\s+/);
33
36
  const cmd = parts[0].toLowerCase().replace(/@\w+$/, ''); // strip @botname
34
37
 
38
+ // Telegram built-in commands — silently ignore
39
+ if (IGNORED_COMMANDS.includes(cmd)) {
40
+ return null;
41
+ }
42
+
35
43
  // Known command
36
44
  if (COMMANDS.includes(cmd)) {
37
45
  return {
@@ -349,6 +349,17 @@ export class PtyRunner extends EventEmitter {
349
349
  args.push('--permission-mode', 'auto');
350
350
  }
351
351
 
352
+ // Reduce PTY output noise: disable animations, progress bar, tips
353
+ if (!args.includes('--settings')) {
354
+ args.push('--settings', JSON.stringify({
355
+ prefersReducedMotion: true,
356
+ outputStyle: 'plain',
357
+ terminalProgressBarEnabled: false,
358
+ spinnerTipsEnabled: false,
359
+ showTurnDuration: false,
360
+ }));
361
+ }
362
+
352
363
  this.logger.info(`Creating PTY session in ${workDir} with args: ${JSON.stringify(args)}`);
353
364
 
354
365
  const shell = process.platform === 'win32' ? 'cmd.exe' : '/bin/bash';
@@ -423,14 +434,26 @@ export class PtyRunner extends EventEmitter {
423
434
 
424
435
  /**
425
436
  * Wait for PTY output to stabilize (Claude has loaded).
437
+ * Automatically answers the workspace trust prompt if it appears.
426
438
  */
427
439
  _waitForReady (session, timeoutMs) {
428
440
  return new Promise((resolve) => {
429
441
  let lastLength = 0;
430
442
  let stableCount = 0;
443
+ let trustAnswered = false;
431
444
  const checkInterval = 500;
432
445
 
433
446
  const timer = setInterval(() => {
447
+ // Detect and auto-answer workspace trust prompt
448
+ if (!trustAnswered) {
449
+ const buf = (session._buffer || '').replace(/\x1b\[[0-9;]*[a-zA-Z]/g, '').replace(/\s/g, '');
450
+ if (buf.includes('trustthisfolder') || buf.includes('Yesiproceed')) {
451
+ trustAnswered = true;
452
+ this.logger.info('Auto-answering workspace trust prompt');
453
+ session.pty.write('\r');
454
+ }
455
+ }
456
+
434
457
  const currentLength = session._buffer.length;
435
458
  if (currentLength > 0 && currentLength === lastLength) {
436
459
  stableCount++;
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.43",
4
+ "version": "1.1.49",
5
5
  "description": "Claude Code task-completion notifications: Telegram, desktop notifications (Windows/macOS/Linux), sound, and voice",
6
6
  "type": "module",
7
7
  "engines": {