agent-yes 1.246.0-beta.585.1 → 1.246.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-CsD-GrQq.js";
1
+ import { t as CLIS_CONFIG } from "./ts-OaAlshag.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-B1btYwXQ.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-D_2-k7ZK.js.map
@@ -1,11 +1,11 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-CTvavIkv.js";
3
- import "./ts-CsD-GrQq.js";
2
+ import "./versionChecker-BPMjOlO6.js";
3
+ import "./ts-OaAlshag.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-B1btYwXQ.js";
9
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-D_2-k7ZK.js";
10
10
 
11
11
  export { SUPPORTED_CLIS };
@@ -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-CtI7ubXw.js";
6
+ import { P as resolveOne } from "./subcommands-DIJlW9WX.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-Gl9dPfDx.js.map
232
+ //# sourceMappingURL=agentShare-DhITqvKb.js.map
@@ -1,5 +1,5 @@
1
1
  import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
2
- import { P as resolveOne } from "./subcommands-CtI7ubXw.js";
2
+ import { P as resolveOne } from "./subcommands-DIJlW9WX.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-Bl0i40xQ.js");
75
+ const { resolveLocalServeUrl } = await import("./serve-DsfTZs_W.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-B6tGIeSv.js.map
190
+ //# sourceMappingURL=callback-CeNybWS2.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-CtI7ubXw.js";
6
+ import "./subcommands-DIJlW9WX.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-B6tGIeSv.js";
10
+ import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-CeNybWS2.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-CTvavIkv.js";
5
- import { n as getRustBinary } from "./rustBinary-C9dm1pZ2.js";
4
+ import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-BPMjOlO6.js";
5
+ import { n as getRustBinary } from "./rustBinary-BHVUt_lk.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-B2wWAV5Y.js");
288
+ const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken } = await import("./subcommands-DWIL0HU9.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-Uzf3jzlV.js");
298
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-DcP6VQha.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-Uzf3jzlV.js");
349
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-DcP6VQha.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-CTvavIkv.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-CsD-GrQq.js";
2
+ import "./versionChecker-BPMjOlO6.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-OaAlshag.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-CtI7ubXw.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-DIJlW9WX.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-CvQ264Ql.js.map
592
+ //# sourceMappingURL=notifyDaemon-XpKwV3oq.js.map
@@ -1,4 +1,4 @@
1
- import { r as getInstalledPackage } from "./versionChecker-CTvavIkv.js";
1
+ import { r as getInstalledPackage } from "./versionChecker-BPMjOlO6.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-C9dm1pZ2.js.map
228
+ //# sourceMappingURL=rustBinary-BHVUt_lk.js.map
@@ -1,12 +1,12 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-CTvavIkv.js";
3
- import "./ts-CsD-GrQq.js";
2
+ import "./versionChecker-BPMjOlO6.js";
3
+ import "./ts-OaAlshag.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-B1btYwXQ.js";
9
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-D_2-k7ZK.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-DcVjNs1J.js.map
156
+ //# sourceMappingURL=schedule-JbSWgSN9.js.map
@@ -1,7 +1,7 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import { r as getInstalledPackage } from "./versionChecker-CTvavIkv.js";
3
- import { t as findSpawnHiddenLauncher } from "./rustBinary-C9dm1pZ2.js";
4
- import { i as answerAsk, l as CLAUDE_SESSION_PIN_ENV, o as listAsks } from "./ts-CsD-GrQq.js";
2
+ import { r as getInstalledPackage } from "./versionChecker-BPMjOlO6.js";
3
+ import { t as findSpawnHiddenLauncher } from "./rustBinary-BHVUt_lk.js";
4
+ import { i as answerAsk, l as CLAUDE_SESSION_PIN_ENV, o as listAsks } from "./ts-OaAlshag.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-B1btYwXQ.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-CtI7ubXw.js";
14
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-D_2-k7ZK.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-DIJlW9WX.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-B6tGIeSv.js";
19
+ import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-CeNybWS2.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";
@@ -1790,26 +1790,20 @@ Options:
1790
1790
  try {
1791
1791
  if (eff) {
1792
1792
  negoCapsGoneAt.delete(pid);
1793
- let curr = null;
1793
+ if (prev && Math.abs(prev.cols - eff.cols) <= 1 && Math.abs(prev.rows - eff.rows) <= 1) return;
1794
1794
  try {
1795
- const parts = (await readFile(file, "utf-8")).trim().split(/\s+/);
1796
- const c = Number(parts[0]);
1797
- const r = Number(parts[1]);
1798
- if (Number.isFinite(c) && Number.isFinite(r)) curr = {
1799
- cols: c,
1800
- rows: r
1801
- };
1795
+ const curr = (await readFile(file, "utf-8")).trim().split(/\s+/);
1796
+ if (Number(curr[0]) === eff.cols && Number(curr[1]) === eff.rows) {
1797
+ negoApplied.set(pid, {
1798
+ cols: eff.cols,
1799
+ rows: eff.rows,
1800
+ content: ""
1801
+ });
1802
+ return;
1803
+ }
1802
1804
  } catch {}
1803
- if (curr && Math.abs(curr.cols - eff.cols) <= 1 && Math.abs(curr.rows - eff.rows) <= 1) {
1804
- negoApplied.set(pid, {
1805
- cols: eff.cols,
1806
- rows: eff.rows,
1807
- content: ""
1808
- });
1809
- return;
1810
- }
1811
1805
  const content = `${eff.cols} ${eff.rows} ${Date.now()}\n`;
1812
- process.stderr.write(`[api/resize] pid=${pid} ${eff.cols}x${eff.rows} src=presence-nego daemon=${daemonTag} caps=${caps.length}` + (curr ? ` correct=${curr.cols}x${curr.rows}` : ``) + `\n`);
1806
+ process.stderr.write(`[api/resize] pid=${pid} ${eff.cols}x${eff.rows} src=presence-nego daemon=${daemonTag} caps=${caps.length}\n`);
1813
1807
  await mkdir(path.dirname(file), { recursive: true });
1814
1808
  await writeFile(file, content);
1815
1809
  negoApplied.set(pid, {
@@ -2300,7 +2294,7 @@ Options:
2300
2294
  }
2301
2295
  });
2302
2296
  if (req.method === "GET" && p === "/api/ws") {
2303
- const ws = await import("./ws-_AIu7eoI.js");
2297
+ const ws = await import("./ws-D-givibu.js");
2304
2298
  try {
2305
2299
  await ws.loadProvision();
2306
2300
  } catch (e) {
@@ -2320,7 +2314,7 @@ Options:
2320
2314
  if (req.method === "GET" && p === "/api/ws/status") {
2321
2315
  const dirRaw = url.searchParams.get("path");
2322
2316
  if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
2323
- const ws = await import("./ws-_AIu7eoI.js");
2317
+ const ws = await import("./ws-D-givibu.js");
2324
2318
  let prov;
2325
2319
  try {
2326
2320
  prov = await ws.loadProvision();
@@ -3070,7 +3064,7 @@ Options:
3070
3064
  const perm = body.perm ?? "r";
3071
3065
  if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
3072
3066
  try {
3073
- const { createScopedShare } = await import("./agentShare-Gl9dPfDx.js");
3067
+ const { createScopedShare } = await import("./agentShare-DhITqvKb.js");
3074
3068
  const share = await createScopedShare({
3075
3069
  agent: body.agent,
3076
3070
  perm,
@@ -3085,12 +3079,12 @@ Options:
3085
3079
  }
3086
3080
  }
3087
3081
  if (req.method === "GET" && p === "/api/shares") {
3088
- const { listShares } = await import("./agentShare-Gl9dPfDx.js");
3082
+ const { listShares } = await import("./agentShare-DhITqvKb.js");
3089
3083
  return Response.json(listShares());
3090
3084
  }
3091
3085
  const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
3092
3086
  if (req.method === "DELETE" && revokeM) {
3093
- const { revokeShare } = await import("./agentShare-Gl9dPfDx.js");
3087
+ const { revokeShare } = await import("./agentShare-DhITqvKb.js");
3094
3088
  const ok = revokeShare(decodeURIComponent(revokeM[1]));
3095
3089
  return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
3096
3090
  }
@@ -3392,7 +3386,7 @@ Options:
3392
3386
  const shutdown = (resolve) => {
3393
3387
  if (heartbeat) clearInterval(heartbeat);
3394
3388
  closeShare?.();
3395
- import("./agentShare-Gl9dPfDx.js").then((m) => m.revokeAllShares()).catch(() => {});
3389
+ import("./agentShare-DhITqvKb.js").then((m) => m.revokeAllShares()).catch(() => {});
3396
3390
  server?.stop();
3397
3391
  Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
3398
3392
  };
@@ -3405,4 +3399,4 @@ Options:
3405
3399
 
3406
3400
  //#endregion
3407
3401
  export { cmdServe, loadTokenReadOnly, mintScopedTermToken, resolveDaemonHttpBase, resolveLocalServeUrl };
3408
- //# sourceMappingURL=serve-Bl0i40xQ.js.map
3402
+ //# sourceMappingURL=serve-DsfTZs_W.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-Bl0i40xQ.js");
35
+ const { cmdServe } = await import("./serve-DsfTZs_W.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-BchvJ7Lk.js.map
45
+ //# sourceMappingURL=setup-PZhaZPTH.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-FwkzPH4u.js");
1270
+ const { cmdTerm } = await import("./terminal-DGFIXF4G.js");
1271
1271
  return cmdTerm(rest);
1272
1272
  }
1273
1273
  case "widget": {
1274
- const { cmdWidget } = await import("./widget-BelWGdzp.js");
1274
+ const { cmdWidget } = await import("./widget-DneBUOXf.js");
1275
1275
  return cmdWidget(rest);
1276
1276
  }
1277
1277
  case "mint": {
1278
- const { cmdMint } = await import("./widget-BelWGdzp.js");
1278
+ const { cmdMint } = await import("./widget-DneBUOXf.js");
1279
1279
  return cmdMint(rest);
1280
1280
  }
1281
1281
  case "serve": {
1282
- const { cmdServe } = await import("./serve-Bl0i40xQ.js");
1282
+ const { cmdServe } = await import("./serve-DsfTZs_W.js");
1283
1283
  return cmdServe(rest);
1284
1284
  }
1285
1285
  case "setup": {
1286
- const { cmdSetup } = await import("./setup-BchvJ7Lk.js");
1286
+ const { cmdSetup } = await import("./setup-PZhaZPTH.js");
1287
1287
  return cmdSetup(rest);
1288
1288
  }
1289
1289
  case "ws": {
1290
- const { cmdWs } = await import("./ws-_AIu7eoI.js");
1290
+ const { cmdWs } = await import("./ws-D-givibu.js");
1291
1291
  return cmdWs(rest);
1292
1292
  }
1293
1293
  case "schedule": {
1294
- const { cmdSchedule } = await import("./schedule-DcVjNs1J.js");
1294
+ const { cmdSchedule } = await import("./schedule-JbSWgSN9.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-DnNGi83L.js");
1306
+ const { cmdCallback } = await import("./callback-DdLX8E0I.js");
1307
1307
  return cmdCallback(rest);
1308
1308
  }
1309
1309
  case "reap":
@@ -3706,11 +3706,11 @@ async function cmdAttach(rest) {
3706
3706
  const winsizeDir = path.join(ayHome, "winsize");
3707
3707
  await mkdir(winsizeDir, { recursive: true });
3708
3708
  const winsizePath = path.join(winsizeDir, String(record.pid));
3709
- const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-Bl0i40xQ.js");
3709
+ const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-DsfTZs_W.js");
3710
3710
  const daemonBase = await resolveDaemonHttpBase().catch(() => null);
3711
- const daemonToken = daemonBase ? await loadTokenReadOnly().catch(() => null) ?? "" : "";
3711
+ const daemonToken = daemonBase ? await loadTokenReadOnly().catch(() => null) : null;
3712
3712
  const capViewer = `attach:${process.pid}`;
3713
- let capMode = !!daemonBase;
3713
+ let capMode = !!(daemonBase && daemonToken);
3714
3714
  const writeWinsizeDirect = async (cols, rows) => {
3715
3715
  try {
3716
3716
  await writeFile(winsizePath, `${cols} ${rows} ${Date.now()}\n`);
@@ -3721,9 +3721,8 @@ async function cmdAttach(rest) {
3721
3721
  } catch {}
3722
3722
  };
3723
3723
  const sendResize = async () => {
3724
- const cols = process.stdout.columns ?? 0;
3725
- const rows = process.stdout.rows ?? 0;
3726
- if (cols < 1 || rows < 1) return;
3724
+ const cols = process.stdout.columns ?? 80;
3725
+ const rows = process.stdout.rows ?? 24;
3727
3726
  if (capMode && daemonBase && daemonToken) {
3728
3727
  try {
3729
3728
  if ((await fetch(`${daemonBase}/api/resize/${encodeURIComponent(String(record.pid))}?token=${encodeURIComponent(daemonToken)}`, {
@@ -3812,8 +3811,6 @@ async function cmdAttach(rest) {
3812
3811
  detached = true;
3813
3812
  if (pollTimer) clearInterval(pollTimer);
3814
3813
  if (aliveCheck) clearInterval(aliveCheck);
3815
- process.off("SIGTERM", onSignalExit);
3816
- process.off("SIGHUP", onSignalExit);
3817
3814
  withdrawAttachCap();
3818
3815
  watcher.close();
3819
3816
  process.stdout.removeListener("resize", onResize);
@@ -3848,12 +3845,6 @@ async function cmdAttach(rest) {
3848
3845
  triggerDetach();
3849
3846
  };
3850
3847
  process.stdin.on("data", onStdinData);
3851
- const onSignalExit = () => {
3852
- triggerDetach();
3853
- setTimeout(() => process.exit(0), 200);
3854
- };
3855
- process.on("SIGTERM", onSignalExit);
3856
- process.on("SIGHUP", onSignalExit);
3857
3848
  aliveCheck = setInterval(() => {
3858
3849
  if (!isPidAlive(record.pid)) {
3859
3850
  process.stderr.write(`\n[pid ${record.pid} exited]\n`);
@@ -4394,7 +4385,7 @@ async function cmdNotify(rest) {
4394
4385
  }
4395
4386
  const ensure = async () => {
4396
4387
  if (!argv["ensure-daemon"]) return;
4397
- const { ensureDaemon } = await import("./notifyDaemon-CvQ264Ql.js");
4388
+ const { ensureDaemon } = await import("./notifyDaemon-XpKwV3oq.js");
4398
4389
  await ensureDaemon().catch(() => null);
4399
4390
  };
4400
4391
  await heartbeatWatcher(parent, selfStartedAt);
@@ -4468,7 +4459,7 @@ async function cmdNotifyCursor(args) {
4468
4459
  }
4469
4460
  async function cmdNotifyd(rest) {
4470
4461
  const sub = rest[0] ?? "status";
4471
- const daemon = await import("./notifyDaemon-CvQ264Ql.js");
4462
+ const daemon = await import("./notifyDaemon-XpKwV3oq.js");
4472
4463
  switch (sub) {
4473
4464
  case "run": return daemon.runDaemon();
4474
4465
  case "once": return daemon.runDaemon({ once: true });
@@ -4495,4 +4486,4 @@ async function cmdNotifyd(rest) {
4495
4486
 
4496
4487
  //#endregion
4497
4488
  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 };
4498
- //# sourceMappingURL=subcommands-CtI7ubXw.js.map
4489
+ //# sourceMappingURL=subcommands-DIJlW9WX.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-CtI7ubXw.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-DIJlW9WX.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-Bl0i40xQ.js");
101
+ const { mintScopedTermToken } = await import("./serve-DsfTZs_W.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-FwkzPH4u.js.map
138
+ //# sourceMappingURL=terminal-DGFIXF4G.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-CTvavIkv.js";
3
+ import { r as getInstalledPackage } from "./versionChecker-BPMjOlO6.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-CsD-GrQq.js.map
2030
+ //# sourceMappingURL=ts-OaAlshag.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.246.0-beta.585.1";
10
+ var version = "1.246.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-CTvavIkv.js.map
218
+ //# sourceMappingURL=versionChecker-BPMjOlO6.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-Bl0i40xQ.js");
31
+ const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-DsfTZs_W.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-Bl0i40xQ.js");
189
+ const { mintScopedTermToken } = await import("./serve-DsfTZs_W.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-BelWGdzp.js.map
205
+ //# sourceMappingURL=widget-DneBUOXf.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-CtI7ubXw.js";
6
+ import { C as listRecords } from "./subcommands-DIJlW9WX.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-_AIu7eoI.js.map
421
+ //# sourceMappingURL=ws-D-givibu.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-yes",
3
- "version": "1.246.0-beta.585.1",
3
+ "version": "1.246.0",
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
@@ -2213,40 +2213,30 @@ export async function cmdServe(rest: string[]): Promise<number> {
2213
2213
  try {
2214
2214
  if (eff) {
2215
2215
  negoCapsGoneAt.delete(pid); // caps are back — cancel any pending withdraw
2216
- // RECONCILE the winsize to the negotiated min. Compare against the ACTUAL
2217
- // winsize on disk — NOT the last value we ourselves negotiated (`prev`) — so
2218
- // that a drift introduced by a FOREIGN writer gets healed: `ay attach`'s
2219
- // direct fallback, a `force:true` resize, or an old console can pin the file
2220
- // to some other size, and with no subsequent cap change the old prev-only dead
2221
- // band never corrected it → a stale size (e.g. 80×24) lingered forever
2222
- // (grocy's design gap). The ±1-cell band still absorbs a viewer's open-time
2223
- // capacity jitter AND makes a sibling daemon's identical write a no-op (no
2224
- // cross-daemon same-size thrash). The 5s grow-back sweep re-runs this, so a
2225
- // foreign write is reconciled within ~5s even without a cap change.
2226
- let curr: { cols: number; rows: number } | null = null;
2216
+ // ±1-cell dead band: a viewer's reported capacity jitters by a row/col
2217
+ // between visits (open-time layout vs steady state), and a 1-cell
2218
+ // SIGWINCH reflow on every re-visit is exactly the churn users notice.
2219
+ if (prev && Math.abs(prev.cols - eff.cols) <= 1 && Math.abs(prev.rows - eff.rows) <= 1)
2220
+ return;
2221
+ // Cross-daemon convergence: if the winsize file ALREADY holds this size (a
2222
+ // sibling daemon negotiated the same min), do NOT rewrite/re-SIGWINCH — else
2223
+ // two daemons thrash the PTY with same-size, different-timestamp writes.
2227
2224
  try {
2228
- const parts = (await readFile(file, "utf-8")).trim().split(/\s+/);
2229
- const c = Number(parts[0]);
2230
- const r = Number(parts[1]);
2231
- if (Number.isFinite(c) && Number.isFinite(r)) curr = { cols: c, rows: r };
2225
+ const curr = (await readFile(file, "utf-8")).trim().split(/\s+/);
2226
+ if (Number(curr[0]) === eff.cols && Number(curr[1]) === eff.rows) {
2227
+ negoApplied.set(pid, { cols: eff.cols, rows: eff.rows, content: "" });
2228
+ return;
2229
+ }
2232
2230
  } catch {
2233
- /* no winsize file yet — treat as drift and write it */
2234
- }
2235
- if (curr && Math.abs(curr.cols - eff.cols) <= 1 && Math.abs(curr.rows - eff.rows) <= 1) {
2236
- // Already at (≈) the negotiated size — nothing to correct.
2237
- negoApplied.set(pid, { cols: eff.cols, rows: eff.rows, content: "" });
2238
- return;
2231
+ /* no winsize file yet — fall through and write it */
2239
2232
  }
2240
2233
  const content = `${eff.cols} ${eff.rows} ${Date.now()}\n`;
2241
2234
  // Trace the negotiated resize + this daemon's identity (multi-daemon topology:
2242
2235
  // the HTTP daemon and each --webrtc share daemon each negotiate off the shared
2243
2236
  // store; the trace shows which one wrote, so a resize-fight is diagnosable).
2244
- // `correct=` shows the drifted size we healed (a foreign write), if any.
2245
2237
  process.stderr.write(
2246
2238
  `[api/resize] pid=${pid} ${eff.cols}x${eff.rows} src=presence-nego ` +
2247
- `daemon=${daemonTag} caps=${caps.length}` +
2248
- (curr ? ` correct=${curr.cols}x${curr.rows}` : ``) +
2249
- `\n`,
2239
+ `daemon=${daemonTag} caps=${caps.length}\n`,
2250
2240
  );
2251
2241
  await mkdir(path.dirname(file), { recursive: true });
2252
2242
  await writeFile(file, content);
package/ts/subcommands.ts CHANGED
@@ -4056,13 +4056,9 @@ async function cmdAttach(rest: string[]): Promise<number> {
4056
4056
  // no daemon is running — then this attach is the sole authority and drives it itself.
4057
4057
  const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve.ts");
4058
4058
  const daemonBase = await resolveDaemonHttpBase().catch(() => null);
4059
- // The token may legitimately be "" — a localhost daemon started without a
4060
- // .serve-token accepts an empty token as master. Gate cap mode on the BASE alone,
4061
- // exactly like `ay widget ls` (which discovers the same daemon and works with ""):
4062
- // requiring a non-null token here is what wrongly dropped attach to the direct path.
4063
- const daemonToken = daemonBase ? ((await loadTokenReadOnly().catch(() => null)) ?? "") : "";
4059
+ const daemonToken = daemonBase ? await loadTokenReadOnly().catch(() => null) : null;
4064
4060
  const capViewer = `attach:${process.pid}`;
4065
- let capMode = !!daemonBase;
4061
+ let capMode = !!(daemonBase && daemonToken);
4066
4062
 
4067
4063
  const writeWinsizeDirect = async (cols: number, rows: number) => {
4068
4064
  try {
@@ -4078,12 +4074,8 @@ async function cmdAttach(rest: string[]): Promise<number> {
4078
4074
  }
4079
4075
  };
4080
4076
  const sendResize = async () => {
4081
- const cols = process.stdout.columns ?? 0;
4082
- const rows = process.stdout.rows ?? 0;
4083
- // Size not ready yet (a freshly-allocated pty — e.g. under script(1) — reports
4084
- // 0×0 for a beat): skip rather than drive the agent to 0×0. The stdout "resize"
4085
- // listener fires sendResize again once the real size lands.
4086
- if (cols < 1 || rows < 1) return;
4077
+ const cols = process.stdout.columns ?? 80;
4078
+ const rows = process.stdout.rows ?? 24;
4087
4079
  // Cap path: POST /api/resize (cap-report; the daemon publishCap+scheduleNego's it).
4088
4080
  if (capMode && daemonBase && daemonToken) {
4089
4081
  try {
@@ -4202,8 +4194,6 @@ async function cmdAttach(rest: string[]): Promise<number> {
4202
4194
  detached = true;
4203
4195
  if (pollTimer) clearInterval(pollTimer);
4204
4196
  if (aliveCheck) clearInterval(aliveCheck);
4205
- process.off("SIGTERM", onSignalExit);
4206
- process.off("SIGHUP", onSignalExit);
4207
4197
  void withdrawAttachCap(); // release our size cap so the PTY re-negotiates without us
4208
4198
  watcher.close();
4209
4199
  process.stdout.removeListener("resize", onResize);
@@ -4250,20 +4240,6 @@ async function cmdAttach(rest: string[]): Promise<number> {
4250
4240
  };
4251
4241
  process.stdin.on("data", onStdinData);
4252
4242
 
4253
- // `kill`/SIGHUP (e.g. the controlling terminal closing) must run the same cleanup
4254
- // as a manual detach — restore cooked mode AND withdraw our size cap — else the
4255
- // agent's PTY is left pinned at this attach's size (grocy: kill -TERM left 80×24).
4256
- // In raw mode Ctrl-C arrives as a stdin byte, not SIGINT, so SIGINT isn't handled
4257
- // here (it'd double-fire); SIGTERM/SIGHUP are the `kill` paths that need it.
4258
- const onSignalExit = () => {
4259
- triggerDetach(); // restores the terminal (sync) + fires the async cap withdraw
4260
- // give withdrawAttachCap's fetch a beat to reach the daemon before we exit; the
4261
- // daemon's TTL + nego reconciliation heal it even if the process dies first.
4262
- setTimeout(() => process.exit(0), 200);
4263
- };
4264
- process.on("SIGTERM", onSignalExit);
4265
- process.on("SIGHUP", onSignalExit);
4266
-
4267
4243
  // 7. Detach automatically if the agent exits.
4268
4244
  aliveCheck = setInterval(() => {
4269
4245
  if (!isPidAlive(record.pid)) {