claude-notification-plugin 1.1.96 → 1.1.97
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 +16 -19
- 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.97",
|
|
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
|
+
a8a48c155fceb62317866537f758bed0f6a7213b
|
package/listener/pty-runner.js
CHANGED
|
@@ -328,28 +328,25 @@ export class PtyRunner extends EventEmitter {
|
|
|
328
328
|
const inactivityMs = task.raw ? RAW_INACTIVITY_MS : this.timeout;
|
|
329
329
|
const markerPromise = this._waitForMarker(pendingId, inactivityMs, session);
|
|
330
330
|
|
|
331
|
-
// Send the task text to the PTY.
|
|
332
|
-
//
|
|
333
|
-
//
|
|
334
|
-
//
|
|
335
|
-
//
|
|
331
|
+
// Send the task text to the PTY. Bracketed paste mode (\x1b[200~...\x1b[201~)
|
|
332
|
+
// hangs claude under ConPTY, so we send raw text and submit with a CR.
|
|
333
|
+
// CRITICAL: write the text first, *then* the CR with a small delay — claude's
|
|
334
|
+
// Ink-based input handler intermittently swallows submit when the CR arrives
|
|
335
|
+
// in the same PTY write as the text. Separating them is reliable.
|
|
336
|
+
// Multiline: each non-final line ends with `\\\r` (claude treats `\` + Enter
|
|
337
|
+
// as a soft newline within the prompt), with inter-line delays so claude
|
|
338
|
+
// processes each one.
|
|
336
339
|
const lines = task.text.split(/\r?\n/);
|
|
337
340
|
const writeLines = async () => {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
for (let i = 0; i < lines.length; i++) {
|
|
342
|
-
if (i > 0) {
|
|
343
|
-
await new Promise(r => setTimeout(r, 300));
|
|
344
|
-
}
|
|
345
|
-
if (i < lines.length - 1) {
|
|
346
|
-
session.pty.write(`${lines[i]}\\\r`);
|
|
347
|
-
} else {
|
|
348
|
-
session.pty.write(`${lines[i]}\r`);
|
|
349
|
-
}
|
|
341
|
+
for (let i = 0; i < lines.length; i++) {
|
|
342
|
+
if (i > 0) {
|
|
343
|
+
await new Promise(r => setTimeout(r, 300));
|
|
350
344
|
}
|
|
351
|
-
|
|
352
|
-
|
|
345
|
+
const isLast = i === lines.length - 1;
|
|
346
|
+
session.pty.write(isLast ? lines[i] : `${lines[i]}\\`);
|
|
347
|
+
// Submit the line. For non-final lines a soft-newline CR; for the final
|
|
348
|
+
// (or only) line, a delay then the submit CR.
|
|
349
|
+
await new Promise(r => setTimeout(r, isLast ? 300 : 0));
|
|
353
350
|
session.pty.write('\r');
|
|
354
351
|
}
|
|
355
352
|
};
|
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.97",
|
|
5
5
|
"description": "Claude Code task-completion notifications: Telegram, desktop notifications (Windows/macOS/Linux), sound, and voice",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|