agent-yes 1.303.0 → 1.303.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 (74) hide show
  1. package/dist/{SUPPORTED_CLIS-BvWBFlrN.js → SUPPORTED_CLIS-ByO5twge.js} +3 -3
  2. package/dist/{SUPPORTED_CLIS-CqmE-ESB.js → SUPPORTED_CLIS-Dq9Lq9WJ.js} +2 -2
  3. package/dist/{agentShare-Gb4vxJzE.js → agentShare-suB6yPgO.js} +7 -6
  4. package/dist/{askCli-J9hHcgJz.js → askCli-BU3CNCLU.js} +2 -2
  5. package/dist/{callback-CuIY-75l.js → callback-Ctj3_Wxp.js} +5 -5
  6. package/dist/{callback-ZzRPkYjf.js → callback-D7qfh_7p.js} +7 -6
  7. package/dist/{callbackCore-DXVwvq0X.js → callbackCore-BesbQ6-Z.js} +1 -1
  8. package/dist/{callbackCore-BVEHd6Yt.js → callbackCore-DSJWhqAe.js} +1 -1
  9. package/dist/{channels-BLdkzCbv.js → channels-j5nWuzlQ.js} +2 -2
  10. package/dist/cli.js +11 -11
  11. package/dist/{cmdDsh-CymghOa0.js → cmdDsh-2LP0grim.js} +1 -1
  12. package/dist/{cmdPs-DSKYjOKS.js → cmdPs-wc1j85fi.js} +7 -6
  13. package/dist/{cwdConflictWarn-DXh7qJz6.js → cwdConflictWarn-skQSMwEh.js} +1 -1
  14. package/dist/{cwdPassthroughHint-DADidTOP.js → cwdPassthroughHint-BUbWMoz0.js} +1 -1
  15. package/dist/{expose-ZFn10b_l.js → expose-Dawq1LxC.js} +1 -1
  16. package/dist/{forkNested-DD_4xEL8.js → forkNested-CavHyWzA.js} +1 -1
  17. package/dist/{hist-Dy-JVuUY.js → hist-Cs0KFSUW.js} +1 -1
  18. package/dist/index.js +2 -2
  19. package/dist/{initMsg-BGBIVi_Q.js → initMsg-CcTqFtsp.js} +1 -1
  20. package/dist/{initMsg-NleE4YLm.js → initMsg-D9KJnfgC.js} +1 -1
  21. package/dist/{needsInput-D__56HYf.js → needsInput-hRiWFjGy.js} +1 -1
  22. package/dist/{nodeRuntime-oANVaOqi.js → nodeRuntime-DGMQRTGT.js} +1 -1
  23. package/dist/{notifyDaemon-C_gTWqYZ.js → notifyDaemon-C7GlfJ1E.js} +6 -5
  24. package/dist/{notifyStore-D9cNjXFG.js → notifyStore-C4pH_-zJ.js} +1 -1
  25. package/dist/{notifyStore-DI4iKFut.js → notifyStore-DIfkfKB2.js} +1 -1
  26. package/dist/{openBrowser-B6ZyKxfP.js → openBrowser-1cIo4dJL.js} +1 -1
  27. package/dist/{parentLink-qUr7dRdh.js → parentLink-B58V1RVd.js} +1 -1
  28. package/dist/{parentLink-CB8Nc-dr.js → parentLink-DoEWVGld.js} +1 -1
  29. package/dist/{parentPingLoop-BhVR1EQm.js → parentPingLoop-C73bbmCE.js} +6 -6
  30. package/dist/{procStats-xvUthnOx.js → procStats-BvmrBrOs.js} +1 -1
  31. package/dist/{remotes-COBEhmlr.js → remotes-DevcBeLl.js} +5 -4
  32. package/dist/{remotes-C36aI8Ty.js → remotes-MfdV9M8u.js} +2 -2
  33. package/dist/roomReplyAlias-DFqg_6IU.js +58 -0
  34. package/dist/roomReplyAlias-DuEkSSDI.js +6 -0
  35. package/dist/{rustBinary-eOcvZ5yS.js → rustBinary-7VK7oLlW.js} +24 -3
  36. package/dist/rustBinary-BV4LxMMn.js +4 -0
  37. package/dist/{schedule-E2QlsME5.js → schedule-Dp0qkNO1.js} +6 -6
  38. package/dist/{serve-BWy7zL7j.js → serve-BpOIIOVc.js} +48 -41
  39. package/dist/{serveRust-BgY5Te5E.js → serveRust-CbBrcUrg.js} +2 -2
  40. package/dist/{setup-CD9-RyhT.js → setup-DdIBk6Iv.js} +4 -4
  41. package/dist/{share-530eCWft.js → share-DrS3LYqf.js} +1 -1
  42. package/dist/{share-Jl8Eia9b.js → share-w5oRbvlj.js} +1 -1
  43. package/dist/{shareCmd-Drxb-SjM.js → shareCmd-DDENkBW2.js} +10 -10
  44. package/dist/{spawnGate-CsQ4_N5h.js → spawnGate-DeQBTX-o.js} +1 -1
  45. package/dist/{spawnGate-SX13EqI3.js → spawnGate-lr3tvA6U.js} +2 -2
  46. package/dist/{subcommands-C627cuOl.js → subcommands-DmiswRy4.js} +5 -4
  47. package/dist/{subcommands-Cc6bmEnB.js → subcommands-DxgvDmZX.js} +36 -31
  48. package/dist/{systemPathLink-eWUYHNXm.js → systemPathLink-SjUzgSiq.js} +1 -1
  49. package/dist/{terminal-BddOL2fx.js → terminal-C2h7tpe0.js} +2 -2
  50. package/dist/{todoCli-B62mo9af.js → todoCli-BWm5nZE0.js} +2 -2
  51. package/dist/{todoIdentity-CY1UkEs7.js → todoIdentity-BvXZKWJI.js} +1 -1
  52. package/dist/{tray-DJtC0yib.js → tray-BeRSozJz.js} +1 -1
  53. package/dist/trayApp-C4TAvRvU.js +5 -0
  54. package/dist/{trayApp-D0UYVT6n.js → trayApp-QQjqhDv1.js} +2 -2
  55. package/dist/{ts-Bm6FhYS4.js → ts-6LF7f4fx.js} +5 -5
  56. package/dist/{versionChecker-CFyZKym2.js → versionChecker-Bc62HNf6.js} +2 -2
  57. package/dist/{webrtcLink-CHLgPKWj.js → webrtcLink-SsInrVHU.js} +1 -1
  58. package/dist/{webrtcLink-bWxiCBTV.js → webrtcLink-va_gAR77.js} +1 -1
  59. package/dist/{webrtcRemote-RmkbzY6Y.js → webrtcRemote-BlGyNZDC.js} +2 -2
  60. package/dist/{widget-C6-P26Ue.js → widget-Crb5zeHL.js} +3 -3
  61. package/dist/{workspaceConfig-CWGh8o36.js → workspaceConfig-BLWB5Wu9.js} +1 -1
  62. package/dist/{ws-DmiSL50p.js → ws-BRhPG1Vy.js} +6 -5
  63. package/dist/{ws-DCcdDRXH.js → ws-DIbwNz8Z.js} +3 -3
  64. package/package.json +1 -1
  65. package/ts/buildEnvelope.bun.spec.ts +10 -0
  66. package/ts/buildEnvelope.spec.ts +10 -0
  67. package/ts/remotes.ts +9 -1
  68. package/ts/roomReplyAlias.spec.ts +21 -0
  69. package/ts/roomReplyAlias.ts +67 -0
  70. package/ts/rustBinary.ts +19 -0
  71. package/ts/serve.ts +13 -5
  72. package/ts/subcommands.ts +12 -6
  73. package/dist/rustBinary-Ep0x7WrS.js +0 -4
  74. package/dist/trayApp-CdLbJK5F.js +0 -5
@@ -1,12 +1,12 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-CFyZKym2.js";
3
- import "./ts-Bm6FhYS4.js";
2
+ import "./versionChecker-Bc62HNf6.js";
3
+ import "./ts-6LF7f4fx.js";
4
4
  import "./todoAutomation-TTp_Qz9G.js";
5
5
  import "./JsonlStore-BpYZZTap.js";
6
6
  import "./globalPidIndex-CRB5KtyL.js";
7
7
  import "./pidStore-433kvh9D.js";
8
8
  import "./messageLog-Dq_ka-Bt.js";
9
9
  import "./todoStore-C9RTz0Vs.js";
10
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CqmE-ESB.js";
10
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Dq9Lq9WJ.js";
11
11
 
12
12
  export { SUPPORTED_CLIS };
@@ -1,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-Bm6FhYS4.js";
1
+ import { t as CLIS_CONFIG } from "./ts-6LF7f4fx.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-CqmE-ESB.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-Dq9Lq9WJ.js.map
@@ -5,11 +5,12 @@ import "./pidStore-433kvh9D.js";
5
5
  import "./messageLog-Dq_ka-Bt.js";
6
6
  import "./e2e-BdLf8DvY.js";
7
7
  import "./configShared-De4bR5hH.js";
8
- import { nt as resolveOne } from "./subcommands-Cc6bmEnB.js";
9
- import "./notifyStore-DI4iKFut.js";
10
- import "./webrtcLink-bWxiCBTV.js";
11
- import "./remotes-COBEhmlr.js";
12
- import { l as startShare } from "./share-Jl8Eia9b.js";
8
+ import "./webrtcLink-va_gAR77.js";
9
+ import "./remotes-DevcBeLl.js";
10
+ import "./roomReplyAlias-DFqg_6IU.js";
11
+ import { nt as resolveOne } from "./subcommands-DxgvDmZX.js";
12
+ import "./notifyStore-DIfkfKB2.js";
13
+ import { l as startShare } from "./share-w5oRbvlj.js";
13
14
 
14
15
  //#region ts/agentShare.ts
15
16
  const MAX_SHARES = 8;
@@ -232,4 +233,4 @@ function transformEvent(rawEvent, agentId, forwarded) {
232
233
 
233
234
  //#endregion
234
235
  export { createScopedShare, listShares, revokeAllShares, revokeShare };
235
- //# sourceMappingURL=agentShare-Gb4vxJzE.js.map
236
+ //# sourceMappingURL=agentShare-suB6yPgO.js.map
@@ -3,7 +3,7 @@ import "./JsonlStore-BpYZZTap.js";
3
3
  import "./globalPidIndex-CRB5KtyL.js";
4
4
  import { r as openStore } from "./todoStore-C9RTz0Vs.js";
5
5
  import { t as formatIdentity } from "./identity-Bk-aG_xl.js";
6
- import { a as resolveTodoRoot, i as resolveSelf } from "./todoIdentity-CY1UkEs7.js";
6
+ import { a as resolveTodoRoot, i as resolveSelf } from "./todoIdentity-BvXZKWJI.js";
7
7
  import yargs from "yargs";
8
8
  import { randomBytes } from "crypto";
9
9
 
@@ -269,4 +269,4 @@ async function runAnswerSubcommand(rest, deps) {
269
269
 
270
270
  //#endregion
271
271
  export { runAnswerSubcommand, runAskSubcommand };
272
- //# sourceMappingURL=askCli-J9hHcgJz.js.map
272
+ //# sourceMappingURL=askCli-BU3CNCLU.js.map
@@ -1,6 +1,6 @@
1
1
  import { t as agentYesHome } from "./agentYesHome-JmJC28YX.js";
2
- import { nt as resolveOne } from "./subcommands-Cc6bmEnB.js";
3
- import { a as mintCapability, o as parseExpires } from "./callbackCore-DXVwvq0X.js";
2
+ import { nt as resolveOne } from "./subcommands-DxgvDmZX.js";
3
+ import { a as mintCapability, o as parseExpires } from "./callbackCore-BesbQ6-Z.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-BWy7zL7j.js");
75
+ const { resolveLocalServeUrl } = await import("./serve-BpOIIOVc.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-BVEHd6Yt.js");
173
+ const { buildSnippet } = await import("./callbackCore-DSJWhqAe.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-CuIY-75l.js.map
190
+ //# sourceMappingURL=callback-Ctj3_Wxp.js.map
@@ -5,11 +5,12 @@ import "./pidStore-433kvh9D.js";
5
5
  import "./messageLog-Dq_ka-Bt.js";
6
6
  import "./e2e-BdLf8DvY.js";
7
7
  import "./configShared-De4bR5hH.js";
8
- import "./subcommands-Cc6bmEnB.js";
9
- import "./notifyStore-DI4iKFut.js";
10
- import "./webrtcLink-bWxiCBTV.js";
11
- import "./remotes-COBEhmlr.js";
12
- import "./callbackCore-DXVwvq0X.js";
13
- import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-CuIY-75l.js";
8
+ import "./webrtcLink-va_gAR77.js";
9
+ import "./remotes-DevcBeLl.js";
10
+ import "./roomReplyAlias-DFqg_6IU.js";
11
+ import "./subcommands-DxgvDmZX.js";
12
+ import "./notifyStore-DIfkfKB2.js";
13
+ import "./callbackCore-BesbQ6-Z.js";
14
+ import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-Ctj3_Wxp.js";
14
15
 
15
16
  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-DXVwvq0X.js.map
143
+ //# sourceMappingURL=callbackCore-BesbQ6-Z.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-DXVwvq0X.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-BesbQ6-Z.js";
2
2
 
3
3
  export { buildSnippet };
@@ -387,7 +387,7 @@ function printOp(op) {
387
387
  */
388
388
  async function runMesh(cwd, entry, opts) {
389
389
  const { ChannelPeer } = await import("./peer-3F7owPWt.js");
390
- const { importRTC, getIceServers } = await import("./share-530eCWft.js");
390
+ const { importRTC, getIceServers } = await import("./share-DrS3LYqf.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-BLdkzCbv.js.map
570
+ //# sourceMappingURL=channels-j5nWuzlQ.js.map
package/dist/cli.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env bun
2
2
  import { t as invokedCliName } from "./invokedCli-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-CFyZKym2.js";
5
- import { p as getRustBinary } from "./rustBinary-eOcvZ5yS.js";
4
+ import { a as versionString, r as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-Bc62HNf6.js";
5
+ import { m as getRustBinary } from "./rustBinary-7VK7oLlW.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-C627cuOl.js");
298
+ const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken, isBareManagerInvocation } = await import("./subcommands-DmiswRy4.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-BvWBFlrN.js");
312
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-ByO5twge.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);
@@ -317,7 +317,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
317
317
  }
318
318
  }
319
319
  {
320
- const { detectCwdPassthrough, SUPPRESS_CWD_WARN_ENV } = await import("./cwdPassthroughHint-DADidTOP.js");
320
+ const { detectCwdPassthrough, SUPPRESS_CWD_WARN_ENV } = await import("./cwdPassthroughHint-BUbWMoz0.js");
321
321
  const dep = detectCwdPassthrough(process.argv);
322
322
  if (dep) {
323
323
  console.warn(dep.message);
@@ -328,16 +328,16 @@ await checkAndAutoUpdate();
328
328
  logger.info(versionString());
329
329
  const config = parseCliArgs(process.argv);
330
330
  if (config.tray) {
331
- const { startTray } = await import("./tray-DJtC0yib.js");
331
+ const { startTray } = await import("./tray-BeRSozJz.js");
332
332
  await startTray();
333
333
  await new Promise(() => {});
334
334
  }
335
335
  {
336
- const { ensureTray } = await import("./tray-DJtC0yib.js");
336
+ const { ensureTray } = await import("./tray-BeRSozJz.js");
337
337
  ensureTray();
338
338
  }
339
339
  if (!config.showVersion && !config.appendPrompt && !config.tray) {
340
- const { waitForSpawnCapacity } = await import("./spawnGate-CsQ4_N5h.js");
340
+ const { waitForSpawnCapacity } = await import("./spawnGate-DeQBTX-o.js");
341
341
  await waitForSpawnCapacity({
342
342
  onWait: (reason, waitedMs) => {
343
343
  if (config.verbose || waitedMs === 0) console.error(`[agent-yes] spawn gate: ${reason} — waiting…`);
@@ -346,7 +346,7 @@ if (!config.showVersion && !config.appendPrompt && !config.tray) {
346
346
  });
347
347
  }
348
348
  if (!config.showVersion && !config.appendPrompt && !config.tray) {
349
- const { warnIfCwdOccupied } = await import("./cwdConflictWarn-DXh7qJz6.js");
349
+ const { warnIfCwdOccupied } = await import("./cwdConflictWarn-skQSMwEh.js");
350
350
  await warnIfCwdOccupied(process.argv);
351
351
  }
352
352
  if (config.useRust) {
@@ -360,14 +360,14 @@ if (config.useRust) {
360
360
  }
361
361
  }
362
362
  if (rustBinary) {
363
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BvWBFlrN.js");
363
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-ByO5twge.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}`);
367
367
  console.log(`[rust] Args: ${rustArgs.join(" ")}`);
368
368
  }
369
369
  const attach = config.attach || process.env.AGENT_YES_ATTACH === "1";
370
- const { shouldForkNested, buildSpawnTutorial, waitForRegistration, confirmAgentStarted, predictedLogPath } = await import("./forkNested-DD_4xEL8.js");
370
+ const { shouldForkNested, buildSpawnTutorial, waitForRegistration, confirmAgentStarted, predictedLogPath } = await import("./forkNested-CavHyWzA.js");
371
371
  if (shouldForkNested({
372
372
  isTTY: Boolean(process.stdout.isTTY),
373
373
  ayPid: process.env.AGENT_YES_PID,
@@ -42,4 +42,4 @@ async function cmdDsh(rest, spawn = defaultSpawn) {
42
42
 
43
43
  //#endregion
44
44
  export { cmdDsh };
45
- //# sourceMappingURL=cmdDsh-CymghOa0.js.map
45
+ //# sourceMappingURL=cmdDsh-2LP0grim.js.map
@@ -5,11 +5,12 @@ import "./pidStore-433kvh9D.js";
5
5
  import "./messageLog-Dq_ka-Bt.js";
6
6
  import "./e2e-BdLf8DvY.js";
7
7
  import "./configShared-De4bR5hH.js";
8
- import { V as listRecords, bt as flattenForest, v as deriveLiveState, yt as buildAgentForest } from "./subcommands-Cc6bmEnB.js";
9
- import "./notifyStore-DI4iKFut.js";
10
- import "./webrtcLink-bWxiCBTV.js";
11
- import "./remotes-COBEhmlr.js";
12
- import { i as systemStats, n as sampleTrees, r as snapshotProcs, t as humanBytes } from "./procStats-xvUthnOx.js";
8
+ import "./webrtcLink-va_gAR77.js";
9
+ import "./remotes-DevcBeLl.js";
10
+ import "./roomReplyAlias-DFqg_6IU.js";
11
+ import { V as listRecords, bt as flattenForest, v as deriveLiveState, yt as buildAgentForest } from "./subcommands-DxgvDmZX.js";
12
+ import "./notifyStore-DIfkfKB2.js";
13
+ import { i as systemStats, n as sampleTrees, r as snapshotProcs, t as humanBytes } from "./procStats-BvmrBrOs.js";
13
14
  import yargs from "yargs";
14
15
  import { readFileSync } from "node:fs";
15
16
  import path from "node:path";
@@ -330,4 +331,4 @@ function readPpidSync(pid) {
330
331
 
331
332
  //#endregion
332
333
  export { cmdPs };
333
- //# sourceMappingURL=cmdPs-DSKYjOKS.js.map
334
+ //# sourceMappingURL=cmdPs-wc1j85fi.js.map
@@ -61,4 +61,4 @@ async function warnIfCwdOccupied(rawArgv) {
61
61
 
62
62
  //#endregion
63
63
  export { warnIfCwdOccupied };
64
- //# sourceMappingURL=cwdConflictWarn-DXh7qJz6.js.map
64
+ //# sourceMappingURL=cwdConflictWarn-skQSMwEh.js.map
@@ -85,4 +85,4 @@ function detectCwdPassthrough(argv) {
85
85
 
86
86
  //#endregion
87
87
  export { SUPPRESS_CWD_WARN_ENV, detectCwdPassthrough };
88
- //# sourceMappingURL=cwdPassthroughHint-DADidTOP.js.map
88
+ //# sourceMappingURL=cwdPassthroughHint-BUbWMoz0.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-ZFn10b_l.js.map
552
+ //# sourceMappingURL=expose-Dawq1LxC.js.map
@@ -141,4 +141,4 @@ async function confirmAgentStarted(pid, graceMs = 1500, aborted) {
141
141
 
142
142
  //#endregion
143
143
  export { buildSpawnTutorial, confirmAgentStarted, predictedLogPath, shouldForkNested, waitForRegistration };
144
- //# sourceMappingURL=forkNested-DD_4xEL8.js.map
144
+ //# sourceMappingURL=forkNested-CavHyWzA.js.map
@@ -439,4 +439,4 @@ async function cmdHist(rest) {
439
439
 
440
440
  //#endregion
441
441
  export { cmdHist };
442
- //# sourceMappingURL=hist-Dy-JVuUY.js.map
442
+ //# sourceMappingURL=hist-Cs0KFSUW.js.map
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-CFyZKym2.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-Bm6FhYS4.js";
2
+ import "./versionChecker-Bc62HNf6.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-6LF7f4fx.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-TTp_Qz9G.js";
5
5
  import "./JsonlStore-BpYZZTap.js";
6
6
  import "./globalPidIndex-CRB5KtyL.js";
@@ -86,4 +86,4 @@ function buildInitMsg(prompt, spawner, nonce, identity) {
86
86
 
87
87
  //#endregion
88
88
  export { replyTargetOf as n, shortenHome as r, buildInitMsg as t };
89
- //# sourceMappingURL=initMsg-BGBIVi_Q.js.map
89
+ //# sourceMappingURL=initMsg-CcTqFtsp.js.map
@@ -1,3 +1,3 @@
1
- import { n as replyTargetOf, r as shortenHome, t as buildInitMsg } from "./initMsg-BGBIVi_Q.js";
1
+ import { n as replyTargetOf, r as shortenHome, t as buildInitMsg } from "./initMsg-CcTqFtsp.js";
2
2
 
3
3
  export { buildInitMsg };
@@ -76,4 +76,4 @@ function isWorkingScreen(lines, working) {
76
76
 
77
77
  //#endregion
78
78
  export { isWorkingScreen as n, parseMenu as r, classifyNeedsInput as t };
79
- //# sourceMappingURL=needsInput-D__56HYf.js.map
79
+ //# sourceMappingURL=needsInput-hRiWFjGy.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-oANVaOqi.js.map
56
+ //# sourceMappingURL=nodeRuntime-DGMQRTGT.js.map
@@ -5,10 +5,11 @@ import "./pidStore-433kvh9D.js";
5
5
  import "./messageLog-Dq_ka-Bt.js";
6
6
  import "./e2e-BdLf8DvY.js";
7
7
  import "./configShared-De4bR5hH.js";
8
- import { $ as renderLogTailLines, N as isPidAlive, V as listRecords, v as deriveLiveState } from "./subcommands-Cc6bmEnB.js";
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-DI4iKFut.js";
10
- import "./webrtcLink-bWxiCBTV.js";
11
- import "./remotes-COBEhmlr.js";
8
+ import "./webrtcLink-va_gAR77.js";
9
+ import "./remotes-DevcBeLl.js";
10
+ import "./roomReplyAlias-DFqg_6IU.js";
11
+ import { $ as renderLogTailLines, N as isPidAlive, V as listRecords, v as deriveLiveState } from "./subcommands-DxgvDmZX.js";
12
+ 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-DIfkfKB2.js";
12
13
  import { mkdir, readFile, rename, rm, stat, writeFile } from "fs/promises";
13
14
  import { randomUUID } from "node:crypto";
14
15
  import { execFile, execFileSync } from "node:child_process";
@@ -879,4 +880,4 @@ async function ensureDaemon() {
879
880
 
880
881
  //#endregion
881
882
  export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
882
- //# sourceMappingURL=notifyDaemon-C_gTWqYZ.js.map
883
+ //# sourceMappingURL=notifyDaemon-C7GlfJ1E.js.map
@@ -1,4 +1,4 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import { a as getCursor, c as isTransientLockMkdirError, d as minConsumerCursor, f as readInbox, i as gcInboxes, l as listInboxParents, m as shouldStealLock, n as appendEvent, o as heartbeatWatcher, p as setCursor, r as clearWatcher, s as hostId, t as acquireLock, u as liveWatchers } from "./notifyStore-DI4iKFut.js";
2
+ import { a as getCursor, c as isTransientLockMkdirError, d as minConsumerCursor, f as readInbox, i as gcInboxes, l as listInboxParents, m as shouldStealLock, n as appendEvent, o as heartbeatWatcher, p as setCursor, r as clearWatcher, s as hostId, t as acquireLock, u as liveWatchers } from "./notifyStore-DIfkfKB2.js";
3
3
 
4
4
  export { liveWatchers };
@@ -556,4 +556,4 @@ async function liveWatchers(now = Date.now()) {
556
556
 
557
557
  //#endregion
558
558
  export { postmortemStartedAt as S, filterSinceSeq as _, getCursor as a, maxSeq as b, isTransientLockMkdirError as c, minConsumerCursor as d, readInbox as f, daemonLockOwnerPath as g, daemonLockDir as h, gcInboxes as i, listInboxParents as l, shouldStealLock as m, appendEvent as n, heartbeatWatcher as o, setCursor as p, clearWatcher as r, hostId as s, acquireLock as t, liveWatchers as u, filterSinceTs as v, notifyDir as x, filterUnread as y };
559
- //# sourceMappingURL=notifyStore-DI4iKFut.js.map
559
+ //# sourceMappingURL=notifyStore-DIfkfKB2.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-B6ZyKxfP.js.map
71
+ //# sourceMappingURL=openBrowser-1cIo4dJL.js.map
@@ -1,5 +1,5 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CRB5KtyL.js";
3
- import { n as spawnerFromRecords, t as resolveSpawner } from "./parentLink-CB8Nc-dr.js";
3
+ import { n as spawnerFromRecords, t as resolveSpawner } from "./parentLink-DoEWVGld.js";
4
4
 
5
5
  export { resolveSpawner };
@@ -50,4 +50,4 @@ function spawnerFromRecords(records, parentPid) {
50
50
 
51
51
  //#endregion
52
52
  export { spawnerFromRecords as n, resolveSpawner as t };
53
- //# sourceMappingURL=parentLink-CB8Nc-dr.js.map
53
+ //# sourceMappingURL=parentLink-DoEWVGld.js.map
@@ -1,8 +1,8 @@
1
1
  import { n as logger } from "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CRB5KtyL.js";
3
- import { t as classifyNeedsInput } from "./needsInput-D__56HYf.js";
4
- import { n as replyTargetOf, r as shortenHome } from "./initMsg-BGBIVi_Q.js";
5
- import { t as resolveSpawner } from "./parentLink-CB8Nc-dr.js";
3
+ import { t as classifyNeedsInput } from "./needsInput-hRiWFjGy.js";
4
+ import { n as replyTargetOf, r as shortenHome } from "./initMsg-CcTqFtsp.js";
5
+ import { t as resolveSpawner } from "./parentLink-DoEWVGld.js";
6
6
  import { spawn } from "node:child_process";
7
7
 
8
8
  //#region ts/parentPing.ts
@@ -332,13 +332,13 @@ function shouldDeliverReport(opts) {
332
332
  */
333
333
  async function isParentWatching(parentWrapperPid, parentAgentPid, selfAgentPid, now = Date.now()) {
334
334
  try {
335
- const { liveWatchers } = await import("./notifyStore-D9cNjXFG.js");
335
+ const { liveWatchers } = await import("./notifyStore-C4pH_-zJ.js");
336
336
  if ((await liveWatchers(now)).has(parentWrapperPid)) return true;
337
337
  } catch (error) {
338
338
  logger.debug("[parent-ping] watcher lookup failed:", error);
339
339
  }
340
340
  try {
341
- const { lastReadAt, READ_WINDOW_MS } = await import("./subcommands-C627cuOl.js");
341
+ const { lastReadAt, READ_WINDOW_MS } = await import("./subcommands-DmiswRy4.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-BhVR1EQm.js.map
469
+ //# sourceMappingURL=parentPingLoop-C73bbmCE.js.map
@@ -360,4 +360,4 @@ function humanBytes(bytes) {
360
360
 
361
361
  //#endregion
362
362
  export { systemStats as i, sampleTrees as n, snapshotProcs as r, humanBytes as t };
363
- //# sourceMappingURL=procStats-xvUthnOx.js.map
363
+ //# sourceMappingURL=procStats-BvmrBrOs.js.map
@@ -1,4 +1,4 @@
1
- import { a as parseWebrtcLink, i as isWebrtcSpec, o as toWebrtcUrl, r as hasJoinSecret } from "./webrtcLink-bWxiCBTV.js";
1
+ import { a as parseWebrtcLink, i as isWebrtcSpec, o as toWebrtcUrl, r as hasJoinSecret } from "./webrtcLink-va_gAR77.js";
2
2
  import { mkdir, readFile, writeFile } from "fs/promises";
3
3
  import { homedir } from "os";
4
4
  import path from "path";
@@ -136,13 +136,14 @@ async function resolveRemoteSpec(spec) {
136
136
  * The bridge lives for the rest of the process (torn down on `process.exit`).
137
137
  */
138
138
  async function resolveWebrtc(link, keyword, label) {
139
- const { startWebrtcBridge } = await import("./webrtcRemote-RmkbzY6Y.js");
139
+ const { startWebrtcBridge } = await import("./webrtcRemote-BlGyNZDC.js");
140
140
  const bridge = await startWebrtcBridge(link, { keyword });
141
141
  return {
142
142
  url: bridge.baseUrl,
143
143
  token: bridge.token,
144
144
  keyword: bridge.keyword,
145
- label
145
+ label,
146
+ room: parseWebrtcLink(link)?.room
146
147
  };
147
148
  }
148
149
  /** What a secret is replaced with in `ay remote ls` / `add` output. */
@@ -321,4 +322,4 @@ async function cmdConnect(rest) {
321
322
 
322
323
  //#endregion
323
324
  export { deleteRemoteAlias as a, parseShareUrl as c, writeRemoteAlias as d, defaultConnectAlias as i, readRemotes as l, cmdConnect as n, maskRemoteUrl as o, cmdRemote as r, parseDirectRemoteSpec as s, MASK as t, resolveRemoteSpec as u };
324
- //# sourceMappingURL=remotes-COBEhmlr.js.map
325
+ //# sourceMappingURL=remotes-DevcBeLl.js.map
@@ -1,5 +1,5 @@
1
1
  import "./e2e-BdLf8DvY.js";
2
- import "./webrtcLink-bWxiCBTV.js";
3
- import { a as deleteRemoteAlias, c as parseShareUrl, d as writeRemoteAlias, i as defaultConnectAlias, l as readRemotes, n as cmdConnect, o as maskRemoteUrl, r as cmdRemote, s as parseDirectRemoteSpec, t as MASK, u as resolveRemoteSpec } from "./remotes-COBEhmlr.js";
2
+ import "./webrtcLink-va_gAR77.js";
3
+ import { a as deleteRemoteAlias, c as parseShareUrl, d as writeRemoteAlias, i as defaultConnectAlias, l as readRemotes, n as cmdConnect, o as maskRemoteUrl, r as cmdRemote, s as parseDirectRemoteSpec, t as MASK, u as resolveRemoteSpec } from "./remotes-DevcBeLl.js";
4
4
 
5
5
  export { cmdConnect, cmdRemote };
@@ -0,0 +1,58 @@
1
+ import { t as agentYesHome } from "./agentYesHome-JmJC28YX.js";
2
+ import { a as parseWebrtcLink } from "./webrtcLink-va_gAR77.js";
3
+ import { l as readRemotes } from "./remotes-DevcBeLl.js";
4
+ import { readFile } from "fs/promises";
5
+ import { hostname } from "os";
6
+ import path from "path";
7
+
8
+ //#region ts/roomReplyAlias.ts
9
+ function roomAliasPlaceholder(room) {
10
+ return `<alias-for-room-${room}>`;
11
+ }
12
+ const PLACEHOLDER = /<alias-for-room-([A-Za-z0-9_-]{1,64})>/g;
13
+ /**
14
+ * `msg` with the room placeholders in its envelope header replaced by the
15
+ * receiver's alias for that room. Only the first line, and only when it is an
16
+ * <ay-msg …> header: the body is the sender's text and is never rewritten.
17
+ */
18
+ function fillRoomAlias(msg, aliasFor) {
19
+ if (!msg.startsWith("<ay-msg ")) return msg;
20
+ const nl = msg.indexOf("\n");
21
+ const head = nl < 0 ? msg : msg.slice(0, nl);
22
+ const filled = head.replace(PLACEHOLDER, (all, room) => aliasFor(room) ?? all);
23
+ return filled === head ? msg : filled + (nl < 0 ? "" : msg.slice(nl));
24
+ }
25
+ /** This machine's aliases for share rooms: room id → alias. */
26
+ async function roomAliases() {
27
+ const out = /* @__PURE__ */ new Map();
28
+ for (const [alias, cfg] of await readRemotes().catch(() => /* @__PURE__ */ new Map())) {
29
+ const room = parseWebrtcLink(String(cfg?.url ?? ""))?.room;
30
+ if (room && !out.has(room)) out.set(room, alias);
31
+ }
32
+ return out;
33
+ }
34
+ /**
35
+ * Sender side: `{id, member}` when this machine hosts in `room` right now (its
36
+ * ayrs holds `~/.agent-yes/.share-host-<room>.pid`, see rs/src/serve/share.rs),
37
+ * so a reply addressed `<room alias>:<member>:<agent>` reaches us. Undefined
38
+ * otherwise — a machine that only views the room cannot be replied to through it.
39
+ */
40
+ async function hostedRoomMember(room) {
41
+ if (!room) return void 0;
42
+ try {
43
+ const lock = path.join(agentYesHome(), `.share-host-${room}.pid`);
44
+ const pid = parseInt(await readFile(lock, "utf-8"), 10);
45
+ if (!(pid > 0)) return void 0;
46
+ process.kill(pid, 0);
47
+ } catch (e) {
48
+ if (e?.code !== "EPERM") return void 0;
49
+ }
50
+ return {
51
+ id: room,
52
+ member: process.env.AY_NAME?.trim() || hostname()
53
+ };
54
+ }
55
+
56
+ //#endregion
57
+ export { roomAliases as i, hostedRoomMember as n, roomAliasPlaceholder as r, fillRoomAlias as t };
58
+ //# sourceMappingURL=roomReplyAlias-DFqg_6IU.js.map
@@ -0,0 +1,6 @@
1
+ import "./e2e-BdLf8DvY.js";
2
+ import "./webrtcLink-va_gAR77.js";
3
+ import "./remotes-DevcBeLl.js";
4
+ import { i as roomAliases, n as hostedRoomMember, r as roomAliasPlaceholder, t as fillRoomAlias } from "./roomReplyAlias-DFqg_6IU.js";
5
+
6
+ export { fillRoomAlias, roomAliases };
@@ -1,4 +1,4 @@
1
- import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-CFyZKym2.js";
1
+ import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-Bc62HNf6.js";
2
2
  import { execFileSync } from "child_process";
3
3
  import { accessSync, chmodSync, constants, existsSync, mkdirSync, readdirSync, rmSync, statSync, unlinkSync } from "fs";
4
4
  import { chmod, copyFile } from "fs/promises";
@@ -331,6 +331,27 @@ function devBuildInfo(binaryPath) {
331
331
  };
332
332
  }
333
333
  /**
334
+ * findAyrsBinary, downloading this version's release bundle (which carries
335
+ * ayrs) when it is missing. The bundle used to arrive only with the first
336
+ * `ay <cli>` run, so on a fresh install `ay serve` either fell back to the
337
+ * TypeScript server without saying why it had no ayrs, or — for what only
338
+ * ayrs can do (`--join`, `join-secret`) — failed outright.
339
+ */
340
+ async function ensureAyrsBinary(verbose = false) {
341
+ const found = findAyrsBinary();
342
+ if (found) return found;
343
+ try {
344
+ process.stderr.write(`ay serve: fetching the Rust daemon (ayrs) for this version…\n`);
345
+ await getRustBinary({
346
+ verbose,
347
+ forceDownload: !!findRustBinary()
348
+ });
349
+ } catch (err) {
350
+ if (verbose) console.error(`[rust] ${err instanceof Error ? err.message : String(err)}`);
351
+ }
352
+ return findAyrsBinary();
353
+ }
354
+ /**
334
355
  * Check if a binary path is inside a git repo (dev build), and rebuild if outdated.
335
356
  * Returns the same path if up-to-date or rebuilt, undefined if rebuild failed.
336
357
  */
@@ -413,5 +434,5 @@ async function getRustBinary(options = {}) {
413
434
  }
414
435
 
415
436
  //#endregion
416
- export { findAyrsBinary as a, findTrayLauncher as c, getBinaryName as d, getDownloadUrl as f, ensureExecutable as i, gcOldBinaryDirs as l, hasValidMacSignature as m, devBuildInfo as n, findRustBinary as o, getRustBinary as p, downloadBinary as r, findSpawnHiddenLauncher as s, chmodExtractedBinaries as t, getBinDir as u };
417
- //# sourceMappingURL=rustBinary-eOcvZ5yS.js.map
437
+ export { ensureExecutable as a, findSpawnHiddenLauncher as c, getBinDir as d, getBinaryName as f, hasValidMacSignature as h, ensureAyrsBinary as i, findTrayLauncher as l, getRustBinary as m, devBuildInfo as n, findAyrsBinary as o, getDownloadUrl as p, downloadBinary as r, findRustBinary as s, chmodExtractedBinaries as t, gcOldBinaryDirs as u };
438
+ //# sourceMappingURL=rustBinary-7VK7oLlW.js.map
@@ -0,0 +1,4 @@
1
+ import "./versionChecker-Bc62HNf6.js";
2
+ import { a as ensureExecutable, c as findSpawnHiddenLauncher, d as getBinDir, f as getBinaryName, h as hasValidMacSignature, i as ensureAyrsBinary, l as findTrayLauncher, m as getRustBinary, n as devBuildInfo, o as findAyrsBinary, p as getDownloadUrl, r as downloadBinary, s as findRustBinary, t as chmodExtractedBinaries, u as gcOldBinaryDirs } from "./rustBinary-7VK7oLlW.js";
3
+
4
+ export { ensureAyrsBinary, findAyrsBinary, gcOldBinaryDirs };
@@ -1,15 +1,15 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-CFyZKym2.js";
3
- import "./ts-Bm6FhYS4.js";
2
+ import "./versionChecker-Bc62HNf6.js";
3
+ import "./ts-6LF7f4fx.js";
4
4
  import "./todoAutomation-TTp_Qz9G.js";
5
5
  import "./JsonlStore-BpYZZTap.js";
6
6
  import "./globalPidIndex-CRB5KtyL.js";
7
7
  import "./pidStore-433kvh9D.js";
8
8
  import "./messageLog-Dq_ka-Bt.js";
9
9
  import "./todoStore-C9RTz0Vs.js";
10
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CqmE-ESB.js";
11
- import { f as resolveSpawnCwd } from "./workspaceConfig-CWGh8o36.js";
12
- import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-oANVaOqi.js";
10
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Dq9Lq9WJ.js";
11
+ import { f as resolveSpawnCwd } from "./workspaceConfig-BLWB5Wu9.js";
12
+ import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-DGMQRTGT.js";
13
13
  import { createHash } from "node:crypto";
14
14
 
15
15
  //#region ts/oxmgrService.ts
@@ -154,4 +154,4 @@ async function cmdSchedule(rest) {
154
154
 
155
155
  //#endregion
156
156
  export { cmdSchedule };
157
- //# sourceMappingURL=schedule-E2QlsME5.js.map
157
+ //# sourceMappingURL=schedule-Dp0qkNO1.js.map