pty-manager 1.3.2 → 1.3.3
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/README.md +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/pty-worker.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -445,7 +445,7 @@ await session.selectMenuOption(2); // Sends Down, Down, Enter with 50ms delays
|
|
|
445
445
|
|
|
446
446
|
## Stall Detection & Task Completion
|
|
447
447
|
|
|
448
|
-
Content-based stall detection monitors sessions for output that stops changing. The content hash
|
|
448
|
+
Content-based stall detection monitors sessions for output that stops changing. The content hash strips the full buffer first, then slices the last 500 characters of the normalized text — this ensures identical visual content always produces the same hash regardless of how many raw escape sequences surround it. The normalization strips ANSI escape codes, TUI spinner characters, and countdown/duration text (e.g. `8m 17s` → constant) so that live timers and TUI redraws don't perpetually reset the stall timer. All detection work (ready, blocking prompt, login, exit, stall) runs in a deferred `setImmediate()` tick so that node-pty's synchronous data delivery cannot starve the event loop — timers and I/O callbacks always get a chance to run between data bursts. The output buffer is capped at 100 KB to prevent unbounded growth during long tasks.
|
|
449
449
|
|
|
450
450
|
When a stall is detected, the session first tries the adapter's `detectTaskComplete()` fast-path. If the adapter recognizes the output as a completed task (e.g. duration summary + idle prompt), it transitions directly to `ready` and emits `task_complete` — skipping the expensive LLM stall classifier entirely.
|
|
451
451
|
|
package/dist/index.js
CHANGED
|
@@ -450,9 +450,9 @@ var PTYSession = class _PTYSession extends import_events.EventEmitter {
|
|
|
450
450
|
this.clearStallTimer();
|
|
451
451
|
return;
|
|
452
452
|
}
|
|
453
|
-
const
|
|
454
|
-
const
|
|
455
|
-
const hash = this.simpleHash(
|
|
453
|
+
const stripped = this.stripAnsiForStall(this.outputBuffer).trim();
|
|
454
|
+
const tail = stripped.slice(-500);
|
|
455
|
+
const hash = this.simpleHash(tail);
|
|
456
456
|
if (hash === this._lastContentHash) {
|
|
457
457
|
return;
|
|
458
458
|
}
|