agent-yes 1.239.2 → 1.240.0-beta.576.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
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-txQPlc09.js";
3
- import "./ts-0WmO0oIH.js";
2
+ import "./versionChecker-CYbMzKN5.js";
3
+ import "./ts-DCOqpivT.js";
4
4
  import "./todoAutomation-Buo457VO.js";
5
5
  import "./JsonlStore-CPGIR0Wy.js";
6
6
  import "./globalPidIndex-D9DOSd-c.js";
7
7
  import "./pidStore-6EZd5DUv.js";
8
8
  import "./messageLog-C-YIzhRj.js";
9
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BiAbALnj.js";
9
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DeH9ajnQ.js";
10
10
 
11
11
  export { SUPPORTED_CLIS };
@@ -1,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-0WmO0oIH.js";
1
+ import { t as CLIS_CONFIG } from "./ts-DCOqpivT.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-BiAbALnj.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-DeH9ajnQ.js.map
@@ -3,7 +3,7 @@ import "./globalPidIndex-D9DOSd-c.js";
3
3
  import "./messageLog-C-YIzhRj.js";
4
4
  import "./e2e-CEIdJGZ7.js";
5
5
  import "./configShared-9wVlbPyC.js";
6
- import { P as resolveOne } from "./subcommands-VKWEDfnV.js";
6
+ import { P as resolveOne } from "./subcommands-D2M8O2r6.js";
7
7
  import "./webrtcLink-BMYneHbu.js";
8
8
  import "./remotes-BxQnNxQv.js";
9
9
  import { a as startShare } from "./share-BGl3wutJ.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-DnSXESvJ.js.map
232
+ //# sourceMappingURL=agentShare-CuMhA6_P.js.map
@@ -1,5 +1,5 @@
1
1
  import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
2
- import { P as resolveOne } from "./subcommands-VKWEDfnV.js";
2
+ import { P as resolveOne } from "./subcommands-D2M8O2r6.js";
3
3
  import { a as mintCapability, o as parseExpires } from "./callbackCore-Dd28_cBM.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-B7wac0SO.js");
75
+ const { resolveLocalServeUrl } = await import("./serve-BCX0kZ3c.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-DXSwdvn1.js.map
190
+ //# sourceMappingURL=callback-BIAfdXdZ.js.map
@@ -3,10 +3,10 @@ import "./globalPidIndex-D9DOSd-c.js";
3
3
  import "./messageLog-C-YIzhRj.js";
4
4
  import "./e2e-CEIdJGZ7.js";
5
5
  import "./configShared-9wVlbPyC.js";
6
- import "./subcommands-VKWEDfnV.js";
6
+ import "./subcommands-D2M8O2r6.js";
7
7
  import "./webrtcLink-BMYneHbu.js";
8
8
  import "./remotes-BxQnNxQv.js";
9
9
  import "./callbackCore-Dd28_cBM.js";
10
- import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-DXSwdvn1.js";
10
+ import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-BIAfdXdZ.js";
11
11
 
12
12
  export { cmdCallback };
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-txQPlc09.js";
5
- import { n as getRustBinary } from "./rustBinary-BfPxYrNo.js";
4
+ import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-CYbMzKN5.js";
5
+ import { n as getRustBinary } from "./rustBinary-CKhN-fpj.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, isUnknownManagerToken } = await import("./subcommands-CRilPDSC.js");
288
+ const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken } = await import("./subcommands-D5yBJgOv.js");
289
289
  if (isHelpFlag && process.argv.length === 3) {
290
290
  await cmdHelp(managerCommands);
291
291
  process.exit(0);
@@ -295,7 +295,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
295
295
  process.exit(code ?? 0);
296
296
  }
297
297
  {
298
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BQQl9EDZ.js");
298
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BgXFV4QY.js");
299
299
  if (isUnknownManagerToken(rawArg, managerCommands, SUPPORTED_CLIS)) {
300
300
  process.stderr.write(`ay: unknown subcommand or CLI '${rawArg}'.\n See 'ay help' for subcommands. To run an agent, name a CLI:\n 'ay <cli> …' (e.g. 'ay claude …') or 'ay --cli <cli> …'.\n`);
301
301
  process.exit(1);
@@ -346,7 +346,7 @@ if (config.useRust) {
346
346
  }
347
347
  }
348
348
  if (rustBinary) {
349
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BQQl9EDZ.js");
349
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BgXFV4QY.js");
350
350
  const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
351
351
  if (config.verbose) {
352
352
  console.log(`[rust] Using binary: ${rustBinary}`);
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-txQPlc09.js";
3
- import { a as hasTodoStore, c as AgentContext, i as answerAsk, n as agentYes, o as listAsks, r as config, s as listAsksForProject, t as CLIS_CONFIG } from "./ts-0WmO0oIH.js";
2
+ import "./versionChecker-CYbMzKN5.js";
3
+ import { a as hasTodoStore, c as AgentContext, i as answerAsk, n as agentYes, o as listAsks, r as config, s as listAsksForProject, t as CLIS_CONFIG } from "./ts-DCOqpivT.js";
4
4
  import { _ as isKnownKind, a as renderTree, b as statesOf, c as monitorHint, d as openStore, f as DONE_STATE, g as initialState, h as canTransition, i as renderDigest, l as CycleError, m as ORPHANED_STATE, o as unblockedTasks, p as LIFECYCLES, r as openBlockers, s as describeBlock, t as reconcileTodos, u as TodoStore, v as nextStates, x as removeControlCharacters, y as requiredGate } from "./todoAutomation-Buo457VO.js";
5
5
  import "./JsonlStore-CPGIR0Wy.js";
6
6
  import "./globalPidIndex-D9DOSd-c.js";
@@ -3,7 +3,7 @@ import "./globalPidIndex-D9DOSd-c.js";
3
3
  import "./messageLog-C-YIzhRj.js";
4
4
  import "./e2e-CEIdJGZ7.js";
5
5
  import "./configShared-9wVlbPyC.js";
6
- import { $ as shouldStealLock, C as listRecords, J as hostId, K as appendEvent, Q as readInbox, X as listInboxParents, Z as liveWatchers, _ as isPidAlive, c as deriveLiveState, et as daemonLockDir, j as renderLogTailLines, nt as notifyDir, q as gcInboxes, tt as daemonLockOwnerPath } from "./subcommands-VKWEDfnV.js";
6
+ import { $ as shouldStealLock, C as listRecords, J as hostId, K as appendEvent, Q as readInbox, X as listInboxParents, Z as liveWatchers, _ as isPidAlive, c as deriveLiveState, et as daemonLockDir, j as renderLogTailLines, nt as notifyDir, q as gcInboxes, tt as daemonLockOwnerPath } from "./subcommands-D2M8O2r6.js";
7
7
  import "./webrtcLink-BMYneHbu.js";
8
8
  import "./remotes-BxQnNxQv.js";
9
9
  import { mkdir, readFile, rename, rm, stat, writeFile } from "fs/promises";
@@ -589,4 +589,4 @@ async function ensureDaemon() {
589
589
 
590
590
  //#endregion
591
591
  export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
592
- //# sourceMappingURL=notifyDaemon-DigPY1f0.js.map
592
+ //# sourceMappingURL=notifyDaemon-BLhX8Ipz.js.map
@@ -1,4 +1,4 @@
1
- import { r as getInstalledPackage } from "./versionChecker-txQPlc09.js";
1
+ import { r as getInstalledPackage } from "./versionChecker-CYbMzKN5.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-BfPxYrNo.js.map
228
+ //# sourceMappingURL=rustBinary-CKhN-fpj.js.map
@@ -1,12 +1,12 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-txQPlc09.js";
3
- import "./ts-0WmO0oIH.js";
2
+ import "./versionChecker-CYbMzKN5.js";
3
+ import "./ts-DCOqpivT.js";
4
4
  import "./todoAutomation-Buo457VO.js";
5
5
  import "./JsonlStore-CPGIR0Wy.js";
6
6
  import "./globalPidIndex-D9DOSd-c.js";
7
7
  import "./pidStore-6EZd5DUv.js";
8
8
  import "./messageLog-C-YIzhRj.js";
9
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BiAbALnj.js";
9
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DeH9ajnQ.js";
10
10
  import { d as resolveSpawnCwd } from "./workspaceConfig-DOHygA2x.js";
11
11
  import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-BtL6Oo1o.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-TCY0KZAa.js.map
156
+ //# sourceMappingURL=schedule-BreGlgCB.js.map
@@ -1,7 +1,7 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import { r as getInstalledPackage } from "./versionChecker-txQPlc09.js";
3
- import { t as findSpawnHiddenLauncher } from "./rustBinary-BfPxYrNo.js";
4
- import { i as answerAsk, l as CLAUDE_SESSION_PIN_ENV, o as listAsks } from "./ts-0WmO0oIH.js";
2
+ import { r as getInstalledPackage } from "./versionChecker-CYbMzKN5.js";
3
+ import { t as findSpawnHiddenLauncher } from "./rustBinary-CKhN-fpj.js";
4
+ import { i as answerAsk, l as CLAUDE_SESSION_PIN_ENV, o as listAsks } from "./ts-DCOqpivT.js";
5
5
  import { t as agentYesHome$1 } from "./agentYesHome-CtmsY6I-.js";
6
6
  import { x as removeControlCharacters } from "./todoAutomation-Buo457VO.js";
7
7
  import "./JsonlStore-CPGIR0Wy.js";
@@ -11,12 +11,12 @@ import { r as recordInbox } from "./messageLog-C-YIzhRj.js";
11
11
  import { t as pgidForWrapper } from "./reaper-DP49VCKx.js";
12
12
  import "./e2e-CEIdJGZ7.js";
13
13
  import "./configShared-9wVlbPyC.js";
14
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BiAbALnj.js";
15
- import { A as recentReadEdges, C as listRecords, D as readNotes, G as writeToIpc, M as renderRawLog, N as renderRawLogLines, O as readPtysize, P as resolveOne, Y as isTransientLockMkdirError, f as extractNeedsInput, j as renderLogTailLines, k as recentMessageEdges, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, rt as TYPING_BADGE, u as extractBadges, x as isUserTyping, z as snapshotStatus } from "./subcommands-VKWEDfnV.js";
14
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DeH9ajnQ.js";
15
+ import { A as recentReadEdges, C as listRecords, D as readNotes, G as writeToIpc, M as renderRawLog, N as renderRawLogLines, O as readPtysize, P as resolveOne, Y as isTransientLockMkdirError, f as extractNeedsInput, j as renderLogTailLines, k as recentMessageEdges, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, rt as TYPING_BADGE, u as extractBadges, x as isUserTyping, z as snapshotStatus } from "./subcommands-D2M8O2r6.js";
16
16
  import "./webrtcLink-BMYneHbu.js";
17
17
  import "./remotes-BxQnNxQv.js";
18
18
  import { i as frameVisitorMessage, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-Dd28_cBM.js";
19
- import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-DXSwdvn1.js";
19
+ import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-BIAfdXdZ.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-DOHygA2x.js";
21
21
  import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-BtL6Oo1o.js";
22
22
  import { r as spawnRejectionReason } from "./spawnGate-BxgS_GlF.js";
@@ -1756,6 +1756,8 @@ Options:
1756
1756
  negoCapsGoneAt.delete(pid);
1757
1757
  if (prev && Math.abs(prev.cols - eff.cols) <= 1 && Math.abs(prev.rows - eff.rows) <= 1) return;
1758
1758
  const content = `${eff.cols} ${eff.rows} ${Date.now()}\n`;
1759
+ const srcViewers = [...presence.values()].filter((v) => Date.now() - v.ts <= PRESENCE_TTL_MS && String(v.agent) === String(pid) && v.cap).map((v) => v.viewer).join(",");
1760
+ process.stderr.write(`[api/resize] pid=${pid} ${eff.cols}x${eff.rows} src=presence-nego caps=${liveCapsFor(pid).length} viewers=${srcViewers || "-"}\n`);
1759
1761
  await mkdir(path.dirname(file), { recursive: true });
1760
1762
  await writeFile(file, content);
1761
1763
  negoApplied.set(pid, {
@@ -2246,7 +2248,7 @@ Options:
2246
2248
  }
2247
2249
  });
2248
2250
  if (req.method === "GET" && p === "/api/ws") {
2249
- const ws = await import("./ws-D6m3XMxN.js");
2251
+ const ws = await import("./ws-F0OJlND9.js");
2250
2252
  try {
2251
2253
  await ws.loadProvision();
2252
2254
  } catch (e) {
@@ -2266,7 +2268,7 @@ Options:
2266
2268
  if (req.method === "GET" && p === "/api/ws/status") {
2267
2269
  const dirRaw = url.searchParams.get("path");
2268
2270
  if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
2269
- const ws = await import("./ws-D6m3XMxN.js");
2271
+ const ws = await import("./ws-F0OJlND9.js");
2270
2272
  let prov;
2271
2273
  try {
2272
2274
  prov = await ws.loadProvision();
@@ -2721,6 +2723,7 @@ Options:
2721
2723
  if (!cols || !rows) return new Response("missing cols/rows", { status: 400 });
2722
2724
  try {
2723
2725
  const record = await resolveOne(keyword, defaultOpts());
2726
+ process.stderr.write(`[api/resize] pid=${record.pid} ${cols}x${rows} src=api-resize auth=${authResult.kind} origin=${req.headers.get("origin") ?? "-"} ref=${req.headers.get("referer") ?? "-"} ua=${(req.headers.get("user-agent") ?? "-").slice(0, 80)}\n`);
2724
2727
  const ayHome = process.env.AGENT_YES_HOME ?? path.join(homedir(), ".agent-yes");
2725
2728
  const winsizeDir = path.join(ayHome, "winsize");
2726
2729
  await mkdir(winsizeDir, { recursive: true });
@@ -2989,7 +2992,7 @@ Options:
2989
2992
  const perm = body.perm ?? "r";
2990
2993
  if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
2991
2994
  try {
2992
- const { createScopedShare } = await import("./agentShare-DnSXESvJ.js");
2995
+ const { createScopedShare } = await import("./agentShare-CuMhA6_P.js");
2993
2996
  const share = await createScopedShare({
2994
2997
  agent: body.agent,
2995
2998
  perm,
@@ -3004,12 +3007,12 @@ Options:
3004
3007
  }
3005
3008
  }
3006
3009
  if (req.method === "GET" && p === "/api/shares") {
3007
- const { listShares } = await import("./agentShare-DnSXESvJ.js");
3010
+ const { listShares } = await import("./agentShare-CuMhA6_P.js");
3008
3011
  return Response.json(listShares());
3009
3012
  }
3010
3013
  const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
3011
3014
  if (req.method === "DELETE" && revokeM) {
3012
- const { revokeShare } = await import("./agentShare-DnSXESvJ.js");
3015
+ const { revokeShare } = await import("./agentShare-CuMhA6_P.js");
3013
3016
  const ok = revokeShare(decodeURIComponent(revokeM[1]));
3014
3017
  return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
3015
3018
  }
@@ -3311,7 +3314,7 @@ Options:
3311
3314
  const shutdown = (resolve) => {
3312
3315
  if (heartbeat) clearInterval(heartbeat);
3313
3316
  closeShare?.();
3314
- import("./agentShare-DnSXESvJ.js").then((m) => m.revokeAllShares()).catch(() => {});
3317
+ import("./agentShare-CuMhA6_P.js").then((m) => m.revokeAllShares()).catch(() => {});
3315
3318
  server?.stop();
3316
3319
  Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
3317
3320
  };
@@ -3324,4 +3327,4 @@ Options:
3324
3327
 
3325
3328
  //#endregion
3326
3329
  export { cmdServe, loadTokenReadOnly, mintScopedTermToken, resolveDaemonHttpBase, resolveLocalServeUrl };
3327
- //# sourceMappingURL=serve-B7wac0SO.js.map
3330
+ //# sourceMappingURL=serve-BCX0kZ3c.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-B7wac0SO.js");
35
+ const { cmdServe } = await import("./serve-BCX0kZ3c.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-BFp-bEAi.js.map
45
+ //# sourceMappingURL=setup-3fPUdm7r.js.map
@@ -1267,31 +1267,31 @@ async function runSubcommand(argv) {
1267
1267
  return cmdCh(rest);
1268
1268
  }
1269
1269
  case "term": {
1270
- const { cmdTerm } = await import("./terminal-CqsaYdfP.js");
1270
+ const { cmdTerm } = await import("./terminal-EL7te1tL.js");
1271
1271
  return cmdTerm(rest);
1272
1272
  }
1273
1273
  case "widget": {
1274
- const { cmdWidget } = await import("./widget-Cm-B1N53.js");
1274
+ const { cmdWidget } = await import("./widget-9c55Neff.js");
1275
1275
  return cmdWidget(rest);
1276
1276
  }
1277
1277
  case "mint": {
1278
- const { cmdMint } = await import("./widget-Cm-B1N53.js");
1278
+ const { cmdMint } = await import("./widget-9c55Neff.js");
1279
1279
  return cmdMint(rest);
1280
1280
  }
1281
1281
  case "serve": {
1282
- const { cmdServe } = await import("./serve-B7wac0SO.js");
1282
+ const { cmdServe } = await import("./serve-BCX0kZ3c.js");
1283
1283
  return cmdServe(rest);
1284
1284
  }
1285
1285
  case "setup": {
1286
- const { cmdSetup } = await import("./setup-BFp-bEAi.js");
1286
+ const { cmdSetup } = await import("./setup-3fPUdm7r.js");
1287
1287
  return cmdSetup(rest);
1288
1288
  }
1289
1289
  case "ws": {
1290
- const { cmdWs } = await import("./ws-D6m3XMxN.js");
1290
+ const { cmdWs } = await import("./ws-F0OJlND9.js");
1291
1291
  return cmdWs(rest);
1292
1292
  }
1293
1293
  case "schedule": {
1294
- const { cmdSchedule } = await import("./schedule-TCY0KZAa.js");
1294
+ const { cmdSchedule } = await import("./schedule-BreGlgCB.js");
1295
1295
  return cmdSchedule(rest);
1296
1296
  }
1297
1297
  case "remote": {
@@ -1303,7 +1303,7 @@ async function runSubcommand(argv) {
1303
1303
  return cmdExpose(rest);
1304
1304
  }
1305
1305
  case "callback": {
1306
- const { cmdCallback } = await import("./callback-DrnyISxv.js");
1306
+ const { cmdCallback } = await import("./callback-BO1dgZus.js");
1307
1307
  return cmdCallback(rest);
1308
1308
  }
1309
1309
  case "reap":
@@ -3711,6 +3711,7 @@ async function cmdAttach(rest) {
3711
3711
  const rows = process.stdout.rows ?? 24;
3712
3712
  try {
3713
3713
  await writeFile(winsizePath, `${cols} ${rows} ${Date.now()}\n`);
3714
+ process.stderr.write(`[api/resize] pid=${record.pid} ${cols}x${rows} src=ay-attach\n`);
3714
3715
  try {
3715
3716
  process.kill(record.pid, "SIGWINCH");
3716
3717
  } catch {}
@@ -4341,7 +4342,7 @@ async function cmdNotify(rest) {
4341
4342
  }
4342
4343
  const ensure = async () => {
4343
4344
  if (!argv["ensure-daemon"]) return;
4344
- const { ensureDaemon } = await import("./notifyDaemon-DigPY1f0.js");
4345
+ const { ensureDaemon } = await import("./notifyDaemon-BLhX8Ipz.js");
4345
4346
  await ensureDaemon().catch(() => null);
4346
4347
  };
4347
4348
  await heartbeatWatcher(parent, selfStartedAt);
@@ -4415,7 +4416,7 @@ async function cmdNotifyCursor(args) {
4415
4416
  }
4416
4417
  async function cmdNotifyd(rest) {
4417
4418
  const sub = rest[0] ?? "status";
4418
- const daemon = await import("./notifyDaemon-DigPY1f0.js");
4419
+ const daemon = await import("./notifyDaemon-BLhX8Ipz.js");
4419
4420
  switch (sub) {
4420
4421
  case "run": return daemon.runDaemon();
4421
4422
  case "once": return daemon.runDaemon({ once: true });
@@ -4442,4 +4443,4 @@ async function cmdNotifyd(rest) {
4442
4443
 
4443
4444
  //#endregion
4444
4445
  export { shouldStealLock as $, recentReadEdges as A, stdinActivityPath as B, listRecords as C, readNotes as D, readAgentPtysize as E, resolveReadWindow as F, writeToIpc as G, submitAndConfirm as H, resolveResumeArgs as I, hostId as J, appendEvent as K, restartHintLines as L, renderRawLog as M, renderRawLogLines as N, readPtysize as O, resolveOne as P, readInbox as Q, runSubcommand as R, lastStdinAt as S, menuSelectKeys as T, waitForLogQuiet as U, stopTipForCli as V, writeKeysPaced as W, listInboxParents as X, isTransientLockMkdirError as Y, liveWatchers as Z, isPidAlive as _, cmdHelp as a, isUnknownManagerToken as b, deriveLiveState as c, extractMenu as d, daemonLockDir as et, extractNeedsInput as f, isExitRequest as g, isAgentStuck as h, backoffWhileTyping as i, renderLogTailLines as j, recentMessageEdges as k, deriveLiveStatus as l, finalizedLines as m, READ_PAGE_DEFAULT as n, notifyDir as nt, controlCodeFromName as o, extractTaskCounts as p, gcInboxes as q, TYPING_WINDOW_MS as r, TYPING_BADGE as rt, cursorAbs as s, GRACEFUL_EXIT_COMMANDS as t, daemonLockOwnerPath as tt, extractBadges as u, isSlashCommand as v, matchKeyword as w, isUserTyping as x, isSubcommand as y, snapshotStatus as z };
4445
- //# sourceMappingURL=subcommands-VKWEDfnV.js.map
4446
+ //# sourceMappingURL=subcommands-D2M8O2r6.js.map
@@ -3,7 +3,7 @@ import "./globalPidIndex-D9DOSd-c.js";
3
3
  import "./messageLog-C-YIzhRj.js";
4
4
  import "./e2e-CEIdJGZ7.js";
5
5
  import "./configShared-9wVlbPyC.js";
6
- import { A as recentReadEdges, B as stdinActivityPath, C as listRecords, D as readNotes, E as readAgentPtysize, F as resolveReadWindow, G as writeToIpc, H as submitAndConfirm, I as resolveResumeArgs, L as restartHintLines, M as renderRawLog, N as renderRawLogLines, O as readPtysize, P as resolveOne, R as runSubcommand, S as lastStdinAt, T as menuSelectKeys, U as waitForLogQuiet, V as stopTipForCli, W as writeKeysPaced, _ as isPidAlive, a as cmdHelp, b as isUnknownManagerToken, c as deriveLiveState, d as extractMenu, f as extractNeedsInput, g as isExitRequest, h as isAgentStuck, i as backoffWhileTyping, j as renderLogTailLines, k as recentMessageEdges, 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 matchKeyword, x as isUserTyping, y as isSubcommand, z as snapshotStatus } from "./subcommands-VKWEDfnV.js";
6
+ import { A as recentReadEdges, B as stdinActivityPath, C as listRecords, D as readNotes, E as readAgentPtysize, F as resolveReadWindow, G as writeToIpc, H as submitAndConfirm, I as resolveResumeArgs, L as restartHintLines, M as renderRawLog, N as renderRawLogLines, O as readPtysize, P as resolveOne, R as runSubcommand, S as lastStdinAt, T as menuSelectKeys, U as waitForLogQuiet, V as stopTipForCli, W as writeKeysPaced, _ as isPidAlive, a as cmdHelp, b as isUnknownManagerToken, c as deriveLiveState, d as extractMenu, f as extractNeedsInput, g as isExitRequest, h as isAgentStuck, i as backoffWhileTyping, j as renderLogTailLines, k as recentMessageEdges, 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 matchKeyword, x as isUserTyping, y as isSubcommand, z as snapshotStatus } from "./subcommands-D2M8O2r6.js";
7
7
  import "./webrtcLink-BMYneHbu.js";
8
8
  import "./remotes-BxQnNxQv.js";
9
9
 
@@ -98,7 +98,7 @@ async function cmdTermMint(args) {
98
98
  if (flags.ro && flags.interactive) throw new Error("--ro and --interactive are mutually exclusive");
99
99
  const ttlSec = parseTtlSec(typeof flags.ttl === "string" ? flags.ttl : "15m");
100
100
  const canSend = flags.interactive === true;
101
- const { mintScopedTermToken } = await import("./serve-B7wac0SO.js");
101
+ const { mintScopedTermToken } = await import("./serve-BCX0kZ3c.js");
102
102
  const r = await mintScopedTermToken(pid, {
103
103
  ttlSec,
104
104
  canSend
@@ -135,4 +135,4 @@ async function cmdTerm(args) {
135
135
 
136
136
  //#endregion
137
137
  export { cmdTerm };
138
- //# sourceMappingURL=terminal-CqsaYdfP.js.map
138
+ //# sourceMappingURL=terminal-EL7te1tL.js.map
@@ -1,6 +1,6 @@
1
1
  import { n as __esmMin, r as __exportAll } from "./chunk-cZBX9HZv.js";
2
2
  import { n as logger, t as addTransport } from "./logger-CDIsZ-Pp.js";
3
- import { r as getInstalledPackage } from "./versionChecker-txQPlc09.js";
3
+ import { r as getInstalledPackage } from "./versionChecker-CYbMzKN5.js";
4
4
  import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
5
5
  import { d as openStore, p as LIFECYCLES, x as removeControlCharacters } from "./todoAutomation-Buo457VO.js";
6
6
  import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-DBoONoM-.js";
@@ -2027,4 +2027,4 @@ function sleep(ms) {
2027
2027
 
2028
2028
  //#endregion
2029
2029
  export { hasTodoStore as a, AgentContext as c, answerAsk as i, CLAUDE_SESSION_PIN_ENV as l, agentYes as n, listAsks as o, config as r, listAsksForProject as s, CLIS_CONFIG as t };
2030
- //# sourceMappingURL=ts-0WmO0oIH.js.map
2030
+ //# sourceMappingURL=ts-DCOqpivT.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.239.2";
10
+ var version = "1.240.0-beta.576.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-txQPlc09.js.map
218
+ //# sourceMappingURL=versionChecker-CYbMzKN5.js.map
@@ -28,7 +28,7 @@ function parseFlags(args, known) {
28
28
  }
29
29
  /** Resolve the local daemon base URL + token (flags override discovery). */
30
30
  async function daemonTarget(flags) {
31
- const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-B7wac0SO.js");
31
+ const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-BCX0kZ3c.js");
32
32
  const base = typeof flags.base === "string" ? flags.base : await resolveDaemonHttpBase();
33
33
  if (!base) throw new Error("no running ay serve daemon found — start `ay serve` or pass --base <url> (e.g. http://127.0.0.1:PORT)");
34
34
  const token = typeof flags.token === "string" ? flags.token : await loadTokenReadOnly() ?? "";
@@ -186,7 +186,7 @@ async function cmdMint(args) {
186
186
  const bad = caps.filter((c) => !KNOWN_CAPS.has(c));
187
187
  if (bad.length) throw new Error(`unknown cap(s): ${bad.join(", ")} (valid: ${[...KNOWN_CAPS].join(", ")})`);
188
188
  const ttlSec = parseTtlSec(typeof flags.ttl === "string" ? flags.ttl : "15m");
189
- const { mintScopedTermToken } = await import("./serve-B7wac0SO.js");
189
+ const { mintScopedTermToken } = await import("./serve-BCX0kZ3c.js");
190
190
  const r = await mintScopedTermToken(target, {
191
191
  ttlSec,
192
192
  caps
@@ -202,4 +202,4 @@ async function cmdMint(args) {
202
202
 
203
203
  //#endregion
204
204
  export { cmdMint, cmdWidget };
205
- //# sourceMappingURL=widget-Cm-B1N53.js.map
205
+ //# sourceMappingURL=widget-9c55Neff.js.map
@@ -3,7 +3,7 @@ import "./globalPidIndex-D9DOSd-c.js";
3
3
  import "./messageLog-C-YIzhRj.js";
4
4
  import "./e2e-CEIdJGZ7.js";
5
5
  import "./configShared-9wVlbPyC.js";
6
- import { C as listRecords } from "./subcommands-VKWEDfnV.js";
6
+ import { C as listRecords } from "./subcommands-D2M8O2r6.js";
7
7
  import "./webrtcLink-BMYneHbu.js";
8
8
  import "./remotes-BxQnNxQv.js";
9
9
  import { i as getProvisionRoot } from "./workspaceConfig-DOHygA2x.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-D6m3XMxN.js.map
421
+ //# sourceMappingURL=ws-F0OJlND9.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-yes",
3
- "version": "1.239.2",
3
+ "version": "1.240.0-beta.576.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",
package/ts/serve.ts CHANGED
@@ -2159,6 +2159,20 @@ export async function cmdServe(rest: string[]): Promise<number> {
2159
2159
  if (prev && Math.abs(prev.cols - eff.cols) <= 1 && Math.abs(prev.rows - eff.rows) <= 1)
2160
2160
  return;
2161
2161
  const content = `${eff.cols} ${eff.rows} ${Date.now()}\n`;
2162
+ // Log this presence-negotiated resize (mirrors the POST /api/resize log) so
2163
+ // resize-fights are traceable across ALL channels, not just direct HTTP — a
2164
+ // remote console reporting a big viewport cap resizes the shared PTY THROUGH
2165
+ // HERE, which otherwise leaves no trace and looks like "nobody pushed".
2166
+ const srcViewers = [...presence.values()]
2167
+ .filter(
2168
+ (v) => Date.now() - v.ts <= PRESENCE_TTL_MS && String(v.agent) === String(pid) && v.cap,
2169
+ )
2170
+ .map((v) => v.viewer)
2171
+ .join(",");
2172
+ process.stderr.write(
2173
+ `[api/resize] pid=${pid} ${eff.cols}x${eff.rows} src=presence-nego ` +
2174
+ `caps=${liveCapsFor(pid).length} viewers=${srcViewers || "-"}\n`,
2175
+ );
2162
2176
  await mkdir(path.dirname(file), { recursive: true });
2163
2177
  await writeFile(file, content);
2164
2178
  negoApplied.set(pid, { ...eff, content });
@@ -3483,6 +3497,15 @@ export async function cmdServe(rest: string[]): Promise<number> {
3483
3497
  if (!cols || !rows) return new Response("missing cols/rows", { status: 400 });
3484
3498
  try {
3485
3499
  const record = await resolveOne(keyword, defaultOpts());
3500
+ // Trace the SOURCE of every PTY resize: a secondary/observer view (a console
3501
+ // tab, a widget) that force-resizes the shared PTY to its own window can
3502
+ // clobber the agent's terminal (last-writer-wins), and without this it's
3503
+ // impossible to tell who did it. Logs auth kind + origin/referer/UA.
3504
+ process.stderr.write(
3505
+ `[api/resize] pid=${record.pid} ${cols}x${rows} src=api-resize auth=${authResult.kind} ` +
3506
+ `origin=${req.headers.get("origin") ?? "-"} ref=${req.headers.get("referer") ?? "-"} ` +
3507
+ `ua=${(req.headers.get("user-agent") ?? "-").slice(0, 80)}\n`,
3508
+ );
3486
3509
  const ayHome = process.env.AGENT_YES_HOME ?? path.join(homedir(), ".agent-yes");
3487
3510
  const winsizeDir = path.join(ayHome, "winsize");
3488
3511
  await mkdir(winsizeDir, { recursive: true });
package/ts/subcommands.ts CHANGED
@@ -4054,6 +4054,10 @@ async function cmdAttach(rest: string[]): Promise<number> {
4054
4054
  const rows = process.stdout.rows ?? 24;
4055
4055
  try {
4056
4056
  await writeFile(winsizePath, `${cols} ${rows} ${Date.now()}\n`);
4057
+ // Trace the source (mirrors the daemon's /api/resize log) — `ay attach` also
4058
+ // resizes the shared PTY to its terminal, so it must be visible when hunting
4059
+ // a resize-fight. Goes to this attach process's stderr (not the daemon log).
4060
+ process.stderr.write(`[api/resize] pid=${record.pid} ${cols}x${rows} src=ay-attach\n`);
4057
4061
  try {
4058
4062
  process.kill(record.pid, "SIGWINCH");
4059
4063
  } catch {