ragent-cli 1.4.1 → 1.4.2

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/dist/index.js +21 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ var require_package = __commonJS({
31
31
  "package.json"(exports2, module2) {
32
32
  module2.exports = {
33
33
  name: "ragent-cli",
34
- version: "1.4.1",
34
+ version: "1.4.2",
35
35
  description: "CLI agent for rAgent Live \u2014 browser-first terminal control plane for AI coding agents",
36
36
  main: "dist/index.js",
37
37
  bin: {
@@ -1660,6 +1660,7 @@ var ConnectionManager = class {
1660
1660
 
1661
1661
  // src/control-dispatcher.ts
1662
1662
  var crypto2 = __toESM(require("crypto"));
1663
+ var import_child_process4 = require("child_process");
1663
1664
  var import_ws4 = __toESM(require("ws"));
1664
1665
 
1665
1666
  // src/service.ts
@@ -2277,10 +2278,28 @@ var ControlDispatcher = class {
2277
2278
  handleResize(cols, rows, sessionId) {
2278
2279
  if (!sessionId || sessionId.startsWith("pty:")) {
2279
2280
  this.shell.resize(cols, rows);
2281
+ } else if (sessionId.startsWith("tmux:")) {
2282
+ this.resizeTmuxPane(sessionId, cols, rows);
2280
2283
  } else if (sessionId.startsWith("screen:") || sessionId.startsWith("zellij:")) {
2281
2284
  this.streamer.resize(sessionId, cols, rows);
2282
2285
  }
2283
2286
  }
2287
+ /** Resize a tmux pane to match the viewer's terminal dimensions. */
2288
+ resizeTmuxPane(sessionId, cols, rows) {
2289
+ const paneTarget = sessionId.slice("tmux:".length);
2290
+ if (!paneTarget) return;
2291
+ const cleanEnv = { ...process.env };
2292
+ delete cleanEnv.TMUX;
2293
+ delete cleanEnv.TMUX_PANE;
2294
+ try {
2295
+ (0, import_child_process4.execFileSync)("tmux", ["resize-pane", "-t", paneTarget, "-x", String(cols), "-y", String(rows)], {
2296
+ env: cleanEnv,
2297
+ timeout: 5e3,
2298
+ stdio: "ignore"
2299
+ });
2300
+ } catch {
2301
+ }
2302
+ }
2284
2303
  /** Handle provision request from dashboard. */
2285
2304
  async handleProvision(payload) {
2286
2305
  const provReq = payload;
@@ -2344,8 +2363,7 @@ var ControlDispatcher = class {
2344
2363
  }
2345
2364
  tmuxArgs.push(fullCmd);
2346
2365
  try {
2347
- const { execFileSync: execFileSync3 } = await import("child_process");
2348
- execFileSync3("tmux", tmuxArgs, { stdio: "ignore" });
2366
+ (0, import_child_process4.execFileSync)("tmux", tmuxArgs, { stdio: "ignore" });
2349
2367
  console.log(`[rAgent] Started agent session "${sessionName}": ${cmd}`);
2350
2368
  } catch (error) {
2351
2369
  const message = error instanceof Error ? error.message : String(error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ragent-cli",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "CLI agent for rAgent Live — browser-first terminal control plane for AI coding agents",
5
5
  "main": "dist/index.js",
6
6
  "bin": {