agent-yes 1.255.0 → 1.255.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-xNk6v7mb.js";
1
+ import { t as CLIS_CONFIG } from "./ts-C_4nEOJ9.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-BcY0IFUv.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-BwRdGQ4I.js.map
@@ -1,11 +1,11 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-CKhp4L8u.js";
3
- import "./ts-xNk6v7mb.js";
2
+ import "./versionChecker-DgDRyB3n.js";
3
+ import "./ts-C_4nEOJ9.js";
4
4
  import "./todoAutomation-BQRW614S.js";
5
5
  import "./JsonlStore-CPGIR0Wy.js";
6
6
  import "./globalPidIndex-D9DOSd-c.js";
7
7
  import "./pidStore-vnX0bgra.js";
8
8
  import "./messageLog-C-YIzhRj.js";
9
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BcY0IFUv.js";
9
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BwRdGQ4I.js";
10
10
 
11
11
  export { SUPPORTED_CLIS };
@@ -3,7 +3,7 @@ import "./globalPidIndex-D9DOSd-c.js";
3
3
  import "./messageLog-C-YIzhRj.js";
4
4
  import "./e2e-CEIdJGZ7.js";
5
5
  import "./configShared-IBbnn9b8.js";
6
- import { P as resolveOne } from "./subcommands-CHnQJIAF.js";
6
+ import { P as resolveOne } from "./subcommands-Cz7ZYodJ.js";
7
7
  import "./webrtcLink-BMYneHbu.js";
8
8
  import "./remotes-a0bGDae9.js";
9
9
  import { a as startShare } from "./share-BGl3wutJ.js";
@@ -229,4 +229,4 @@ function transformEvent(rawEvent, agentId, forwarded) {
229
229
 
230
230
  //#endregion
231
231
  export { createScopedShare, listShares, revokeAllShares, revokeShare };
232
- //# sourceMappingURL=agentShare-t1ZInzMI.js.map
232
+ //# sourceMappingURL=agentShare-BwDxVzaX.js.map
@@ -1,5 +1,5 @@
1
1
  import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
2
- import { P as resolveOne } from "./subcommands-CHnQJIAF.js";
2
+ import { P as resolveOne } from "./subcommands-Cz7ZYodJ.js";
3
3
  import { a as mintCapability, o as parseExpires } from "./callbackCore-Dd28_cBM.js";
4
4
  import { randomBytes } from "node:crypto";
5
5
  import { 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-Df4M7wW_.js");
75
+ const { resolveLocalServeUrl } = await import("./serve-DWtw6ok5.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-CdshQxV7.js.map
190
+ //# sourceMappingURL=callback-CLZb8HWd.js.map
@@ -3,10 +3,10 @@ import "./globalPidIndex-D9DOSd-c.js";
3
3
  import "./messageLog-C-YIzhRj.js";
4
4
  import "./e2e-CEIdJGZ7.js";
5
5
  import "./configShared-IBbnn9b8.js";
6
- import "./subcommands-CHnQJIAF.js";
6
+ import "./subcommands-Cz7ZYodJ.js";
7
7
  import "./webrtcLink-BMYneHbu.js";
8
8
  import "./remotes-a0bGDae9.js";
9
9
  import "./callbackCore-Dd28_cBM.js";
10
- import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-CdshQxV7.js";
10
+ import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-CLZb8HWd.js";
11
11
 
12
12
  export { cmdCallback };
package/dist/cli.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env bun
2
2
  import { t as invokedCliName } from "./invokedCli-uqM2YYA7.js";
3
3
  import { n as logger } from "./logger-CDIsZ-Pp.js";
4
- import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-CKhp4L8u.js";
5
- import { r as getRustBinary } from "./rustBinary-CvMtlJ1s.js";
4
+ import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-DgDRyB3n.js";
5
+ import { r as getRustBinary } from "./rustBinary-Cqb_HJrr.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-CH2j-t3B.js");
288
+ const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken } = await import("./subcommands-D9W74Jbd.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-BzTf3bQ0.js");
298
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-Cuzio132.js");
299
299
  if (isUnknownManagerToken(rawArg, managerCommands, SUPPORTED_CLIS)) {
300
300
  process.stderr.write(`ay: unknown subcommand or CLI '${rawArg}'.\n See 'ay help' for subcommands. To run an agent, name a CLI:\n 'ay <cli> …' (e.g. 'ay claude …') or 'ay --cli <cli> …'.\n`);
301
301
  process.exit(1);
@@ -346,7 +346,7 @@ if (config.useRust) {
346
346
  }
347
347
  }
348
348
  if (rustBinary) {
349
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BzTf3bQ0.js");
349
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-Cuzio132.js");
350
350
  const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
351
351
  if (config.verbose) {
352
352
  console.log(`[rust] Using binary: ${rustBinary}`);
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-CKhp4L8u.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-xNk6v7mb.js";
2
+ import "./versionChecker-DgDRyB3n.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-C_4nEOJ9.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
6
  import "./globalPidIndex-D9DOSd-c.js";
@@ -3,7 +3,7 @@ import "./globalPidIndex-D9DOSd-c.js";
3
3
  import "./messageLog-C-YIzhRj.js";
4
4
  import "./e2e-CEIdJGZ7.js";
5
5
  import "./configShared-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-CHnQJIAF.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-Cz7ZYodJ.js";
7
7
  import "./webrtcLink-BMYneHbu.js";
8
8
  import "./remotes-a0bGDae9.js";
9
9
  import { mkdir, readFile, rename, rm, stat, writeFile } from "fs/promises";
@@ -836,4 +836,4 @@ async function ensureDaemon() {
836
836
 
837
837
  //#endregion
838
838
  export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
839
- //# sourceMappingURL=notifyDaemon-C_OmCogQ.js.map
839
+ //# sourceMappingURL=notifyDaemon-Bebw4D7u.js.map
@@ -1,4 +1,4 @@
1
- import { r as getInstalledPackage } from "./versionChecker-CKhp4L8u.js";
1
+ import { r as getInstalledPackage } from "./versionChecker-DgDRyB3n.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-CvMtlJ1s.js.map
246
+ //# sourceMappingURL=rustBinary-Cqb_HJrr.js.map
@@ -1,12 +1,12 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-CKhp4L8u.js";
3
- import "./ts-xNk6v7mb.js";
2
+ import "./versionChecker-DgDRyB3n.js";
3
+ import "./ts-C_4nEOJ9.js";
4
4
  import "./todoAutomation-BQRW614S.js";
5
5
  import "./JsonlStore-CPGIR0Wy.js";
6
6
  import "./globalPidIndex-D9DOSd-c.js";
7
7
  import "./pidStore-vnX0bgra.js";
8
8
  import "./messageLog-C-YIzhRj.js";
9
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BcY0IFUv.js";
9
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BwRdGQ4I.js";
10
10
  import { f as resolveSpawnCwd } from "./workspaceConfig-CpilQzMY.js";
11
11
  import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-BtL6Oo1o.js";
12
12
  import { createHash } from "node:crypto";
@@ -153,4 +153,4 @@ async function cmdSchedule(rest) {
153
153
 
154
154
  //#endregion
155
155
  export { cmdSchedule };
156
- //# sourceMappingURL=schedule-Bs_afpJx.js.map
156
+ //# sourceMappingURL=schedule-DZrXiDPD.js.map
@@ -1,7 +1,7 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import { r as getInstalledPackage } from "./versionChecker-CKhp4L8u.js";
3
- import { t as findSpawnHiddenLauncher } from "./rustBinary-CvMtlJ1s.js";
4
- import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-xNk6v7mb.js";
2
+ import { r as getInstalledPackage } from "./versionChecker-DgDRyB3n.js";
3
+ import { t as findSpawnHiddenLauncher } from "./rustBinary-Cqb_HJrr.js";
4
+ import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-C_4nEOJ9.js";
5
5
  import { t as agentYesHome$1 } from "./agentYesHome-CtmsY6I-.js";
6
6
  import { x as removeControlCharacters } from "./todoAutomation-BQRW614S.js";
7
7
  import "./JsonlStore-CPGIR0Wy.js";
@@ -11,16 +11,16 @@ import { r as recordInbox } from "./messageLog-C-YIzhRj.js";
11
11
  import { t as pgidForWrapper } from "./reaper-DP49VCKx.js";
12
12
  import "./e2e-CEIdJGZ7.js";
13
13
  import "./configShared-IBbnn9b8.js";
14
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BcY0IFUv.js";
15
- import { A as recentReadEdges, C as listRecords, D as readNotes, G as writeToIpc, M as renderRawLog, N as renderRawLogLines, O as readPtysize, P as resolveOne, Y as isTransientLockMkdirError, f as extractNeedsInput, j as renderLogTailLines, k as recentMessageEdges, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, rt as TYPING_BADGE, u as extractBadges, x as isUserTyping, z as snapshotStatus } from "./subcommands-CHnQJIAF.js";
14
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BwRdGQ4I.js";
15
+ import { A as recentReadEdges, C as listRecords, D as readNotes, G as writeToIpc, M as renderRawLog, N as renderRawLogLines, O as readPtysize, P as resolveOne, Y as isTransientLockMkdirError, f as extractNeedsInput, j as renderLogTailLines, k as recentMessageEdges, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, rt as TYPING_BADGE, u as extractBadges, x as isUserTyping, z as snapshotStatus } from "./subcommands-Cz7ZYodJ.js";
16
16
  import "./webrtcLink-BMYneHbu.js";
17
17
  import "./remotes-a0bGDae9.js";
18
18
  import { i as frameVisitorMessage, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-Dd28_cBM.js";
19
- import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-CdshQxV7.js";
19
+ import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-CLZb8HWd.js";
20
20
  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-CpilQzMY.js";
21
21
  import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-BtL6Oo1o.js";
22
22
  import { r as spawnRejectionReason } from "./spawnGate-BFJPdHCQ.js";
23
- import { i as launchTray } from "./trayApp-tw_Xs_pV.js";
23
+ import { i as launchTray } from "./trayApp-i93_GeIf.js";
24
24
  import yargs from "yargs";
25
25
  import { appendFile, mkdir, open, readFile, readdir, rename, rm, stat, unlink, writeFile } from "fs/promises";
26
26
  import { arch, cpus, freemem, homedir, hostname, loadavg, platform, totalmem, uptime, userInfo } from "os";
@@ -2367,7 +2367,7 @@ Options:
2367
2367
  }
2368
2368
  });
2369
2369
  if (req.method === "GET" && p === "/api/ws") {
2370
- const ws = await import("./ws-DDwHaLJu.js");
2370
+ const ws = await import("./ws-BdEmGmYi.js");
2371
2371
  try {
2372
2372
  await ws.loadProvision();
2373
2373
  } catch (e) {
@@ -2387,7 +2387,7 @@ Options:
2387
2387
  if (req.method === "GET" && p === "/api/ws/status") {
2388
2388
  const dirRaw = url.searchParams.get("path");
2389
2389
  if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
2390
- const ws = await import("./ws-DDwHaLJu.js");
2390
+ const ws = await import("./ws-BdEmGmYi.js");
2391
2391
  let prov;
2392
2392
  try {
2393
2393
  prov = await ws.loadProvision();
@@ -3144,7 +3144,7 @@ Options:
3144
3144
  const perm = body.perm ?? "r";
3145
3145
  if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
3146
3146
  try {
3147
- const { createScopedShare } = await import("./agentShare-t1ZInzMI.js");
3147
+ const { createScopedShare } = await import("./agentShare-BwDxVzaX.js");
3148
3148
  const share = await createScopedShare({
3149
3149
  agent: body.agent,
3150
3150
  perm,
@@ -3159,12 +3159,12 @@ Options:
3159
3159
  }
3160
3160
  }
3161
3161
  if (req.method === "GET" && p === "/api/shares") {
3162
- const { listShares } = await import("./agentShare-t1ZInzMI.js");
3162
+ const { listShares } = await import("./agentShare-BwDxVzaX.js");
3163
3163
  return Response.json(listShares());
3164
3164
  }
3165
3165
  const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
3166
3166
  if (req.method === "DELETE" && revokeM) {
3167
- const { revokeShare } = await import("./agentShare-t1ZInzMI.js");
3167
+ const { revokeShare } = await import("./agentShare-BwDxVzaX.js");
3168
3168
  const ok = revokeShare(decodeURIComponent(revokeM[1]));
3169
3169
  return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
3170
3170
  }
@@ -3466,7 +3466,7 @@ Options:
3466
3466
  const shutdown = (resolve) => {
3467
3467
  if (heartbeat) clearInterval(heartbeat);
3468
3468
  closeShare?.();
3469
- import("./agentShare-t1ZInzMI.js").then((m) => m.revokeAllShares()).catch(() => {});
3469
+ import("./agentShare-BwDxVzaX.js").then((m) => m.revokeAllShares()).catch(() => {});
3470
3470
  server?.stop();
3471
3471
  Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
3472
3472
  };
@@ -3479,4 +3479,4 @@ Options:
3479
3479
 
3480
3480
  //#endregion
3481
3481
  export { cmdServe, loadTokenReadOnly, mintScopedTermToken, resolveDaemonHttpBase, resolveLocalServeUrl };
3482
- //# sourceMappingURL=serve-Df4M7wW_.js.map
3482
+ //# sourceMappingURL=serve-DWtw6ok5.js.map
@@ -32,7 +32,7 @@ async function cmdSetup(rest) {
32
32
  if (!existsSync(abs)) process.stderr.write(` note: that directory doesn't exist yet — create it, or agents spawned there will fail\n`);
33
33
  if (noShare) return 0;
34
34
  process.stdout.write(`\nsharing this machine to agent-yes.com…\n`);
35
- const { cmdServe } = await import("./serve-Df4M7wW_.js");
35
+ const { cmdServe } = await import("./serve-DWtw6ok5.js");
36
36
  return cmdServe([
37
37
  "install",
38
38
  "--share",
@@ -42,4 +42,4 @@ async function cmdSetup(rest) {
42
42
 
43
43
  //#endregion
44
44
  export { cmdSetup };
45
- //# sourceMappingURL=setup-Bw9l8rmh.js.map
45
+ //# sourceMappingURL=setup-CXr_Y5vj.js.map
@@ -1394,35 +1394,35 @@ async function runSubcommand(argv) {
1394
1394
  return cmdCh(rest);
1395
1395
  }
1396
1396
  case "term": {
1397
- const { cmdTerm } = await import("./terminal-DzezN9Jw.js");
1397
+ const { cmdTerm } = await import("./terminal-B8X6SZ4k.js");
1398
1398
  return cmdTerm(rest);
1399
1399
  }
1400
1400
  case "widget": {
1401
- const { cmdWidget } = await import("./widget-BBbqoR84.js");
1401
+ const { cmdWidget } = await import("./widget-pcjAYbkh.js");
1402
1402
  return cmdWidget(rest);
1403
1403
  }
1404
1404
  case "mint": {
1405
- const { cmdMint } = await import("./widget-BBbqoR84.js");
1405
+ const { cmdMint } = await import("./widget-pcjAYbkh.js");
1406
1406
  return cmdMint(rest);
1407
1407
  }
1408
1408
  case "serve": {
1409
- const { cmdServe } = await import("./serve-Df4M7wW_.js");
1409
+ const { cmdServe } = await import("./serve-DWtw6ok5.js");
1410
1410
  return cmdServe(rest);
1411
1411
  }
1412
1412
  case "tray": {
1413
- const { cmdTray } = await import("./trayApp-Dvs-PaNc.js");
1413
+ const { cmdTray } = await import("./trayApp-Zta691q9.js");
1414
1414
  return cmdTray(rest);
1415
1415
  }
1416
1416
  case "setup": {
1417
- const { cmdSetup } = await import("./setup-Bw9l8rmh.js");
1417
+ const { cmdSetup } = await import("./setup-CXr_Y5vj.js");
1418
1418
  return cmdSetup(rest);
1419
1419
  }
1420
1420
  case "ws": {
1421
- const { cmdWs } = await import("./ws-DDwHaLJu.js");
1421
+ const { cmdWs } = await import("./ws-BdEmGmYi.js");
1422
1422
  return cmdWs(rest);
1423
1423
  }
1424
1424
  case "schedule": {
1425
- const { cmdSchedule } = await import("./schedule-Bs_afpJx.js");
1425
+ const { cmdSchedule } = await import("./schedule-DZrXiDPD.js");
1426
1426
  return cmdSchedule(rest);
1427
1427
  }
1428
1428
  case "remote": {
@@ -1434,7 +1434,7 @@ async function runSubcommand(argv) {
1434
1434
  return cmdExpose(rest);
1435
1435
  }
1436
1436
  case "callback": {
1437
- const { cmdCallback } = await import("./callback-CGW3ODrJ.js");
1437
+ const { cmdCallback } = await import("./callback-DiQBhFZn.js");
1438
1438
  return cmdCallback(rest);
1439
1439
  }
1440
1440
  case "reap":
@@ -3253,6 +3253,7 @@ async function cmdSend(rest) {
3253
3253
  nonce = randomBytes$1(4).toString("hex");
3254
3254
  prefix = `<ay-msg ${nonce} from ${sender.agent.cli} #${sender.agent.pid} @ ${shortenPath(sender.agent.cwd)} — reply: ay send ${replyTarget} "...">\n`;
3255
3255
  suffix = `\n</ay-msg ${nonce}>`;
3256
+ if (/^\s*<ay-msg\s/.test(body)) process.stderr.write("warning: body already starts with an <ay-msg …> header — ay send adds the envelope automatically, so the recipient will see a DOUBLE wrapper. Send the bare body instead (or pass --raw if you really mean to deliver a pre-built envelope verbatim; forwarding a quoted message inside a plain body is fine).\n");
3256
3257
  }
3257
3258
  const fullBody = prefix + body + suffix;
3258
3259
  const noWait = Boolean(argv.noWait) || process.env.AGENT_YES_SEND_NO_WAIT === "1";
@@ -3843,7 +3844,7 @@ async function cmdAttach(rest) {
3843
3844
  const winsizeDir = path.join(ayHome, "winsize");
3844
3845
  await mkdir(winsizeDir, { recursive: true });
3845
3846
  const winsizePath = path.join(winsizeDir, String(record.pid));
3846
- const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-Df4M7wW_.js");
3847
+ const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-DWtw6ok5.js");
3847
3848
  const daemonBase = await resolveDaemonHttpBase().catch(() => null);
3848
3849
  const daemonToken = daemonBase ? await loadTokenReadOnly().catch(() => null) ?? "" : "";
3849
3850
  const capViewer = `attach:${process.pid}`;
@@ -4553,7 +4554,7 @@ async function cmdNotify(rest) {
4553
4554
  }
4554
4555
  const ensure = async () => {
4555
4556
  if (!argv["ensure-daemon"]) return;
4556
- const { ensureDaemon } = await import("./notifyDaemon-C_OmCogQ.js");
4557
+ const { ensureDaemon } = await import("./notifyDaemon-Bebw4D7u.js");
4557
4558
  await ensureDaemon().catch(() => null);
4558
4559
  };
4559
4560
  await heartbeatWatcher(parent, selfStartedAt);
@@ -4627,7 +4628,7 @@ async function cmdNotifyCursor(args) {
4627
4628
  }
4628
4629
  async function cmdNotifyd(rest) {
4629
4630
  const sub = rest[0] ?? "status";
4630
- const daemon = await import("./notifyDaemon-C_OmCogQ.js");
4631
+ const daemon = await import("./notifyDaemon-Bebw4D7u.js");
4631
4632
  switch (sub) {
4632
4633
  case "run": return daemon.runDaemon();
4633
4634
  case "once": return daemon.runDaemon({ once: true });
@@ -4654,4 +4655,4 @@ async function cmdNotifyd(rest) {
4654
4655
 
4655
4656
  //#endregion
4656
4657
  export { shouldStealLock as $, recentReadEdges as A, stdinActivityPath as B, listRecords as C, readNotes as D, readAgentPtysize as E, resolveReadWindow as F, writeToIpc as G, submitAndConfirm as H, resolveResumeArgs as I, hostId as J, appendEvent as K, restartHintLines as L, renderRawLog as M, renderRawLogLines as N, readPtysize as O, resolveOne as P, readInbox as Q, runSubcommand as R, lastStdinAt as S, menuSelectKeys as T, waitForLogQuiet as U, stopTipForCli as V, writeKeysPaced as W, listInboxParents as X, isTransientLockMkdirError as Y, liveWatchers as Z, isPidAlive as _, cmdHelp as a, isUnknownManagerToken as b, deriveLiveState as c, extractMenu as d, daemonLockDir as et, extractNeedsInput as f, isExitRequest as g, isAgentStuck as h, backoffWhileTyping as i, renderLogTailLines as j, recentMessageEdges as k, deriveLiveStatus as l, finalizedLines as m, READ_PAGE_DEFAULT as n, notifyDir as nt, controlCodeFromName as o, extractTaskCounts as p, gcInboxes as q, TYPING_WINDOW_MS as r, TYPING_BADGE as rt, cursorAbs as s, GRACEFUL_EXIT_COMMANDS as t, daemonLockOwnerPath as tt, extractBadges as u, isSlashCommand as v, matchKeyword as w, isUserTyping as x, isSubcommand as y, snapshotStatus as z };
4657
- //# sourceMappingURL=subcommands-CHnQJIAF.js.map
4658
+ //# sourceMappingURL=subcommands-Cz7ZYodJ.js.map
@@ -3,7 +3,7 @@ import "./globalPidIndex-D9DOSd-c.js";
3
3
  import "./messageLog-C-YIzhRj.js";
4
4
  import "./e2e-CEIdJGZ7.js";
5
5
  import "./configShared-IBbnn9b8.js";
6
- import { A as recentReadEdges, B as stdinActivityPath, C as listRecords, D as readNotes, E as readAgentPtysize, F as resolveReadWindow, G as writeToIpc, H as submitAndConfirm, I as resolveResumeArgs, L as restartHintLines, M as renderRawLog, N as renderRawLogLines, O as readPtysize, P as resolveOne, R as runSubcommand, S as lastStdinAt, T as menuSelectKeys, U as waitForLogQuiet, V as stopTipForCli, W as writeKeysPaced, _ as isPidAlive, a as cmdHelp, b as isUnknownManagerToken, c as deriveLiveState, d as extractMenu, f as extractNeedsInput, g as isExitRequest, h as isAgentStuck, i as backoffWhileTyping, j as renderLogTailLines, k as recentMessageEdges, l as deriveLiveStatus, m as finalizedLines, n as READ_PAGE_DEFAULT, o as controlCodeFromName, p as extractTaskCounts, r as TYPING_WINDOW_MS, s as cursorAbs, t as GRACEFUL_EXIT_COMMANDS, u as extractBadges, v as isSlashCommand, w as matchKeyword, x as isUserTyping, y as isSubcommand, z as snapshotStatus } from "./subcommands-CHnQJIAF.js";
6
+ import { A as recentReadEdges, B as stdinActivityPath, C as listRecords, D as readNotes, E as readAgentPtysize, F as resolveReadWindow, G as writeToIpc, H as submitAndConfirm, I as resolveResumeArgs, L as restartHintLines, M as renderRawLog, N as renderRawLogLines, O as readPtysize, P as resolveOne, R as runSubcommand, S as lastStdinAt, T as menuSelectKeys, U as waitForLogQuiet, V as stopTipForCli, W as writeKeysPaced, _ as isPidAlive, a as cmdHelp, b as isUnknownManagerToken, c as deriveLiveState, d as extractMenu, f as extractNeedsInput, g as isExitRequest, h as isAgentStuck, i as backoffWhileTyping, j as renderLogTailLines, k as recentMessageEdges, l as deriveLiveStatus, m as finalizedLines, n as READ_PAGE_DEFAULT, o as controlCodeFromName, p as extractTaskCounts, r as TYPING_WINDOW_MS, s as cursorAbs, t as GRACEFUL_EXIT_COMMANDS, u as extractBadges, v as isSlashCommand, w as matchKeyword, x as isUserTyping, y as isSubcommand, z as snapshotStatus } from "./subcommands-Cz7ZYodJ.js";
7
7
  import "./webrtcLink-BMYneHbu.js";
8
8
  import "./remotes-a0bGDae9.js";
9
9
 
@@ -98,7 +98,7 @@ async function cmdTermMint(args) {
98
98
  if (flags.ro && flags.interactive) throw new Error("--ro and --interactive are mutually exclusive");
99
99
  const ttlSec = parseTtlSec(typeof flags.ttl === "string" ? flags.ttl : "15m");
100
100
  const canSend = flags.interactive === true;
101
- const { mintScopedTermToken } = await import("./serve-Df4M7wW_.js");
101
+ const { mintScopedTermToken } = await import("./serve-DWtw6ok5.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-DzezN9Jw.js.map
138
+ //# sourceMappingURL=terminal-B8X6SZ4k.js.map
@@ -0,0 +1,5 @@
1
+ import "./versionChecker-DgDRyB3n.js";
2
+ import "./rustBinary-Cqb_HJrr.js";
3
+ import { a as trayHiddenMarker, i as launchTray, n as hasDesktop, r as isTrayHidden, t as cmdTray } from "./trayApp-i93_GeIf.js";
4
+
5
+ export { cmdTray };
@@ -1,4 +1,4 @@
1
- import { n as findTrayLauncher } from "./rustBinary-CvMtlJ1s.js";
1
+ import { n as findTrayLauncher } from "./rustBinary-Cqb_HJrr.js";
2
2
  import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.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-tw_Xs_pV.js.map
100
+ //# sourceMappingURL=trayApp-i93_GeIf.js.map
@@ -1,6 +1,6 @@
1
1
  import { n as __esmMin, r as __exportAll } from "./chunk-cZBX9HZv.js";
2
2
  import { n as logger, t as addTransport } from "./logger-CDIsZ-Pp.js";
3
- import { r as getInstalledPackage } from "./versionChecker-CKhp4L8u.js";
3
+ import { r as getInstalledPackage } from "./versionChecker-DgDRyB3n.js";
4
4
  import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
5
5
  import { d as openStore, p as LIFECYCLES, x as removeControlCharacters } from "./todoAutomation-BQRW614S.js";
6
6
  import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-DBoONoM-.js";
@@ -2155,4 +2155,4 @@ function sleep(ms) {
2155
2155
 
2156
2156
  //#endregion
2157
2157
  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 };
2158
- //# sourceMappingURL=ts-xNk6v7mb.js.map
2158
+ //# sourceMappingURL=ts-C_4nEOJ9.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.255.0";
10
+ var version = "1.255.1";
11
11
 
12
12
  //#endregion
13
13
  //#region ts/versionChecker.ts
@@ -215,4 +215,4 @@ async function displayVersion() {
215
215
 
216
216
  //#endregion
217
217
  export { versionString as i, displayVersion as n, getInstalledPackage as r, checkAndAutoUpdate as t };
218
- //# sourceMappingURL=versionChecker-CKhp4L8u.js.map
218
+ //# sourceMappingURL=versionChecker-DgDRyB3n.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-Df4M7wW_.js");
31
+ const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-DWtw6ok5.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-Df4M7wW_.js");
189
+ const { mintScopedTermToken } = await import("./serve-DWtw6ok5.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-BBbqoR84.js.map
205
+ //# sourceMappingURL=widget-pcjAYbkh.js.map
@@ -3,7 +3,7 @@ import "./globalPidIndex-D9DOSd-c.js";
3
3
  import "./messageLog-C-YIzhRj.js";
4
4
  import "./e2e-CEIdJGZ7.js";
5
5
  import "./configShared-IBbnn9b8.js";
6
- import { C as listRecords } from "./subcommands-CHnQJIAF.js";
6
+ import { C as listRecords } from "./subcommands-Cz7ZYodJ.js";
7
7
  import "./webrtcLink-BMYneHbu.js";
8
8
  import "./remotes-a0bGDae9.js";
9
9
  import { a as getProvisionRoot } from "./workspaceConfig-CpilQzMY.js";
@@ -419,4 +419,4 @@ async function cmdWs(args) {
419
419
 
420
420
  //#endregion
421
421
  export { WS_JSON_SCHEMA, cmdWs, collectWorkspaces, isPathInside, loadProvision, workspaceStatus };
422
- //# sourceMappingURL=ws-DDwHaLJu.js.map
422
+ //# sourceMappingURL=ws-BdEmGmYi.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-yes",
3
- "version": "1.255.0",
3
+ "version": "1.255.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",
@@ -2646,3 +2646,149 @@ describe("subcommands.cmdWhoami", () => {
2646
2646
  expect(text).toMatch(/<ay-msg from claude #\d+ @ \/repo\/alpha — reply: ay send aaaa0000bbbb "\.\.\.">/);
2647
2647
  });
2648
2648
  });
2649
+
2650
+ describe("subcommands.cmdSend double-envelope warning", () => {
2651
+ const itUnix = process.platform === "linux" || process.platform === "darwin";
2652
+
2653
+ it.skipIf(!itUnix)(
2654
+ "warns when an agent sender's body is already <ay-msg …>-wrapped (still delivers, still wraps)",
2655
+ async () => {
2656
+ const { runSubcommand } = await loadModule();
2657
+ const { appendGlobalPid } = await import("./globalPidIndex.ts");
2658
+ const { spawnSync } = await import("child_process");
2659
+ const tmp = await mkdtemp(path.join(tmpdir(), "ay-fifo-"));
2660
+ try {
2661
+ const fifo = path.join(tmp, "warn.fifo");
2662
+ if (spawnSync("mkfifo", [fifo]).status !== 0) return;
2663
+ const fs = await import("fs");
2664
+ const rdwrFd = fs.openSync(fifo, fs.constants.O_RDWR);
2665
+ // Target agent (owns the fifo) …
2666
+ await appendGlobalPid({
2667
+ pid: process.pid,
2668
+ cli: "claude",
2669
+ prompt: null,
2670
+ cwd: "/repo/alpha",
2671
+ log_file: null,
2672
+ fifo_file: fifo,
2673
+ status: "active",
2674
+ exit_code: null,
2675
+ exit_reason: null,
2676
+ started_at: Date.now(),
2677
+ });
2678
+ // … and a registered SENDER so cmdSend resolves an agent context and
2679
+ // engages the auto-envelope path the warning guards.
2680
+ await appendGlobalPid({
2681
+ pid: 900001,
2682
+ cli: "claude",
2683
+ prompt: null,
2684
+ cwd: "/repo/beta",
2685
+ log_file: null,
2686
+ status: "active",
2687
+ exit_code: null,
2688
+ exit_reason: null,
2689
+ started_at: Date.now(),
2690
+ wrapper_pid: 424242,
2691
+ agent_id: "cccc0000dddd",
2692
+ });
2693
+ const savedAyPid = process.env.AGENT_YES_PID;
2694
+ process.env.AGENT_YES_PID = "424242";
2695
+ const stderr: string[] = [];
2696
+ const origErr = process.stderr.write.bind(process.stderr);
2697
+ (process.stderr as any).write = (s: any) => (stderr.push(String(s)), true);
2698
+ const origOut = process.stdout.write.bind(process.stdout);
2699
+ (process.stdout as any).write = () => true;
2700
+ try {
2701
+ const code = await runSubcommand([
2702
+ "bun",
2703
+ "cli.js",
2704
+ "send",
2705
+ String(process.pid),
2706
+ '<ay-msg deadbeef from claude #900001 @ /repo/beta — reply: ay send 900001 "...">hi</ay-msg deadbeef>',
2707
+ "--force",
2708
+ ]);
2709
+ expect(code).toBe(0);
2710
+ expect(stderr.join("")).toMatch(/DOUBLE wrapper/);
2711
+ } finally {
2712
+ process.stderr.write = origErr;
2713
+ process.stdout.write = origOut;
2714
+ if (savedAyPid === undefined) delete process.env.AGENT_YES_PID;
2715
+ else process.env.AGENT_YES_PID = savedAyPid;
2716
+ }
2717
+ // Delivered bytes carry BOTH envelopes — transport stamp outermost.
2718
+ const buf = Buffer.alloc(8192);
2719
+ const n = fs.readSync(rdwrFd, buf, 0, buf.length, null);
2720
+ const received = buf.subarray(0, n).toString();
2721
+ expect(received).toMatch(/^<ay-msg [0-9a-f]{8} from claude #900001 @ /);
2722
+ expect(received).toContain("<ay-msg deadbeef");
2723
+ fs.closeSync(rdwrFd);
2724
+ } finally {
2725
+ await rm(tmp, { recursive: true, force: true }).catch(() => null);
2726
+ }
2727
+ },
2728
+ );
2729
+
2730
+ it.skipIf(!itUnix)("plain agent-sender bodies do not trigger the warning", async () => {
2731
+ const { runSubcommand } = await loadModule();
2732
+ const { appendGlobalPid } = await import("./globalPidIndex.ts");
2733
+ const { spawnSync } = await import("child_process");
2734
+ const tmp = await mkdtemp(path.join(tmpdir(), "ay-fifo-"));
2735
+ try {
2736
+ const fifo = path.join(tmp, "plain.fifo");
2737
+ if (spawnSync("mkfifo", [fifo]).status !== 0) return;
2738
+ const fs = await import("fs");
2739
+ const rdwrFd = fs.openSync(fifo, fs.constants.O_RDWR);
2740
+ await appendGlobalPid({
2741
+ pid: process.pid,
2742
+ cli: "claude",
2743
+ prompt: null,
2744
+ cwd: "/repo/alpha",
2745
+ log_file: null,
2746
+ fifo_file: fifo,
2747
+ status: "active",
2748
+ exit_code: null,
2749
+ exit_reason: null,
2750
+ started_at: Date.now(),
2751
+ });
2752
+ await appendGlobalPid({
2753
+ pid: 900001,
2754
+ cli: "claude",
2755
+ prompt: null,
2756
+ cwd: "/repo/beta",
2757
+ log_file: null,
2758
+ status: "active",
2759
+ exit_code: null,
2760
+ exit_reason: null,
2761
+ started_at: Date.now(),
2762
+ wrapper_pid: 424242,
2763
+ agent_id: "cccc0000dddd",
2764
+ });
2765
+ const savedAyPid = process.env.AGENT_YES_PID;
2766
+ process.env.AGENT_YES_PID = "424242";
2767
+ const stderr: string[] = [];
2768
+ const origErr = process.stderr.write.bind(process.stderr);
2769
+ (process.stderr as any).write = (s: any) => (stderr.push(String(s)), true);
2770
+ const origOut = process.stdout.write.bind(process.stdout);
2771
+ (process.stdout as any).write = () => true;
2772
+ try {
2773
+ const code = await runSubcommand([
2774
+ "bun",
2775
+ "cli.js",
2776
+ "send",
2777
+ String(process.pid),
2778
+ "plain body, quoting <ay-msg deadbeef …> mid-text is fine",
2779
+ "--force",
2780
+ ]);
2781
+ expect(code).toBe(0);
2782
+ expect(stderr.join("")).not.toMatch(/DOUBLE wrapper/);
2783
+ } finally {
2784
+ process.stderr.write = origErr;
2785
+ process.stdout.write = origOut;
2786
+ if (savedAyPid === undefined) delete process.env.AGENT_YES_PID;
2787
+ else process.env.AGENT_YES_PID = savedAyPid;
2788
+ }
2789
+ fs.closeSync(rdwrFd);
2790
+ } finally {
2791
+ await rm(tmp, { recursive: true, force: true }).catch(() => null);
2792
+ }
2793
+ });
2794
+ });
package/ts/subcommands.ts CHANGED
@@ -3255,6 +3255,18 @@ async function cmdSend(rest: string[]): Promise<number> {
3255
3255
  nonce = randomBytes(4).toString("hex");
3256
3256
  prefix = `<ay-msg ${nonce} from ${sender.agent.cli} #${sender.agent.pid} @ ${shortenPath(sender.agent.cwd)} — reply: ay send ${replyTarget} "...">\n`;
3257
3257
  suffix = `\n</ay-msg ${nonce}>`;
3258
+ // A body that itself starts with an <ay-msg …> header is usually an agent
3259
+ // hand-wrapping what this send is about to wrap again — the recipient then
3260
+ // sees a double envelope with two (possibly conflicting) reply targets.
3261
+ // Warn but still wrap: the transport stamp is the authoritative identity
3262
+ // (skipping it on a pre-wrapped body would let a sender forge attribution),
3263
+ // and a quoted envelope is legitimate when deliberately forwarding.
3264
+ if (/^\s*<ay-msg\s/.test(body)) {
3265
+ process.stderr.write(
3266
+ `warning: body already starts with an <ay-msg …> header — ay send adds the envelope automatically, so the recipient will see a DOUBLE wrapper. ` +
3267
+ `Send the bare body instead (or pass --raw if you really mean to deliver a pre-built envelope verbatim; forwarding a quoted message inside a plain body is fine).\n`,
3268
+ );
3269
+ }
3258
3270
  }
3259
3271
 
3260
3272
  const fullBody = prefix + body + suffix;
@@ -1,5 +0,0 @@
1
- import "./versionChecker-CKhp4L8u.js";
2
- import "./rustBinary-CvMtlJ1s.js";
3
- import { a as trayHiddenMarker, i as launchTray, n as hasDesktop, r as isTrayHidden, t as cmdTray } from "./trayApp-tw_Xs_pV.js";
4
-
5
- export { cmdTray };