@openclaw/codex 2026.5.3 → 2026.5.4-beta.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/provider.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CODEX_APP_SERVER_AUTH_MARKER, CODEX_BASE_URL, CODEX_PROVIDER_ID, FALLBACK_CODEX_MODELS, buildCodexModelDefinition, buildCodexProviderConfig } from "./provider-catalog.js";
2
- import { i as resolveCodexAppServerRuntimeOptions, r as readCodexPluginConfig } from "./config-CkkoMeqF.js";
2
+ import { i as resolveCodexAppServerRuntimeOptions, r as readCodexPluginConfig } from "./config-ByrA30No.js";
3
3
  import { resolveCodexSystemPromptContribution } from "./prompt-overlay.js";
4
4
  import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime";
5
5
  import { createSubsystemLogger } from "openclaw/plugin-sdk/core";
@@ -123,7 +123,7 @@ async function listModelsBestEffort(params) {
123
123
  }
124
124
  }
125
125
  async function listCodexAppServerModelsLazy(options) {
126
- const { listCodexAppServerModels } = await import("./models-Ds7g6191.js").then((n) => n.r);
126
+ const { listCodexAppServerModels } = await import("./models-CkowdYbm.js").then((n) => n.r);
127
127
  return listCodexAppServerModels(options);
128
128
  }
129
129
  function normalizeTimeoutMs(value) {
@@ -1,6 +1,6 @@
1
- import { a as resolveCodexComputerUseConfig, i as resolveCodexAppServerRuntimeOptions } from "./config-CkkoMeqF.js";
2
- import { i as withTimeout, n as getSharedCodexAppServerClient } from "./shared-client-0El8eRIE.js";
3
- import { n as describeControlFailure } from "./capabilities-BmhO5h8O.js";
1
+ import { a as resolveCodexComputerUseConfig, i as resolveCodexAppServerRuntimeOptions } from "./config-ByrA30No.js";
2
+ import { f as describeControlFailure } from "./command-formatters-PiJcdUbu.js";
3
+ import { i as withTimeout, n as getSharedCodexAppServerClient } from "./shared-client-Dfk3Enm-.js";
4
4
  import { existsSync } from "node:fs";
5
5
  //#region extensions/codex/src/app-server/request.ts
6
6
  async function requestCodexAppServerJson(params) {
@@ -9,7 +9,8 @@ async function requestCodexAppServerJson(params) {
9
9
  return await (await getSharedCodexAppServerClient({
10
10
  startOptions: params.startOptions,
11
11
  timeoutMs,
12
- authProfileId: params.authProfileId
12
+ authProfileId: params.authProfileId,
13
+ config: params.config
13
14
  })).request(params.method, params.requestParams, { timeoutMs });
14
15
  })(), timeoutMs, `codex app-server ${params.method} timed out`);
15
16
  }
@@ -377,4 +378,27 @@ function resolveComputerUseConfig(params) {
377
378
  });
378
379
  }
379
380
  //#endregion
380
- export { requestCodexAppServerJson as i, installCodexComputerUse as n, readCodexComputerUseStatus as r, ensureCodexComputerUse as t };
381
+ //#region extensions/codex/src/app-server/rate-limit-cache.ts
382
+ const DEFAULT_CODEX_RATE_LIMIT_CACHE_MAX_AGE_MS = 10 * 6e4;
383
+ const CODEX_RATE_LIMIT_CACHE_STATE = Symbol.for("openclaw.codexRateLimitCacheState");
384
+ function getCodexRateLimitCacheState() {
385
+ const globalState = globalThis;
386
+ globalState[CODEX_RATE_LIMIT_CACHE_STATE] ??= {};
387
+ return globalState[CODEX_RATE_LIMIT_CACHE_STATE];
388
+ }
389
+ function rememberCodexRateLimits(value, nowMs = Date.now()) {
390
+ if (value === void 0) return;
391
+ const state = getCodexRateLimitCacheState();
392
+ state.value = value;
393
+ state.updatedAtMs = nowMs;
394
+ }
395
+ function readRecentCodexRateLimits(options) {
396
+ const state = getCodexRateLimitCacheState();
397
+ if (state.value === void 0 || state.updatedAtMs === void 0) return;
398
+ const nowMs = options?.nowMs ?? Date.now();
399
+ const maxAgeMs = options?.maxAgeMs ?? DEFAULT_CODEX_RATE_LIMIT_CACHE_MAX_AGE_MS;
400
+ if (maxAgeMs >= 0 && nowMs - state.updatedAtMs > maxAgeMs) return;
401
+ return state.value;
402
+ }
403
+ //#endregion
404
+ export { readCodexComputerUseStatus as a, installCodexComputerUse as i, rememberCodexRateLimits as n, requestCodexAppServerJson as o, ensureCodexComputerUse as r, readRecentCodexRateLimits as t };