claude-yes 1.174.0 → 1.174.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.
@@ -0,0 +1,8 @@
1
+ import "./ts-D2Q8HRwn.js";
2
+ import "./logger-CDIsZ-Pp.js";
3
+ import "./versionChecker-CGnpYkKV.js";
4
+ import "./pidStore-BIvsBQ8X.js";
5
+ import "./globalPidIndex-CoNr7tS8.js";
6
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CsJGEDYA.js";
7
+
8
+ export { SUPPORTED_CLIS };
@@ -1,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-l6q9fhuc.js";
1
+ import { t as CLIS_CONFIG } from "./ts-D2Q8HRwn.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-DRYgob0H.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-CsJGEDYA.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-DltRc0f8.js";
5
- import { n as getRustBinary } from "./rustBinary-B3-RzNau.js";
4
+ import { i as versionString, n as displayVersion, t as checkAndAutoUpdate } from "./versionChecker-CGnpYkKV.js";
5
+ import { n as getRustBinary } from "./rustBinary-Drtzp3SH.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-BeUD8RlG.js");
288
+ const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-CGg3eWZy.js");
289
289
  if (isHelpFlag && process.argv.length === 3) {
290
290
  await cmdHelp(managerCommands);
291
291
  process.exit(0);
@@ -327,7 +327,7 @@ if (config.useRust) {
327
327
  }
328
328
  }
329
329
  if (rustBinary) {
330
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-C2CKMUGB.js");
330
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BldclEi3.js");
331
331
  const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
332
332
  if (config.verbose) {
333
333
  console.log(`[rust] Using binary: ${rustBinary}`);
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-l6q9fhuc.js";
1
+ import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-D2Q8HRwn.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-DltRc0f8.js";
3
+ import "./versionChecker-CGnpYkKV.js";
4
4
  import "./pidStore-BIvsBQ8X.js";
5
5
  import "./globalPidIndex-CoNr7tS8.js";
6
6
 
@@ -1,7 +1,7 @@
1
1
  import { n as logger } from "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CoNr7tS8.js";
3
3
  import "./configShared-0MnIQ652.js";
4
- import { D as renderLogTailLines, G as hostId, J as readInbox, K as listInboxParents, Q as notifyDir, S as listRecords, U as appendEvent, W as gcInboxes, X as daemonLockDir, Y as shouldStealLock, Z as daemonLockOwnerPath, _ as isPidAlive, c as deriveLiveState, q as liveWatchers } from "./subcommands-DYcGpfkJ.js";
4
+ import { D as renderLogTailLines, G as hostId, J as readInbox, K as listInboxParents, Q as notifyDir, S as listRecords, U as appendEvent, W as gcInboxes, X as daemonLockDir, Y as shouldStealLock, Z as daemonLockOwnerPath, _ as isPidAlive, c as deriveLiveState, q as liveWatchers } from "./subcommands-DH2wTwE0.js";
5
5
  import "./e2e-jb0Hp43q.js";
6
6
  import "./webrtcLink-B7REGtK2.js";
7
7
  import "./remotes-CC-4GuJb.js";
@@ -588,4 +588,4 @@ async function ensureDaemon() {
588
588
 
589
589
  //#endregion
590
590
  export { daemonStatus, ensureDaemon, requestDaemonStop, runDaemon };
591
- //# sourceMappingURL=notifyDaemon-BIAiDk8X.js.map
591
+ //# sourceMappingURL=notifyDaemon-8w8hFYVd.js.map
@@ -1,4 +1,4 @@
1
- import { r as getInstalledPackage } from "./versionChecker-DltRc0f8.js";
1
+ import { r as getInstalledPackage } from "./versionChecker-CGnpYkKV.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-B3-RzNau.js.map
228
+ //# sourceMappingURL=rustBinary-Drtzp3SH.js.map
@@ -1,9 +1,9 @@
1
- import "./ts-l6q9fhuc.js";
1
+ import "./ts-D2Q8HRwn.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-DltRc0f8.js";
3
+ import "./versionChecker-CGnpYkKV.js";
4
4
  import "./pidStore-BIvsBQ8X.js";
5
5
  import "./globalPidIndex-CoNr7tS8.js";
6
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DRYgob0H.js";
6
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CsJGEDYA.js";
7
7
  import { d as resolveSpawnCwd } from "./workspaceConfig-BgqK-31W.js";
8
8
  import { createHash } from "node:crypto";
9
9
 
@@ -141,4 +141,4 @@ async function cmdSchedule(rest) {
141
141
 
142
142
  //#endregion
143
143
  export { cmdSchedule };
144
- //# sourceMappingURL=schedule-OIx0pPXv.js.map
144
+ //# sourceMappingURL=schedule-D-88854z.js.map
@@ -1,13 +1,13 @@
1
- import "./ts-l6q9fhuc.js";
1
+ import "./ts-D2Q8HRwn.js";
2
2
  import "./logger-CDIsZ-Pp.js";
3
- import { r as getInstalledPackage } from "./versionChecker-DltRc0f8.js";
4
- import { t as findSpawnHiddenLauncher } from "./rustBinary-B3-RzNau.js";
3
+ import { r as getInstalledPackage } from "./versionChecker-CGnpYkKV.js";
4
+ import { t as findSpawnHiddenLauncher } from "./rustBinary-Drtzp3SH.js";
5
5
  import "./pidStore-BIvsBQ8X.js";
6
6
  import { a as updateGlobalPidStatus } from "./globalPidIndex-CoNr7tS8.js";
7
7
  import { t as pgidForWrapper } from "./reaper-CWF2_ATd.js";
8
8
  import "./configShared-0MnIQ652.js";
9
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DRYgob0H.js";
10
- import { A as resolveOne, E as readPtysize, F as snapshotStatus, H as TYPING_BADGE, O as renderRawLog, S as listRecords, T as readNotes, V as writeToIpc, b as isUserTyping, f as extractNeedsInput, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, u as extractBadges } from "./subcommands-DYcGpfkJ.js";
9
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-CsJGEDYA.js";
10
+ import { A as resolveOne, E as readPtysize, F as snapshotStatus, H as TYPING_BADGE, O as renderRawLog, S as listRecords, T as readNotes, V as writeToIpc, b as isUserTyping, f as extractNeedsInput, l as deriveLiveStatus, o as controlCodeFromName, p as extractTaskCounts, u as extractBadges } from "./subcommands-DH2wTwE0.js";
11
11
  import "./e2e-jb0Hp43q.js";
12
12
  import "./webrtcLink-B7REGtK2.js";
13
13
  import "./remotes-CC-4GuJb.js";
@@ -271,6 +271,26 @@ async function managerRunnable(mgr) {
271
271
  return false;
272
272
  }
273
273
  }
274
+ async function resolveActiveManager() {
275
+ const oxmgr = Bun.which("oxmgr");
276
+ const pm2 = Bun.which("pm2");
277
+ const present = [];
278
+ if (oxmgr) present.push({
279
+ id: "oxmgr",
280
+ bin: oxmgr
281
+ });
282
+ if (pm2) present.push({
283
+ id: "pm2",
284
+ bin: pm2
285
+ });
286
+ let firstRunnable = null;
287
+ for (const m of present) {
288
+ if (!await managerRunnable(m)) continue;
289
+ firstRunnable ??= m;
290
+ if (await readDaemonServeArgs(m) !== null) return m;
291
+ }
292
+ return firstRunnable ?? resolveDaemonManager();
293
+ }
274
294
  async function installAndVerify(pkg) {
275
295
  const bun = Bun.which("bun");
276
296
  const npm = Bun.which("npm");
@@ -305,7 +325,8 @@ async function installAndVerify(pkg) {
305
325
  bin
306
326
  };
307
327
  if (!await managerRunnable(mgr)) {
308
- process.stderr.write(`ay serve install: ${pkg} installed but can't exec here (likely a native/glibc mismatch)` + (pkg === "oxmgr" ? " falling back to pm2\n" : "\n"));
328
+ const why = pkg === "oxmgr" ? "a native/glibc mismatch, e.g. glibc < 2.39" : "pm2 needs a Node.js runtime and none was found";
329
+ process.stderr.write(`ay serve install: ${pkg} installed but can't exec here (${why})` + (pkg === "oxmgr" ? " — falling back to pm2\n" : "\n"));
309
330
  return null;
310
331
  }
311
332
  return mgr;
@@ -445,7 +466,7 @@ async function cmdServeDaemon(sub, args) {
445
466
  }
446
467
  if (!mgr) mgr = await bootstrapDaemonManager();
447
468
  if (!mgr) {
448
- process.stderr.write("ay serve install: no usable process manager (need oxmgr or pm2)\n install with: bun add -g pm2\n or: bun add -g oxmgr (needs glibc ≥ 2.39 on Linux)\n");
469
+ process.stderr.write("ay serve install: no usable process manager (need oxmgr or pm2)\n - oxmgr: bun add -g oxmgr (native binary; needs glibc ≥ 2.39 on Linux)\n - pm2: bun add -g pm2 (needs a Node.js runtime on PATH)\n On a minimal bun-only box, install node (for pm2) or a newer glibc (for oxmgr).\n");
449
470
  return 1;
450
471
  }
451
472
  if (sub === "install") {
@@ -589,7 +610,7 @@ async function cmdServeDaemon(sub, args) {
589
610
  }
590
611
  async function cmdServeStatus(args) {
591
612
  const json = args.includes("--json");
592
- const mgr = resolveDaemonManager();
613
+ const mgr = await resolveActiveManager();
593
614
  const token = await loadTokenReadOnly();
594
615
  const shareLink = await readShareLink();
595
616
  const daemonArgs = mgr ? await readDaemonServeArgs(mgr) : null;
@@ -1579,23 +1600,30 @@ Options:
1579
1600
  continue;
1580
1601
  }
1581
1602
  if (inUse) {
1603
+ if (wantWebrtc) {
1604
+ process.stderr.write(`ay serve: port ${port} is still in use after retries — continuing WebRTC-only (HTTP API disabled). Free the port and restart to re-enable HTTP, or pick another with --port N.\n`);
1605
+ server = null;
1606
+ break;
1607
+ }
1582
1608
  process.stderr.write(`ay serve: port ${port} is still in use after retries — pick another with --port N,\nor run a port-free WebRTC-only share with: ay serve --webrtc\n`);
1583
1609
  return 1;
1584
1610
  }
1585
1611
  throw e;
1586
1612
  }
1587
- const uiHost = host === "0.0.0.0" || host === "::" ? "127.0.0.1" : host;
1588
- process.stdout.write(`ay serve ${scheme}://${host}:${port}\n`);
1589
- process.stdout.write(`token: ${token}\n\n`);
1590
- process.stdout.write(`web console (token in the # is eaten on open):\n`);
1591
- process.stdout.write(` ${scheme}://${uiHost}:${port}/#k=${token}\n\n`);
1592
- process.stdout.write(`connect from another machine:\n`);
1593
- process.stdout.write(` ay ls ${token}@<host>:${port}\n`);
1594
- process.stdout.write(` ay tail ${token}@<host>:${port}:<keyword>\n`);
1595
- process.stdout.write(` ay send ${token}@<host>:${port}:<keyword> "message"\n\n`);
1596
- process.stdout.write(`save as alias:\n`);
1597
- process.stdout.write(` ay remote add <alias> ${scheme}://${token}@<host>:${port}\n\n`);
1598
- if (!useHttps) process.stdout.write("for HTTPS: ay serve --tls-cert cert.pem --tls-key key.pem\n openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes -subj '/CN=localhost'\n\n");
1613
+ if (server) {
1614
+ const uiHost = host === "0.0.0.0" || host === "::" ? "127.0.0.1" : host;
1615
+ process.stdout.write(`ay serve ${scheme}://${host}:${port}\n`);
1616
+ process.stdout.write(`token: ${token}\n\n`);
1617
+ process.stdout.write(`web console (token in the # is eaten on open):\n`);
1618
+ process.stdout.write(` ${scheme}://${uiHost}:${port}/#k=${token}\n\n`);
1619
+ process.stdout.write(`connect from another machine:\n`);
1620
+ process.stdout.write(` ay ls ${token}@<host>:${port}\n`);
1621
+ process.stdout.write(` ay tail ${token}@<host>:${port}:<keyword>\n`);
1622
+ process.stdout.write(` ay send ${token}@<host>:${port}:<keyword> "message"\n\n`);
1623
+ process.stdout.write(`save as alias:\n`);
1624
+ process.stdout.write(` ay remote add <alias> ${scheme}://${token}@<host>:${port}\n\n`);
1625
+ if (!useHttps) process.stdout.write("for HTTPS: ay serve --tls-cert cert.pem --tls-key key.pem\n openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes -subj '/CN=localhost'\n\n");
1626
+ }
1599
1627
  }
1600
1628
  let closeShare;
1601
1629
  if (wantWebrtc) {
@@ -1661,4 +1689,4 @@ Options:
1661
1689
 
1662
1690
  //#endregion
1663
1691
  export { cmdServe };
1664
- //# sourceMappingURL=serve-ClCuMror.js.map
1692
+ //# sourceMappingURL=serve-DLpzWgus.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-ClCuMror.js");
35
+ const { cmdServe } = await import("./serve-DLpzWgus.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-Bwb6P834.js.map
45
+ //# sourceMappingURL=setup-FIJUzpJA.js.map
@@ -1,7 +1,7 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
2
  import "./globalPidIndex-CoNr7tS8.js";
3
3
  import "./configShared-0MnIQ652.js";
4
- import { A as resolveOne, B as writeKeysPaced, C as matchKeyword, D as renderLogTailLines, E as readPtysize, F as snapshotStatus, I as stdinActivityPath, L as stopTipForCli, M as resolveResumeArgs, N as restartHintLines, O as renderRawLog, P as runSubcommand, R as submitAndConfirm, S as listRecords, T as readNotes, V 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 resolveReadWindow, k as renderRawLogLines, 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 waitForLogQuiet } from "./subcommands-DYcGpfkJ.js";
4
+ import { A as resolveOne, B as writeKeysPaced, C as matchKeyword, D as renderLogTailLines, E as readPtysize, F as snapshotStatus, I as stdinActivityPath, L as stopTipForCli, M as resolveResumeArgs, N as restartHintLines, O as renderRawLog, P as runSubcommand, R as submitAndConfirm, S as listRecords, T as readNotes, V 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 resolveReadWindow, k as renderRawLogLines, 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 waitForLogQuiet } from "./subcommands-DH2wTwE0.js";
5
5
  import "./e2e-jb0Hp43q.js";
6
6
  import "./webrtcLink-B7REGtK2.js";
7
7
  import "./remotes-CC-4GuJb.js";
@@ -1126,15 +1126,15 @@ async function runSubcommand(argv) {
1126
1126
  case "restart": return await cmdRestart(rest);
1127
1127
  case "note": return await cmdNote(rest);
1128
1128
  case "serve": {
1129
- const { cmdServe } = await import("./serve-ClCuMror.js");
1129
+ const { cmdServe } = await import("./serve-DLpzWgus.js");
1130
1130
  return cmdServe(rest);
1131
1131
  }
1132
1132
  case "setup": {
1133
- const { cmdSetup } = await import("./setup-Bwb6P834.js");
1133
+ const { cmdSetup } = await import("./setup-FIJUzpJA.js");
1134
1134
  return cmdSetup(rest);
1135
1135
  }
1136
1136
  case "schedule": {
1137
- const { cmdSchedule } = await import("./schedule-OIx0pPXv.js");
1137
+ const { cmdSchedule } = await import("./schedule-D-88854z.js");
1138
1138
  return cmdSchedule(rest);
1139
1139
  }
1140
1140
  case "remote": {
@@ -3969,7 +3969,7 @@ async function cmdNotify(rest) {
3969
3969
  }
3970
3970
  const ensure = async () => {
3971
3971
  if (!argv["ensure-daemon"]) return;
3972
- const { ensureDaemon } = await import("./notifyDaemon-BIAiDk8X.js");
3972
+ const { ensureDaemon } = await import("./notifyDaemon-8w8hFYVd.js");
3973
3973
  await ensureDaemon().catch(() => null);
3974
3974
  };
3975
3975
  await heartbeatWatcher(parent, selfStartedAt);
@@ -4043,7 +4043,7 @@ async function cmdNotifyCursor(args) {
4043
4043
  }
4044
4044
  async function cmdNotifyd(rest) {
4045
4045
  const sub = rest[0] ?? "status";
4046
- const daemon = await import("./notifyDaemon-BIAiDk8X.js");
4046
+ const daemon = await import("./notifyDaemon-8w8hFYVd.js");
4047
4047
  switch (sub) {
4048
4048
  case "run": return daemon.runDaemon();
4049
4049
  case "once": return daemon.runDaemon({ once: true });
@@ -4070,4 +4070,4 @@ async function cmdNotifyd(rest) {
4070
4070
 
4071
4071
  //#endregion
4072
4072
  export { resolveOne as A, writeKeysPaced as B, matchKeyword as C, renderLogTailLines as D, readPtysize as E, snapshotStatus as F, hostId as G, TYPING_BADGE as H, stdinActivityPath as I, readInbox as J, listInboxParents as K, stopTipForCli as L, resolveResumeArgs as M, restartHintLines as N, renderRawLog as O, runSubcommand as P, notifyDir as Q, submitAndConfirm as R, listRecords as S, readNotes as T, appendEvent as U, writeToIpc as V, gcInboxes as W, daemonLockDir as X, shouldStealLock as Y, daemonLockOwnerPath as Z, isPidAlive as _, cmdHelp as a, isUserTyping as b, deriveLiveState as c, extractMenu as d, extractNeedsInput as f, isExitRequest as g, isAgentStuck as h, backoffWhileTyping as i, resolveReadWindow as j, renderRawLogLines as k, deriveLiveStatus as l, finalizedLines as m, READ_PAGE_DEFAULT as n, controlCodeFromName as o, extractTaskCounts as p, liveWatchers as q, TYPING_WINDOW_MS as r, cursorAbs as s, GRACEFUL_EXIT_COMMANDS as t, extractBadges as u, isSlashCommand as v, menuSelectKeys as w, lastStdinAt as x, isSubcommand as y, waitForLogQuiet as z };
4073
- //# sourceMappingURL=subcommands-DYcGpfkJ.js.map
4073
+ //# sourceMappingURL=subcommands-DH2wTwE0.js.map
@@ -1,5 +1,5 @@
1
1
  import { n as logger, t as addTransport } from "./logger-CDIsZ-Pp.js";
2
- import { r as getInstalledPackage } from "./versionChecker-DltRc0f8.js";
2
+ import { r as getInstalledPackage } from "./versionChecker-CGnpYkKV.js";
3
3
  import { t as agentYesHome } from "./agentYesHome-CtHb5b71.js";
4
4
  import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-CNMl13dC.js";
5
5
  import { t as PidStore } from "./pidStore-BIvsBQ8X.js";
@@ -1824,4 +1824,4 @@ function sleep(ms) {
1824
1824
 
1825
1825
  //#endregion
1826
1826
  export { removeControlCharacters as a, AgentContext as i, agentYes as n, config as r, CLIS_CONFIG as t };
1827
- //# sourceMappingURL=ts-l6q9fhuc.js.map
1827
+ //# sourceMappingURL=ts-D2Q8HRwn.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.174.0";
10
+ var version = "1.174.2";
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-DltRc0f8.js.map
218
+ //# sourceMappingURL=versionChecker-CGnpYkKV.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-yes",
3
- "version": "1.174.0",
3
+ "version": "1.174.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",
package/ts/serve.ts CHANGED
@@ -374,6 +374,28 @@ async function managerRunnable(mgr: DaemonManager): Promise<boolean> {
374
374
  }
375
375
  }
376
376
 
377
+ // Which manager is ACTUALLY running our daemon? `resolveDaemonManager` picks by
378
+ // PATH order without a liveness check, so after a bootstrap oxmgr→pm2 fallback a
379
+ // broken oxmgr shim (first on PATH) shadows the pm2 that really holds the daemon
380
+ // — making `ay serve status` report `manager: oxmgr / installed: no` while pm2
381
+ // serves. For reporting, probe each present manager and prefer the one that is
382
+ // runnable AND has our daemon registered; fall back to the first runnable one,
383
+ // else whatever resolveDaemonManager returns.
384
+ async function resolveActiveManager(): Promise<DaemonManager | null> {
385
+ const oxmgr = Bun.which("oxmgr");
386
+ const pm2 = Bun.which("pm2");
387
+ const present: DaemonManager[] = [];
388
+ if (oxmgr) present.push({ id: "oxmgr", bin: oxmgr });
389
+ if (pm2) present.push({ id: "pm2", bin: pm2 });
390
+ let firstRunnable: DaemonManager | null = null;
391
+ for (const m of present) {
392
+ if (!(await managerRunnable(m))) continue;
393
+ firstRunnable ??= m;
394
+ if ((await readDaemonServeArgs(m)) !== null) return m; // this one holds the daemon
395
+ }
396
+ return firstRunnable ?? resolveDaemonManager();
397
+ }
398
+
377
399
  // Install one PM package globally via the SAME JS package manager that installed
378
400
  // `ay` (bun preferred, npm fallback — no Rust toolchain required, so a fresh
379
401
  // Linux box with only bun from setup.sh works), then confirm the resulting
@@ -398,8 +420,15 @@ async function installAndVerify(pkg: "oxmgr" | "pm2"): Promise<DaemonManager | n
398
420
  if (!bin) return null;
399
421
  const mgr: DaemonManager = { id: pkg, bin };
400
422
  if (!(await managerRunnable(mgr))) {
423
+ // Name the actual reason: oxmgr ships a native binary (glibc), pm2 is a
424
+ // Node.js app that needs `node` on PATH — a bun-only box has neither by
425
+ // default, so a generic "glibc mismatch" would mislead for pm2.
426
+ const why =
427
+ pkg === "oxmgr"
428
+ ? "a native/glibc mismatch, e.g. glibc < 2.39"
429
+ : "pm2 needs a Node.js runtime and none was found";
401
430
  process.stderr.write(
402
- `ay serve install: ${pkg} installed but can't exec here (likely a native/glibc mismatch)` +
431
+ `ay serve install: ${pkg} installed but can't exec here (${why})` +
403
432
  (pkg === "oxmgr" ? " — falling back to pm2\n" : "\n"),
404
433
  );
405
434
  return null;
@@ -597,8 +626,9 @@ async function cmdServeDaemon(sub: string, args: string[]): Promise<number> {
597
626
  if (!mgr) {
598
627
  process.stderr.write(
599
628
  "ay serve install: no usable process manager (need oxmgr or pm2)\n" +
600
- " install with: bun add -g pm2\n" +
601
- " or: bun add -g oxmgr (needs glibc ≥ 2.39 on Linux)\n",
629
+ " - oxmgr: bun add -g oxmgr (native binary; needs glibc ≥ 2.39 on Linux)\n" +
630
+ " - pm2: bun add -g pm2 (needs a Node.js runtime on PATH)\n" +
631
+ " On a minimal bun-only box, install node (for pm2) or a newer glibc (for oxmgr).\n",
602
632
  );
603
633
  return 1;
604
634
  }
@@ -826,7 +856,7 @@ async function cmdServeDaemon(sub: string, args: string[]): Promise<number> {
826
856
  // Read-only: never mints a token or disturbs the daemon. `--json` for scripts.
827
857
  async function cmdServeStatus(args: string[]): Promise<number> {
828
858
  const json = args.includes("--json");
829
- const mgr = resolveDaemonManager();
859
+ const mgr = await resolveActiveManager();
830
860
  const token = await loadTokenReadOnly();
831
861
  const shareLink = await readShareLink();
832
862
 
@@ -2364,6 +2394,24 @@ export async function cmdServe(rest: string[]): Promise<number> {
2364
2394
  continue;
2365
2395
  }
2366
2396
  if (inUse) {
2397
+ // The port is wedged by something we can't evict — classically a dead
2398
+ // serve whose spawned child agents inherited its listen-socket handle
2399
+ // (on Windows the socket lacks non-inheritable/CLOEXEC semantics, so it
2400
+ // survives the parent and keeps :port LISTENING under a defunct PID).
2401
+ // Exiting here just feeds a pm2 restart loop that can never re-bind.
2402
+ // When WebRTC is also requested, degrade to WebRTC-only instead: the
2403
+ // console still reaches this machine peer-to-peer with no port, so the
2404
+ // daemon stays useful and stops crash-looping. Only give up when
2405
+ // there's no WebRTC transport to fall back to (pure --http).
2406
+ if (wantWebrtc) {
2407
+ process.stderr.write(
2408
+ `ay serve: port ${port} is still in use after retries — continuing WebRTC-only ` +
2409
+ `(HTTP API disabled). Free the port and restart to re-enable HTTP, ` +
2410
+ `or pick another with --port N.\n`,
2411
+ );
2412
+ server = null;
2413
+ break;
2414
+ }
2367
2415
  process.stderr.write(
2368
2416
  `ay serve: port ${port} is still in use after retries — pick another with --port N,\n` +
2369
2417
  `or run a port-free WebRTC-only share with: ay serve --webrtc\n`,
@@ -2374,22 +2422,26 @@ export async function cmdServe(rest: string[]): Promise<number> {
2374
2422
  }
2375
2423
  }
2376
2424
 
2377
- const uiHost = host === "0.0.0.0" || host === "::" ? "127.0.0.1" : host;
2378
- process.stdout.write(`ay serve ${scheme}://${host}:${port}\n`);
2379
- process.stdout.write(`token: ${token}\n\n`);
2380
- process.stdout.write(`web console (token in the # is eaten on open):\n`);
2381
- process.stdout.write(` ${scheme}://${uiHost}:${port}/#k=${token}\n\n`);
2382
- process.stdout.write(`connect from another machine:\n`);
2383
- process.stdout.write(` ay ls ${token}@<host>:${port}\n`);
2384
- process.stdout.write(` ay tail ${token}@<host>:${port}:<keyword>\n`);
2385
- process.stdout.write(` ay send ${token}@<host>:${port}:<keyword> "message"\n\n`);
2386
- process.stdout.write(`save as alias:\n`);
2387
- process.stdout.write(` ay remote add <alias> ${scheme}://${token}@<host>:${port}\n\n`);
2388
- if (!useHttps) {
2389
- process.stdout.write(
2390
- `for HTTPS: ay serve --tls-cert cert.pem --tls-key key.pem\n` +
2391
- ` openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes -subj '/CN=localhost'\n\n`,
2392
- );
2425
+ // server is null only when we degraded to WebRTC-only above (port wedged);
2426
+ // skip the HTTP connection banner since nothing is listening on the port.
2427
+ if (server) {
2428
+ const uiHost = host === "0.0.0.0" || host === "::" ? "127.0.0.1" : host;
2429
+ process.stdout.write(`ay serve ${scheme}://${host}:${port}\n`);
2430
+ process.stdout.write(`token: ${token}\n\n`);
2431
+ process.stdout.write(`web console (token in the # is eaten on open):\n`);
2432
+ process.stdout.write(` ${scheme}://${uiHost}:${port}/#k=${token}\n\n`);
2433
+ process.stdout.write(`connect from another machine:\n`);
2434
+ process.stdout.write(` ay ls ${token}@<host>:${port}\n`);
2435
+ process.stdout.write(` ay tail ${token}@<host>:${port}:<keyword>\n`);
2436
+ process.stdout.write(` ay send ${token}@<host>:${port}:<keyword> "message"\n\n`);
2437
+ process.stdout.write(`save as alias:\n`);
2438
+ process.stdout.write(` ay remote add <alias> ${scheme}://${token}@<host>:${port}\n\n`);
2439
+ if (!useHttps) {
2440
+ process.stdout.write(
2441
+ `for HTTPS: ay serve --tls-cert cert.pem --tls-key key.pem\n` +
2442
+ ` openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes -subj '/CN=localhost'\n\n`,
2443
+ );
2444
+ }
2393
2445
  }
2394
2446
  }
2395
2447
 
@@ -1,8 +0,0 @@
1
- import "./ts-l6q9fhuc.js";
2
- import "./logger-CDIsZ-Pp.js";
3
- import "./versionChecker-DltRc0f8.js";
4
- import "./pidStore-BIvsBQ8X.js";
5
- import "./globalPidIndex-CoNr7tS8.js";
6
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-DRYgob0H.js";
7
-
8
- export { SUPPORTED_CLIS };