@livx.cc/agentx 0.99.168 → 0.99.169
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 +6 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp.client.js.map +1 -1
- package/dist/tools.shell.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2816,6 +2816,10 @@ function findOnPath(cmd, env = process.env) {
|
|
|
2816
2816
|
}
|
|
2817
2817
|
return void 0;
|
|
2818
2818
|
}
|
|
2819
|
+
function codexBin(env = process.env) {
|
|
2820
|
+
const home = env.HOME ?? env.USERPROFILE ?? "";
|
|
2821
|
+
return findOnPath("codex", env) ?? (IS_WIN ? void 0 : [np2.join(home, ".local/bin/codex"), "/opt/homebrew/bin/codex", "/usr/local/bin/codex"].find(isFile));
|
|
2822
|
+
}
|
|
2819
2823
|
function hasCommand(cmd) {
|
|
2820
2824
|
if (!IS_WIN) return spawnSync2("which", [cmd]).status === 0;
|
|
2821
2825
|
return !!findOnPath(cmd);
|
|
@@ -17518,6 +17522,7 @@ function codexProviderOptions(model, cwd, mcpServers) {
|
|
|
17518
17522
|
return {
|
|
17519
17523
|
cwd,
|
|
17520
17524
|
...process.env.CODEX_HOME ? { codexHome: process.env.CODEX_HOME } : {},
|
|
17525
|
+
...codexBin() ? { codexBin: codexBin() } : {},
|
|
17521
17526
|
...config ? { config } : {},
|
|
17522
17527
|
...process.env.AGENTX_CODEX_WARM === "0" ? {} : { codexSession: randomUUID() }
|
|
17523
17528
|
};
|
|
@@ -22809,7 +22814,7 @@ ${provider}`);
|
|
|
22809
22814
|
}
|
|
22810
22815
|
var codexModels = /* @__PURE__ */ (() => {
|
|
22811
22816
|
let c;
|
|
22812
|
-
return () => c ??=
|
|
22817
|
+
return () => c ??= codexBin() ? listCliModels("codex").map((m) => m.value) : [];
|
|
22813
22818
|
})();
|
|
22814
22819
|
function codexRoute(want, served) {
|
|
22815
22820
|
if (want.startsWith("codex/")) {
|