agent-yes 1.256.0 → 1.256.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 (72) hide show
  1. package/dist/{SUPPORTED_CLIS-DCgfUvkk.js → SUPPORTED_CLIS-BzDARJYP.js} +2 -2
  2. package/dist/SUPPORTED_CLIS-CUrSR0fn.js +11 -0
  3. package/dist/{agent-yes.config-C8e9rNLW.js → agent-yes.config-DzNini0E.js} +2 -2
  4. package/dist/{agentShare-B-UFJIE3.js → agentShare-JbxEAAIb.js} +9 -9
  5. package/dist/{browser-B3dOptjL.js → browser-B7eYrBy7.js} +5 -5
  6. package/dist/{browser-jKmGe4_X.js → browser-DSduVZeZ.js} +1 -1
  7. package/dist/{callback-FHEnYbFh.js → callback-BH4-6FVz.js} +5 -5
  8. package/dist/callback-CDZ0mSn8.js +12 -0
  9. package/dist/{callbackCore-Dd28_cBM.js → callbackCore-Cg3Ye0ZS.js} +1 -1
  10. package/dist/{callbackCore-Cd4mYekY.js → callbackCore-Cv4EOGjE.js} +1 -1
  11. package/dist/{channels-H4PBBker.js → channels-BwpN_8mu.js} +6 -6
  12. package/dist/{channels-BiGUYTuz.js → channels-yE1YUHCl.js} +2 -2
  13. package/dist/channels.js +5 -5
  14. package/dist/cli.js +17 -14
  15. package/dist/{configShared-IBbnn9b8.js → configShared-DtHMBCl7.js} +1 -1
  16. package/dist/{cwdConflictWarn-DEJHqTZ4.js → cwdConflictWarn-DZTxTGXq.js} +2 -2
  17. package/dist/{cwdDeprecation-Cd-4t7lI.js → cwdDeprecation-6iOtwFzS.js} +1 -1
  18. package/dist/{e2e-CEIdJGZ7.js → e2e-CUMZC53I.js} +1 -1
  19. package/dist/{expose-BiJ-51Hm.js → expose-BG17GV7D.js} +1 -1
  20. package/dist/{forkNested-BW2OmXjA.js → forkNested-CgJ1rTnT.js} +26 -14
  21. package/dist/globalPidIndex-CQX_0JSB.js +4 -0
  22. package/dist/{globalPidIndex-D9DOSd-c.js → globalPidIndex-Dq4KY2IV.js} +1 -1
  23. package/dist/{html2canvas-pro.esm-BZqMtqU8.js → html2canvas-pro.esm-cq4l_ZIw.js} +1 -1
  24. package/dist/index.js +5 -5
  25. package/dist/{messageLog-C-YIzhRj.js → messageLog-BYFwioFY.js} +1 -1
  26. package/dist/{nodeRuntime-BtL6Oo1o.js → nodeRuntime-vhOBffJ3.js} +1 -1
  27. package/dist/{notifyDaemon-CnhKvdl7.js → notifyDaemon-7udiA8IF.js} +8 -8
  28. package/dist/{openBrowser-DifNZwyn.js → openBrowser-D-aQjh3y.js} +1 -1
  29. package/dist/peer-Cvntlw1i.js +4 -0
  30. package/dist/{peer-B5JKF4BP.js → peer-DIl5xtx8.js} +3 -3
  31. package/dist/pidStore-BbKqQOS8.js +6 -0
  32. package/dist/{pidStore-vnX0bgra.js → pidStore-Cmcc8Oej.js} +2 -2
  33. package/dist/{reaper-IhkB_RO0.js → reaper-B231i49s.js} +1 -1
  34. package/dist/{reaper-DP49VCKx.js → reaper-C4BvNylH.js} +1 -1
  35. package/dist/{remotes-a0bGDae9.js → remotes-BwytVgTX.js} +3 -3
  36. package/dist/{remotes-DzPup1dS.js → remotes-C71bbp-g.js} +3 -3
  37. package/dist/{rustBinary-B7kmq5S0.js → rustBinary-Cd9DngDh.js} +2 -2
  38. package/dist/{schedule-D8TWPJuH.js → schedule-Otpou3Ni.js} +9 -9
  39. package/dist/{serve-89Gzlv9n.js → serve-JNGfYmLT.js} +33 -33
  40. package/dist/{setup-B-ufpyWj.js → setup-RVV6dnf3.js} +3 -3
  41. package/dist/{share-BGl3wutJ.js → share-B-e_9WBx.js} +2 -2
  42. package/dist/{share-DchOdgBz.js → share-DOnynkf4.js} +2 -2
  43. package/dist/{spawnGate-BFJPdHCQ.js → spawnGate-BGaqQpMd.js} +3 -3
  44. package/dist/spawnGate-DcG_Pn2f.js +5 -0
  45. package/dist/{store-Ck0XRn-K.js → store-BW5NBouz.js} +1 -1
  46. package/dist/{subcommands-Cz_tHj4P.js → subcommands-CAYOfibe.js} +24 -24
  47. package/dist/{subcommands-COp2OWcx.js → subcommands-DEcce_73.js} +7 -7
  48. package/dist/{terminal-83v9Uzt1.js → terminal-CkzqkAST.js} +2 -2
  49. package/dist/terminal.js +1 -1
  50. package/dist/{todoCli-4WIHwq-e.js → todoCli-CaQDl5WR.js} +2 -2
  51. package/dist/{tray-LxRESrQs.js → tray-d0GZiGI9.js} +1 -1
  52. package/dist/trayApp-DmaV4IyV.js +5 -0
  53. package/dist/{trayApp-ChsZpZyQ.js → trayApp-pBLHICYj.js} +2 -2
  54. package/dist/{ts-B4LZq-x9.js → ts-DLM7M0W3.js} +7 -7
  55. package/dist/{versionChecker-CKSvRBvj.js → versionChecker-BlwkAisS.js} +2 -2
  56. package/dist/{webrtcLink-BMYneHbu.js → webrtcLink-CS4D-3G1.js} +2 -2
  57. package/dist/{webrtcRemote-DgoZGUr9.js → webrtcRemote-BXmkHX-i.js} +3 -3
  58. package/dist/{widget-DcPvYum4.js → widget-C2_s8SHw.js} +3 -3
  59. package/dist/widget.js +1 -1
  60. package/dist/widgets.js +5 -5
  61. package/dist/{workspaceConfig-CpilQzMY.js → workspaceConfig-Bxuk_MOq.js} +1 -1
  62. package/dist/{ws-DXmR5W2s.js → ws-833ph696.js} +9 -9
  63. package/package.json +1 -1
  64. package/ts/cli.ts +18 -8
  65. package/ts/forkNested.spec.ts +55 -11
  66. package/ts/forkNested.ts +27 -13
  67. package/dist/SUPPORTED_CLIS-FQCbUoI-.js +0 -11
  68. package/dist/callback-DsimZsq6.js +0 -12
  69. package/dist/peer-D5lr1Afv.js +0 -4
  70. package/dist/pidStore-Bg7wdjxY.js +0 -6
  71. package/dist/spawnGate-Djr4KlF5.js +0 -5
  72. package/dist/trayApp-00UdHVbe.js +0 -5
@@ -1,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-B4LZq-x9.js";
1
+ import { t as CLIS_CONFIG } from "./ts-DLM7M0W3.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-DCgfUvkk.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-BzDARJYP.js.map
@@ -0,0 +1,11 @@
1
+ import "./logger-CDIsZ-Pp.js";
2
+ import "./versionChecker-BlwkAisS.js";
3
+ import "./ts-DLM7M0W3.js";
4
+ import "./todoAutomation-BQRW614S.js";
5
+ import "./JsonlStore-CPGIR0Wy.js";
6
+ import "./globalPidIndex-Dq4KY2IV.js";
7
+ import "./pidStore-Cmcc8Oej.js";
8
+ import "./messageLog-BYFwioFY.js";
9
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BzDARJYP.js";
10
+
11
+ export { SUPPORTED_CLIS };
@@ -1,5 +1,5 @@
1
1
  import { n as logger } from "./logger-CDIsZ-Pp.js";
2
- import { n as normalizeAgentYesConfig, t as loadSharedCliDefaults } from "./configShared-IBbnn9b8.js";
2
+ import { n as normalizeAgentYesConfig, t as loadSharedCliDefaults } from "./configShared-DtHMBCl7.js";
3
3
  import path from "node:path";
4
4
  import os from "node:os";
5
5
  import { access, mkdir, readFile, writeFile } from "node:fs/promises";
@@ -226,4 +226,4 @@ async function getDefaultConfig() {
226
226
 
227
227
  //#endregion
228
228
  export { agent_yes_config_default as default };
229
- //# sourceMappingURL=agent-yes.config-C8e9rNLW.js.map
229
+ //# sourceMappingURL=agent-yes.config-DzNini0E.js.map
@@ -1,12 +1,12 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./globalPidIndex-D9DOSd-c.js";
3
- import "./messageLog-C-YIzhRj.js";
4
- import "./e2e-CEIdJGZ7.js";
5
- import "./configShared-IBbnn9b8.js";
6
- import { P as resolveOne } from "./subcommands-Cz_tHj4P.js";
7
- import "./webrtcLink-BMYneHbu.js";
8
- import "./remotes-a0bGDae9.js";
9
- import { a as startShare } from "./share-BGl3wutJ.js";
2
+ import "./globalPidIndex-Dq4KY2IV.js";
3
+ import "./messageLog-BYFwioFY.js";
4
+ import "./e2e-CUMZC53I.js";
5
+ import "./configShared-DtHMBCl7.js";
6
+ import { P as resolveOne } from "./subcommands-CAYOfibe.js";
7
+ import "./webrtcLink-CS4D-3G1.js";
8
+ import "./remotes-BwytVgTX.js";
9
+ import { a as startShare } from "./share-B-e_9WBx.js";
10
10
 
11
11
  //#region ts/agentShare.ts
12
12
  const MAX_SHARES = 8;
@@ -229,4 +229,4 @@ function transformEvent(rawEvent, agentId, forwarded) {
229
229
 
230
230
  //#endregion
231
231
  export { createScopedShare, listShares, revokeAllShares, revokeShare };
232
- //# sourceMappingURL=agentShare-B-UFJIE3.js.map
232
+ //# sourceMappingURL=agentShare-JbxEAAIb.js.map
@@ -1,7 +1,7 @@
1
- import { d as randomHex } from "./e2e-CEIdJGZ7.js";
2
- import { d as parseChannelLink, f as secretFromTopic, o as deriveChannelId, s as deriveRoom } from "./channels-BiGUYTuz.js";
3
- import { a as renderThread, c as makeOp, f as hlcSend, n as maxHlc, o as sortOps, r as mergeOps, s as isValidOp } from "./store-Ck0XRn-K.js";
4
- import { t as ChannelPeer } from "./peer-B5JKF4BP.js";
1
+ import { d as randomHex } from "./e2e-CUMZC53I.js";
2
+ import { d as parseChannelLink, f as secretFromTopic, o as deriveChannelId, s as deriveRoom } from "./channels-yE1YUHCl.js";
3
+ import { a as renderThread, c as makeOp, f as hlcSend, n as maxHlc, o as sortOps, r as mergeOps, s as isValidOp } from "./store-BW5NBouz.js";
4
+ import { t as ChannelPeer } from "./peer-DIl5xtx8.js";
5
5
 
6
6
  //#region ts/channels/store.browser.ts
7
7
  const PREFIX = "ay29ch:";
@@ -308,4 +308,4 @@ const WIDGET_HTML = `
308
308
 
309
309
  //#endregion
310
310
  export { AyChannel as t };
311
- //# sourceMappingURL=browser-B3dOptjL.js.map
311
+ //# sourceMappingURL=browser-B7eYrBy7.js.map
@@ -13565,4 +13565,4 @@ const XTERM_CSS = `
13565
13565
 
13566
13566
  //#endregion
13567
13567
  export { AyTerminal as t };
13568
- //# sourceMappingURL=browser-jKmGe4_X.js.map
13568
+ //# sourceMappingURL=browser-DSduVZeZ.js.map
@@ -1,6 +1,6 @@
1
1
  import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
2
- import { P as resolveOne } from "./subcommands-Cz_tHj4P.js";
3
- import { a as mintCapability, o as parseExpires } from "./callbackCore-Dd28_cBM.js";
2
+ import { P as resolveOne } from "./subcommands-CAYOfibe.js";
3
+ import { a as mintCapability, o as parseExpires } from "./callbackCore-Cg3Ye0ZS.js";
4
4
  import { randomBytes } from "node:crypto";
5
5
  import { chmodSync, readFileSync, renameSync, writeFileSync } from "node:fs";
6
6
  import path from "node:path";
@@ -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-89Gzlv9n.js");
75
+ const { resolveLocalServeUrl } = await import("./serve-JNGfYmLT.js");
76
76
  const url = await resolveLocalServeUrl();
77
77
  if (url) return url;
78
78
  } catch {}
@@ -170,7 +170,7 @@ async function cmdCallback(rest) {
170
170
  createdAt: Date.now()
171
171
  };
172
172
  saveStore(all);
173
- const { buildSnippet } = await import("./callbackCore-Cd4mYekY.js");
173
+ const { buildSnippet } = await import("./callbackCore-Cv4EOGjE.js");
174
174
  w(`callback ${id} → ${record.cli} #${record.pid} @ ${record.cwd}`);
175
175
  w(`expires: ${new Date(exp).toISOString()} (${expiresSpec})`);
176
176
  w(`endpoint: ${base.replace(/\/+$/, "")}/cb/${cap}`);
@@ -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-FHEnYbFh.js.map
190
+ //# sourceMappingURL=callback-BH4-6FVz.js.map
@@ -0,0 +1,12 @@
1
+ import "./logger-CDIsZ-Pp.js";
2
+ import "./globalPidIndex-Dq4KY2IV.js";
3
+ import "./messageLog-BYFwioFY.js";
4
+ import "./e2e-CUMZC53I.js";
5
+ import "./configShared-DtHMBCl7.js";
6
+ import "./subcommands-CAYOfibe.js";
7
+ import "./webrtcLink-CS4D-3G1.js";
8
+ import "./remotes-BwytVgTX.js";
9
+ import "./callbackCore-Cg3Ye0ZS.js";
10
+ import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-BH4-6FVz.js";
11
+
12
+ export { cmdCallback };
@@ -140,4 +140,4 @@ function buildSnippet(opts) {
140
140
 
141
141
  //#endregion
142
142
  export { mintCapability as a, frameVisitorMessage as i, MAX_EXPIRES_MS as n, parseExpires as o, buildSnippet as r, verifyCapability as s, MAX_CALLBACK_MSG_BYTES as t };
143
- //# sourceMappingURL=callbackCore-Dd28_cBM.js.map
143
+ //# sourceMappingURL=callbackCore-Cg3Ye0ZS.js.map
@@ -1,3 +1,3 @@
1
- import { a as mintCapability, i as frameVisitorMessage, n as MAX_EXPIRES_MS, o as parseExpires, r as buildSnippet, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-Dd28_cBM.js";
1
+ import { a as mintCapability, i as frameVisitorMessage, n as MAX_EXPIRES_MS, o as parseExpires, r as buildSnippet, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-Cg3Ye0ZS.js";
2
2
 
3
3
  export { buildSnippet };
@@ -1,6 +1,6 @@
1
- import "./e2e-CEIdJGZ7.js";
2
- import { c as formatChannelLink, d as parseChannelLink, f as secretFromTopic, l as formatChannelWebLink, o as deriveChannelId, s as deriveRoom, u as isChannelLink } from "./channels-BiGUYTuz.js";
3
- import { a as renderThread, c as makeOp, f as hlcSend, n as maxHlc, o as sortOps, r as mergeOps, s as isValidOp } from "./store-Ck0XRn-K.js";
1
+ import "./e2e-CUMZC53I.js";
2
+ import { c as formatChannelLink, d as parseChannelLink, f as secretFromTopic, l as formatChannelWebLink, o as deriveChannelId, s as deriveRoom, u as isChannelLink } from "./channels-yE1YUHCl.js";
3
+ import { a as renderThread, c as makeOp, f as hlcSend, n as maxHlc, o as sortOps, r as mergeOps, s as isValidOp } from "./store-BW5NBouz.js";
4
4
  import { appendFile, chmod, mkdir, readFile, rm, writeFile } from "fs/promises";
5
5
  import os from "os";
6
6
  import path from "path";
@@ -386,8 +386,8 @@ function printOp(op) {
386
386
  * `extraStdin` (pipe mode) drives it. Returns the started peer + a stop fn.
387
387
  */
388
388
  async function runMesh(cwd, entry, opts) {
389
- const { ChannelPeer } = await import("./peer-D5lr1Afv.js");
390
- const { importRTC, getIceServers } = await import("./share-DchOdgBz.js");
389
+ const { ChannelPeer } = await import("./peer-Cvntlw1i.js");
390
+ const { importRTC, getIceServers } = await import("./share-DOnynkf4.js");
391
391
  const rtc = await importRTC();
392
392
  const seen = new Set((await readOps(cwd, entry.channelId)).map((o) => o.id));
393
393
  const peer = new ChannelPeer({
@@ -567,4 +567,4 @@ async function cmdCh(args) {
567
567
 
568
568
  //#endregion
569
569
  export { cmdCh };
570
- //# sourceMappingURL=channels-H4PBBker.js.map
570
+ //# sourceMappingURL=channels-BwpN_8mu.js.map
@@ -1,4 +1,4 @@
1
- import { m as validateS, u as parseSecret } from "./e2e-CEIdJGZ7.js";
1
+ import { m as validateS, u as parseSecret } from "./e2e-CUMZC53I.js";
2
2
 
3
3
  //#region ts/channels/link.ts
4
4
  const CH_DEFAULT_SIGHOST = "s.agent-yes.com";
@@ -134,4 +134,4 @@ function formatUntrustedInbound(op, opts) {
134
134
 
135
135
  //#endregion
136
136
  export { CH_DEFAULT_SIGHOST as a, formatChannelLink as c, parseChannelLink as d, secretFromTopic as f, parseCmd as i, formatChannelWebLink as l, isActionableCmd as n, deriveChannelId as o, isEphemeral as r, deriveRoom as s, formatUntrustedInbound as t, isChannelLink as u };
137
- //# sourceMappingURL=channels-BiGUYTuz.js.map
137
+ //# sourceMappingURL=channels-yE1YUHCl.js.map
package/dist/channels.js CHANGED
@@ -1,7 +1,7 @@
1
- import "./e2e-CEIdJGZ7.js";
2
- import { a as CH_DEFAULT_SIGHOST, c as formatChannelLink, d as parseChannelLink, f as secretFromTopic, i as parseCmd, l as formatChannelWebLink, n as isActionableCmd, o as deriveChannelId, r as isEphemeral, s as deriveRoom, t as formatUntrustedInbound, u as isChannelLink } from "./channels-BiGUYTuz.js";
3
- import { a as renderThread, c as makeOp, d as formatHlc, f as hlcSend, i as opsMissing, l as opId, n as maxHlc, o as sortOps, p as parseHlc, r as mergeOps, s as isValidOp, t as haveVector, u as compareHlc } from "./store-Ck0XRn-K.js";
4
- import "./peer-B5JKF4BP.js";
5
- import { t as AyChannel } from "./browser-B3dOptjL.js";
1
+ import "./e2e-CUMZC53I.js";
2
+ import { a as CH_DEFAULT_SIGHOST, c as formatChannelLink, d as parseChannelLink, f as secretFromTopic, i as parseCmd, l as formatChannelWebLink, n as isActionableCmd, o as deriveChannelId, r as isEphemeral, s as deriveRoom, t as formatUntrustedInbound, u as isChannelLink } from "./channels-yE1YUHCl.js";
3
+ import { a as renderThread, c as makeOp, d as formatHlc, f as hlcSend, i as opsMissing, l as opId, n as maxHlc, o as sortOps, p as parseHlc, r as mergeOps, s as isValidOp, t as haveVector, u as compareHlc } from "./store-BW5NBouz.js";
4
+ import "./peer-DIl5xtx8.js";
5
+ import { t as AyChannel } from "./browser-B7eYrBy7.js";
6
6
 
7
7
  export { AyChannel, AyChannel as default, CH_DEFAULT_SIGHOST, compareHlc, deriveChannelId, deriveRoom, formatChannelLink, formatChannelWebLink, formatHlc, formatUntrustedInbound, haveVector, hlcSend, isActionableCmd, isChannelLink, isEphemeral, isValidOp, makeOp, maxHlc, mergeOps, opId, opsMissing, parseChannelLink, parseCmd, parseHlc, renderThread, secretFromTopic, sortOps };
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-CKSvRBvj.js";
5
- import { r as getRustBinary } from "./rustBinary-B7kmq5S0.js";
4
+ import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-BlwkAisS.js";
5
+ import { r as getRustBinary } from "./rustBinary-Cd9DngDh.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-COp2OWcx.js");
288
+ const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken } = await import("./subcommands-DEcce_73.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-FQCbUoI-.js");
298
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-CUrSR0fn.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);
@@ -303,7 +303,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
303
303
  }
304
304
  }
305
305
  {
306
- const { detectCwdDeprecation, SUPPRESS_CWD_WARN_ENV } = await import("./cwdDeprecation-Cd-4t7lI.js");
306
+ const { detectCwdDeprecation, SUPPRESS_CWD_WARN_ENV } = await import("./cwdDeprecation-6iOtwFzS.js");
307
307
  const dep = detectCwdDeprecation(process.argv);
308
308
  if (dep) {
309
309
  console.warn(dep.message);
@@ -314,16 +314,16 @@ await checkAndAutoUpdate();
314
314
  logger.info(versionString());
315
315
  const config = parseCliArgs(process.argv);
316
316
  if (config.tray) {
317
- const { startTray } = await import("./tray-LxRESrQs.js");
317
+ const { startTray } = await import("./tray-d0GZiGI9.js");
318
318
  await startTray();
319
319
  await new Promise(() => {});
320
320
  }
321
321
  {
322
- const { ensureTray } = await import("./tray-LxRESrQs.js");
322
+ const { ensureTray } = await import("./tray-d0GZiGI9.js");
323
323
  ensureTray();
324
324
  }
325
325
  if (!config.showVersion && !config.appendPrompt && !config.tray) {
326
- const { waitForSpawnCapacity } = await import("./spawnGate-Djr4KlF5.js");
326
+ const { waitForSpawnCapacity } = await import("./spawnGate-DcG_Pn2f.js");
327
327
  await waitForSpawnCapacity({
328
328
  onWait: (reason, waitedMs) => {
329
329
  if (config.verbose || waitedMs === 0) console.error(`[agent-yes] spawn gate: ${reason} — waiting…`);
@@ -332,7 +332,7 @@ if (!config.showVersion && !config.appendPrompt && !config.tray) {
332
332
  });
333
333
  }
334
334
  if (!config.showVersion && !config.appendPrompt && !config.tray) {
335
- const { warnIfCwdOccupied } = await import("./cwdConflictWarn-DEJHqTZ4.js");
335
+ const { warnIfCwdOccupied } = await import("./cwdConflictWarn-DZTxTGXq.js");
336
336
  await warnIfCwdOccupied(process.argv);
337
337
  }
338
338
  if (config.useRust) {
@@ -346,14 +346,14 @@ if (config.useRust) {
346
346
  }
347
347
  }
348
348
  if (rustBinary) {
349
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-FQCbUoI-.js");
349
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-CUrSR0fn.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}`);
353
353
  console.log(`[rust] Args: ${rustArgs.join(" ")}`);
354
354
  }
355
355
  const attach = config.attach || process.env.AGENT_YES_ATTACH === "1";
356
- const { shouldForkNested, buildSpawnTutorial, waitForFifo } = await import("./forkNested-BW2OmXjA.js");
356
+ const { shouldForkNested, buildSpawnTutorial, waitForRegistration, predictedLogPath } = await import("./forkNested-CgJ1rTnT.js");
357
357
  if (shouldForkNested({
358
358
  isTTY: Boolean(process.stdout.isTTY),
359
359
  ayPid: process.env.AGENT_YES_PID,
@@ -377,14 +377,17 @@ if (config.useRust) {
377
377
  forked.on("exit", (code, signal) => {
378
378
  deathMsg ??= `Agent exited immediately (${signal ?? `code ${code}`}). See: ay tail ${forkedPid}`;
379
379
  });
380
- const registered = await waitForFifo(forkedPid, 2e3, () => deathMsg !== null);
380
+ const registered = await waitForRegistration(forkedPid, 5e3, () => deathMsg !== null);
381
381
  if (deathMsg) {
382
382
  console.error(deathMsg);
383
383
  process.exit(1);
384
384
  }
385
385
  forked.unref();
386
+ if (!registered) {
387
+ console.error(`Agent pid ${forkedPid} spawned but never became addressable (ay tail/ay send) within 5s.\nLog (if written yet): ${predictedLogPath(process.cwd(), forkedPid)}\nIt may still be starting up — retry: ay tail ${forkedPid}`);
388
+ process.exit(1);
389
+ }
386
390
  console.log(buildSpawnTutorial(config.cli || "agent", forkedPid));
387
- if (!registered) console.log(`(note: still registering — give ay send/tail a moment)`);
388
391
  process.exit(0);
389
392
  }
390
393
  const child = spawn(rustBinary, rustArgs, {
@@ -411,7 +414,7 @@ if (config.showVersion) {
411
414
  process.exit(0);
412
415
  }
413
416
  if (config.appendPrompt) {
414
- const { PidStore } = await import("./pidStore-Bg7wdjxY.js");
417
+ const { PidStore } = await import("./pidStore-BbKqQOS8.js");
415
418
  const ipcPath = await PidStore.findActiveFifo(process.cwd());
416
419
  if (!ipcPath) {
417
420
  console.error("No active agent with IPC found in current directory.");
@@ -69,4 +69,4 @@ async function loadSharedCliDefaults(fromUrl = import.meta.url) {
69
69
 
70
70
  //#endregion
71
71
  export { normalizeAgentYesConfig as n, loadSharedCliDefaults as t };
72
- //# sourceMappingURL=configShared-IBbnn9b8.js.map
72
+ //# sourceMappingURL=configShared-DtHMBCl7.js.map
@@ -1,5 +1,5 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import { i as readGlobalPids } from "./globalPidIndex-D9DOSd-c.js";
2
+ import { i as readGlobalPids } from "./globalPidIndex-Dq4KY2IV.js";
3
3
  import path from "path";
4
4
 
5
5
  //#region ts/cwdConflictWarn.ts
@@ -61,4 +61,4 @@ async function warnIfCwdOccupied(rawArgv) {
61
61
 
62
62
  //#endregion
63
63
  export { warnIfCwdOccupied };
64
- //# sourceMappingURL=cwdConflictWarn-DEJHqTZ4.js.map
64
+ //# sourceMappingURL=cwdConflictWarn-DZTxTGXq.js.map
@@ -75,4 +75,4 @@ function detectCwdDeprecation(argv) {
75
75
 
76
76
  //#endregion
77
77
  export { SUPPRESS_CWD_WARN_ENV, detectCwdDeprecation };
78
- //# sourceMappingURL=cwdDeprecation-Cd-4t7lI.js.map
78
+ //# sourceMappingURL=cwdDeprecation-6iOtwFzS.js.map
@@ -172,4 +172,4 @@ function randomHex(n) {
172
172
 
173
173
  //#endregion
174
174
  export { computeTranscriptHash as a, open as c, randomHex as d, seal as f, MAX_CHUNK as i, packEnvelope as l, validateS as m, FLAG_CONFIRM as n, deriveAuthToken as o, unpackEnvelope as p, MARKER as r, deriveDirKeys as s, CONFIRM_TIMEOUT_MS as t, parseSecret as u };
175
- //# sourceMappingURL=e2e-CEIdJGZ7.js.map
175
+ //# sourceMappingURL=e2e-CUMZC53I.js.map
@@ -549,4 +549,4 @@ async function cmdExpose(args) {
549
549
 
550
550
  //#endregion
551
551
  export { cmdExpose, ensureExposure, listExposures, stopExposure };
552
- //# sourceMappingURL=expose-BiJ-51Hm.js.map
552
+ //# sourceMappingURL=expose-BG17GV7D.js.map
@@ -1,5 +1,3 @@
1
- import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
2
- import { existsSync } from "fs";
3
1
  import path from "path";
4
2
 
5
3
  //#region ts/forkNested.ts
@@ -37,23 +35,37 @@ function buildSpawnTutorial(cli, pid) {
37
35
  ].join("\n");
38
36
  }
39
37
  /**
40
- * Poll for the spawned wrapper's stdin FIFO to appear, so the tutorial's
41
- * `ay send`/`ay tail` work the instant we print them (the wrapper registers its
42
- * FIFO a moment after spawn). Resolves true once registered, false on timeout or
43
- * if `aborted()` reports the child already died (so a startup failure fails fast
44
- * instead of waiting out the whole window).
38
+ * Poll the global pid registry (`~/.agent-yes/pids.jsonl`) for `pid` to become
39
+ * resolvable — the actual contract `ay tail`/`ay send` depend on (both resolve
40
+ * through `readGlobalPids()`), not a proxy signal. The wrapper creates its
41
+ * stdin FIFO BEFORE writing its pid_store record (see rs/src/main.rs), so
42
+ * polling the FIFO's existence the previous approach — could report "ready"
43
+ * before the registration it's meant to confirm had even happened.
44
+ *
45
+ * A record with `status: "exited"` doesn't count: the agent registered and
46
+ * then immediately died, so it's no more "addressable" than never registering.
47
+ * Resolves true once a live record for this pid appears, false on timeout or
48
+ * if `aborted()` reports the child already died (so a startup failure fails
49
+ * fast instead of waiting out the whole window).
45
50
  */
46
- async function waitForFifo(pid, timeoutMs = 2e3, aborted) {
47
- const fifo = path.join(agentYesHome(), "fifo", `${pid}.stdin`);
51
+ async function waitForRegistration(pid, timeoutMs = 5e3, aborted) {
52
+ const { readGlobalPids } = await import("./globalPidIndex-CQX_0JSB.js");
53
+ const isRegistered = async () => (await readGlobalPids()).some((r) => r.pid === pid && r.status !== "exited");
48
54
  const deadline = Date.now() + timeoutMs;
49
55
  while (Date.now() < deadline) {
50
56
  if (aborted?.()) return false;
51
- if (existsSync(fifo)) return true;
52
- await new Promise((r) => setTimeout(r, 50));
57
+ if (await isRegistered()) return true;
58
+ await new Promise((r) => setTimeout(r, 100));
53
59
  }
54
- return existsSync(fifo);
60
+ return isRegistered();
61
+ }
62
+ /** Predicted per-agent raw log path — deterministic from cwd + pid (see
63
+ * rs/src/log_files.rs's `project_log_dir`), so it's known even when the
64
+ * agent never registered. */
65
+ function predictedLogPath(cwd, pid) {
66
+ return path.join(cwd, ".agent-yes", `${pid}.raw.log`);
55
67
  }
56
68
 
57
69
  //#endregion
58
- export { buildSpawnTutorial, shouldForkNested, waitForFifo };
59
- //# sourceMappingURL=forkNested-BW2OmXjA.js.map
70
+ export { buildSpawnTutorial, predictedLogPath, shouldForkNested, waitForRegistration };
71
+ //# sourceMappingURL=forkNested-CgJ1rTnT.js.map
@@ -0,0 +1,4 @@
1
+ import "./logger-CDIsZ-Pp.js";
2
+ import { a as updateGlobalPidStatus, i as readGlobalPids, n as maybeCompactGlobalPids, r as pruneOldLogs, t as appendGlobalPid } from "./globalPidIndex-Dq4KY2IV.js";
3
+
4
+ export { readGlobalPids };
@@ -188,4 +188,4 @@ async function pruneOldLogs(maxAgeMs = retentionMs()) {
188
188
 
189
189
  //#endregion
190
190
  export { updateGlobalPidStatus as a, readGlobalPids as i, maybeCompactGlobalPids as n, pruneOldLogs as r, appendGlobalPid as t };
191
- //# sourceMappingURL=globalPidIndex-D9DOSd-c.js.map
191
+ //# sourceMappingURL=globalPidIndex-Dq4KY2IV.js.map
@@ -10895,4 +10895,4 @@ const html2canvas = (element, options = {}, config) => {
10895
10895
 
10896
10896
  //#endregion
10897
10897
  export { Html2CanvasConfig, PerformanceMonitor, Validator, createDefaultValidator, html2canvas as default, html2canvas };
10898
- //# sourceMappingURL=html2canvas-pro.esm-BZqMtqU8.js.map
10898
+ //# sourceMappingURL=html2canvas-pro.esm-cq4l_ZIw.js.map
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-CKSvRBvj.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-B4LZq-x9.js";
2
+ import "./versionChecker-BlwkAisS.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-DLM7M0W3.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-BQRW614S.js";
5
5
  import "./JsonlStore-CPGIR0Wy.js";
6
- import "./globalPidIndex-D9DOSd-c.js";
7
- import "./pidStore-vnX0bgra.js";
8
- import "./messageLog-C-YIzhRj.js";
6
+ import "./globalPidIndex-Dq4KY2IV.js";
7
+ import "./pidStore-Cmcc8Oej.js";
8
+ import "./messageLog-BYFwioFY.js";
9
9
 
10
10
  export { AgentContext, CLIS_CONFIG, CycleError, DONE_STATE, LIFECYCLES, ORPHANED_STATE, TodoStore, answerAsk, canTransition, config, agentYes as default, describeBlock, hasTodoStore, initialState, isKnownKind, listAsks, listAsksForProject, monitorHint, nextStates, openBlockers, openStore, reconcileTodos, removeControlCharacters, renderDigest, renderTree, requiredGate, statesOf, unblockedTasks };
@@ -91,4 +91,4 @@ async function readMailbox(cwd, box) {
91
91
 
92
92
  //#endregion
93
93
  export { recordOutbox as a, recordMessage as i, readMailbox as n, recordInbox as r, partyMatches as t };
94
- //# sourceMappingURL=messageLog-C-YIzhRj.js.map
94
+ //# sourceMappingURL=messageLog-BYFwioFY.js.map
@@ -53,4 +53,4 @@ async function ensureNodeRuntime(which = Bun.which) {
53
53
 
54
54
  //#endregion
55
55
  export { liveEnv as n, ensureNodeRuntime as t };
56
- //# sourceMappingURL=nodeRuntime-BtL6Oo1o.js.map
56
+ //# sourceMappingURL=nodeRuntime-vhOBffJ3.js.map
@@ -1,11 +1,11 @@
1
1
  import { n as logger } from "./logger-CDIsZ-Pp.js";
2
- import "./globalPidIndex-D9DOSd-c.js";
3
- import "./messageLog-C-YIzhRj.js";
4
- import "./e2e-CEIdJGZ7.js";
5
- import "./configShared-IBbnn9b8.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-Cz_tHj4P.js";
7
- import "./webrtcLink-BMYneHbu.js";
8
- import "./remotes-a0bGDae9.js";
2
+ import "./globalPidIndex-Dq4KY2IV.js";
3
+ import "./messageLog-BYFwioFY.js";
4
+ import "./e2e-CUMZC53I.js";
5
+ import "./configShared-DtHMBCl7.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-CAYOfibe.js";
7
+ import "./webrtcLink-CS4D-3G1.js";
8
+ import "./remotes-BwytVgTX.js";
9
9
  import { mkdir, readFile, rename, rm, stat, writeFile } from "fs/promises";
10
10
  import { randomUUID } from "node:crypto";
11
11
  import { execFile, execFileSync } from "node:child_process";
@@ -836,4 +836,4 @@ async function ensureDaemon() {
836
836
 
837
837
  //#endregion
838
838
  export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
839
- //# sourceMappingURL=notifyDaemon-CnhKvdl7.js.map
839
+ //# sourceMappingURL=notifyDaemon-7udiA8IF.js.map
@@ -68,4 +68,4 @@ async function offerOpenInBrowser(url, prompt = "Open in browser now? [Y/n] ") {
68
68
 
69
69
  //#endregion
70
70
  export { offerOpenInBrowser };
71
- //# sourceMappingURL=openBrowser-DifNZwyn.js.map
71
+ //# sourceMappingURL=openBrowser-D-aQjh3y.js.map
@@ -0,0 +1,4 @@
1
+ import "./e2e-CUMZC53I.js";
2
+ import { t as ChannelPeer } from "./peer-DIl5xtx8.js";
3
+
4
+ export { ChannelPeer };
@@ -1,5 +1,5 @@
1
- import { a as computeTranscriptHash, c as open, d as randomHex, f as seal, l as packEnvelope, n as FLAG_CONFIRM, o as deriveAuthToken, p as unpackEnvelope, s as deriveDirKeys, t as CONFIRM_TIMEOUT_MS } from "./e2e-CEIdJGZ7.js";
2
- import { i as opsMissing, s as isValidOp, t as haveVector } from "./store-Ck0XRn-K.js";
1
+ import { a as computeTranscriptHash, c as open, d as randomHex, f as seal, l as packEnvelope, n as FLAG_CONFIRM, o as deriveAuthToken, p as unpackEnvelope, s as deriveDirKeys, t as CONFIRM_TIMEOUT_MS } from "./e2e-CUMZC53I.js";
2
+ import { i as opsMissing, s as isValidOp, t as haveVector } from "./store-BW5NBouz.js";
3
3
 
4
4
  //#region ts/channels/peer.ts
5
5
  const SIGNAL_SUBPROTOCOL = "ay-signal-1";
@@ -363,4 +363,4 @@ var ChannelPeer = class {
363
363
 
364
364
  //#endregion
365
365
  export { ChannelPeer as t };
366
- //# sourceMappingURL=peer-B5JKF4BP.js.map
366
+ //# sourceMappingURL=peer-DIl5xtx8.js.map
@@ -0,0 +1,6 @@
1
+ import "./logger-CDIsZ-Pp.js";
2
+ import "./JsonlStore-CPGIR0Wy.js";
3
+ import "./globalPidIndex-Dq4KY2IV.js";
4
+ import { t as PidStore } from "./pidStore-Cmcc8Oej.js";
5
+
6
+ export { PidStore };
@@ -1,7 +1,7 @@
1
1
  import { n as logger } from "./logger-CDIsZ-Pp.js";
2
2
  import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
3
3
  import { t as JsonlStore } from "./JsonlStore-CPGIR0Wy.js";
4
- import { a as updateGlobalPidStatus, n as maybeCompactGlobalPids, r as pruneOldLogs, t as appendGlobalPid } from "./globalPidIndex-D9DOSd-c.js";
4
+ import { a as updateGlobalPidStatus, n as maybeCompactGlobalPids, r as pruneOldLogs, t as appendGlobalPid } from "./globalPidIndex-Dq4KY2IV.js";
5
5
  import { mkdir, writeFile } from "fs/promises";
6
6
  import path from "path";
7
7
  import { randomBytes } from "node:crypto";
@@ -190,4 +190,4 @@ pid-db/
190
190
 
191
191
  //#endregion
192
192
  export { PidStore as t };
193
- //# sourceMappingURL=pidStore-vnX0bgra.js.map
193
+ //# sourceMappingURL=pidStore-Cmcc8Oej.js.map
@@ -1,3 +1,3 @@
1
- import { n as register, r as sweep, t as pgidForWrapper } from "./reaper-DP49VCKx.js";
1
+ import { n as register, r as sweep, t as pgidForWrapper } from "./reaper-C4BvNylH.js";
2
2
 
3
3
  export { sweep };
@@ -107,4 +107,4 @@ async function pruneStaleActivityMarkers() {
107
107
 
108
108
  //#endregion
109
109
  export { register as n, sweep as r, pgidForWrapper as t };
110
- //# sourceMappingURL=reaper-DP49VCKx.js.map
110
+ //# sourceMappingURL=reaper-C4BvNylH.js.map
@@ -1,4 +1,4 @@
1
- import { n as isWebrtcSpec } from "./webrtcLink-BMYneHbu.js";
1
+ import { n as isWebrtcSpec } from "./webrtcLink-CS4D-3G1.js";
2
2
  import { mkdir, readFile, writeFile } from "fs/promises";
3
3
  import { homedir } from "os";
4
4
  import path from "path";
@@ -86,7 +86,7 @@ async function resolveRemoteSpec(spec) {
86
86
  * The bridge lives for the rest of the process (torn down on `process.exit`).
87
87
  */
88
88
  async function resolveWebrtc(link, keyword) {
89
- const { startWebrtcBridge } = await import("./webrtcRemote-DgoZGUr9.js");
89
+ const { startWebrtcBridge } = await import("./webrtcRemote-BXmkHX-i.js");
90
90
  const bridge = await startWebrtcBridge(link);
91
91
  return {
92
92
  url: bridge.baseUrl,
@@ -173,4 +173,4 @@ async function cmdRemote(rest) {
173
173
 
174
174
  //#endregion
175
175
  export { resolveRemoteSpec as a, readRemotes as i, deleteRemoteAlias as n, writeRemoteAlias as o, parseDirectRemoteSpec as r, cmdRemote as t };
176
- //# sourceMappingURL=remotes-a0bGDae9.js.map
176
+ //# sourceMappingURL=remotes-BwytVgTX.js.map
@@ -1,5 +1,5 @@
1
- import "./e2e-CEIdJGZ7.js";
2
- import "./webrtcLink-BMYneHbu.js";
3
- import { a as resolveRemoteSpec, i as readRemotes, n as deleteRemoteAlias, o as writeRemoteAlias, r as parseDirectRemoteSpec, t as cmdRemote } from "./remotes-a0bGDae9.js";
1
+ import "./e2e-CUMZC53I.js";
2
+ import "./webrtcLink-CS4D-3G1.js";
3
+ import { a as resolveRemoteSpec, i as readRemotes, n as deleteRemoteAlias, o as writeRemoteAlias, r as parseDirectRemoteSpec, t as cmdRemote } from "./remotes-BwytVgTX.js";
4
4
 
5
5
  export { cmdRemote };
@@ -1,4 +1,4 @@
1
- import { r as getInstalledPackage } from "./versionChecker-CKSvRBvj.js";
1
+ import { r as getInstalledPackage } from "./versionChecker-BlwkAisS.js";
2
2
  import { execFileSync } from "child_process";
3
3
  import { existsSync, mkdirSync, unlinkSync } from "fs";
4
4
  import { chmod, copyFile } from "fs/promises";
@@ -243,4 +243,4 @@ async function getRustBinary(options = {}) {
243
243
 
244
244
  //#endregion
245
245
  export { findTrayLauncher as n, getRustBinary as r, findSpawnHiddenLauncher as t };
246
- //# sourceMappingURL=rustBinary-B7kmq5S0.js.map
246
+ //# sourceMappingURL=rustBinary-Cd9DngDh.js.map