@openclaw/codex 2026.5.4-beta.1 → 2026.5.4-beta.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/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-B-1qT9nX.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-B7LbV3PF.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) {
@@ -378,4 +378,27 @@ function resolveComputerUseConfig(params) {
378
378
  });
379
379
  }
380
380
  //#endregion
381
- 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 };