claude-notification-plugin 1.1.19 → 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.
- package/.claude-plugin/plugin.json +1 -1
- package/commit-sha +1 -1
- package/listener/listener.js +8 -8
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-notification-plugin",
|
|
3
|
-
"version": "1.1.
|
|
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
|
-
|
|
1
|
+
494fa90b0501d2ac36fbc1220a218028212f23aa
|
package/listener/listener.js
CHANGED
|
@@ -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 = `✅
|
|
141
|
-
const headerFull = `✅
|
|
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(`❌
|
|
179
|
+
const sentId = await poller.sendMessage(`❌ <code>${label}</code>\nError:${body}`, task.telegramMessageId);
|
|
180
180
|
if (!sentId && task.telegramMessageId) {
|
|
181
|
-
await poller.sendMessage(`❌
|
|
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 = `⏰
|
|
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 = `⏳
|
|
228
|
-
const runningFull = `⏳
|
|
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(`❌
|
|
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.
|
|
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": {
|