claude-notification-plugin 1.1.42 → 1.1.43
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/pty-runner.js +27 -5
- 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.43",
|
|
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
|
+
b460aaa05a941c411fb010c938655a256ff5ad57
|
package/listener/pty-runner.js
CHANGED
|
@@ -233,15 +233,37 @@ export class PtyRunner extends EventEmitter {
|
|
|
233
233
|
// Set up marker wait + timeout
|
|
234
234
|
const markerPromise = this._waitForMarker(pendingId, this.timeout);
|
|
235
235
|
|
|
236
|
-
// Send the task text to the PTY
|
|
237
|
-
//
|
|
238
|
-
//
|
|
239
|
-
|
|
236
|
+
// Send the task text to the PTY.
|
|
237
|
+
// Bracketed paste mode (\x1b[200~...\x1b[201~) causes Claude to hang in ConPTY,
|
|
238
|
+
// so we send raw text. For multiline messages, use backslash + Enter as line
|
|
239
|
+
// continuation (Claude Code interprets \ + Enter as a newline within the prompt),
|
|
240
|
+
// with delays between lines so Claude can process each one.
|
|
241
|
+
const lines = task.text.split(/\r?\n/);
|
|
242
|
+
const writeLines = async () => {
|
|
243
|
+
if (lines.length === 1) {
|
|
244
|
+
session.pty.write(`${lines[0]}\r`);
|
|
245
|
+
} else {
|
|
246
|
+
for (let i = 0; i < lines.length; i++) {
|
|
247
|
+
if (i > 0) {
|
|
248
|
+
await new Promise(r => setTimeout(r, 300));
|
|
249
|
+
}
|
|
250
|
+
if (i < lines.length - 1) {
|
|
251
|
+
session.pty.write(`${lines[i]}\\\r`);
|
|
252
|
+
} else {
|
|
253
|
+
session.pty.write(`${lines[i]}\r`);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
// Extra Enter to submit the multiline prompt
|
|
257
|
+
await new Promise(r => setTimeout(r, 300));
|
|
258
|
+
session.pty.write('\r');
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
writeLines();
|
|
240
262
|
this.logger.info(`PTY task sent to ${workDir}: ${task.text.slice(0, 100)}`);
|
|
241
263
|
|
|
242
264
|
// Monitor PTY output for fatal errors that prevent task completion
|
|
243
265
|
const errorPatterns = [
|
|
244
|
-
{ pattern: 'auto mode temporarily unavailable', msg: 'Claude auto mode temporarily unavailable' },
|
|
266
|
+
{ pattern: 'auto mode temporarily unavailable', msg: 'Claude auto mode temporarily unavailable — retry later' },
|
|
245
267
|
{ pattern: 'Session expired', msg: 'Claude session expired' },
|
|
246
268
|
{ pattern: 'Authentication required', msg: 'Claude authentication required' },
|
|
247
269
|
];
|
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.43",
|
|
5
5
|
"description": "Claude Code task-completion notifications: Telegram, desktop notifications (Windows/macOS/Linux), sound, and voice",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|