agent-yes 1.303.1-beta.786.1 → 1.303.1-beta.787.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/{SUPPORTED_CLIS-BVh0ZtgP.js → SUPPORTED_CLIS-C9MPnGHt.js} +2 -2
  2. package/dist/{SUPPORTED_CLIS-D7WKQjDO.js → SUPPORTED_CLIS-UwUUxomk.js} +3 -3
  3. package/dist/{agentShare-CdyLD881.js → agentShare-jW_mshnD.js} +2 -2
  4. package/dist/{callback-CUNI_et9.js → callback-BnlIPF4B.js} +3 -3
  5. package/dist/{callback-B62xWBOe.js → callback-D8u4ZvyT.js} +2 -2
  6. package/dist/cli.js +5 -5
  7. package/dist/{cmdPs-mWdk73nd.js → cmdPs--8aB4g-o.js} +2 -2
  8. package/dist/index.js +2 -2
  9. package/dist/{notifyDaemon-CphDin-i.js → notifyDaemon-Cal0tYHC.js} +2 -2
  10. package/dist/{parentPingLoop-D-HLYj7R.js → parentPingLoop-WZqVFG2z.js} +2 -2
  11. package/dist/{rustBinary-BwjZgO1K.js → rustBinary-4ixZvINV.js} +2 -2
  12. package/dist/{rustBinary-CCDzbWCA.js → rustBinary-Dhh1ZWR5.js} +2 -2
  13. package/dist/{schedule-CFBKuWRT.js → schedule-CE3WIUI6.js} +4 -4
  14. package/dist/{serve-950j7kR5.js → serve-BPU41VA_.js} +24 -23
  15. package/dist/{serveRust-CbBrcUrg.js → serveRust-Bn-s6FrM.js} +30 -3
  16. package/dist/{setup-DyKq1l88.js → setup-eiVqKPZv.js} +2 -2
  17. package/dist/{shareCmd-CZ_HAdpT.js → shareCmd-COAZhsT9.js} +6 -6
  18. package/dist/{subcommands-BfVi1sd7.js → subcommands-CaWIijIN.js} +16 -16
  19. package/dist/{subcommands-HLrcwhwq.js → subcommands-DKlOpWrV.js} +1 -1
  20. package/dist/{terminal-DAwgHVwQ.js → terminal-CAaFzsvA.js} +2 -2
  21. package/dist/trayApp-CtcB1QpK.js +5 -0
  22. package/dist/{trayApp-CV_d2Ufj.js → trayApp-SIzHtVf-.js} +2 -2
  23. package/dist/{ts-BPP6xmfi.js → ts-CmttrFNs.js} +3 -3
  24. package/dist/{versionChecker-Qho6qsKf.js → versionChecker-BNBtcRYh.js} +2 -2
  25. package/dist/{widget-o1BO92I5.js → widget-Bd_ao0ZN.js} +3 -3
  26. package/dist/{ws-CzAKQ2Rd.js → ws-BBFjZXkH.js} +2 -2
  27. package/dist/{ws-S3E4PXL1.js → ws-BVAt-_jv.js} +2 -2
  28. package/package.json +1 -1
  29. package/ts/serve.ts +8 -1
  30. package/ts/serveRust.spec.ts +29 -2
  31. package/ts/serveRust.ts +27 -2
  32. package/dist/trayApp-B9BmH_BF.js +0 -5
@@ -1,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-BPP6xmfi.js";
1
+ import { t as CLIS_CONFIG } from "./ts-CmttrFNs.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-BVh0ZtgP.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-C9MPnGHt.js.map
@@ -1,12 +1,12 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-Qho6qsKf.js";
3
- import "./ts-BPP6xmfi.js";
2
+ import "./versionChecker-BNBtcRYh.js";
3
+ import "./ts-CmttrFNs.js";
4
4
  import "./todoAutomation-TTp_Qz9G.js";
5
5
  import "./JsonlStore-BpYZZTap.js";
6
6
  import "./globalPidIndex-CRB5KtyL.js";
7
7
  import "./pidStore-433kvh9D.js";
8
8
  import "./messageLog-Dq_ka-Bt.js";
9
9
  import "./todoStore-C9RTz0Vs.js";
10
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BVh0ZtgP.js";
10
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C9MPnGHt.js";
11
11
 
12
12
  export { SUPPORTED_CLIS };
@@ -8,7 +8,7 @@ import "./configShared-De4bR5hH.js";
8
8
  import "./webrtcLink-va_gAR77.js";
9
9
  import "./remotes-DevcBeLl.js";
10
10
  import "./roomReplyAlias-DFqg_6IU.js";
11
- import { nt as resolveOne } from "./subcommands-BfVi1sd7.js";
11
+ import { nt as resolveOne } from "./subcommands-CaWIijIN.js";
12
12
  import "./notifyStore-DIfkfKB2.js";
13
13
  import { l as startShare } from "./share-w5oRbvlj.js";
14
14
 
@@ -233,4 +233,4 @@ function transformEvent(rawEvent, agentId, forwarded) {
233
233
 
234
234
  //#endregion
235
235
  export { createScopedShare, listShares, revokeAllShares, revokeShare };
236
- //# sourceMappingURL=agentShare-CdyLD881.js.map
236
+ //# sourceMappingURL=agentShare-jW_mshnD.js.map
@@ -1,5 +1,5 @@
1
1
  import { t as agentYesHome } from "./agentYesHome-JmJC28YX.js";
2
- import { nt as resolveOne } from "./subcommands-BfVi1sd7.js";
2
+ import { nt as resolveOne } from "./subcommands-CaWIijIN.js";
3
3
  import { a as mintCapability, o as parseExpires } from "./callbackCore-BesbQ6-Z.js";
4
4
  import { randomBytes } from "node:crypto";
5
5
  import { chmodSync, readFileSync, renameSync, writeFileSync } from "node:fs";
@@ -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-950j7kR5.js");
75
+ const { resolveLocalServeUrl } = await import("./serve-BPU41VA_.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-CUNI_et9.js.map
190
+ //# sourceMappingURL=callback-BnlIPF4B.js.map
@@ -8,9 +8,9 @@ import "./configShared-De4bR5hH.js";
8
8
  import "./webrtcLink-va_gAR77.js";
9
9
  import "./remotes-DevcBeLl.js";
10
10
  import "./roomReplyAlias-DFqg_6IU.js";
11
- import "./subcommands-BfVi1sd7.js";
11
+ import "./subcommands-CaWIijIN.js";
12
12
  import "./notifyStore-DIfkfKB2.js";
13
13
  import "./callbackCore-BesbQ6-Z.js";
14
- import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-CUNI_et9.js";
14
+ import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-BnlIPF4B.js";
15
15
 
16
16
  export { cmdCallback };
package/dist/cli.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env bun
2
2
  import { t as invokedCliName } from "./invokedCli-zdFbz1ST.js";
3
3
  import { n as logger } from "./logger-CDIsZ-Pp.js";
4
- import { a as versionString, r as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-Qho6qsKf.js";
5
- import { m as getRustBinary } from "./rustBinary-CCDzbWCA.js";
4
+ import { a as versionString, r as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-BNBtcRYh.js";
5
+ import { m as getRustBinary } from "./rustBinary-Dhh1ZWR5.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-HLrcwhwq.js");
298
+ const { isSubcommand, runSubcommand, cmdHelp, isUnknownManagerToken, isBareManagerInvocation } = await import("./subcommands-DKlOpWrV.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-D7WKQjDO.js");
312
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-UwUUxomk.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-D7WKQjDO.js");
363
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-UwUUxomk.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}`);
@@ -8,7 +8,7 @@ import "./configShared-De4bR5hH.js";
8
8
  import "./webrtcLink-va_gAR77.js";
9
9
  import "./remotes-DevcBeLl.js";
10
10
  import "./roomReplyAlias-DFqg_6IU.js";
11
- import { V as listRecords, bt as flattenForest, v as deriveLiveState, yt as buildAgentForest } from "./subcommands-BfVi1sd7.js";
11
+ import { V as listRecords, bt as flattenForest, v as deriveLiveState, yt as buildAgentForest } from "./subcommands-CaWIijIN.js";
12
12
  import "./notifyStore-DIfkfKB2.js";
13
13
  import { i as systemStats, n as sampleTrees, r as snapshotProcs, t as humanBytes } from "./procStats-BvmrBrOs.js";
14
14
  import yargs from "yargs";
@@ -331,4 +331,4 @@ function readPpidSync(pid) {
331
331
 
332
332
  //#endregion
333
333
  export { cmdPs };
334
- //# sourceMappingURL=cmdPs-mWdk73nd.js.map
334
+ //# sourceMappingURL=cmdPs--8aB4g-o.js.map
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-Qho6qsKf.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-BPP6xmfi.js";
2
+ import "./versionChecker-BNBtcRYh.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-CmttrFNs.js";
4
4
  import { a as renderTree, c as describeBlock, i as renderDigest, l as monitorHint, o as unblockedTasks, r as openBlockers, t as reconcileTodos, u as removeControlCharacters } from "./todoAutomation-TTp_Qz9G.js";
5
5
  import "./JsonlStore-BpYZZTap.js";
6
6
  import "./globalPidIndex-CRB5KtyL.js";
@@ -8,7 +8,7 @@ import "./configShared-De4bR5hH.js";
8
8
  import "./webrtcLink-va_gAR77.js";
9
9
  import "./remotes-DevcBeLl.js";
10
10
  import "./roomReplyAlias-DFqg_6IU.js";
11
- import { $ as renderLogTailLines, N as isPidAlive, V as listRecords, v as deriveLiveState } from "./subcommands-BfVi1sd7.js";
11
+ import { $ as renderLogTailLines, N as isPidAlive, V as listRecords, v as deriveLiveState } from "./subcommands-CaWIijIN.js";
12
12
  import { f as readInbox, g as daemonLockOwnerPath, h as daemonLockDir, i as gcInboxes, l as listInboxParents, m as shouldStealLock, n as appendEvent, s as hostId, u as liveWatchers, x as notifyDir } from "./notifyStore-DIfkfKB2.js";
13
13
  import { mkdir, readFile, rename, rm, stat, writeFile } from "fs/promises";
14
14
  import { randomUUID } from "node:crypto";
@@ -880,4 +880,4 @@ async function ensureDaemon() {
880
880
 
881
881
  //#endregion
882
882
  export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
883
- //# sourceMappingURL=notifyDaemon-CphDin-i.js.map
883
+ //# sourceMappingURL=notifyDaemon-Cal0tYHC.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-HLrcwhwq.js");
341
+ const { lastReadAt, READ_WINDOW_MS } = await import("./subcommands-DKlOpWrV.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-D-HLYj7R.js.map
469
+ //# sourceMappingURL=parentPingLoop-WZqVFG2z.js.map
@@ -1,4 +1,4 @@
1
- import "./versionChecker-Qho6qsKf.js";
2
- import { a as ensureExecutable, c as findSpawnHiddenLauncher, d as getBinDir, f as getBinaryName, h as hasValidMacSignature, i as ensureAyrsBinary, l as findTrayLauncher, m as getRustBinary, n as devBuildInfo, o as findAyrsBinary, p as getDownloadUrl, r as downloadBinary, s as findRustBinary, t as chmodExtractedBinaries, u as gcOldBinaryDirs } from "./rustBinary-CCDzbWCA.js";
1
+ import "./versionChecker-BNBtcRYh.js";
2
+ import { a as ensureExecutable, c as findSpawnHiddenLauncher, d as getBinDir, f as getBinaryName, h as hasValidMacSignature, i as ensureAyrsBinary, l as findTrayLauncher, m as getRustBinary, n as devBuildInfo, o as findAyrsBinary, p as getDownloadUrl, r as downloadBinary, s as findRustBinary, t as chmodExtractedBinaries, u as gcOldBinaryDirs } from "./rustBinary-Dhh1ZWR5.js";
3
3
 
4
4
  export { ensureAyrsBinary, findAyrsBinary, gcOldBinaryDirs };
@@ -1,4 +1,4 @@
1
- import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-Qho6qsKf.js";
1
+ import { i as getInstalledPackage, n as compareVersions } from "./versionChecker-BNBtcRYh.js";
2
2
  import { execFileSync } from "child_process";
3
3
  import { accessSync, chmodSync, constants, existsSync, mkdirSync, readdirSync, rmSync, statSync, unlinkSync } from "fs";
4
4
  import { chmod, copyFile } from "fs/promises";
@@ -435,4 +435,4 @@ async function getRustBinary(options = {}) {
435
435
 
436
436
  //#endregion
437
437
  export { ensureExecutable as a, findSpawnHiddenLauncher as c, getBinDir as d, getBinaryName as f, hasValidMacSignature as h, ensureAyrsBinary as i, findTrayLauncher as l, getRustBinary as m, devBuildInfo as n, findAyrsBinary as o, getDownloadUrl as p, downloadBinary as r, findRustBinary as s, chmodExtractedBinaries as t, gcOldBinaryDirs as u };
438
- //# sourceMappingURL=rustBinary-CCDzbWCA.js.map
438
+ //# sourceMappingURL=rustBinary-Dhh1ZWR5.js.map
@@ -1,13 +1,13 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-Qho6qsKf.js";
3
- import "./ts-BPP6xmfi.js";
2
+ import "./versionChecker-BNBtcRYh.js";
3
+ import "./ts-CmttrFNs.js";
4
4
  import "./todoAutomation-TTp_Qz9G.js";
5
5
  import "./JsonlStore-BpYZZTap.js";
6
6
  import "./globalPidIndex-CRB5KtyL.js";
7
7
  import "./pidStore-433kvh9D.js";
8
8
  import "./messageLog-Dq_ka-Bt.js";
9
9
  import "./todoStore-C9RTz0Vs.js";
10
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BVh0ZtgP.js";
10
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C9MPnGHt.js";
11
11
  import { f as resolveSpawnCwd } from "./workspaceConfig-BLWB5Wu9.js";
12
12
  import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-DGMQRTGT.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-CFBKuWRT.js.map
157
+ //# sourceMappingURL=schedule-CE3WIUI6.js.map
@@ -1,7 +1,7 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import { i as getInstalledPackage } from "./versionChecker-Qho6qsKf.js";
3
- import { c as findSpawnHiddenLauncher } from "./rustBinary-CCDzbWCA.js";
4
- import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-BPP6xmfi.js";
2
+ import { i as getInstalledPackage } from "./versionChecker-BNBtcRYh.js";
3
+ import { c as findSpawnHiddenLauncher } from "./rustBinary-Dhh1ZWR5.js";
4
+ import { c as permissionBadge, i as answerAsk, o as listAsks, u as CLAUDE_SESSION_PIN_ENV } from "./ts-CmttrFNs.js";
5
5
  import { t as agentYesHome$1 } from "./agentYesHome-JmJC28YX.js";
6
6
  import { u as removeControlCharacters } from "./todoAutomation-TTp_Qz9G.js";
7
7
  import "./JsonlStore-BpYZZTap.js";
@@ -12,20 +12,20 @@ import { t as pgidForWrapper } from "./reaper-C2cuougX.js";
12
12
  import "./todoStore-C9RTz0Vs.js";
13
13
  import "./e2e-BdLf8DvY.js";
14
14
  import "./configShared-De4bR5hH.js";
15
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BVh0ZtgP.js";
15
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-C9MPnGHt.js";
16
16
  import { i as isWebrtcSpec, o as toWebrtcUrl } from "./webrtcLink-va_gAR77.js";
17
17
  import "./remotes-DevcBeLl.js";
18
18
  import "./roomReplyAlias-DFqg_6IU.js";
19
- import { $ as renderLogTailLines, C as extractBadges, E as extractTaskCounts, J as readLogForRender, P as isSlashCommand, Q as recentReadEdges, R as isUserTyping, T as extractNeedsInput, V as listRecords, X as readPtysize, Y as readNotes, Z as recentMessageEdges, _t as shouldFramePaste, ct as snapshotStatus, et as renderRawLog, f as cliDefaults, gt as framePaste, h as controlCodeFromName, ht as withIpcLock, mt as writeToIpc, nt as resolveOne, tt as renderRawLogLines, vt as TYPING_BADGE, y as deriveLiveStatus } from "./subcommands-BfVi1sd7.js";
19
+ import { $ as renderLogTailLines, C as extractBadges, E as extractTaskCounts, J as readLogForRender, P as isSlashCommand, Q as recentReadEdges, R as isUserTyping, T as extractNeedsInput, V as listRecords, X as readPtysize, Y as readNotes, Z as recentMessageEdges, _t as shouldFramePaste, ct as snapshotStatus, et as renderRawLog, f as cliDefaults, gt as framePaste, h as controlCodeFromName, ht as withIpcLock, mt as writeToIpc, nt as resolveOne, tt as renderRawLogLines, vt as TYPING_BADGE, y as deriveLiveStatus } from "./subcommands-CaWIijIN.js";
20
20
  import { c as isTransientLockMkdirError } from "./notifyStore-DIfkfKB2.js";
21
21
  import { i as frameVisitorMessage, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-BesbQ6-Z.js";
22
- import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-CUNI_et9.js";
22
+ import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-BnlIPF4B.js";
23
23
  import { n as sampleTrees } from "./procStats-BvmrBrOs.js";
24
24
  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-BLWB5Wu9.js";
25
25
  import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-DGMQRTGT.js";
26
- import { i as importProvisionModule } from "./ws-CzAKQ2Rd.js";
26
+ import { i as importProvisionModule } from "./ws-BBFjZXkH.js";
27
27
  import { r as spawnRejectionReason } from "./spawnGate-lr3tvA6U.js";
28
- import { i as launchTray } from "./trayApp-CV_d2Ufj.js";
28
+ import { i as launchTray } from "./trayApp-SIzHtVf-.js";
29
29
  import yargs from "yargs";
30
30
  import { appendFile, mkdir, open, readFile, readdir, rename, rm, stat, unlink, writeFile } from "fs/promises";
31
31
  import { arch, cpus, freemem, homedir, hostname, loadavg, platform, totalmem, uptime, userInfo } from "os";
@@ -1344,8 +1344,8 @@ async function warnStrayServeProcesses() {
1344
1344
  process.stderr.write(`warning: ${stray.length} unmanaged ay serve process(es) running (pid ${pids.join(", ")}) — they will fight the daemon for the WebRTC room; stop them: kill ${pids.join(" ")}\n`);
1345
1345
  }
1346
1346
  async function daemonShareRuntime(args) {
1347
- const { daemonShareRuntime: decide } = await import("./serveRust-CbBrcUrg.js");
1348
- const { findAyrsBinary } = await import("./rustBinary-BwjZgO1K.js");
1347
+ const { daemonShareRuntime: decide } = await import("./serveRust-Bn-s6FrM.js");
1348
+ const { findAyrsBinary } = await import("./rustBinary-4ixZvINV.js");
1349
1349
  return decide(args, () => !!findAyrsBinary());
1350
1350
  }
1351
1351
  function explicitWebrtcUrl(args) {
@@ -1643,7 +1643,7 @@ async function cmdServeStatus(args) {
1643
1643
  const token = await loadTokenReadOnly();
1644
1644
  const daemonArgs = mgr ? await readDaemonServeArgs(mgr) : null;
1645
1645
  const installed = daemonArgs !== null;
1646
- const { daemonShareLink, foregroundAyrsShareLink } = await import("./shareCmd-CZ_HAdpT.js");
1646
+ const { daemonShareLink, foregroundAyrsShareLink } = await import("./shareCmd-COAZhsT9.js");
1647
1647
  const shareLink = (installed ? await daemonShareLink(daemonArgs) : await foregroundAyrsShareLink()) ?? await readShareLink();
1648
1648
  const running = installed ? await readDaemonRunning(mgr) : false;
1649
1649
  const a = daemonArgs ?? [];
@@ -1774,17 +1774,17 @@ Options:
1774
1774
  return 0;
1775
1775
  }
1776
1776
  {
1777
- const { planRustServe } = await import("./serveRust-CbBrcUrg.js");
1777
+ const { planRustServe, SERVE_SUBCOMMANDS } = await import("./serveRust-Bn-s6FrM.js");
1778
1778
  const plan = planRustServe(rest);
1779
1779
  if (plan.kind === "rust-only") {
1780
- const { ensureAyrsBinary } = await import("./rustBinary-BwjZgO1K.js");
1780
+ const { ensureAyrsBinary } = await import("./rustBinary-4ixZvINV.js");
1781
1781
  const ayrs = await ensureAyrsBinary();
1782
1782
  if (ayrs) return runAyrsServe(ayrs, plan.argv);
1783
1783
  process.stderr.write(`ay serve: ${plan.feature} needs the Rust daemon (ayrs), which was not found (bun run build:rs, or reinstall)\n`);
1784
1784
  return 1;
1785
1785
  }
1786
1786
  if (plan.kind === "rust") {
1787
- const { ensureAyrsBinary } = await import("./rustBinary-BwjZgO1K.js");
1787
+ const { ensureAyrsBinary } = await import("./rustBinary-4ixZvINV.js");
1788
1788
  const ayrs = await ensureAyrsBinary();
1789
1789
  if (ayrs) return runAyrsServe(ayrs, plan.argv);
1790
1790
  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");
@@ -1794,6 +1794,7 @@ Options:
1794
1794
  process.stderr.write(`ay serve: ${plan.reason}: joining rooms needs the Rust daemon\n`);
1795
1795
  return 1;
1796
1796
  }
1797
+ if (!(plan.reason === "--no-rust" || plan.reason === "AGENT_YES_NO_RUST=1") && !SERVE_SUBCOMMANDS.has(rest[0] ?? "")) process.stderr.write(`ay serve: running the TypeScript server (${plan.reason})\n`);
1797
1798
  }
1798
1799
  }
1799
1800
  const sub = rest[0];
@@ -2765,7 +2766,7 @@ Options:
2765
2766
  }
2766
2767
  });
2767
2768
  if (req.method === "GET" && p === "/api/ws") {
2768
- const ws = await import("./ws-S3E4PXL1.js");
2769
+ const ws = await import("./ws-BVAt-_jv.js");
2769
2770
  try {
2770
2771
  await ws.loadProvision();
2771
2772
  } catch (e) {
@@ -2785,7 +2786,7 @@ Options:
2785
2786
  if (req.method === "GET" && p === "/api/ws/status") {
2786
2787
  const dirRaw = url.searchParams.get("path");
2787
2788
  if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
2788
- const ws = await import("./ws-S3E4PXL1.js");
2789
+ const ws = await import("./ws-BVAt-_jv.js");
2789
2790
  let prov;
2790
2791
  try {
2791
2792
  prov = await ws.loadProvision();
@@ -2807,7 +2808,7 @@ Options:
2807
2808
  }
2808
2809
  }
2809
2810
  if (req.method === "GET" && p === "/api/ws/repos") {
2810
- const ws = await import("./ws-S3E4PXL1.js");
2811
+ const ws = await import("./ws-BVAt-_jv.js");
2811
2812
  try {
2812
2813
  await ws.loadProvision();
2813
2814
  } catch (e) {
@@ -2888,7 +2889,7 @@ Options:
2888
2889
  const m = /^([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/.exec(repoParam);
2889
2890
  if (!m || m[1] === "." || m[1] === ".." || m[2] === "." || m[2] === "..") return new Response("missing/invalid ?repo=<owner>/<repo>", { status: 400 });
2890
2891
  const [, owner, repo] = m;
2891
- const ws = await import("./ws-S3E4PXL1.js");
2892
+ const ws = await import("./ws-BVAt-_jv.js");
2892
2893
  let prov;
2893
2894
  try {
2894
2895
  prov = await ws.loadProvision();
@@ -3812,7 +3813,7 @@ Options:
3812
3813
  const perm = body.perm ?? "r";
3813
3814
  if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
3814
3815
  try {
3815
- const { createScopedShare } = await import("./agentShare-CdyLD881.js");
3816
+ const { createScopedShare } = await import("./agentShare-jW_mshnD.js");
3816
3817
  const share = await createScopedShare({
3817
3818
  agent: body.agent,
3818
3819
  perm,
@@ -3827,12 +3828,12 @@ Options:
3827
3828
  }
3828
3829
  }
3829
3830
  if (req.method === "GET" && p === "/api/shares") {
3830
- const { listShares } = await import("./agentShare-CdyLD881.js");
3831
+ const { listShares } = await import("./agentShare-jW_mshnD.js");
3831
3832
  return Response.json(listShares());
3832
3833
  }
3833
3834
  const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
3834
3835
  if (req.method === "DELETE" && revokeM) {
3835
- const { revokeShare } = await import("./agentShare-CdyLD881.js");
3836
+ const { revokeShare } = await import("./agentShare-jW_mshnD.js");
3836
3837
  const ok = revokeShare(decodeURIComponent(revokeM[1]));
3837
3838
  return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
3838
3839
  }
@@ -4144,7 +4145,7 @@ Options:
4144
4145
  const shutdown = (resolve) => {
4145
4146
  if (heartbeat) clearInterval(heartbeat);
4146
4147
  closeShare?.();
4147
- import("./agentShare-CdyLD881.js").then((m) => m.revokeAllShares()).catch(() => {});
4148
+ import("./agentShare-jW_mshnD.js").then((m) => m.revokeAllShares()).catch(() => {});
4148
4149
  server?.stop();
4149
4150
  Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
4150
4151
  };
@@ -4157,4 +4158,4 @@ Options:
4157
4158
 
4158
4159
  //#endregion
4159
4160
  export { cmdServe, inspectServeDaemon, loadTokenReadOnly, mintScopedTermToken, resolveDaemonHttpBase, resolveLocalServeUrl };
4160
- //# sourceMappingURL=serve-950j7kR5.js.map
4161
+ //# sourceMappingURL=serve-BPU41VA_.js.map
@@ -20,6 +20,10 @@ import { o as toWebrtcUrl } from "./webrtcLink-va_gAR77.js";
20
20
  * join-secret (print the link + join secret members need; ayrs only)
21
21
  * --port <n> / --port=<n> (loopback HTTP console; 0 = free port)
22
22
  * --sighost <host> / --sighost=<host>
23
+ * --http (with --port: ayrs's --port listener IS the HTTP
24
+ * console, so the flag is implied and dropped)
25
+ * --host <loopback> (with --port: 127.0.0.1 / localhost / ::1 — ayrs
26
+ * binds loopback anyway, so the flag is dropped)
23
27
  *
24
28
  * What stays on TypeScript, with the reason printed:
25
29
  * - `--no-rust` / AGENT_YES_NO_RUST=1 (explicit opt-out)
@@ -28,7 +32,8 @@ import { o as toWebrtcUrl } from "./webrtcLink-va_gAR77.js";
28
32
  * - the daemon subcommands (install/uninstall/status/logs/start/stop/
29
33
  * healthcheck) and -d/--daemon: ayrs has its own OS-supervisor install and
30
34
  * the two must not manage each other's registration
31
- * - --share (http+webrtc over Portless), --http, --host, --token, --tls-*,
35
+ * - --share (http+webrtc over Portless), --http without --port (Portless),
36
+ * a non-loopback --host (ayrs listens on loopback only), --token, --tls-*,
32
37
  * --local
33
38
  */
34
39
  /** Subcommands `ay serve` dispatches before flag parsing — never delegated. */
@@ -41,6 +46,11 @@ const SERVE_SUBCOMMANDS = new Set([
41
46
  "stop",
42
47
  "healthcheck"
43
48
  ]);
49
+ const LOOPBACK_HOSTS = new Set([
50
+ "127.0.0.1",
51
+ "localhost",
52
+ "::1"
53
+ ]);
44
54
  /**
45
55
  * Decide whether `rest` (the argv after `serve`) can run as `ayrs serve`.
46
56
  * Returns the ayrs argv (without the program) or the TS fallback with its
@@ -86,6 +96,7 @@ function planRustServe(rest, env = process.env) {
86
96
  reason: `\`ay serve ${first}\``,
87
97
  rest
88
98
  };
99
+ const hasPort = rest.some((a) => a === "--port" || a.startsWith("--port="));
89
100
  const argv = ["serve"];
90
101
  for (let i = 0; i < rest.length; i++) {
91
102
  const a = rest[i];
@@ -131,6 +142,22 @@ function planRustServe(rest, env = process.env) {
131
142
  argv.push("--port", v);
132
143
  break;
133
144
  }
145
+ case "--http":
146
+ if (inline !== void 0 || !hasPort) return {
147
+ kind: "ts",
148
+ reason: `${a} without --port (Portless HTTPS console)`,
149
+ rest
150
+ };
151
+ break;
152
+ case "--host": {
153
+ const v = takeNext();
154
+ if (v === void 0 || !LOOPBACK_HOSTS.has(v) || !hasPort) return {
155
+ kind: "ts",
156
+ reason: `--host ${v ?? "(missing)"} (ayrs listens on loopback only)`,
157
+ rest
158
+ };
159
+ break;
160
+ }
134
161
  case "--sighost": {
135
162
  const v = takeNext();
136
163
  if (v === void 0) return {
@@ -181,5 +208,5 @@ function daemonShareRuntime(args, hasAyrs, env = process.env) {
181
208
  }
182
209
 
183
210
  //#endregion
184
- export { daemonShareRuntime, planRustServe };
185
- //# sourceMappingURL=serveRust-CbBrcUrg.js.map
211
+ export { SERVE_SUBCOMMANDS, daemonShareRuntime, planRustServe };
212
+ //# sourceMappingURL=serveRust-Bn-s6FrM.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-950j7kR5.js");
100
+ const { cmdServe } = await import("./serve-BPU41VA_.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-DyKq1l88.js.map
110
+ //# sourceMappingURL=setup-eiVqKPZv.js.map
@@ -243,8 +243,8 @@ 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 shareRuntimeOf(args) {
246
- const { daemonShareRuntime } = await import("./serveRust-CbBrcUrg.js");
247
- const { findAyrsBinary } = await import("./rustBinary-BwjZgO1K.js");
246
+ const { daemonShareRuntime } = await import("./serveRust-Bn-s6FrM.js");
247
+ const { findAyrsBinary } = await import("./rustBinary-4ixZvINV.js");
248
248
  return daemonShareRuntime(args ?? [], () => !!findAyrsBinary());
249
249
  }
250
250
  async function daemonShareLink(args) {
@@ -260,7 +260,7 @@ async function daemonShareLink(args) {
260
260
  async function foregroundAyrsShareLink() {
261
261
  const { readShareRoom, shareLinkFromRoomUrl } = await import("./share-DrS3LYqf.js");
262
262
  const { parseWebrtcLink } = await import("./webrtcLink-SsInrVHU.js");
263
- const { isPidAlive } = await import("./subcommands-HLrcwhwq.js");
263
+ const { isPidAlive } = await import("./subcommands-DKlOpWrV.js");
264
264
  const { agentYesHome } = await import("./agentYesHome-CYNNNP71.js");
265
265
  const { readFile } = await import("fs/promises");
266
266
  const path = await import("path");
@@ -276,7 +276,7 @@ async function foregroundAyrsShareLink() {
276
276
  }
277
277
  }
278
278
  async function cmdShareStatus(mount) {
279
- const { inspectServeDaemon } = await import("./serve-950j7kR5.js");
279
+ const { inspectServeDaemon } = await import("./serve-BPU41VA_.js");
280
280
  const [d, ts] = await Promise.all([inspectServeDaemon(), detectTailscale()]);
281
281
  const line = (k, v) => process.stdout.write(`${k.padEnd(11)}${v}\n`);
282
282
  if (d.args === null) {
@@ -323,7 +323,7 @@ async function cmdShare(rest) {
323
323
  process.stderr.write(`ay share: unknown mode '${mode}' — one of ${SHARE_MODES.join(", ")}\n`);
324
324
  return 1;
325
325
  }
326
- const { inspectServeDaemon, cmdServe } = await import("./serve-950j7kR5.js");
326
+ const { inspectServeDaemon, cmdServe } = await import("./serve-BPU41VA_.js");
327
327
  const [daemon, ts] = await Promise.all([inspectServeDaemon(), detectTailscale()]);
328
328
  const lanIp = pickLanIp(networkInterfaces());
329
329
  if (!mode) {
@@ -448,4 +448,4 @@ async function cmdShare(rest) {
448
448
 
449
449
  //#endregion
450
450
  export { cmdShare, daemonShareLink, foregroundAyrsShareLink };
451
- //# sourceMappingURL=shareCmd-CZ_HAdpT.js.map
451
+ //# sourceMappingURL=shareCmd-COAZhsT9.js.map
@@ -2145,7 +2145,7 @@ async function runSubcommand(argv) {
2145
2145
  switch (sub) {
2146
2146
  case "ls":
2147
2147
  case "list": return await cmdLs(rest);
2148
- case "ps": return await (await import("./cmdPs-mWdk73nd.js")).cmdPs(rest);
2148
+ case "ps": return await (await import("./cmdPs--8aB4g-o.js")).cmdPs(rest);
2149
2149
  case "status": return await cmdStatus(rest);
2150
2150
  case "whoami": return await cmdWhoami(rest);
2151
2151
  case "result": return await cmdResult(rest);
@@ -2194,35 +2194,35 @@ async function runSubcommand(argv) {
2194
2194
  return cmdCh(rest);
2195
2195
  }
2196
2196
  case "term": {
2197
- const { cmdTerm } = await import("./terminal-DAwgHVwQ.js");
2197
+ const { cmdTerm } = await import("./terminal-CAaFzsvA.js");
2198
2198
  return cmdTerm(rest);
2199
2199
  }
2200
2200
  case "widget": {
2201
- const { cmdWidget } = await import("./widget-o1BO92I5.js");
2201
+ const { cmdWidget } = await import("./widget-Bd_ao0ZN.js");
2202
2202
  return cmdWidget(rest);
2203
2203
  }
2204
2204
  case "mint": {
2205
- const { cmdMint } = await import("./widget-o1BO92I5.js");
2205
+ const { cmdMint } = await import("./widget-Bd_ao0ZN.js");
2206
2206
  return cmdMint(rest);
2207
2207
  }
2208
2208
  case "serve": {
2209
- const { cmdServe } = await import("./serve-950j7kR5.js");
2209
+ const { cmdServe } = await import("./serve-BPU41VA_.js");
2210
2210
  return cmdServe(rest);
2211
2211
  }
2212
2212
  case "tray": {
2213
- const { cmdTray } = await import("./trayApp-B9BmH_BF.js");
2213
+ const { cmdTray } = await import("./trayApp-CtcB1QpK.js");
2214
2214
  return cmdTray(rest);
2215
2215
  }
2216
2216
  case "setup": {
2217
- const { cmdSetup } = await import("./setup-DyKq1l88.js");
2217
+ const { cmdSetup } = await import("./setup-eiVqKPZv.js");
2218
2218
  return cmdSetup(rest);
2219
2219
  }
2220
2220
  case "ws": {
2221
- const { cmdWs } = await import("./ws-S3E4PXL1.js");
2221
+ const { cmdWs } = await import("./ws-BVAt-_jv.js");
2222
2222
  return cmdWs(rest);
2223
2223
  }
2224
2224
  case "schedule": {
2225
- const { cmdSchedule } = await import("./schedule-CFBKuWRT.js");
2225
+ const { cmdSchedule } = await import("./schedule-CE3WIUI6.js");
2226
2226
  return cmdSchedule(rest);
2227
2227
  }
2228
2228
  case "remote": {
@@ -2230,7 +2230,7 @@ async function runSubcommand(argv) {
2230
2230
  return cmdRemote(rest);
2231
2231
  }
2232
2232
  case "share": {
2233
- const { cmdShare } = await import("./shareCmd-CZ_HAdpT.js");
2233
+ const { cmdShare } = await import("./shareCmd-COAZhsT9.js");
2234
2234
  return cmdShare(rest);
2235
2235
  }
2236
2236
  case "connect": {
@@ -2242,7 +2242,7 @@ async function runSubcommand(argv) {
2242
2242
  return cmdExpose(rest);
2243
2243
  }
2244
2244
  case "callback": {
2245
- const { cmdCallback } = await import("./callback-B62xWBOe.js");
2245
+ const { cmdCallback } = await import("./callback-D8u4ZvyT.js");
2246
2246
  return cmdCallback(rest);
2247
2247
  }
2248
2248
  case "reap":
@@ -2253,7 +2253,7 @@ async function runSubcommand(argv) {
2253
2253
  return await cmdDsh(rest);
2254
2254
  }
2255
2255
  case "gc": {
2256
- const { gcOldBinaryDirs } = await import("./rustBinary-BwjZgO1K.js");
2256
+ const { gcOldBinaryDirs } = await import("./rustBinary-4ixZvINV.js");
2257
2257
  const { gcLogs } = await import("./globalPidIndex-BftWlg2V.js");
2258
2258
  const bins = gcOldBinaryDirs();
2259
2259
  const logs = await gcLogs();
@@ -6013,7 +6013,7 @@ async function cmdAttach(rest) {
6013
6013
  const winsizeDir = path.join(ayHome, "winsize");
6014
6014
  await mkdir(winsizeDir, { recursive: true });
6015
6015
  const winsizePath = path.join(winsizeDir, String(record.pid));
6016
- const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-950j7kR5.js");
6016
+ const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-BPU41VA_.js");
6017
6017
  const daemonBase = await resolveDaemonHttpBase().catch(() => null);
6018
6018
  const daemonToken = daemonBase ? await loadTokenReadOnly().catch(() => null) ?? "" : "";
6019
6019
  const capViewer = `attach:${process.pid}`;
@@ -6762,7 +6762,7 @@ async function cmdNotify(rest) {
6762
6762
  }
6763
6763
  const ensure = async () => {
6764
6764
  if (!argv["ensure-daemon"]) return;
6765
- const { ensureDaemon } = await import("./notifyDaemon-CphDin-i.js");
6765
+ const { ensureDaemon } = await import("./notifyDaemon-Cal0tYHC.js");
6766
6766
  await ensureDaemon().catch(() => null);
6767
6767
  };
6768
6768
  await heartbeatWatcher(parent, selfStartedAt);
@@ -6836,7 +6836,7 @@ async function cmdNotifyCursor(args) {
6836
6836
  }
6837
6837
  async function cmdNotifyd(rest) {
6838
6838
  const sub = rest[0] ?? "status";
6839
- const daemon = await import("./notifyDaemon-CphDin-i.js");
6839
+ const daemon = await import("./notifyDaemon-Cal0tYHC.js");
6840
6840
  switch (sub) {
6841
6841
  case "run": return daemon.runDaemon();
6842
6842
  case "once": return daemon.runDaemon({ once: true });
@@ -6863,4 +6863,4 @@ async function cmdNotifyd(rest) {
6863
6863
 
6864
6864
  //#endregion
6865
6865
  export { renderLogTailLines as $, isAgentStuck as A, lastStdinAt as B, extractBadges as C, finalizedLines as D, extractTaskCounts as E, isSubcommand as F, probeStdinReachable as G, matchKeyword as H, isUnknownManagerToken as I, readLogForRender as J, readAgentPtysize as K, isUnreachableWriteErrno as L, isExitRequest as M, isPidAlive as N, inspectSubmission as O, isSlashCommand as P, recentReadEdges as Q, isUserTyping as R, envelopeCostFor as S, extractNeedsInput as T, menuSelectKeys as U, listRecords as V, ownedCollapsedPaste as W, readPtysize as X, readNotes as Y, recentMessageEdges as Z, cwdLabel as _, shouldFramePaste as _t, READ_WINDOW_MS as a, restartHintLines as at, drainerLauncher as b, flattenForest as bt, SEND_EXIT_UNREACHABLE as c, snapshotStatus as ct, buildEnvelope as d, submitAndConfirm as dt, renderRawLog as et, cliDefaults as f, waitForLogQuiet as ft, cursorAbs as g, framePaste as gt, controlCodeFromName as h, withIpcLock as ht, READ_PAGE_DEFAULT as i, resolveResumeArgs as it, isBareManagerInvocation as j, isAgentIdShaped as k, TYPING_WINDOW_MS as l, stdinActivityPath as lt, confirmStdinUnreachable as m, writeToIpc as mt, GRACEFUL_EXIT_COMMANDS as n, resolveOne as nt, SEND_BODY_MAX_CHARS as o, runSubcommand as ot, cmdHelp as p, writeKeysPaced as pt, readComposerState as q, MAX_RENDER_BYTES as r, resolveReadWindow as rt, SEND_EXIT_QUEUED as s, sendPayloadCapError as st, COMPOSER_WINDOWS as t, renderRawLogLines as tt, backoffWhileTyping as u, stopTipForCli as ut, deriveLiveState as v, TYPING_BADGE as vt, extractMenu as w, envelopeAttribution as x, deriveLiveStatus as y, buildAgentForest as yt, lastReadAt as z };
6866
- //# sourceMappingURL=subcommands-BfVi1sd7.js.map
6866
+ //# sourceMappingURL=subcommands-CaWIijIN.js.map
@@ -8,7 +8,7 @@ import "./configShared-De4bR5hH.js";
8
8
  import "./webrtcLink-va_gAR77.js";
9
9
  import "./remotes-DevcBeLl.js";
10
10
  import "./roomReplyAlias-DFqg_6IU.js";
11
- import { $ as renderLogTailLines, A as isAgentStuck, B as lastStdinAt, C as extractBadges, D as finalizedLines, E as extractTaskCounts, F as isSubcommand, G as probeStdinReachable, H as matchKeyword, I as isUnknownManagerToken, J as readLogForRender, K as readAgentPtysize, L as isUnreachableWriteErrno, M as isExitRequest, N as isPidAlive, O as inspectSubmission, P as isSlashCommand, Q as recentReadEdges, R as isUserTyping, S as envelopeCostFor, T as extractNeedsInput, U as menuSelectKeys, V as listRecords, W as ownedCollapsedPaste, X as readPtysize, Y as readNotes, Z as recentMessageEdges, _ as cwdLabel, a as READ_WINDOW_MS, at as restartHintLines, b as drainerLauncher, c as SEND_EXIT_UNREACHABLE, ct as snapshotStatus, d as buildEnvelope, dt as submitAndConfirm, et as renderRawLog, f as cliDefaults, ft as waitForLogQuiet, g as cursorAbs, h as controlCodeFromName, i as READ_PAGE_DEFAULT, it as resolveResumeArgs, j as isBareManagerInvocation, k as isAgentIdShaped, l as TYPING_WINDOW_MS, lt as stdinActivityPath, m as confirmStdinUnreachable, mt as writeToIpc, n as GRACEFUL_EXIT_COMMANDS, nt as resolveOne, o as SEND_BODY_MAX_CHARS, ot as runSubcommand, p as cmdHelp, pt as writeKeysPaced, q as readComposerState, r as MAX_RENDER_BYTES, rt as resolveReadWindow, s as SEND_EXIT_QUEUED, st as sendPayloadCapError, t as COMPOSER_WINDOWS, tt as renderRawLogLines, u as backoffWhileTyping, ut as stopTipForCli, v as deriveLiveState, w as extractMenu, x as envelopeAttribution, y as deriveLiveStatus, z as lastReadAt } from "./subcommands-BfVi1sd7.js";
11
+ import { $ as renderLogTailLines, A as isAgentStuck, B as lastStdinAt, C as extractBadges, D as finalizedLines, E as extractTaskCounts, F as isSubcommand, G as probeStdinReachable, H as matchKeyword, I as isUnknownManagerToken, J as readLogForRender, K as readAgentPtysize, L as isUnreachableWriteErrno, M as isExitRequest, N as isPidAlive, O as inspectSubmission, P as isSlashCommand, Q as recentReadEdges, R as isUserTyping, S as envelopeCostFor, T as extractNeedsInput, U as menuSelectKeys, V as listRecords, W as ownedCollapsedPaste, X as readPtysize, Y as readNotes, Z as recentMessageEdges, _ as cwdLabel, a as READ_WINDOW_MS, at as restartHintLines, b as drainerLauncher, c as SEND_EXIT_UNREACHABLE, ct as snapshotStatus, d as buildEnvelope, dt as submitAndConfirm, et as renderRawLog, f as cliDefaults, ft as waitForLogQuiet, g as cursorAbs, h as controlCodeFromName, i as READ_PAGE_DEFAULT, it as resolveResumeArgs, j as isBareManagerInvocation, k as isAgentIdShaped, l as TYPING_WINDOW_MS, lt as stdinActivityPath, m as confirmStdinUnreachable, mt as writeToIpc, n as GRACEFUL_EXIT_COMMANDS, nt as resolveOne, o as SEND_BODY_MAX_CHARS, ot as runSubcommand, p as cmdHelp, pt as writeKeysPaced, q as readComposerState, r as MAX_RENDER_BYTES, rt as resolveReadWindow, s as SEND_EXIT_QUEUED, st as sendPayloadCapError, t as COMPOSER_WINDOWS, tt as renderRawLogLines, u as backoffWhileTyping, ut as stopTipForCli, v as deriveLiveState, w as extractMenu, x as envelopeAttribution, y as deriveLiveStatus, z as lastReadAt } from "./subcommands-CaWIijIN.js";
12
12
  import "./notifyStore-DIfkfKB2.js";
13
13
 
14
14
  export { READ_WINDOW_MS, cmdHelp, isBareManagerInvocation, isPidAlive, isSubcommand, isUnknownManagerToken, lastReadAt, runSubcommand };
@@ -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-950j7kR5.js");
101
+ const { mintScopedTermToken } = await import("./serve-BPU41VA_.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-DAwgHVwQ.js.map
138
+ //# sourceMappingURL=terminal-CAaFzsvA.js.map
@@ -0,0 +1,5 @@
1
+ import "./versionChecker-BNBtcRYh.js";
2
+ import "./rustBinary-Dhh1ZWR5.js";
3
+ import { a as trayHiddenMarker, i as launchTray, n as hasDesktop, r as isTrayHidden, t as cmdTray } from "./trayApp-SIzHtVf-.js";
4
+
5
+ export { cmdTray };
@@ -1,4 +1,4 @@
1
- import { l as findTrayLauncher } from "./rustBinary-CCDzbWCA.js";
1
+ import { l as findTrayLauncher } from "./rustBinary-Dhh1ZWR5.js";
2
2
  import { t as agentYesHome } from "./agentYesHome-JmJC28YX.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-CV_d2Ufj.js.map
100
+ //# sourceMappingURL=trayApp-SIzHtVf-.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-Qho6qsKf.js";
3
+ import { i as getInstalledPackage } from "./versionChecker-BNBtcRYh.js";
4
4
  import { t as agentYesHome } from "./agentYesHome-JmJC28YX.js";
5
5
  import { u as removeControlCharacters } from "./todoAutomation-TTp_Qz9G.js";
6
6
  import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-DMznYh45.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-D-HLYj7R.js");
2089
+ const { startParentPingLoop } = await import("./parentPingLoop-WZqVFG2z.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-BPP6xmfi.js.map
2352
+ //# sourceMappingURL=ts-CmttrFNs.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.303.1-beta.786.1";
10
+ var version = "1.303.1-beta.787.1";
11
11
 
12
12
  //#endregion
13
13
  //#region ts/versionChecker.ts
@@ -285,4 +285,4 @@ async function displayVersion() {
285
285
 
286
286
  //#endregion
287
287
  export { versionString as a, getInstalledPackage as i, compareVersions as n, displayVersion as r, checkAndAutoUpdate as t };
288
- //# sourceMappingURL=versionChecker-Qho6qsKf.js.map
288
+ //# sourceMappingURL=versionChecker-BNBtcRYh.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-950j7kR5.js");
31
+ const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-BPU41VA_.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-950j7kR5.js");
189
+ const { mintScopedTermToken } = await import("./serve-BPU41VA_.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-o1BO92I5.js.map
205
+ //# sourceMappingURL=widget-Bd_ao0ZN.js.map
@@ -1,4 +1,4 @@
1
- import { V as listRecords } from "./subcommands-BfVi1sd7.js";
1
+ import { V as listRecords } from "./subcommands-CaWIijIN.js";
2
2
  import { a as getProvisionRoot } from "./workspaceConfig-BLWB5Wu9.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-CzAKQ2Rd.js.map
427
+ //# sourceMappingURL=ws-BBFjZXkH.js.map
@@ -8,8 +8,8 @@ import "./configShared-De4bR5hH.js";
8
8
  import "./webrtcLink-va_gAR77.js";
9
9
  import "./remotes-DevcBeLl.js";
10
10
  import "./roomReplyAlias-DFqg_6IU.js";
11
- import "./subcommands-BfVi1sd7.js";
11
+ import "./subcommands-CaWIijIN.js";
12
12
  import "./notifyStore-DIfkfKB2.js";
13
- 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-CzAKQ2Rd.js";
13
+ 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-BBFjZXkH.js";
14
14
 
15
15
  export { WS_JSON_SCHEMA, cmdWs, collectWorkspaces, isPathInside, loadProvision, walkWorkspaces, workspaceStatus };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-yes",
3
- "version": "1.303.1-beta.786.1",
3
+ "version": "1.303.1-beta.787.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",
package/ts/serve.ts CHANGED
@@ -1914,7 +1914,7 @@ export async function cmdServe(rest: string[]): Promise<number> {
1914
1914
  // the Rust daemon; the rest stays here. See ts/serveRust.ts for the split.
1915
1915
  // `--no-rust` is stripped for the parsers below either way.
1916
1916
  {
1917
- const { planRustServe } = await import("./serveRust.ts");
1917
+ const { planRustServe, SERVE_SUBCOMMANDS } = await import("./serveRust.ts");
1918
1918
  const plan = planRustServe(rest);
1919
1919
  if (plan.kind === "rust-only") {
1920
1920
  const { ensureAyrsBinary } = await import("./rustBinary.ts");
@@ -1941,6 +1941,13 @@ export async function cmdServe(rest: string[]): Promise<number> {
1941
1941
  process.stderr.write(`ay serve: ${plan.reason}: joining rooms needs the Rust daemon\n`);
1942
1942
  return 1;
1943
1943
  }
1944
+ // Say which server runs and why, so a daemon log (and `ay share`'s
1945
+ // choice of room file) never leaves the operator guessing. Subcommands
1946
+ // and the explicit opt-outs are not "fallbacks", so stay quiet there.
1947
+ const optedOut = plan.reason === "--no-rust" || plan.reason === "AGENT_YES_NO_RUST=1";
1948
+ if (!optedOut && !SERVE_SUBCOMMANDS.has(rest[0] ?? "")) {
1949
+ process.stderr.write(`ay serve: running the TypeScript server (${plan.reason})\n`);
1950
+ }
1944
1951
  }
1945
1952
  }
1946
1953
 
@@ -1,5 +1,6 @@
1
1
  import { describe, expect, it } from "vitest";
2
2
  import { daemonShareRuntime, planRustServe } from "./serveRust.ts";
3
+ import { planDaemonArgs } from "./shareCore.ts";
3
4
 
4
5
  // `ay serve` runs the Rust daemon (`ayrs serve`) by default, like `ay <cli>`
5
6
  // runs the Rust agent runtime — but only for invocations ayrs can express.
@@ -54,17 +55,38 @@ describe("planRustServe", () => {
54
55
  }
55
56
  });
56
57
 
58
+ it("drops --http and a loopback --host next to --port: ayrs's port IS that console", () => {
59
+ // What `ay share webrtc` registers over an HTTP daemon.
60
+ expect(planRustServe(["--port", "7432", "--http", "--webrtc"], env)).toEqual({
61
+ kind: "rust",
62
+ argv: ["serve", "--port", "7432", "--webrtc"],
63
+ });
64
+ expect(
65
+ planRustServe(["--webrtc", "--http", "--host", "127.0.0.1", "--port=7432"], env),
66
+ ).toEqual({ kind: "rust", argv: ["serve", "--webrtc", "--port", "7432"] });
67
+ expect(planRustServe(["--host=localhost", "--port", "1"], env)).toEqual({
68
+ kind: "rust",
69
+ argv: ["serve", "--port", "1"],
70
+ });
71
+ });
72
+
57
73
  it("falls back, naming the flag, on anything ayrs cannot express", () => {
58
74
  expect(planRustServe(["--share"], env)).toMatchObject({ kind: "ts", reason: "--share" });
75
+ // --http without a port is the Portless console, which ayrs lacks.
59
76
  expect(planRustServe(["--webrtc", "--http"], env)).toMatchObject({
60
77
  kind: "ts",
61
- reason: "--http",
78
+ reason: "--http without --port (Portless HTTPS console)",
62
79
  });
63
80
  expect(planRustServe(["-d", "--webrtc"], env)).toMatchObject({ kind: "ts", reason: "-d" });
81
+ // ayrs listens on loopback only.
64
82
  expect(planRustServe(["--port", "0", "--host", "0.0.0.0"], env)).toMatchObject({
65
83
  kind: "ts",
66
- reason: "--host",
84
+ reason: "--host 0.0.0.0 (ayrs listens on loopback only)",
67
85
  });
86
+ expect(
87
+ planRustServe(["--webrtc", "--http", "--host", "100.64.0.1", "--port", "7432"], env),
88
+ ).toMatchObject({ kind: "ts", reason: "--host 100.64.0.1 (ayrs listens on loopback only)" });
89
+ expect(planRustServe(["--host", "127.0.0.1"], env)).toMatchObject({ kind: "ts" });
68
90
  // Any room link spelling reaches ayrs as webrtc://; a non-link stays on TS.
69
91
  expect(planRustServe(["--webrtc", "https://agent-yes.com/room/#room=r1&s=e1.ab"], env)).toEqual(
70
92
  { kind: "rust", argv: ["serve", "--webrtc", "webrtc://r1:e1.ab@s.agent-yes.com"] },
@@ -113,6 +135,11 @@ describe("daemonShareRuntime", () => {
113
135
  expect(daemonShareRuntime(["--webrtc"], ayrs, env)).toBe("rust");
114
136
  expect(daemonShareRuntime(["--webrtc", "--sighost", "s.example"], ayrs, env)).toBe("rust");
115
137
  expect(daemonShareRuntime(["--webrtc", "--port", "0"], ayrs, env)).toBe("rust");
138
+ // `ay share webrtc` over an HTTP daemon keeps HTTP with --http; that must
139
+ // not pin the room to the TypeScript host.
140
+ expect(daemonShareRuntime(planDaemonArgs(["--port", "9000"], "webrtc"), ayrs, env)).toBe(
141
+ "rust",
142
+ );
116
143
  });
117
144
 
118
145
  it("is ts whenever cmdServe would fall back to the TypeScript host", () => {
package/ts/serveRust.ts CHANGED
@@ -16,6 +16,10 @@
16
16
  * join-secret (print the link + join secret members need; ayrs only)
17
17
  * --port <n> / --port=<n> (loopback HTTP console; 0 = free port)
18
18
  * --sighost <host> / --sighost=<host>
19
+ * --http (with --port: ayrs's --port listener IS the HTTP
20
+ * console, so the flag is implied and dropped)
21
+ * --host <loopback> (with --port: 127.0.0.1 / localhost / ::1 — ayrs
22
+ * binds loopback anyway, so the flag is dropped)
19
23
  *
20
24
  * What stays on TypeScript, with the reason printed:
21
25
  * - `--no-rust` / AGENT_YES_NO_RUST=1 (explicit opt-out)
@@ -24,14 +28,15 @@
24
28
  * - the daemon subcommands (install/uninstall/status/logs/start/stop/
25
29
  * healthcheck) and -d/--daemon: ayrs has its own OS-supervisor install and
26
30
  * the two must not manage each other's registration
27
- * - --share (http+webrtc over Portless), --http, --host, --token, --tls-*,
31
+ * - --share (http+webrtc over Portless), --http without --port (Portless),
32
+ * a non-loopback --host (ayrs listens on loopback only), --token, --tls-*,
28
33
  * --local
29
34
  */
30
35
 
31
36
  /** Subcommands `ay serve` dispatches before flag parsing — never delegated. */
32
37
  import { toWebrtcUrl } from "./webrtcLink.ts";
33
38
 
34
- const SERVE_SUBCOMMANDS = new Set([
39
+ export const SERVE_SUBCOMMANDS = new Set([
35
40
  "install",
36
41
  "uninstall",
37
42
  "status",
@@ -41,6 +46,8 @@ const SERVE_SUBCOMMANDS = new Set([
41
46
  "healthcheck",
42
47
  ]);
43
48
 
49
+ const LOOPBACK_HOSTS = new Set(["127.0.0.1", "localhost", "::1"]);
50
+
44
51
  export type RustServePlan =
45
52
  | { kind: "rust"; argv: string[] }
46
53
  | { kind: "ts"; reason: string; rest: string[] }
@@ -80,6 +87,9 @@ export function planRustServe(
80
87
  return { kind: "ts", reason: `\`ay serve ${first}\``, rest };
81
88
  }
82
89
 
90
+ // `--http`/`--host` only map onto ayrs next to an explicit port: without
91
+ // one, TypeScript's HTTP console runs behind Portless, which ayrs lacks.
92
+ const hasPort = rest.some((a) => a === "--port" || a.startsWith("--port="));
83
93
  const argv = ["serve"];
84
94
  for (let i = 0; i < rest.length; i++) {
85
95
  const a = rest[i]!;
@@ -122,6 +132,21 @@ export function planRustServe(
122
132
  argv.push("--port", v);
123
133
  break;
124
134
  }
135
+ case "--http": {
136
+ if (inline !== undefined || !hasPort)
137
+ return { kind: "ts", reason: `${a} without --port (Portless HTTPS console)`, rest };
138
+ break; // ayrs's --port listener is the HTTP console
139
+ }
140
+ case "--host": {
141
+ const v = takeNext();
142
+ if (v === undefined || !LOOPBACK_HOSTS.has(v) || !hasPort)
143
+ return {
144
+ kind: "ts",
145
+ reason: `--host ${v ?? "(missing)"} (ayrs listens on loopback only)`,
146
+ rest,
147
+ };
148
+ break; // ayrs binds 127.0.0.1 already
149
+ }
125
150
  case "--sighost": {
126
151
  const v = takeNext();
127
152
  if (v === undefined) return { kind: "ts", reason: "--sighost (missing value)", rest };
@@ -1,5 +0,0 @@
1
- import "./versionChecker-Qho6qsKf.js";
2
- import "./rustBinary-CCDzbWCA.js";
3
- import { a as trayHiddenMarker, i as launchTray, n as hasDesktop, r as isTrayHidden, t as cmdTray } from "./trayApp-CV_d2Ufj.js";
4
-
5
- export { cmdTray };