agent-yes 1.132.0 → 1.132.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 (36) hide show
  1. package/dist/{SUPPORTED_CLIS-eDyeNYJQ.js → SUPPORTED_CLIS-BPesg_4L.js} +2 -2
  2. package/dist/SUPPORTED_CLIS-DjJdQYz6.js +8 -0
  3. package/dist/{agent-yes.config-D6ycMApr.js → agent-yes.config-BKtCmmy9.js} +3 -3
  4. package/dist/{agentYesHome-BvaUOzCV.js → agentYesHome-_eJa3DaX.js} +1 -1
  5. package/dist/cli.js +12 -15
  6. package/dist/{configShared-C5QaNPnz.js → configShared-C1C04bbq.js} +1 -1
  7. package/dist/{globalPidIndex-C7r2m6s7.js → globalPidIndex-DlmmJlO8.js} +2 -2
  8. package/dist/index.js +5 -5
  9. package/dist/invokedCli-zdFbz1ST.js +25 -0
  10. package/dist/{logger-B9h0djqx.js → logger-CDIsZ-Pp.js} +1 -1
  11. package/dist/pidStore-DfHh3Yt0.js +5 -0
  12. package/dist/{pidStore-DWQoGxxA.js → pidStore-fqXqTKkh.js} +4 -4
  13. package/dist/{reaper-BLVA780B.js → reaper-BQgDb85W.js} +1 -1
  14. package/dist/{reaper-BkjPN7mw.js → reaper-C-eWAxIj.js} +2 -2
  15. package/dist/{remotes-BRCDVnR7.js → remotes-BdankQeI.js} +1 -1
  16. package/dist/{remotes-D8GvSbhf.js → remotes-PKKjfTI1.js} +1 -1
  17. package/dist/{runningLock-CJxsoGdb.js → runningLock-V4qvXgAw.js} +1 -1
  18. package/dist/{schedule-B53gHsN7.js → schedule-aNvMTdRy.js} +8 -8
  19. package/dist/{serve-Bu-QzAlr.js → serve-znyNiZVc.js} +13 -13
  20. package/dist/{setup-DTgN_sqc.js → setup-BqEV-ogv.js} +3 -3
  21. package/dist/{share-Cvb0PBKg.js → share-CoyAOa6e.js} +1 -1
  22. package/dist/{subcommands-CjrE1pU-.js → subcommands-DNT7eMot.js} +5 -5
  23. package/dist/{subcommands-CpEK563F.js → subcommands-M3r5XiOZ.js} +27 -17
  24. package/dist/{tray-BVnJLThD.js → tray-DsTv-C04.js} +2 -2
  25. package/dist/{ts-FPleHqxr.js → ts-D9W-U-KX.js} +9 -9
  26. package/dist/{versionChecker-4ovR76r7.js → versionChecker-CVnISin2.js} +2 -2
  27. package/dist/{workspaceConfig-BJO4fzEn.js → workspaceConfig-BCOqRBEW.js} +2 -2
  28. package/package.json +1 -1
  29. package/ts/cli.ts +7 -2
  30. package/ts/invokedCli.spec.ts +30 -0
  31. package/ts/invokedCli.ts +32 -0
  32. package/ts/parseCliArgs.ts +4 -17
  33. package/ts/subcommands.spec.ts +36 -0
  34. package/ts/subcommands.ts +0 -0
  35. package/dist/SUPPORTED_CLIS-DnObTI1A.js +0 -8
  36. package/dist/pidStore-BweOirbR.js +0 -5
@@ -1,8 +1,8 @@
1
- import { t as CLIS_CONFIG } from "./ts-FPleHqxr.js";
1
+ import { t as CLIS_CONFIG } from "./ts-D9W-U-KX.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-eDyeNYJQ.js.map
8
+ //# sourceMappingURL=SUPPORTED_CLIS-BPesg_4L.js.map
@@ -0,0 +1,8 @@
1
+ import "./ts-D9W-U-KX.js";
2
+ import "./logger-CDIsZ-Pp.js";
3
+ import "./versionChecker-CVnISin2.js";
4
+ import "./pidStore-fqXqTKkh.js";
5
+ import "./globalPidIndex-DlmmJlO8.js";
6
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BPesg_4L.js";
7
+
8
+ export { SUPPORTED_CLIS };
@@ -1,5 +1,5 @@
1
- import { n as logger } from "./logger-B9h0djqx.js";
2
- import { n as normalizeAgentYesConfig, t as loadSharedCliDefaults } from "./configShared-C5QaNPnz.js";
1
+ import { n as logger } from "./logger-CDIsZ-Pp.js";
2
+ import { n as normalizeAgentYesConfig, t as loadSharedCliDefaults } from "./configShared-C1C04bbq.js";
3
3
  import os from "node:os";
4
4
  import { access, mkdir, readFile, writeFile } from "node:fs/promises";
5
5
  import path from "node:path";
@@ -226,4 +226,4 @@ async function getDefaultConfig() {
226
226
 
227
227
  //#endregion
228
228
  export { agent_yes_config_default as default };
229
- //# sourceMappingURL=agent-yes.config-D6ycMApr.js.map
229
+ //# sourceMappingURL=agent-yes.config-BKtCmmy9.js.map
@@ -22,4 +22,4 @@ function agentYesHome() {
22
22
 
23
23
  //#endregion
24
24
  export { agentYesHome as t };
25
- //# sourceMappingURL=agentYesHome-BvaUOzCV.js.map
25
+ //# sourceMappingURL=agentYesHome-_eJa3DaX.js.map
package/dist/cli.js CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bun
2
- import { n as logger } from "./logger-B9h0djqx.js";
3
- import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-4ovR76r7.js";
2
+ import { t as invokedCliName } from "./invokedCli-zdFbz1ST.js";
3
+ import { n as logger } from "./logger-CDIsZ-Pp.js";
4
+ import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-CVnISin2.js";
4
5
  import { argv } from "process";
5
6
  import { execFileSync, spawn } from "child_process";
6
7
  import ms from "ms";
@@ -16,12 +17,7 @@ import path from "path";
16
17
  * This is a test helper that mirrors the parsing logic in cli.ts
17
18
  */
18
19
  function parseCliArgs(argv, supportedClis) {
19
- const scriptBaseName = argv[1]?.split(/[/\\]/).at(-1)?.replace(/(\.[jt]s)?$/, "") || "";
20
- const CLI_ALIASES = { cy: "claude" };
21
- const cliName = (() => {
22
- const raw = scriptBaseName.replace(/^(cli|agent)(-yes)?$/, "").replace(/^ay$/, "").replace(/-yes$/, "") || void 0;
23
- return raw && CLI_ALIASES[raw] || raw;
24
- })();
20
+ const cliName = invokedCliName(argv);
25
21
  const parsedArgv = yargs(hideBin(argv)).usage("Usage: $0 [cli] [agent-yes args] [agent-cli args] [--] [prompts...]").example("$0 claude --timeout=30s -- solve all todos in my codebase, commit one by one", "Run Claude with a 30 seconds idle timeout (will type /exit when timeout), everything after `--` will be treated as the prompt").example("$0 claude --stdpush", "Run Claude with external stdin input enabled via --append-prompt").option("robust", {
26
22
  type: "boolean",
27
23
  default: true,
@@ -481,13 +477,14 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
481
477
  }
482
478
  {
483
479
  const rawArg = process.argv[2];
480
+ const managerCommands = !invokedCliName(process.argv);
484
481
  const isHelpFlag = rawArg === "-h" || rawArg === "--help";
485
- const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-CjrE1pU-.js");
482
+ const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-DNT7eMot.js");
486
483
  if (isHelpFlag && process.argv.length === 3) {
487
- cmdHelp();
484
+ cmdHelp(managerCommands);
488
485
  process.exit(0);
489
486
  }
490
- if (isSubcommand(rawArg)) {
487
+ if (isSubcommand(rawArg, managerCommands)) {
491
488
  const code = await runSubcommand(process.argv);
492
489
  process.exit(code ?? 0);
493
490
  }
@@ -496,12 +493,12 @@ await checkAndAutoUpdate();
496
493
  logger.info(versionString());
497
494
  const config = parseCliArgs(process.argv);
498
495
  if (config.tray) {
499
- const { startTray } = await import("./tray-BVnJLThD.js");
496
+ const { startTray } = await import("./tray-DsTv-C04.js");
500
497
  await startTray();
501
498
  await new Promise(() => {});
502
499
  }
503
500
  {
504
- const { ensureTray } = await import("./tray-BVnJLThD.js");
501
+ const { ensureTray } = await import("./tray-DsTv-C04.js");
505
502
  ensureTray();
506
503
  }
507
504
  if (config.useRust) {
@@ -515,7 +512,7 @@ if (config.useRust) {
515
512
  }
516
513
  }
517
514
  if (rustBinary) {
518
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-DnObTI1A.js");
515
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-DjJdQYz6.js");
519
516
  const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
520
517
  if (config.verbose) {
521
518
  console.log(`[rust] Using binary: ${rustBinary}`);
@@ -545,7 +542,7 @@ if (config.showVersion) {
545
542
  process.exit(0);
546
543
  }
547
544
  if (config.appendPrompt) {
548
- const { PidStore } = await import("./pidStore-BweOirbR.js");
545
+ const { PidStore } = await import("./pidStore-DfHh3Yt0.js");
549
546
  const ipcPath = await PidStore.findActiveFifo(process.cwd());
550
547
  if (!ipcPath) {
551
548
  console.error("No active agent with IPC found in current directory.");
@@ -68,4 +68,4 @@ async function loadSharedCliDefaults(fromUrl = import.meta.url) {
68
68
 
69
69
  //#endregion
70
70
  export { normalizeAgentYesConfig as n, loadSharedCliDefaults as t };
71
- //# sourceMappingURL=configShared-C5QaNPnz.js.map
71
+ //# sourceMappingURL=configShared-C1C04bbq.js.map
@@ -1,4 +1,4 @@
1
- import { n as logger } from "./logger-B9h0djqx.js";
1
+ import { n as logger } from "./logger-CDIsZ-Pp.js";
2
2
  import { appendFile, mkdir, readFile, rename, unlink, writeFile } from "fs/promises";
3
3
  import { homedir } from "os";
4
4
  import path from "path";
@@ -188,4 +188,4 @@ async function pruneOldLogs(maxAgeMs = retentionMs()) {
188
188
 
189
189
  //#endregion
190
190
  export { updateGlobalPidStatus as a, readGlobalPids as i, maybeCompactGlobalPids as n, pruneOldLogs as r, appendGlobalPid as t };
191
- //# sourceMappingURL=globalPidIndex-C7r2m6s7.js.map
191
+ //# sourceMappingURL=globalPidIndex-DlmmJlO8.js.map
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-FPleHqxr.js";
2
- import "./logger-B9h0djqx.js";
3
- import "./versionChecker-4ovR76r7.js";
4
- import "./pidStore-DWQoGxxA.js";
5
- import "./globalPidIndex-C7r2m6s7.js";
1
+ import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-D9W-U-KX.js";
2
+ import "./logger-CDIsZ-Pp.js";
3
+ import "./versionChecker-CVnISin2.js";
4
+ import "./pidStore-fqXqTKkh.js";
5
+ import "./globalPidIndex-DlmmJlO8.js";
6
6
 
7
7
  export { AgentContext, CLIS_CONFIG, config, agentYes as default, removeControlCharacters };
@@ -0,0 +1,25 @@
1
+ //#region ts/invokedCli.ts
2
+ /**
3
+ * Resolve which agent CLI a binary invocation implies, from the binary name in
4
+ * argv[1].
5
+ *
6
+ * Every published bin (cy, claude-yes, codex-yes, ay, agent-yes, …) is the SAME
7
+ * cli.ts entry; the binary's *name* is what selects the default agent. A
8
+ * cli-bound alias — `cy` (= claude-yes = "agent-yes claude"), `codex-yes`, … —
9
+ * resolves to that agent; the generic manager entry (`ay` / `agent-yes` / `cli`)
10
+ * resolves to `undefined`. Callers use that `undefined` to tell "the agent-yes
11
+ * manager" apart from "a cli-bound runner alias".
12
+ */
13
+ const CLI_ALIASES = { cy: "claude" };
14
+ /**
15
+ * The agent CLI implied by argv[1] (cy / claude-yes → "claude", codex-yes →
16
+ * "codex", …), or `undefined` for the generic `ay` / `agent-yes` / `cli` entry.
17
+ */
18
+ function invokedCliName(argv) {
19
+ const raw = (argv[1]?.split(/[/\\]/).at(-1)?.replace(/(\.[jt]s)?$/, "") || "").replace(/^(cli|agent)(-yes)?$/, "").replace(/^ay$/, "").replace(/-yes$/, "") || void 0;
20
+ return raw && CLI_ALIASES[raw] || raw;
21
+ }
22
+
23
+ //#endregion
24
+ export { invokedCliName as t };
25
+ //# sourceMappingURL=invokedCli-zdFbz1ST.js.map
@@ -48,4 +48,4 @@ const logger = {
48
48
 
49
49
  //#endregion
50
50
  export { logger as n, addTransport as t };
51
- //# sourceMappingURL=logger-B9h0djqx.js.map
51
+ //# sourceMappingURL=logger-CDIsZ-Pp.js.map
@@ -0,0 +1,5 @@
1
+ import "./logger-CDIsZ-Pp.js";
2
+ import { t as PidStore } from "./pidStore-fqXqTKkh.js";
3
+ import "./globalPidIndex-DlmmJlO8.js";
4
+
5
+ export { PidStore };
@@ -1,6 +1,6 @@
1
- import { n as logger } from "./logger-B9h0djqx.js";
2
- import { t as agentYesHome } from "./agentYesHome-BvaUOzCV.js";
3
- import { a as updateGlobalPidStatus, n as maybeCompactGlobalPids, r as pruneOldLogs, t as appendGlobalPid } from "./globalPidIndex-C7r2m6s7.js";
1
+ import { n as logger } from "./logger-CDIsZ-Pp.js";
2
+ import { t as agentYesHome } from "./agentYesHome-_eJa3DaX.js";
3
+ import { a as updateGlobalPidStatus, n as maybeCompactGlobalPids, r as pruneOldLogs, t as appendGlobalPid } from "./globalPidIndex-DlmmJlO8.js";
4
4
  import { closeSync, existsSync, fsyncSync, openSync } from "fs";
5
5
  import { appendFile, mkdir, readFile, rename, writeFile } from "fs/promises";
6
6
  import path from "path";
@@ -367,4 +367,4 @@ pid-db/
367
367
 
368
368
  //#endregion
369
369
  export { PidStore as t };
370
- //# sourceMappingURL=pidStore-DWQoGxxA.js.map
370
+ //# sourceMappingURL=pidStore-fqXqTKkh.js.map
@@ -1,3 +1,3 @@
1
- import { n as register, r as sweep, t as pgidForWrapper } from "./reaper-BkjPN7mw.js";
1
+ import { n as register, r as sweep, t as pgidForWrapper } from "./reaper-C-eWAxIj.js";
2
2
 
3
3
  export { sweep };
@@ -1,4 +1,4 @@
1
- import { t as agentYesHome } from "./agentYesHome-BvaUOzCV.js";
1
+ import { t as agentYesHome } from "./agentYesHome-_eJa3DaX.js";
2
2
  import { appendFile, mkdir, readFile, rename, writeFile } from "fs/promises";
3
3
  import path from "path";
4
4
 
@@ -83,4 +83,4 @@ async function sweep() {
83
83
 
84
84
  //#endregion
85
85
  export { register as n, sweep as r, pgidForWrapper as t };
86
- //# sourceMappingURL=reaper-BkjPN7mw.js.map
86
+ //# sourceMappingURL=reaper-C-eWAxIj.js.map
@@ -1,3 +1,3 @@
1
- import { a as resolveRemoteSpec, i as readRemotes, n as deleteRemoteAlias, o as writeRemoteAlias, r as parseDirectRemoteSpec, t as cmdRemote } from "./remotes-D8GvSbhf.js";
1
+ import { a as resolveRemoteSpec, i as readRemotes, n as deleteRemoteAlias, o as writeRemoteAlias, r as parseDirectRemoteSpec, t as cmdRemote } from "./remotes-PKKjfTI1.js";
2
2
 
3
3
  export { cmdRemote };
@@ -147,4 +147,4 @@ async function cmdRemote(rest) {
147
147
 
148
148
  //#endregion
149
149
  export { resolveRemoteSpec as a, readRemotes as i, deleteRemoteAlias as n, writeRemoteAlias as o, parseDirectRemoteSpec as r, cmdRemote as t };
150
- //# sourceMappingURL=remotes-D8GvSbhf.js.map
150
+ //# sourceMappingURL=remotes-PKKjfTI1.js.map
@@ -276,4 +276,4 @@ function shouldUseLock(_cwd) {
276
276
 
277
277
  //#endregion
278
278
  export { shouldUseLock as i, getRunningAgentCount as n, releaseLock as r, acquireLock as t };
279
- //# sourceMappingURL=runningLock-CJxsoGdb.js.map
279
+ //# sourceMappingURL=runningLock-V4qvXgAw.js.map
@@ -1,10 +1,10 @@
1
- import "./ts-FPleHqxr.js";
2
- import "./logger-B9h0djqx.js";
3
- import "./versionChecker-4ovR76r7.js";
4
- import "./pidStore-DWQoGxxA.js";
5
- import "./globalPidIndex-C7r2m6s7.js";
6
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-eDyeNYJQ.js";
7
- import { n as resolveSpawnCwd } from "./workspaceConfig-BJO4fzEn.js";
1
+ import "./ts-D9W-U-KX.js";
2
+ import "./logger-CDIsZ-Pp.js";
3
+ import "./versionChecker-CVnISin2.js";
4
+ import "./pidStore-fqXqTKkh.js";
5
+ import "./globalPidIndex-DlmmJlO8.js";
6
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BPesg_4L.js";
7
+ import { n as resolveSpawnCwd } from "./workspaceConfig-BCOqRBEW.js";
8
8
  import { createHash } from "node:crypto";
9
9
 
10
10
  //#region ts/oxmgrService.ts
@@ -141,4 +141,4 @@ async function cmdSchedule(rest) {
141
141
 
142
142
  //#endregion
143
143
  export { cmdSchedule };
144
- //# sourceMappingURL=schedule-B53gHsN7.js.map
144
+ //# sourceMappingURL=schedule-aNvMTdRy.js.map
@@ -1,13 +1,13 @@
1
- import "./ts-FPleHqxr.js";
2
- import "./logger-B9h0djqx.js";
3
- import { r as getInstalledPackage } from "./versionChecker-4ovR76r7.js";
4
- import "./pidStore-DWQoGxxA.js";
5
- import { a as updateGlobalPidStatus } from "./globalPidIndex-C7r2m6s7.js";
6
- import { t as pgidForWrapper } from "./reaper-BkjPN7mw.js";
7
- import "./configShared-C5QaNPnz.js";
8
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-eDyeNYJQ.js";
9
- import "./remotes-D8GvSbhf.js";
10
- import { d as listRecords, g as resolveOne, i as controlCodeFromName, m as renderRawLog, p as readNotes, s as extractTaskCounts, x as writeToIpc, y as snapshotStatus } from "./subcommands-CpEK563F.js";
1
+ import "./ts-D9W-U-KX.js";
2
+ import "./logger-CDIsZ-Pp.js";
3
+ import { r as getInstalledPackage } from "./versionChecker-CVnISin2.js";
4
+ import "./pidStore-fqXqTKkh.js";
5
+ import { a as updateGlobalPidStatus } from "./globalPidIndex-DlmmJlO8.js";
6
+ import { t as pgidForWrapper } from "./reaper-C-eWAxIj.js";
7
+ import "./configShared-C1C04bbq.js";
8
+ import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-BPesg_4L.js";
9
+ import "./remotes-PKKjfTI1.js";
10
+ import { d as listRecords, g as resolveOne, i as controlCodeFromName, m as renderRawLog, p as readNotes, s as extractTaskCounts, x as writeToIpc, y as snapshotStatus } from "./subcommands-M3r5XiOZ.js";
11
11
  import yargs from "yargs";
12
12
  import { mkdir, open, readFile, stat, writeFile } from "fs/promises";
13
13
  import { homedir, hostname, userInfo } from "os";
@@ -247,7 +247,7 @@ async function cmdServeDaemon(sub, args) {
247
247
  let shareLink = null;
248
248
  let shareLinkMinted = false;
249
249
  if (webrtcDaemon) try {
250
- const { loadOrCreateShareRoom, shareLinkFromRoomUrl } = await import("./share-Cvb0PBKg.js");
250
+ const { loadOrCreateShareRoom, shareLinkFromRoomUrl } = await import("./share-CoyAOa6e.js");
251
251
  const explicit = explicitWebrtcUrl(effArgs);
252
252
  shareLink = shareLinkFromRoomUrl(explicit ?? await loadOrCreateShareRoom());
253
253
  shareLinkMinted = !explicit;
@@ -1087,7 +1087,7 @@ Options:
1087
1087
  const webrtcVal = argv.webrtc ?? argv.share;
1088
1088
  const explicitUrl = typeof webrtcVal === "string" && webrtcVal.startsWith("webrtc://") ? webrtcVal : void 0;
1089
1089
  try {
1090
- const { startShare, loadOrCreateShareRoom } = await import("./share-Cvb0PBKg.js");
1090
+ const { startShare, loadOrCreateShareRoom } = await import("./share-CoyAOa6e.js");
1091
1091
  const linkFile = path.join(process.env.AGENT_YES_HOME ?? path.join(homedir(), ".agent-yes"), ".share-link");
1092
1092
  const announce = async (room, link, rotated) => {
1093
1093
  const lead = rotated ? "the room was rejected by signaling (stale generation) — rotated to a fresh link" : "shared over WebRTC — open this link (the token is eaten from the URL on open)";
@@ -1142,4 +1142,4 @@ Options:
1142
1142
 
1143
1143
  //#endregion
1144
1144
  export { cmdServe };
1145
- //# sourceMappingURL=serve-Bu-QzAlr.js.map
1145
+ //# sourceMappingURL=serve-znyNiZVc.js.map
@@ -1,4 +1,4 @@
1
- import { r as setWorkspaceRoot, t as getWorkspaceRoot } from "./workspaceConfig-BJO4fzEn.js";
1
+ import { r as setWorkspaceRoot, t as getWorkspaceRoot } from "./workspaceConfig-BCOqRBEW.js";
2
2
  import { existsSync } from "node:fs";
3
3
  import { stdin, stdout } from "node:process";
4
4
  import { createInterface } from "node:readline/promises";
@@ -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-Bu-QzAlr.js");
35
+ const { cmdServe } = await import("./serve-znyNiZVc.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-DTgN_sqc.js.map
45
+ //# sourceMappingURL=setup-BqEV-ogv.js.map
@@ -706,4 +706,4 @@ async function startShare(opts) {
706
706
 
707
707
  //#endregion
708
708
  export { loadOrCreateShareRoom, shareLinkFromRoomUrl, startShare };
709
- //# sourceMappingURL=share-Cvb0PBKg.js.map
709
+ //# sourceMappingURL=share-CoyAOa6e.js.map
@@ -1,7 +1,7 @@
1
- import "./logger-B9h0djqx.js";
2
- import "./globalPidIndex-C7r2m6s7.js";
3
- import "./configShared-C5QaNPnz.js";
4
- import "./remotes-D8GvSbhf.js";
5
- import { _ as resolveReadWindow, a as cursorAbs, b as stopTipForCli, c as finalizedLines, d as listRecords, f as matchKeyword, g as resolveOne, h as renderRawLogLines, i as controlCodeFromName, l as isPidAlive, m as renderRawLog, n as READ_PAGE_DEFAULT, o as extractNeedsInput, p as readNotes, r as cmdHelp, s as extractTaskCounts, t as GRACEFUL_EXIT_COMMANDS, u as isSubcommand, v as runSubcommand, x as writeToIpc, y as snapshotStatus } from "./subcommands-CpEK563F.js";
1
+ import "./logger-CDIsZ-Pp.js";
2
+ import "./globalPidIndex-DlmmJlO8.js";
3
+ import "./configShared-C1C04bbq.js";
4
+ import "./remotes-PKKjfTI1.js";
5
+ import { _ as resolveReadWindow, a as cursorAbs, b as stopTipForCli, c as finalizedLines, d as listRecords, f as matchKeyword, g as resolveOne, h as renderRawLogLines, i as controlCodeFromName, l as isPidAlive, m as renderRawLog, n as READ_PAGE_DEFAULT, o as extractNeedsInput, p as readNotes, r as cmdHelp, s as extractTaskCounts, t as GRACEFUL_EXIT_COMMANDS, u as isSubcommand, v as runSubcommand, x as writeToIpc, y as snapshotStatus } from "./subcommands-M3r5XiOZ.js";
6
6
 
7
7
  export { cmdHelp, isSubcommand, runSubcommand };
@@ -1,7 +1,8 @@
1
- import { t as agentYesHome } from "./agentYesHome-BvaUOzCV.js";
2
- import { a as updateGlobalPidStatus, i as readGlobalPids } from "./globalPidIndex-C7r2m6s7.js";
3
- import { t as loadSharedCliDefaults } from "./configShared-C5QaNPnz.js";
4
- import { a as resolveRemoteSpec, i as readRemotes } from "./remotes-D8GvSbhf.js";
1
+ import { t as invokedCliName } from "./invokedCli-zdFbz1ST.js";
2
+ import { t as agentYesHome } from "./agentYesHome-_eJa3DaX.js";
3
+ import { a as updateGlobalPidStatus, i as readGlobalPids } from "./globalPidIndex-DlmmJlO8.js";
4
+ import { t as loadSharedCliDefaults } from "./configShared-C1C04bbq.js";
5
+ import { a as resolveRemoteSpec, i as readRemotes } from "./remotes-PKKjfTI1.js";
5
6
  import ms from "ms";
6
7
  import yargs from "yargs";
7
8
  import { appendFile, mkdir, open, readFile, stat, writeFile } from "fs/promises";
@@ -489,15 +490,22 @@ const SUBCOMMANDS = new Set([
489
490
  "restart",
490
491
  "note",
491
492
  "serve",
492
- "setup",
493
493
  "schedule",
494
494
  "remote",
495
495
  "reap",
496
496
  "help"
497
497
  ]);
498
+ const MANAGER_SUBCOMMANDS = new Set(["setup"]);
498
499
  const IDLE_THRESHOLD_MS = 60 * 1e3;
499
- function isSubcommand(name) {
500
- return !!name && SUBCOMMANDS.has(name);
500
+ /**
501
+ * Whether `name` is a subcommand. `managerCommands` (default true, for the
502
+ * generic `ay`/`agent-yes` entry) additionally admits manager-only commands
503
+ * like `setup`; pass false for a cli-bound alias (cy/claude-yes/…) so those
504
+ * names fall through to running the agent instead.
505
+ */
506
+ function isSubcommand(name, managerCommands = true) {
507
+ if (!name) return false;
508
+ return SUBCOMMANDS.has(name) || managerCommands && MANAGER_SUBCOMMANDS.has(name);
501
509
  }
502
510
  /**
503
511
  * Top-level entry. Returns the desired process exit code, or null if argv
@@ -505,7 +513,8 @@ function isSubcommand(name) {
505
513
  */
506
514
  async function runSubcommand(argv) {
507
515
  const sub = argv[2];
508
- if (!isSubcommand(sub)) return null;
516
+ const managerCommands = !invokedCliName(argv);
517
+ if (!isSubcommand(sub, managerCommands)) return null;
509
518
  const rest = argv.slice(3);
510
519
  try {
511
520
  switch (sub) {
@@ -524,25 +533,25 @@ async function runSubcommand(argv) {
524
533
  case "restart": return await cmdRestart(rest);
525
534
  case "note": return await cmdNote(rest);
526
535
  case "serve": {
527
- const { cmdServe } = await import("./serve-Bu-QzAlr.js");
536
+ const { cmdServe } = await import("./serve-znyNiZVc.js");
528
537
  return cmdServe(rest);
529
538
  }
530
539
  case "setup": {
531
- const { cmdSetup } = await import("./setup-DTgN_sqc.js");
540
+ const { cmdSetup } = await import("./setup-BqEV-ogv.js");
532
541
  return cmdSetup(rest);
533
542
  }
534
543
  case "schedule": {
535
- const { cmdSchedule } = await import("./schedule-B53gHsN7.js");
544
+ const { cmdSchedule } = await import("./schedule-aNvMTdRy.js");
536
545
  return cmdSchedule(rest);
537
546
  }
538
547
  case "remote": {
539
- const { cmdRemote } = await import("./remotes-BRCDVnR7.js");
548
+ const { cmdRemote } = await import("./remotes-BdankQeI.js");
540
549
  return cmdRemote(rest);
541
550
  }
542
551
  case "reap":
543
- await (await import("./reaper-BLVA780B.js")).sweep();
552
+ await (await import("./reaper-BQgDb85W.js")).sweep();
544
553
  return 0;
545
- case "help": return cmdHelp();
554
+ case "help": return cmdHelp(managerCommands);
546
555
  default: return null;
547
556
  }
548
557
  } catch (err) {
@@ -551,8 +560,9 @@ async function runSubcommand(argv) {
551
560
  return 1;
552
561
  }
553
562
  }
554
- function cmdHelp() {
555
- process.stdout.write("ay - agent-yes CLI\n\nManagement:\n ay ls [keyword] list running agents\n ay tail [-f] [-n N] <keyword> last N lines (96), -f to follow\n ay read <keyword> [page opts] paginate: --last/--head N, --range A:B,\n --before-line L [--limit N]\n ay cat <keyword> full log\n ay head <keyword> first N lines\n ay send <keyword> <msg> send a message\n ay attach <keyword> interactive attach (detach: Ctrl-\\)\n ay stop <keyword> graceful shutdown (/exit for claude/codex)\n ay status <keyword> agent status snapshot\n ay result <keyword> [--wait] pull an agent's structured result envelope\n ay result set '<json>' (inside an agent) deposit your result envelope\n ay reap kill process groups leaked by dead agents\n\nRemote:\n ay setup guided setup: pick a workspace, share to agent-yes.com\n ay schedule <when> <cli> -- <msg> run an agent on a schedule (HH:MM or cron)\n ay serve [--port N] start HTTP API server (prints token)\n ay serve status show serve daemon/server status\n ay remote add <alias> http://<token>@<host>:<port>\n ay remote ls / rm <alias> manage saved remotes\n ay ls <token>@<host>:<port> connect inline (no alias needed)\n ay send <token>@<host>:<port>:<kw> <msg>\n\nRun an agent:\n ay [claude|codex|gemini|...] [options] -- [prompt]\n ay claude -- \"fix the bug in auth.ts\"\n ay claude --help full agent-runner options\n\nLabs (examples at https://github.com/snomiao/agent-yes/tree/main/lab):\n local-role-play/ designer + builder on one machine\n http-remote/ ay serve remote access demo\n p2p-pairing/ libp2p P2P (needs: cargo build --features swarm)\n");
563
+ function cmdHelp(managerCommands = true) {
564
+ const setupLine = managerCommands ? ` ay setup guided setup: pick a workspace, share to agent-yes.com\n` : ``;
565
+ process.stdout.write("ay - agent-yes CLI\n\nManagement:\n ay ls [keyword] list running agents\n ay tail [-f] [-n N] <keyword> last N lines (96), -f to follow\n ay read <keyword> [page opts] paginate: --last/--head N, --range A:B,\n --before-line L [--limit N]\n ay cat <keyword> full log\n ay head <keyword> first N lines\n ay send <keyword> <msg> send a message\n ay attach <keyword> interactive attach (detach: Ctrl-\\)\n ay stop <keyword> graceful shutdown (/exit for claude/codex)\n ay status <keyword> agent status snapshot\n ay result <keyword> [--wait] pull an agent's structured result envelope\n ay result set '<json>' (inside an agent) deposit your result envelope\n ay reap kill process groups leaked by dead agents\n\nRemote:\n" + setupLine + " ay schedule <when> <cli> -- <msg> run an agent on a schedule (HH:MM or cron)\n ay serve [--port N] start HTTP API server (prints token)\n ay serve status show serve daemon/server status\n ay remote add <alias> http://<token>@<host>:<port>\n ay remote ls / rm <alias> manage saved remotes\n ay ls <token>@<host>:<port> connect inline (no alias needed)\n ay send <token>@<host>:<port>:<kw> <msg>\n\nRun an agent:\n ay [claude|codex|gemini|...] [options] -- [prompt]\n ay claude -- \"fix the bug in auth.ts\"\n ay claude --help full agent-runner options\n\nLabs (examples at https://github.com/snomiao/agent-yes/tree/main/lab):\n local-role-play/ designer + builder on one machine\n http-remote/ ay serve remote access demo\n p2p-pairing/ libp2p P2P (needs: cargo build --features swarm)\n");
556
566
  return 0;
557
567
  }
558
568
  function matchKeyword(record, keyword) {
@@ -2408,4 +2418,4 @@ async function cmdResultSet(rest) {
2408
2418
 
2409
2419
  //#endregion
2410
2420
  export { resolveReadWindow as _, cursorAbs as a, stopTipForCli as b, finalizedLines as c, listRecords as d, matchKeyword as f, resolveOne as g, renderRawLogLines as h, controlCodeFromName as i, isPidAlive as l, renderRawLog as m, READ_PAGE_DEFAULT as n, extractNeedsInput as o, readNotes as p, cmdHelp as r, extractTaskCounts as s, GRACEFUL_EXIT_COMMANDS as t, isSubcommand as u, runSubcommand as v, writeToIpc as x, snapshotStatus as y };
2411
- //# sourceMappingURL=subcommands-CpEK563F.js.map
2421
+ //# sourceMappingURL=subcommands-M3r5XiOZ.js.map
@@ -1,4 +1,4 @@
1
- import { n as getRunningAgentCount } from "./runningLock-CJxsoGdb.js";
1
+ import { n as getRunningAgentCount } from "./runningLock-V4qvXgAw.js";
2
2
  import { existsSync } from "fs";
3
3
  import { mkdir, readFile, unlink, writeFile } from "fs/promises";
4
4
  import { homedir } from "os";
@@ -187,4 +187,4 @@ async function startTray() {
187
187
 
188
188
  //#endregion
189
189
  export { ensureTray, startTray };
190
- //# sourceMappingURL=tray-BVnJLThD.js.map
190
+ //# sourceMappingURL=tray-DsTv-C04.js.map
@@ -1,10 +1,10 @@
1
- import { n as logger, t as addTransport } from "./logger-B9h0djqx.js";
2
- import { r as getInstalledPackage } from "./versionChecker-4ovR76r7.js";
3
- import { t as agentYesHome } from "./agentYesHome-BvaUOzCV.js";
4
- import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-CJxsoGdb.js";
5
- import { t as PidStore } from "./pidStore-DWQoGxxA.js";
6
- import { i as readGlobalPids } from "./globalPidIndex-C7r2m6s7.js";
7
- import { n as register, r as sweep } from "./reaper-BkjPN7mw.js";
1
+ import { n as logger, t as addTransport } from "./logger-CDIsZ-Pp.js";
2
+ import { r as getInstalledPackage } from "./versionChecker-CVnISin2.js";
3
+ import { t as agentYesHome } from "./agentYesHome-_eJa3DaX.js";
4
+ import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-V4qvXgAw.js";
5
+ import { t as PidStore } from "./pidStore-fqXqTKkh.js";
6
+ import { i as readGlobalPids } from "./globalPidIndex-DlmmJlO8.js";
7
+ import { n as register, r as sweep } from "./reaper-C-eWAxIj.js";
8
8
  import { arch, platform } from "process";
9
9
  import { execSync } from "child_process";
10
10
  import { closeSync, constants, createReadStream, existsSync, mkdirSync, openSync } from "fs";
@@ -1060,7 +1060,7 @@ async function notifyWebhook(status, details, cwd = process.cwd()) {
1060
1060
 
1061
1061
  //#endregion
1062
1062
  //#region ts/index.ts
1063
- const config = await import("./agent-yes.config-D6ycMApr.js").then((mod) => mod.default || mod);
1063
+ const config = await import("./agent-yes.config-BKtCmmy9.js").then((mod) => mod.default || mod);
1064
1064
  const CLIS_CONFIG = config.clis;
1065
1065
  /**
1066
1066
  * Main function to run agent-cli with automatic yes/no responses
@@ -1787,4 +1787,4 @@ function sleep(ms) {
1787
1787
 
1788
1788
  //#endregion
1789
1789
  export { removeControlCharacters as a, AgentContext as i, agentYes as n, config as r, CLIS_CONFIG as t };
1790
- //# sourceMappingURL=ts-FPleHqxr.js.map
1790
+ //# sourceMappingURL=ts-D9W-U-KX.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.132.0";
10
+ var version = "1.132.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-4ovR76r7.js.map
218
+ //# sourceMappingURL=versionChecker-CVnISin2.js.map
@@ -1,4 +1,4 @@
1
- import { t as agentYesHome } from "./agentYesHome-BvaUOzCV.js";
1
+ import { t as agentYesHome } from "./agentYesHome-_eJa3DaX.js";
2
2
  import { mkdirSync, readFileSync, writeFileSync } from "fs";
3
3
  import { homedir } from "os";
4
4
  import path from "path";
@@ -53,4 +53,4 @@ function resolveSpawnCwd(input) {
53
53
 
54
54
  //#endregion
55
55
  export { resolveSpawnCwd as n, setWorkspaceRoot as r, getWorkspaceRoot as t };
56
- //# sourceMappingURL=workspaceConfig-BJO4fzEn.js.map
56
+ //# sourceMappingURL=workspaceConfig-BCOqRBEW.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-yes",
3
- "version": "1.132.0",
3
+ "version": "1.132.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/cli.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  import { argv } from "process";
3
3
  import { spawn } from "child_process";
4
4
  import { parseCliArgs } from "./parseCliArgs.ts";
5
+ import { invokedCliName } from "./invokedCli.ts";
5
6
  import { logger } from "./logger.ts";
6
7
  import { checkAndAutoUpdate, displayVersion, versionString } from "./versionChecker.ts";
7
8
  import { getRustBinary } from "./rustBinary.ts";
@@ -21,14 +22,18 @@ import { buildRustArgs } from "./buildRustArgs.ts";
21
22
  // pid index instead. Must run before checkAndAutoUpdate / yargs / Rust spawn.
22
23
  {
23
24
  const rawArg = process.argv[2];
25
+ // Manager-only subcommands (e.g. `setup`) apply only to the generic
26
+ // `ay`/`agent-yes` entry, not to a cli-bound alias like `cy` (= claude-yes):
27
+ // `cy setup …` must run claude with that text, not manage the host.
28
+ const managerCommands = !invokedCliName(process.argv);
24
29
  // Intercept bare -h/--help so we show TS subcommands, not just Rust agent-runner options.
25
30
  const isHelpFlag = rawArg === "-h" || rawArg === "--help";
26
31
  const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands.ts");
27
32
  if (isHelpFlag && process.argv.length === 3) {
28
- cmdHelp();
33
+ cmdHelp(managerCommands);
29
34
  process.exit(0);
30
35
  }
31
- if (isSubcommand(rawArg)) {
36
+ if (isSubcommand(rawArg, managerCommands)) {
32
37
  const code = await runSubcommand(process.argv);
33
38
  process.exit(code ?? 0);
34
39
  }
@@ -0,0 +1,30 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { invokedCliName } from "./invokedCli.ts";
3
+
4
+ // argv[1] is the invoked binary path; argv[0] is the runtime (node/bun).
5
+ const argv = (bin: string) => ["/usr/bin/bun", bin];
6
+
7
+ describe("invokedCliName", () => {
8
+ it("resolves cli-bound aliases to their agent", () => {
9
+ expect(invokedCliName(argv("/root/.bun/bin/cy"))).toBe("claude");
10
+ expect(invokedCliName(argv("/usr/local/bin/claude-yes"))).toBe("claude");
11
+ expect(invokedCliName(argv("/usr/local/bin/codex-yes"))).toBe("codex");
12
+ expect(invokedCliName(argv("gemini-yes"))).toBe("gemini");
13
+ });
14
+
15
+ it("returns undefined for the generic manager entry", () => {
16
+ expect(invokedCliName(argv("/root/.bun/bin/ay"))).toBeUndefined();
17
+ expect(invokedCliName(argv("/usr/local/bin/agent-yes"))).toBeUndefined();
18
+ expect(invokedCliName(argv("/path/to/cli"))).toBeUndefined();
19
+ });
20
+
21
+ it("ignores the .js / .ts extension the wrapper bins carry", () => {
22
+ expect(invokedCliName(argv("/app/dist/cy.js"))).toBe("claude");
23
+ expect(invokedCliName(argv("/app/dist/codex-yes.js"))).toBe("codex");
24
+ expect(invokedCliName(argv("/app/dist/agent-yes.js"))).toBeUndefined();
25
+ });
26
+
27
+ it("is undefined when argv[1] is missing", () => {
28
+ expect(invokedCliName(["/usr/bin/bun"])).toBeUndefined();
29
+ });
30
+ });
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Resolve which agent CLI a binary invocation implies, from the binary name in
3
+ * argv[1].
4
+ *
5
+ * Every published bin (cy, claude-yes, codex-yes, ay, agent-yes, …) is the SAME
6
+ * cli.ts entry; the binary's *name* is what selects the default agent. A
7
+ * cli-bound alias — `cy` (= claude-yes = "agent-yes claude"), `codex-yes`, … —
8
+ * resolves to that agent; the generic manager entry (`ay` / `agent-yes` / `cli`)
9
+ * resolves to `undefined`. Callers use that `undefined` to tell "the agent-yes
10
+ * manager" apart from "a cli-bound runner alias".
11
+ */
12
+
13
+ // Short aliases → target CLI. Must match the alias wrappers postbuild.ts emits.
14
+ export const CLI_ALIASES: Record<string, string> = { cy: "claude" };
15
+
16
+ /**
17
+ * The agent CLI implied by argv[1] (cy / claude-yes → "claude", codex-yes →
18
+ * "codex", …), or `undefined` for the generic `ay` / `agent-yes` / `cli` entry.
19
+ */
20
+ export function invokedCliName(argv: string[]): string | undefined {
21
+ const base =
22
+ argv[1]
23
+ ?.split(/[/\\]/)
24
+ .at(-1)
25
+ ?.replace(/(\.[jt]s)?$/, "") || "";
26
+ const raw =
27
+ base
28
+ .replace(/^(cli|agent)(-yes)?$/, "")
29
+ .replace(/^ay$/, "") // treat standalone "ay" same as "agent-yes"
30
+ .replace(/-yes$/, "") || undefined;
31
+ return (raw && CLI_ALIASES[raw]) || raw;
32
+ }
@@ -1,28 +1,15 @@
1
1
  import ms from "ms";
2
2
  import yargs from "yargs";
3
3
  import { hideBin } from "yargs/helpers";
4
+ import { invokedCliName } from "./invokedCli.ts";
4
5
  /**
5
6
  * Parse CLI arguments the same way cli.ts does
6
7
  * This is a test helper that mirrors the parsing logic in cli.ts
7
8
  */
8
9
  export function parseCliArgs(argv: string[], supportedClis?: readonly string[]) {
9
- // Detect cli name from script name (same logic as cli.ts:10-14)
10
- const scriptBaseName =
11
- argv[1]
12
- ?.split(/[/\\]/)
13
- .at(-1)
14
- ?.replace(/(\.[jt]s)?$/, "") || "";
15
-
16
- const CLI_ALIASES: Record<string, string> = { cy: "claude" };
17
-
18
- const cliName = (() => {
19
- const raw =
20
- scriptBaseName
21
- .replace(/^(cli|agent)(-yes)?$/, "")
22
- .replace(/^ay$/, "") // treat standalone "ay" same as "agent-yes"
23
- .replace(/-yes$/, "") || undefined;
24
- return (raw && CLI_ALIASES[raw]) || raw;
25
- })();
10
+ // The agent CLI implied by the invoked binary name (cy/claude-yes claude),
11
+ // or undefined for the generic ay/agent-yes manager entry.
12
+ const cliName = invokedCliName(argv);
26
13
 
27
14
  // Parse args with yargs (same logic as cli.ts:16-73)
28
15
  const parsedArgv = yargs(hideBin(argv))
@@ -65,6 +65,42 @@ describe("subcommands.isSubcommand", () => {
65
65
  expect(isSubcommand("not-a-command")).toBe(false);
66
66
  expect(isSubcommand(undefined)).toBe(false);
67
67
  });
68
+
69
+ it("gates manager-only `setup` on the generic manager, not cli-bound aliases", async () => {
70
+ const { isSubcommand } = await loadModule();
71
+ // `ay setup` (managerCommands defaults to true) → a subcommand.
72
+ expect(isSubcommand("setup")).toBe(true);
73
+ expect(isSubcommand("setup", true)).toBe(true);
74
+ // `cy setup` (cli-bound alias) → NOT a subcommand, so it falls through to
75
+ // running claude with that text.
76
+ expect(isSubcommand("setup", false)).toBe(false);
77
+ // Inspection subcommands stay universal — `cy ls` / `cy send` still work.
78
+ expect(isSubcommand("ls", false)).toBe(true);
79
+ expect(isSubcommand("send", false)).toBe(true);
80
+ });
81
+ });
82
+
83
+ describe("subcommands.cmdHelp", () => {
84
+ it("hides the manager-only `setup` line for cli-bound aliases", async () => {
85
+ const { cmdHelp } = await loadModule();
86
+ const capture = (managerCommands?: boolean) => {
87
+ let out = "";
88
+ const spy = vi.spyOn(process.stdout, "write").mockImplementation((s: unknown) => {
89
+ out += String(s);
90
+ return true;
91
+ });
92
+ try {
93
+ cmdHelp(managerCommands);
94
+ } finally {
95
+ spy.mockRestore();
96
+ }
97
+ return out;
98
+ };
99
+ expect(capture(true)).toContain("ay setup"); // manager
100
+ expect(capture()).toContain("ay setup"); // default = manager
101
+ expect(capture(false)).not.toContain("ay setup"); // cli-bound alias (cy)
102
+ expect(capture(false)).toContain("ay ls"); // universal commands still shown
103
+ });
68
104
  });
69
105
 
70
106
  describe("subcommands.stopTipForCli", () => {
package/ts/subcommands.ts CHANGED
Binary file
@@ -1,8 +0,0 @@
1
- import "./ts-FPleHqxr.js";
2
- import "./logger-B9h0djqx.js";
3
- import "./versionChecker-4ovR76r7.js";
4
- import "./pidStore-DWQoGxxA.js";
5
- import "./globalPidIndex-C7r2m6s7.js";
6
- import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-eDyeNYJQ.js";
7
-
8
- export { SUPPORTED_CLIS };
@@ -1,5 +0,0 @@
1
- import "./logger-B9h0djqx.js";
2
- import { t as PidStore } from "./pidStore-DWQoGxxA.js";
3
- import "./globalPidIndex-C7r2m6s7.js";
4
-
5
- export { PidStore };