agent-yes 1.68.0 → 1.68.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.
- package/dist/{SUPPORTED_CLIS-Cl2oCgKo.js → SUPPORTED_CLIS-Dxapc1qa.js} +2 -2
- package/dist/cli.js +28 -24
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/ts/cli.ts +39 -39
|
@@ -1059,7 +1059,7 @@ function tryCatch(catchFn, fn) {
|
|
|
1059
1059
|
//#endregion
|
|
1060
1060
|
//#region package.json
|
|
1061
1061
|
var name = "agent-yes";
|
|
1062
|
-
var version = "1.68.
|
|
1062
|
+
var version = "1.68.1";
|
|
1063
1063
|
|
|
1064
1064
|
//#endregion
|
|
1065
1065
|
//#region ts/pty-fix.ts
|
|
@@ -2139,4 +2139,4 @@ const SUPPORTED_CLIS = Object.keys(CLIS_CONFIG);
|
|
|
2139
2139
|
|
|
2140
2140
|
//#endregion
|
|
2141
2141
|
export { AgentContext as a, PidStore as c, config as i, removeControlCharacters as l, CLIS_CONFIG as n, name as o, agentYes as r, version as s, SUPPORTED_CLIS as t };
|
|
2142
|
-
//# sourceMappingURL=SUPPORTED_CLIS-
|
|
2142
|
+
//# sourceMappingURL=SUPPORTED_CLIS-Dxapc1qa.js.map
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import { c as PidStore, o as name, s as version, t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
2
|
+
import { c as PidStore, o as name, s as version, t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-Dxapc1qa.js";
|
|
3
3
|
import { t as logger } from "./logger-CX77vJDA.js";
|
|
4
4
|
import { argv } from "process";
|
|
5
5
|
import { spawn } from "child_process";
|
|
@@ -480,31 +480,35 @@ if (config.useRust) {
|
|
|
480
480
|
try {
|
|
481
481
|
rustBinary = await getRustBinary({ verbose: config.verbose });
|
|
482
482
|
} catch (err) {
|
|
483
|
-
|
|
484
|
-
|
|
483
|
+
if (config.verbose) {
|
|
484
|
+
console.error(`[rust] ${err instanceof Error ? err.message : String(err)}`);
|
|
485
|
+
console.error("[rust] Falling back to TypeScript implementation.");
|
|
486
|
+
}
|
|
485
487
|
}
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
488
|
+
if (rustBinary) {
|
|
489
|
+
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
490
|
+
if (config.verbose) {
|
|
491
|
+
console.log(`[rust] Using binary: ${rustBinary}`);
|
|
492
|
+
console.log(`[rust] Args: ${rustArgs.join(" ")}`);
|
|
493
|
+
}
|
|
494
|
+
const child = spawn(rustBinary, rustArgs, {
|
|
495
|
+
stdio: "inherit",
|
|
496
|
+
env: process.env,
|
|
497
|
+
cwd: process.cwd()
|
|
498
|
+
});
|
|
499
|
+
child.on("error", (err) => {
|
|
500
|
+
if (err.code === "ENOENT") console.error(`Rust binary '${rustBinary}' not found. Try: npx agent-yes --rust --verbose`);
|
|
501
|
+
else console.error(`Failed to spawn Rust binary: ${err.message}`);
|
|
502
|
+
process.exit(1);
|
|
503
|
+
});
|
|
504
|
+
child.on("exit", (code, signal) => {
|
|
505
|
+
if (signal) process.exit(128 + (signal === "SIGINT" ? 2 : signal === "SIGTERM" ? 15 : 1));
|
|
506
|
+
process.exit(code ?? 1);
|
|
507
|
+
});
|
|
508
|
+
process.on("SIGINT", () => child.kill("SIGINT"));
|
|
509
|
+
process.on("SIGTERM", () => child.kill("SIGTERM"));
|
|
510
|
+
await new Promise(() => {});
|
|
490
511
|
}
|
|
491
|
-
const child = spawn(rustBinary, rustArgs, {
|
|
492
|
-
stdio: "inherit",
|
|
493
|
-
env: process.env,
|
|
494
|
-
cwd: process.cwd()
|
|
495
|
-
});
|
|
496
|
-
child.on("error", (err) => {
|
|
497
|
-
if (err.code === "ENOENT") console.error(`Rust binary '${rustBinary}' not found. Try: npx agent-yes --rust --verbose`);
|
|
498
|
-
else console.error(`Failed to spawn Rust binary: ${err.message}`);
|
|
499
|
-
process.exit(1);
|
|
500
|
-
});
|
|
501
|
-
child.on("exit", (code, signal) => {
|
|
502
|
-
if (signal) process.exit(128 + (signal === "SIGINT" ? 2 : signal === "SIGTERM" ? 15 : 1));
|
|
503
|
-
process.exit(code ?? 1);
|
|
504
|
-
});
|
|
505
|
-
process.on("SIGINT", () => child.kill("SIGINT"));
|
|
506
|
-
process.on("SIGTERM", () => child.kill("SIGTERM"));
|
|
507
|
-
await new Promise(() => {});
|
|
508
512
|
}
|
|
509
513
|
if (config.showVersion) {
|
|
510
514
|
await displayVersion();
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AgentContext, i as config, l as removeControlCharacters, n as CLIS_CONFIG, r as agentYes } from "./SUPPORTED_CLIS-
|
|
1
|
+
import { a as AgentContext, i as config, l as removeControlCharacters, n as CLIS_CONFIG, r as agentYes } from "./SUPPORTED_CLIS-Dxapc1qa.js";
|
|
2
2
|
import "./logger-CX77vJDA.js";
|
|
3
3
|
|
|
4
4
|
export { AgentContext, CLIS_CONFIG, config, agentYes as default, removeControlCharacters };
|
package/package.json
CHANGED
package/ts/cli.ts
CHANGED
|
@@ -15,55 +15,55 @@ const updateCheckPromise = checkAndAutoUpdate();
|
|
|
15
15
|
// Parse CLI arguments
|
|
16
16
|
const config = parseCliArgs(process.argv);
|
|
17
17
|
|
|
18
|
-
// Handle --rust: spawn the Rust binary instead
|
|
18
|
+
// Handle --rust: spawn the Rust binary instead, fall back to TypeScript if unavailable
|
|
19
19
|
if (config.useRust) {
|
|
20
|
-
let rustBinary: string;
|
|
20
|
+
let rustBinary: string | undefined;
|
|
21
21
|
|
|
22
22
|
try {
|
|
23
|
-
// Get or download the Rust binary for the current platform
|
|
24
23
|
rustBinary = await getRustBinary({ verbose: config.verbose });
|
|
25
24
|
} catch (err) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
32
|
-
|
|
33
|
-
if (config.verbose) {
|
|
34
|
-
console.log(`[rust] Using binary: ${rustBinary}`);
|
|
35
|
-
console.log(`[rust] Args: ${rustArgs.join(" ")}`);
|
|
25
|
+
// Rust binary unavailable (not yet released for this version, or network issue) — fall back to TypeScript
|
|
26
|
+
if (config.verbose) {
|
|
27
|
+
console.error(`[rust] ${err instanceof Error ? err.message : String(err)}`);
|
|
28
|
+
console.error("[rust] Falling back to TypeScript implementation.");
|
|
29
|
+
}
|
|
36
30
|
}
|
|
37
31
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
stdio: "inherit",
|
|
41
|
-
env: process.env,
|
|
42
|
-
cwd: process.cwd(),
|
|
43
|
-
});
|
|
32
|
+
if (rustBinary) {
|
|
33
|
+
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
44
34
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
console.
|
|
48
|
-
} else {
|
|
49
|
-
console.error(`Failed to spawn Rust binary: ${err.message}`);
|
|
35
|
+
if (config.verbose) {
|
|
36
|
+
console.log(`[rust] Using binary: ${rustBinary}`);
|
|
37
|
+
console.log(`[rust] Args: ${rustArgs.join(" ")}`);
|
|
50
38
|
}
|
|
51
|
-
process.exit(1);
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
child.on("exit", (code, signal) => {
|
|
55
|
-
if (signal) {
|
|
56
|
-
process.exit(128 + (signal === "SIGINT" ? 2 : signal === "SIGTERM" ? 15 : 1));
|
|
57
|
-
}
|
|
58
|
-
process.exit(code ?? 1);
|
|
59
|
-
});
|
|
60
39
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
40
|
+
const child = spawn(rustBinary, rustArgs, {
|
|
41
|
+
stdio: "inherit",
|
|
42
|
+
env: process.env,
|
|
43
|
+
cwd: process.cwd(),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
child.on("error", (err) => {
|
|
47
|
+
if ((err as NodeJS.ErrnoException).code === "ENOENT") {
|
|
48
|
+
console.error(`Rust binary '${rustBinary}' not found. Try: npx agent-yes --rust --verbose`);
|
|
49
|
+
} else {
|
|
50
|
+
console.error(`Failed to spawn Rust binary: ${err.message}`);
|
|
51
|
+
}
|
|
52
|
+
process.exit(1);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
child.on("exit", (code, signal) => {
|
|
56
|
+
if (signal) {
|
|
57
|
+
process.exit(128 + (signal === "SIGINT" ? 2 : signal === "SIGTERM" ? 15 : 1));
|
|
58
|
+
}
|
|
59
|
+
process.exit(code ?? 1);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
process.on("SIGINT", () => child.kill("SIGINT"));
|
|
63
|
+
process.on("SIGTERM", () => child.kill("SIGTERM"));
|
|
64
|
+
|
|
65
|
+
await new Promise(() => {}); // Never resolves, exits via child.on("exit")
|
|
66
|
+
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
// Handle --version: display version and exit
|