ai-sdk-provider-codex-cli 0.7.1 → 0.7.2
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/index.cjs +7 -1
- package/dist/index.js +7 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -376,7 +376,13 @@ var codexCliProviderOptionsSchema = zod.z.object({
|
|
|
376
376
|
rmcpClient: zod.z.boolean().optional()
|
|
377
377
|
}).strict();
|
|
378
378
|
function resolveCodexPath(explicitPath, allowNpx) {
|
|
379
|
-
if (explicitPath)
|
|
379
|
+
if (explicitPath) {
|
|
380
|
+
const lower = explicitPath.toLowerCase();
|
|
381
|
+
if (lower.endsWith(".js") || lower.endsWith(".mjs") || lower.endsWith(".cjs")) {
|
|
382
|
+
return { cmd: "node", args: [explicitPath] };
|
|
383
|
+
}
|
|
384
|
+
return { cmd: explicitPath, args: [] };
|
|
385
|
+
}
|
|
380
386
|
try {
|
|
381
387
|
const req = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)));
|
|
382
388
|
const pkgPath = req.resolve("@openai/codex/package.json");
|
package/dist/index.js
CHANGED
|
@@ -373,7 +373,13 @@ var codexCliProviderOptionsSchema = z.object({
|
|
|
373
373
|
rmcpClient: z.boolean().optional()
|
|
374
374
|
}).strict();
|
|
375
375
|
function resolveCodexPath(explicitPath, allowNpx) {
|
|
376
|
-
if (explicitPath)
|
|
376
|
+
if (explicitPath) {
|
|
377
|
+
const lower = explicitPath.toLowerCase();
|
|
378
|
+
if (lower.endsWith(".js") || lower.endsWith(".mjs") || lower.endsWith(".cjs")) {
|
|
379
|
+
return { cmd: "node", args: [explicitPath] };
|
|
380
|
+
}
|
|
381
|
+
return { cmd: explicitPath, args: [] };
|
|
382
|
+
}
|
|
377
383
|
try {
|
|
378
384
|
const req = createRequire(import.meta.url);
|
|
379
385
|
const pkgPath = req.resolve("@openai/codex/package.json");
|