@openclaw/codex 2026.10.5 → 2026.10.6

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 (82) hide show
  1. package/dist/.setup/{account-usage-runtime-Dqpnnkst.mjs → account-usage-runtime-E3SrjJVn.mjs} +3 -3
  2. package/dist/.setup/{app-server-policy-XTIa6h5k.mjs → app-server-policy-V8zuN8q_.mjs} +1 -1
  3. package/dist/.setup/{apply-QyZT5-na.mjs → apply-C3s-1Zxe.mjs} +14 -14
  4. package/dist/.setup/{attempt-client-cleanup-TScCVTsk.mjs → attempt-client-cleanup-BVww-ct8.mjs} +4 -4
  5. package/dist/.setup/{attempt-workspace-context-Cr3mI4vp.mjs → attempt-workspace-context-BkA0W8Jy.mjs} +1 -1
  6. package/dist/.setup/{auth-cache-key-DvDLHVJe.mjs → auth-cache-key-CXK7tmkb.mjs} +4 -3
  7. package/dist/.setup/{auth-profile-health-oHizqgye.mjs → auth-profile-health-B05o5BAm.mjs} +12 -5
  8. package/dist/.setup/{binding-connection-X1ZeEDz8.mjs → binding-connection-C0t9TBX_.mjs} +1 -1
  9. package/dist/.setup/{binding-connection.runtime-CZSz0g4u.mjs → binding-connection.runtime-Wdm5G_bw.mjs} +1 -1
  10. package/dist/.setup/{bounded-turn-isolation-Brj5qzz6.mjs → bounded-turn-isolation-CIQJykuM.mjs} +3 -3
  11. package/dist/.setup/{bounded-turn-BpjZixcd.mjs → bounded-turn-vdpL2efh.mjs} +13 -12
  12. package/dist/.setup/{build-state-DfrctLQv.mjs → build-state-DPMC9C_U.mjs} +1 -1
  13. package/dist/.setup/{client-BpSxNz4F.mjs → client-Div-zqnz.mjs} +19 -15
  14. package/dist/.setup/{client-catalog-response-DloWE31e.mjs → client-catalog-response-Dtob_lVt.mjs} +1 -1
  15. package/dist/.setup/{command-dispatch-CIdf7ZvD.mjs → command-dispatch-ByO36LmS.mjs} +1 -1
  16. package/dist/.setup/{command-handlers-C2XNDeHL.mjs → command-handlers-CJqo6LZS.mjs} +16 -16
  17. package/dist/.setup/{command-rpc-DpmvEmhc.mjs → command-rpc-Co0UzT-T.mjs} +8 -8
  18. package/dist/.setup/{compact-DpCHUqU5.mjs → compact-CzNBg4cQ.mjs} +10 -10
  19. package/dist/.setup/{computer-use-BgGC32hr.mjs → computer-use-BcDrQlxi.mjs} +7 -7
  20. package/dist/.setup/{config-G4IGX6bK.mjs → config-LQemoqTL.mjs} +3 -3
  21. package/dist/.setup/{config-options-nvYwVDyy.mjs → config-options-CZmH25Xq.mjs} +1 -1
  22. package/dist/.setup/{config-runtime-B8agjie6.mjs → config-runtime-DGB1-VbB.mjs} +1 -1
  23. package/dist/.setup/{config-security-D0hAOQRI.mjs → config-security-DpkGNy5T.mjs} +1 -1
  24. package/dist/.setup/{conversation-binding-BCoWi2Kn.mjs → conversation-binding-Dcv7_rs-.mjs} +38 -29
  25. package/dist/.setup/{conversation-control--OHH2dHA.mjs → conversation-control-BtPxevoK.mjs} +1 -1
  26. package/dist/.setup/{doctor-start-options-DedLaoqI.mjs → doctor-start-options-C28ek2hD.mjs} +3 -3
  27. package/dist/.setup/{dynamic-tool-build-CoMf7IKx.mjs → dynamic-tool-build-DjbDZzOJ.mjs} +3 -3
  28. package/dist/.setup/{dynamic-tools-CKynHtxM.mjs → dynamic-tools-75qoSOch.mjs} +10 -10
  29. package/dist/.setup/{effective-mcp-catalog-DXGsGC1j.mjs → effective-mcp-catalog-Dz0J8iAj.mjs} +4 -4
  30. package/dist/.setup/{ephemeral-turn-C6aFeGFS.mjs → ephemeral-turn-K_d99r9P.mjs} +2 -2
  31. package/dist/.setup/{inference-proxy-BDWV0djM.mjs → inference-proxy-DSnaS-uS.mjs} +5 -4
  32. package/dist/.setup/{isolated-completion-DVDn5GU5.mjs → isolated-completion-dNt4kRLw.mjs} +6 -6
  33. package/dist/.setup/{mcp-app-session-preparation-Cnmuh9RT.mjs → mcp-app-session-preparation-C7LyxbAm.mjs} +8 -8
  34. package/dist/.setup/{model-catalog-DRbHoUhG.mjs → model-catalog-BRJ7RMXY.mjs} +7 -7
  35. package/dist/.setup/{models-GBLXb27n.mjs → models-CusrgpiY.mjs} +3 -3
  36. package/dist/.setup/{native-auth-DWrRSl4Z.mjs → native-auth-CveRfTpz.mjs} +1 -1
  37. package/dist/.setup/{native-hook-relay-BQ9UkpeG.mjs → native-hook-relay-BvwSj5bt.mjs} +5 -5
  38. package/dist/.setup/{native-mcp-app-DIheNk35.mjs → native-mcp-app-DDEtVQED.mjs} +4 -4
  39. package/dist/.setup/{native-skill-isolation-CxZRtiWZ.mjs → native-skill-isolation-Cx2AkUco.mjs} +3 -3
  40. package/dist/.setup/{native-subagent-monitor-gqu3TQOv.mjs → native-subagent-monitor-CBYFkNsB.mjs} +66 -19
  41. package/dist/.setup/{plan-DZWYASAx.mjs → plan-BKFbfVsV.mjs} +4 -4
  42. package/dist/.setup/{plugin-activation-CsW09DWl.mjs → plugin-activation-BgfNFH2L.mjs} +2 -2
  43. package/dist/.setup/{plugin-approval-roundtrip-HbFUm9Pp.mjs → plugin-approval-roundtrip-CXXXhuKi.mjs} +1 -1
  44. package/dist/.setup/{plugin-inventory-kLR7G02h.mjs → plugin-inventory-OhiCoyPH.mjs} +1 -1
  45. package/dist/.setup/{project-doc-thread-config-B2ZD23A_.mjs → project-doc-thread-config-D_sWbxFR.mjs} +5 -5
  46. package/dist/.setup/{provider-BiUzaRth.mjs → provider-BVV8SWlx.mjs} +4 -4
  47. package/dist/.setup/{provider-capabilities-DOBUBt86.mjs → provider-capabilities-B-pTlDsf.mjs} +1 -1
  48. package/dist/.setup/{request-DhbisYCc.mjs → request-m-H-7FMu.mjs} +2 -2
  49. package/dist/.setup/{run-attempt-WbitbMr6.mjs → run-attempt-Ch1emiZE.mjs} +104 -54
  50. package/dist/.setup/{runtime-artifact-nFHy1R0x.mjs → runtime-artifact-CCPLKFGR.mjs} +1 -1
  51. package/dist/.setup/{runtime-artifact-connection-XSifLLBH.mjs → runtime-artifact-connection-dFoSOKy7.mjs} +3 -3
  52. package/dist/.setup/{session-catalog-events-IoszcO7-.mjs → session-catalog-events-BBV3DMG7.mjs} +4 -4
  53. package/dist/.setup/{session-catalog-index-_4Z5quG3.mjs → session-catalog-index-B00GIRi3.mjs} +4 -4
  54. package/dist/.setup/{session-catalog-native-projection-imNPfB3q.mjs → session-catalog-native-projection-BJupfCyt.mjs} +1 -1
  55. package/dist/.setup/{session-catalog-projection-BFp1d3bJ.mjs → session-catalog-projection-CYgFTaYm.mjs} +1 -1
  56. package/dist/.setup/{session-catalog-source-CgWkqG43.mjs → session-catalog-source-Xt6-hNns.mjs} +1 -1
  57. package/dist/.setup/{session-permission-policy-BYI6mp5u.mjs → session-permission-policy-C7kYxPGd.mjs} +1 -1
  58. package/dist/.setup/{session-retirement-AhaR7MAp.mjs → session-retirement-DIqF1vQ4.mjs} +5 -5
  59. package/dist/.setup/{settled-turn-finalizer-Blsc4VLX.mjs → settled-turn-finalizer-dVv34G_E.mjs} +4 -4
  60. package/dist/.setup/{shared-client-wb1JBldZ.mjs → shared-client-CNGDTv68.mjs} +29 -17
  61. package/dist/.setup/{side-question-DNEeROvz.mjs → side-question-D1Wa21s9.mjs} +17 -17
  62. package/dist/.setup/{source-BjBw-zoV.mjs → source-DyVuYlTN.mjs} +3 -3
  63. package/dist/.setup/{thread-lifecycle-run-DdwKMIae.mjs → thread-lifecycle-run-DjSfTw6v.mjs} +60 -36
  64. package/dist/.setup/{thread-ownership-CTUs8Eyu.mjs → thread-ownership-BBsOFzCM.mjs} +3 -3
  65. package/dist/.setup/{thread-policy-BMRvlOi-.mjs → thread-policy-BEiS7ITh.mjs} +3 -3
  66. package/dist/.setup/{thread-requests-BqPhA4Gs.mjs → thread-requests-DjyDmCo4.mjs} +2 -2
  67. package/dist/.setup/{thread-resume-CD48Vab8.mjs → thread-resume-BqOca2Iy.mjs} +4 -4
  68. package/dist/.setup/{transport-websocket-DOY0dJXN.mjs → transport-websocket-CEBjEtFP.mjs} +1 -1
  69. package/dist/.setup/{turn-router-DdlzuFdm.mjs → turn-router-DM0fRrYI.mjs} +1 -1
  70. package/dist/.setup/{upstream-session-fork-BF0c69x6.mjs → upstream-session-fork-CxgShpwe.mjs} +14 -14
  71. package/dist/.setup/{usage-BsMyAOaB.mjs → usage-DV8T9Yau.mjs} +3 -3
  72. package/dist/.setup/{usage-limit-error-hLIGKewV.mjs → usage-limit-error-ryR1PGou.mjs} +1 -1
  73. package/dist/.setup/{web-search-provider.runtime-BJK0lNpc.mjs → web-search-provider.runtime-DkciK2gS.mjs} +2 -2
  74. package/dist/.setup/{workspace-write-sandbox-probe-Cyn6cBsp.mjs → workspace-write-sandbox-probe-DvfWTvuR.mjs} +1 -1
  75. package/dist/api.js +3 -3
  76. package/dist/catalog-page.worker.js +1 -1
  77. package/dist/harness.js +18 -18
  78. package/dist/index.js +33 -33
  79. package/dist/media-understanding-provider.js +2 -2
  80. package/dist/migration-provider-api.js +1 -1
  81. package/dist/provider-discovery.js +1 -1
  82. package/package.json +4 -4
@@ -1,22 +1,22 @@
1
1
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
2
- import { n as defineCodexBuildState, t as codexBuildSymbol } from "./build-state-DfrctLQv.mjs";
2
+ import { n as defineCodexBuildState, t as codexBuildSymbol } from "./build-state-DPMC9C_U.mjs";
3
3
  import { t as CODEX_APP_SERVER_AUTH_PROVIDER } from "./auth-profile-selection-hr8ocLtz.mjs";
4
4
  import { n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
5
5
  import { a as withEphemeralCodexAuthStore, i as withClearedEnvironmentVariables, n as resolveCodexAppServerLocalHomeDir, r as resolveCodexAppServerUserHomeDir, t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
6
- import { a as resolveCodexAppServerStartOptionsForAgent, d as readCodexEffectiveConfig, o as resolveCodexComputerUseConfig, t as codexAppServerStartOptionsKey, u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-nvYwVDyy.mjs";
6
+ import { a as resolveCodexAppServerStartOptionsForAgent, d as readCodexEffectiveConfig, o as resolveCodexComputerUseConfig, t as codexAppServerStartOptionsKey, u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-CZmH25Xq.mjs";
7
7
  import { d as resolveMacOSDesktopCodexBundledMarketplaceCandidates, f as resolveMacOSDesktopCodexComputerUseServiceAppCandidates, i as resolveManagedCodexNativeCommand, l as resolveFirstExistingMacOSDesktopCodexBundledMarketplacePath, r as resolveManagedCodexAppServerStartOptions, t as isManagedCodexDesktopCommand, u as resolveMacOSDesktopCodexAppPathCandidates } from "./managed-binary-DwC9wxch.mjs";
8
- import { A as waitForCodexDesktopGeneration, C as retirePendingSharedClientEntryIfUnclaimed, D as waitForUnclaimedSharedClientStartup, _ as observeSharedClientAcquire, a as readCodexCliAuthFileApiKey, b as releaseSharedClientEntry, c as resolveCodexAppServerPreparedApiKeyCacheKey, d as getCurrentSharedClientEntry, f as getOrCreateSharedClientEntry, g as observeAcquire, h as notifyDesktopGenerationDrainChecks, i as fingerprintTokenAuthProfileCacheKey, j as readCodexDesktopArtifactTreeFingerprint, k as isCodexDesktopGenerationCurrent, l as closeSharedClientEntryIfUnclaimed, n as CODEX_AUTH_JSON_FILENAME, o as readFirstNonEmptyEnv, p as getSharedCodexAppServerClientState, r as fingerprintApiKeyAuthProfileCacheKey, s as resolveCodexAppServerFallbackApiKeyCacheKey, t as CODEX_APP_SERVER_API_KEY_ENV_VARS, u as createCodexAppServerStartupLifetime, v as ownCodexStartup, w as retireSharedCodexAppServerClientIfCurrent, x as retainSharedClientEntry, y as recordSharedClientAcquireBoundary } from "./auth-cache-key-DvDLHVJe.mjs";
8
+ import { A as waitForCodexDesktopGeneration, C as retirePendingSharedClientEntryIfUnclaimed, D as waitForUnclaimedSharedClientStartup, _ as observeSharedClientAcquire, a as readCodexCliAuthFileApiKey, b as releaseSharedClientEntry, c as resolveCodexAppServerPreparedApiKeyCacheKey, d as getCurrentSharedClientEntry, f as getOrCreateSharedClientEntry, g as observeAcquire, h as notifyDesktopGenerationDrainChecks, i as fingerprintTokenAuthProfileCacheKey, j as readCodexDesktopArtifactTreeFingerprint, k as isCodexDesktopGenerationCurrent, l as closeSharedClientEntryIfUnclaimed, n as CODEX_AUTH_JSON_FILENAME, o as readFirstNonEmptyEnv, p as getSharedCodexAppServerClientState, r as fingerprintApiKeyAuthProfileCacheKey, s as resolveCodexAppServerFallbackApiKeyCacheKey, t as CODEX_APP_SERVER_API_KEY_ENV_VARS, u as createCodexAppServerStartupLifetime, v as ownCodexStartup, w as retireSharedCodexAppServerClientIfCurrent, x as retainSharedClientEntry, y as recordSharedClientAcquireBoundary } from "./auth-cache-key-CXK7tmkb.mjs";
9
9
  import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-lgeKKHyw.mjs";
10
10
  import { n as CodexAppServerAuthProfileUnavailableError, r as formatCodexAuthProfileUnavailableMessage } from "./auth-profile-recovery-BREezV0L.mjs";
11
11
  import { a as codexPrewriteRejectionCause } from "./rpc-error-C98SHchT.mjs";
12
12
  import { i as withTimeout } from "./timeout-D0mEWSGG.mjs";
13
13
  import { n as readCodexSessionMeta } from "./session-catalog-provenance-CmsOE5mh.mjs";
14
- import { n as observeCodexCatalogClient } from "./session-catalog-events-IoszcO7-.mjs";
15
- import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-B8agjie6.mjs";
14
+ import { n as observeCodexCatalogClient } from "./session-catalog-events-BBV3DMG7.mjs";
15
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DGB1-VbB.mjs";
16
16
  import { a as resolveCodexAppServerAuthProfileStore, i as resolveCodexAppServerAuthProfileIdForAgent, r as resolveCodexAppServerAuthProfileId, t as isCodexAppServerNativeAuthProfile } from "./auth-profile-CgHQ8Vot.mjs";
17
17
  import { i as isCodexResponsesOAuthCredential, n as createCodexResponsesOAuth, o as resolveCodexResponsesOAuthProfileFingerprint, r as isCodexResponsesOAuth, t as CODEX_RESPONSES_OAUTH_PROVIDER } from "./responses-oauth-twnuTaAa.mjs";
18
- import { N as isUnsupportedCodexAppServerVersionError, t as CodexAppServerClient } from "./client-BpSxNz4F.mjs";
19
- import { n as isCodexWebSocketOpenFailure } from "./transport-websocket-DOY0dJXN.mjs";
18
+ import { N as isUnsupportedCodexAppServerVersionError, t as CodexAppServerClient } from "./client-Div-zqnz.mjs";
19
+ import { n as isCodexWebSocketOpenFailure } from "./transport-websocket-CEBjEtFP.mjs";
20
20
  import { t as __exportAll } from "./session-binding-sidecars-DijNZb31.mjs";
21
21
  import { asOptionalRecord, isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
22
22
  import { createHash, randomUUID } from "node:crypto";
@@ -1561,6 +1561,13 @@ function resolveExplicitChatgptAccountId(credential) {
1561
1561
  }
1562
1562
  //#endregion
1563
1563
  //#region extensions/codex/src/app-server/client-thread-owner.ts
1564
+ /** Background custody can survive projection replacement only under its creation policy. */
1565
+ function isThreadBackgroundOnly(runtime, threadId, configFingerprint) {
1566
+ if (!runtime || runtime.closed || !runtime.protectedThreads.has(threadId)) return false;
1567
+ const claim = runtime.claimedThreads.get(threadId);
1568
+ const policy = claim?.configFingerprint ?? runtime.retainedThreads.get(threadId)?.configFingerprint;
1569
+ return (!claim || claim.releaseAfterProtection !== void 0) && (configFingerprint === void 0 || policy === configFingerprint);
1570
+ }
1564
1571
  function createThreadOwnerToken(threadId, onInvalidated) {
1565
1572
  const owner = {
1566
1573
  invalidated: false,
@@ -1928,7 +1935,7 @@ function scheduleRetainedThreadEviction(client, runtime) {
1928
1935
  evictExpiredRetainedThreads(client, runtime).catch((error) => {
1929
1936
  embeddedAgentLog$1.warn("codex retained thread expiry failed", { reason: formatErrorMessage$1(error) });
1930
1937
  });
1931
- }, Math.max(0, expiresAt - Date.now()));
1938
+ }, Math.max(0, Math.floor(expiresAt - performance.now())));
1932
1939
  runtime.evictionTimer.unref?.();
1933
1940
  }
1934
1941
  async function releaseRetainedThread(client, runtime, threadId, assertCurrent, withCurrent) {
@@ -1962,7 +1969,7 @@ async function releaseRetainedThread(client, runtime, threadId, assertCurrent, w
1962
1969
  return true;
1963
1970
  } catch (error) {
1964
1971
  if (!runtime.closed && !transition.invalidated && runtime.releasingThreads.get(threadId) === transition && !runtime.retainedThreads.has(threadId) && !runtime.claimedThreads.has(threadId)) {
1965
- if (retained.ephemeralPolicy === void 0) retained.expiresAt = Date.now() + CODEX_APP_SERVER_LIVE_THREAD_IDLE_TIMEOUT_MS;
1972
+ if (retained.ephemeralPolicy === void 0) retained.expiresAt = performance.now() + CODEX_APP_SERVER_LIVE_THREAD_IDLE_TIMEOUT_MS;
1966
1973
  const newerThreads = [...runtime.retainedThreads.entries()].filter(([candidateThreadId]) => !olderThreadIds.has(candidateThreadId));
1967
1974
  for (const [candidateThreadId] of newerThreads) runtime.retainedThreads.delete(candidateThreadId);
1968
1975
  runtime.retainedThreads.set(threadId, retained);
@@ -1975,7 +1982,7 @@ async function releaseRetainedThread(client, runtime, threadId, assertCurrent, w
1975
1982
  }
1976
1983
  }
1977
1984
  async function evictExpiredRetainedThreads(client, runtime) {
1978
- const now = Date.now();
1985
+ const now = performance.now();
1979
1986
  for (const [threadId, thread] of runtime.retainedThreads) if (thread.expiresAt <= now && !runtime.protectedThreads.has(threadId)) await releaseRetainedThread(client, runtime, threadId);
1980
1987
  scheduleRetainedThreadEviction(client, runtime);
1981
1988
  }
@@ -2006,7 +2013,7 @@ async function retainCodexAppServerLiveThread(client, threadId, releaseThread, c
2006
2013
  configFingerprint,
2007
2014
  ephemeralPolicy,
2008
2015
  serviceTier,
2009
- expiresAt: ephemeralPolicy === void 0 ? Date.now() + CODEX_APP_SERVER_LIVE_THREAD_IDLE_TIMEOUT_MS : Number.POSITIVE_INFINITY,
2016
+ expiresAt: ephemeralPolicy === void 0 ? performance.now() + CODEX_APP_SERVER_LIVE_THREAD_IDLE_TIMEOUT_MS : Number.POSITIVE_INFINITY,
2010
2017
  release: (releaseThread ? physicalThreadReleases.get(releaseThread) ?? releaseThread : void 0) ?? defaultThreadRelease(client)
2011
2018
  };
2012
2019
  runtime.retainedThreads.set(threadId, retained);
@@ -2050,7 +2057,7 @@ async function claimCodexAppServerLiveThread(client, threadId, onInvalidated) {
2050
2057
  return;
2051
2058
  }
2052
2059
  return claimCodexAppServerThreadOwnership(client, runtime, threadId, runtime.retainedThreads.get(threadId) ?? {
2053
- expiresAt: Date.now() + CODEX_APP_SERVER_LIVE_THREAD_IDLE_TIMEOUT_MS,
2060
+ expiresAt: performance.now() + CODEX_APP_SERVER_LIVE_THREAD_IDLE_TIMEOUT_MS,
2054
2061
  release: defaultThreadRelease(client)
2055
2062
  }, onInvalidated);
2056
2063
  }
@@ -2058,6 +2065,7 @@ function claimCodexAppServerThreadOwnership(client, runtime, threadId, retained,
2058
2065
  const previousClaim = runtime.claimedThreads.get(threadId);
2059
2066
  runtime.retainedThreads.delete(threadId);
2060
2067
  const claimed = createThreadOwnerToken(threadId, onInvalidated);
2068
+ claimed.configFingerprint = retained.configFingerprint;
2061
2069
  runtime.claimedThreads.set(threadId, claimed);
2062
2070
  previousClaim?.invalidate();
2063
2071
  retained.ownerToken?.invalidate();
@@ -2137,6 +2145,10 @@ function isCodexAppServerLiveThreadClaimed(client, threadId) {
2137
2145
  const runtime = configuredClients.get(client);
2138
2146
  return runtime !== void 0 && !runtime.closed && runtime.claimedThreads.has(threadId);
2139
2147
  }
2148
+ /** Completed foreground work may leave cleanup custody with native background work. */
2149
+ function isCodexAppServerLiveThreadBackgroundOnly(client, threadId, configFingerprint) {
2150
+ return isThreadBackgroundOnly(configuredClients.get(client), threadId, configFingerprint);
2151
+ }
2140
2152
  /** Native commands and children can still need an otherwise-idle subscription. */
2141
2153
  function isCodexAppServerLiveThreadProtected(client, threadId) {
2142
2154
  const runtime = configuredClients.get(client);
@@ -2213,7 +2225,7 @@ function protectCodexAppServerLiveThread(client, threadId) {
2213
2225
  if (releaseThreadProtection(runtime, threadId)) {
2214
2226
  const retained = runtime.retainedThreads.get(threadId);
2215
2227
  if (retained) {
2216
- if (retained.ephemeralPolicy === void 0) retained.expiresAt = Date.now() + CODEX_APP_SERVER_LIVE_THREAD_IDLE_TIMEOUT_MS;
2228
+ if (retained.ephemeralPolicy === void 0) retained.expiresAt = performance.now() + CODEX_APP_SERVER_LIVE_THREAD_IDLE_TIMEOUT_MS;
2217
2229
  runtime.retainedThreads.delete(threadId);
2218
2230
  runtime.retainedThreads.set(threadId, retained);
2219
2231
  }
@@ -2485,8 +2497,8 @@ async function prepareCodexInferenceRoute(params) {
2485
2497
  throw new Error("Codex inference route limit reached; start a fresh managed native connection before retrying.");
2486
2498
  }
2487
2499
  pending = Promise.all([
2488
- import("./inference-proxy-BDWV0djM.mjs"),
2489
- import("./native-subagent-monitor-gqu3TQOv.mjs").then((n) => n.n),
2500
+ import("./inference-proxy-DSnaS-uS.mjs"),
2501
+ import("./native-subagent-monitor-CBYFkNsB.mjs").then((n) => n.n),
2490
2502
  import("./inference-dispatch-CO6tTs4q.mjs")
2491
2503
  ]).then(([{ createCodexInferenceProxy }, native, { createCodexInferenceModelBinding }]) => {
2492
2504
  assertClient();
@@ -3301,7 +3313,7 @@ async function startInitializedCodexAppServerClientOnce(params) {
3301
3313
  } finally {
3302
3314
  artifactDrain?.cancel();
3303
3315
  }
3304
- const runtimeArtifactModule = params.runtimeArtifactMode ? await import("./runtime-artifact-nFHy1R0x.mjs") : void 0;
3316
+ const runtimeArtifactModule = params.runtimeArtifactMode ? await import("./runtime-artifact-CCPLKFGR.mjs") : void 0;
3305
3317
  const runtimeArtifactBeforeStart = runtimeArtifactModule ? await runtimeArtifactModule.captureCodexAppServerRuntimeArtifactBeforeStart({
3306
3318
  startOptions,
3307
3319
  spawnIdentity: resolveCodexAppServerSpawnIdentity(startOptions),
@@ -3555,4 +3567,4 @@ function clearSharedCodexAppServerClientIfCurrentAndUnclaimed(client) {
3555
3567
  };
3556
3568
  }
3557
3569
  //#endregion
3558
- export { createCodexEphemeralThreadPolicy as $, bindCodexInferenceThread as A, isCodexAppServerClientRuntimeLive as B, CodexThreadBindingConflictError as C, nativeHookRelayUnregisterQueue as D, isCodexContextRestartSelectionChangedError as E, consumeCodexAppServerLiveThread as F, readCodexClientSessionMeta as G, isCodexAppServerLiveThreadProtected as H, ensureCodexAppServerClientRuntime as I, revertCodexAppServerLiveThreadInstructions as J, releaseCodexAppServerLiveThread as K, forgetCodexWorkspaceReferences as L, getCodexInferenceThreadQualification as M, prepareCodexInferenceThreadConfig as N, acquireCodexNativeConfigFence as O, claimCodexAppServerLiveThread as P, rememberCodexRateLimitsRead as Q, hasCodexAppServerLiveThread as R, CodexAdoptedThreadActiveError as S, CodexThreadStartRequestError as T, prepareCodexWorkspaceReferences as U, isCodexAppServerLiveThreadClaimed as V, protectCodexAppServerLiveThread as W, readCodexRateLimitsRevision as X, unsubscribeCodexAppServerLiveThread as Y, readRecentCodexRateLimits as Z, retainSharedCodexAppServerClientIfCurrent as _, clearSharedCodexAppServerClientIfCurrentAndUnclaimed as a, hasLegacyCodexComputerUseMcpPolicy as at, withLeasedCodexAppServerClientStartSelectionRetry as b, getLeasedSharedCodexAppServerClient as c, ensureCodexComputerUseSharedPluginCache as ct, readCodexAppServerClientDesktopGeneration as d, TURN_FINALIZE_DRAIN_ABORT_GRACE_MS as dt, reconcileCodexComputerUseStartArtifacts as et, readCodexAppServerClientDesktopGenerationFingerprint as f, TURN_TERMINAL_SETTLEMENT_TIMEOUT_MS as ft, resolveCodexNativeConfigFenceKey as g, withCodexStartupTimeout as gt, releaseLeasedSharedCodexAppServerClient as h, resolveCodexStartupTimeoutMs as ht, clearSharedCodexAppServerClientIfCurrent as i, resolveClientManagedBundledMarketplacePath as it, getCodexInferenceThread as j, assertCodexInferenceRouteConfig as k, getSharedCodexAppServerClient as l, assertNotSymlink as lt, releaseCodexAppServerClientLease as m, resolveCodexGatewayTimeoutWithGraceMs as mt, captureCodexAppServerClientLifetime as n, resolveCodexAppServerPreparedAuthHandoff as nt, clearSharedCodexAppServerClientIfCurrentAndWait as o, isLegacyCodexComputerUsePluginDisabled as ot, readCodexAppServerClientProcessIdentity as p, isCodexAppServerStartupError as pt, retainCodexAppServerLiveThread as q, captureSharedCodexAppServerCatalogLifetime as r, resolveBundledComputerUseMarketplacePath as rt, createIsolatedCodexAppServerClient as s, resolveManagedCodexComputerUseConfig as st, assertCodexAppServerClientStartSelectionCurrent as t, resolveCodexAppServerAuthAccountCacheKey as tt, isCodexAppServerStartSelectionChangedError as u, CodexAppServerStartupError as ut, shared_client_exports as v, CodexThreadClientReplacementError as w, CODEX_APP_SERVER_CONTEXT_RESTART_SELECTION_CHANGED as x, waitForCodexAppServerClientDesktopGenerationDrain as y, hasCodexAppServerSiblingThreadWork as z };
3570
+ export { rememberCodexRateLimitsRead as $, bindCodexInferenceThread as A, isCodexAppServerClientRuntimeLive as B, CodexThreadBindingConflictError as C, nativeHookRelayUnregisterQueue as D, isCodexContextRestartSelectionChangedError as E, consumeCodexAppServerLiveThread as F, protectCodexAppServerLiveThread as G, isCodexAppServerLiveThreadClaimed as H, ensureCodexAppServerClientRuntime as I, retainCodexAppServerLiveThread as J, readCodexClientSessionMeta as K, forgetCodexWorkspaceReferences as L, getCodexInferenceThreadQualification as M, prepareCodexInferenceThreadConfig as N, acquireCodexNativeConfigFence as O, claimCodexAppServerLiveThread as P, readRecentCodexRateLimits as Q, hasCodexAppServerLiveThread as R, CodexAdoptedThreadActiveError as S, CodexThreadStartRequestError as T, isCodexAppServerLiveThreadProtected as U, isCodexAppServerLiveThreadBackgroundOnly as V, prepareCodexWorkspaceReferences as W, unsubscribeCodexAppServerLiveThread as X, revertCodexAppServerLiveThreadInstructions as Y, readCodexRateLimitsRevision as Z, retainSharedCodexAppServerClientIfCurrent as _, withCodexStartupTimeout as _t, clearSharedCodexAppServerClientIfCurrentAndUnclaimed as a, resolveClientManagedBundledMarketplacePath as at, withLeasedCodexAppServerClientStartSelectionRetry as b, getLeasedSharedCodexAppServerClient as c, resolveManagedCodexComputerUseConfig as ct, readCodexAppServerClientDesktopGeneration as d, CodexAppServerStartupError as dt, createCodexEphemeralThreadPolicy as et, readCodexAppServerClientDesktopGenerationFingerprint as f, TURN_FINALIZE_DRAIN_ABORT_GRACE_MS as ft, resolveCodexNativeConfigFenceKey as g, resolveCodexStartupTimeoutMs as gt, releaseLeasedSharedCodexAppServerClient as h, resolveCodexGatewayTimeoutWithGraceMs as ht, clearSharedCodexAppServerClientIfCurrent as i, resolveBundledComputerUseMarketplacePath as it, getCodexInferenceThread as j, assertCodexInferenceRouteConfig as k, getSharedCodexAppServerClient as l, ensureCodexComputerUseSharedPluginCache as lt, releaseCodexAppServerClientLease as m, isCodexAppServerStartupError as mt, captureCodexAppServerClientLifetime as n, resolveCodexAppServerAuthAccountCacheKey as nt, clearSharedCodexAppServerClientIfCurrentAndWait as o, hasLegacyCodexComputerUseMcpPolicy as ot, readCodexAppServerClientProcessIdentity as p, TURN_TERMINAL_SETTLEMENT_TIMEOUT_MS as pt, releaseCodexAppServerLiveThread as q, captureSharedCodexAppServerCatalogLifetime as r, resolveCodexAppServerPreparedAuthHandoff as rt, createIsolatedCodexAppServerClient as s, isLegacyCodexComputerUsePluginDisabled as st, assertCodexAppServerClientStartSelectionCurrent as t, reconcileCodexComputerUseStartArtifacts as tt, isCodexAppServerStartSelectionChangedError as u, assertNotSymlink as ut, shared_client_exports as v, CodexThreadClientReplacementError as w, CODEX_APP_SERVER_CONTEXT_RESTART_SELECTION_CHANGED as x, waitForCodexAppServerClientDesktopGenerationDrain as y, hasCodexAppServerSiblingThreadWork as z };
@@ -1,29 +1,29 @@
1
1
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
2
2
  import { m as sessionBindingIdentity } from "./session-binding-record-C2kDBZhx.mjs";
3
- import { c as withMcpElicitationsApprovalPolicy, d as readCodexRequirementsToml, n as hasCodexMcpToolApprovalOverrides, s as shouldAutoApproveCodexAppServerApprovals } from "./config-security-D0hAOQRI.mjs";
3
+ import { c as withMcpElicitationsApprovalPolicy, d as readCodexRequirementsToml, n as hasCodexMcpToolApprovalOverrides, s as shouldAutoApproveCodexAppServerApprovals } from "./config-security-DpkGNy5T.mjs";
4
4
  import { c as isCodexPairedNodeRemoteExecPlacementSandbox, d as readCodexPluginConfig, l as isCodexRemoteExecPlacementSandbox, u as isCodexSandboxExecServerEnabled } from "./config-parsing-CVK2Q463.mjs";
5
- import { i as resolveCodexAppServerHomeScope, l as resolveCodexModelBackedReviewerPolicyContext } from "./config-options-nvYwVDyy.mjs";
5
+ import { i as resolveCodexAppServerHomeScope, l as resolveCodexModelBackedReviewerPolicyContext } from "./config-options-CZmH25Xq.mjs";
6
6
  import { n as formatCodexUsageLimitErrorMessage } from "./rate-limits-CI8pTPqL.mjs";
7
- import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection } from "./binding-connection-X1ZeEDz8.mjs";
8
- import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-G4IGX6bK.mjs";
9
- import { Z as readRecentCodexRateLimits, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease, nt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-wb1JBldZ.mjs";
10
- import { E as resolveDynamicToolCallTimeoutMs, O as toCodexDynamicToolProtocolResponse, T as handleDynamicToolCallWithTimeout, _ as assertCodexTurnStartResponse, a as isCodexAppServerIndeterminateRequestCancellationError, k as resolveCodexToolAbortTerminalReason, m as assertCodexThreadForkResponse, r as isCodexAppServerApprovalRequest, w as createCodexElicitationResponse, y as readCodexDynamicToolCallParams } from "./client-BpSxNz4F.mjs";
11
- import { d as terminateCodexBackgroundTerminals, f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, s as interruptCodexTurnAndWaitBestEffort } from "./attempt-client-cleanup-TScCVTsk.mjs";
12
- import { t as CodexEphemeralTurn } from "./ephemeral-turn-C6aFeGFS.mjs";
13
- import { d as mergeCodexThreadConfigs, f as refreshCodexPluginAppApprovalPolicy } from "./project-doc-thread-config-B2ZD23A_.mjs";
7
+ import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection } from "./binding-connection-C0t9TBX_.mjs";
8
+ import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-LQemoqTL.mjs";
9
+ import { Q as readRecentCodexRateLimits, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease, rt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-CNGDTv68.mjs";
10
+ import { E as resolveDynamicToolCallTimeoutMs, O as toCodexDynamicToolProtocolResponse, T as handleDynamicToolCallWithTimeout, _ as assertCodexTurnStartResponse, a as isCodexAppServerIndeterminateRequestCancellationError, k as resolveCodexToolAbortTerminalReason, m as assertCodexThreadForkResponse, r as isCodexAppServerApprovalRequest, w as createCodexElicitationResponse, y as readCodexDynamicToolCallParams } from "./client-Div-zqnz.mjs";
11
+ import { d as terminateCodexBackgroundTerminals, f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, s as interruptCodexTurnAndWaitBestEffort } from "./attempt-client-cleanup-BVww-ct8.mjs";
12
+ import { t as CodexEphemeralTurn } from "./ephemeral-turn-K_d99r9P.mjs";
13
+ import { d as mergeCodexThreadConfigs, f as refreshCodexPluginAppApprovalPolicy } from "./project-doc-thread-config-D_sWbxFR.mjs";
14
14
  import { n as resolveCodexAppServerReasoningEffort, t as readCodexSupportedReasoningEfforts } from "./reasoning-effort-CS9kKWB9.mjs";
15
- import { h as resolveCodexWebSearchPlan, r as buildCodexRuntimeThreadConfig, z as resolveCodexDynamicToolsLoading } from "./thread-requests-BqPhA4Gs.mjs";
15
+ import { h as resolveCodexWebSearchPlan, r as buildCodexRuntimeThreadConfig, z as resolveCodexDynamicToolsLoading } from "./thread-requests-DjyDmCo4.mjs";
16
16
  import { i as resolveCodexSessionBinding } from "./session-binding-BDnNz-Co.mjs";
17
17
  import { i as resolveCodexAppServerThreadModelSelection, t as CODEX_NATIVE_PERSONALITY_NONE } from "./thread-model-selection-DcVebr8N.mjs";
18
18
  import { t as resolveCodexNativeExecutionBlock } from "./sandbox-guard-Cf9XMRrg.mjs";
19
- import { i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy } from "./thread-policy-BMRvlOi-.mjs";
19
+ import { i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy } from "./thread-policy-BEiS7ITh.mjs";
20
20
  import { o as runCodexCleanupStep } from "./run-attempt-lifecycle-DN-ATDp9.mjs";
21
- import { a as resolveCodexExternalSandboxPolicyForOpenClawSandbox, c as shouldEnableCodexAppServerNativeToolSurface, l as shouldRequireCodexSandboxExecServerEnvironment, o as resolveCodexMessageToolProvider, s as resolveCodexSandboxEnvironmentSelection, t as buildDynamicTools } from "./dynamic-tool-build-CoMf7IKx.mjs";
22
- import { a as buildCodexNativeHookRelayDisabledConfig, i as buildCodexNativeHookRelayConfig, l as resolveCodexNativeHookRelayEvents, u as resolveCodexNativeHookRelayTtlMs } from "./native-hook-relay-BQ9UkpeG.mjs";
23
- import { i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy, t as CODEX_SESSION_PERMISSION_EXEC_MODES } from "./session-permission-policy-BYI6mp5u.mjs";
24
- import { a as handleCodexAppServerApprovalRequest, c as createCodexNativePreToolUseFailureBuffer, d as buildCodexTemporalAdditionalContext, g as buildCodexUserInput, i as createCodexDynamicToolDiagnostics, o as ensureCodexSandboxExecServerEnvironment, r as routeCodexAppServerElicitationRequest, s as releaseCodexSandboxExecServerEnvironment, t as createCodexDynamicToolBridge, y as CodexNativeToolLifecycleProjector } from "./dynamic-tools-CKynHtxM.mjs";
25
- import { t as resolveCodexAppServerForModelProvider } from "./app-server-policy-XTIa6h5k.mjs";
26
- import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-DOBUBt86.mjs";
21
+ import { a as resolveCodexExternalSandboxPolicyForOpenClawSandbox, c as shouldEnableCodexAppServerNativeToolSurface, l as shouldRequireCodexSandboxExecServerEnvironment, o as resolveCodexMessageToolProvider, s as resolveCodexSandboxEnvironmentSelection, t as buildDynamicTools } from "./dynamic-tool-build-DjbDZzOJ.mjs";
22
+ import { a as buildCodexNativeHookRelayDisabledConfig, i as buildCodexNativeHookRelayConfig, l as resolveCodexNativeHookRelayEvents, u as resolveCodexNativeHookRelayTtlMs } from "./native-hook-relay-BvwSj5bt.mjs";
23
+ import { i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy, t as CODEX_SESSION_PERMISSION_EXEC_MODES } from "./session-permission-policy-C7kYxPGd.mjs";
24
+ import { a as handleCodexAppServerApprovalRequest, c as createCodexNativePreToolUseFailureBuffer, d as buildCodexTemporalAdditionalContext, g as buildCodexUserInput, i as createCodexDynamicToolDiagnostics, o as ensureCodexSandboxExecServerEnvironment, r as routeCodexAppServerElicitationRequest, s as releaseCodexSandboxExecServerEnvironment, t as createCodexDynamicToolBridge, y as CodexNativeToolLifecycleProjector } from "./dynamic-tools-75qoSOch.mjs";
25
+ import { t as resolveCodexAppServerForModelProvider } from "./app-server-policy-V8zuN8q_.mjs";
26
+ import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-B-pTlDsf.mjs";
27
27
  import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
28
28
  import { randomUUID } from "node:crypto";
29
29
  import { isDeepStrictEqual } from "node:util";
@@ -1,7 +1,7 @@
1
1
  import { a as defaultCodexAppInventoryCache, r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-Bg9DbDI6.mjs";
2
- import { a as withCodexAppServerJsonClient } from "./request-DhbisYCc.mjs";
3
- import { a as marketplaceRef, o as pluginReadParams, r as isOpenAiCuratedMarketplaceName, u as CODEX_PLUGINS_MARKETPLACE_NAME } from "./plugin-inventory-kLR7G02h.mjs";
4
- import "./config-G4IGX6bK.mjs";
2
+ import { a as withCodexAppServerJsonClient } from "./request-m-H-7FMu.mjs";
3
+ import { a as marketplaceRef, o as pluginReadParams, r as isOpenAiCuratedMarketplaceName, u as CODEX_PLUGINS_MARKETPLACE_NAME } from "./plugin-inventory-OhiCoyPH.mjs";
4
+ import "./config-LQemoqTL.mjs";
5
5
  import { t as __exportAll } from "./session-binding-sidecars-DijNZb31.mjs";
6
6
  import { asNonArrayRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import path from "node:path";
@@ -1,11 +1,11 @@
1
1
  import { i as isJsonObject, r as flattenCodexDynamicToolFunctions } from "./protocol-CANUwXJ3.mjs";
2
2
  import { n as matchesPendingSupervisionBranch } from "./session-binding-record-codec-CWQXr9os.mjs";
3
3
  import { m as sessionBindingIdentity, n as assertCodexBindingMayBeReplaced } from "./session-binding-record-C2kDBZhx.mjs";
4
- import { l as fingerprintCodexPolicy } from "./config-security-D0hAOQRI.mjs";
4
+ import { l as fingerprintCodexPolicy } from "./config-security-DpkGNy5T.mjs";
5
5
  import { f as resolveCodexPluginsPolicy } from "./config-parsing-CVK2Q463.mjs";
6
6
  import { n as resolveCodexAppServerLocalHomeDir, t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
7
- import { d as readCodexEffectiveConfig, s as assertCodexModelBackedReviewerEffectiveConfig, u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-nvYwVDyy.mjs";
8
- import { S as retainSharedCodexAppServerClientByInstanceId, d as getCurrentSharedClientEntry } from "./auth-cache-key-DvDLHVJe.mjs";
7
+ import { d as readCodexEffectiveConfig, s as assertCodexModelBackedReviewerEffectiveConfig, u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-CZmH25Xq.mjs";
8
+ import { S as retainSharedCodexAppServerClientByInstanceId, d as getCurrentSharedClientEntry } from "./auth-cache-key-CXK7tmkb.mjs";
9
9
  import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-CeyYScUC.mjs";
10
10
  import { o as isCodexAppServerOverloadError, r as CodexAppServerRpcError, s as isCodexThreadReadMissingError } from "./rpc-error-C98SHchT.mjs";
11
11
  import { t as codexCatalogHomeId } from "./session-catalog-home-id-vlih0B_g.mjs";
@@ -13,34 +13,34 @@ import { r as withAbortableTimeout } from "./timeout-D0mEWSGG.mjs";
13
13
  import { t as projectBoundedCodexThreadHistory } from "./transcript-history-projection-DfKcoZCB.mjs";
14
14
  import { a as defaultCodexAppInventoryCache, t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-Bg9DbDI6.mjs";
15
15
  import { n as readCodexSessionMeta } from "./session-catalog-provenance-CmsOE5mh.mjs";
16
- import { t as assertCodexSessionRuntimeOwnership } from "./binding-connection-X1ZeEDz8.mjs";
17
- import { c as resolveRecoverableCodexPluginConfigKeys } from "./plugin-inventory-kLR7G02h.mjs";
18
- import "./config-G4IGX6bK.mjs";
16
+ import { t as assertCodexSessionRuntimeOwnership } from "./binding-connection-C0t9TBX_.mjs";
17
+ import { c as resolveRecoverableCodexPluginConfigKeys } from "./plugin-inventory-OhiCoyPH.mjs";
18
+ import "./config-LQemoqTL.mjs";
19
19
  import { c as resolveCodexContextEngineProjectionMaxChars } from "./context-engine-projection-ps-yn_ci.mjs";
20
20
  import { n as normalizeCodexAppServerBindingModelProvider } from "./auth-profile-CgHQ8Vot.mjs";
21
- import { $ as createCodexEphemeralThreadPolicy, A as bindCodexInferenceThread, B as isCodexAppServerClientRuntimeLive, C as CodexThreadBindingConflictError, F as consumeCodexAppServerLiveThread, H as isCodexAppServerLiveThreadProtected, K as releaseCodexAppServerLiveThread, M as getCodexInferenceThreadQualification, N as prepareCodexInferenceThreadConfig, S as CodexAdoptedThreadActiveError, T as CodexThreadStartRequestError, V as isCodexAppServerLiveThreadClaimed, Y as unsubscribeCodexAppServerLiveThread, j as getCodexInferenceThread, k as assertCodexInferenceRouteConfig, n as captureCodexAppServerClientLifetime, w as CodexThreadClientReplacementError, z as hasCodexAppServerSiblingThreadWork } from "./shared-client-wb1JBldZ.mjs";
22
- import { C as resolveCodexThreadRolloutPath, F as getCodexAppServerClientInstanceId, L as resolveCodexAppServerClientInstanceId, S as readSupervisionResponseThreadId, c as isCodexAppServerRequestTimeoutError, g as assertCodexThreadStartResponse, m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, v as assertExactSupervisionModelSelection } from "./client-BpSxNz4F.mjs";
23
- import { r as hasCodexAppServerSiblingRouteWork } from "./turn-router-DdlzuFdm.mjs";
24
- import { f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-TScCVTsk.mjs";
25
- import { a as buildCodexPluginThreadConfigInputFingerprint, c as buildPluginAppPolicyContext, d as mergeCodexThreadConfigs, i as buildCodexPluginThreadConfig, l as disableUnlistedCodexApps, m as buildCodexAppApprovalOverrides, n as mergeCodexNativeProjectDocThreadConfig, o as buildCodexPluginThreadConfigTimeoutFallback, p as shouldBuildCodexPluginThreadConfig, r as buildCodexPluginAppsConfigPatchFromPolicyContext, u as isCodexPluginThreadBindingStale } from "./project-doc-thread-config-B2ZD23A_.mjs";
26
- import { A as isTransientWebSearchRestriction, C as fingerprintEnvironmentSelection, D as readActiveCodexTurnIdsFromResume, E as legacyFingerprintUserMcpServersConfigPatch, I as isMessageOnlyCodexSourceReply, L as isSystemAgentOnlyCodexDynamicToolAllowlist, M as shouldRotateCodexAppServerBindingForRuntime, N as shouldRotateCodexGpt56MultiAgentBinding, O as shouldStartTransientNoToolThread, S as fingerprintCodexThreadConfig, T as fingerprintUserMcpServersConfigPatch, _ as buildDeveloperInstructions, b as codexDynamicToolsFingerprint, c as codexThreadSandboxOrPermissions, d as readCodexManagedRequirementsFingerprint, f as resolveCodexThreadApprovalsReviewer, g as mergeCodexNativeShellEnvironment, h as resolveCodexWebSearchPlan, i as buildCodexRuntimeThreadConfigForRun, j as shouldRecheckRecoverablePluginBinding, n as buildCodexRingZeroThreadConfigPatch, o as buildThreadResumeParams, p as attestCodexRestrictedToolSurfaceMcpServersDisabled, s as buildThreadStartParams, t as assertCodexManagedRequirementsDoNotOverrideToolPolicy, u as readCodexInheritedMcpServerNames, v as areCodexDynamicToolFingerprintsCompatible, w as fingerprintJsonObject, x as codexLegacyDynamicToolsFingerprint, y as areUserMcpServersFingerprintsCompatible } from "./thread-requests-BqPhA4Gs.mjs";
21
+ import { A as bindCodexInferenceThread, B as isCodexAppServerClientRuntimeLive, C as CodexThreadBindingConflictError, F as consumeCodexAppServerLiveThread, H as isCodexAppServerLiveThreadClaimed, M as getCodexInferenceThreadQualification, N as prepareCodexInferenceThreadConfig, S as CodexAdoptedThreadActiveError, T as CodexThreadStartRequestError, U as isCodexAppServerLiveThreadProtected, V as isCodexAppServerLiveThreadBackgroundOnly, X as unsubscribeCodexAppServerLiveThread, et as createCodexEphemeralThreadPolicy, j as getCodexInferenceThread, k as assertCodexInferenceRouteConfig, n as captureCodexAppServerClientLifetime, q as releaseCodexAppServerLiveThread, w as CodexThreadClientReplacementError, z as hasCodexAppServerSiblingThreadWork } from "./shared-client-CNGDTv68.mjs";
22
+ import { C as resolveCodexThreadRolloutPath, F as getCodexAppServerClientInstanceId, L as resolveCodexAppServerClientInstanceId, S as readSupervisionResponseThreadId, c as isCodexAppServerRequestTimeoutError, g as assertCodexThreadStartResponse, m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, v as assertExactSupervisionModelSelection } from "./client-Div-zqnz.mjs";
23
+ import { r as hasCodexAppServerSiblingRouteWork } from "./turn-router-DM0fRrYI.mjs";
24
+ import { f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-BVww-ct8.mjs";
25
+ import { a as buildCodexPluginThreadConfigInputFingerprint, c as buildPluginAppPolicyContext, d as mergeCodexThreadConfigs, i as buildCodexPluginThreadConfig, l as disableUnlistedCodexApps, m as buildCodexAppApprovalOverrides, n as mergeCodexNativeProjectDocThreadConfig, o as buildCodexPluginThreadConfigTimeoutFallback, p as shouldBuildCodexPluginThreadConfig, r as buildCodexPluginAppsConfigPatchFromPolicyContext, u as isCodexPluginThreadBindingStale } from "./project-doc-thread-config-D_sWbxFR.mjs";
26
+ import { A as isTransientWebSearchRestriction, C as fingerprintEnvironmentSelection, D as readActiveCodexTurnIdsFromResume, E as legacyFingerprintUserMcpServersConfigPatch, I as isMessageOnlyCodexSourceReply, L as isSystemAgentOnlyCodexDynamicToolAllowlist, M as shouldRotateCodexAppServerBindingForRuntime, N as shouldRotateCodexGpt56MultiAgentBinding, O as shouldStartTransientNoToolThread, S as fingerprintCodexThreadConfig, T as fingerprintUserMcpServersConfigPatch, _ as buildDeveloperInstructions, b as codexDynamicToolsFingerprint, c as codexThreadSandboxOrPermissions, d as readCodexManagedRequirementsFingerprint, f as resolveCodexThreadApprovalsReviewer, g as mergeCodexNativeShellEnvironment, h as resolveCodexWebSearchPlan, i as buildCodexRuntimeThreadConfigForRun, j as shouldRecheckRecoverablePluginBinding, n as buildCodexRingZeroThreadConfigPatch, o as buildThreadResumeParams, p as attestCodexRestrictedToolSurfaceMcpServersDisabled, s as buildThreadStartParams, t as assertCodexManagedRequirementsDoNotOverrideToolPolicy, u as readCodexInheritedMcpServerNames, v as areCodexDynamicToolFingerprintsCompatible, w as fingerprintJsonObject, x as codexLegacyDynamicToolsFingerprint, y as areUserMcpServersFingerprintsCompatible } from "./thread-requests-DjyDmCo4.mjs";
27
27
  import { i as resolveCodexSessionBinding, o as hashCodexAppServerBindingFingerprint } from "./session-binding-BDnNz-Co.mjs";
28
28
  import { i as resolveCodexAppServerThreadModelSelection, n as resolveCodexAppServerModelProvider } from "./thread-model-selection-DcVebr8N.mjs";
29
- import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-CTUs8Eyu.mjs";
30
- import { a as refreshCodexThreadInstructions, i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy, r as assertAdoptedCodexThreadResumeAllowed, t as CodexIncognitoPolicyChangeError } from "./thread-policy-BMRvlOi-.mjs";
31
- import { t as resumeCodexAppServerThread } from "./thread-resume-CD48Vab8.mjs";
29
+ import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-BBsOFzCM.mjs";
30
+ import { a as refreshCodexThreadInstructions, i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy, r as assertAdoptedCodexThreadResumeAllowed, t as CodexIncognitoPolicyChangeError } from "./thread-policy-BEiS7ITh.mjs";
31
+ import { t as resumeCodexAppServerThread } from "./thread-resume-BqOca2Iy.mjs";
32
32
  import { r as readCodexMcpToolConnectorId } from "./mcp-tool-metadata-_sawBkIh.mjs";
33
- import { n as disableCodexPluginThreadConfig } from "./dynamic-tool-build-CoMf7IKx.mjs";
34
- import { n as CodexManagedHooksOnlyError, r as assertCodexNativeHookRelayAllowed } from "./native-hook-relay-BQ9UkpeG.mjs";
33
+ import { n as disableCodexPluginThreadConfig } from "./dynamic-tool-build-DjbDZzOJ.mjs";
34
+ import { n as CodexManagedHooksOnlyError, r as assertCodexNativeHookRelayAllowed } from "./native-hook-relay-BvwSj5bt.mjs";
35
35
  import { t as defaultCodexPluginMetadataCache } from "./plugin-metadata-cache-Bi8TAPwX.mjs";
36
- import { a as discardUnattestedCodexPluginThread, i as checkCodexThreadAppAvailability, n as resolveCodexNativeSkillIsolation, o as hasCodexNativeToolCatalog, r as attestCodexThreadToolSurface, s as loadCodexNativeToolCatalog, t as applyCodexNativeSkillIsolation } from "./native-skill-isolation-CxZRtiWZ.mjs";
36
+ import { a as discardUnattestedCodexPluginThread, i as checkCodexThreadAppAvailability, n as resolveCodexNativeSkillIsolation, o as hasCodexNativeToolCatalog, r as attestCodexThreadToolSurface, s as loadCodexNativeToolCatalog, t as applyCodexNativeSkillIsolation } from "./native-skill-isolation-Cx2AkUco.mjs";
37
37
  import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
38
38
  import crypto from "node:crypto";
39
39
  import { isDeepStrictEqual } from "node:util";
40
40
  import { resolveSessionAgentIdsStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
41
41
  import path from "node:path";
42
- import { isIncognitoSessionKey } from "openclaw/plugin-sdk/session-key-runtime";
43
42
  import { createStageTimingTracker, formatStageTimings, racePromiseWithAbortSignal } from "openclaw/plugin-sdk/time-runtime";
43
+ import { isIncognitoSessionKey } from "openclaw/plugin-sdk/session-key-runtime";
44
44
  import { resolveAgentDir as resolveAgentDir$1 } from "openclaw/plugin-sdk/agent-runtime";
45
45
  import { AgentHarnessPreflightError, embeddedAgentLog, formatErrorMessage, isActiveHarnessContextEngine, isHostScopedAgentToolActive } from "openclaw/plugin-sdk/agent-harness-runtime";
46
46
  import { buildCodexUserMcpServersThreadConfigPatchForRun } from "openclaw/plugin-sdk/codex-mcp-projection";
@@ -1216,7 +1216,10 @@ async function releaseCodexRetainedLiveThread(options) {
1216
1216
  /** Release follows the physical owner across connection rotation, never a copied thread id. */
1217
1217
  async function releaseCodexBoundLiveThread(options) {
1218
1218
  const changedClient = options.ownerClientId && options.ownerClientId !== options.clientId;
1219
- const previous = changedClient ? await retainSharedCodexAppServerClientByInstanceId(options.ownerClientId) : void 0;
1219
+ const previous = changedClient ? await retainSharedCodexAppServerClientByInstanceId(options.ownerClientId, {
1220
+ signal: options.signal,
1221
+ createAbortError: codexThreadLifecycleAbortError
1222
+ }) : void 0;
1220
1223
  if (changedClient && !previous) return false;
1221
1224
  const client = previous?.client ?? options.client;
1222
1225
  try {
@@ -1580,6 +1583,16 @@ function observeCodexThreadConfiguration(params, thread, assertCurrent) {
1580
1583
  };
1581
1584
  }
1582
1585
  //#endregion
1586
+ //#region extensions/codex/src/app-server/thread-lifecycle-projection.ts
1587
+ /** Projection identity omits persistent instructions: qualify using warm reuse's full policy. */
1588
+ async function canRetainCodexProjectionBackgroundWork(params, binding, context, pluginThreadConfig) {
1589
+ const finalConfig = await prepareCodexThreadFinalConfigPatch(params, context.nativeModelInputTools, binding);
1590
+ const pluginConfig = pluginThreadConfig?.configPatch ?? (params.pluginThreadConfig?.enabled && binding.pluginAppPolicyContext ? buildCodexPluginAppsConfigPatchFromPolicyContext(binding.pluginAppPolicyContext) : void 0);
1591
+ const authProfileId = binding.connectionScope === "supervision" ? void 0 : params.params.authProfileId ?? binding.authProfileId;
1592
+ const resumeParams = context.buildResumeParams(binding, authProfileId, buildCodexThreadRequestConfig(params, context, pluginConfig, finalConfig.configPatch));
1593
+ return isCodexAppServerLiveThreadBackgroundOnly(params.client, binding.threadId, fingerprintCodexThreadConfig(resumeParams, authProfileId, context.dynamicToolsFingerprint, binding));
1594
+ }
1595
+ //#endregion
1583
1596
  //#region extensions/codex/src/app-server/thread-supervision-cleanup.ts
1584
1597
  function withPendingSupervisionCleanup(pending, cleanupThreadIds) {
1585
1598
  return {
@@ -1917,6 +1930,7 @@ async function startOrResumeThread(input) {
1917
1930
  const preflight = await prepareCodexThreadLifecyclePreflight(params);
1918
1931
  const callerConfig = params.config;
1919
1932
  const { contextEngineBinding, dynamicToolsContainDeferred, dynamicToolsFingerprint, hostSystemAgentActive, legacyDynamicToolsFingerprint, legacyUserMcpServersFingerprint, lifecycleTiming, nativeSkillIsolationFingerprint, networkProxyConfigFingerprint, ringZeroActive, ringZeroClientInstanceId, ringZeroConfigFingerprint, restrictedToolSurface, restrictedToolSurfaceInheritedMcpServerNames, userMcpServersFingerprint, webSearchThreadConfigFingerprint } = preflight;
1933
+ let retainBackgroundPredecessor = false;
1920
1934
  let replacementPredecessor;
1921
1935
  const initialBoundThreadId = binding?.threadId;
1922
1936
  const initialBoundClientId = binding?.clientId;
@@ -2101,21 +2115,6 @@ async function startOrResumeThread(input) {
2101
2115
  embeddedAgentLog.debug("codex app-server delegation restricted for turn; starting transient thread", { threadId: binding.threadId });
2102
2116
  binding = void 0;
2103
2117
  }
2104
- if (binding?.threadId && (binding.contextEngine || contextEngineBinding)) {
2105
- if (!contextEngineBinding || !isContextEngineBindingCompatible(binding.contextEngine, contextEngineBinding)) {
2106
- rotateStaleBinding(binding, "context-engine binding", {
2107
- engineId: contextEngineBinding?.engineId,
2108
- previousEngineId: binding.contextEngine?.engineId,
2109
- epoch: contextEngineBinding?.projection?.epoch,
2110
- previousEpoch: binding.contextEngine?.projection?.epoch,
2111
- fingerprint: contextEngineBinding?.projection?.fingerprint,
2112
- previousFingerprint: binding.contextEngine?.projection?.fingerprint,
2113
- policyFingerprint: contextEngineBinding?.policyFingerprint,
2114
- previousPolicyFingerprint: binding.contextEngine?.policyFingerprint
2115
- });
2116
- rotatedContextEngineBinding = true;
2117
- }
2118
- }
2119
2118
  if (binding?.threadId) {
2120
2119
  if (!areUserMcpServersFingerprintsCompatible({
2121
2120
  previous: binding.userMcpServersFingerprint,
@@ -2132,6 +2131,31 @@ async function startOrResumeThread(input) {
2132
2131
  })) rotateStaleBinding(binding, "plugin app config");
2133
2132
  else if (binding.dynamicToolsFingerprint && params.dynamicTools.length > 0 && binding.dynamicToolsContainDeferred !== dynamicToolsContainDeferred && (binding.dynamicToolsContainDeferred !== void 0 || !dynamicToolsContainDeferred)) rotateStaleBinding(binding, "dynamic tool loading");
2134
2133
  }
2134
+ if (binding?.threadId && (binding.contextEngine || contextEngineBinding)) {
2135
+ if (!contextEngineBinding || !isContextEngineBindingCompatible(binding.contextEngine, contextEngineBinding)) {
2136
+ retainBackgroundPredecessor = initialBoundClientId === clientId && binding.contextEngine?.engineId === contextEngineBinding?.engineId && binding.contextEngine?.policyFingerprint === contextEngineBinding?.policyFingerprint && Boolean(contextEngineBinding) && (!binding.dynamicToolsFingerprint || areCodexDynamicToolFingerprintsCompatible({
2137
+ previous: binding.dynamicToolsFingerprint,
2138
+ next: dynamicToolsFingerprint,
2139
+ nextLegacy: legacyDynamicToolsFingerprint
2140
+ })) && isCodexAppServerLiveThreadBackgroundOnly(params.client, binding.threadId);
2141
+ if (retainBackgroundPredecessor) {
2142
+ const currentPluginConfig = await buildLoadedPluginThreadConfig(binding);
2143
+ if (currentPluginConfig && currentPluginConfig.fingerprint !== binding.pluginAppsFingerprint) retainBackgroundPredecessor = false;
2144
+ }
2145
+ if (retainBackgroundPredecessor) retainBackgroundPredecessor = await canRetainCodexProjectionBackgroundWork(params, binding, await prepareRequestContext(), prebuiltPluginThreadConfig);
2146
+ rotateStaleBinding(binding, "context-engine binding", {
2147
+ engineId: contextEngineBinding?.engineId,
2148
+ previousEngineId: binding.contextEngine?.engineId,
2149
+ epoch: contextEngineBinding?.projection?.epoch,
2150
+ previousEpoch: binding.contextEngine?.projection?.epoch,
2151
+ fingerprint: contextEngineBinding?.projection?.fingerprint,
2152
+ previousFingerprint: binding.contextEngine?.projection?.fingerprint,
2153
+ policyFingerprint: contextEngineBinding?.policyFingerprint,
2154
+ previousPolicyFingerprint: binding.contextEngine?.policyFingerprint
2155
+ });
2156
+ rotatedContextEngineBinding = true;
2157
+ }
2158
+ }
2135
2159
  if (binding?.threadId) {
2136
2160
  if (binding.dynamicToolsFingerprint && !areCodexDynamicToolFingerprintsCompatible({
2137
2161
  previous: binding.dynamicToolsFingerprint,
@@ -2181,7 +2205,7 @@ async function startOrResumeThread(input) {
2181
2205
  }
2182
2206
  assertCodexBindingMayBeReplaced(binding, "starting a fresh native thread", expectedOwnership);
2183
2207
  const requestContext = await prepareRequestContext();
2184
- if (initialBoundThreadId && !preserveExistingBinding && !configuredMcpOwnershipChanged) await releaseRetainedThread(initialBoundThreadId);
2208
+ if (initialBoundThreadId && !preserveExistingBinding && !configuredMcpOwnershipChanged && !(retainBackgroundPredecessor && isCodexAppServerLiveThreadBackgroundOnly(params.client, initialBoundThreadId))) await releaseRetainedThread(initialBoundThreadId);
2185
2209
  const started = await startFreshCodexThread(params, {
2186
2210
  ...requestContext,
2187
2211
  prebuiltPluginThreadConfig,
@@ -1,7 +1,7 @@
1
- import { S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-DvDLHVJe.mjs";
1
+ import { S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-CXK7tmkb.mjs";
2
2
  import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-CeyYScUC.mjs";
3
- import { K as releaseCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed, q as retainCodexAppServerLiveThread } from "./shared-client-wb1JBldZ.mjs";
4
- import { f as unsubscribeCodexThreadBestEffort, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-TScCVTsk.mjs";
3
+ import { H as isCodexAppServerLiveThreadClaimed, J as retainCodexAppServerLiveThread, q as releaseCodexAppServerLiveThread } from "./shared-client-CNGDTv68.mjs";
4
+ import { f as unsubscribeCodexThreadBestEffort, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-BVww-ct8.mjs";
5
5
  import { t as __exportAll } from "./session-binding-sidecars-DijNZb31.mjs";
6
6
  import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
7
7
  import { runWithAsyncWorkResources } from "openclaw/plugin-sdk/agent-harness-tool-runtime";
@@ -1,7 +1,7 @@
1
1
  import { i as CodexAppServerScopedRequestRejectedError, o as isCodexAppServerOverloadError } from "./rpc-error-C98SHchT.mjs";
2
- import { n as requestCodexAppServerClientJson } from "./request-DhbisYCc.mjs";
3
- import { S as CodexAdoptedThreadActiveError } from "./shared-client-wb1JBldZ.mjs";
4
- import { p as assertCodexThreadAcceptsDirectInput, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-BpSxNz4F.mjs";
2
+ import { n as requestCodexAppServerClientJson } from "./request-m-H-7FMu.mjs";
3
+ import { S as CodexAdoptedThreadActiveError } from "./shared-client-CNGDTv68.mjs";
4
+ import { p as assertCodexThreadAcceptsDirectInput, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-Div-zqnz.mjs";
5
5
  import { AgentHarnessPreflightError, embeddedAgentLog, formatErrorMessage } from "openclaw/plugin-sdk/agent-harness-runtime";
6
6
  //#region extensions/codex/src/app-server/thread-policy.ts
7
7
  /** A refusal, not a failed native write: the ephemeral conversation must stay alive. */
@@ -1,7 +1,7 @@
1
1
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
2
- import { d as readCodexEffectiveConfig, u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-nvYwVDyy.mjs";
2
+ import { d as readCodexEffectiveConfig, u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-CZmH25Xq.mjs";
3
3
  import { a as isCodexResponsesOAuthRun } from "./responses-oauth-twnuTaAa.mjs";
4
- import { d as mergeCodexThreadConfigs, t as buildCodexProjectDocThreadConfig } from "./project-doc-thread-config-B2ZD23A_.mjs";
4
+ import { d as mergeCodexThreadConfigs, t as buildCodexProjectDocThreadConfig } from "./project-doc-thread-config-D_sWbxFR.mjs";
5
5
  import { o as hashCodexAppServerBindingFingerprint } from "./session-binding-BDnNz-Co.mjs";
6
6
  import { n as resolveCodexAppServerModelProvider, r as resolveCodexAppServerRequestModelSelection, t as CODEX_NATIVE_PERSONALITY_NONE } from "./thread-model-selection-DcVebr8N.mjs";
7
7
  import { normalizeOptionalString, normalizeUniqueStringEntries, normalizeUniqueTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -1,8 +1,8 @@
1
1
  import { i as CodexAppServerScopedRequestRejectedError, o as isCodexAppServerOverloadError, r as CodexAppServerRpcError } from "./rpc-error-C98SHchT.mjs";
2
- import { r as publishCodexCatalogResume } from "./session-catalog-events-IoszcO7-.mjs";
3
- import { L as forgetCodexWorkspaceReferences, pt as isCodexAppServerStartupError, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-wb1JBldZ.mjs";
4
- import { h as assertCodexThreadResumeResponse, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-BpSxNz4F.mjs";
5
- import { f as unsubscribeCodexThreadBestEffort, i as assertCodexThreadResumeSubscription, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-TScCVTsk.mjs";
2
+ import { r as publishCodexCatalogResume } from "./session-catalog-events-BBV3DMG7.mjs";
3
+ import { L as forgetCodexWorkspaceReferences, mt as isCodexAppServerStartupError, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-CNGDTv68.mjs";
4
+ import { h as assertCodexThreadResumeResponse, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-Div-zqnz.mjs";
5
+ import { f as unsubscribeCodexThreadBestEffort, i as assertCodexThreadResumeSubscription, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-BVww-ct8.mjs";
6
6
  import { sanitizeTerminalText } from "openclaw/plugin-sdk/text-chunking";
7
7
  //#region extensions/codex/src/app-server/thread-resume.ts
8
8
  /** Owns Codex thread/resume subscription safety. */
@@ -1,5 +1,5 @@
1
1
  import { r as resolveCodexAppServerUserHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
2
- import "./config-G4IGX6bK.mjs";
2
+ import "./config-LQemoqTL.mjs";
3
3
  import { t as codexWebSocketDataToBuffer } from "./websocket-data-XlRvt8Ys.mjs";
4
4
  import path from "node:path";
5
5
  import { EventEmitter } from "node:events";
@@ -1,6 +1,6 @@
1
1
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
2
2
  import { n as waitForPromiseOrAbort, t as abortReason } from "./timeout-D0mEWSGG.mjs";
3
- import { x as readCodexTurnCompletedNotification } from "./client-BpSxNz4F.mjs";
3
+ import { x as readCodexTurnCompletedNotification } from "./client-Div-zqnz.mjs";
4
4
  import { normalizeOptionalString, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { AsyncResource } from "node:async_hooks";
6
6
  import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
@@ -1,7 +1,7 @@
1
1
  import { i as isJsonObject, r as flattenCodexDynamicToolFunctions } from "./protocol-CANUwXJ3.mjs";
2
2
  import { m as sessionBindingIdentity } from "./session-binding-record-C2kDBZhx.mjs";
3
3
  import { d as readCodexPluginConfig } from "./config-parsing-CVK2Q463.mjs";
4
- import { s as assertCodexModelBackedReviewerEffectiveConfig } from "./config-options-nvYwVDyy.mjs";
4
+ import { s as assertCodexModelBackedReviewerEffectiveConfig } from "./config-options-CZmH25Xq.mjs";
5
5
  import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-CeyYScUC.mjs";
6
6
  import { i as CodexAppServerScopedRequestRejectedError, o as isCodexAppServerOverloadError } from "./rpc-error-C98SHchT.mjs";
7
7
  import { a as readUpstreamUserText, i as readMirrorIdentity } from "./upstream-prompt-provenance-Ccd9MFRJ.mjs";
@@ -9,22 +9,22 @@ import { r as projectCodexUserItemText } from "./transcript-history-projection-D
9
9
  import { n as codexUpstreamBaseline, t as codexLastTerminalTurnId } from "./session-upstream-marker-D15C9NHp.mjs";
10
10
  import { r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-Bg9DbDI6.mjs";
11
11
  import { n as readCodexSessionMeta } from "./session-catalog-provenance-CmsOE5mh.mjs";
12
- import "./request-DhbisYCc.mjs";
13
- import { r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-G4IGX6bK.mjs";
14
- import { r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-B8agjie6.mjs";
12
+ import "./request-m-H-7FMu.mjs";
13
+ import { r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-LQemoqTL.mjs";
14
+ import { r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-DGB1-VbB.mjs";
15
15
  import { l as readCodexMirrorSourceFingerprint, o as fingerprintCodexMirrorSourceMessage } from "./transcript-mirror-attestation-BzUXnrvv.mjs";
16
- import { P as claimCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, f as readCodexAppServerClientDesktopGenerationFingerprint } from "./shared-client-wb1JBldZ.mjs";
17
- import { m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-BpSxNz4F.mjs";
18
- import { d as mergeCodexThreadConfigs, i as buildCodexPluginThreadConfig, p as shouldBuildCodexPluginThreadConfig } from "./project-doc-thread-config-B2ZD23A_.mjs";
19
- import { T as fingerprintUserMcpServersConfigPatch, _ as buildDeveloperInstructions, a as buildCodexThreadConfiguration, b as codexDynamicToolsFingerprint, h as resolveCodexWebSearchPlan, w as fingerprintJsonObject } from "./thread-requests-BqPhA4Gs.mjs";
16
+ import { P as claimCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, f as readCodexAppServerClientDesktopGenerationFingerprint } from "./shared-client-CNGDTv68.mjs";
17
+ import { m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-Div-zqnz.mjs";
18
+ import { d as mergeCodexThreadConfigs, i as buildCodexPluginThreadConfig, p as shouldBuildCodexPluginThreadConfig } from "./project-doc-thread-config-D_sWbxFR.mjs";
19
+ import { T as fingerprintUserMcpServersConfigPatch, _ as buildDeveloperInstructions, a as buildCodexThreadConfiguration, b as codexDynamicToolsFingerprint, h as resolveCodexWebSearchPlan, w as fingerprintJsonObject } from "./thread-requests-DjyDmCo4.mjs";
20
20
  import "./session-binding-BDnNz-Co.mjs";
21
- import "./thread-ownership-CTUs8Eyu.mjs";
21
+ import "./thread-ownership-BBsOFzCM.mjs";
22
22
  import { n as resolveCodexNativeExecutionPolicy } from "./native-execution-policy-MXEe7PB3.mjs";
23
- import { n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy } from "./thread-policy-BMRvlOi-.mjs";
24
- import { b as isCodexDynamicToolExcluded, f as codexNativeHookRemoteCredentialPath, i as buildCodexNativeHookRelayConfig, l as resolveCodexNativeHookRelayEvents, o as buildCodexNativeHookRelayId, r as assertCodexNativeHookRelayAllowed } from "./native-hook-relay-BQ9UkpeG.mjs";
25
- import { c as parseCodexNativeToolCatalog, i as checkCodexThreadAppAvailability, n as resolveCodexNativeSkillIsolation, t as applyCodexNativeSkillIsolation } from "./native-skill-isolation-CxZRtiWZ.mjs";
26
- import { c as prepareCodexWorkspaceDeveloperInstructions } from "./attempt-workspace-context-Cr3mI4vp.mjs";
27
- import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-DOBUBt86.mjs";
23
+ import { n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy } from "./thread-policy-BEiS7ITh.mjs";
24
+ import { b as isCodexDynamicToolExcluded, f as codexNativeHookRemoteCredentialPath, i as buildCodexNativeHookRelayConfig, l as resolveCodexNativeHookRelayEvents, o as buildCodexNativeHookRelayId, r as assertCodexNativeHookRelayAllowed } from "./native-hook-relay-BvwSj5bt.mjs";
25
+ import { c as parseCodexNativeToolCatalog, i as checkCodexThreadAppAvailability, n as resolveCodexNativeSkillIsolation, t as applyCodexNativeSkillIsolation } from "./native-skill-isolation-Cx2AkUco.mjs";
26
+ import { c as prepareCodexWorkspaceDeveloperInstructions } from "./attempt-workspace-context-BkA0W8Jy.mjs";
27
+ import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-B-pTlDsf.mjs";
28
28
  import { n as prepareCodexSessionInitialization } from "./session-initialization-BjVtsTzi.mjs";
29
29
  import { createImportedCodexSession } from "./session-history-import-DgwRu2eD.mjs";
30
30
  import { isRecord, normalizeOptionalString, readNonBlankString } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -1,7 +1,7 @@
1
1
  import { t as buildCodexAppServerUsageSnapshot } from "./rate-limits-CI8pTPqL.mjs";
2
- import { t as readCodexAppServerUsage } from "./request-DhbisYCc.mjs";
3
- import "./config-G4IGX6bK.mjs";
4
- import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-B8agjie6.mjs";
2
+ import { t as readCodexAppServerUsage } from "./request-m-H-7FMu.mjs";
3
+ import "./config-LQemoqTL.mjs";
4
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DGB1-VbB.mjs";
5
5
  import { CODEX_APP_SERVER_AUTH_MARKER } from "openclaw/plugin-sdk/agent-runtime";
6
6
  //#region extensions/codex/src/app-server/usage.ts
7
7
  /** Handles the synthetic usage credential for a Codex-backed OpenAI route. */
@@ -1,7 +1,7 @@
1
1
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
2
2
  import { a as shouldRefreshCodexRateLimitsForUsageLimitMessage, i as resolveCodexUsageLimitResetAtMs, n as formatCodexUsageLimitErrorMessage } from "./rate-limits-CI8pTPqL.mjs";
3
3
  import { t as CODEX_CONTROL_METHODS } from "./capabilities-DbOzOglY.mjs";
4
- import { Q as rememberCodexRateLimitsRead, X as readCodexRateLimitsRevision, Z as readRecentCodexRateLimits } from "./shared-client-wb1JBldZ.mjs";
4
+ import { $ as rememberCodexRateLimitsRead, Q as readRecentCodexRateLimits, Z as readCodexRateLimitsRevision } from "./shared-client-CNGDTv68.mjs";
5
5
  import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import { markAuthProfileBlockedUntil } from "openclaw/plugin-sdk/agent-runtime";
7
7
  import { embeddedAgentLog, formatErrorMessage } from "openclaw/plugin-sdk/agent-harness-runtime";
@@ -1,5 +1,5 @@
1
- import { m as buildCodexNativeWebSearchThreadConfig } from "./thread-requests-BqPhA4Gs.mjs";
2
- import { runBoundedCodexAppServerTurn } from "./bounded-turn-BpjZixcd.mjs";
1
+ import { m as buildCodexNativeWebSearchThreadConfig } from "./thread-requests-DjyDmCo4.mjs";
2
+ import { runBoundedCodexAppServerTurn } from "./bounded-turn-vdpL2efh.mjs";
3
3
  import { t as projectCodexWebSearchItem } from "./web-search-item-CvokaZOo.mjs";
4
4
  import { readStringParam, resolveSearchTimeoutSeconds, wrapWebContent } from "openclaw/plugin-sdk/provider-web-search";
5
5
  //#region extensions/codex/src/web-search-provider.runtime.ts
@@ -1,6 +1,6 @@
1
1
  import { a as resolveCodexPrivateLauncher, n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
2
2
  import { n as resolveCodexAppServerSpawnEnv, r as resolveCodexAppServerSpawnInvocation } from "./transport-stdio-lgeKKHyw.mjs";
3
- import { t as resolveCodexDoctorStartOptions } from "./doctor-start-options-DedLaoqI.mjs";
3
+ import { t as resolveCodexDoctorStartOptions } from "./doctor-start-options-C28ek2hD.mjs";
4
4
  import { runUtf8CommandWithTimeout } from "openclaw/plugin-sdk/process-runtime";
5
5
  import path from "node:path";
6
6
  import fs from "node:fs/promises";
package/dist/api.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { i as resolveManagedCodexNativeCommand, s as CODEX_APP_SERVER_VERSION } from "./.setup/managed-binary-DwC9wxch.mjs";
2
- import { t as codexNativeProfileRecoveryHealthCheck } from "./.setup/auth-profile-health-oHizqgye.mjs";
2
+ import { t as codexNativeProfileRecoveryHealthCheck } from "./.setup/auth-profile-health-B05o5BAm.mjs";
3
3
  import { n as findCodexAppServerSpawnError, t as describeCodexSpawnError } from "./.setup/spawn-error-CL3n6MAa.mjs";
4
- import { t as resolveCodexDoctorStartOptions } from "./.setup/doctor-start-options-DedLaoqI.mjs";
4
+ import { t as resolveCodexDoctorStartOptions } from "./.setup/doctor-start-options-C28ek2hD.mjs";
5
5
  import { runUtf8CommandWithTimeout } from "openclaw/plugin-sdk/process-runtime";
6
6
  import path from "node:path";
7
7
  import { coerceErrorMessage } from "openclaw/plugin-sdk/error-runtime";
@@ -115,7 +115,7 @@ function registerCodexManagedAppServerDoctorChecks$1(host, deps) {
115
115
  const CODEX_PLUGIN_ROOT = path.dirname(fileURLToPath(import.meta.url));
116
116
  async function probeCodexWorkspaceWriteSandbox(params) {
117
117
  try {
118
- const { probeCodexWorkspaceWriteSandbox: probe } = await import("./.setup/workspace-write-sandbox-probe-Cyn6cBsp.mjs");
118
+ const { probeCodexWorkspaceWriteSandbox: probe } = await import("./.setup/workspace-write-sandbox-probe-DvfWTvuR.mjs");
119
119
  return await probe({
120
120
  ...params,
121
121
  pluginRoot: CODEX_PLUGIN_ROOT