ai-sdk-provider-codex-cli 1.0.2 → 1.0.3
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
|
@@ -410,7 +410,13 @@ var codexCliProviderOptionsSchema = zod.z.object({
|
|
|
410
410
|
rmcpClient: zod.z.boolean().optional()
|
|
411
411
|
}).strict();
|
|
412
412
|
function resolveCodexPath(explicitPath, allowNpx) {
|
|
413
|
-
if (explicitPath)
|
|
413
|
+
if (explicitPath) {
|
|
414
|
+
const lower = explicitPath.toLowerCase();
|
|
415
|
+
if (lower.endsWith(".js") || lower.endsWith(".mjs") || lower.endsWith(".cjs")) {
|
|
416
|
+
return { cmd: "node", args: [explicitPath] };
|
|
417
|
+
}
|
|
418
|
+
return { cmd: explicitPath, args: [] };
|
|
419
|
+
}
|
|
414
420
|
try {
|
|
415
421
|
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)));
|
|
416
422
|
const pkgPath = req.resolve("@openai/codex/package.json");
|
package/dist/index.js
CHANGED
|
@@ -407,7 +407,13 @@ var codexCliProviderOptionsSchema = z.object({
|
|
|
407
407
|
rmcpClient: z.boolean().optional()
|
|
408
408
|
}).strict();
|
|
409
409
|
function resolveCodexPath(explicitPath, allowNpx) {
|
|
410
|
-
if (explicitPath)
|
|
410
|
+
if (explicitPath) {
|
|
411
|
+
const lower = explicitPath.toLowerCase();
|
|
412
|
+
if (lower.endsWith(".js") || lower.endsWith(".mjs") || lower.endsWith(".cjs")) {
|
|
413
|
+
return { cmd: "node", args: [explicitPath] };
|
|
414
|
+
}
|
|
415
|
+
return { cmd: explicitPath, args: [] };
|
|
416
|
+
}
|
|
411
417
|
try {
|
|
412
418
|
const req = createRequire(import.meta.url);
|
|
413
419
|
const pkgPath = req.resolve("@openai/codex/package.json");
|