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 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) return { cmd: "node", args: [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) return { cmd: "node", args: [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");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-sdk-provider-codex-cli",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "AI SDK v5 provider for OpenAI Codex CLI with native JSON Schema support",
5
5
  "keywords": [
6
6
  "ai-sdk",