agent-yes 1.298.0 → 1.298.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.
Files changed (33) hide show
  1. package/dist/{SUPPORTED_CLIS-BuCUpIsD.js → SUPPORTED_CLIS-AzChegaJ.js} +3 -3
  2. package/dist/{SUPPORTED_CLIS-CghmN9y4.js → SUPPORTED_CLIS-sxjBFTrE.js} +2 -2
  3. package/dist/{agentShare-C2z05Xu1.js → agentShare-CDOvU64K.js} +2 -2
  4. package/dist/{callback-DULGSaDT.js → callback-DBOgmPV6.js} +3 -3
  5. package/dist/{callback-Blg3DkI3.js → callback-Dr5rqkUu.js} +2 -2
  6. package/dist/cli.js +5 -5
  7. package/dist/{cmdPs-CNue6rFE.js → cmdPs-DKuMlynW.js} +2 -2
  8. package/dist/index.js +2 -2
  9. package/dist/{notifyDaemon-BPpVmmj0.js → notifyDaemon-Ceyhz4el.js} +2 -2
  10. package/dist/{parentPingLoop-BPcqwhCS.js → parentPingLoop-C0hekeg6.js} +2 -2
  11. package/dist/rustBinary-0cD4pQIE.js +4 -0
  12. package/dist/{rustBinary-B_KR43x9.js → rustBinary-BW3BGZ4y.js} +31 -4
  13. package/dist/{schedule-2xXpYxCv.js → schedule-BRC5cDkf.js} +4 -4
  14. package/dist/{serve-cvUh5Oab.js → serve-BD-7GaKa.js} +18 -18
  15. package/dist/{setup-Ba2SPIhs.js → setup-Dad2A_-o.js} +2 -2
  16. package/dist/{subcommands-DoKUSvaF.js → subcommands--9gcc0ew.js} +15 -15
  17. package/dist/{subcommands-btyolh0m.js → subcommands-ClQCwxvk.js} +1 -1
  18. package/dist/{terminal-DOY_IN5y.js → terminal-Bam4XVWi.js} +2 -2
  19. package/dist/{trayApp-7pq0tDGE.js → trayApp-DOgsH0en.js} +2 -2
  20. package/dist/trayApp-s2VuJUP4.js +5 -0
  21. package/dist/{ts-Cet9EhtO.js → ts-BePSXUQl.js} +3 -3
  22. package/dist/{versionChecker-BtYHFqjF.js → versionChecker-D6zM6Pdv.js} +2 -2
  23. package/dist/{widget-DKt2rH9F.js → widget-DJgiOfgE.js} +3 -3
  24. package/dist/{ws-DgZVBJje.js → ws-Covfyaxn.js} +2 -2
  25. package/dist/{ws-Bs9AVLZR.js → ws-DjGQGPCq.js} +2 -2
  26. package/package.json +1 -1
  27. package/ts/rustBinary.spec.ts +22 -2
  28. package/ts/rustBinary.ts +31 -1
  29. package/ts/serveLock.bun.spec.ts +8 -3
  30. package/ts/serveLock.spec.ts +8 -3
  31. package/ts/subcommands.spec.ts +3 -2
  32. package/dist/rustBinary-D59v2mmy.js +0 -4
  33. package/dist/trayApp-DAs4YVeV.js +0 -5
@@ -1,12 +1,12 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-BtYHFqjF.js";
3
- import "./ts-Cet9EhtO.js";
2
+ import "./versionChecker-D6zM6Pdv.js";
3
+ import "./ts-BePSXUQl.js";
4
4
  import "./todoAutomation-CbVVS4re.js";
5
5
  import "./JsonlStore-BqF7AQ6E.js";
6
6
  import "./globalPidIndex-CRH9L9tn.js";
7
7
  import "./pidStore-DXWqzTSz.js";
8
8
  import "./messageLog-Brx3w6zT.js";
9
9
  import "./todoStore-DF6vxHgV.js";
10
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CghmN9y4.js";
10
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-sxjBFTrE.js";
11
11
 
12
12
  export { SUPPORTED_CLIS };
@@ -1,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-Cet9EhtO.js";
1
+ import { t as CLIS_CONFIG } from "./ts-BePSXUQl.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-CghmN9y4.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-sxjBFTrE.js.map
@@ -5,7 +5,7 @@ import "./pidStore-DXWqzTSz.js";
5
5
  import "./messageLog-Brx3w6zT.js";
6
6
  import "./e2e-z1xpwSAg.js";
7
7
  import "./configShared-DKTgiz7K.js";
8
- import { J as resolveOne } from "./subcommands-DoKUSvaF.js";
8
+ import { J as resolveOne } from "./subcommands--9gcc0ew.js";
9
9
  import "./notifyStore-2SWKGwZI.js";
10
10
  import "./webrtcLink-CnQf9pmu.js";
11
11
  import "./remotes-5P__pAXA.js";
@@ -232,4 +232,4 @@ function transformEvent(rawEvent, agentId, forwarded) {
232
232
 
233
233
  //#endregion
234
234
  export { createScopedShare, listShares, revokeAllShares, revokeShare };
235
- //# sourceMappingURL=agentShare-C2z05Xu1.js.map
235
+ //# sourceMappingURL=agentShare-CDOvU64K.js.map
@@ -1,5 +1,5 @@
1
1
  import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
2
- import { J as resolveOne } from "./subcommands-DoKUSvaF.js";
2
+ import { J as resolveOne } from "./subcommands--9gcc0ew.js";
3
3
  import { a as mintCapability, o as parseExpires } from "./callbackCore-Bl2gGcxg.js";
4
4
  import { randomBytes } from "node:crypto";
5
5
  import { chmodSync, readFileSync, renameSync, writeFileSync } from "node:fs";
@@ -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-cvUh5Oab.js");
75
+ const { resolveLocalServeUrl } = await import("./serve-BD-7GaKa.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-DULGSaDT.js.map
190
+ //# sourceMappingURL=callback-DBOgmPV6.js.map
@@ -5,11 +5,11 @@ import "./pidStore-DXWqzTSz.js";
5
5
  import "./messageLog-Brx3w6zT.js";
6
6
  import "./e2e-z1xpwSAg.js";
7
7
  import "./configShared-DKTgiz7K.js";
8
- import "./subcommands-DoKUSvaF.js";
8
+ import "./subcommands--9gcc0ew.js";
9
9
  import "./notifyStore-2SWKGwZI.js";
10
10
  import "./webrtcLink-CnQf9pmu.js";
11
11
  import "./remotes-5P__pAXA.js";
12
12
  import "./callbackCore-Bl2gGcxg.js";
13
- import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-DULGSaDT.js";
13
+ import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-DBOgmPV6.js";
14
14
 
15
15
  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-zdFbz1ST.js";
3
3
  import { n as logger } from "./logger-CDIsZ-Pp.js";
4
- import { a as versionString, r as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-BtYHFqjF.js";
5
- import { d as getRustBinary } from "./rustBinary-B_KR43x9.js";
4
+ import { a as versionString, r as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-D6zM6Pdv.js";
5
+ import { d as getRustBinary } from "./rustBinary-BW3BGZ4y.js";
6
6
  import { argv } from "process";
7
7
  import { spawn } from "child_process";
8
8
  import ms from "ms";
@@ -295,7 +295,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
295
295
  const rawArg = process.argv[2];
296
296
  const managerCommands = !invokedCliName(process.argv);
297
297
  const isHelpFlag = rawArg === "-h" || rawArg === "--help";
298
- const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken, isBareManagerInvocation } = await import("./subcommands-btyolh0m.js");
298
+ const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken, isBareManagerInvocation } = await import("./subcommands-ClQCwxvk.js");
299
299
  if (isHelpFlag && process.argv.length === 3) {
300
300
  await cmdHelp(managerCommands);
301
301
  process.exit(0);
@@ -309,7 +309,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
309
309
  process.exit(code ?? 0);
310
310
  }
311
311
  {
312
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BuCUpIsD.js");
312
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-AzChegaJ.js");
313
313
  if (isUnknownManagerToken(rawArg, managerCommands, SUPPORTED_CLIS)) {
314
314
  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`);
315
315
  process.exit(1);
@@ -360,7 +360,7 @@ if (config.useRust) {
360
360
  }
361
361
  }
362
362
  if (rustBinary) {
363
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BuCUpIsD.js");
363
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-AzChegaJ.js");
364
364
  const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
365
365
  if (config.verbose) {
366
366
  console.log(`[rust] Using binary: ${rustBinary}`);
@@ -5,7 +5,7 @@ import "./pidStore-DXWqzTSz.js";
5
5
  import "./messageLog-Brx3w6zT.js";
6
6
  import "./e2e-z1xpwSAg.js";
7
7
  import "./configShared-DKTgiz7K.js";
8
- import { F as listRecords, dt as buildAgentForest, ft as flattenForest, h as deriveLiveState } from "./subcommands-DoKUSvaF.js";
8
+ import { F as listRecords, dt as buildAgentForest, ft as flattenForest, h as deriveLiveState } from "./subcommands--9gcc0ew.js";
9
9
  import "./notifyStore-2SWKGwZI.js";
10
10
  import "./webrtcLink-CnQf9pmu.js";
11
11
  import "./remotes-5P__pAXA.js";
@@ -330,4 +330,4 @@ function readPpidSync(pid) {
330
330
 
331
331
  //#endregion
332
332
  export { cmdPs };
333
- //# sourceMappingURL=cmdPs-CNue6rFE.js.map
333
+ //# sourceMappingURL=cmdPs-DKuMlynW.js.map
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-BtYHFqjF.js";
3
- import { a as hasTodoStore, i as answerAsk, l as AgentContext, n as agentYes, o as listAsks, r as config, s as listAsksForProject, t as CLIS_CONFIG } from "./ts-Cet9EhtO.js";
2
+ import "./versionChecker-D6zM6Pdv.js";
3
+ import { a as hasTodoStore, i as answerAsk, l as AgentContext, n as agentYes, o as listAsks, r as config, s as listAsksForProject, t as CLIS_CONFIG } from "./ts-BePSXUQl.js";
4
4
  import { a as renderTree, c as describeBlock, i as renderDigest, l as monitorHint, o as unblockedTasks, r as openBlockers, t as reconcileTodos, u as removeControlCharacters } from "./todoAutomation-CbVVS4re.js";
5
5
  import "./JsonlStore-BqF7AQ6E.js";
6
6
  import "./globalPidIndex-CRH9L9tn.js";
@@ -5,7 +5,7 @@ import "./pidStore-DXWqzTSz.js";
5
5
  import "./messageLog-Brx3w6zT.js";
6
6
  import "./e2e-z1xpwSAg.js";
7
7
  import "./configShared-DKTgiz7K.js";
8
- import { D as isPidAlive, F as listRecords, G as renderLogTailLines, h as deriveLiveState } from "./subcommands-DoKUSvaF.js";
8
+ import { D as isPidAlive, F as listRecords, G as renderLogTailLines, h as deriveLiveState } from "./subcommands--9gcc0ew.js";
9
9
  import { f as readInbox, g as daemonLockOwnerPath, h as daemonLockDir, i as gcInboxes, l as listInboxParents, m as shouldStealLock, n as appendEvent, s as hostId, u as liveWatchers, x as notifyDir } from "./notifyStore-2SWKGwZI.js";
10
10
  import "./webrtcLink-CnQf9pmu.js";
11
11
  import "./remotes-5P__pAXA.js";
@@ -879,4 +879,4 @@ async function ensureDaemon() {
879
879
 
880
880
  //#endregion
881
881
  export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
882
- //# sourceMappingURL=notifyDaemon-BPpVmmj0.js.map
882
+ //# sourceMappingURL=notifyDaemon-Ceyhz4el.js.map
@@ -338,7 +338,7 @@ async function isParentWatching(parentWrapperPid, parentAgentPid, selfAgentPid,
338
338
  logger.debug("[parent-ping] watcher lookup failed:", error);
339
339
  }
340
340
  try {
341
- const { lastReadAt, READ_WINDOW_MS } = await import("./subcommands-btyolh0m.js");
341
+ const { lastReadAt, READ_WINDOW_MS } = await import("./subcommands-ClQCwxvk.js");
342
342
  const last = await lastReadAt(`agent:${parentAgentPid}`, selfAgentPid);
343
343
  if (last !== null && now - last <= READ_WINDOW_MS) return true;
344
344
  } catch (error) {
@@ -466,4 +466,4 @@ function startParentPingLoop(opts) {
466
466
 
467
467
  //#endregion
468
468
  export { startParentPingLoop };
469
- //# sourceMappingURL=parentPingLoop-BPcqwhCS.js.map
469
+ //# sourceMappingURL=parentPingLoop-C0hekeg6.js.map
@@ -0,0 +1,4 @@
1
+ import "./versionChecker-D6zM6Pdv.js";
2
+ import { a as findSpawnHiddenLauncher, c as getBinDir, d as getRustBinary, f as hasValidMacSignature, i as findRustBinary, l as getBinaryName, n as downloadBinary, o as findTrayLauncher, r as findAyrsBinary, s as gcOldBinaryDirs, t as devBuildInfo, u as getDownloadUrl } from "./rustBinary-BW3BGZ4y.js";
3
+
4
+ export { findAyrsBinary, gcOldBinaryDirs };
@@ -1,4 +1,4 @@
1
- import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-BtYHFqjF.js";
1
+ import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-D6zM6Pdv.js";
2
2
  import { execFileSync } from "child_process";
3
3
  import { existsSync, mkdirSync, readdirSync, rmSync, statSync, unlinkSync } from "fs";
4
4
  import { chmod, copyFile } from "fs/promises";
@@ -318,6 +318,28 @@ function autoRebuildIfOutdated(binaryPath, verbose) {
318
318
  }
319
319
  }
320
320
  /**
321
+ * macOS only: does `binaryPath` carry a code signature the kernel will accept?
322
+ *
323
+ * On Apple Silicon an arm64 Mach-O with no (or a broken) signature is SIGKILLed
324
+ * at exec — no stderr, just exit 137 — so a cached download damaged on disk
325
+ * makes every `ay <cli>` die silently right after the version banner. Release
326
+ * binaries are linker-signed (ad-hoc), so `codesign --verify` passing is the
327
+ * cheap "will this even start" check. Off macOS, or when `codesign` itself is
328
+ * unavailable, report valid: never block a run on the probe.
329
+ */
330
+ function hasValidMacSignature(binaryPath) {
331
+ if (process.platform !== "darwin") return true;
332
+ try {
333
+ execFileSync("codesign", ["--verify", binaryPath], {
334
+ timeout: 1e4,
335
+ stdio: "ignore"
336
+ });
337
+ return true;
338
+ } catch (err) {
339
+ return err?.code === "ENOENT";
340
+ }
341
+ }
342
+ /**
321
343
  * Get or download the Rust binary
322
344
  */
323
345
  async function getRustBinary(options = {}) {
@@ -328,7 +350,12 @@ async function getRustBinary(options = {}) {
328
350
  } catch {}
329
351
  if (!forceDownload) {
330
352
  const existing = findRustBinary(verbose);
331
- if (existing) {
353
+ if (existing && !devBuildInfo(existing) && !hasValidMacSignature(existing)) {
354
+ process.stderr.write(`\x1b[33m[rust] Cached binary has an invalid code signature, re-downloading: ${existing}\x1b[0m\n`);
355
+ try {
356
+ unlinkSync(existing);
357
+ } catch {}
358
+ } else if (existing) {
332
359
  if (verbose) console.log(`[rust] Using existing binary: ${existing}`);
333
360
  autoRebuildIfOutdated(existing, verbose);
334
361
  return existing;
@@ -343,5 +370,5 @@ async function getRustBinary(options = {}) {
343
370
  }
344
371
 
345
372
  //#endregion
346
- export { findSpawnHiddenLauncher as a, getBinDir as c, getRustBinary as d, findRustBinary as i, getBinaryName as l, downloadBinary as n, findTrayLauncher as o, findAyrsBinary as r, gcOldBinaryDirs as s, devBuildInfo as t, getDownloadUrl as u };
347
- //# sourceMappingURL=rustBinary-B_KR43x9.js.map
373
+ export { findSpawnHiddenLauncher as a, getBinDir as c, getRustBinary as d, hasValidMacSignature as f, findRustBinary as i, getBinaryName as l, downloadBinary as n, findTrayLauncher as o, findAyrsBinary as r, gcOldBinaryDirs as s, devBuildInfo as t, getDownloadUrl as u };
374
+ //# sourceMappingURL=rustBinary-BW3BGZ4y.js.map
@@ -1,13 +1,13 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-BtYHFqjF.js";
3
- import "./ts-Cet9EhtO.js";
2
+ import "./versionChecker-D6zM6Pdv.js";
3
+ import "./ts-BePSXUQl.js";
4
4
  import "./todoAutomation-CbVVS4re.js";
5
5
  import "./JsonlStore-BqF7AQ6E.js";
6
6
  import "./globalPidIndex-CRH9L9tn.js";
7
7
  import "./pidStore-DXWqzTSz.js";
8
8
  import "./messageLog-Brx3w6zT.js";
9
9
  import "./todoStore-DF6vxHgV.js";
10
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CghmN9y4.js";
10
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-sxjBFTrE.js";
11
11
  import { f as resolveSpawnCwd } from "./workspaceConfig-DTvPtr5j.js";
12
12
  import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-CipjIwfO.js";
13
13
  import { createHash } from "node:crypto";
@@ -154,4 +154,4 @@ async function cmdSchedule(rest) {
154
154
 
155
155
  //#endregion
156
156
  export { cmdSchedule };
157
- //# sourceMappingURL=schedule-2xXpYxCv.js.map
157
+ //# sourceMappingURL=schedule-BRC5cDkf.js.map
@@ -1,7 +1,7 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import { i as getInstalledPackage } from "./versionChecker-BtYHFqjF.js";
3
- import { a as findSpawnHiddenLauncher } from "./rustBinary-B_KR43x9.js";
4
- import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-Cet9EhtO.js";
2
+ import { i as getInstalledPackage } from "./versionChecker-D6zM6Pdv.js";
3
+ import { a as findSpawnHiddenLauncher } from "./rustBinary-BW3BGZ4y.js";
4
+ import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-BePSXUQl.js";
5
5
  import { t as agentYesHome$1 } from "./agentYesHome-BNtn19J4.js";
6
6
  import { u as removeControlCharacters } from "./todoAutomation-CbVVS4re.js";
7
7
  import "./JsonlStore-BqF7AQ6E.js";
@@ -12,19 +12,19 @@ import { t as pgidForWrapper } from "./reaper-UimuuTfO.js";
12
12
  import "./todoStore-DF6vxHgV.js";
13
13
  import "./e2e-z1xpwSAg.js";
14
14
  import "./configShared-DKTgiz7K.js";
15
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CghmN9y4.js";
16
- import { B as readLogForRender, F as listRecords, G as renderLogTailLines, H as readPtysize, J as resolveOne, K as renderRawLog, M as isUserTyping, O as isSlashCommand, S as extractTaskCounts, U as recentMessageEdges, V as readNotes, W as recentReadEdges, ct as framePaste, et as snapshotStatus, g as deriveLiveStatus, lt as shouldFramePaste, ot as writeToIpc, p as controlCodeFromName, q as renderRawLogLines, st as withIpcLock, u as cliDefaults, ut as TYPING_BADGE, x as extractNeedsInput, y as extractBadges } from "./subcommands-DoKUSvaF.js";
15
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-sxjBFTrE.js";
16
+ import { B as readLogForRender, F as listRecords, G as renderLogTailLines, H as readPtysize, J as resolveOne, K as renderRawLog, M as isUserTyping, O as isSlashCommand, S as extractTaskCounts, U as recentMessageEdges, V as readNotes, W as recentReadEdges, ct as framePaste, et as snapshotStatus, g as deriveLiveStatus, lt as shouldFramePaste, ot as writeToIpc, p as controlCodeFromName, q as renderRawLogLines, st as withIpcLock, u as cliDefaults, ut as TYPING_BADGE, x as extractNeedsInput, y as extractBadges } from "./subcommands--9gcc0ew.js";
17
17
  import { c as isTransientLockMkdirError } from "./notifyStore-2SWKGwZI.js";
18
18
  import { i as toWebrtcUrl, n as isWebrtcSpec } from "./webrtcLink-CnQf9pmu.js";
19
19
  import "./remotes-5P__pAXA.js";
20
20
  import { i as frameVisitorMessage, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-Bl2gGcxg.js";
21
- import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-DULGSaDT.js";
21
+ import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-DBOgmPV6.js";
22
22
  import { n as sampleTrees } from "./procStats-CyD8h5nx.js";
23
23
  import { a as getProvisionRoot, d as isProvisionAllowed, f as resolveSpawnCwd, i as getProvisionHook, l as hasProvisionHook, o as getSpawnHook, t as allowsSkipPermissions, u as hasSpawnHook } from "./workspaceConfig-DTvPtr5j.js";
24
24
  import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-CipjIwfO.js";
25
- import { i as importProvisionModule } from "./ws-DgZVBJje.js";
25
+ import { i as importProvisionModule } from "./ws-Covfyaxn.js";
26
26
  import { r as spawnRejectionReason } from "./spawnGate-YpHopveO.js";
27
- import { i as launchTray } from "./trayApp-7pq0tDGE.js";
27
+ import { i as launchTray } from "./trayApp-DOgsH0en.js";
28
28
  import yargs from "yargs";
29
29
  import { appendFile, mkdir, open, readFile, readdir, rename, rm, stat, unlink, writeFile } from "fs/promises";
30
30
  import { arch, cpus, freemem, homedir, hostname, loadavg, platform, totalmem, uptime, userInfo } from "os";
@@ -1671,7 +1671,7 @@ Options:
1671
1671
  const { planRustServe } = await import("./serveRust-DDQiZmMf.js");
1672
1672
  const plan = planRustServe(rest);
1673
1673
  if (plan.kind === "rust") {
1674
- const { findAyrsBinary } = await import("./rustBinary-D59v2mmy.js");
1674
+ const { findAyrsBinary } = await import("./rustBinary-0cD4pQIE.js");
1675
1675
  const ayrs = findAyrsBinary();
1676
1676
  if (ayrs) return runAyrsServe(ayrs, plan.argv);
1677
1677
  process.stderr.write("ay serve: ayrs binary not found — running the TypeScript server (bun run build:rs, or reinstall, to get the Rust daemon)\n");
@@ -2646,7 +2646,7 @@ Options:
2646
2646
  }
2647
2647
  });
2648
2648
  if (req.method === "GET" && p === "/api/ws") {
2649
- const ws = await import("./ws-Bs9AVLZR.js");
2649
+ const ws = await import("./ws-DjGQGPCq.js");
2650
2650
  try {
2651
2651
  await ws.loadProvision();
2652
2652
  } catch (e) {
@@ -2666,7 +2666,7 @@ Options:
2666
2666
  if (req.method === "GET" && p === "/api/ws/status") {
2667
2667
  const dirRaw = url.searchParams.get("path");
2668
2668
  if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
2669
- const ws = await import("./ws-Bs9AVLZR.js");
2669
+ const ws = await import("./ws-DjGQGPCq.js");
2670
2670
  let prov;
2671
2671
  try {
2672
2672
  prov = await ws.loadProvision();
@@ -2688,7 +2688,7 @@ Options:
2688
2688
  }
2689
2689
  }
2690
2690
  if (req.method === "GET" && p === "/api/ws/repos") {
2691
- const ws = await import("./ws-Bs9AVLZR.js");
2691
+ const ws = await import("./ws-DjGQGPCq.js");
2692
2692
  try {
2693
2693
  await ws.loadProvision();
2694
2694
  } catch (e) {
@@ -2769,7 +2769,7 @@ Options:
2769
2769
  const m = /^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/.exec(repoParam);
2770
2770
  if (!m || m[1] === "." || m[1] === ".." || m[2] === "." || m[2] === "..") return new Response("missing/invalid ?repo=<owner>/<repo>", { status: 400 });
2771
2771
  const [, owner, repo] = m;
2772
- const ws = await import("./ws-Bs9AVLZR.js");
2772
+ const ws = await import("./ws-DjGQGPCq.js");
2773
2773
  let prov;
2774
2774
  try {
2775
2775
  prov = await ws.loadProvision();
@@ -3687,7 +3687,7 @@ Options:
3687
3687
  const perm = body.perm ?? "r";
3688
3688
  if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
3689
3689
  try {
3690
- const { createScopedShare } = await import("./agentShare-C2z05Xu1.js");
3690
+ const { createScopedShare } = await import("./agentShare-CDOvU64K.js");
3691
3691
  const share = await createScopedShare({
3692
3692
  agent: body.agent,
3693
3693
  perm,
@@ -3702,12 +3702,12 @@ Options:
3702
3702
  }
3703
3703
  }
3704
3704
  if (req.method === "GET" && p === "/api/shares") {
3705
- const { listShares } = await import("./agentShare-C2z05Xu1.js");
3705
+ const { listShares } = await import("./agentShare-CDOvU64K.js");
3706
3706
  return Response.json(listShares());
3707
3707
  }
3708
3708
  const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
3709
3709
  if (req.method === "DELETE" && revokeM) {
3710
- const { revokeShare } = await import("./agentShare-C2z05Xu1.js");
3710
+ const { revokeShare } = await import("./agentShare-CDOvU64K.js");
3711
3711
  const ok = revokeShare(decodeURIComponent(revokeM[1]));
3712
3712
  return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
3713
3713
  }
@@ -4019,7 +4019,7 @@ Options:
4019
4019
  const shutdown = (resolve) => {
4020
4020
  if (heartbeat) clearInterval(heartbeat);
4021
4021
  closeShare?.();
4022
- import("./agentShare-C2z05Xu1.js").then((m) => m.revokeAllShares()).catch(() => {});
4022
+ import("./agentShare-CDOvU64K.js").then((m) => m.revokeAllShares()).catch(() => {});
4023
4023
  server?.stop();
4024
4024
  Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
4025
4025
  };
@@ -4032,4 +4032,4 @@ Options:
4032
4032
 
4033
4033
  //#endregion
4034
4034
  export { cmdServe, loadTokenReadOnly, mintScopedTermToken, resolveDaemonHttpBase, resolveLocalServeUrl };
4035
- //# sourceMappingURL=serve-cvUh5Oab.js.map
4035
+ //# sourceMappingURL=serve-BD-7GaKa.js.map
@@ -97,7 +97,7 @@ async function cmdSetup(rest) {
97
97
  } catch {}
98
98
  if (noShare) return 0;
99
99
  process.stdout.write(`\nsharing this machine to agent-yes.com…\n`);
100
- const { cmdServe } = await import("./serve-cvUh5Oab.js");
100
+ const { cmdServe } = await import("./serve-BD-7GaKa.js");
101
101
  return cmdServe([
102
102
  "install",
103
103
  "--share",
@@ -107,4 +107,4 @@ async function cmdSetup(rest) {
107
107
 
108
108
  //#endregion
109
109
  export { cmdSetup };
110
- //# sourceMappingURL=setup-Ba2SPIhs.js.map
110
+ //# sourceMappingURL=setup-Dad2A_-o.js.map
@@ -1680,7 +1680,7 @@ async function runSubcommand(argv) {
1680
1680
  switch (sub) {
1681
1681
  case "ls":
1682
1682
  case "list": return await cmdLs(rest);
1683
- case "ps": return await (await import("./cmdPs-CNue6rFE.js")).cmdPs(rest);
1683
+ case "ps": return await (await import("./cmdPs-DKuMlynW.js")).cmdPs(rest);
1684
1684
  case "status": return await cmdStatus(rest);
1685
1685
  case "whoami": return await cmdWhoami(rest);
1686
1686
  case "result": return await cmdResult(rest);
@@ -1727,35 +1727,35 @@ async function runSubcommand(argv) {
1727
1727
  return cmdCh(rest);
1728
1728
  }
1729
1729
  case "term": {
1730
- const { cmdTerm } = await import("./terminal-DOY_IN5y.js");
1730
+ const { cmdTerm } = await import("./terminal-Bam4XVWi.js");
1731
1731
  return cmdTerm(rest);
1732
1732
  }
1733
1733
  case "widget": {
1734
- const { cmdWidget } = await import("./widget-DKt2rH9F.js");
1734
+ const { cmdWidget } = await import("./widget-DJgiOfgE.js");
1735
1735
  return cmdWidget(rest);
1736
1736
  }
1737
1737
  case "mint": {
1738
- const { cmdMint } = await import("./widget-DKt2rH9F.js");
1738
+ const { cmdMint } = await import("./widget-DJgiOfgE.js");
1739
1739
  return cmdMint(rest);
1740
1740
  }
1741
1741
  case "serve": {
1742
- const { cmdServe } = await import("./serve-cvUh5Oab.js");
1742
+ const { cmdServe } = await import("./serve-BD-7GaKa.js");
1743
1743
  return cmdServe(rest);
1744
1744
  }
1745
1745
  case "tray": {
1746
- const { cmdTray } = await import("./trayApp-DAs4YVeV.js");
1746
+ const { cmdTray } = await import("./trayApp-s2VuJUP4.js");
1747
1747
  return cmdTray(rest);
1748
1748
  }
1749
1749
  case "setup": {
1750
- const { cmdSetup } = await import("./setup-Ba2SPIhs.js");
1750
+ const { cmdSetup } = await import("./setup-Dad2A_-o.js");
1751
1751
  return cmdSetup(rest);
1752
1752
  }
1753
1753
  case "ws": {
1754
- const { cmdWs } = await import("./ws-Bs9AVLZR.js");
1754
+ const { cmdWs } = await import("./ws-DjGQGPCq.js");
1755
1755
  return cmdWs(rest);
1756
1756
  }
1757
1757
  case "schedule": {
1758
- const { cmdSchedule } = await import("./schedule-2xXpYxCv.js");
1758
+ const { cmdSchedule } = await import("./schedule-BRC5cDkf.js");
1759
1759
  return cmdSchedule(rest);
1760
1760
  }
1761
1761
  case "remote": {
@@ -1767,7 +1767,7 @@ async function runSubcommand(argv) {
1767
1767
  return cmdExpose(rest);
1768
1768
  }
1769
1769
  case "callback": {
1770
- const { cmdCallback } = await import("./callback-Blg3DkI3.js");
1770
+ const { cmdCallback } = await import("./callback-Dr5rqkUu.js");
1771
1771
  return cmdCallback(rest);
1772
1772
  }
1773
1773
  case "reap":
@@ -1778,7 +1778,7 @@ async function runSubcommand(argv) {
1778
1778
  return await cmdDsh(rest);
1779
1779
  }
1780
1780
  case "gc": {
1781
- const { gcOldBinaryDirs } = await import("./rustBinary-D59v2mmy.js");
1781
+ const { gcOldBinaryDirs } = await import("./rustBinary-0cD4pQIE.js");
1782
1782
  const { gcLogs } = await import("./globalPidIndex-DC93JhHQ.js");
1783
1783
  const bins = gcOldBinaryDirs();
1784
1784
  const logs = await gcLogs();
@@ -4879,7 +4879,7 @@ async function cmdAttach(rest) {
4879
4879
  const winsizeDir = path.join(ayHome, "winsize");
4880
4880
  await mkdir(winsizeDir, { recursive: true });
4881
4881
  const winsizePath = path.join(winsizeDir, String(record.pid));
4882
- const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-cvUh5Oab.js");
4882
+ const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-BD-7GaKa.js");
4883
4883
  const daemonBase = await resolveDaemonHttpBase().catch(() => null);
4884
4884
  const daemonToken = daemonBase ? await loadTokenReadOnly().catch(() => null) ?? "" : "";
4885
4885
  const capViewer = `attach:${process.pid}`;
@@ -5606,7 +5606,7 @@ async function cmdNotify(rest) {
5606
5606
  }
5607
5607
  const ensure = async () => {
5608
5608
  if (!argv["ensure-daemon"]) return;
5609
- const { ensureDaemon } = await import("./notifyDaemon-BPpVmmj0.js");
5609
+ const { ensureDaemon } = await import("./notifyDaemon-Ceyhz4el.js");
5610
5610
  await ensureDaemon().catch(() => null);
5611
5611
  };
5612
5612
  await heartbeatWatcher(parent, selfStartedAt);
@@ -5680,7 +5680,7 @@ async function cmdNotifyCursor(args) {
5680
5680
  }
5681
5681
  async function cmdNotifyd(rest) {
5682
5682
  const sub = rest[0] ?? "status";
5683
- const daemon = await import("./notifyDaemon-BPpVmmj0.js");
5683
+ const daemon = await import("./notifyDaemon-Ceyhz4el.js");
5684
5684
  switch (sub) {
5685
5685
  case "run": return daemon.runDaemon();
5686
5686
  case "once": return daemon.runDaemon({ once: true });
@@ -5707,4 +5707,4 @@ async function cmdNotifyd(rest) {
5707
5707
 
5708
5708
  //#endregion
5709
5709
  export { sendPayloadCapError as $, isUnknownManagerToken as A, readLogForRender as B, finalizedLines as C, isPidAlive as D, isExitRequest as E, listRecords as F, renderLogTailLines as G, readPtysize as H, matchKeyword as I, resolveOne as J, renderRawLog as K, menuSelectKeys as L, isUserTyping as M, lastReadAt as N, isSlashCommand as O, lastStdinAt as P, runSubcommand as Q, probeStdinReachable as R, extractTaskCounts as S, isBareManagerInvocation as T, recentMessageEdges as U, readNotes as V, recentReadEdges as W, resolveResumeArgs as X, resolveReadWindow as Y, restartHintLines as Z, envelopeAttribution as _, SEND_BODY_MAX_CHARS as a, writeKeysPaced as at, extractMenu as b, backoffWhileTyping as c, framePaste as ct, cmdHelp as d, buildAgentForest as dt, snapshotStatus as et, confirmStdinUnreachable as f, flattenForest as ft, deriveLiveStatus as g, deriveLiveState as h, READ_WINDOW_MS as i, waitForLogQuiet as it, isUnreachableWriteErrno as j, isSubcommand as k, buildEnvelope as l, shouldFramePaste as lt, cursorAbs as m, MAX_RENDER_BYTES as n, stopTipForCli as nt, SEND_EXIT_UNREACHABLE as o, writeToIpc as ot, controlCodeFromName as p, renderRawLogLines as q, READ_PAGE_DEFAULT as r, submitAndConfirm as rt, TYPING_WINDOW_MS as s, withIpcLock as st, GRACEFUL_EXIT_COMMANDS as t, stdinActivityPath as tt, cliDefaults as u, TYPING_BADGE as ut, envelopeCostFor as v, isAgentStuck as w, extractNeedsInput as x, extractBadges as y, readAgentPtysize as z };
5710
- //# sourceMappingURL=subcommands-DoKUSvaF.js.map
5710
+ //# sourceMappingURL=subcommands--9gcc0ew.js.map
@@ -5,7 +5,7 @@ import "./pidStore-DXWqzTSz.js";
5
5
  import "./messageLog-Brx3w6zT.js";
6
6
  import "./e2e-z1xpwSAg.js";
7
7
  import "./configShared-DKTgiz7K.js";
8
- import { $ as sendPayloadCapError, A as isUnknownManagerToken, B as readLogForRender, C as finalizedLines, D as isPidAlive, E as isExitRequest, F as listRecords, G as renderLogTailLines, H as readPtysize, I as matchKeyword, J as resolveOne, K as renderRawLog, L as menuSelectKeys, M as isUserTyping, N as lastReadAt, O as isSlashCommand, P as lastStdinAt, Q as runSubcommand, R as probeStdinReachable, S as extractTaskCounts, T as isBareManagerInvocation, U as recentMessageEdges, V as readNotes, W as recentReadEdges, X as resolveResumeArgs, Y as resolveReadWindow, Z as restartHintLines, _ as envelopeAttribution, a as SEND_BODY_MAX_CHARS, at as writeKeysPaced, b as extractMenu, c as backoffWhileTyping, d as cmdHelp, et as snapshotStatus, f as confirmStdinUnreachable, g as deriveLiveStatus, h as deriveLiveState, i as READ_WINDOW_MS, it as waitForLogQuiet, j as isUnreachableWriteErrno, k as isSubcommand, l as buildEnvelope, m as cursorAbs, n as MAX_RENDER_BYTES, nt as stopTipForCli, o as SEND_EXIT_UNREACHABLE, ot as writeToIpc, p as controlCodeFromName, q as renderRawLogLines, r as READ_PAGE_DEFAULT, rt as submitAndConfirm, s as TYPING_WINDOW_MS, t as GRACEFUL_EXIT_COMMANDS, tt as stdinActivityPath, u as cliDefaults, v as envelopeCostFor, w as isAgentStuck, x as extractNeedsInput, y as extractBadges, z as readAgentPtysize } from "./subcommands-DoKUSvaF.js";
8
+ import { $ as sendPayloadCapError, A as isUnknownManagerToken, B as readLogForRender, C as finalizedLines, D as isPidAlive, E as isExitRequest, F as listRecords, G as renderLogTailLines, H as readPtysize, I as matchKeyword, J as resolveOne, K as renderRawLog, L as menuSelectKeys, M as isUserTyping, N as lastReadAt, O as isSlashCommand, P as lastStdinAt, Q as runSubcommand, R as probeStdinReachable, S as extractTaskCounts, T as isBareManagerInvocation, U as recentMessageEdges, V as readNotes, W as recentReadEdges, X as resolveResumeArgs, Y as resolveReadWindow, Z as restartHintLines, _ as envelopeAttribution, a as SEND_BODY_MAX_CHARS, at as writeKeysPaced, b as extractMenu, c as backoffWhileTyping, d as cmdHelp, et as snapshotStatus, f as confirmStdinUnreachable, g as deriveLiveStatus, h as deriveLiveState, i as READ_WINDOW_MS, it as waitForLogQuiet, j as isUnreachableWriteErrno, k as isSubcommand, l as buildEnvelope, m as cursorAbs, n as MAX_RENDER_BYTES, nt as stopTipForCli, o as SEND_EXIT_UNREACHABLE, ot as writeToIpc, p as controlCodeFromName, q as renderRawLogLines, r as READ_PAGE_DEFAULT, rt as submitAndConfirm, s as TYPING_WINDOW_MS, t as GRACEFUL_EXIT_COMMANDS, tt as stdinActivityPath, u as cliDefaults, v as envelopeCostFor, w as isAgentStuck, x as extractNeedsInput, y as extractBadges, z as readAgentPtysize } from "./subcommands--9gcc0ew.js";
9
9
  import "./notifyStore-2SWKGwZI.js";
10
10
  import "./webrtcLink-CnQf9pmu.js";
11
11
  import "./remotes-5P__pAXA.js";
@@ -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-cvUh5Oab.js");
101
+ const { mintScopedTermToken } = await import("./serve-BD-7GaKa.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-DOY_IN5y.js.map
138
+ //# sourceMappingURL=terminal-Bam4XVWi.js.map
@@ -1,4 +1,4 @@
1
- import { o as findTrayLauncher } from "./rustBinary-B_KR43x9.js";
1
+ import { o as findTrayLauncher } from "./rustBinary-BW3BGZ4y.js";
2
2
  import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
3
3
  import { existsSync } from "node:fs";
4
4
  import path from "node:path";
@@ -97,4 +97,4 @@ async function cmdTray(args) {
97
97
 
98
98
  //#endregion
99
99
  export { trayHiddenMarker as a, launchTray as i, hasDesktop as n, isTrayHidden as r, cmdTray as t };
100
- //# sourceMappingURL=trayApp-7pq0tDGE.js.map
100
+ //# sourceMappingURL=trayApp-DOgsH0en.js.map
@@ -0,0 +1,5 @@
1
+ import "./versionChecker-D6zM6Pdv.js";
2
+ import "./rustBinary-BW3BGZ4y.js";
3
+ import { a as trayHiddenMarker, i as launchTray, n as hasDesktop, r as isTrayHidden, t as cmdTray } from "./trayApp-DOgsH0en.js";
4
+
5
+ export { cmdTray };
@@ -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 { i as getInstalledPackage } from "./versionChecker-BtYHFqjF.js";
3
+ import { i as getInstalledPackage } from "./versionChecker-D6zM6Pdv.js";
4
4
  import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
5
5
  import { u as removeControlCharacters } from "./todoAutomation-CbVVS4re.js";
6
6
  import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-BOIPD_Vs.js";
@@ -2086,7 +2086,7 @@ async function agentYes({ cli, cliArgs = [], skipPermissions = false, prompt, ro
2086
2086
  }, 100);
2087
2087
  const cleanupHeartbeat = () => clearInterval(heartbeatInterval);
2088
2088
  shell.onExit(cleanupHeartbeat);
2089
- const { startParentPingLoop } = await import("./parentPingLoop-BPcqwhCS.js");
2089
+ const { startParentPingLoop } = await import("./parentPingLoop-C0hekeg6.js");
2090
2090
  const parentPingLoop = startParentPingLoop({
2091
2091
  parentPid,
2092
2092
  selfWrapperPid: process.pid,
@@ -2349,4 +2349,4 @@ function sleep(ms) {
2349
2349
 
2350
2350
  //#endregion
2351
2351
  export { hasTodoStore as a, permissionBadge as c, answerAsk as i, AgentContext as l, agentYes as n, listAsks as o, config as r, listAsksForProject as s, CLIS_CONFIG as t, CLAUDE_SESSION_PIN_ENV as u };
2352
- //# sourceMappingURL=ts-Cet9EhtO.js.map
2352
+ //# sourceMappingURL=ts-BePSXUQl.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.298.0";
10
+ var version = "1.298.1";
11
11
 
12
12
  //#endregion
13
13
  //#region ts/versionChecker.ts
@@ -285,4 +285,4 @@ async function displayVersion() {
285
285
 
286
286
  //#endregion
287
287
  export { versionString as a, getInstalledPackage as i, compareVersions as n, displayVersion as r, checkAndAutoUpdate as t };
288
- //# sourceMappingURL=versionChecker-BtYHFqjF.js.map
288
+ //# sourceMappingURL=versionChecker-D6zM6Pdv.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-cvUh5Oab.js");
31
+ const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-BD-7GaKa.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-cvUh5Oab.js");
189
+ const { mintScopedTermToken } = await import("./serve-BD-7GaKa.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-DKt2rH9F.js.map
205
+ //# sourceMappingURL=widget-DJgiOfgE.js.map
@@ -1,4 +1,4 @@
1
- import { F as listRecords } from "./subcommands-DoKUSvaF.js";
1
+ import { F as listRecords } from "./subcommands--9gcc0ew.js";
2
2
  import { a as getProvisionRoot } from "./workspaceConfig-DTvPtr5j.js";
3
3
  import { existsSync } from "fs";
4
4
  import { lstat, opendir } from "fs/promises";
@@ -424,4 +424,4 @@ async function cmdWs(args) {
424
424
 
425
425
  //#endregion
426
426
  export { isPathInside as a, walkWorkspaces as c, importProvisionModule as i, workspaceStatus as l, cmdWs as n, loadProvision as o, collectWorkspaces as r, resolveOperand as s, WS_JSON_SCHEMA as t };
427
- //# sourceMappingURL=ws-DgZVBJje.js.map
427
+ //# sourceMappingURL=ws-Covfyaxn.js.map
@@ -5,10 +5,10 @@ import "./pidStore-DXWqzTSz.js";
5
5
  import "./messageLog-Brx3w6zT.js";
6
6
  import "./e2e-z1xpwSAg.js";
7
7
  import "./configShared-DKTgiz7K.js";
8
- import "./subcommands-DoKUSvaF.js";
8
+ import "./subcommands--9gcc0ew.js";
9
9
  import "./notifyStore-2SWKGwZI.js";
10
10
  import "./webrtcLink-CnQf9pmu.js";
11
11
  import "./remotes-5P__pAXA.js";
12
- import { a as isPathInside, c as walkWorkspaces, i as importProvisionModule, l as workspaceStatus, n as cmdWs, o as loadProvision, r as collectWorkspaces, s as resolveOperand, t as WS_JSON_SCHEMA } from "./ws-DgZVBJje.js";
12
+ import { a as isPathInside, c as walkWorkspaces, i as importProvisionModule, l as workspaceStatus, n as cmdWs, o as loadProvision, r as collectWorkspaces, s as resolveOperand, t as WS_JSON_SCHEMA } from "./ws-Covfyaxn.js";
13
13
 
14
14
  export { WS_JSON_SCHEMA, cmdWs, collectWorkspaces, isPathInside, loadProvision, walkWorkspaces, workspaceStatus };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-yes",
3
- "version": "1.298.0",
3
+ "version": "1.298.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",
@@ -1,8 +1,8 @@
1
1
  import { afterAll, beforeAll, describe, expect, it } from "vitest";
2
- import { existsSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
2
+ import { copyFileSync, existsSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
3
3
  import os from "node:os";
4
4
  import path from "node:path";
5
- import { devBuildInfo, gcOldBinaryDirs } from "./rustBinary.ts";
5
+ import { devBuildInfo, gcOldBinaryDirs, hasValidMacSignature } from "./rustBinary.ts";
6
6
  import { _setInstalledPackageForTesting } from "./versionChecker.ts";
7
7
 
8
8
  // Startup GC for the versioned binary download cache (PERFORMANCE-EVENT
@@ -115,3 +115,23 @@ describe("devBuildInfo", () => {
115
115
  ).toBeUndefined();
116
116
  });
117
117
  });
118
+
119
+ // A cached download that lost its code signature is SIGKILLed by macOS at exec
120
+ // (silent exit 137), so getRustBinary() must spot it and re-download.
121
+ describe("hasValidMacSignature", () => {
122
+ it.skipIf(process.platform !== "darwin")("accepts a signed system binary", () => {
123
+ const signed = path.join(root, "signed-ls");
124
+ copyFileSync("/bin/ls", signed);
125
+ expect(hasValidMacSignature(signed)).toBe(true);
126
+ });
127
+
128
+ it.skipIf(process.platform !== "darwin")("rejects an unsigned file", () => {
129
+ const unsigned = path.join(root, "agent-yes-darwin-arm64-unsigned");
130
+ writeFileSync(unsigned, "not a mach-o");
131
+ expect(hasValidMacSignature(unsigned)).toBe(false);
132
+ });
133
+
134
+ it.skipIf(process.platform === "darwin")("always reports valid off macOS", () => {
135
+ expect(hasValidMacSignature(path.join(root, "does-not-exist"))).toBe(true);
136
+ });
137
+ });
package/ts/rustBinary.ts CHANGED
@@ -446,6 +446,27 @@ function autoRebuildIfOutdated(binaryPath: string, verbose: boolean): boolean {
446
446
  }
447
447
  }
448
448
 
449
+ /**
450
+ * macOS only: does `binaryPath` carry a code signature the kernel will accept?
451
+ *
452
+ * On Apple Silicon an arm64 Mach-O with no (or a broken) signature is SIGKILLed
453
+ * at exec — no stderr, just exit 137 — so a cached download damaged on disk
454
+ * makes every `ay <cli>` die silently right after the version banner. Release
455
+ * binaries are linker-signed (ad-hoc), so `codesign --verify` passing is the
456
+ * cheap "will this even start" check. Off macOS, or when `codesign` itself is
457
+ * unavailable, report valid: never block a run on the probe.
458
+ */
459
+ export function hasValidMacSignature(binaryPath: string): boolean {
460
+ if (process.platform !== "darwin") return true;
461
+ try {
462
+ execFileSync("codesign", ["--verify", binaryPath], { timeout: 10_000, stdio: "ignore" });
463
+ return true;
464
+ } catch (err) {
465
+ // ENOENT → no codesign on this machine; can't tell, so don't block.
466
+ return (err as NodeJS.ErrnoException)?.code === "ENOENT";
467
+ }
468
+ }
469
+
449
470
  /**
450
471
  * Get or download the Rust binary
451
472
  */
@@ -476,7 +497,16 @@ export async function getRustBinary(
476
497
  // First try to find existing binary
477
498
  if (!forceDownload) {
478
499
  const existing = findRustBinary(verbose);
479
- if (existing) {
500
+ if (existing && !devBuildInfo(existing) && !hasValidMacSignature(existing)) {
501
+ // A downloaded binary macOS would SIGKILL on exec: drop it and fall
502
+ // through to a fresh download instead of dying silently.
503
+ process.stderr.write(
504
+ `\x1b[33m[rust] Cached binary has an invalid code signature, re-downloading: ${existing}\x1b[0m\n`,
505
+ );
506
+ try {
507
+ unlinkSync(existing);
508
+ } catch {}
509
+ } else if (existing) {
480
510
  if (verbose) {
481
511
  console.log(`[rust] Using existing binary: ${existing}`);
482
512
  }
@@ -192,9 +192,14 @@ describe("acquireWebrtcHostLock — held-lock lifecycle", () => {
192
192
  "escalates to SIGKILL when the owner ignores SIGTERM",
193
193
  async () => {
194
194
  const { spawn } = await import("node:child_process");
195
- const stubborn = spawn("/bin/sh", ["-c", "trap '' TERM; sleep 30"], { stdio: "ignore" });
195
+ // Wait for the child to SAY the trap is installed: a fixed sleep raced it on
196
+ // a loaded host, so SIGTERM landed before `trap` and killed it outright.
197
+ const stubborn = spawn("/bin/sh", ["-c", "trap '' TERM; echo ready; sleep 30"], {
198
+ stdio: ["ignore", "pipe", "ignore"],
199
+ });
196
200
  const pid = stubborn.pid!;
197
- await new Promise((r) => setTimeout(r, 100)); // let the trap install
201
+ await new Promise((r) => stubborn.stdout!.once("data", r));
202
+ const exited = new Promise((r) => stubborn.once("exit", r));
198
203
  const { mkdir: mkd, writeFile: wf } = await import("fs/promises");
199
204
  await mkd(path.join(home, "webrtc-host.lock"), { recursive: true });
200
205
  await wf(ownerFile(), JSON.stringify({ pid, started_at: Date.now(), beat_at: Date.now() }));
@@ -202,7 +207,7 @@ describe("acquireWebrtcHostLock — held-lock lifecycle", () => {
202
207
  const got = await acquireWebrtcHostLock({ takeover: true, graceMs: 0, takeoverWaitMs: 200 });
203
208
  expect(got.ok).toBe(true);
204
209
  if (got.ok) releases.push(got.release);
205
- await new Promise((r) => setTimeout(r, 100));
210
+ await exited;
206
211
  expect(stubborn.signalCode).toBe("SIGKILL");
207
212
  },
208
213
  );
@@ -192,9 +192,14 @@ describe("acquireWebrtcHostLock — held-lock lifecycle", () => {
192
192
  "escalates to SIGKILL when the owner ignores SIGTERM",
193
193
  async () => {
194
194
  const { spawn } = await import("node:child_process");
195
- const stubborn = spawn("/bin/sh", ["-c", "trap '' TERM; sleep 30"], { stdio: "ignore" });
195
+ // Wait for the child to SAY the trap is installed: a fixed sleep raced it on
196
+ // a loaded host, so SIGTERM landed before `trap` and killed it outright.
197
+ const stubborn = spawn("/bin/sh", ["-c", "trap '' TERM; echo ready; sleep 30"], {
198
+ stdio: ["ignore", "pipe", "ignore"],
199
+ });
196
200
  const pid = stubborn.pid!;
197
- await new Promise((r) => setTimeout(r, 100)); // let the trap install
201
+ await new Promise((r) => stubborn.stdout!.once("data", r));
202
+ const exited = new Promise((r) => stubborn.once("exit", r));
198
203
  const { mkdir: mkd, writeFile: wf } = await import("fs/promises");
199
204
  await mkd(path.join(home, "webrtc-host.lock"), { recursive: true });
200
205
  await wf(ownerFile(), JSON.stringify({ pid, started_at: Date.now(), beat_at: Date.now() }));
@@ -202,7 +207,7 @@ describe("acquireWebrtcHostLock — held-lock lifecycle", () => {
202
207
  const got = await acquireWebrtcHostLock({ takeover: true, graceMs: 0, takeoverWaitMs: 200 });
203
208
  expect(got.ok).toBe(true);
204
209
  if (got.ok) releases.push(got.release);
205
- await new Promise((r) => setTimeout(r, 100));
210
+ await exited;
206
211
  expect(stubborn.signalCode).toBe("SIGKILL");
207
212
  },
208
213
  );
@@ -1633,11 +1633,12 @@ describe("subcommands.cmdSend end-to-end submit-confirm wiring", () => {
1633
1633
  const log = path.join(dir, "a.log");
1634
1634
  await writeFile(log, "❯ \r\n"); // would fail to confirm if checked — but we opt out
1635
1635
  await withDrainedFifo(async (fifo) => {
1636
- const start = Date.now();
1636
+ // The log never grows, so the confirm path — had it run — would report
1637
+ // "NOT confirmed" and exit non-zero; these two asserts prove it was
1638
+ // skipped. (No wall-clock bound: a <1s limit flaked on a loaded host.)
1637
1639
  const { code, stdout } = await send(fifo, log, "hello", ["--no-wait"]);
1638
1640
  expect(code).toBe(0);
1639
1641
  expect(stdout).not.toMatch(/NOT confirmed/);
1640
- expect(Date.now() - start).toBeLessThan(1000); // fast — no settle/confirm polling
1641
1642
  });
1642
1643
  } finally {
1643
1644
  await rm(dir, { recursive: true, force: true }).catch(() => null);
@@ -1,4 +0,0 @@
1
- import "./versionChecker-BtYHFqjF.js";
2
- import { a as findSpawnHiddenLauncher, c as getBinDir, d as getRustBinary, i as findRustBinary, l as getBinaryName, n as downloadBinary, o as findTrayLauncher, r as findAyrsBinary, s as gcOldBinaryDirs, t as devBuildInfo, u as getDownloadUrl } from "./rustBinary-B_KR43x9.js";
3
-
4
- export { findAyrsBinary, gcOldBinaryDirs };
@@ -1,5 +0,0 @@
1
- import "./versionChecker-BtYHFqjF.js";
2
- import "./rustBinary-B_KR43x9.js";
3
- import { a as trayHiddenMarker, i as launchTray, n as hasDesktop, r as isTrayHidden, t as cmdTray } from "./trayApp-7pq0tDGE.js";
4
-
5
- export { cmdTray };