talentos 1.1.4 → 1.1.5
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/agent/adapters.js +21 -1
- package/package.json +1 -1
package/dist/agent/adapters.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { execFile, spawn } from "node:child_process";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
|
-
import { rm } from "node:fs/promises";
|
|
3
|
+
import { mkdtemp, rm } from "node:fs/promises";
|
|
4
|
+
import { tmpdir } from "node:os";
|
|
4
5
|
import { dirname, join } from "node:path";
|
|
5
6
|
import { createInterface } from "node:readline";
|
|
6
7
|
import { fileURLToPath } from "node:url";
|
|
@@ -25,6 +26,8 @@ const CHILD_ENV = [
|
|
|
25
26
|
"CODEX_HOME",
|
|
26
27
|
"CLAUDE_CONFIG_DIR",
|
|
27
28
|
];
|
|
29
|
+
// Shared with the preflight: older Codex parses agents.enabled as a role.
|
|
30
|
+
const CODEX_ROOM_GATES = ["agents.enabled=false", "features.goals=false"];
|
|
28
31
|
const CLAUDE_VERSION = /^\d+\.\d+\.\d+/u;
|
|
29
32
|
const CODEX_VERSION = /\b\d+\.\d+\.\d+\b/u;
|
|
30
33
|
const DONT_ASK = /\bdontAsk\b/u;
|
|
@@ -103,6 +106,21 @@ export async function verifyCodex(configured) {
|
|
|
103
106
|
}
|
|
104
107
|
if (version !== "unknown") {
|
|
105
108
|
await codexRoomCatalog(binary);
|
|
109
|
+
const directory = await mkdtemp(join(tmpdir(), "talentos-codex-probe-"));
|
|
110
|
+
try {
|
|
111
|
+
await execute(binary, [
|
|
112
|
+
...CODEX_ROOM_GATES.flatMap((gate) => ["-c", gate]),
|
|
113
|
+
"features",
|
|
114
|
+
"list",
|
|
115
|
+
], {
|
|
116
|
+
...options,
|
|
117
|
+
cwd: directory,
|
|
118
|
+
env: { ...options.env, CODEX_HOME: directory },
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
finally {
|
|
122
|
+
await rm(directory, { recursive: true, force: true });
|
|
123
|
+
}
|
|
106
124
|
return;
|
|
107
125
|
}
|
|
108
126
|
}
|
|
@@ -261,6 +279,8 @@ export async function runProvider(input) {
|
|
|
261
279
|
"features.plugins=false",
|
|
262
280
|
"-c",
|
|
263
281
|
"features.multi_agent=false",
|
|
282
|
+
// Codex also gates collaboration separately from the legacy feature.
|
|
283
|
+
...CODEX_ROOM_GATES.flatMap((gate) => ["-c", gate]),
|
|
264
284
|
"-c",
|
|
265
285
|
"features.skip_host_skill_discovery=true",
|
|
266
286
|
"-c",
|
package/package.json
CHANGED