agent-yes 1.238.0 → 1.238.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-EvHuyNA9.js";
1
+ import { t as CLIS_CONFIG } from "./ts-BQpyYSlD.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-NpYW9OaR.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-Bu2lWzhc.js.map
@@ -1,11 +1,11 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-DNLNn_SL.js";
3
- import "./ts-EvHuyNA9.js";
2
+ import "./versionChecker-DOnKQuqO.js";
3
+ import "./ts-BQpyYSlD.js";
4
4
  import "./todoAutomation-Buo457VO.js";
5
5
  import "./JsonlStore-CPGIR0Wy.js";
6
6
  import "./globalPidIndex-D9DOSd-c.js";
7
7
  import "./pidStore-6EZd5DUv.js";
8
8
  import "./messageLog-C-YIzhRj.js";
9
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-NpYW9OaR.js";
9
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Bu2lWzhc.js";
10
10
 
11
11
  export { SUPPORTED_CLIS };
@@ -3,7 +3,7 @@ import "./globalPidIndex-D9DOSd-c.js";
3
3
  import "./messageLog-C-YIzhRj.js";
4
4
  import "./e2e-CEIdJGZ7.js";
5
5
  import "./configShared-9wVlbPyC.js";
6
- import { N as resolveOne } from "./subcommands-BdBCxZVu.js";
6
+ import { N as resolveOne } from "./subcommands-B8I4Wykx.js";
7
7
  import "./webrtcLink-VQhWmKOw.js";
8
8
  import "./remotes-Bem6WIyU.js";
9
9
  import { a as startShare } from "./share-B9u8-I3y.js";
@@ -229,4 +229,4 @@ function transformEvent(rawEvent, agentId, forwarded) {
229
229
 
230
230
  //#endregion
231
231
  export { createScopedShare, listShares, revokeAllShares, revokeShare };
232
- //# sourceMappingURL=agentShare-549Zwi_B.js.map
232
+ //# sourceMappingURL=agentShare-mmHPVsnQ.js.map
@@ -3,10 +3,10 @@ import "./globalPidIndex-D9DOSd-c.js";
3
3
  import "./messageLog-C-YIzhRj.js";
4
4
  import "./e2e-CEIdJGZ7.js";
5
5
  import "./configShared-9wVlbPyC.js";
6
- import "./subcommands-BdBCxZVu.js";
6
+ import "./subcommands-B8I4Wykx.js";
7
7
  import "./webrtcLink-VQhWmKOw.js";
8
8
  import "./remotes-Bem6WIyU.js";
9
9
  import "./callbackCore-DAYcemCC.js";
10
- import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-BNJMOVlW.js";
10
+ import { i as loadOrCreateCallbackSecret, n as isCallbackRevoked, r as loadCallbackSecretReadOnly, t as cmdCallback } from "./callback-oLtnAuCg.js";
11
11
 
12
12
  export { cmdCallback };
@@ -1,5 +1,5 @@
1
1
  import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
2
- import { N as resolveOne } from "./subcommands-BdBCxZVu.js";
2
+ import { N as resolveOne } from "./subcommands-B8I4Wykx.js";
3
3
  import { a as mintCapability, o as parseExpires } from "./callbackCore-DAYcemCC.js";
4
4
  import { randomBytes } from "node:crypto";
5
5
  import { mkdir, readFile, writeFile } from "node:fs/promises";
@@ -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-BLxmap1e.js");
75
+ const { resolveLocalServeUrl } = await import("./serve-BD_hbsek.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-BNJMOVlW.js.map
190
+ //# sourceMappingURL=callback-oLtnAuCg.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-uqM2YYA7.js";
3
3
  import { n as logger } from "./logger-CDIsZ-Pp.js";
4
- import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-DNLNn_SL.js";
5
- import { n as getRustBinary } from "./rustBinary-DSorJMBV.js";
4
+ import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-DOnKQuqO.js";
5
+ import { n as getRustBinary } from "./rustBinary-CZv3VsiT.js";
6
6
  import { argv } from "process";
7
7
  import { spawn } from "child_process";
8
8
  import ms from "ms";
@@ -285,7 +285,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
285
285
  const rawArg = process.argv[2];
286
286
  const managerCommands = !invokedCliName(process.argv);
287
287
  const isHelpFlag = rawArg === "-h" || rawArg === "--help";
288
- const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-A0uOpmco.js");
288
+ const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-0-Yj64oi.js");
289
289
  if (isHelpFlag && process.argv.length === 3) {
290
290
  await cmdHelp(managerCommands);
291
291
  process.exit(0);
@@ -339,7 +339,7 @@ if (config.useRust) {
339
339
  }
340
340
  }
341
341
  if (rustBinary) {
342
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-CtgC_d_l.js");
342
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-DT0abWhE.js");
343
343
  const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
344
344
  if (config.verbose) {
345
345
  console.log(`[rust] Using binary: ${rustBinary}`);
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-DNLNn_SL.js";
3
- import { a as hasTodoStore, c as AgentContext, i as answerAsk, n as agentYes, o as listAsks, r as config, s as listAsksForProject, t as CLIS_CONFIG } from "./ts-EvHuyNA9.js";
2
+ import "./versionChecker-DOnKQuqO.js";
3
+ import { a as hasTodoStore, c as AgentContext, i as answerAsk, n as agentYes, o as listAsks, r as config, s as listAsksForProject, t as CLIS_CONFIG } from "./ts-BQpyYSlD.js";
4
4
  import { _ as isKnownKind, a as renderTree, b as statesOf, c as monitorHint, d as openStore, f as DONE_STATE, g as initialState, h as canTransition, i as renderDigest, l as CycleError, m as ORPHANED_STATE, o as unblockedTasks, p as LIFECYCLES, r as openBlockers, s as describeBlock, t as reconcileTodos, u as TodoStore, v as nextStates, x as removeControlCharacters, y as requiredGate } from "./todoAutomation-Buo457VO.js";
5
5
  import "./JsonlStore-CPGIR0Wy.js";
6
6
  import "./globalPidIndex-D9DOSd-c.js";
@@ -3,7 +3,7 @@ import "./globalPidIndex-D9DOSd-c.js";
3
3
  import "./messageLog-C-YIzhRj.js";
4
4
  import "./e2e-CEIdJGZ7.js";
5
5
  import "./configShared-9wVlbPyC.js";
6
- import { $ as daemonLockDir, A as renderLogTailLines, G as appendEvent, K as gcInboxes, Q as shouldStealLock, S as listRecords, X as liveWatchers, Y as listInboxParents, Z as readInbox, _ as isPidAlive, c as deriveLiveState, et as daemonLockOwnerPath, q as hostId, tt as notifyDir } from "./subcommands-BdBCxZVu.js";
6
+ import { $ as daemonLockDir, A as renderLogTailLines, G as appendEvent, K as gcInboxes, Q as shouldStealLock, S as listRecords, X as liveWatchers, Y as listInboxParents, Z as readInbox, _ as isPidAlive, c as deriveLiveState, et as daemonLockOwnerPath, q as hostId, tt as notifyDir } from "./subcommands-B8I4Wykx.js";
7
7
  import "./webrtcLink-VQhWmKOw.js";
8
8
  import "./remotes-Bem6WIyU.js";
9
9
  import { mkdir, readFile, rename, rm, stat, writeFile } from "fs/promises";
@@ -589,4 +589,4 @@ async function ensureDaemon() {
589
589
 
590
590
  //#endregion
591
591
  export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
592
- //# sourceMappingURL=notifyDaemon-CjBVeWRg.js.map
592
+ //# sourceMappingURL=notifyDaemon-DnLTIw8s.js.map
@@ -1,4 +1,4 @@
1
- import { r as getInstalledPackage } from "./versionChecker-DNLNn_SL.js";
1
+ import { r as getInstalledPackage } from "./versionChecker-DOnKQuqO.js";
2
2
  import { execFileSync } from "child_process";
3
3
  import { existsSync, mkdirSync, unlinkSync } from "fs";
4
4
  import { chmod, copyFile } from "fs/promises";
@@ -225,4 +225,4 @@ async function getRustBinary(options = {}) {
225
225
 
226
226
  //#endregion
227
227
  export { getRustBinary as n, findSpawnHiddenLauncher as t };
228
- //# sourceMappingURL=rustBinary-DSorJMBV.js.map
228
+ //# sourceMappingURL=rustBinary-CZv3VsiT.js.map
@@ -1,12 +1,12 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./versionChecker-DNLNn_SL.js";
3
- import "./ts-EvHuyNA9.js";
2
+ import "./versionChecker-DOnKQuqO.js";
3
+ import "./ts-BQpyYSlD.js";
4
4
  import "./todoAutomation-Buo457VO.js";
5
5
  import "./JsonlStore-CPGIR0Wy.js";
6
6
  import "./globalPidIndex-D9DOSd-c.js";
7
7
  import "./pidStore-6EZd5DUv.js";
8
8
  import "./messageLog-C-YIzhRj.js";
9
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-NpYW9OaR.js";
9
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Bu2lWzhc.js";
10
10
  import { d as resolveSpawnCwd } from "./workspaceConfig-B7HaQ-MI.js";
11
11
  import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-Bf88NPqj.js";
12
12
  import { createHash } from "node:crypto";
@@ -153,4 +153,4 @@ async function cmdSchedule(rest) {
153
153
 
154
154
  //#endregion
155
155
  export { cmdSchedule };
156
- //# sourceMappingURL=schedule-Bw3SL5Hv.js.map
156
+ //# sourceMappingURL=schedule-Vce114TJ.js.map
@@ -1,7 +1,7 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import { r as getInstalledPackage } from "./versionChecker-DNLNn_SL.js";
3
- import { t as findSpawnHiddenLauncher } from "./rustBinary-DSorJMBV.js";
4
- import { i as answerAsk, l as CLAUDE_SESSION_PIN_ENV, o as listAsks } from "./ts-EvHuyNA9.js";
2
+ import { r as getInstalledPackage } from "./versionChecker-DOnKQuqO.js";
3
+ import { t as findSpawnHiddenLauncher } from "./rustBinary-CZv3VsiT.js";
4
+ import { i as answerAsk, l as CLAUDE_SESSION_PIN_ENV, o as listAsks } from "./ts-BQpyYSlD.js";
5
5
  import { t as agentYesHome$1 } from "./agentYesHome-CtmsY6I-.js";
6
6
  import { x as removeControlCharacters } from "./todoAutomation-Buo457VO.js";
7
7
  import "./JsonlStore-CPGIR0Wy.js";
@@ -11,12 +11,12 @@ import { r as recordInbox } from "./messageLog-C-YIzhRj.js";
11
11
  import { t as pgidForWrapper } from "./reaper-DP49VCKx.js";
12
12
  import "./e2e-CEIdJGZ7.js";
13
13
  import "./configShared-9wVlbPyC.js";
14
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-NpYW9OaR.js";
15
- import { A as renderLogTailLines, D as readPtysize, E as readNotes, J as isTransientLockMkdirError, M as renderRawLogLines, N as resolveOne, O as recentMessageEdges, R as snapshotStatus, S as listRecords, W as writeToIpc, b as isUserTyping, f as extractNeedsInput, j as renderRawLog, k as recentReadEdges, l as deriveLiveStatus, nt as TYPING_BADGE, o as controlCodeFromName, p as extractTaskCounts, u as extractBadges } from "./subcommands-BdBCxZVu.js";
14
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Bu2lWzhc.js";
15
+ import { A as renderLogTailLines, D as readPtysize, E as readNotes, J as isTransientLockMkdirError, M as renderRawLogLines, N as resolveOne, O as recentMessageEdges, R as snapshotStatus, S as listRecords, W as writeToIpc, b as isUserTyping, f as extractNeedsInput, j as renderRawLog, k as recentReadEdges, l as deriveLiveStatus, nt as TYPING_BADGE, o as controlCodeFromName, p as extractTaskCounts, u as extractBadges } from "./subcommands-B8I4Wykx.js";
16
16
  import "./webrtcLink-VQhWmKOw.js";
17
17
  import "./remotes-Bem6WIyU.js";
18
18
  import { i as frameVisitorMessage, s as verifyCapability, t as MAX_CALLBACK_MSG_BYTES } from "./callbackCore-DAYcemCC.js";
19
- import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-BNJMOVlW.js";
19
+ import { n as isCallbackRevoked, r as loadCallbackSecretReadOnly } from "./callback-oLtnAuCg.js";
20
20
  import { a as getSpawnHook, c as hasProvisionHook, d as resolveSpawnCwd, i as getProvisionRoot, l as hasSpawnHook, r as getProvisionHook, u as isProvisionAllowed } from "./workspaceConfig-B7HaQ-MI.js";
21
21
  import { n as liveEnv, t as ensureNodeRuntime } from "./nodeRuntime-Bf88NPqj.js";
22
22
  import { r as spawnRejectionReason } from "./spawnGate-Bo_LFgt9.js";
@@ -1021,6 +1021,23 @@ async function resolveLocalServeUrl() {
1021
1021
  const port = portFromArgs(daemonArgs);
1022
1022
  return port ? `http://127.0.0.1:${port}` : null;
1023
1023
  }
1024
+ /**
1025
+ * Best-effort HTTP base URL of the LOCAL running daemon, for CLI→daemon calls
1026
+ * (`ay widget`). More robust than resolveLocalServeUrl for UNMANAGED daemons: it
1027
+ * also reads the portless proxy backend port (~/.portless/routes.json) and the
1028
+ * PORT env, so a daemon started outside oxmgr (e.g. a portless wrapper that injects
1029
+ * PORT) is still found without the caller having to pass --base. Null if nothing
1030
+ * local is discoverable.
1031
+ */
1032
+ async function resolveDaemonHttpBase() {
1033
+ const managed = await resolveLocalServeUrl();
1034
+ if (managed) return managed;
1035
+ const pport = await portlessAppPort();
1036
+ if (pport) return `http://127.0.0.1:${pport}`;
1037
+ const envPort = process.env.AGENT_YES_SERVE_PORT || process.env.PORT;
1038
+ if (envPort && /^\d+$/.test(envPort)) return `http://127.0.0.1:${envPort}`;
1039
+ return null;
1040
+ }
1024
1041
  async function warnStrayServeProcesses() {
1025
1042
  const stray = await listStrayServeProcesses();
1026
1043
  if (stray.length === 0) return;
@@ -2229,7 +2246,7 @@ Options:
2229
2246
  }
2230
2247
  });
2231
2248
  if (req.method === "GET" && p === "/api/ws") {
2232
- const ws = await import("./ws-3prv2in5.js");
2249
+ const ws = await import("./ws-f01kHd5z.js");
2233
2250
  try {
2234
2251
  await ws.loadProvision();
2235
2252
  } catch (e) {
@@ -2249,7 +2266,7 @@ Options:
2249
2266
  if (req.method === "GET" && p === "/api/ws/status") {
2250
2267
  const dirRaw = url.searchParams.get("path");
2251
2268
  if (!dirRaw) return new Response("missing ?path=<workspace dir>", { status: 400 });
2252
- const ws = await import("./ws-3prv2in5.js");
2269
+ const ws = await import("./ws-f01kHd5z.js");
2253
2270
  let prov;
2254
2271
  try {
2255
2272
  prov = await ws.loadProvision();
@@ -2971,7 +2988,7 @@ Options:
2971
2988
  const perm = body.perm ?? "r";
2972
2989
  if (perm !== "r" && perm !== "rw") return new Response(`invalid perm ${perm} (want r or rw)`, { status: 400 });
2973
2990
  try {
2974
- const { createScopedShare } = await import("./agentShare-549Zwi_B.js");
2991
+ const { createScopedShare } = await import("./agentShare-mmHPVsnQ.js");
2975
2992
  const share = await createScopedShare({
2976
2993
  agent: body.agent,
2977
2994
  perm,
@@ -2986,12 +3003,12 @@ Options:
2986
3003
  }
2987
3004
  }
2988
3005
  if (req.method === "GET" && p === "/api/shares") {
2989
- const { listShares } = await import("./agentShare-549Zwi_B.js");
3006
+ const { listShares } = await import("./agentShare-mmHPVsnQ.js");
2990
3007
  return Response.json(listShares());
2991
3008
  }
2992
3009
  const revokeM = /^\/api\/share\/([^/]+)$/.exec(p);
2993
3010
  if (req.method === "DELETE" && revokeM) {
2994
- const { revokeShare } = await import("./agentShare-549Zwi_B.js");
3011
+ const { revokeShare } = await import("./agentShare-mmHPVsnQ.js");
2995
3012
  const ok = revokeShare(decodeURIComponent(revokeM[1]));
2996
3013
  return new Response(ok ? "revoked" : "no such share", { status: ok ? 200 : 404 });
2997
3014
  }
@@ -3293,7 +3310,7 @@ Options:
3293
3310
  const shutdown = (resolve) => {
3294
3311
  if (heartbeat) clearInterval(heartbeat);
3295
3312
  closeShare?.();
3296
- import("./agentShare-549Zwi_B.js").then((m) => m.revokeAllShares()).catch(() => {});
3313
+ import("./agentShare-mmHPVsnQ.js").then((m) => m.revokeAllShares()).catch(() => {});
3297
3314
  server?.stop();
3298
3315
  Promise.resolve(releaseHostLock?.()).catch(() => {}).then(resolve);
3299
3316
  };
@@ -3305,5 +3322,5 @@ Options:
3305
3322
  }
3306
3323
 
3307
3324
  //#endregion
3308
- export { cmdServe, loadTokenReadOnly, mintScopedTermToken, resolveLocalServeUrl };
3309
- //# sourceMappingURL=serve-BLxmap1e.js.map
3325
+ export { cmdServe, loadTokenReadOnly, mintScopedTermToken, resolveDaemonHttpBase, resolveLocalServeUrl };
3326
+ //# sourceMappingURL=serve-BD_hbsek.js.map
@@ -32,7 +32,7 @@ async function cmdSetup(rest) {
32
32
  if (!existsSync(abs)) process.stderr.write(` note: that directory doesn't exist yet — create it, or agents spawned there will fail\n`);
33
33
  if (noShare) return 0;
34
34
  process.stdout.write(`\nsharing this machine to agent-yes.com…\n`);
35
- const { cmdServe } = await import("./serve-BLxmap1e.js");
35
+ const { cmdServe } = await import("./serve-BD_hbsek.js");
36
36
  return cmdServe([
37
37
  "install",
38
38
  "--share",
@@ -42,4 +42,4 @@ async function cmdSetup(rest) {
42
42
 
43
43
  //#endregion
44
44
  export { cmdSetup };
45
- //# sourceMappingURL=setup-DlFVw_1n.js.map
45
+ //# sourceMappingURL=setup-D26oT9jg.js.map
@@ -3,7 +3,7 @@ import "./globalPidIndex-D9DOSd-c.js";
3
3
  import "./messageLog-C-YIzhRj.js";
4
4
  import "./e2e-CEIdJGZ7.js";
5
5
  import "./configShared-9wVlbPyC.js";
6
- import { A as renderLogTailLines, B as stopTipForCli, C as matchKeyword, D as readPtysize, E as readNotes, F as resolveResumeArgs, H as waitForLogQuiet, I as restartHintLines, L as runSubcommand, M as renderRawLogLines, N as resolveOne, O as recentMessageEdges, P as resolveReadWindow, R as snapshotStatus, S as listRecords, T as readAgentPtysize, U as writeKeysPaced, V as submitAndConfirm, W as writeToIpc, _ as isPidAlive, a as cmdHelp, b as isUserTyping, c as deriveLiveState, d as extractMenu, f as extractNeedsInput, g as isExitRequest, h as isAgentStuck, i as backoffWhileTyping, j as renderRawLog, k as recentReadEdges, l as deriveLiveStatus, m as finalizedLines, n as READ_PAGE_DEFAULT, o as controlCodeFromName, p as extractTaskCounts, r as TYPING_WINDOW_MS, s as cursorAbs, t as GRACEFUL_EXIT_COMMANDS, u as extractBadges, v as isSlashCommand, w as menuSelectKeys, x as lastStdinAt, y as isSubcommand, z as stdinActivityPath } from "./subcommands-BdBCxZVu.js";
6
+ import { A as renderLogTailLines, B as stopTipForCli, C as matchKeyword, D as readPtysize, E as readNotes, F as resolveResumeArgs, H as waitForLogQuiet, I as restartHintLines, L as runSubcommand, M as renderRawLogLines, N as resolveOne, O as recentMessageEdges, P as resolveReadWindow, R as snapshotStatus, S as listRecords, T as readAgentPtysize, U as writeKeysPaced, V as submitAndConfirm, W as writeToIpc, _ as isPidAlive, a as cmdHelp, b as isUserTyping, c as deriveLiveState, d as extractMenu, f as extractNeedsInput, g as isExitRequest, h as isAgentStuck, i as backoffWhileTyping, j as renderRawLog, k as recentReadEdges, l as deriveLiveStatus, m as finalizedLines, n as READ_PAGE_DEFAULT, o as controlCodeFromName, p as extractTaskCounts, r as TYPING_WINDOW_MS, s as cursorAbs, t as GRACEFUL_EXIT_COMMANDS, u as extractBadges, v as isSlashCommand, w as menuSelectKeys, x as lastStdinAt, y as isSubcommand, z as stdinActivityPath } from "./subcommands-B8I4Wykx.js";
7
7
  import "./webrtcLink-VQhWmKOw.js";
8
8
  import "./remotes-Bem6WIyU.js";
9
9
 
@@ -1253,31 +1253,31 @@ async function runSubcommand(argv) {
1253
1253
  return cmdCh(rest);
1254
1254
  }
1255
1255
  case "term": {
1256
- const { cmdTerm } = await import("./terminal-w7drEaJc.js");
1256
+ const { cmdTerm } = await import("./terminal-ByvAvbpu.js");
1257
1257
  return cmdTerm(rest);
1258
1258
  }
1259
1259
  case "widget": {
1260
- const { cmdWidget } = await import("./widget-Coav85Lx.js");
1260
+ const { cmdWidget } = await import("./widget-DF2p2P0s.js");
1261
1261
  return cmdWidget(rest);
1262
1262
  }
1263
1263
  case "mint": {
1264
- const { cmdMint } = await import("./widget-Coav85Lx.js");
1264
+ const { cmdMint } = await import("./widget-DF2p2P0s.js");
1265
1265
  return cmdMint(rest);
1266
1266
  }
1267
1267
  case "serve": {
1268
- const { cmdServe } = await import("./serve-BLxmap1e.js");
1268
+ const { cmdServe } = await import("./serve-BD_hbsek.js");
1269
1269
  return cmdServe(rest);
1270
1270
  }
1271
1271
  case "setup": {
1272
- const { cmdSetup } = await import("./setup-DlFVw_1n.js");
1272
+ const { cmdSetup } = await import("./setup-D26oT9jg.js");
1273
1273
  return cmdSetup(rest);
1274
1274
  }
1275
1275
  case "ws": {
1276
- const { cmdWs } = await import("./ws-3prv2in5.js");
1276
+ const { cmdWs } = await import("./ws-f01kHd5z.js");
1277
1277
  return cmdWs(rest);
1278
1278
  }
1279
1279
  case "schedule": {
1280
- const { cmdSchedule } = await import("./schedule-Bw3SL5Hv.js");
1280
+ const { cmdSchedule } = await import("./schedule-Vce114TJ.js");
1281
1281
  return cmdSchedule(rest);
1282
1282
  }
1283
1283
  case "remote": {
@@ -1289,7 +1289,7 @@ async function runSubcommand(argv) {
1289
1289
  return cmdExpose(rest);
1290
1290
  }
1291
1291
  case "callback": {
1292
- const { cmdCallback } = await import("./callback-B-ojDckO.js");
1292
+ const { cmdCallback } = await import("./callback-CNkRhvP-.js");
1293
1293
  return cmdCallback(rest);
1294
1294
  }
1295
1295
  case "reap":
@@ -4327,7 +4327,7 @@ async function cmdNotify(rest) {
4327
4327
  }
4328
4328
  const ensure = async () => {
4329
4329
  if (!argv["ensure-daemon"]) return;
4330
- const { ensureDaemon } = await import("./notifyDaemon-CjBVeWRg.js");
4330
+ const { ensureDaemon } = await import("./notifyDaemon-DnLTIw8s.js");
4331
4331
  await ensureDaemon().catch(() => null);
4332
4332
  };
4333
4333
  await heartbeatWatcher(parent, selfStartedAt);
@@ -4401,7 +4401,7 @@ async function cmdNotifyCursor(args) {
4401
4401
  }
4402
4402
  async function cmdNotifyd(rest) {
4403
4403
  const sub = rest[0] ?? "status";
4404
- const daemon = await import("./notifyDaemon-CjBVeWRg.js");
4404
+ const daemon = await import("./notifyDaemon-DnLTIw8s.js");
4405
4405
  switch (sub) {
4406
4406
  case "run": return daemon.runDaemon();
4407
4407
  case "once": return daemon.runDaemon({ once: true });
@@ -4428,4 +4428,4 @@ async function cmdNotifyd(rest) {
4428
4428
 
4429
4429
  //#endregion
4430
4430
  export { daemonLockDir as $, renderLogTailLines as A, stopTipForCli as B, matchKeyword as C, readPtysize as D, readNotes as E, resolveResumeArgs as F, appendEvent as G, waitForLogQuiet as H, restartHintLines as I, isTransientLockMkdirError as J, gcInboxes as K, runSubcommand as L, renderRawLogLines as M, resolveOne as N, recentMessageEdges as O, resolveReadWindow as P, shouldStealLock as Q, snapshotStatus as R, listRecords as S, readAgentPtysize as T, writeKeysPaced as U, submitAndConfirm as V, writeToIpc as W, liveWatchers as X, listInboxParents as Y, readInbox as Z, isPidAlive as _, cmdHelp as a, isUserTyping as b, deriveLiveState as c, extractMenu as d, daemonLockOwnerPath as et, extractNeedsInput as f, isExitRequest as g, isAgentStuck as h, backoffWhileTyping as i, renderRawLog as j, recentReadEdges as k, deriveLiveStatus as l, finalizedLines as m, READ_PAGE_DEFAULT as n, TYPING_BADGE as nt, controlCodeFromName as o, extractTaskCounts as p, hostId as q, TYPING_WINDOW_MS as r, cursorAbs as s, GRACEFUL_EXIT_COMMANDS as t, notifyDir as tt, extractBadges as u, isSlashCommand as v, menuSelectKeys as w, lastStdinAt as x, isSubcommand as y, stdinActivityPath as z };
4431
- //# sourceMappingURL=subcommands-BdBCxZVu.js.map
4431
+ //# sourceMappingURL=subcommands-B8I4Wykx.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-BLxmap1e.js");
101
+ const { mintScopedTermToken } = await import("./serve-BD_hbsek.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-w7drEaJc.js.map
138
+ //# sourceMappingURL=terminal-ByvAvbpu.js.map
@@ -1,6 +1,6 @@
1
1
  import { n as __esmMin, r as __exportAll } from "./chunk-cZBX9HZv.js";
2
2
  import { n as logger, t as addTransport } from "./logger-CDIsZ-Pp.js";
3
- import { r as getInstalledPackage } from "./versionChecker-DNLNn_SL.js";
3
+ import { r as getInstalledPackage } from "./versionChecker-DOnKQuqO.js";
4
4
  import { t as agentYesHome } from "./agentYesHome-CtmsY6I-.js";
5
5
  import { d as openStore, p as LIFECYCLES, x as removeControlCharacters } from "./todoAutomation-Buo457VO.js";
6
6
  import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-DBoONoM-.js";
@@ -2027,4 +2027,4 @@ function sleep(ms) {
2027
2027
 
2028
2028
  //#endregion
2029
2029
  export { hasTodoStore as a, AgentContext as c, answerAsk as i, CLAUDE_SESSION_PIN_ENV as l, agentYes as n, listAsks as o, config as r, listAsksForProject as s, CLIS_CONFIG as t };
2030
- //# sourceMappingURL=ts-EvHuyNA9.js.map
2030
+ //# sourceMappingURL=ts-BQpyYSlD.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.238.0";
10
+ var version = "1.238.1";
11
11
 
12
12
  //#endregion
13
13
  //#region ts/versionChecker.ts
@@ -215,4 +215,4 @@ async function displayVersion() {
215
215
 
216
216
  //#endregion
217
217
  export { versionString as i, displayVersion as n, getInstalledPackage as r, checkAndAutoUpdate as t };
218
- //# sourceMappingURL=versionChecker-DNLNn_SL.js.map
218
+ //# sourceMappingURL=versionChecker-DOnKQuqO.js.map
@@ -28,8 +28,8 @@ 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 { resolveLocalServeUrl, loadTokenReadOnly } = await import("./serve-BLxmap1e.js");
32
- const base = typeof flags.base === "string" ? flags.base : await resolveLocalServeUrl();
31
+ const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-BD_hbsek.js");
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() ?? "";
35
35
  if (!token) throw new Error("no serve token — pass --token or run `ay serve` once");
@@ -153,7 +153,7 @@ async function cmdMint(args) {
153
153
  const bad = caps.filter((c) => !KNOWN_CAPS.has(c));
154
154
  if (bad.length) throw new Error(`unknown cap(s): ${bad.join(", ")} (valid: ${[...KNOWN_CAPS].join(", ")})`);
155
155
  const ttlSec = parseTtlSec(typeof flags.ttl === "string" ? flags.ttl : "15m");
156
- const { mintScopedTermToken } = await import("./serve-BLxmap1e.js");
156
+ const { mintScopedTermToken } = await import("./serve-BD_hbsek.js");
157
157
  const r = await mintScopedTermToken(target, {
158
158
  ttlSec,
159
159
  caps
@@ -169,4 +169,4 @@ async function cmdMint(args) {
169
169
 
170
170
  //#endregion
171
171
  export { cmdMint, cmdWidget };
172
- //# sourceMappingURL=widget-Coav85Lx.js.map
172
+ //# sourceMappingURL=widget-DF2p2P0s.js.map
@@ -3,7 +3,7 @@ import "./globalPidIndex-D9DOSd-c.js";
3
3
  import "./messageLog-C-YIzhRj.js";
4
4
  import "./e2e-CEIdJGZ7.js";
5
5
  import "./configShared-9wVlbPyC.js";
6
- import { S as listRecords } from "./subcommands-BdBCxZVu.js";
6
+ import { S as listRecords } from "./subcommands-B8I4Wykx.js";
7
7
  import "./webrtcLink-VQhWmKOw.js";
8
8
  import "./remotes-Bem6WIyU.js";
9
9
  import { i as getProvisionRoot } from "./workspaceConfig-B7HaQ-MI.js";
@@ -418,4 +418,4 @@ async function cmdWs(args) {
418
418
 
419
419
  //#endregion
420
420
  export { WS_JSON_SCHEMA, cmdWs, collectWorkspaces, isPathInside, loadProvision, workspaceStatus };
421
- //# sourceMappingURL=ws-3prv2in5.js.map
421
+ //# sourceMappingURL=ws-f01kHd5z.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-yes",
3
- "version": "1.238.0",
3
+ "version": "1.238.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
@@ -988,6 +988,26 @@ export async function resolveLocalServeUrl(): Promise<string | null> {
988
988
  return port ? `http://127.0.0.1:${port}` : null;
989
989
  }
990
990
 
991
+ /**
992
+ * Best-effort HTTP base URL of the LOCAL running daemon, for CLI→daemon calls
993
+ * (`ay widget`). More robust than resolveLocalServeUrl for UNMANAGED daemons: it
994
+ * also reads the portless proxy backend port (~/.portless/routes.json) and the
995
+ * PORT env, so a daemon started outside oxmgr (e.g. a portless wrapper that injects
996
+ * PORT) is still found without the caller having to pass --base. Null if nothing
997
+ * local is discoverable.
998
+ */
999
+ export async function resolveDaemonHttpBase(): Promise<string | null> {
1000
+ const managed = await resolveLocalServeUrl();
1001
+ if (managed) return managed;
1002
+ // Unmanaged portless run: the real loopback backend is in the portless routes.
1003
+ const pport = await portlessAppPort();
1004
+ if (pport) return `http://127.0.0.1:${pport}`;
1005
+ // Last resort: an explicit port in the environment.
1006
+ const envPort = process.env.AGENT_YES_SERVE_PORT || process.env.PORT;
1007
+ if (envPort && /^\d+$/.test(envPort)) return `http://127.0.0.1:${envPort}`;
1008
+ return null;
1009
+ }
1010
+
991
1011
  async function warnStrayServeProcesses(): Promise<void> {
992
1012
  const stray = await listStrayServeProcesses();
993
1013
  if (stray.length === 0) return;
package/ts/widget.ts CHANGED
@@ -42,8 +42,8 @@ function parseFlags(
42
42
  async function daemonTarget(
43
43
  flags: Record<string, string | boolean>,
44
44
  ): Promise<{ base: string; token: string }> {
45
- const { resolveLocalServeUrl, loadTokenReadOnly } = await import("./serve.ts");
46
- const base = typeof flags.base === "string" ? flags.base : await resolveLocalServeUrl();
45
+ const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve.ts");
46
+ const base = typeof flags.base === "string" ? flags.base : await resolveDaemonHttpBase();
47
47
  if (!base)
48
48
  throw new Error(
49
49
  "no running ay serve daemon found — start `ay serve` or pass --base <url> (e.g. http://127.0.0.1:PORT)",