agent-yes 1.51.3 → 1.51.4
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.
- package/dist/cli.js +5 -2
- package/package.json +1 -1
- package/ts/cli.ts +11 -1
package/dist/cli.js
CHANGED
|
@@ -4505,7 +4505,7 @@ const Yargs = YargsFactory(esm_default);
|
|
|
4505
4505
|
//#endregion
|
|
4506
4506
|
//#region package.json
|
|
4507
4507
|
var name = "agent-yes";
|
|
4508
|
-
var version = "1.51.
|
|
4508
|
+
var version = "1.51.4";
|
|
4509
4509
|
|
|
4510
4510
|
//#endregion
|
|
4511
4511
|
//#region ts/parseCliArgs.ts
|
|
@@ -4877,7 +4877,10 @@ if (config.useRust) {
|
|
|
4877
4877
|
console.error(err instanceof Error ? err.message : String(err));
|
|
4878
4878
|
process.exit(1);
|
|
4879
4879
|
}
|
|
4880
|
-
const
|
|
4880
|
+
const rawRustArgs = process.argv.slice(2).filter((arg) => arg !== "--rust" && !arg.startsWith("--rust="));
|
|
4881
|
+
const cliFromScript = config.cli;
|
|
4882
|
+
const hasCliArg = rawRustArgs.some((arg) => arg.startsWith("--cli=") || arg === "--cli") || rawRustArgs.some((arg) => SUPPORTED_CLIS.includes(arg));
|
|
4883
|
+
const rustArgs = cliFromScript && !hasCliArg ? [cliFromScript, ...rawRustArgs] : rawRustArgs;
|
|
4881
4884
|
if (config.verbose) {
|
|
4882
4885
|
console.log(`[rust] Using binary: ${rustBinary}`);
|
|
4883
4886
|
console.log(`[rust] Args: ${rustArgs.join(" ")}`);
|
package/package.json
CHANGED
package/ts/cli.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { existsSync } from "fs";
|
|
|
5
5
|
import path from "path";
|
|
6
6
|
import cliYesConfig from "../agent-yes.config.ts";
|
|
7
7
|
import { parseCliArgs } from "./parseCliArgs.ts";
|
|
8
|
+
import { SUPPORTED_CLIS } from "./SUPPORTED_CLIS.ts";
|
|
8
9
|
import { logger } from "./logger.ts";
|
|
9
10
|
import { PidStore } from "./pidStore.ts";
|
|
10
11
|
import { displayVersion } from "./versionChecker.ts";
|
|
@@ -26,7 +27,16 @@ if (config.useRust) {
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
// Build args for Rust binary (filter out --rust flag)
|
|
29
|
-
const
|
|
30
|
+
const rawRustArgs = process.argv.slice(2).filter((arg) => arg !== "--rust" && !arg.startsWith("--rust="));
|
|
31
|
+
|
|
32
|
+
// Prepend CLI name if detected from script name but not already in args
|
|
33
|
+
// This ensures codex-yes --rust passes "codex" to the Rust binary
|
|
34
|
+
const cliFromScript = config.cli;
|
|
35
|
+
const hasCliArg = rawRustArgs.some(arg => arg.startsWith('--cli=') || arg === '--cli') ||
|
|
36
|
+
rawRustArgs.some(arg => SUPPORTED_CLIS.includes(arg));
|
|
37
|
+
const rustArgs = cliFromScript && !hasCliArg
|
|
38
|
+
? [cliFromScript, ...rawRustArgs]
|
|
39
|
+
: rawRustArgs;
|
|
30
40
|
|
|
31
41
|
if (config.verbose) {
|
|
32
42
|
console.log(`[rust] Using binary: ${rustBinary}`);
|