@rynx-ai/runtime 0.1.11-beta.34 → 0.1.11-beta.36

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.
@@ -25,6 +25,7 @@ const DEFAULT_COLS = 80;
25
25
  const DEFAULT_ROWS = 24;
26
26
  const DEFAULT_SCROLLBACK = 10_000;
27
27
  const SEND_KEYS_HEX_BYTES_PER_CALL = 1024;
28
+ const TMUX_SEND_TIMEOUT_MS = 10_000;
28
29
  const PANE_METADATA_FORMAT = [
29
30
  "#{cursor_x}",
30
31
  "#{cursor_y}",
@@ -36,6 +37,7 @@ const PANE_METADATA_FORMAT = [
36
37
  "#{mouse_sgr_flag}",
37
38
  "#{mouse_utf8_flag}",
38
39
  "#{keypad_cursor_flag}",
40
+ "#{bracket_paste_flag}",
39
41
  "#{pane_width}",
40
42
  "#{pane_height}",
41
43
  ].join(",");
@@ -286,12 +288,12 @@ function parsePaneMetadata(value) {
286
288
  const fields = value.toString("utf8").trim().split(",");
287
289
  if (fields.length < 4)
288
290
  return undefined;
289
- while (fields.length < 12)
291
+ while (fields.length < 13)
290
292
  fields.push("0");
291
293
  const cursorX = Number(fields[0]);
292
294
  const cursorY = Number(fields[1]);
293
- const paneWidth = Number(fields[10]);
294
- const paneHeight = Number(fields[11]);
295
+ const paneWidth = Number(fields[11]);
296
+ const paneHeight = Number(fields[12]);
295
297
  if (!Number.isSafeInteger(cursorX) ||
296
298
  !Number.isSafeInteger(cursorY) ||
297
299
  !Number.isSafeInteger(paneWidth) ||
@@ -310,6 +312,7 @@ function parsePaneMetadata(value) {
310
312
  mouseSgr: fields[7] === "1",
311
313
  mouseUtf8: fields[8] === "1",
312
314
  appCursorKeys: fields[9] === "1",
315
+ bracketPaste: fields[10] === "1",
313
316
  paneWidth,
314
317
  paneHeight,
315
318
  };
@@ -335,6 +338,8 @@ function captureSeedEnvelope(metadata) {
335
338
  suffix.push(Buffer.from("\x1b[?1006h", "binary"));
336
339
  if (metadata.appCursorKeys)
337
340
  suffix.push(Buffer.from("\x1b[?1h", "binary"));
341
+ if (metadata.bracketPaste)
342
+ suffix.push(Buffer.from("\x1b[?2004h", "binary"));
338
343
  }
339
344
  return { prefix: Buffer.concat(prefix), suffix: Buffer.concat(suffix) };
340
345
  }
@@ -611,7 +616,7 @@ export class TmuxTerminal {
611
616
  /** Type literal text into the pane (agent injection / co-drive from a
612
617
  * non-PTY caller). `-l` sends the text literally rather than as key names. */
613
618
  sendKeys(text) {
614
- execFileSync(this.tmuxBin, [...this.base(), "send-keys", "-c", "", "-t", TMUX_TARGET, "-l", "--", text], { env: this.env, stdio: "ignore" });
619
+ execFileSync(this.tmuxBin, [...this.base(), "send-keys", "-c", "", "-t", TMUX_TARGET, "-l", "--", text], { env: this.env, stdio: "ignore", timeout: TMUX_SEND_TIMEOUT_MS });
615
620
  }
616
621
  /**
617
622
  * The visible pane text (synchronous). Used by the claude-native injection
@@ -624,6 +629,7 @@ export class TmuxTerminal {
624
629
  const snapshot = execFileSync(this.tmuxBin, [...this.base(), "capture-pane", "-t", TMUX_TARGET, "-p"], {
625
630
  env: this.env,
626
631
  encoding: "utf8",
632
+ timeout: TMUX_SEND_TIMEOUT_MS,
627
633
  });
628
634
  this.lastPaneSnapshot = snapshot;
629
635
  return snapshot;
@@ -655,6 +661,7 @@ export class TmuxTerminal {
655
661
  execFileSync(this.tmuxBin, [...this.base(), "send-keys", "-c", "", "-t", TMUX_TARGET, ...keys], {
656
662
  env: this.env,
657
663
  stdio: "ignore",
664
+ timeout: TMUX_SEND_TIMEOUT_MS,
658
665
  });
659
666
  }
660
667
  /**
@@ -670,8 +677,9 @@ export class TmuxTerminal {
670
677
  env: this.env,
671
678
  input: text,
672
679
  stdio: ["pipe", "ignore", "ignore"],
680
+ timeout: TMUX_SEND_TIMEOUT_MS,
673
681
  });
674
- execFileSync(this.tmuxBin, [...this.base(), "paste-buffer", "-p", "-d", "-b", bufferName, "-t", TMUX_TARGET], { env: this.env, stdio: "ignore" });
682
+ execFileSync(this.tmuxBin, [...this.base(), "paste-buffer", "-p", "-d", "-b", bufferName, "-t", TMUX_TARGET], { env: this.env, stdio: "ignore", timeout: TMUX_SEND_TIMEOUT_MS });
675
683
  }
676
684
  execTmuxBuffer(args) {
677
685
  return new Promise((resolve) => {
@@ -735,7 +743,7 @@ export class TmuxTerminal {
735
743
  PANE_METADATA_FORMAT,
736
744
  ]) ?? Buffer.alloc(0));
737
745
  let spool = new SegmentedTerminalSpool();
738
- const captureArgs = ["capture-pane", "-e", "-p", "-t", TMUX_TARGET];
746
+ const captureArgs = ["capture-pane", "-e", "-p", "-J", "-t", TMUX_TARGET];
739
747
  if (metadata && !metadata.alternateOn)
740
748
  captureArgs.push("-S", "-");
741
749
  const envelope = captureSeedEnvelope(metadata);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rynx-ai/runtime",
3
- "version": "0.1.11-beta.34",
3
+ "version": "0.1.11-beta.36",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/rynx-ai/rynx.git",
@@ -26,7 +26,7 @@
26
26
  "dependencies": {
27
27
  "smol-toml": "1.7.1",
28
28
  "ws": "^8.21.0",
29
- "@rynx-ai/core": "0.1.11-beta.34"
29
+ "@rynx-ai/core": "0.1.11-beta.36"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/ws": "^8.18.1"