agent-yes 1.206.0 → 1.208.0

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,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-DnqRreF4.js";
1
+ import { t as CLIS_CONFIG } from "./ts-_opGnkmz.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-DQSgURGW.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-C38pi6qs.js.map
@@ -0,0 +1,9 @@
1
+ import "./ts-_opGnkmz.js";
2
+ import "./logger-CDIsZ-Pp.js";
3
+ import "./versionChecker-BSmUzVSM.js";
4
+ import "./pidStore-BIvsBQ8X.js";
5
+ import "./globalPidIndex-CoNr7tS8.js";
6
+ import "./messageLog-CxrKJj77.js";
7
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C38pi6qs.js";
8
+
9
+ export { SUPPORTED_CLIS };
@@ -2,7 +2,7 @@ import "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CoNr7tS8.js";
3
3
  import "./messageLog-CxrKJj77.js";
4
4
  import "./configShared-aKTg-sa5.js";
5
- import { M as resolveOne } from "./subcommands-DkrMRVNh.js";
5
+ import { M as resolveOne } from "./subcommands-Dvg-RHy6.js";
6
6
  import "./e2e-jb0Hp43q.js";
7
7
  import "./webrtcLink-B7REGtK2.js";
8
8
  import "./remotes-Cim0dBU7.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-k8224qiZ.js.map
232
+ //# sourceMappingURL=agentShare-sjB7JIAq.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-d5c6_vgS.js";
5
- import { n as getRustBinary } from "./rustBinary-BjRvvEs8.js";
4
+ import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-BSmUzVSM.js";
5
+ import { n as getRustBinary } from "./rustBinary-Cy1JDX9Q.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-DCGZjr4t.js");
288
+ const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-DVHfue6K.js");
289
289
  if (isHelpFlag && process.argv.length === 3) {
290
290
  await cmdHelp(managerCommands);
291
291
  process.exit(0);
@@ -327,7 +327,7 @@ if (config.useRust) {
327
327
  }
328
328
  }
329
329
  if (rustBinary) {
330
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-CQ6e94ln.js");
330
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-DTqtsVC5.js");
331
331
  const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
332
332
  if (config.verbose) {
333
333
  console.log(`[rust] Using binary: ${rustBinary}`);
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-DnqRreF4.js";
1
+ import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-_opGnkmz.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-d5c6_vgS.js";
3
+ import "./versionChecker-BSmUzVSM.js";
4
4
  import "./pidStore-BIvsBQ8X.js";
5
5
  import "./globalPidIndex-CoNr7tS8.js";
6
6
  import "./messageLog-CxrKJj77.js";
@@ -2,7 +2,7 @@ import { n as logger } from "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CoNr7tS8.js";
3
3
  import "./messageLog-CxrKJj77.js";
4
4
  import "./configShared-aKTg-sa5.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-DkrMRVNh.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-Dvg-RHy6.js";
6
6
  import "./e2e-jb0Hp43q.js";
7
7
  import "./webrtcLink-B7REGtK2.js";
8
8
  import "./remotes-Cim0dBU7.js";
@@ -589,4 +589,4 @@ async function ensureDaemon() {
589
589
 
590
590
  //#endregion
591
591
  export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
592
- //# sourceMappingURL=notifyDaemon-BbVnNvlo.js.map
592
+ //# sourceMappingURL=notifyDaemon-CyEnGsPI.js.map
@@ -1,4 +1,4 @@
1
- import { r as getInstalledPackage } from "./versionChecker-d5c6_vgS.js";
1
+ import { r as getInstalledPackage } from "./versionChecker-BSmUzVSM.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-BjRvvEs8.js.map
228
+ //# sourceMappingURL=rustBinary-Cy1JDX9Q.js.map
@@ -1,10 +1,10 @@
1
- import "./ts-DnqRreF4.js";
1
+ import "./ts-_opGnkmz.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-d5c6_vgS.js";
3
+ import "./versionChecker-BSmUzVSM.js";
4
4
  import "./pidStore-BIvsBQ8X.js";
5
5
  import "./globalPidIndex-CoNr7tS8.js";
6
6
  import "./messageLog-CxrKJj77.js";
7
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DQSgURGW.js";
7
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C38pi6qs.js";
8
8
  import { d as resolveSpawnCwd } from "./workspaceConfig-CjaRvTjf.js";
9
9
  import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-CwNJuwH5.js";
10
10
  import { createHash } from "node:crypto";
@@ -151,4 +151,4 @@ async function cmdSchedule(rest) {
151
151
 
152
152
  //#endregion
153
153
  export { cmdSchedule };
154
- //# sourceMappingURL=schedule-DJ-v4yVa.js.map
154
+ //# sourceMappingURL=schedule-Co1vB9EZ.js.map
@@ -1,15 +1,15 @@
1
- import "./ts-DnqRreF4.js";
1
+ import "./ts-_opGnkmz.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import { r as getInstalledPackage } from "./versionChecker-d5c6_vgS.js";
4
- import { t as findSpawnHiddenLauncher } from "./rustBinary-BjRvvEs8.js";
3
+ import { r as getInstalledPackage } from "./versionChecker-BSmUzVSM.js";
4
+ import { t as findSpawnHiddenLauncher } from "./rustBinary-Cy1JDX9Q.js";
5
5
  import { t as agentYesHome$1 } from "./agentYesHome-CtHb5b71.js";
6
6
  import "./pidStore-BIvsBQ8X.js";
7
7
  import { a as updateGlobalPidStatus } from "./globalPidIndex-CoNr7tS8.js";
8
8
  import { r as recordInbox } from "./messageLog-CxrKJj77.js";
9
9
  import { t as pgidForWrapper } from "./reaper-BUHCyxdF.js";
10
10
  import "./configShared-aKTg-sa5.js";
11
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DQSgURGW.js";
12
- 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, k as renderLogTailLines, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, q as isTransientLockMkdirError, tt as TYPING_BADGE, u as extractBadges } from "./subcommands-DkrMRVNh.js";
11
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C38pi6qs.js";
12
+ 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, k as renderLogTailLines, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, q as isTransientLockMkdirError, tt as TYPING_BADGE, u as extractBadges } from "./subcommands-Dvg-RHy6.js";
13
13
  import "./e2e-jb0Hp43q.js";
14
14
  import "./webrtcLink-B7REGtK2.js";
15
15
  import "./remotes-Cim0dBU7.js";
@@ -207,6 +207,48 @@ async function acquireWebrtcHostLock(opts) {
207
207
  }
208
208
  }
209
209
 
210
+ //#endregion
211
+ //#region ts/sizeNego.ts
212
+ /** Reject junk caps (a viewer mid-layout can report 0×0 or absurd numbers). */
213
+ const CAP_MIN_COLS = 20;
214
+ const CAP_MIN_ROWS = 5;
215
+ const CAP_MAX_COLS = 500;
216
+ const CAP_MAX_ROWS = 200;
217
+ /** Never negotiate below this — TUIs (claude, codex) break down when the grid
218
+ * gets absurdly narrow, so a tiny watch-sized viewer can't wedge the agent. */
219
+ const NEGO_FLOOR_COLS = 40;
220
+ const NEGO_FLOOR_ROWS = 10;
221
+ /** Parse a presence-reported cap into a sane SizeCap, or null if unusable. */
222
+ function sanitizeCap(cap) {
223
+ if (typeof cap !== "object" || cap === null) return null;
224
+ const c = Math.floor(Number(cap.cols) || 0);
225
+ const r = Math.floor(Number(cap.rows) || 0);
226
+ if (c < CAP_MIN_COLS || c > CAP_MAX_COLS) return null;
227
+ if (r < CAP_MIN_ROWS || r > CAP_MAX_ROWS) return null;
228
+ return {
229
+ cols: c,
230
+ rows: r
231
+ };
232
+ }
233
+ /**
234
+ * Elementwise minimum over the live viewers' capacities, clamped to the floor.
235
+ * Returns null when no viewer reports a capacity — meaning "withdraw the
236
+ * negotiated size, let the real tty size rule again".
237
+ */
238
+ function negotiateSize(caps) {
239
+ let cols = Infinity;
240
+ let rows = Infinity;
241
+ for (const cap of caps) {
242
+ if (cap.cols < cols) cols = cap.cols;
243
+ if (cap.rows < rows) rows = cap.rows;
244
+ }
245
+ if (!Number.isFinite(cols) || !Number.isFinite(rows)) return null;
246
+ return {
247
+ cols: Math.max(NEGO_FLOOR_COLS, cols),
248
+ rows: Math.max(NEGO_FLOOR_ROWS, rows)
249
+ };
250
+ }
251
+
210
252
  //#endregion
211
253
  //#region ts/strayServe.ts
212
254
  const MANAGEMENT_COMMAND_RE = /\b(?:install|uninstall|status|logs|restart)\b/;
@@ -387,7 +429,7 @@ function loginShellEnv() {
387
429
  const delim = "_AY_SHELL_ENV_DELIM_";
388
430
  const out = Bun.spawnSync([
389
431
  shell,
390
- "-ilc",
432
+ "-lc",
391
433
  `printf %s "${delim}"; env -0; printf %s "${delim}"`
392
434
  ], {
393
435
  stdin: "ignore",
@@ -1467,6 +1509,53 @@ Options:
1467
1509
  };
1468
1510
  const presence = /* @__PURE__ */ new Map();
1469
1511
  const PRESENCE_TTL_MS = 12e3;
1512
+ const negoApplied = /* @__PURE__ */ new Map();
1513
+ const negoTimers = /* @__PURE__ */ new Map();
1514
+ const NEGO_DEBOUNCE_MS = 350;
1515
+ const winsizePathFor = (pid) => path.join(process.env.AGENT_YES_HOME ?? path.join(homedir(), ".agent-yes"), "winsize", String(pid));
1516
+ const liveCapsFor = (pid) => {
1517
+ const now = Date.now();
1518
+ const caps = [];
1519
+ for (const v of presence.values()) if (now - v.ts <= PRESENCE_TTL_MS && String(v.agent) === String(pid) && v.cap) caps.push(v.cap);
1520
+ return caps;
1521
+ };
1522
+ const applyNego = async (pid) => {
1523
+ negoTimers.delete(pid);
1524
+ const eff = negotiateSize(liveCapsFor(pid));
1525
+ const file = winsizePathFor(pid);
1526
+ const prev = negoApplied.get(pid);
1527
+ try {
1528
+ if (eff) {
1529
+ if (prev && prev.cols === eff.cols && prev.rows === eff.rows) return;
1530
+ const content = `${eff.cols} ${eff.rows} ${Date.now()}\n`;
1531
+ await mkdir(path.dirname(file), { recursive: true });
1532
+ await writeFile(file, content);
1533
+ negoApplied.set(pid, {
1534
+ ...eff,
1535
+ content
1536
+ });
1537
+ } else {
1538
+ if (!prev) return;
1539
+ negoApplied.delete(pid);
1540
+ try {
1541
+ if (await readFile(file, "utf-8") !== prev.content) return;
1542
+ await unlink(file);
1543
+ } catch {
1544
+ return;
1545
+ }
1546
+ }
1547
+ try {
1548
+ process.kill(pid, "SIGWINCH");
1549
+ } catch {}
1550
+ } catch {}
1551
+ };
1552
+ const scheduleNego = (pid) => {
1553
+ if (!Number.isFinite(pid) || pid <= 0 || negoTimers.has(pid)) return;
1554
+ negoTimers.set(pid, setTimeout(() => void applyNego(pid), NEGO_DEBOUNCE_MS));
1555
+ };
1556
+ setInterval(() => {
1557
+ for (const pid of negoApplied.keys()) scheduleNego(pid);
1558
+ }, 5e3);
1470
1559
  const apiFetch = async (req) => {
1471
1560
  if (!checkAuth(req, token)) return new Response("Unauthorized", { status: 401 });
1472
1561
  const url = new URL(req.url);
@@ -1779,7 +1868,7 @@ Options:
1779
1868
  }
1780
1869
  });
1781
1870
  if (req.method === "GET" && p === "/api/ws") {
1782
- const ws = await import("./ws-BmHpWaG_.js");
1871
+ const ws = await import("./ws-CKoSZ9CN.js");
1783
1872
  try {
1784
1873
  await ws.loadProvision();
1785
1874
  } catch (e) {
@@ -1799,7 +1888,7 @@ Options:
1799
1888
  if (req.method === "GET" && p === "/api/ws/status") {
1800
1889
  const dirRaw = url.searchParams.get("path");
1801
1890
  if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
1802
- const ws = await import("./ws-BmHpWaG_.js");
1891
+ const ws = await import("./ws-CKoSZ9CN.js");
1803
1892
  let prov;
1804
1893
  try {
1805
1894
  prov = await ws.loadProvision();
@@ -1864,7 +1953,8 @@ Options:
1864
1953
  return Response.json({
1865
1954
  pid: record.pid,
1866
1955
  cols: size?.cols ?? null,
1867
- rows: size?.rows ?? null
1956
+ rows: size?.rows ?? null,
1957
+ nego: true
1868
1958
  });
1869
1959
  } catch (e) {
1870
1960
  return new Response(e.message, { status: 404 });
@@ -2145,6 +2235,7 @@ Options:
2145
2235
  }
2146
2236
  const viewer = String(b.viewer ?? "").slice(0, 64);
2147
2237
  if (!viewer) return new Response("missing viewer", { status: 400 });
2238
+ const prevAgent = presence.get(viewer)?.agent;
2148
2239
  if (b.agent == null) presence.delete(viewer);
2149
2240
  else presence.set(viewer, {
2150
2241
  viewer,
@@ -2152,8 +2243,11 @@ Options:
2152
2243
  cols: Math.max(0, Math.floor(Number(b.cols) || 0)),
2153
2244
  rows: Math.max(0, Math.floor(Number(b.rows) || 0)),
2154
2245
  sel: typeof b.sel === "string" ? b.sel.slice(0, 200) : null,
2246
+ cap: sanitizeCap(b.cap),
2155
2247
  ts: Date.now()
2156
2248
  });
2249
+ if (b.agent != null) scheduleNego(Number(b.agent));
2250
+ if (prevAgent != null && String(prevAgent) !== String(b.agent ?? "")) scheduleNego(Number(prevAgent));
2157
2251
  return new Response(null, { status: 204 });
2158
2252
  }
2159
2253
  if (req.method === "GET" && p === "/api/presence") {
@@ -2355,7 +2449,7 @@ Options:
2355
2449
  const perm = body.perm ?? "r";
2356
2450
  if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
2357
2451
  try {
2358
- const { createScopedShare } = await import("./agentShare-k8224qiZ.js");
2452
+ const { createScopedShare } = await import("./agentShare-sjB7JIAq.js");
2359
2453
  const share = await createScopedShare({
2360
2454
  agent: body.agent,
2361
2455
  perm,
@@ -2370,12 +2464,12 @@ Options:
2370
2464
  }
2371
2465
  }
2372
2466
  if (req.method === "GET" && p === "/api/shares") {
2373
- const { listShares } = await import("./agentShare-k8224qiZ.js");
2467
+ const { listShares } = await import("./agentShare-sjB7JIAq.js");
2374
2468
  return Response.json(listShares());
2375
2469
  }
2376
2470
  const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
2377
2471
  if (req.method === "DELETE" && revokeM) {
2378
- const { revokeShare } = await import("./agentShare-k8224qiZ.js");
2472
+ const { revokeShare } = await import("./agentShare-sjB7JIAq.js");
2379
2473
  const ok = revokeShare(decodeURIComponent(revokeM[1]));
2380
2474
  return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
2381
2475
  }
@@ -2561,7 +2655,7 @@ Options:
2561
2655
  const shutdown = (resolve) => {
2562
2656
  if (heartbeat) clearInterval(heartbeat);
2563
2657
  closeShare?.();
2564
- import("./agentShare-k8224qiZ.js").then((m) => m.revokeAllShares()).catch(() => {});
2658
+ import("./agentShare-sjB7JIAq.js").then((m) => m.revokeAllShares()).catch(() => {});
2565
2659
  server?.stop();
2566
2660
  Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
2567
2661
  };
@@ -2574,4 +2668,4 @@ Options:
2574
2668
 
2575
2669
  //#endregion
2576
2670
  export { cmdServe };
2577
- //# sourceMappingURL=serve-crLypY_c.js.map
2671
+ //# sourceMappingURL=serve-CMUfHfqa.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-crLypY_c.js");
35
+ const { cmdServe } = await import("./serve-CMUfHfqa.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-BPNkeSmY.js.map
45
+ //# sourceMappingURL=setup-aMt_-16G.js.map
@@ -2,7 +2,7 @@ import "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CoNr7tS8.js";
3
3
  import "./messageLog-CxrKJj77.js";
4
4
  import "./configShared-aKTg-sa5.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-DkrMRVNh.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-Dvg-RHy6.js";
6
6
  import "./e2e-jb0Hp43q.js";
7
7
  import "./webrtcLink-B7REGtK2.js";
8
8
  import "./remotes-Cim0dBU7.js";
@@ -1237,19 +1237,19 @@ async function runSubcommand(argv) {
1237
1237
  case "restart": return await cmdRestart(rest);
1238
1238
  case "note": return await cmdNote(rest);
1239
1239
  case "serve": {
1240
- const { cmdServe } = await import("./serve-crLypY_c.js");
1240
+ const { cmdServe } = await import("./serve-CMUfHfqa.js");
1241
1241
  return cmdServe(rest);
1242
1242
  }
1243
1243
  case "setup": {
1244
- const { cmdSetup } = await import("./setup-BPNkeSmY.js");
1244
+ const { cmdSetup } = await import("./setup-aMt_-16G.js");
1245
1245
  return cmdSetup(rest);
1246
1246
  }
1247
1247
  case "ws": {
1248
- const { cmdWs } = await import("./ws-BmHpWaG_.js");
1248
+ const { cmdWs } = await import("./ws-CKoSZ9CN.js");
1249
1249
  return cmdWs(rest);
1250
1250
  }
1251
1251
  case "schedule": {
1252
- const { cmdSchedule } = await import("./schedule-DJ-v4yVa.js");
1252
+ const { cmdSchedule } = await import("./schedule-Co1vB9EZ.js");
1253
1253
  return cmdSchedule(rest);
1254
1254
  }
1255
1255
  case "remote": {
@@ -4269,7 +4269,7 @@ async function cmdNotify(rest) {
4269
4269
  }
4270
4270
  const ensure = async () => {
4271
4271
  if (!argv["ensure-daemon"]) return;
4272
- const { ensureDaemon } = await import("./notifyDaemon-BbVnNvlo.js");
4272
+ const { ensureDaemon } = await import("./notifyDaemon-CyEnGsPI.js");
4273
4273
  await ensureDaemon().catch(() => null);
4274
4274
  };
4275
4275
  await heartbeatWatcher(parent, selfStartedAt);
@@ -4343,7 +4343,7 @@ async function cmdNotifyCursor(args) {
4343
4343
  }
4344
4344
  async function cmdNotifyd(rest) {
4345
4345
  const sub = rest[0] ?? "status";
4346
- const daemon = await import("./notifyDaemon-BbVnNvlo.js");
4346
+ const daemon = await import("./notifyDaemon-CyEnGsPI.js");
4347
4347
  switch (sub) {
4348
4348
  case "run": return daemon.runDaemon();
4349
4349
  case "once": return daemon.runDaemon({ once: true });
@@ -4370,4 +4370,4 @@ async function cmdNotifyd(rest) {
4370
4370
 
4371
4371
  //#endregion
4372
4372
  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 };
4373
- //# sourceMappingURL=subcommands-DkrMRVNh.js.map
4373
+ //# sourceMappingURL=subcommands-Dvg-RHy6.js.map
@@ -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-d5c6_vgS.js";
2
+ import { r as getInstalledPackage } from "./versionChecker-BSmUzVSM.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 { t as PidStore } from "./pidStore-BIvsBQ8X.js";
@@ -1901,4 +1901,4 @@ function sleep(ms) {
1901
1901
 
1902
1902
  //#endregion
1903
1903
  export { removeControlCharacters as a, AgentContext as i, agentYes as n, config as r, CLIS_CONFIG as t };
1904
- //# sourceMappingURL=ts-DnqRreF4.js.map
1904
+ //# sourceMappingURL=ts-_opGnkmz.js.map
@@ -7,7 +7,7 @@ import { fileURLToPath } from "url";
7
7
 
8
8
  //#region package.json
9
9
  var name = "agent-yes";
10
- var version = "1.206.0";
10
+ var version = "1.208.0";
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-d5c6_vgS.js.map
218
+ //# sourceMappingURL=versionChecker-BSmUzVSM.js.map
@@ -2,7 +2,7 @@ import "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CoNr7tS8.js";
3
3
  import "./messageLog-CxrKJj77.js";
4
4
  import "./configShared-aKTg-sa5.js";
5
- import { S as listRecords } from "./subcommands-DkrMRVNh.js";
5
+ import { S as listRecords } from "./subcommands-Dvg-RHy6.js";
6
6
  import "./e2e-jb0Hp43q.js";
7
7
  import "./webrtcLink-B7REGtK2.js";
8
8
  import "./remotes-Cim0dBU7.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-BmHpWaG_.js.map
421
+ //# sourceMappingURL=ws-CKoSZ9CN.js.map
@@ -701,6 +701,26 @@ export function fitTransform(gridW, gridH, paneW, paneH) {
701
701
  return s > 0.985 && s < 1.04 ? "none" : "scale(" + s.toFixed(4) + ")";
702
702
  }
703
703
 
704
+ // Centered variant: same scale selection as fitTransform, plus a translate that
705
+ // centers the scaled grid in the pane (fit-width → vertically centered,
706
+ // fit-height → horizontally centered). transform-origin stays top-left, so the
707
+ // translate is in pane px and consumers mapping grid→screen coords (peer
708
+ // overlays) can read the offset back off this same object. "none" (the crisp
709
+ // driver path) never gets a translate — grid ≈ pane, nothing to center.
710
+ export function fitTransformCentered(gridW, gridH, paneW, paneH) {
711
+ const t = fitTransform(gridW, gridH, paneW, paneH);
712
+ if (t === "none") return { transform: "none", scale: 1, dx: 0, dy: 0 };
713
+ const s = Math.min(paneW / gridW, paneH / gridH);
714
+ const dx = Math.max(0, (paneW - gridW * s) / 2);
715
+ const dy = Math.max(0, (paneH - gridH * s) / 2);
716
+ return {
717
+ transform: `translate(${dx.toFixed(1)}px, ${dy.toFixed(1)}px) ` + t,
718
+ scale: s,
719
+ dx,
720
+ dy,
721
+ };
722
+ }
723
+
704
724
  // Browser-tab title: "<glyph> <selected agent title> - agent-yes", or the bare
705
725
  // console title when nothing is selected (blank/whitespace name). The leading
706
726
  // glyph mirrors the agent's status dot — ⌨ needs_input ("your turn"), ⚠ stuck,