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 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) return { cmd: "node", args: [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) return { cmd: "node", args: [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");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-sdk-provider-codex-cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "AI SDK v6 provider for OpenAI Codex CLI (use ChatGPT Plus/Pro subscription)",
5
5
  "keywords": [
6
6
  "ai-sdk",