agent-yes 1.75.3 → 1.76.0

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,6 +1,6 @@
1
- import { t as CLIS_CONFIG } from "./ts-vc6cm9z6.js";
1
+ import { t as CLIS_CONFIG } from "./ts-MmVGVMOz.js";
2
2
  import "./logger-B9h0djqx.js";
3
- import "./versionChecker-IVJmMHfo.js";
3
+ import "./versionChecker-CAoC4Jzx.js";
4
4
  import "./pidStore-C1JXxoPi.js";
5
5
  import "./globalPidIndex-Cr-g75QF.js";
6
6
 
@@ -9,4 +9,4 @@ const SUPPORTED_CLIS = Object.keys(CLIS_CONFIG);
9
9
 
10
10
  //#endregion
11
11
  export { SUPPORTED_CLIS };
12
- //# sourceMappingURL=SUPPORTED_CLIS-C9qkWtPg.js.map
12
+ //# sourceMappingURL=SUPPORTED_CLIS-DAufh-XY.js.map
package/dist/agent-yes.js CHANGED
@@ -1,2 +1,10 @@
1
1
  #!/usr/bin/env bun
2
- await import('./cli.js')
2
+ import { existsSync } from "node:fs";
3
+ import { join, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
6
+ if (existsSync(join(root, ".git"))) {
7
+ await import("../ts/cli.ts");
8
+ } else {
9
+ await import("./cli.js");
10
+ }
package/dist/amp-yes.js CHANGED
@@ -1,2 +1,10 @@
1
1
  #!/usr/bin/env bun
2
- await import('./cli.js')
2
+ import { existsSync } from "node:fs";
3
+ import { join, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
6
+ if (existsSync(join(root, ".git"))) {
7
+ await import("../ts/cli.ts");
8
+ } else {
9
+ await import("./cli.js");
10
+ }
@@ -1,2 +1,10 @@
1
1
  #!/usr/bin/env bun
2
- await import('./cli.js')
2
+ import { existsSync } from "node:fs";
3
+ import { join, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
6
+ if (existsSync(join(root, ".git"))) {
7
+ await import("../ts/cli.ts");
8
+ } else {
9
+ await import("./cli.js");
10
+ }
@@ -1,2 +1,10 @@
1
1
  #!/usr/bin/env bun
2
- await import('./cli.js')
2
+ import { existsSync } from "node:fs";
3
+ import { join, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
6
+ if (existsSync(join(root, ".git"))) {
7
+ await import("../ts/cli.ts");
8
+ } else {
9
+ await import("./cli.js");
10
+ }
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bun
2
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-IVJmMHfo.js";
3
+ import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-CAoC4Jzx.js";
4
4
  import { argv } from "process";
5
5
  import { execFileSync, spawn } from "child_process";
6
6
  import ms from "ms";
@@ -381,7 +381,7 @@ function getRustBinaryVersion(binaryPath) {
381
381
  "ignore"
382
382
  ]
383
383
  }).match(/(\d+\.\d+\.\d+)/);
384
- return match ? match[1] : null;
384
+ return match ? match[1] ?? null : null;
385
385
  } catch {
386
386
  return null;
387
387
  }
@@ -408,6 +408,16 @@ function autoRebuildIfOutdated(binaryPath, verbose) {
408
408
  stdio: "inherit",
409
409
  timeout: 3e5
410
410
  });
411
+ try {
412
+ execFileSync("cargo", [
413
+ "install",
414
+ "--path",
415
+ rsDir
416
+ ], {
417
+ stdio: "inherit",
418
+ timeout: 6e4
419
+ });
420
+ } catch {}
411
421
  process.stderr.write(`\x1b[32m[rust] Rebuild complete\x1b[0m\n`);
412
422
  return true;
413
423
  } catch {
@@ -494,7 +504,7 @@ if (config.useRust) {
494
504
  }
495
505
  }
496
506
  if (rustBinary) {
497
- const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-C9qkWtPg.js");
507
+ const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-DAufh-XY.js");
498
508
  const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
499
509
  if (config.verbose) {
500
510
  console.log(`[rust] Using binary: ${rustBinary}`);
package/dist/codex-yes.js CHANGED
@@ -1,2 +1,10 @@
1
1
  #!/usr/bin/env bun
2
- await import('./cli.js')
2
+ import { existsSync } from "node:fs";
3
+ import { join, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
6
+ if (existsSync(join(root, ".git"))) {
7
+ await import("../ts/cli.ts");
8
+ } else {
9
+ await import("./cli.js");
10
+ }
@@ -1,2 +1,10 @@
1
1
  #!/usr/bin/env bun
2
- await import('./cli.js')
2
+ import { existsSync } from "node:fs";
3
+ import { join, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
6
+ if (existsSync(join(root, ".git"))) {
7
+ await import("../ts/cli.ts");
8
+ } else {
9
+ await import("./cli.js");
10
+ }
@@ -1,2 +1,10 @@
1
1
  #!/usr/bin/env bun
2
- await import('./cli.js')
2
+ import { existsSync } from "node:fs";
3
+ import { join, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
6
+ if (existsSync(join(root, ".git"))) {
7
+ await import("../ts/cli.ts");
8
+ } else {
9
+ await import("./cli.js");
10
+ }
package/dist/cy.js CHANGED
@@ -1,2 +1,10 @@
1
1
  #!/usr/bin/env bun
2
- await import('./cli.js')
2
+ import { existsSync } from "node:fs";
3
+ import { join, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
6
+ if (existsSync(join(root, ".git"))) {
7
+ await import("../ts/cli.ts");
8
+ } else {
9
+ await import("./cli.js");
10
+ }
@@ -1,2 +1,10 @@
1
1
  #!/usr/bin/env bun
2
- await import('./cli.js')
2
+ import { existsSync } from "node:fs";
3
+ import { join, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
6
+ if (existsSync(join(root, ".git"))) {
7
+ await import("../ts/cli.ts");
8
+ } else {
9
+ await import("./cli.js");
10
+ }
package/dist/grok-yes.js CHANGED
@@ -1,2 +1,10 @@
1
1
  #!/usr/bin/env bun
2
- await import('./cli.js')
2
+ import { existsSync } from "node:fs";
3
+ import { join, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
6
+ if (existsSync(join(root, ".git"))) {
7
+ await import("../ts/cli.ts");
8
+ } else {
9
+ await import("./cli.js");
10
+ }
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-vc6cm9z6.js";
1
+ import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-MmVGVMOz.js";
2
2
  import "./logger-B9h0djqx.js";
3
- import "./versionChecker-IVJmMHfo.js";
3
+ import "./versionChecker-CAoC4Jzx.js";
4
4
  import "./pidStore-C1JXxoPi.js";
5
5
  import "./globalPidIndex-Cr-g75QF.js";
6
6
 
@@ -1,2 +1,10 @@
1
1
  #!/usr/bin/env bun
2
- await import('./cli.js')
2
+ import { existsSync } from "node:fs";
3
+ import { join, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
6
+ if (existsSync(join(root, ".git"))) {
7
+ await import("../ts/cli.ts");
8
+ } else {
9
+ await import("./cli.js");
10
+ }
package/dist/qwen-yes.js CHANGED
@@ -1,2 +1,10 @@
1
1
  #!/usr/bin/env bun
2
- await import('./cli.js')
2
+ import { existsSync } from "node:fs";
3
+ import { join, dirname } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
6
+ if (existsSync(join(root, ".git"))) {
7
+ await import("../ts/cli.ts");
8
+ } else {
9
+ await import("./cli.js");
10
+ }
@@ -1,5 +1,5 @@
1
1
  import { n as logger, t as addTransport } from "./logger-B9h0djqx.js";
2
- import { r as getInstalledPackage } from "./versionChecker-IVJmMHfo.js";
2
+ import { r as getInstalledPackage } from "./versionChecker-CAoC4Jzx.js";
3
3
  import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-C22d9SRJ.js";
4
4
  import { t as PidStore } from "./pidStore-C1JXxoPi.js";
5
5
  import { arch, platform } from "process";
@@ -1679,4 +1679,4 @@ function sleep(ms) {
1679
1679
 
1680
1680
  //#endregion
1681
1681
  export { removeControlCharacters as a, AgentContext as i, agentYes as n, config as r, CLIS_CONFIG as t };
1682
- //# sourceMappingURL=ts-vc6cm9z6.js.map
1682
+ //# sourceMappingURL=ts-MmVGVMOz.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.75.3";
10
+ var version = "1.76.0";
11
11
 
12
12
  //#endregion
13
13
  //#region ts/versionChecker.ts
@@ -221,4 +221,4 @@ async function displayVersion() {
221
221
 
222
222
  //#endregion
223
223
  export { versionString as i, displayVersion as n, getInstalledPackage as r, checkAndAutoUpdate as t };
224
- //# sourceMappingURL=versionChecker-IVJmMHfo.js.map
224
+ //# sourceMappingURL=versionChecker-CAoC4Jzx.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-yes",
3
- "version": "1.75.3",
3
+ "version": "1.76.0",
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/postbuild.ts CHANGED
@@ -15,18 +15,26 @@ const suffixes = ["-yes"];
15
15
  // Short aliases: maps alias name → target CLI name (alias resolves in parseCliArgs.ts)
16
16
  const shortAliases: Record<string, string> = { cy: "claude" };
17
17
 
18
+ // When .git exists (git clone), run TypeScript directly via bun — no build needed.
19
+ // When absent (npm install), fall back to compiled dist/cli.js.
20
+ const wrapperContent = `\
21
+ #!/usr/bin/env bun
22
+ import { existsSync } from "node:fs";
23
+ import { join, dirname } from "node:path";
24
+ import { fileURLToPath } from "node:url";
25
+ const root = join(dirname(fileURLToPath(import.meta.url)), "..");
26
+ if (existsSync(join(root, ".git"))) {
27
+ await import("../ts/cli.ts");
28
+ } else {
29
+ await import("./cli.js");
30
+ }`;
31
+
18
32
  await sflow(cliNames.flatMap((cli) => suffixes.map((suffix) => ({ cli, suffix }))))
19
33
  .map(async ({ cli, suffix }) => {
20
34
  const cliName = `${cli}${suffix}`;
21
35
 
22
36
  const wrapperPath = `./dist/${cliName}.js`;
23
- await writeFile(
24
- wrapperPath,
25
- `
26
- #!/usr/bin/env bun
27
- await import('./cli.js')
28
- `.trim(),
29
- );
37
+ await writeFile(wrapperPath, wrapperContent);
30
38
  await chmod(wrapperPath, 0o755);
31
39
 
32
40
  // Only register -yes variants in package.json bin
@@ -41,13 +49,7 @@ await import('./cli.js')
41
49
  // Generate short alias wrapper files
42
50
  for (const [alias] of Object.entries(shortAliases)) {
43
51
  const wrapperPath = `./dist/${alias}.js`;
44
- await writeFile(
45
- wrapperPath,
46
- `
47
- #!/usr/bin/env bun
48
- await import('./cli.js')
49
- `.trim(),
50
- );
52
+ await writeFile(wrapperPath, wrapperContent);
51
53
  await chmod(wrapperPath, 0o755);
52
54
  if (!(pkg.bin as Record<string, string>)?.[alias]) {
53
55
  await Bun.$`npm pkg set ${"bin." + alias}=${wrapperPath}`;
package/ts/rustBinary.ts CHANGED
@@ -206,7 +206,7 @@ function getRustBinaryVersion(binaryPath: string): string | null {
206
206
  });
207
207
  // Output is like "agent-yes 1.72.3" or "agent-yes v1.72.3"
208
208
  const match = output.match(/(\d+\.\d+\.\d+)/);
209
- return match ? match[1] : null;
209
+ return match ? (match[1] ?? null) : null;
210
210
  } catch {
211
211
  return null;
212
212
  }
@@ -251,6 +251,15 @@ function autoRebuildIfOutdated(binaryPath: string, verbose: boolean): boolean {
251
251
  stdio: "inherit",
252
252
  timeout: 300_000, // 5 min max
253
253
  });
254
+ // Also update ~/.cargo/bin so the system-wide binary stays current
255
+ try {
256
+ execFileSync("cargo", ["install", "--path", rsDir], {
257
+ stdio: "inherit",
258
+ timeout: 60_000,
259
+ });
260
+ } catch {
261
+ // non-fatal: the target/ binary is already updated
262
+ }
254
263
  process.stderr.write(`\x1b[32m[rust] Rebuild complete\x1b[0m\n`);
255
264
  return true;
256
265
  } catch {