amalgm 0.1.121 → 0.1.122
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/package.json
CHANGED
|
@@ -53,8 +53,10 @@ function installFakePackagedAgentDeps(resourcesPath) {
|
|
|
53
53
|
codexTarget.packageName,
|
|
54
54
|
);
|
|
55
55
|
writePackage(codexRoot, codexTarget.packageName);
|
|
56
|
-
const codex = path.join(codexRoot, 'vendor', codexTarget.triple, '
|
|
56
|
+
const codex = path.join(codexRoot, 'vendor', codexTarget.triple, 'bin', codexTarget.binaryName);
|
|
57
57
|
writeExecutable(codex);
|
|
58
|
+
const codexRg = path.join(codexRoot, 'vendor', codexTarget.triple, 'codex-path', process.platform === 'win32' ? 'rg.exe' : 'rg');
|
|
59
|
+
writeExecutable(codexRg);
|
|
58
60
|
|
|
59
61
|
const openCodeRoot = packagePath(
|
|
60
62
|
path.join(nodeModules, 'opencode-ai', 'node_modules'),
|
|
@@ -108,6 +110,10 @@ test('packaged nested agent dependencies resolve to exact executable paths and s
|
|
|
108
110
|
|
|
109
111
|
assert.equal(nativeBinaries.__private.bundledClaudeBinary(), expected.claude);
|
|
110
112
|
assert.equal(nativeBinaries.bundledCodexBinary(), expected.codex);
|
|
113
|
+
assert.deepEqual(
|
|
114
|
+
nativeBinaries.bundledCodexPathDirs(),
|
|
115
|
+
[path.join(path.dirname(path.dirname(expected.codex)), 'codex-path')],
|
|
116
|
+
);
|
|
111
117
|
assert.equal(nativeBinaries.bundledOpenCodeBinary(), expected.opencode);
|
|
112
118
|
|
|
113
119
|
const result = nativeBinaries.ensureAgentCommandShims({ quiet: true, logger: { log() {} } });
|
|
@@ -250,13 +250,22 @@ function codexVendorRoot() {
|
|
|
250
250
|
return null;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
+
function codexBinaryCandidates(vendorRoot, target) {
|
|
254
|
+
if (!vendorRoot || !target) return [];
|
|
255
|
+
return [
|
|
256
|
+
path.join(vendorRoot, target.triple, 'bin', target.binaryName),
|
|
257
|
+
path.join(vendorRoot, target.triple, 'codex', target.binaryName),
|
|
258
|
+
];
|
|
259
|
+
}
|
|
260
|
+
|
|
253
261
|
function bundledCodexBinary() {
|
|
254
262
|
const target = codexTarget();
|
|
255
263
|
const vendorRoot = codexVendorRoot();
|
|
256
264
|
if (target && vendorRoot) {
|
|
257
|
-
const candidate
|
|
258
|
-
|
|
259
|
-
|
|
265
|
+
for (const candidate of codexBinaryCandidates(vendorRoot, target)) {
|
|
266
|
+
const executable = executablePath(candidate);
|
|
267
|
+
if (executable) return executable;
|
|
268
|
+
}
|
|
260
269
|
}
|
|
261
270
|
return packageBin('@openai/codex', 'codex');
|
|
262
271
|
}
|
|
@@ -265,8 +274,11 @@ function bundledCodexPathDirs() {
|
|
|
265
274
|
const target = codexTarget();
|
|
266
275
|
const vendorRoot = codexVendorRoot();
|
|
267
276
|
if (!target || !vendorRoot) return [];
|
|
268
|
-
const
|
|
269
|
-
|
|
277
|
+
const candidates = [
|
|
278
|
+
path.join(vendorRoot, target.triple, 'codex-path'),
|
|
279
|
+
path.join(vendorRoot, target.triple, 'path'),
|
|
280
|
+
];
|
|
281
|
+
return candidates.filter((candidate) => executableExists(path.join(candidate, process.platform === 'win32' ? 'rg.exe' : 'rg')));
|
|
270
282
|
}
|
|
271
283
|
|
|
272
284
|
function openCodePlatform() {
|
|
@@ -372,7 +384,7 @@ function commandTargets() {
|
|
|
372
384
|
{
|
|
373
385
|
command: 'codex',
|
|
374
386
|
name: 'Codex',
|
|
375
|
-
path: packageBin('@openai/codex', 'codex')
|
|
387
|
+
path: bundledCodexBinary() || packageBin('@openai/codex', 'codex'),
|
|
376
388
|
},
|
|
377
389
|
{
|
|
378
390
|
command: 'opencode',
|