claude-yes 1.226.0 → 1.226.1

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.
@@ -1,11 +1,11 @@
1
- import "./ts-DDzSxE-b.js";
1
+ import "./ts-BK5aWUB9.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-v_k2310x.js";
3
+ import "./versionChecker-C94S8J3o.js";
4
4
  import "./JsonlStore-Bm5Nj6v_.js";
5
5
  import "./globalPidIndex-CoNr7tS8.js";
6
6
  import "./pidStore-DCqpU_bI.js";
7
7
  import "./messageLog-Bb_Ie3Ck.js";
8
8
  import "./todoAutomation-fxtfT_44.js";
9
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BogqC0Wt.js";
9
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-yvanvhpr.js";
10
10
 
11
11
  export { SUPPORTED_CLIS };
@@ -1,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-DDzSxE-b.js";
1
+ import { t as CLIS_CONFIG } from "./ts-BK5aWUB9.js";
2
2
 
3
3
  //#region ts/SUPPORTED_CLIS.ts
4
4
  const SUPPORTED_CLIS = Object.keys(CLIS_CONFIG);
5
5
 
6
6
  //#endregion
7
7
  export { SUPPORTED_CLIS as t };
8
- //# sourceMappingURL=SUPPORTED_CLIS-BogqC0Wt.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-yvanvhpr.js.map
@@ -2,7 +2,7 @@ import "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CoNr7tS8.js";
3
3
  import "./messageLog-Bb_Ie3Ck.js";
4
4
  import "./configShared-nnIwDYY-.js";
5
- import { M as resolveOne } from "./subcommands-CJVKXGbm.js";
5
+ import { N as resolveOne } from "./subcommands-BwK28lWs.js";
6
6
  import "./e2e-D5jaSHyY.js";
7
7
  import "./webrtcLink-DknpJQ0y.js";
8
8
  import "./remotes-BtXom7Rp.js";
@@ -229,4 +229,4 @@ function transformEvent(rawEvent, agentId, forwarded) {
229
229
 
230
230
  //#endregion
231
231
  export { createScopedShare, listShares, revokeAllShares, revokeShare };
232
- //# sourceMappingURL=agentShare-BdJS13Ff.js.map
232
+ //# sourceMappingURL=agentShare-D0ilhmg3.js.map
@@ -2,11 +2,11 @@ import "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CoNr7tS8.js";
3
3
  import "./messageLog-Bb_Ie3Ck.js";
4
4
  import "./configShared-nnIwDYY-.js";
5
- import "./subcommands-CJVKXGbm.js";
5
+ import "./subcommands-BwK28lWs.js";
6
6
  import "./e2e-D5jaSHyY.js";
7
7
  import "./webrtcLink-DknpJQ0y.js";
8
8
  import "./remotes-BtXom7Rp.js";
9
9
  import "./callbackCore-CgnOT1Cp.js";
10
- import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-D3_-72ZI.js";
10
+ import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-DzMcHAKf.js";
11
11
 
12
12
  export { cmdCallback };
@@ -1,5 +1,5 @@
1
1
  import { t as agentYesHome } from "./agentYesHome-CtHb5b71.js";
2
- import { M as resolveOne } from "./subcommands-CJVKXGbm.js";
2
+ import { N as resolveOne } from "./subcommands-BwK28lWs.js";
3
3
  import { a as mintCapability, o as parseExpires } from "./callbackCore-CgnOT1Cp.js";
4
4
  import { randomBytes } from "node:crypto";
5
5
  import { mkdir, readFile, writeFile } from "node:fs/promises";
@@ -72,7 +72,7 @@ async function resolveBase(flag) {
72
72
  if (flag) return flag;
73
73
  if (process.env.AGENT_YES_CALLBACK_BASE) return process.env.AGENT_YES_CALLBACK_BASE;
74
74
  try {
75
- const { resolveLocalServeUrl } = await import("./serve-BzmFKLvZ.js");
75
+ const { resolveLocalServeUrl } = await import("./serve-CHxmfX04.js");
76
76
  const url = await resolveLocalServeUrl();
77
77
  if (url) return url;
78
78
  } catch {}
@@ -187,4 +187,4 @@ async function cmdCallback(rest) {
187
187
 
188
188
  //#endregion
189
189
  export { loadOrCreateCallbackSecret as i, isCallbackRevoked as n, loadCallbackSecretReadOnly as r, cmdCallback as t };
190
- //# sourceMappingURL=callback-D3_-72ZI.js.map
190
+ //# sourceMappingURL=callback-DzMcHAKf.js.map
package/dist/cli.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env bun
2
2
  import { t as invokedCliName } from "./invokedCli-uqM2YYA7.js";
3
3
  import { n as logger } from "./logger-CDIsZ-Pp.js";
4
- import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-v_k2310x.js";
5
- import { n as getRustBinary } from "./rustBinary-fbAYklNW.js";
4
+ import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-C94S8J3o.js";
5
+ import { n as getRustBinary } from "./rustBinary-D0pxKVvZ.js";
6
6
  import { argv } from "process";
7
7
  import { spawn } from "child_process";
8
8
  import ms from "ms";
@@ -285,7 +285,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
285
285
  const rawArg = process.argv[2];
286
286
  const managerCommands = !invokedCliName(process.argv);
287
287
  const isHelpFlag = rawArg === "-h" || rawArg === "--help";
288
- const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-eGLvj9ik.js");
288
+ const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-CivgxrQw.js");
289
289
  if (isHelpFlag && process.argv.length === 3) {
290
290
  await cmdHelp(managerCommands);
291
291
  process.exit(0);
@@ -331,7 +331,7 @@ if (config.useRust) {
331
331
  }
332
332
  }
333
333
  if (rustBinary) {
334
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BSL5theP.js");
334
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-DJ7rYNFW.js");
335
335
  const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
336
336
  if (config.verbose) {
337
337
  console.log(`[rust] Using binary: ${rustBinary}`);
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { i as AgentContext, n as agentYes, o as removeControlCharacters, r as config, t as CLIS_CONFIG } from "./ts-DDzSxE-b.js";
1
+ import { i as AgentContext, n as agentYes, o as removeControlCharacters, r as config, t as CLIS_CONFIG } from "./ts-BK5aWUB9.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-v_k2310x.js";
3
+ import "./versionChecker-C94S8J3o.js";
4
4
  import "./JsonlStore-Bm5Nj6v_.js";
5
5
  import "./globalPidIndex-CoNr7tS8.js";
6
6
  import "./pidStore-DCqpU_bI.js";
@@ -2,7 +2,7 @@ import { n as logger } from "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CoNr7tS8.js";
3
3
  import "./messageLog-Bb_Ie3Ck.js";
4
4
  import "./configShared-nnIwDYY-.js";
5
- import { $ as daemonLockOwnerPath, G as gcInboxes, J as listInboxParents, K as hostId, Q as daemonLockDir, S as listRecords, W as appendEvent, X as readInbox, Y as liveWatchers, Z as shouldStealLock, _ as isPidAlive, c as deriveLiveState, et as notifyDir, k as renderLogTailLines } from "./subcommands-CJVKXGbm.js";
5
+ import { $ as daemonLockDir, A as renderLogTailLines, G as appendEvent, K as gcInboxes, Q as shouldStealLock, S as listRecords, X as liveWatchers, Y as listInboxParents, Z as readInbox, _ as isPidAlive, c as deriveLiveState, et as daemonLockOwnerPath, q as hostId, tt as notifyDir } from "./subcommands-BwK28lWs.js";
6
6
  import "./e2e-D5jaSHyY.js";
7
7
  import "./webrtcLink-DknpJQ0y.js";
8
8
  import "./remotes-BtXom7Rp.js";
@@ -589,4 +589,4 @@ async function ensureDaemon() {
589
589
 
590
590
  //#endregion
591
591
  export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
592
- //# sourceMappingURL=notifyDaemon-CNXwZl_A.js.map
592
+ //# sourceMappingURL=notifyDaemon-Btw4XAxx.js.map
@@ -1,4 +1,4 @@
1
- import { r as getInstalledPackage } from "./versionChecker-v_k2310x.js";
1
+ import { r as getInstalledPackage } from "./versionChecker-C94S8J3o.js";
2
2
  import { execFileSync } from "child_process";
3
3
  import { existsSync, mkdirSync, unlinkSync } from "fs";
4
4
  import { chmod, copyFile } from "fs/promises";
@@ -225,4 +225,4 @@ async function getRustBinary(options = {}) {
225
225
 
226
226
  //#endregion
227
227
  export { getRustBinary as n, findSpawnHiddenLauncher as t };
228
- //# sourceMappingURL=rustBinary-fbAYklNW.js.map
228
+ //# sourceMappingURL=rustBinary-D0pxKVvZ.js.map
@@ -1,12 +1,12 @@
1
- import "./ts-DDzSxE-b.js";
1
+ import "./ts-BK5aWUB9.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-v_k2310x.js";
3
+ import "./versionChecker-C94S8J3o.js";
4
4
  import "./JsonlStore-Bm5Nj6v_.js";
5
5
  import "./globalPidIndex-CoNr7tS8.js";
6
6
  import "./pidStore-DCqpU_bI.js";
7
7
  import "./messageLog-Bb_Ie3Ck.js";
8
8
  import "./todoAutomation-fxtfT_44.js";
9
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BogqC0Wt.js";
9
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-yvanvhpr.js";
10
10
  import { d as resolveSpawnCwd } from "./workspaceConfig-BRl-GwSN.js";
11
11
  import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-CR0NwnnO.js";
12
12
  import { createHash } from "node:crypto";
@@ -153,4 +153,4 @@ async function cmdSchedule(rest) {
153
153
 
154
154
  //#endregion
155
155
  export { cmdSchedule };
156
- //# sourceMappingURL=schedule-Bp6D3bKK.js.map
156
+ //# sourceMappingURL=schedule-W7qoWSxY.js.map
@@ -1,7 +1,7 @@
1
- import { a as CLAUDE_SESSION_PIN_ENV } from "./ts-DDzSxE-b.js";
1
+ import { a as CLAUDE_SESSION_PIN_ENV } from "./ts-BK5aWUB9.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import { r as getInstalledPackage } from "./versionChecker-v_k2310x.js";
4
- import { t as findSpawnHiddenLauncher } from "./rustBinary-fbAYklNW.js";
3
+ import { r as getInstalledPackage } from "./versionChecker-C94S8J3o.js";
4
+ import { t as findSpawnHiddenLauncher } from "./rustBinary-D0pxKVvZ.js";
5
5
  import { t as agentYesHome$1 } from "./agentYesHome-CtHb5b71.js";
6
6
  import "./JsonlStore-Bm5Nj6v_.js";
7
7
  import { a as updateGlobalPidStatus } from "./globalPidIndex-CoNr7tS8.js";
@@ -10,13 +10,13 @@ import { r as recordInbox } from "./messageLog-Bb_Ie3Ck.js";
10
10
  import { t as pgidForWrapper } from "./reaper-BNKvujYy.js";
11
11
  import "./todoAutomation-fxtfT_44.js";
12
12
  import "./configShared-nnIwDYY-.js";
13
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BogqC0Wt.js";
14
- import { A as renderRawLog, D as recentMessageEdges, E as readPtysize, L as snapshotStatus, M as resolveOne, O as recentReadEdges, S as listRecords, T as readNotes, U as writeToIpc, b as isUserTyping, f as extractNeedsInput, j as renderRawLogLines, k as renderLogTailLines, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, q as isTransientLockMkdirError, tt as TYPING_BADGE, u as extractBadges } from "./subcommands-CJVKXGbm.js";
13
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-yvanvhpr.js";
14
+ import { A as renderLogTailLines, D as readPtysize, E as readNotes, J as isTransientLockMkdirError, M as renderRawLogLines, N as resolveOne, O as recentMessageEdges, R as snapshotStatus, S as listRecords, W as writeToIpc, b as isUserTyping, f as extractNeedsInput, j as renderRawLog, k as recentReadEdges, l as deriveLiveStatus, nt as TYPING_BADGE, o as controlCodeFromName, p as extractTaskCounts, u as extractBadges } from "./subcommands-BwK28lWs.js";
15
15
  import "./e2e-D5jaSHyY.js";
16
16
  import "./webrtcLink-DknpJQ0y.js";
17
17
  import "./remotes-BtXom7Rp.js";
18
18
  import { i as frameVisitorMessage, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-CgnOT1Cp.js";
19
- import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-D3_-72ZI.js";
19
+ import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-DzMcHAKf.js";
20
20
  import { a as getSpawnHook, c as hasProvisionHook, d as resolveSpawnCwd, i as getProvisionRoot, l as hasSpawnHook, r as getProvisionHook, u as isProvisionAllowed } from "./workspaceConfig-BRl-GwSN.js";
21
21
  import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-CR0NwnnO.js";
22
22
  import { r as spawnRejectionReason } from "./spawnGate-ChYCj6Dm.js";
@@ -1992,7 +1992,7 @@ Options:
1992
1992
  }
1993
1993
  });
1994
1994
  if (req.method === "GET" && p === "/api/ws") {
1995
- const ws = await import("./ws-BOXpvyW7.js");
1995
+ const ws = await import("./ws-DBKujAad.js");
1996
1996
  try {
1997
1997
  await ws.loadProvision();
1998
1998
  } catch (e) {
@@ -2012,7 +2012,7 @@ Options:
2012
2012
  if (req.method === "GET" && p === "/api/ws/status") {
2013
2013
  const dirRaw = url.searchParams.get("path");
2014
2014
  if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
2015
- const ws = await import("./ws-BOXpvyW7.js");
2015
+ const ws = await import("./ws-DBKujAad.js");
2016
2016
  let prov;
2017
2017
  try {
2018
2018
  prov = await ws.loadProvision();
@@ -2601,7 +2601,7 @@ Options:
2601
2601
  const perm = body.perm ?? "r";
2602
2602
  if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
2603
2603
  try {
2604
- const { createScopedShare } = await import("./agentShare-BdJS13Ff.js");
2604
+ const { createScopedShare } = await import("./agentShare-D0ilhmg3.js");
2605
2605
  const share = await createScopedShare({
2606
2606
  agent: body.agent,
2607
2607
  perm,
@@ -2616,12 +2616,12 @@ Options:
2616
2616
  }
2617
2617
  }
2618
2618
  if (req.method === "GET" && p === "/api/shares") {
2619
- const { listShares } = await import("./agentShare-BdJS13Ff.js");
2619
+ const { listShares } = await import("./agentShare-D0ilhmg3.js");
2620
2620
  return Response.json(listShares());
2621
2621
  }
2622
2622
  const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
2623
2623
  if (req.method === "DELETE" && revokeM) {
2624
- const { revokeShare } = await import("./agentShare-BdJS13Ff.js");
2624
+ const { revokeShare } = await import("./agentShare-D0ilhmg3.js");
2625
2625
  const ok = revokeShare(decodeURIComponent(revokeM[1]));
2626
2626
  return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
2627
2627
  }
@@ -2923,7 +2923,7 @@ Options:
2923
2923
  const shutdown = (resolve) => {
2924
2924
  if (heartbeat) clearInterval(heartbeat);
2925
2925
  closeShare?.();
2926
- import("./agentShare-BdJS13Ff.js").then((m) => m.revokeAllShares()).catch(() => {});
2926
+ import("./agentShare-D0ilhmg3.js").then((m) => m.revokeAllShares()).catch(() => {});
2927
2927
  server?.stop();
2928
2928
  Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
2929
2929
  };
@@ -2936,4 +2936,4 @@ Options:
2936
2936
 
2937
2937
  //#endregion
2938
2938
  export { cmdServe, resolveLocalServeUrl };
2939
- //# sourceMappingURL=serve-BzmFKLvZ.js.map
2939
+ //# sourceMappingURL=serve-CHxmfX04.js.map
@@ -32,7 +32,7 @@ async function cmdSetup(rest) {
32
32
  if (!existsSync(abs)) process.stderr.write(` note: that directory doesn't exist yet — create it, or agents spawned there will fail\n`);
33
33
  if (noShare) return 0;
34
34
  process.stdout.write(`\nsharing this machine to agent-yes.com…\n`);
35
- const { cmdServe } = await import("./serve-BzmFKLvZ.js");
35
+ const { cmdServe } = await import("./serve-CHxmfX04.js");
36
36
  return cmdServe([
37
37
  "install",
38
38
  "--share",
@@ -42,4 +42,4 @@ async function cmdSetup(rest) {
42
42
 
43
43
  //#endregion
44
44
  export { cmdSetup };
45
- //# sourceMappingURL=setup-BsnJp9v9.js.map
45
+ //# sourceMappingURL=setup-CgOw-gXQ.js.map
@@ -1243,19 +1243,19 @@ async function runSubcommand(argv) {
1243
1243
  return runTodoSubcommand(rest);
1244
1244
  }
1245
1245
  case "serve": {
1246
- const { cmdServe } = await import("./serve-BzmFKLvZ.js");
1246
+ const { cmdServe } = await import("./serve-CHxmfX04.js");
1247
1247
  return cmdServe(rest);
1248
1248
  }
1249
1249
  case "setup": {
1250
- const { cmdSetup } = await import("./setup-BsnJp9v9.js");
1250
+ const { cmdSetup } = await import("./setup-CgOw-gXQ.js");
1251
1251
  return cmdSetup(rest);
1252
1252
  }
1253
1253
  case "ws": {
1254
- const { cmdWs } = await import("./ws-BOXpvyW7.js");
1254
+ const { cmdWs } = await import("./ws-DBKujAad.js");
1255
1255
  return cmdWs(rest);
1256
1256
  }
1257
1257
  case "schedule": {
1258
- const { cmdSchedule } = await import("./schedule-Bp6D3bKK.js");
1258
+ const { cmdSchedule } = await import("./schedule-W7qoWSxY.js");
1259
1259
  return cmdSchedule(rest);
1260
1260
  }
1261
1261
  case "remote": {
@@ -1267,7 +1267,7 @@ async function runSubcommand(argv) {
1267
1267
  return cmdExpose(rest);
1268
1268
  }
1269
1269
  case "callback": {
1270
- const { cmdCallback } = await import("./callback-CbWIguiZ.js");
1270
+ const { cmdCallback } = await import("./callback-DHu2sibx.js");
1271
1271
  return cmdCallback(rest);
1272
1272
  }
1273
1273
  case "reap":
@@ -2286,7 +2286,7 @@ async function cmdRead(rest, { mode }) {
2286
2286
  }
2287
2287
  if (!stats.isFile()) throw new Error(`pid ${record.pid}: log path is not a file: ${logPath}`);
2288
2288
  const buf = await readFile(logPath);
2289
- const size = await readPtysize(record.pid);
2289
+ const size = await readAgentPtysize(record);
2290
2290
  const noteLabel = (await readNotes()).get(record.pid);
2291
2291
  const header = noteLabel ? `[pid ${record.pid} ${shortenPath(record.cwd)} * ${noteLabel}]` : `[pid ${record.pid} ${shortenPath(record.cwd)}]`;
2292
2292
  if (follow) {
@@ -2504,6 +2504,21 @@ async function readPtysize(pid) {
2504
2504
  return null;
2505
2505
  }
2506
2506
  /**
2507
+ * An agent's real PTY geometry for log rendering, robust to a writer/reader pid
2508
+ * mismatch. The Rust runtime keys the ptysize sidecar by the PTY child pid
2509
+ * (= record.pid), so that lookup hits directly. But the TS runtime writes it
2510
+ * under its wrapper's process.pid (= record.wrapper_pid; see writeCurrentPtysize
2511
+ * in ts/index.ts), NOT the child — so a plain readPtysize(record.pid) misses for
2512
+ * TS-launched agents and the log reflows at the default 200-col width. Fall back
2513
+ * to wrapper_pid to cover that path. Returns null when neither has a sidecar.
2514
+ */
2515
+ async function readAgentPtysize(record) {
2516
+ const own = await readPtysize(record.pid);
2517
+ if (own) return own;
2518
+ if (record.wrapper_pid) return readPtysize(record.wrapper_pid);
2519
+ return null;
2520
+ }
2521
+ /**
2507
2522
  * Feed the raw PTY bytes through @xterm/headless and emit plain text.
2508
2523
  * Same approach as koho's renderTerminalBuffer + agent-yes's XtermProxy.
2509
2524
  */
@@ -2700,7 +2715,7 @@ function cliDefaults() {
2700
2715
  * null on any read/render error or an empty log. Shared by the needs_input and
2701
2716
  * stuck classifiers so they don't each re-implement the tail read.
2702
2717
  */
2703
- async function renderLogTailLines(logPath, n = 40) {
2718
+ async function renderLogTailLines(logPath, n = 40, geom) {
2704
2719
  const TAIL_BYTES = 32 * 1024;
2705
2720
  let buf;
2706
2721
  try {
@@ -2725,7 +2740,9 @@ async function renderLogTailLines(logPath, n = 40) {
2725
2740
  try {
2726
2741
  return (await renderRawLog(buf, {
2727
2742
  mode: "tail",
2728
- n
2743
+ n,
2744
+ cols: geom?.cols,
2745
+ rows: geom?.rows
2729
2746
  })).split("\n");
2730
2747
  } catch {
2731
2748
  return null;
@@ -3109,7 +3126,8 @@ async function cmdSend(rest) {
3109
3126
  });
3110
3127
  if (!confirmed) process.stderr.write(`\nwarning: couldn't confirm the CLI acted on it after ${SEND_SUBMIT_MAX_RETRIES + 1} attempt(s) — it may still be sitting unsubmitted in the prompt. Last screen:\n` + lastScreen.slice(-8).map((l) => ` ${l}`).join("\n") + "\n");
3111
3128
  if (record.log_file) {
3112
- const tail = await renderLogTailLines(record.log_file, 10) ?? [];
3129
+ const geom = await readAgentPtysize(record) ?? void 0;
3130
+ const tail = await renderLogTailLines(record.log_file, 10, geom) ?? [];
3113
3131
  let end = tail.length;
3114
3132
  while (end > 0 && tail[end - 1].trim() === "") end--;
3115
3133
  const trimmed = tail.slice(0, end);
@@ -4287,7 +4305,7 @@ async function cmdNotify(rest) {
4287
4305
  }
4288
4306
  const ensure = async () => {
4289
4307
  if (!argv["ensure-daemon"]) return;
4290
- const { ensureDaemon } = await import("./notifyDaemon-CNXwZl_A.js");
4308
+ const { ensureDaemon } = await import("./notifyDaemon-Btw4XAxx.js");
4291
4309
  await ensureDaemon().catch(() => null);
4292
4310
  };
4293
4311
  await heartbeatWatcher(parent, selfStartedAt);
@@ -4361,7 +4379,7 @@ async function cmdNotifyCursor(args) {
4361
4379
  }
4362
4380
  async function cmdNotifyd(rest) {
4363
4381
  const sub = rest[0] ?? "status";
4364
- const daemon = await import("./notifyDaemon-CNXwZl_A.js");
4382
+ const daemon = await import("./notifyDaemon-Btw4XAxx.js");
4365
4383
  switch (sub) {
4366
4384
  case "run": return daemon.runDaemon();
4367
4385
  case "once": return daemon.runDaemon({ once: true });
@@ -4387,5 +4405,5 @@ async function cmdNotifyd(rest) {
4387
4405
  }
4388
4406
 
4389
4407
  //#endregion
4390
- export { daemonLockOwnerPath as $, renderRawLog as A, submitAndConfirm as B, matchKeyword as C, recentMessageEdges as D, readPtysize as E, restartHintLines as F, gcInboxes as G, writeKeysPaced as H, runSubcommand as I, listInboxParents as J, hostId as K, snapshotStatus as L, resolveOne as M, resolveReadWindow as N, recentReadEdges as O, resolveResumeArgs as P, daemonLockDir as Q, stdinActivityPath as R, listRecords as S, readNotes as T, writeToIpc as U, waitForLogQuiet as V, appendEvent as W, readInbox as X, liveWatchers as Y, shouldStealLock as Z, isPidAlive as _, cmdHelp as a, isUserTyping as b, deriveLiveState as c, extractMenu as d, notifyDir as et, extractNeedsInput as f, isExitRequest as g, isAgentStuck as h, backoffWhileTyping as i, renderRawLogLines as j, renderLogTailLines as k, deriveLiveStatus as l, finalizedLines as m, READ_PAGE_DEFAULT as n, controlCodeFromName as o, extractTaskCounts as p, isTransientLockMkdirError as q, TYPING_WINDOW_MS as r, cursorAbs as s, GRACEFUL_EXIT_COMMANDS as t, TYPING_BADGE as tt, extractBadges as u, isSlashCommand as v, menuSelectKeys as w, lastStdinAt as x, isSubcommand as y, stopTipForCli as z };
4391
- //# sourceMappingURL=subcommands-CJVKXGbm.js.map
4408
+ export { daemonLockDir as $, renderLogTailLines as A, stopTipForCli as B, matchKeyword as C, readPtysize as D, readNotes as E, resolveResumeArgs as F, appendEvent as G, waitForLogQuiet as H, restartHintLines as I, isTransientLockMkdirError as J, gcInboxes as K, runSubcommand as L, renderRawLogLines as M, resolveOne as N, recentMessageEdges as O, resolveReadWindow as P, shouldStealLock as Q, snapshotStatus as R, listRecords as S, readAgentPtysize as T, writeKeysPaced as U, submitAndConfirm as V, writeToIpc as W, liveWatchers as X, listInboxParents as Y, readInbox as Z, isPidAlive as _, cmdHelp as a, isUserTyping as b, deriveLiveState as c, extractMenu as d, daemonLockOwnerPath as et, extractNeedsInput as f, isExitRequest as g, isAgentStuck as h, backoffWhileTyping as i, renderRawLog as j, recentReadEdges as k, deriveLiveStatus as l, finalizedLines as m, READ_PAGE_DEFAULT as n, TYPING_BADGE as nt, controlCodeFromName as o, extractTaskCounts as p, hostId as q, TYPING_WINDOW_MS as r, cursorAbs as s, GRACEFUL_EXIT_COMMANDS as t, notifyDir as tt, extractBadges as u, isSlashCommand as v, menuSelectKeys as w, lastStdinAt as x, isSubcommand as y, stdinActivityPath as z };
4409
+ //# sourceMappingURL=subcommands-BwK28lWs.js.map
@@ -0,0 +1,10 @@
1
+ import "./logger-CDIsZ-Pp.js";
2
+ import "./globalPidIndex-CoNr7tS8.js";
3
+ import "./messageLog-Bb_Ie3Ck.js";
4
+ import "./configShared-nnIwDYY-.js";
5
+ import { A as renderLogTailLines, B as stopTipForCli, C as matchKeyword, D as readPtysize, E as readNotes, F as resolveResumeArgs, H as waitForLogQuiet, I as restartHintLines, L as runSubcommand, M as renderRawLogLines, N as resolveOne, O as recentMessageEdges, P as resolveReadWindow, R as snapshotStatus, S as listRecords, T as readAgentPtysize, U as writeKeysPaced, V as submitAndConfirm, W as writeToIpc, _ as isPidAlive, a as cmdHelp, b as isUserTyping, c as deriveLiveState, d as extractMenu, f as extractNeedsInput, g as isExitRequest, h as isAgentStuck, i as backoffWhileTyping, j as renderRawLog, k as recentReadEdges, l as deriveLiveStatus, m as finalizedLines, n as READ_PAGE_DEFAULT, o as controlCodeFromName, p as extractTaskCounts, r as TYPING_WINDOW_MS, s as cursorAbs, t as GRACEFUL_EXIT_COMMANDS, u as extractBadges, v as isSlashCommand, w as menuSelectKeys, x as lastStdinAt, y as isSubcommand, z as stdinActivityPath } from "./subcommands-BwK28lWs.js";
6
+ import "./e2e-D5jaSHyY.js";
7
+ import "./webrtcLink-DknpJQ0y.js";
8
+ import "./remotes-BtXom7Rp.js";
9
+
10
+ export { cmdHelp, isSubcommand, runSubcommand };
@@ -1,5 +1,5 @@
1
1
  import { n as logger, t as addTransport } from "./logger-CDIsZ-Pp.js";
2
- import { r as getInstalledPackage } from "./versionChecker-v_k2310x.js";
2
+ import { r as getInstalledPackage } from "./versionChecker-C94S8J3o.js";
3
3
  import { t as agentYesHome } from "./agentYesHome-CtHb5b71.js";
4
4
  import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-CNMl13dC.js";
5
5
  import { i as readGlobalPids } from "./globalPidIndex-CoNr7tS8.js";
@@ -1919,4 +1919,4 @@ function sleep(ms) {
1919
1919
 
1920
1920
  //#endregion
1921
1921
  export { CLAUDE_SESSION_PIN_ENV as a, AgentContext as i, agentYes as n, removeControlCharacters as o, config as r, CLIS_CONFIG as t };
1922
- //# sourceMappingURL=ts-DDzSxE-b.js.map
1922
+ //# sourceMappingURL=ts-BK5aWUB9.js.map
@@ -7,7 +7,7 @@ import { fileURLToPath } from "url";
7
7
 
8
8
  //#region package.json
9
9
  var name = "claude-yes";
10
- var version = "1.226.0";
10
+ var version = "1.226.1";
11
11
 
12
12
  //#endregion
13
13
  //#region ts/versionChecker.ts
@@ -215,4 +215,4 @@ async function displayVersion() {
215
215
 
216
216
  //#endregion
217
217
  export { versionString as i, displayVersion as n, getInstalledPackage as r, checkAndAutoUpdate as t };
218
- //# sourceMappingURL=versionChecker-v_k2310x.js.map
218
+ //# sourceMappingURL=versionChecker-C94S8J3o.js.map
@@ -2,7 +2,7 @@ import "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CoNr7tS8.js";
3
3
  import "./messageLog-Bb_Ie3Ck.js";
4
4
  import "./configShared-nnIwDYY-.js";
5
- import { S as listRecords } from "./subcommands-CJVKXGbm.js";
5
+ import { S as listRecords } from "./subcommands-BwK28lWs.js";
6
6
  import "./e2e-D5jaSHyY.js";
7
7
  import "./webrtcLink-DknpJQ0y.js";
8
8
  import "./remotes-BtXom7Rp.js";
@@ -418,4 +418,4 @@ async function cmdWs(args) {
418
418
 
419
419
  //#endregion
420
420
  export { WS_JSON_SCHEMA, cmdWs, collectWorkspaces, isPathInside, loadProvision, workspaceStatus };
421
- //# sourceMappingURL=ws-BOXpvyW7.js.map
421
+ //# sourceMappingURL=ws-DBKujAad.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-yes",
3
- "version": "1.226.0",
3
+ "version": "1.226.1",
4
4
  "description": "A wrapper tool that automates interactions with various AI CLI tools by automatically handling common prompts and responses.",
5
5
  "keywords": [
6
6
  "ai",
@@ -270,6 +270,47 @@ describe("subcommands.GRACEFUL_EXIT_COMMANDS", () => {
270
270
  });
271
271
  });
272
272
 
273
+ describe("subcommands.readAgentPtysize (writer/reader pid fallback)", () => {
274
+ const rec = (pid: number, wrapper_pid: number | null) =>
275
+ ({
276
+ pid,
277
+ wrapper_pid,
278
+ cli: "claude",
279
+ prompt: null,
280
+ cwd: "/x",
281
+ log_file: null,
282
+ status: "active" as const,
283
+ exit_code: null,
284
+ exit_reason: null,
285
+ started_at: 0,
286
+ }) as any;
287
+
288
+ async function writeSidecar(pid: number, cols: number, rows: number) {
289
+ const dir = path.join(testHome, ".agent-yes", "ptysize");
290
+ await mkdir(dir, { recursive: true });
291
+ await writeFile(path.join(dir, String(pid)), `${cols} ${rows}\n`);
292
+ }
293
+
294
+ it("reads geometry keyed by the agent's own pid (Rust runtime)", async () => {
295
+ const { readAgentPtysize } = await loadModule();
296
+ await writeSidecar(500, 120, 40);
297
+ expect(await readAgentPtysize(rec(500, 499))).toEqual({ cols: 120, rows: 40 });
298
+ });
299
+
300
+ it("falls back to wrapper_pid when the child pid has no sidecar (TS runtime)", async () => {
301
+ const { readAgentPtysize } = await loadModule();
302
+ // Only the wrapper pid's sidecar exists — mirrors ts/index.ts writing under process.pid
303
+ await writeSidecar(499, 200, 50);
304
+ expect(await readAgentPtysize(rec(500, 499))).toEqual({ cols: 200, rows: 50 });
305
+ });
306
+
307
+ it("returns null when neither pid has a sidecar", async () => {
308
+ const { readAgentPtysize } = await loadModule();
309
+ expect(await readAgentPtysize(rec(500, 499))).toBeNull();
310
+ expect(await readAgentPtysize(rec(500, null))).toBeNull();
311
+ });
312
+ });
313
+
273
314
  describe("subcommands.matchKeyword", () => {
274
315
  const baseRecord = {
275
316
  pid: 1234,
package/ts/subcommands.ts CHANGED
@@ -2025,7 +2025,7 @@ async function cmdRead(rest: string[], { mode }: ReadOpts): Promise<number> {
2025
2025
  }
2026
2026
 
2027
2027
  const buf = await readFile(logPath);
2028
- const size = await readPtysize(record.pid);
2028
+ const size = await readAgentPtysize(record);
2029
2029
  const notes = await readNotes();
2030
2030
  const noteLabel = notes.get(record.pid);
2031
2031
  const header = noteLabel
@@ -2310,6 +2310,24 @@ export async function readPtysize(pid: number): Promise<{ cols: number; rows: nu
2310
2310
  return null;
2311
2311
  }
2312
2312
 
2313
+ /**
2314
+ * An agent's real PTY geometry for log rendering, robust to a writer/reader pid
2315
+ * mismatch. The Rust runtime keys the ptysize sidecar by the PTY child pid
2316
+ * (= record.pid), so that lookup hits directly. But the TS runtime writes it
2317
+ * under its wrapper's process.pid (= record.wrapper_pid; see writeCurrentPtysize
2318
+ * in ts/index.ts), NOT the child — so a plain readPtysize(record.pid) misses for
2319
+ * TS-launched agents and the log reflows at the default 200-col width. Fall back
2320
+ * to wrapper_pid to cover that path. Returns null when neither has a sidecar.
2321
+ */
2322
+ export async function readAgentPtysize(
2323
+ record: GlobalPidRecord,
2324
+ ): Promise<{ cols: number; rows: number } | null> {
2325
+ const own = await readPtysize(record.pid);
2326
+ if (own) return own;
2327
+ if (record.wrapper_pid) return readPtysize(record.wrapper_pid);
2328
+ return null;
2329
+ }
2330
+
2313
2331
  /**
2314
2332
  * Feed the raw PTY bytes through @xterm/headless and emit plain text.
2315
2333
  * Same approach as koho's renderTerminalBuffer + agent-yes's XtermProxy.
@@ -2530,7 +2548,11 @@ function cliDefaults(): Promise<Record<string, AgentCliConfig>> {
2530
2548
  * null on any read/render error or an empty log. Shared by the needs_input and
2531
2549
  * stuck classifiers so they don't each re-implement the tail read.
2532
2550
  */
2533
- export async function renderLogTailLines(logPath: string, n = 40): Promise<string[] | null> {
2551
+ export async function renderLogTailLines(
2552
+ logPath: string,
2553
+ n = 40,
2554
+ geom?: RenderGeom,
2555
+ ): Promise<string[] | null> {
2534
2556
  const TAIL_BYTES = 32 * 1024;
2535
2557
  let buf: Uint8Array;
2536
2558
  try {
@@ -2553,7 +2575,13 @@ export async function renderLogTailLines(logPath: string, n = 40): Promise<strin
2553
2575
  return null;
2554
2576
  }
2555
2577
  try {
2556
- return (await renderRawLog(buf, { mode: "tail", n })).split("\n");
2578
+ // Render at the agent's REAL PTY geometry when provided — the raw log is full
2579
+ // of absolute cursor-positioning, so replaying at the wrong width reflows the
2580
+ // TUI into garbage (chars land in the wrong columns). Callers with a pid pass
2581
+ // readPtysize(pid); without it we fall back to the default width.
2582
+ return (await renderRawLog(buf, { mode: "tail", n, cols: geom?.cols, rows: geom?.rows })).split(
2583
+ "\n",
2584
+ );
2557
2585
  } catch {
2558
2586
  return null;
2559
2587
  }
@@ -3205,7 +3233,8 @@ async function cmdSend(rest: string[]): Promise<number> {
3205
3233
  // Rendered fresh from the log after the settle/confirm wait above, so it
3206
3234
  // reflects the post-submit state. Best-effort: a missing/empty log just skips.
3207
3235
  if (record.log_file) {
3208
- const tail = (await renderLogTailLines(record.log_file, 10)) ?? [];
3236
+ const geom = (await readAgentPtysize(record)) ?? undefined;
3237
+ const tail = (await renderLogTailLines(record.log_file, 10, geom)) ?? [];
3209
3238
  let end = tail.length;
3210
3239
  while (end > 0 && tail[end - 1]!.trim() === "") end--; // drop trailing blanks
3211
3240
  const trimmed = tail.slice(0, end);
@@ -1,10 +0,0 @@
1
- import "./logger-CDIsZ-Pp.js";
2
- import "./globalPidIndex-CoNr7tS8.js";
3
- import "./messageLog-Bb_Ie3Ck.js";
4
- import "./configShared-nnIwDYY-.js";
5
- import { A as renderRawLog, B as submitAndConfirm, C as matchKeyword, D as recentMessageEdges, E as readPtysize, F as restartHintLines, H as writeKeysPaced, I as runSubcommand, L as snapshotStatus, M as resolveOne, N as resolveReadWindow, O as recentReadEdges, P as resolveResumeArgs, R as stdinActivityPath, S as listRecords, T as readNotes, U as writeToIpc, V as waitForLogQuiet, _ as isPidAlive, a as cmdHelp, b as isUserTyping, c as deriveLiveState, d as extractMenu, f as extractNeedsInput, g as isExitRequest, h as isAgentStuck, i as backoffWhileTyping, j as renderRawLogLines, k as renderLogTailLines, l as deriveLiveStatus, m as finalizedLines, n as READ_PAGE_DEFAULT, o as controlCodeFromName, p as extractTaskCounts, r as TYPING_WINDOW_MS, s as cursorAbs, t as GRACEFUL_EXIT_COMMANDS, u as extractBadges, v as isSlashCommand, w as menuSelectKeys, x as lastStdinAt, y as isSubcommand, z as stopTipForCli } from "./subcommands-CJVKXGbm.js";
6
- import "./e2e-D5jaSHyY.js";
7
- import "./webrtcLink-DknpJQ0y.js";
8
- import "./remotes-BtXom7Rp.js";
9
-
10
- export { cmdHelp, isSubcommand, runSubcommand };