@volter/supercode-terminal 0.2.64 → 0.2.65

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.
Files changed (2) hide show
  1. package/index.mjs +7 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1723,9 +1723,15 @@ const COMPOSER_READY = Object.freeze({
1723
1723
  * and anchoring on column 0 instead would read a drawn-in prompt as absent.
1724
1724
  */
1725
1725
  function composerLine(screen, caret) {
1726
- return screen.split('\n').some((line) => caret.test(line.trim()));
1726
+ // Read as text: a capture keeps its escapes (the daemon's readiness wait reads one), and Grok draws its composer
1727
+ // line after a reset (`ESC[0m❯`), so a caret test on the raw line never matched and Grok never read as ready
1728
+ // (yuerans, 2026-10-06: `open --new grok --input` dropped its brief; mail to an idle Grok waited for ever).
1729
+ return screen.split('\n').some((line) => caret.test(line.replace(ANSI_SEQUENCE, '').trim()));
1727
1730
  }
1728
1731
 
1732
+ /** A terminal escape sequence: CSI (`ESC[…x`), OSC (`ESC]…BEL` or `ESC]…ESC\\`), or a two-character escape. */
1733
+ const ANSI_SEQUENCE = /\u001b\[[0-?]*[ -\/]*[@-~]|\u001b\][^\u0007\u001b]*(?:\u0007|\u001b\\)|\u001b[@-Z\\-_]/gu;
1734
+
1729
1735
  /**
1730
1736
  * Is the program of this kind showing its idle composer — ready to be given a
1731
1737
  * first message — on this captured screen?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-terminal",
3
- "version": "0.2.64",
3
+ "version": "0.2.65",
4
4
  "type": "module",
5
5
  "description": "Optional leak-safe terminal and tmux host adapter for Volter Harness frontends",
6
6
  "exports": {