claude-yes 1.300.1 → 1.300.2

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 (31) hide show
  1. package/dist/{SUPPORTED_CLIS-NZHT0QJq.js → SUPPORTED_CLIS-BX5_erb1.js} +3 -3
  2. package/dist/{SUPPORTED_CLIS-C-5idp3R.js → SUPPORTED_CLIS-Dxw9H99T.js} +2 -2
  3. package/dist/{agentShare-Bt_vRAdp.js → agentShare-C178Fz-8.js} +2 -2
  4. package/dist/{callback-DniBBM0f.js → callback-DDFaB2fy.js} +2 -2
  5. package/dist/{callback-BoCEpJ3Z.js → callback-DEhpIaK7.js} +3 -3
  6. package/dist/cli.js +5 -5
  7. package/dist/{cmdPs-DU-4ULBF.js → cmdPs-C87Caduf.js} +2 -2
  8. package/dist/index.js +2 -2
  9. package/dist/{notifyDaemon-wT-mtu1E.js → notifyDaemon-NxyVEhVq.js} +2 -2
  10. package/dist/{parentPingLoop-DYL_oSrV.js → parentPingLoop-zAmYgESx.js} +2 -2
  11. package/dist/{rustBinary-BYXCnEzJ.js → rustBinary-CicmJTei.js} +2 -2
  12. package/dist/{rustBinary-DGb3sdEw.js → rustBinary-FjEdM28b.js} +2 -2
  13. package/dist/{schedule-BQEUD3h2.js → schedule-DPiovnJr.js} +4 -4
  14. package/dist/{serve-DknfTqkm.js → serve-C_9bMH27.js} +18 -18
  15. package/dist/{setup-B13FgF2W.js → setup-DVMeGj5u.js} +2 -2
  16. package/dist/{shareCmd-CKsoN9x4.js → shareCmd-cNNr7i3a.js} +3 -3
  17. package/dist/subcommands-2tF2Psrc.js +13 -0
  18. package/dist/{subcommands-CFVFLCuJ.js → subcommands-CzSrhEYG.js} +32 -18
  19. package/dist/{terminal-CODg7fHK.js → terminal-MTNQuGD5.js} +2 -2
  20. package/dist/trayApp-Cx9ktCQ-.js +5 -0
  21. package/dist/{trayApp-wUiHykPM.js → trayApp-DO3YALy1.js} +2 -2
  22. package/dist/{ts-CPR985mz.js → ts-C8dvu_cD.js} +3 -3
  23. package/dist/{versionChecker-pTpboio4.js → versionChecker-Bmtx6fPv.js} +2 -2
  24. package/dist/{widget-C8srSfBL.js → widget-BCrKF9Vw.js} +3 -3
  25. package/dist/{ws-B3n0JCmy.js → ws-BTXQauqi.js} +2 -2
  26. package/dist/{ws-BhV8FLVX.js → ws-D1ggWZ_I.js} +2 -2
  27. package/package.json +1 -1
  28. package/ts/subcommands.spec.ts +52 -0
  29. package/ts/subcommands.ts +21 -0
  30. package/dist/subcommands-BNVgv7bt.js +0 -13
  31. package/dist/trayApp-VNZEQ1av.js +0 -5
@@ -1,12 +1,12 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-pTpboio4.js";
3
- import "./ts-CPR985mz.js";
2
+ import "./versionChecker-Bmtx6fPv.js";
3
+ import "./ts-C8dvu_cD.js";
4
4
  import "./todoAutomation-CbVVS4re.js";
5
5
  import "./JsonlStore-BqF7AQ6E.js";
6
6
  import "./globalPidIndex-CRH9L9tn.js";
7
7
  import "./pidStore-DXWqzTSz.js";
8
8
  import "./messageLog-Brx3w6zT.js";
9
9
  import "./todoStore-DF6vxHgV.js";
10
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C-5idp3R.js";
10
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Dxw9H99T.js";
11
11
 
12
12
  export { SUPPORTED_CLIS };
@@ -1,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-CPR985mz.js";
1
+ import { t as CLIS_CONFIG } from "./ts-C8dvu_cD.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-C-5idp3R.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-Dxw9H99T.js.map
@@ -5,7 +5,7 @@ import "./pidStore-DXWqzTSz.js";
5
5
  import "./messageLog-Brx3w6zT.js";
6
6
  import "./e2e-z1xpwSAg.js";
7
7
  import "./configShared-DKTgiz7K.js";
8
- import { et as resolveOne } from "./subcommands-CFVFLCuJ.js";
8
+ import { tt as resolveOne } from "./subcommands-CzSrhEYG.js";
9
9
  import "./notifyStore-2SWKGwZI.js";
10
10
  import "./webrtcLink-DFRyWNMs.js";
11
11
  import "./remotes-B4v0Nowo.js";
@@ -232,4 +232,4 @@ function transformEvent(rawEvent, agentId, forwarded) {
232
232
 
233
233
  //#endregion
234
234
  export { createScopedShare, listShares, revokeAllShares, revokeShare };
235
- //# sourceMappingURL=agentShare-Bt_vRAdp.js.map
235
+ //# sourceMappingURL=agentShare-C178Fz-8.js.map
@@ -5,11 +5,11 @@ import "./pidStore-DXWqzTSz.js";
5
5
  import "./messageLog-Brx3w6zT.js";
6
6
  import "./e2e-z1xpwSAg.js";
7
7
  import "./configShared-DKTgiz7K.js";
8
- import "./subcommands-CFVFLCuJ.js";
8
+ import "./subcommands-CzSrhEYG.js";
9
9
  import "./notifyStore-2SWKGwZI.js";
10
10
  import "./webrtcLink-DFRyWNMs.js";
11
11
  import "./remotes-B4v0Nowo.js";
12
12
  import "./callbackCore-Bl2gGcxg.js";
13
- import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-BoCEpJ3Z.js";
13
+ import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-DEhpIaK7.js";
14
14
 
15
15
  export { cmdCallback };
@@ -1,5 +1,5 @@
1
1
  import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
2
- import { et as resolveOne } from "./subcommands-CFVFLCuJ.js";
2
+ import { tt as resolveOne } from "./subcommands-CzSrhEYG.js";
3
3
  import { a as mintCapability, o as parseExpires } from "./callbackCore-Bl2gGcxg.js";
4
4
  import { randomBytes } from "node:crypto";
5
5
  import { chmodSync, readFileSync, renameSync, writeFileSync } from "node:fs";
@@ -72,7 +72,7 @@ async function resolveBase(flag) {
72
72
  if (flag) return flag;
73
73
  if (process.env.AGENT_YES_CALLBACK_BASE) return process.env.AGENT_YES_CALLBACK_BASE;
74
74
  try {
75
- const { resolveLocalServeUrl } = await import("./serve-DknfTqkm.js");
75
+ const { resolveLocalServeUrl } = await import("./serve-C_9bMH27.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-BoCEpJ3Z.js.map
190
+ //# sourceMappingURL=callback-DEhpIaK7.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-pTpboio4.js";
5
- import { d as getRustBinary } from "./rustBinary-DGb3sdEw.js";
4
+ import { a as versionString, r as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-Bmtx6fPv.js";
5
+ import { d as getRustBinary } from "./rustBinary-FjEdM28b.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-BNVgv7bt.js");
298
+ const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken, isBareManagerInvocation } = await import("./subcommands-2tF2Psrc.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-NZHT0QJq.js");
312
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BX5_erb1.js");
313
313
  if (isUnknownManagerToken(rawArg, managerCommands, SUPPORTED_CLIS)) {
314
314
  process.stderr.write(`ay: unknown subcommand or CLI '${rawArg}'.\n See 'ay help' for subcommands. To run an agent, name a CLI:\n 'ay <cli> …' (e.g. 'ay claude …') or 'ay --cli <cli> …'.\n`);
315
315
  process.exit(1);
@@ -360,7 +360,7 @@ if (config.useRust) {
360
360
  }
361
361
  }
362
362
  if (rustBinary) {
363
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-NZHT0QJq.js");
363
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BX5_erb1.js");
364
364
  const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
365
365
  if (config.verbose) {
366
366
  console.log(`[rust] Using binary: ${rustBinary}`);
@@ -5,7 +5,7 @@ import "./pidStore-DXWqzTSz.js";
5
5
  import "./messageLog-Brx3w6zT.js";
6
6
  import "./e2e-z1xpwSAg.js";
7
7
  import "./configShared-DKTgiz7K.js";
8
- import { _ as deriveLiveState, _t as buildAgentForest, vt as flattenForest, z as listRecords } from "./subcommands-CFVFLCuJ.js";
8
+ import { B as listRecords, _ as deriveLiveState, vt as buildAgentForest, yt as flattenForest } from "./subcommands-CzSrhEYG.js";
9
9
  import "./notifyStore-2SWKGwZI.js";
10
10
  import "./webrtcLink-DFRyWNMs.js";
11
11
  import "./remotes-B4v0Nowo.js";
@@ -330,4 +330,4 @@ function readPpidSync(pid) {
330
330
 
331
331
  //#endregion
332
332
  export { cmdPs };
333
- //# sourceMappingURL=cmdPs-DU-4ULBF.js.map
333
+ //# sourceMappingURL=cmdPs-C87Caduf.js.map
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-pTpboio4.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-CPR985mz.js";
2
+ import "./versionChecker-Bmtx6fPv.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-C8dvu_cD.js";
4
4
  import { a as renderTree, c as describeBlock, i as renderDigest, l as monitorHint, o as unblockedTasks, r as openBlockers, t as reconcileTodos, u as removeControlCharacters } from "./todoAutomation-CbVVS4re.js";
5
5
  import "./JsonlStore-BqF7AQ6E.js";
6
6
  import "./globalPidIndex-CRH9L9tn.js";
@@ -5,7 +5,7 @@ import "./pidStore-DXWqzTSz.js";
5
5
  import "./messageLog-Brx3w6zT.js";
6
6
  import "./e2e-z1xpwSAg.js";
7
7
  import "./configShared-DKTgiz7K.js";
8
- import { Z as renderLogTailLines, _ as deriveLiveState, j as isPidAlive, z as listRecords } from "./subcommands-CFVFLCuJ.js";
8
+ import { B as listRecords, M as isPidAlive, Q as renderLogTailLines, _ as deriveLiveState } from "./subcommands-CzSrhEYG.js";
9
9
  import { f as readInbox, g as daemonLockOwnerPath, h as daemonLockDir, i as gcInboxes, l as listInboxParents, m as shouldStealLock, n as appendEvent, s as hostId, u as liveWatchers, x as notifyDir } from "./notifyStore-2SWKGwZI.js";
10
10
  import "./webrtcLink-DFRyWNMs.js";
11
11
  import "./remotes-B4v0Nowo.js";
@@ -879,4 +879,4 @@ async function ensureDaemon() {
879
879
 
880
880
  //#endregion
881
881
  export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
882
- //# sourceMappingURL=notifyDaemon-wT-mtu1E.js.map
882
+ //# sourceMappingURL=notifyDaemon-NxyVEhVq.js.map
@@ -338,7 +338,7 @@ async function isParentWatching(parentWrapperPid, parentAgentPid, selfAgentPid,
338
338
  logger.debug("[parent-ping] watcher lookup failed:", error);
339
339
  }
340
340
  try {
341
- const { lastReadAt, READ_WINDOW_MS } = await import("./subcommands-BNVgv7bt.js");
341
+ const { lastReadAt, READ_WINDOW_MS } = await import("./subcommands-2tF2Psrc.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-DYL_oSrV.js.map
469
+ //# sourceMappingURL=parentPingLoop-zAmYgESx.js.map
@@ -1,4 +1,4 @@
1
- import "./versionChecker-pTpboio4.js";
2
- import { a as findSpawnHiddenLauncher, c as getBinDir, d as getRustBinary, f as hasValidMacSignature, i as findRustBinary, l as getBinaryName, n as downloadBinary, o as findTrayLauncher, r as findAyrsBinary, s as gcOldBinaryDirs, t as devBuildInfo, u as getDownloadUrl } from "./rustBinary-DGb3sdEw.js";
1
+ import "./versionChecker-Bmtx6fPv.js";
2
+ import { a as findSpawnHiddenLauncher, c as getBinDir, d as getRustBinary, f as hasValidMacSignature, i as findRustBinary, l as getBinaryName, n as downloadBinary, o as findTrayLauncher, r as findAyrsBinary, s as gcOldBinaryDirs, t as devBuildInfo, u as getDownloadUrl } from "./rustBinary-FjEdM28b.js";
3
3
 
4
4
  export { findAyrsBinary, gcOldBinaryDirs };
@@ -1,4 +1,4 @@
1
- import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-pTpboio4.js";
1
+ import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-Bmtx6fPv.js";
2
2
  import { execFileSync } from "child_process";
3
3
  import { existsSync, mkdirSync, readdirSync, rmSync, statSync, unlinkSync } from "fs";
4
4
  import { chmod, copyFile } from "fs/promises";
@@ -371,4 +371,4 @@ async function getRustBinary(options = {}) {
371
371
 
372
372
  //#endregion
373
373
  export { findSpawnHiddenLauncher as a, getBinDir as c, getRustBinary as d, hasValidMacSignature as f, findRustBinary as i, getBinaryName as l, downloadBinary as n, findTrayLauncher as o, findAyrsBinary as r, gcOldBinaryDirs as s, devBuildInfo as t, getDownloadUrl as u };
374
- //# sourceMappingURL=rustBinary-DGb3sdEw.js.map
374
+ //# sourceMappingURL=rustBinary-FjEdM28b.js.map
@@ -1,13 +1,13 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-pTpboio4.js";
3
- import "./ts-CPR985mz.js";
2
+ import "./versionChecker-Bmtx6fPv.js";
3
+ import "./ts-C8dvu_cD.js";
4
4
  import "./todoAutomation-CbVVS4re.js";
5
5
  import "./JsonlStore-BqF7AQ6E.js";
6
6
  import "./globalPidIndex-CRH9L9tn.js";
7
7
  import "./pidStore-DXWqzTSz.js";
8
8
  import "./messageLog-Brx3w6zT.js";
9
9
  import "./todoStore-DF6vxHgV.js";
10
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C-5idp3R.js";
10
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Dxw9H99T.js";
11
11
  import { f as resolveSpawnCwd } from "./workspaceConfig-DTvPtr5j.js";
12
12
  import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-CipjIwfO.js";
13
13
  import { createHash } from "node:crypto";
@@ -154,4 +154,4 @@ async function cmdSchedule(rest) {
154
154
 
155
155
  //#endregion
156
156
  export { cmdSchedule };
157
- //# sourceMappingURL=schedule-BQEUD3h2.js.map
157
+ //# sourceMappingURL=schedule-DPiovnJr.js.map
@@ -1,7 +1,7 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import { i as getInstalledPackage } from "./versionChecker-pTpboio4.js";
3
- import { a as findSpawnHiddenLauncher } from "./rustBinary-DGb3sdEw.js";
4
- import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-CPR985mz.js";
2
+ import { i as getInstalledPackage } from "./versionChecker-Bmtx6fPv.js";
3
+ import { a as findSpawnHiddenLauncher } from "./rustBinary-FjEdM28b.js";
4
+ import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-C8dvu_cD.js";
5
5
  import { t as agentYesHome$1 } from "./agentYesHome-BNtn19J4.js";
6
6
  import { u as removeControlCharacters } from "./todoAutomation-CbVVS4re.js";
7
7
  import "./JsonlStore-BqF7AQ6E.js";
@@ -12,19 +12,19 @@ import { t as pgidForWrapper } from "./reaper-UimuuTfO.js";
12
12
  import "./todoStore-DF6vxHgV.js";
13
13
  import "./e2e-z1xpwSAg.js";
14
14
  import "./configShared-DKTgiz7K.js";
15
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C-5idp3R.js";
16
- import { $ as renderRawLogLines, I as isUserTyping, J as readPtysize, K as readLogForRender, M as isSlashCommand, Q as renderRawLog, S as extractBadges, T as extractTaskCounts, X as recentReadEdges, Y as recentMessageEdges, Z as renderLogTailLines, d as cliDefaults, et as resolveOne, ft as writeToIpc, gt as TYPING_BADGE, ht as shouldFramePaste, m as controlCodeFromName, mt as framePaste, ot as snapshotStatus, pt as withIpcLock, q as readNotes, v as deriveLiveStatus, w as extractNeedsInput, z as listRecords } from "./subcommands-CFVFLCuJ.js";
15
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Dxw9H99T.js";
16
+ import { $ as renderRawLog, B as listRecords, J as readNotes, L as isUserTyping, N as isSlashCommand, Q as renderLogTailLines, S as extractBadges, T as extractTaskCounts, X as recentMessageEdges, Y as readPtysize, Z as recentReadEdges, _t as TYPING_BADGE, d as cliDefaults, et as renderRawLogLines, gt as shouldFramePaste, ht as framePaste, m as controlCodeFromName, mt as withIpcLock, pt as writeToIpc, q as readLogForRender, st as snapshotStatus, tt as resolveOne, v as deriveLiveStatus, w as extractNeedsInput } from "./subcommands-CzSrhEYG.js";
17
17
  import { c as isTransientLockMkdirError } from "./notifyStore-2SWKGwZI.js";
18
18
  import { i as toWebrtcUrl, n as isWebrtcSpec } from "./webrtcLink-DFRyWNMs.js";
19
19
  import "./remotes-B4v0Nowo.js";
20
20
  import { i as frameVisitorMessage, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-Bl2gGcxg.js";
21
- import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-BoCEpJ3Z.js";
21
+ import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-DEhpIaK7.js";
22
22
  import { n as sampleTrees } from "./procStats-CyD8h5nx.js";
23
23
  import { a as getProvisionRoot, d as isProvisionAllowed, f as resolveSpawnCwd, i as getProvisionHook, l as hasProvisionHook, o as getSpawnHook, t as allowsSkipPermissions, u as hasSpawnHook } from "./workspaceConfig-DTvPtr5j.js";
24
24
  import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-CipjIwfO.js";
25
- import { i as importProvisionModule } from "./ws-BhV8FLVX.js";
25
+ import { i as importProvisionModule } from "./ws-D1ggWZ_I.js";
26
26
  import { r as spawnRejectionReason } from "./spawnGate-YpHopveO.js";
27
- import { i as launchTray } from "./trayApp-wUiHykPM.js";
27
+ import { i as launchTray } from "./trayApp-DO3YALy1.js";
28
28
  import yargs from "yargs";
29
29
  import { appendFile, mkdir, open, readFile, readdir, rename, rm, stat, unlink, writeFile } from "fs/promises";
30
30
  import { arch, cpus, freemem, homedir, hostname, loadavg, platform, totalmem, uptime, userInfo } from "os";
@@ -1704,7 +1704,7 @@ Options:
1704
1704
  const { planRustServe } = await import("./serveRust-DDQiZmMf.js");
1705
1705
  const plan = planRustServe(rest);
1706
1706
  if (plan.kind === "rust") {
1707
- const { findAyrsBinary } = await import("./rustBinary-BYXCnEzJ.js");
1707
+ const { findAyrsBinary } = await import("./rustBinary-CicmJTei.js");
1708
1708
  const ayrs = findAyrsBinary();
1709
1709
  if (ayrs) return runAyrsServe(ayrs, plan.argv);
1710
1710
  process.stderr.write("ay serve: ayrs binary not found — running the TypeScript server (bun run build:rs, or reinstall, to get the Rust daemon)\n");
@@ -2679,7 +2679,7 @@ Options:
2679
2679
  }
2680
2680
  });
2681
2681
  if (req.method === "GET" && p === "/api/ws") {
2682
- const ws = await import("./ws-B3n0JCmy.js");
2682
+ const ws = await import("./ws-BTXQauqi.js");
2683
2683
  try {
2684
2684
  await ws.loadProvision();
2685
2685
  } catch (e) {
@@ -2699,7 +2699,7 @@ Options:
2699
2699
  if (req.method === "GET" && p === "/api/ws/status") {
2700
2700
  const dirRaw = url.searchParams.get("path");
2701
2701
  if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
2702
- const ws = await import("./ws-B3n0JCmy.js");
2702
+ const ws = await import("./ws-BTXQauqi.js");
2703
2703
  let prov;
2704
2704
  try {
2705
2705
  prov = await ws.loadProvision();
@@ -2721,7 +2721,7 @@ Options:
2721
2721
  }
2722
2722
  }
2723
2723
  if (req.method === "GET" && p === "/api/ws/repos") {
2724
- const ws = await import("./ws-B3n0JCmy.js");
2724
+ const ws = await import("./ws-BTXQauqi.js");
2725
2725
  try {
2726
2726
  await ws.loadProvision();
2727
2727
  } catch (e) {
@@ -2802,7 +2802,7 @@ Options:
2802
2802
  const m = /^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/.exec(repoParam);
2803
2803
  if (!m || m[1] === "." || m[1] === ".." || m[2] === "." || m[2] === "..") return new Response("missing/invalid ?repo=<owner>/<repo>", { status: 400 });
2804
2804
  const [, owner, repo] = m;
2805
- const ws = await import("./ws-B3n0JCmy.js");
2805
+ const ws = await import("./ws-BTXQauqi.js");
2806
2806
  let prov;
2807
2807
  try {
2808
2808
  prov = await ws.loadProvision();
@@ -3720,7 +3720,7 @@ Options:
3720
3720
  const perm = body.perm ?? "r";
3721
3721
  if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
3722
3722
  try {
3723
- const { createScopedShare } = await import("./agentShare-Bt_vRAdp.js");
3723
+ const { createScopedShare } = await import("./agentShare-C178Fz-8.js");
3724
3724
  const share = await createScopedShare({
3725
3725
  agent: body.agent,
3726
3726
  perm,
@@ -3735,12 +3735,12 @@ Options:
3735
3735
  }
3736
3736
  }
3737
3737
  if (req.method === "GET" && p === "/api/shares") {
3738
- const { listShares } = await import("./agentShare-Bt_vRAdp.js");
3738
+ const { listShares } = await import("./agentShare-C178Fz-8.js");
3739
3739
  return Response.json(listShares());
3740
3740
  }
3741
3741
  const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
3742
3742
  if (req.method === "DELETE" && revokeM) {
3743
- const { revokeShare } = await import("./agentShare-Bt_vRAdp.js");
3743
+ const { revokeShare } = await import("./agentShare-C178Fz-8.js");
3744
3744
  const ok = revokeShare(decodeURIComponent(revokeM[1]));
3745
3745
  return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
3746
3746
  }
@@ -4052,7 +4052,7 @@ Options:
4052
4052
  const shutdown = (resolve) => {
4053
4053
  if (heartbeat) clearInterval(heartbeat);
4054
4054
  closeShare?.();
4055
- import("./agentShare-Bt_vRAdp.js").then((m) => m.revokeAllShares()).catch(() => {});
4055
+ import("./agentShare-C178Fz-8.js").then((m) => m.revokeAllShares()).catch(() => {});
4056
4056
  server?.stop();
4057
4057
  Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
4058
4058
  };
@@ -4065,4 +4065,4 @@ Options:
4065
4065
 
4066
4066
  //#endregion
4067
4067
  export { cmdServe, inspectServeDaemon, loadTokenReadOnly, mintScopedTermToken, resolveDaemonHttpBase, resolveLocalServeUrl };
4068
- //# sourceMappingURL=serve-DknfTqkm.js.map
4068
+ //# sourceMappingURL=serve-C_9bMH27.js.map
@@ -97,7 +97,7 @@ async function cmdSetup(rest) {
97
97
  } catch {}
98
98
  if (noShare) return 0;
99
99
  process.stdout.write(`\nsharing this machine to agent-yes.com…\n`);
100
- const { cmdServe } = await import("./serve-DknfTqkm.js");
100
+ const { cmdServe } = await import("./serve-C_9bMH27.js");
101
101
  return cmdServe([
102
102
  "install",
103
103
  "--share",
@@ -107,4 +107,4 @@ async function cmdSetup(rest) {
107
107
 
108
108
  //#endregion
109
109
  export { cmdSetup };
110
- //# sourceMappingURL=setup-B13FgF2W.js.map
110
+ //# sourceMappingURL=setup-DVMeGj5u.js.map
@@ -243,7 +243,7 @@ shown first and needs a y at a [y/N] prompt.
243
243
  Options:
244
244
  --port N HTTP port (default: ${DEFAULT_SHARE_PORT}, or the daemon's)\n --path /ay tailscale mount path (default: ${DEFAULT_TS_PATH})\n -y, --yes approve the shown commands without prompting\n --json print {mode, url} as JSON\n\nThe URL carries this host's serve token: whoever holds it can read and steer\nevery agent here. Rotate: rm ~/.agent-yes/.serve-token && ay serve install\n`;
245
245
  async function cmdShareStatus(mount) {
246
- const { inspectServeDaemon } = await import("./serve-DknfTqkm.js");
246
+ const { inspectServeDaemon } = await import("./serve-C_9bMH27.js");
247
247
  const [d, ts] = await Promise.all([inspectServeDaemon(), detectTailscale()]);
248
248
  const line = (k, v) => process.stdout.write(`${k.padEnd(11)}${v}\n`);
249
249
  if (d.args === null) {
@@ -287,7 +287,7 @@ async function cmdShare(rest) {
287
287
  process.stderr.write(`ay share: unknown mode '${mode}' — one of ${SHARE_MODES.join(", ")}\n`);
288
288
  return 1;
289
289
  }
290
- const { inspectServeDaemon, cmdServe } = await import("./serve-DknfTqkm.js");
290
+ const { inspectServeDaemon, cmdServe } = await import("./serve-C_9bMH27.js");
291
291
  const [daemon, ts] = await Promise.all([inspectServeDaemon(), detectTailscale()]);
292
292
  const lanIp = pickLanIp(networkInterfaces());
293
293
  if (!mode) {
@@ -412,4 +412,4 @@ async function cmdShare(rest) {
412
412
 
413
413
  //#endregion
414
414
  export { cmdShare };
415
- //# sourceMappingURL=shareCmd-CKsoN9x4.js.map
415
+ //# sourceMappingURL=shareCmd-cNNr7i3a.js.map
@@ -0,0 +1,13 @@
1
+ import "./logger-CDIsZ-Pp.js";
2
+ import "./JsonlStore-BqF7AQ6E.js";
3
+ import "./globalPidIndex-CRH9L9tn.js";
4
+ import "./pidStore-DXWqzTSz.js";
5
+ import "./messageLog-Brx3w6zT.js";
6
+ import "./e2e-z1xpwSAg.js";
7
+ import "./configShared-DKTgiz7K.js";
8
+ import { $ as renderRawLog, A as isBareManagerInvocation, B as listRecords, C as extractMenu, D as inspectSubmission, E as finalizedLines, F as isUnknownManagerToken, G as readAgentPtysize, H as menuSelectKeys, I as isUnreachableWriteErrno, J as readNotes, K as readComposerState, L as isUserTyping, M as isPidAlive, N as isSlashCommand, O as isAgentIdShaped, P as isSubcommand, Q as renderLogTailLines, R as lastReadAt, S as extractBadges, T as extractTaskCounts, U as ownedCollapsedPaste, V as matchKeyword, W as probeStdinReachable, X as recentMessageEdges, Y as readPtysize, Z as recentReadEdges, _ as deriveLiveState, a as SEND_BODY_MAX_CHARS, at as runSubcommand, b as envelopeAttribution, c as TYPING_WINDOW_MS, ct as stdinActivityPath, d as cliDefaults, dt as waitForLogQuiet, et as renderRawLogLines, f as cmdHelp, ft as writeKeysPaced, g as cwdLabel, h as cursorAbs, i as READ_WINDOW_MS, it as restartHintLines, j as isExitRequest, k as isAgentStuck, l as backoffWhileTyping, lt as stopTipForCli, m as controlCodeFromName, n as MAX_RENDER_BYTES, nt as resolveReadWindow, o as SEND_EXIT_QUEUED, ot as sendPayloadCapError, p as confirmStdinUnreachable, pt as writeToIpc, q as readLogForRender, r as READ_PAGE_DEFAULT, rt as resolveResumeArgs, s as SEND_EXIT_UNREACHABLE, st as snapshotStatus, t as GRACEFUL_EXIT_COMMANDS, tt as resolveOne, u as buildEnvelope, ut as submitAndConfirm, v as deriveLiveStatus, w as extractNeedsInput, x as envelopeCostFor, y as drainerLauncher, z as lastStdinAt } from "./subcommands-CzSrhEYG.js";
9
+ import "./notifyStore-2SWKGwZI.js";
10
+ import "./webrtcLink-DFRyWNMs.js";
11
+ import "./remotes-B4v0Nowo.js";
12
+
13
+ export { READ_WINDOW_MS, cmdHelp, isBareManagerInvocation, isSubcommand, isUnknownManagerToken, lastReadAt, runSubcommand };
@@ -1986,7 +1986,7 @@ async function runSubcommand(argv) {
1986
1986
  switch (sub) {
1987
1987
  case "ls":
1988
1988
  case "list": return await cmdLs(rest);
1989
- case "ps": return await (await import("./cmdPs-DU-4ULBF.js")).cmdPs(rest);
1989
+ case "ps": return await (await import("./cmdPs-C87Caduf.js")).cmdPs(rest);
1990
1990
  case "status": return await cmdStatus(rest);
1991
1991
  case "whoami": return await cmdWhoami(rest);
1992
1992
  case "result": return await cmdResult(rest);
@@ -2034,35 +2034,35 @@ async function runSubcommand(argv) {
2034
2034
  return cmdCh(rest);
2035
2035
  }
2036
2036
  case "term": {
2037
- const { cmdTerm } = await import("./terminal-CODg7fHK.js");
2037
+ const { cmdTerm } = await import("./terminal-MTNQuGD5.js");
2038
2038
  return cmdTerm(rest);
2039
2039
  }
2040
2040
  case "widget": {
2041
- const { cmdWidget } = await import("./widget-C8srSfBL.js");
2041
+ const { cmdWidget } = await import("./widget-BCrKF9Vw.js");
2042
2042
  return cmdWidget(rest);
2043
2043
  }
2044
2044
  case "mint": {
2045
- const { cmdMint } = await import("./widget-C8srSfBL.js");
2045
+ const { cmdMint } = await import("./widget-BCrKF9Vw.js");
2046
2046
  return cmdMint(rest);
2047
2047
  }
2048
2048
  case "serve": {
2049
- const { cmdServe } = await import("./serve-DknfTqkm.js");
2049
+ const { cmdServe } = await import("./serve-C_9bMH27.js");
2050
2050
  return cmdServe(rest);
2051
2051
  }
2052
2052
  case "tray": {
2053
- const { cmdTray } = await import("./trayApp-VNZEQ1av.js");
2053
+ const { cmdTray } = await import("./trayApp-Cx9ktCQ-.js");
2054
2054
  return cmdTray(rest);
2055
2055
  }
2056
2056
  case "setup": {
2057
- const { cmdSetup } = await import("./setup-B13FgF2W.js");
2057
+ const { cmdSetup } = await import("./setup-DVMeGj5u.js");
2058
2058
  return cmdSetup(rest);
2059
2059
  }
2060
2060
  case "ws": {
2061
- const { cmdWs } = await import("./ws-B3n0JCmy.js");
2061
+ const { cmdWs } = await import("./ws-BTXQauqi.js");
2062
2062
  return cmdWs(rest);
2063
2063
  }
2064
2064
  case "schedule": {
2065
- const { cmdSchedule } = await import("./schedule-BQEUD3h2.js");
2065
+ const { cmdSchedule } = await import("./schedule-DPiovnJr.js");
2066
2066
  return cmdSchedule(rest);
2067
2067
  }
2068
2068
  case "remote": {
@@ -2070,7 +2070,7 @@ async function runSubcommand(argv) {
2070
2070
  return cmdRemote(rest);
2071
2071
  }
2072
2072
  case "share": {
2073
- const { cmdShare } = await import("./shareCmd-CKsoN9x4.js");
2073
+ const { cmdShare } = await import("./shareCmd-cNNr7i3a.js");
2074
2074
  return cmdShare(rest);
2075
2075
  }
2076
2076
  case "connect": {
@@ -2082,7 +2082,7 @@ async function runSubcommand(argv) {
2082
2082
  return cmdExpose(rest);
2083
2083
  }
2084
2084
  case "callback": {
2085
- const { cmdCallback } = await import("./callback-DniBBM0f.js");
2085
+ const { cmdCallback } = await import("./callback-DDFaB2fy.js");
2086
2086
  return cmdCallback(rest);
2087
2087
  }
2088
2088
  case "reap":
@@ -2093,7 +2093,7 @@ async function runSubcommand(argv) {
2093
2093
  return await cmdDsh(rest);
2094
2094
  }
2095
2095
  case "gc": {
2096
- const { gcOldBinaryDirs } = await import("./rustBinary-BYXCnEzJ.js");
2096
+ const { gcOldBinaryDirs } = await import("./rustBinary-CicmJTei.js");
2097
2097
  const { gcLogs } = await import("./globalPidIndex-DC93JhHQ.js");
2098
2098
  const bins = gcOldBinaryDirs();
2099
2099
  const logs = await gcLogs();
@@ -2159,6 +2159,10 @@ async function cmdHelp(managerCommands = true) {
2159
2159
  process.stdout.write(agentSection + "ay - agent-yes CLI\n\nManagement:\n ay ls [keyword] list running agents\n ay ps [keyword] per-agent CPU/RSS, rolled up over each\n agent's whole process tree, + box vitals\n ay tail [-f] [-n N] <keyword> last N lines (96), -f to follow\n ay tail <keyword> --until TEXT block until TEXT is printed, then exit 0\n [--timeout 10m] [-q] [--regex] (1 = agent exited without it, 2 = no match,\n [--fail-on TEXT] [--count N] 3 = --fail-on hit first)\n ay read <keyword> [page opts] paginate: --last/--head N, --range A:B,\n --before-line L [--limit N]\n" + readAliasNote + " ay cat <keyword> full log\n ay head <keyword> first N lines\n ay hist [-n 6] [--all] [--json] past agent conversations (claude/codex\n transcripts, incl. exited sessions);\n this cwd unless --all\n ay send <keyword> <msg> send a message (keyword '.' = agent in this cwd)\n ay msgs [keyword] [--in|--out] inter-agent message log (sent + received)\n ay ch mk|join|send|read|tail <topic> local-first E2E channels: AI ↔ humans on a topic (ay ch help)\n ay term embed <pid> <script> to embed a live read-only agent terminal in a page (ay term help)\n ay widget ls | read selection|dom read an opted-in page widget's context (selection/DOM) (ay widget help)\n ay mint <target> --caps ... mint a scoped, short-TTL capability token (embeddable in a page)\n ay key <keyword> <key...> send raw keystrokes (down/up/enter/esc/…) — drives menus\n ay select <keyword> <N> pick option N of a needs_input selection menu\n ay attach <keyword> interactive attach (detach: Ctrl-\\)\n ay stop <keyword> graceful shutdown (/exit for claude/codex)\n ay exit <keyword> [reason] graceful shutdown, recording who/why (= 'ay send <kw> exit')\n ay restart <keyword> [--fresh] stop (if live) + relaunch resuming the session; --fresh replays the prompt\n ay status <keyword> agent status snapshot\n ay notify watch --unread get notified when sub-agents finish/stuck/crash (writes to inbox)\n ay whoami [--json] (inside an agent) your own registry identity + reply address\n ay result <keyword> [--wait] pull an agent's structured result envelope\n ay result set '<json>' (inside an agent) deposit your result envelope\n ay reap kill process groups leaked by dead agents\n ay gc reclaim old-version binary cache dirs + stale session logs\n ay dsh-legacy [args...] launch the DeepSeek Harness terminal client (dsh-tui)\n" + wsLines + "\nRemote:\n" + setupLine + " ay share [local|lan|tailscale|webrtc] share this machine: one URL for web console + CLI\n ay connect <share-url> [alias] save another machine's share URL as a remote\n" + shareAliasNote + " ay schedule <when> <cli> -- <msg> run an agent on a schedule (HH:MM or cron)\n ay serve [--port N] start HTTP API server (prints token)\n ay serve status show serve daemon/server status\n ay remote add <alias> http://<token>@<host>:<port>\n ay remote ls / rm <alias> manage saved remotes\n ay expose <port> share localhost:<port> at https://<id>.agent-yes.com (private link)\n ay callback --expires 7d mint an embeddable message-me widget for one agent\n ay ls <token>@<host>:<port> connect inline (no alias needed)\n ay send <token>@<host>:<port>:<kw> <msg>\n\nRun an agent (naming a CLI is what launches one — bare 'ay' shows this help):\n ay <claude|codex|...> [options] -- [prompt]\n ay claude -- \"fix the bug in auth.ts\"\n cy [options] -- [prompt] shortcut for 'ay claude' (bare 'cy' starts claude)\n ay claude --help full agent-runner options\n\nLabs (examples at https://github.com/snomiao/agent-yes/tree/main/lab):\n local-role-play/ designer + builder on one machine\n http-remote/ ay serve remote access demo\n p2p-pairing/ libp2p P2P (needs: cargo build --features swarm)\n");
2160
2160
  return 0;
2161
2161
  }
2162
+ /** Looks like an agent_id (12 hex, or a longer injected one) rather than a word. */
2163
+ function isAgentIdShaped(keyword) {
2164
+ return /^[0-9a-f]{12,32}$/i.test(keyword);
2165
+ }
2162
2166
  function matchKeyword(record, keyword) {
2163
2167
  if (!keyword) return true;
2164
2168
  const kw = keyword.toLowerCase();
@@ -2166,6 +2170,7 @@ function matchKeyword(record, keyword) {
2166
2170
  if (record.pid === Number(keyword)) return true;
2167
2171
  return !!(record.agent_id && record.agent_id.toLowerCase().startsWith(kw));
2168
2172
  }
2173
+ if (isAgentIdShaped(keyword)) return !!(record.agent_id && record.agent_id.toLowerCase().startsWith(kw));
2169
2174
  if (kw === "." || kw === "./") {
2170
2175
  const here = path.resolve(process.cwd());
2171
2176
  return path.resolve(record.cwd) === here || !!record.workdir && path.resolve(record.workdir) === here;
@@ -2296,7 +2301,16 @@ async function pickInteractive(matches) {
2296
2301
  async function resolveOne(keyword, opts) {
2297
2302
  if (!keyword) throw new Error("keyword required (pid, cwd substring, cli name, or prompt substring)");
2298
2303
  const matches = await listRecords(keyword, opts);
2299
- if (matches.length === 0) throw new Error(`no agent matched "${keyword}"`);
2304
+ if (matches.length === 0) {
2305
+ if (isAgentIdShaped(keyword)) {
2306
+ const gone = opts.all ? [] : await listRecords(keyword, {
2307
+ ...opts,
2308
+ all: true
2309
+ });
2310
+ throw new Error(`no live agent has id "${keyword}"${gone.length ? ` (pid ${gone[0].pid} exited)` : ""} — it is unknown or stale: an agent whose wrapper restarted gets a new id. Find the current one with \`ay ls\`; nothing was sent.`);
2311
+ }
2312
+ throw new Error(`no agent matched "${keyword}"`);
2313
+ }
2300
2314
  if (/^\d+$/.test(keyword)) {
2301
2315
  const byPid = matches.filter((r) => r.pid === Number(keyword));
2302
2316
  if (byPid.length === 1) return byPid[0];
@@ -5576,7 +5590,7 @@ async function cmdAttach(rest) {
5576
5590
  const winsizeDir = path.join(ayHome, "winsize");
5577
5591
  await mkdir(winsizeDir, { recursive: true });
5578
5592
  const winsizePath = path.join(winsizeDir, String(record.pid));
5579
- const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-DknfTqkm.js");
5593
+ const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-C_9bMH27.js");
5580
5594
  const daemonBase = await resolveDaemonHttpBase().catch(() => null);
5581
5595
  const daemonToken = daemonBase ? await loadTokenReadOnly().catch(() => null) ?? "" : "";
5582
5596
  const capViewer = `attach:${process.pid}`;
@@ -6305,7 +6319,7 @@ async function cmdNotify(rest) {
6305
6319
  }
6306
6320
  const ensure = async () => {
6307
6321
  if (!argv["ensure-daemon"]) return;
6308
- const { ensureDaemon } = await import("./notifyDaemon-wT-mtu1E.js");
6322
+ const { ensureDaemon } = await import("./notifyDaemon-NxyVEhVq.js");
6309
6323
  await ensureDaemon().catch(() => null);
6310
6324
  };
6311
6325
  await heartbeatWatcher(parent, selfStartedAt);
@@ -6379,7 +6393,7 @@ async function cmdNotifyCursor(args) {
6379
6393
  }
6380
6394
  async function cmdNotifyd(rest) {
6381
6395
  const sub = rest[0] ?? "status";
6382
- const daemon = await import("./notifyDaemon-wT-mtu1E.js");
6396
+ const daemon = await import("./notifyDaemon-NxyVEhVq.js");
6383
6397
  switch (sub) {
6384
6398
  case "run": return daemon.runDaemon();
6385
6399
  case "once": return daemon.runDaemon({ once: true });
@@ -6405,5 +6419,5 @@ async function cmdNotifyd(rest) {
6405
6419
  }
6406
6420
 
6407
6421
  //#endregion
6408
- export { renderRawLogLines as $, isExitRequest as A, matchKeyword as B, extractMenu as C, inspectSubmission as D, finalizedLines as E, isUnreachableWriteErrno as F, readComposerState as G, ownedCollapsedPaste as H, isUserTyping as I, readPtysize as J, readLogForRender as K, lastReadAt as L, isSlashCommand as M, isSubcommand as N, isAgentStuck as O, isUnknownManagerToken as P, renderRawLog as Q, lastStdinAt as R, extractBadges as S, extractTaskCounts as T, probeStdinReachable as U, menuSelectKeys as V, readAgentPtysize as W, recentReadEdges as X, recentMessageEdges as Y, renderLogTailLines as Z, deriveLiveState as _, buildAgentForest as _t, SEND_BODY_MAX_CHARS as a, sendPayloadCapError as at, envelopeAttribution as b, TYPING_WINDOW_MS as c, stopTipForCli as ct, cliDefaults as d, writeKeysPaced as dt, resolveOne as et, cmdHelp as f, writeToIpc as ft, cwdLabel as g, TYPING_BADGE as gt, cursorAbs as h, shouldFramePaste as ht, READ_WINDOW_MS as i, runSubcommand as it, isPidAlive as j, isBareManagerInvocation as k, backoffWhileTyping as l, submitAndConfirm as lt, controlCodeFromName as m, framePaste as mt, MAX_RENDER_BYTES as n, resolveResumeArgs as nt, SEND_EXIT_QUEUED as o, snapshotStatus as ot, confirmStdinUnreachable as p, withIpcLock as pt, readNotes as q, READ_PAGE_DEFAULT as r, restartHintLines as rt, SEND_EXIT_UNREACHABLE as s, stdinActivityPath as st, GRACEFUL_EXIT_COMMANDS as t, resolveReadWindow as tt, buildEnvelope as u, waitForLogQuiet as ut, deriveLiveStatus as v, flattenForest as vt, extractNeedsInput as w, envelopeCostFor as x, drainerLauncher as y, listRecords as z };
6409
- //# sourceMappingURL=subcommands-CFVFLCuJ.js.map
6422
+ export { renderRawLog as $, isBareManagerInvocation as A, listRecords as B, extractMenu as C, inspectSubmission as D, finalizedLines as E, isUnknownManagerToken as F, readAgentPtysize as G, menuSelectKeys as H, isUnreachableWriteErrno as I, readNotes as J, readComposerState as K, isUserTyping as L, isPidAlive as M, isSlashCommand as N, isAgentIdShaped as O, isSubcommand as P, renderLogTailLines as Q, lastReadAt as R, extractBadges as S, extractTaskCounts as T, ownedCollapsedPaste as U, matchKeyword as V, probeStdinReachable as W, recentMessageEdges as X, readPtysize as Y, recentReadEdges as Z, deriveLiveState as _, TYPING_BADGE as _t, SEND_BODY_MAX_CHARS as a, runSubcommand as at, envelopeAttribution as b, TYPING_WINDOW_MS as c, stdinActivityPath as ct, cliDefaults as d, waitForLogQuiet as dt, renderRawLogLines as et, cmdHelp as f, writeKeysPaced as ft, cwdLabel as g, shouldFramePaste as gt, cursorAbs as h, framePaste as ht, READ_WINDOW_MS as i, restartHintLines as it, isExitRequest as j, isAgentStuck as k, backoffWhileTyping as l, stopTipForCli as lt, controlCodeFromName as m, withIpcLock as mt, MAX_RENDER_BYTES as n, resolveReadWindow as nt, SEND_EXIT_QUEUED as o, sendPayloadCapError as ot, confirmStdinUnreachable as p, writeToIpc as pt, readLogForRender as q, READ_PAGE_DEFAULT as r, resolveResumeArgs as rt, SEND_EXIT_UNREACHABLE as s, snapshotStatus as st, GRACEFUL_EXIT_COMMANDS as t, resolveOne as tt, buildEnvelope as u, submitAndConfirm as ut, deriveLiveStatus as v, buildAgentForest as vt, extractNeedsInput as w, envelopeCostFor as x, drainerLauncher as y, flattenForest as yt, lastStdinAt as z };
6423
+ //# sourceMappingURL=subcommands-CzSrhEYG.js.map
@@ -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-DknfTqkm.js");
101
+ const { mintScopedTermToken } = await import("./serve-C_9bMH27.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-CODg7fHK.js.map
138
+ //# sourceMappingURL=terminal-MTNQuGD5.js.map
@@ -0,0 +1,5 @@
1
+ import "./versionChecker-Bmtx6fPv.js";
2
+ import "./rustBinary-FjEdM28b.js";
3
+ import { a as trayHiddenMarker, i as launchTray, n as hasDesktop, r as isTrayHidden, t as cmdTray } from "./trayApp-DO3YALy1.js";
4
+
5
+ export { cmdTray };
@@ -1,4 +1,4 @@
1
- import { o as findTrayLauncher } from "./rustBinary-DGb3sdEw.js";
1
+ import { o as findTrayLauncher } from "./rustBinary-FjEdM28b.js";
2
2
  import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
3
3
  import { existsSync } from "node:fs";
4
4
  import path from "node:path";
@@ -97,4 +97,4 @@ async function cmdTray(args) {
97
97
 
98
98
  //#endregion
99
99
  export { trayHiddenMarker as a, launchTray as i, hasDesktop as n, isTrayHidden as r, cmdTray as t };
100
- //# sourceMappingURL=trayApp-wUiHykPM.js.map
100
+ //# sourceMappingURL=trayApp-DO3YALy1.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 { i as getInstalledPackage } from "./versionChecker-pTpboio4.js";
3
+ import { i as getInstalledPackage } from "./versionChecker-Bmtx6fPv.js";
4
4
  import { t as agentYesHome } from "./agentYesHome-BNtn19J4.js";
5
5
  import { u as removeControlCharacters } from "./todoAutomation-CbVVS4re.js";
6
6
  import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-BOIPD_Vs.js";
@@ -2086,7 +2086,7 @@ async function agentYes({ cli, cliArgs = [], skipPermissions = false, prompt, ro
2086
2086
  }, 100);
2087
2087
  const cleanupHeartbeat = () => clearInterval(heartbeatInterval);
2088
2088
  shell.onExit(cleanupHeartbeat);
2089
- const { startParentPingLoop } = await import("./parentPingLoop-DYL_oSrV.js");
2089
+ const { startParentPingLoop } = await import("./parentPingLoop-zAmYgESx.js");
2090
2090
  const parentPingLoop = startParentPingLoop({
2091
2091
  parentPid,
2092
2092
  selfWrapperPid: process.pid,
@@ -2349,4 +2349,4 @@ function sleep(ms) {
2349
2349
 
2350
2350
  //#endregion
2351
2351
  export { hasTodoStore as a, permissionBadge as c, answerAsk as i, AgentContext as l, agentYes as n, listAsks as o, config as r, listAsksForProject as s, CLIS_CONFIG as t, CLAUDE_SESSION_PIN_ENV as u };
2352
- //# sourceMappingURL=ts-CPR985mz.js.map
2352
+ //# sourceMappingURL=ts-C8dvu_cD.js.map
@@ -7,7 +7,7 @@ import { fileURLToPath } from "url";
7
7
 
8
8
  //#region package.json
9
9
  var name = "claude-yes";
10
- var version = "1.300.1";
10
+ var version = "1.300.2";
11
11
 
12
12
  //#endregion
13
13
  //#region ts/versionChecker.ts
@@ -285,4 +285,4 @@ async function displayVersion() {
285
285
 
286
286
  //#endregion
287
287
  export { versionString as a, getInstalledPackage as i, compareVersions as n, displayVersion as r, checkAndAutoUpdate as t };
288
- //# sourceMappingURL=versionChecker-pTpboio4.js.map
288
+ //# sourceMappingURL=versionChecker-Bmtx6fPv.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-DknfTqkm.js");
31
+ const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-C_9bMH27.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-DknfTqkm.js");
189
+ const { mintScopedTermToken } = await import("./serve-C_9bMH27.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-C8srSfBL.js.map
205
+ //# sourceMappingURL=widget-BCrKF9Vw.js.map
@@ -5,10 +5,10 @@ import "./pidStore-DXWqzTSz.js";
5
5
  import "./messageLog-Brx3w6zT.js";
6
6
  import "./e2e-z1xpwSAg.js";
7
7
  import "./configShared-DKTgiz7K.js";
8
- import "./subcommands-CFVFLCuJ.js";
8
+ import "./subcommands-CzSrhEYG.js";
9
9
  import "./notifyStore-2SWKGwZI.js";
10
10
  import "./webrtcLink-DFRyWNMs.js";
11
11
  import "./remotes-B4v0Nowo.js";
12
- import { a as isPathInside, c as walkWorkspaces, i as importProvisionModule, l as workspaceStatus, n as cmdWs, o as loadProvision, r as collectWorkspaces, s as resolveOperand, t as WS_JSON_SCHEMA } from "./ws-BhV8FLVX.js";
12
+ import { a as isPathInside, c as walkWorkspaces, i as importProvisionModule, l as workspaceStatus, n as cmdWs, o as loadProvision, r as collectWorkspaces, s as resolveOperand, t as WS_JSON_SCHEMA } from "./ws-D1ggWZ_I.js";
13
13
 
14
14
  export { WS_JSON_SCHEMA, cmdWs, collectWorkspaces, isPathInside, loadProvision, walkWorkspaces, workspaceStatus };
@@ -1,4 +1,4 @@
1
- import { z as listRecords } from "./subcommands-CFVFLCuJ.js";
1
+ import { B as listRecords } from "./subcommands-CzSrhEYG.js";
2
2
  import { a as getProvisionRoot } from "./workspaceConfig-DTvPtr5j.js";
3
3
  import { existsSync } from "fs";
4
4
  import { lstat, opendir } from "fs/promises";
@@ -424,4 +424,4 @@ async function cmdWs(args) {
424
424
 
425
425
  //#endregion
426
426
  export { isPathInside as a, walkWorkspaces as c, importProvisionModule as i, workspaceStatus as l, cmdWs as n, loadProvision as o, collectWorkspaces as r, resolveOperand as s, WS_JSON_SCHEMA as t };
427
- //# sourceMappingURL=ws-BhV8FLVX.js.map
427
+ //# sourceMappingURL=ws-D1ggWZ_I.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-yes",
3
- "version": "1.300.1",
3
+ "version": "1.300.2",
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",
@@ -597,6 +597,23 @@ describe("subcommands.matchKeyword", () => {
597
597
  expect(matchKeyword(r, "b2c3")).toBe(false); // not a prefix (mid-string)
598
598
  expect(matchKeyword({ ...baseRecord, agent_id: null }, "a1b2")).toBe(false);
599
599
  });
600
+
601
+ // A vanished agent's id still sits in its sublanes' prompts ("reply: ay send
602
+ // <id>"); an id-shaped keyword must never fall through to that prompt match.
603
+ it("treats an id-shaped keyword as an identity selector (no cwd/prompt match)", async () => {
604
+ const { matchKeyword } = await loadModule();
605
+ const quoting = {
606
+ ...baseRecord,
607
+ agent_id: "0123456789ab",
608
+ prompt: "you were spawned by d3e4f5a6b7c8 — reply: ay send d3e4f5a6b7c8",
609
+ cwd: "/repo/alpha/tree/d3e4f5a6b7c8",
610
+ };
611
+ expect(matchKeyword(quoting, "d3e4f5a6b7c8")).toBe(false);
612
+ expect(matchKeyword(quoting, "0123456789ab")).toBe(true); // its own id
613
+ expect(matchKeyword(quoting, "0123456789AB")).toBe(true);
614
+ // a short hex word is still an ordinary keyword
615
+ expect(matchKeyword(quoting, "d3e4f5")).toBe(true);
616
+ });
600
617
  });
601
618
 
602
619
  describe("subcommands.resolveOne exact-identity precedence", () => {
@@ -676,6 +693,41 @@ describe("subcommands.resolveOne exact-identity precedence", () => {
676
693
  const record = await resolveOne("a1b2c3d4e5f6", opts);
677
694
  expect(record.pid).toBe(111);
678
695
  });
696
+ // 2026-10-09: a parent's wrapper restarted under a new id; sends to the old
697
+ // id keyword-matched every sublane whose prompt quoted it. With exactly one
698
+ // such lane left, the send would have gone to that lane.
699
+ it("refuses a stale id instead of resolving it to a lane that quotes it", async () => {
700
+ const { resolveOne } = await loadModule();
701
+ const { appendGlobalPid } = await import("./globalPidIndex.ts");
702
+ const base = {
703
+ cwd: process.cwd(),
704
+ log_file: null,
705
+ exit_code: null,
706
+ exit_reason: null,
707
+ started_at: Date.now() - 1_000,
708
+ };
709
+ await appendGlobalPid({
710
+ ...base,
711
+ pid: 3333,
712
+ cli: "claude",
713
+ status: "active" as const,
714
+ agent_id: "0123456789ab",
715
+ prompt: "<ay-msg from parent — reply: ay send d3e4f5a6b7c8>",
716
+ });
717
+ await expect(resolveOne("d3e4f5a6b7c8", opts)).rejects.toThrow(/no live agent has id/);
718
+ // the exited parent is named when its record is still in the index
719
+ await appendGlobalPid({
720
+ ...base,
721
+ pid: 4444,
722
+ cli: "claude",
723
+ status: "exited" as const,
724
+ agent_id: "d3e4f5a6b7c8",
725
+ prompt: "cto",
726
+ });
727
+ await expect(resolveOne("d3e4f5a6b7c8", opts)).rejects.toThrow(/pid 4444 exited/);
728
+ // the quoting lane is still reachable by its own id
729
+ expect((await resolveOne("0123456789ab", opts)).pid).toBe(3333);
730
+ });
679
731
  });
680
732
 
681
733
  describe("subcommands.runSubcommand routing", () => {
package/ts/subcommands.ts CHANGED
@@ -1399,6 +1399,11 @@ export interface CommonOpts {
1399
1399
  json: boolean;
1400
1400
  }
1401
1401
 
1402
+ /** Looks like an agent_id (12 hex, or a longer injected one) rather than a word. */
1403
+ export function isAgentIdShaped(keyword: string): boolean {
1404
+ return /^[0-9a-f]{12,32}$/i.test(keyword);
1405
+ }
1406
+
1402
1407
  export function matchKeyword(record: GlobalPidRecord, keyword: string): boolean {
1403
1408
  if (!keyword) return true;
1404
1409
  const kw = keyword.toLowerCase();
@@ -1412,6 +1417,14 @@ export function matchKeyword(record: GlobalPidRecord, keyword: string): boolean
1412
1417
  if (record.pid === Number(keyword)) return true;
1413
1418
  return !!(record.agent_id && record.agent_id.toLowerCase().startsWith(kw));
1414
1419
  }
1420
+ // 1a. An id-shaped keyword (12+ hex, the agent_id format) is an identity
1421
+ // selector too. When that agent is gone (its wrapper exited or restarted
1422
+ // under a new id), the id still sits in every sublane's prompt ("reply: ay
1423
+ // send <id>"), so falling through to the prompt rule would resolve it to
1424
+ // whichever lane quoted it — one such lane and `ay send` misdelivers.
1425
+ if (isAgentIdShaped(keyword)) {
1426
+ return !!(record.agent_id && record.agent_id.toLowerCase().startsWith(kw));
1427
+ }
1415
1428
  // 1b. `.` / `./` — shell convention for "the current directory": target the
1416
1429
  // agent whose cwd IS process.cwd() (exact match). Lets `ay send .` reach the
1417
1430
  // sibling agent running in this same dir without typing its pid or a path
@@ -1604,6 +1617,14 @@ export async function resolveOne(
1604
1617
  }
1605
1618
  const matches = await listRecords(keyword, opts);
1606
1619
  if (matches.length === 0) {
1620
+ if (isAgentIdShaped(keyword)) {
1621
+ const gone = opts.all ? [] : await listRecords(keyword, { ...opts, all: true });
1622
+ throw new Error(
1623
+ `no live agent has id "${keyword}"${gone.length ? ` (pid ${gone[0]!.pid} exited)` : ""} — ` +
1624
+ `it is unknown or stale: an agent whose wrapper restarted gets a new id. ` +
1625
+ `Find the current one with \`ay ls\`; nothing was sent.`,
1626
+ );
1627
+ }
1607
1628
  throw new Error(`no agent matched "${keyword}"`);
1608
1629
  }
1609
1630
  // Exact identity beats fuzzy. A numeric pid or a full agent_id names exactly
@@ -1,13 +0,0 @@
1
- import "./logger-CDIsZ-Pp.js";
2
- import "./JsonlStore-BqF7AQ6E.js";
3
- import "./globalPidIndex-CRH9L9tn.js";
4
- import "./pidStore-DXWqzTSz.js";
5
- import "./messageLog-Brx3w6zT.js";
6
- import "./e2e-z1xpwSAg.js";
7
- import "./configShared-DKTgiz7K.js";
8
- import { $ as renderRawLogLines, A as isExitRequest, B as matchKeyword, C as extractMenu, D as inspectSubmission, E as finalizedLines, F as isUnreachableWriteErrno, G as readComposerState, H as ownedCollapsedPaste, I as isUserTyping, J as readPtysize, K as readLogForRender, L as lastReadAt, M as isSlashCommand, N as isSubcommand, O as isAgentStuck, P as isUnknownManagerToken, Q as renderRawLog, R as lastStdinAt, S as extractBadges, T as extractTaskCounts, U as probeStdinReachable, V as menuSelectKeys, W as readAgentPtysize, X as recentReadEdges, Y as recentMessageEdges, Z as renderLogTailLines, _ as deriveLiveState, a as SEND_BODY_MAX_CHARS, at as sendPayloadCapError, b as envelopeAttribution, c as TYPING_WINDOW_MS, ct as stopTipForCli, d as cliDefaults, dt as writeKeysPaced, et as resolveOne, f as cmdHelp, ft as writeToIpc, g as cwdLabel, h as cursorAbs, i as READ_WINDOW_MS, it as runSubcommand, j as isPidAlive, k as isBareManagerInvocation, l as backoffWhileTyping, lt as submitAndConfirm, m as controlCodeFromName, n as MAX_RENDER_BYTES, nt as resolveResumeArgs, o as SEND_EXIT_QUEUED, ot as snapshotStatus, p as confirmStdinUnreachable, q as readNotes, r as READ_PAGE_DEFAULT, rt as restartHintLines, s as SEND_EXIT_UNREACHABLE, st as stdinActivityPath, t as GRACEFUL_EXIT_COMMANDS, tt as resolveReadWindow, u as buildEnvelope, ut as waitForLogQuiet, v as deriveLiveStatus, w as extractNeedsInput, x as envelopeCostFor, y as drainerLauncher, z as listRecords } from "./subcommands-CFVFLCuJ.js";
9
- import "./notifyStore-2SWKGwZI.js";
10
- import "./webrtcLink-DFRyWNMs.js";
11
- import "./remotes-B4v0Nowo.js";
12
-
13
- export { READ_WINDOW_MS, cmdHelp, isBareManagerInvocation, isSubcommand, isUnknownManagerToken, lastReadAt, runSubcommand };
@@ -1,5 +0,0 @@
1
- import "./versionChecker-pTpboio4.js";
2
- import "./rustBinary-DGb3sdEw.js";
3
- import { a as trayHiddenMarker, i as launchTray, n as hasDesktop, r as isTrayHidden, t as cmdTray } from "./trayApp-wUiHykPM.js";
4
-
5
- export { cmdTray };