@superatomai/sdk-node 0.0.92-dsp → 0.0.93-dsp

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.js CHANGED
@@ -24832,6 +24832,14 @@ function readCodexConfig(env) {
24832
24832
  return "";
24833
24833
  }
24834
24834
  }
24835
+ var CODEX_PATH_ENV = "SA_CODEX_PATH";
24836
+ function codexPathOverride(env = process.env, exists = fs8.existsSync) {
24837
+ const p = env[CODEX_PATH_ENV]?.trim();
24838
+ if (!p) return void 0;
24839
+ if (exists(p)) return p;
24840
+ console.warn(`[codex] ${CODEX_PATH_ENV}=${p} does not exist; using the codex bundled with @openai/codex-sdk`);
24841
+ return void 0;
24842
+ }
24835
24843
  function codexDefaultProvider(env = process.env, configToml) {
24836
24844
  const choice = env.CODEX_MODEL_PROVIDER?.trim();
24837
24845
  if (choice && choice !== "openrouter") return null;
@@ -24893,7 +24901,9 @@ function createCodexSession(opts) {
24893
24901
  if (thread) return thread;
24894
24902
  const { Codex } = await loadCodex();
24895
24903
  const config2 = codexRunConfig(opts, provider);
24904
+ const codexPath = codexPathOverride();
24896
24905
  const codex = new Codex({
24906
+ ...codexPath ? { codexPathOverride: codexPath } : {},
24897
24907
  ...opts.apiKey ? { apiKey: opts.apiKey } : {},
24898
24908
  ...opts.baseUrl ? { baseUrl: opts.baseUrl } : {},
24899
24909
  env: buildEnv(opts, provider),
package/dist/index.mjs CHANGED
@@ -24714,6 +24714,14 @@ function readCodexConfig(env) {
24714
24714
  return "";
24715
24715
  }
24716
24716
  }
24717
+ var CODEX_PATH_ENV = "SA_CODEX_PATH";
24718
+ function codexPathOverride(env = process.env, exists = fs8.existsSync) {
24719
+ const p = env[CODEX_PATH_ENV]?.trim();
24720
+ if (!p) return void 0;
24721
+ if (exists(p)) return p;
24722
+ console.warn(`[codex] ${CODEX_PATH_ENV}=${p} does not exist; using the codex bundled with @openai/codex-sdk`);
24723
+ return void 0;
24724
+ }
24717
24725
  function codexDefaultProvider(env = process.env, configToml) {
24718
24726
  const choice = env.CODEX_MODEL_PROVIDER?.trim();
24719
24727
  if (choice && choice !== "openrouter") return null;
@@ -24775,7 +24783,9 @@ function createCodexSession(opts) {
24775
24783
  if (thread) return thread;
24776
24784
  const { Codex } = await loadCodex();
24777
24785
  const config2 = codexRunConfig(opts, provider);
24786
+ const codexPath = codexPathOverride();
24778
24787
  const codex = new Codex({
24788
+ ...codexPath ? { codexPathOverride: codexPath } : {},
24779
24789
  ...opts.apiKey ? { apiKey: opts.apiKey } : {},
24780
24790
  ...opts.baseUrl ? { baseUrl: opts.baseUrl } : {},
24781
24791
  env: buildEnv(opts, provider),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superatomai/sdk-node",
3
- "version": "0.0.92-dsp",
3
+ "version": "0.0.93-dsp",
4
4
  "description": "Node.js TypeScript SDK for Superatom",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -16,6 +16,14 @@
16
16
  "dist",
17
17
  "!dist/**/*.map"
18
18
  ],
19
+ "scripts": {
20
+ "build": "tsc --noEmit && tsup",
21
+ "dev": "tsup --watch",
22
+ "test": "tsx test-sdk.ts",
23
+ "test:unit": "node --import tsx --test tests/unit/*.test.ts",
24
+ "prepublishOnly": "pnpm run build",
25
+ "type-check": "tsc --noEmit"
26
+ },
19
27
  "keywords": [
20
28
  "superatom",
21
29
  "sdk",
@@ -45,12 +53,5 @@
45
53
  },
46
54
  "optionalDependencies": {
47
55
  "@openai/codex-sdk": "0.156.1"
48
- },
49
- "scripts": {
50
- "build": "tsc --noEmit && tsup",
51
- "dev": "tsup --watch",
52
- "test": "tsx test-sdk.ts",
53
- "test:unit": "node --import tsx --test tests/unit/*.test.ts",
54
- "type-check": "tsc --noEmit"
55
56
  }
56
- }
57
+ }