claude-notification-plugin 1.1.20 → 1.1.21

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.20",
3
+ "version": "1.1.21",
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
- 1c842063a9de04968f5523348e390194668a289b
1
+ 494fa90b0501d2ac36fbc1220a218028212f23aa
@@ -137,8 +137,8 @@ runner.on('complete', async (workDir, task, output) => {
137
137
 
138
138
  // Build result: try replying to user's original message without duplicating the task text.
139
139
  // If reply fails (user deleted their message), resend with task text included.
140
- const headerShort = `✅ <code>${label}</code> Done:`;
141
- const headerFull = `✅ <code>${label}</code> Done: ${escapeHtml(task.text)}`;
140
+ const headerShort = `✅ <code>${label}</code>`;
141
+ const headerFull = `✅ <code>${label}</code>\n\n${escapeHtml(task.text)}`;
142
142
  let body = '';
143
143
  if (output) {
144
144
  if (output.length > 20000) {
@@ -176,9 +176,9 @@ runner.on('error', async (workDir, task, errorMsg) => {
176
176
  await poller.deleteMessage(task.runningMessageId);
177
177
 
178
178
  const body = `\n\n<pre>${escapeHtml(errorMsg)}</pre>`;
179
- const sentId = await poller.sendMessage(`❌ [${label}] Error:${body}`, task.telegramMessageId);
179
+ const sentId = await poller.sendMessage(`❌ <code>${label}</code>\nError:${body}`, task.telegramMessageId);
180
180
  if (!sentId && task.telegramMessageId) {
181
- await poller.sendMessage(`❌ [${label}] Error: ${escapeHtml(task.text)}${body}`);
181
+ await poller.sendMessage(`❌ <code>${label}</code>\nError: ${escapeHtml(task.text)}${body}`);
182
182
  }
183
183
 
184
184
  const next = queue.onTaskComplete(workDir, `ERROR: ${errorMsg}`);
@@ -194,7 +194,7 @@ runner.on('timeout', async (workDir, task) => {
194
194
 
195
195
  await poller.deleteMessage(task.runningMessageId);
196
196
 
197
- const headerShort = `⏰ [${label}] Task forcefully stopped — timeout exceeded (${timeoutMin} min)`;
197
+ const headerShort = `⏰ <code>${label}</code>\nTask forcefully stopped — timeout exceeded (${timeoutMin} min)`;
198
198
  const headerFull = `${headerShort}: ${escapeHtml(task.text)}`;
199
199
  const sentId = await poller.sendMessage(headerShort, task.telegramMessageId);
200
200
  if (!sentId && task.telegramMessageId) {
@@ -224,8 +224,8 @@ function formatLabel (entry) {
224
224
  async function startTask (workDir, task) {
225
225
  const entry = queue.queues[workDir];
226
226
  const label = formatLabel(entry);
227
- const runningShort = `⏳ [${label}] Running...`;
228
- const runningFull = `⏳ [${label}] Running: ${escapeHtml(task.text)}`;
227
+ const runningShort = `⏳ <code>${label}</code>\nRunning...`;
228
+ const runningFull = `⏳ <code>${label}</code>\nRunning: ${escapeHtml(task.text)}`;
229
229
  let runningMsgId = null;
230
230
 
231
231
  if (task.telegramMessageId) {
@@ -244,7 +244,7 @@ async function startTask (workDir, task) {
244
244
  queue.markStarted(workDir, started.pid);
245
245
  } catch (err) {
246
246
  logger.error(`Failed to start task: ${err.message}`);
247
- poller.sendMessage(`❌ [${label}] Failed to start: ${escapeHtml(err.message)}`);
247
+ poller.sendMessage(`❌ <code>${label}</code>\nFailed to start: ${escapeHtml(err.message)}`);
248
248
  queue.onTaskComplete(workDir, `START_ERROR: ${err.message}`);
249
249
  }
250
250
  }
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.20",
4
+ "version": "1.1.21",
5
5
  "description": "Claude Code task-completion notifications: Telegram, desktop notifications (Windows/macOS/Linux), sound, and voice",
6
6
  "type": "module",
7
7
  "engines": {