@openclaw/codex 2026.6.1 → 2026.6.5-beta.1

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.
Files changed (31) hide show
  1. package/dist/client-factory-Bt49r45B.js +17 -0
  2. package/dist/{client-BnOmn0y-.js → client-kMCtlApt.js} +43 -1
  3. package/dist/{command-handlers-VhJdcXcI.js → command-handlers-DMn2M7W7.js} +10 -10
  4. package/dist/{compact-D1dSrNrT.js → compact-CwnPeYnM.js} +16 -5
  5. package/dist/{computer-use-DYLSxIfq.js → computer-use-ClweWaMz.js} +12 -2
  6. package/dist/{config-AlzuNKCY.js → config-BT6SLiE6.js} +4 -12
  7. package/dist/{conversation-binding-CqVPKJPp.js → conversation-binding-CzpvaBs1.js} +8 -8
  8. package/dist/doctor-contract-api.js +5 -0
  9. package/dist/harness.js +9 -5
  10. package/dist/index.js +12 -13
  11. package/dist/media-understanding-provider.js +14 -6
  12. package/dist/{models-DAJvlyJu.js → models-DXorTaja.js} +9 -2
  13. package/dist/{native-hook-relay-CIJt8cLN.js → native-hook-relay-DZ3Oon0b.js} +61 -3
  14. package/dist/{notification-correlation-BykOI_jh.js → notification-correlation-o8quHmTK.js} +30 -1
  15. package/dist/prompt-overlay.js +7 -0
  16. package/dist/{protocol-validators-DIt7cXIp.js → protocol-validators-CIpP8IJ2.js} +13 -0
  17. package/dist/provider-catalog.js +8 -0
  18. package/dist/provider-discovery.js +1 -0
  19. package/dist/provider.js +17 -2
  20. package/dist/{rate-limit-cache-N66I-Rd7.js → rate-limit-cache-C7qmZ0Jh.js} +2 -0
  21. package/dist/{request-CPtFWp-f.js → request-D64BfplD.js} +16 -4
  22. package/dist/{run-attempt-DM53zFlW.js → run-attempt-B_6VkFQN.js} +432 -35
  23. package/dist/{sandbox-guard-DMCJlzmz.js → sandbox-guard-C-Yv9uwY.js} +5 -0
  24. package/dist/{session-binding-DWiEGATW.js → session-binding-BgTv_YGm.js} +13 -2
  25. package/dist/{shared-client-DUWLidr5.js → shared-client-xytpSKD0.js} +92 -5
  26. package/dist/{side-question-dIZf9RBV.js → side-question-BEpALo9c.js} +10 -10
  27. package/dist/{thread-lifecycle-6nrEQZMV.js → thread-lifecycle-BJsazZ8j.js} +79 -46
  28. package/npm-shrinkwrap.json +2 -2
  29. package/openclaw.plugin.json +1 -1
  30. package/package.json +4 -4
  31. package/dist/client-factory-3ykiiX2z.js +0 -20
@@ -1,9 +1,9 @@
1
- import { i as codexSandboxPolicyForTurn, n as CODEX_PLUGINS_MARKETPLACE_NAMES, p as resolveCodexPluginsPolicy, s as isCodexPluginsMarketplaceName, t as CODEX_PLUGINS_MARKETPLACE_NAME } from "./config-AlzuNKCY.js";
2
- import { n as assertCodexThreadResumeResponse, r as assertCodexThreadStartResponse } from "./protocol-validators-DIt7cXIp.js";
3
- import { a as isCodexAppServerConnectionClosedError, l as isJsonObject, n as CodexAppServerRpcError } from "./client-BnOmn0y-.js";
1
+ import { d as resolveCodexPluginsPolicy, r as codexSandboxPolicyForTurn, t as CODEX_PLUGINS_MARKETPLACE_NAME } from "./config-BT6SLiE6.js";
2
+ import { n as assertCodexThreadResumeResponse, r as assertCodexThreadStartResponse } from "./protocol-validators-CIpP8IJ2.js";
3
+ import { a as isCodexAppServerConnectionClosedError, l as isJsonObject, n as CodexAppServerRpcError } from "./client-kMCtlApt.js";
4
4
  import { CODEX_GPT5_HEARTBEAT_PROMPT_OVERLAY } from "./prompt-overlay.js";
5
5
  import { isModernCodexModel } from "./provider.js";
6
- import { a as readCodexAppServerBinding, r as isCodexAppServerNativeAuthProfile, s as writeCodexAppServerBinding, t as clearCodexAppServerBinding } from "./session-binding-DWiEGATW.js";
6
+ import { a as readCodexAppServerBinding, r as isCodexAppServerNativeAuthProfile, s as writeCodexAppServerBinding, t as clearCodexAppServerBinding } from "./session-binding-BgTv_YGm.js";
7
7
  import { isFutureDateTimestampMs, resolveDateTimestampMs, resolveExpiresAtMsFromDurationMs } from "openclaw/plugin-sdk/number-runtime";
8
8
  import crypto from "node:crypto";
9
9
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -26,12 +26,11 @@ const MAX_RENDERED_CONTEXT_CHARS = 1e6;
26
26
  const DEFAULT_TEXT_PART_CHARS = 6e3;
27
27
  const MAX_TEXT_PART_CHARS = 128e3;
28
28
  const APPROX_RENDERED_CHARS_PER_TOKEN = 4;
29
+ /** Default token reserve kept out of rendered context-engine prompt text. */
29
30
  const DEFAULT_CODEX_PROJECTION_RESERVE_TOKENS = 2e4;
30
31
  const MIN_PROMPT_BUDGET_RATIO = .5;
31
32
  const MIN_PROMPT_BUDGET_TOKENS = 8e3;
32
- /**
33
- * Project assembled OpenClaw context-engine messages into Codex prompt inputs.
34
- */
33
+ /** Projects assembled OpenClaw context-engine messages into Codex prompt inputs. */
35
34
  function projectContextEngineAssemblyForCodex(params) {
36
35
  const prompt = params.prompt.trim();
37
36
  const contextMessages = dropDuplicateTrailingPrompt(params.assembledMessages, prompt);
@@ -58,6 +57,7 @@ function projectContextEngineAssemblyForCodex(params) {
58
57
  prePromptMessageCount: params.originalHistoryMessages.length
59
58
  };
60
59
  }
60
+ /** Resolves rendered context size from a token budget and reserve. */
61
61
  function resolveCodexContextEngineProjectionMaxChars(params) {
62
62
  const contextTokenBudget = typeof params.contextTokenBudget === "number" && Number.isFinite(params.contextTokenBudget) ? Math.floor(params.contextTokenBudget) : void 0;
63
63
  if (!contextTokenBudget || contextTokenBudget <= 0) return DEFAULT_RENDERED_CONTEXT_CHARS;
@@ -66,6 +66,7 @@ function resolveCodexContextEngineProjectionMaxChars(params) {
66
66
  reserveTokens: params.reserveTokens
67
67
  }) * APPROX_RENDERED_CHARS_PER_TOKEN);
68
68
  }
69
+ /** Reads Codex projection reserve tokens from compaction config. */
69
70
  function resolveCodexContextEngineProjectionReserveTokens(params) {
70
71
  const compaction = asRecord(asRecord(asRecord(params.config)?.agents)?.defaults)?.compaction;
71
72
  const configuredReserveTokens = toNonNegativeInt(asRecord(compaction)?.reserveTokens);
@@ -228,6 +229,7 @@ function truncateOlderContext(text, maxChars) {
228
229
  }
229
230
  //#endregion
230
231
  //#region extensions/codex/src/app-server/dynamic-tool-profile.ts
232
+ /** Tool names owned by Codex app-server and normally excluded from OpenClaw dynamic tools. */
231
233
  const CODEX_APP_SERVER_OWNED_DYNAMIC_TOOL_EXCLUDES = [
232
234
  "read",
233
235
  "write",
@@ -245,13 +247,16 @@ const DYNAMIC_TOOL_NAME_ALIASES = {
245
247
  bash: "exec",
246
248
  "apply-patch": "apply_patch"
247
249
  };
250
+ /** Normalizes OpenClaw/Codex tool names before filtering and allowlist checks. */
248
251
  function normalizeCodexDynamicToolName(name) {
249
252
  const normalized = name.trim().toLowerCase();
250
253
  return DYNAMIC_TOOL_NAME_ALIASES[normalized] ?? normalized;
251
254
  }
255
+ /** Returns true for private QA runs that force the Codex runtime profile. */
252
256
  function isForcedPrivateQaCodexRuntime(env = process.env) {
253
257
  return env.OPENCLAW_BUILD_PRIVATE_QA === "1" && env.OPENCLAW_QA_FORCE_RUNTIME?.trim().toLowerCase() === "codex";
254
258
  }
259
+ /** Resolves whether dynamic tools load directly or through Codex tool search. */
255
260
  function resolveCodexDynamicToolsLoading(config, env = process.env) {
256
261
  return isForcedPrivateQaCodexRuntime(env) ? "direct" : config.codexDynamicToolsLoading ?? "searchable";
257
262
  }
@@ -260,16 +265,20 @@ function normalizeCodexModelId(modelId) {
260
265
  if (!normalized) return "";
261
266
  return normalized.includes("/") ? normalized.split("/").at(-1) : normalized;
262
267
  }
268
+ /** Returns true when model behavior requires direct dynamic-tool registration. */
263
269
  function shouldUseDirectCodexDynamicToolsForModel(modelId) {
264
270
  return shouldDisableCodexToolSearchForModel(modelId);
265
271
  }
272
+ /** Returns true for models whose tool-search path is unsupported or inefficient. */
266
273
  function shouldDisableCodexToolSearchForModel(modelId) {
267
274
  return normalizeCodexModelId(modelId) === "gpt-5.4-nano";
268
275
  }
276
+ /** Resolves dynamic-tool loading after applying model-specific restrictions. */
269
277
  function resolveCodexDynamicToolsLoadingForModel(config, modelId, env = process.env) {
270
278
  const loading = resolveCodexDynamicToolsLoading(config, env);
271
279
  return loading === "searchable" && shouldUseDirectCodexDynamicToolsForModel(modelId) ? "direct" : loading;
272
280
  }
281
+ /** Filters OpenClaw tools that Codex owns natively or config explicitly excludes. */
273
282
  function filterCodexDynamicTools(tools, config, env = process.env) {
274
283
  const excludes = /* @__PURE__ */ new Set();
275
284
  if (!isForcedPrivateQaCodexRuntime(env)) for (const name of CODEX_APP_SERVER_OWNED_DYNAMIC_TOOL_EXCLUDES) excludes.add(name);
@@ -281,10 +290,16 @@ function filterCodexDynamicTools(tools, config, env = process.env) {
281
290
  }
282
291
  //#endregion
283
292
  //#region extensions/codex/src/app-server/image-payload-sanitizer.ts
293
+ /**
294
+ * Sanitizes inline image payloads mirrored through Codex history so invalid
295
+ * base64 data becomes readable text instead of poisoning replayed transcripts.
296
+ */
284
297
  const IMAGE_OMITTED_TEXT = "omitted image payload: invalid inline image data";
298
+ /** Validates and normalizes an inline image data URL for Codex history payloads. */
285
299
  function sanitizeInlineImageDataUrl$1(imageUrl) {
286
300
  return sanitizeInlineImageDataUrl(imageUrl);
287
301
  }
302
+ /** Builds the replacement text inserted when an inline image payload is invalid. */
288
303
  function invalidInlineImageText(label) {
289
304
  return `[${label}] ${IMAGE_OMITTED_TEXT}`;
290
305
  }
@@ -325,6 +340,7 @@ function sanitizeImageContentRecord(record, label) {
325
340
  };
326
341
  }
327
342
  }
343
+ /** Recursively sanitizes all Codex history image shapes while preserving unknown structure. */
328
344
  function sanitizeCodexHistoryImagePayloads(value, label) {
329
345
  if (Array.isArray(value)) return value.map((entry) => sanitizeCodexHistoryImagePayloads(entry, label));
330
346
  if (!isRecord(value)) return value;
@@ -335,6 +351,7 @@ function sanitizeCodexHistoryImagePayloads(value, label) {
335
351
  return next;
336
352
  }
337
353
  const MAX_SERIALIZED_ERROR_MESSAGE_LENGTH = 500;
354
+ /** In-memory app inventory cache with coalesced refreshes per key. */
338
355
  var CodexAppInventoryCache = class {
339
356
  constructor(options = {}) {
340
357
  this.entries = /* @__PURE__ */ new Map();
@@ -344,6 +361,7 @@ var CodexAppInventoryCache = class {
344
361
  this.revision = 0;
345
362
  this.ttlMs = options.ttlMs ?? 36e5;
346
363
  }
364
+ /** Reads a snapshot and schedules refresh when missing, stale, or forced. */
347
365
  read(params) {
348
366
  const nowMs = resolveDateTimestampMs(params.nowMs);
349
367
  const entry = this.entries.get(params.key);
@@ -368,9 +386,11 @@ var CodexAppInventoryCache = class {
368
386
  ...entry.lastError ? { diagnostic: entry.lastError } : {}
369
387
  };
370
388
  }
389
+ /** Forces or joins an immediate refresh for a cache key. */
371
390
  refreshNow(params) {
372
391
  return this.refresh(params);
373
392
  }
393
+ /** Marks a key stale and records the reason as a diagnostic. */
374
394
  invalidate(key, reason, nowMs = Date.now()) {
375
395
  this.revision += 1;
376
396
  const diagnostic = {
@@ -385,6 +405,7 @@ var CodexAppInventoryCache = class {
385
405
  } else this.diagnostics.set(key, diagnostic);
386
406
  return this.revision;
387
407
  }
408
+ /** Clears all cached snapshots, diagnostics, in-flight requests, and revision state. */
388
409
  clear() {
389
410
  this.entries.clear();
390
411
  this.inFlight.clear();
@@ -392,6 +413,7 @@ var CodexAppInventoryCache = class {
392
413
  this.diagnostics.clear();
393
414
  this.revision = 0;
394
415
  }
416
+ /** Returns the monotonically increasing cache revision. */
395
417
  getRevision() {
396
418
  return this.revision;
397
419
  }
@@ -453,6 +475,7 @@ var CodexAppInventoryCache = class {
453
475
  }
454
476
  }
455
477
  };
478
+ /** Serializes a refresh failure without leaking large or sensitive error data. */
456
479
  function serializeCodexAppInventoryError(error) {
457
480
  const record = isRecord(error) ? error : void 0;
458
481
  const data = record && "data" in record ? redactErrorData(record.data) : void 0;
@@ -463,7 +486,9 @@ function serializeCodexAppInventoryError(error) {
463
486
  ...data !== void 0 ? { data } : {}
464
487
  };
465
488
  }
489
+ /** Shared app inventory cache used by Codex app-server runtime paths. */
466
490
  const defaultCodexAppInventoryCache = new CodexAppInventoryCache();
491
+ /** Builds a stable cache key from runtime identity fields. */
467
492
  function buildCodexAppInventoryCacheKey(input) {
468
493
  return JSON.stringify({
469
494
  codexHome: input.codexHome ?? null,
@@ -524,6 +549,11 @@ function isSensitiveErrorDataKey(key) {
524
549
  }
525
550
  //#endregion
526
551
  //#region extensions/codex/src/app-server/plugin-inventory.ts
552
+ /**
553
+ * Reads Codex plugin marketplace state and app inventory to decide which
554
+ * plugin-owned apps can be exposed to a native Codex thread.
555
+ */
556
+ /** Reads configured Codex plugin state and maps owned apps to readiness diagnostics. */
527
557
  async function readCodexPluginInventory(params) {
528
558
  const policy = params.policy ?? resolveCodexPluginsPolicy(params.pluginConfig);
529
559
  if (!policy.enabled) return {
@@ -535,9 +565,18 @@ async function readCodexPluginInventory(params) {
535
565
  }]
536
566
  };
537
567
  const appInventory = readCachedAppInventory(params);
538
- const listed = await params.request("plugin/list", { cwds: [] });
539
- const marketplaceByName = /* @__PURE__ */ new Map();
540
- for (const marketplace of listed.marketplaces) if (isCodexPluginsMarketplaceName(marketplace.name)) marketplaceByName.set(marketplace.name, marketplace);
568
+ const marketplaceEntry = (await params.request("plugin/list", { cwds: [] })).marketplaces.find((marketplace) => marketplace.name === CODEX_PLUGINS_MARKETPLACE_NAME);
569
+ if (!marketplaceEntry) return {
570
+ policy,
571
+ records: [],
572
+ diagnostics: policy.pluginPolicies.filter((pluginPolicy) => pluginPolicy.enabled).map((pluginPolicy) => ({
573
+ code: "marketplace_missing",
574
+ plugin: pluginPolicy,
575
+ message: `Codex marketplace ${CODEX_PLUGINS_MARKETPLACE_NAME} was not found.`
576
+ })),
577
+ ...appInventory ? { appInventory } : {}
578
+ };
579
+ const marketplace = marketplaceRef(marketplaceEntry);
541
580
  const diagnostics = [];
542
581
  const records = [];
543
582
  if (appInventory?.state === "missing") diagnostics.push({
@@ -550,22 +589,12 @@ async function readCodexPluginInventory(params) {
550
589
  });
551
590
  for (const pluginPolicy of policy.pluginPolicies) {
552
591
  if (!pluginPolicy.enabled) continue;
553
- const marketplaceEntry = marketplaceByName.get(pluginPolicy.marketplaceName);
554
- if (!marketplaceEntry) {
555
- diagnostics.push({
556
- code: "marketplace_missing",
557
- plugin: pluginPolicy,
558
- message: `Codex marketplace ${pluginPolicy.marketplaceName} was not found.`
559
- });
560
- continue;
561
- }
562
- const marketplace = marketplaceRef(marketplaceEntry);
563
592
  const summary = findPluginSummary(marketplaceEntry, pluginPolicy.pluginName);
564
593
  if (!summary) {
565
594
  diagnostics.push({
566
595
  code: "plugin_missing",
567
596
  plugin: pluginPolicy,
568
- message: `${pluginPolicy.pluginName} was not found in ${pluginPolicy.marketplaceName}.`
597
+ message: `${pluginPolicy.pluginName} was not found in ${CODEX_PLUGINS_MARKETPLACE_NAME}.`
569
598
  });
570
599
  continue;
571
600
  }
@@ -604,31 +633,23 @@ async function readCodexPluginInventory(params) {
604
633
  }
605
634
  return {
606
635
  policy,
636
+ marketplace,
607
637
  records,
608
638
  diagnostics,
609
639
  ...appInventory ? { appInventory } : {}
610
640
  };
611
641
  }
612
- function findOpenAiCuratedPluginSummary(listed, pluginName, marketplaceName) {
613
- if (marketplaceName) {
614
- const marketplaceEntry = listed.marketplaces.find((marketplace) => marketplace.name === marketplaceName);
615
- if (!marketplaceEntry) return;
616
- const summary = findPluginSummary(marketplaceEntry, pluginName);
617
- return summary ? {
618
- marketplace: marketplaceRef(marketplaceEntry),
619
- summary
620
- } : void 0;
621
- }
622
- for (const allowedName of CODEX_PLUGINS_MARKETPLACE_NAMES) {
623
- const marketplaceEntry = listed.marketplaces.find((marketplace) => marketplace.name === allowedName);
624
- if (!marketplaceEntry) continue;
625
- const summary = findPluginSummary(marketplaceEntry, pluginName);
626
- if (summary) return {
627
- marketplace: marketplaceRef(marketplaceEntry),
628
- summary
629
- };
630
- }
631
- }
642
+ /** Finds one plugin summary in the OpenAI curated marketplace response. */
643
+ function findOpenAiCuratedPluginSummary(listed, pluginName) {
644
+ const marketplaceEntry = listed.marketplaces.find((marketplace) => marketplace.name === CODEX_PLUGINS_MARKETPLACE_NAME);
645
+ if (!marketplaceEntry) return;
646
+ const summary = findPluginSummary(marketplaceEntry, pluginName);
647
+ return summary ? {
648
+ marketplace: marketplaceRef(marketplaceEntry),
649
+ summary
650
+ } : void 0;
651
+ }
652
+ /** Builds plugin/read or plugin/install params from a marketplace reference. */
632
653
  function pluginReadParams(marketplace, pluginName) {
633
654
  return {
634
655
  ...marketplace.path ? { marketplacePath: marketplace.path } : {},
@@ -704,20 +725,21 @@ function pluginNameFromPluginId(pluginId, marketplaceName) {
704
725
  }
705
726
  function marketplaceRef(marketplace) {
706
727
  return {
707
- name: isCodexPluginsMarketplaceName(marketplace.name) ? marketplace.name : CODEX_PLUGINS_MARKETPLACE_NAME,
728
+ name: CODEX_PLUGINS_MARKETPLACE_NAME,
708
729
  ...marketplace.path ? { path: marketplace.path } : {},
709
730
  ...!marketplace.path ? { remoteMarketplaceName: marketplace.name } : {}
710
731
  };
711
732
  }
712
733
  //#endregion
713
734
  //#region extensions/codex/src/app-server/plugin-activation.ts
735
+ /** Installs/enables a configured Codex plugin and refreshes plugin/app state. */
714
736
  async function ensureCodexPluginActivation(params) {
715
- if (!isCodexPluginsMarketplaceName(params.identity.marketplaceName)) return activationFailure(params.identity, "marketplace_missing", { message: "Only " + CODEX_PLUGINS_MARKETPLACE_NAMES.join(" or ") + " plugins can be activated." });
737
+ if (params.identity.marketplaceName !== "openai-curated") return activationFailure(params.identity, "marketplace_missing", { message: "Only openai-curated plugins can be activated." });
716
738
  const listed = await params.request("plugin/list", { cwds: [] });
717
- const resolved = findOpenAiCuratedPluginSummary(listed, params.identity.pluginName, params.identity.marketplaceName);
739
+ const resolved = findOpenAiCuratedPluginSummary(listed, params.identity.pluginName);
718
740
  if (!resolved) {
719
- if (!listed.marketplaces.some((marketplace) => marketplace.name === params.identity.marketplaceName)) return activationFailure(params.identity, "marketplace_missing", { message: `Codex marketplace ${params.identity.marketplaceName} was not found.` });
720
- return activationFailure(params.identity, "plugin_missing", { message: `${params.identity.pluginName} was not found in ${params.identity.marketplaceName}.` });
741
+ if (!listed.marketplaces.some((marketplace) => marketplace.name === "openai-curated")) return activationFailure(params.identity, "marketplace_missing", { message: `Codex marketplace ${CODEX_PLUGINS_MARKETPLACE_NAME} was not found.` });
742
+ return activationFailure(params.identity, "plugin_missing", { message: `${params.identity.pluginName} was not found in ${CODEX_PLUGINS_MARKETPLACE_NAME}.` });
721
743
  }
722
744
  if (resolved.summary.installed && resolved.summary.enabled && !params.installEvenIfActive) return {
723
745
  identity: params.identity,
@@ -752,6 +774,7 @@ async function ensureCodexPluginActivation(params) {
752
774
  diagnostics: [...refreshDiagnostics, ...installResponse.appsNeedingAuth.map((app) => ({ message: `${app.name} requires app authentication before plugin tools are exposed.` }))]
753
775
  };
754
776
  }
777
+ /** Forces Codex plugin, skill, hook, MCP, and app inventory refreshes after activation. */
755
778
  async function refreshCodexPluginRuntimeState(params) {
756
779
  const diagnostics = [];
757
780
  await params.request("plugin/list", { cwds: [] });
@@ -791,11 +814,17 @@ function activationFailure(identity, reason, diagnostic) {
791
814
  }
792
815
  //#endregion
793
816
  //#region extensions/codex/src/app-server/plugin-thread-config.ts
817
+ /**
818
+ * Builds Codex thread config patches that expose only policy-approved
819
+ * plugin-owned apps for native Codex turns.
820
+ */
794
821
  const CODEX_PLUGIN_THREAD_CONFIG_INPUT_FINGERPRINT_VERSION = 1;
795
822
  const CODEX_PLUGIN_THREAD_CONFIG_FINGERPRINT_VERSION = 1;
823
+ /** Returns true when plugin config exists and thread config may need app patches. */
796
824
  function shouldBuildCodexPluginThreadConfig(pluginConfig) {
797
825
  return resolveCodexPluginsPolicy(pluginConfig).configured;
798
826
  }
827
+ /** Fingerprints policy and app-cache identity before runtime inventory is read. */
799
828
  function buildCodexPluginThreadConfigInputFingerprint(params) {
800
829
  return fingerprintJson({
801
830
  version: CODEX_PLUGIN_THREAD_CONFIG_INPUT_FINGERPRINT_VERSION,
@@ -803,6 +832,7 @@ function buildCodexPluginThreadConfigInputFingerprint(params) {
803
832
  appCacheKey: params.appCacheKey ?? null
804
833
  });
805
834
  }
835
+ /** Builds the Codex apps config patch and policy context for a native thread. */
806
836
  async function buildCodexPluginThreadConfig(params) {
807
837
  const appCache = params.appCache ?? defaultCodexAppInventoryCache;
808
838
  let inputFingerprint = buildCodexPluginThreadConfigInputFingerprint({
@@ -954,6 +984,7 @@ async function buildCodexPluginThreadConfig(params) {
954
984
  diagnostics
955
985
  };
956
986
  }
987
+ /** Deep-merges optional Codex thread config patches, returning undefined when empty. */
957
988
  function mergeCodexThreadConfigs(...configs) {
958
989
  let merged;
959
990
  for (const config of configs) {
@@ -962,6 +993,7 @@ function mergeCodexThreadConfigs(...configs) {
962
993
  }
963
994
  return merged && Object.keys(merged).length > 0 ? merged : void 0;
964
995
  }
996
+ /** Detects when a stored thread binding no longer matches current plugin policy inputs. */
965
997
  function isCodexPluginThreadBindingStale(params) {
966
998
  if (!params.codexPluginsEnabled) return Boolean(params.bindingFingerprint || params.bindingInputFingerprint || params.hasBindingPolicyContext);
967
999
  if (!params.bindingFingerprint || !params.bindingInputFingerprint || !params.hasBindingPolicyContext) return true;
@@ -1068,6 +1100,7 @@ function stableStringify(value) {
1068
1100
  //#endregion
1069
1101
  //#region extensions/codex/src/app-server/profiler-flag.ts
1070
1102
  const PROFILER_FLAGS = ["profiler", "codex.profiler"];
1103
+ /** Checks the generic and Codex-specific profiler diagnostic flags. */
1071
1104
  function isCodexAppServerProfilerEnabled(config, env = process.env) {
1072
1105
  return PROFILER_FLAGS.some((flag) => isDiagnosticFlagEnabled(flag, config, env));
1073
1106
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/codex",
3
- "version": "2026.6.1",
3
+ "version": "2026.6.5-beta.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/codex",
9
- "version": "2026.6.1",
9
+ "version": "2026.6.5-beta.1",
10
10
  "dependencies": {
11
11
  "@openai/codex": "0.135.0",
12
12
  "typebox": "1.1.39",
@@ -114,7 +114,7 @@
114
114
  },
115
115
  "marketplaceName": {
116
116
  "type": "string",
117
- "enum": ["openai-curated", "openai-bundled", "openai-primary-runtime"]
117
+ "enum": ["openai-curated"]
118
118
  },
119
119
  "pluginName": {
120
120
  "type": "string"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/codex",
3
- "version": "2026.6.1",
3
+ "version": "2026.6.5-beta.1",
4
4
  "description": "OpenClaw Codex app-server harness and model provider plugin with a Codex-managed GPT catalog.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,10 +26,10 @@
26
26
  "minHostVersion": ">=2026.5.1-beta.1"
27
27
  },
28
28
  "compat": {
29
- "pluginApi": ">=2026.6.1"
29
+ "pluginApi": ">=2026.6.5-beta.1"
30
30
  },
31
31
  "build": {
32
- "openclawVersion": "2026.6.1"
32
+ "openclawVersion": "2026.6.5-beta.1"
33
33
  },
34
34
  "release": {
35
35
  "publishToClawHub": true,
@@ -47,7 +47,7 @@
47
47
  "README.md"
48
48
  ],
49
49
  "peerDependencies": {
50
- "openclaw": ">=2026.6.1"
50
+ "openclaw": ">=2026.6.5-beta.1"
51
51
  },
52
52
  "peerDependenciesMeta": {
53
53
  "openclaw": {
@@ -1,20 +0,0 @@
1
- //#region extensions/codex/src/app-server/client-factory.ts
2
- let sharedClientModulePromise = null;
3
- const loadSharedClientModule = async () => {
4
- sharedClientModulePromise ??= import("./shared-client-DUWLidr5.js").then((n) => n.s);
5
- return await sharedClientModulePromise;
6
- };
7
- const defaultCodexAppServerClientFactory = (startOptions, authProfileId, agentDir, config) => loadSharedClientModule().then(({ getSharedCodexAppServerClient }) => getSharedCodexAppServerClient({
8
- startOptions,
9
- authProfileId,
10
- agentDir,
11
- config
12
- }));
13
- const defaultLeasedCodexAppServerClientFactory = (startOptions, authProfileId, agentDir, config) => loadSharedClientModule().then(({ getLeasedSharedCodexAppServerClient }) => getLeasedSharedCodexAppServerClient({
14
- startOptions,
15
- authProfileId,
16
- agentDir,
17
- config
18
- }));
19
- //#endregion
20
- export { defaultLeasedCodexAppServerClientFactory as n, defaultCodexAppServerClientFactory as t };