@openclaw/codex 2026.9.34 → 2026.9.36

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 (99) hide show
  1. package/dist/.setup/{account-usage-runtime-CD8HYWaz.mjs → account-usage-runtime-BOmEegZv.mjs} +3 -3
  2. package/dist/.setup/{apply-DN-qPbcH.mjs → apply-DhLjXde1.mjs} +8 -8
  3. package/dist/.setup/{attempt-client-cleanup-93r-CLTi.mjs → attempt-client-cleanup-C9dwStbK.mjs} +5 -5
  4. package/dist/.setup/{attempt-workspace-context-ejEuxrY1.mjs → attempt-workspace-context-DJrvhJDC.mjs} +1 -1
  5. package/dist/.setup/{auth-binding-BLWz7stm.mjs → auth-binding-Bnaj0_iV.mjs} +1 -1
  6. package/dist/.setup/{auth-cache-key-Bs_3kRJD.mjs → auth-cache-key-DWIq3Lzf.mjs} +3 -3
  7. package/dist/.setup/{binding-connection-DTtN1KrX.mjs → binding-connection-DRPlnIgg.mjs} +2 -2
  8. package/dist/.setup/{binding-connection.runtime-6TpgD1M6.mjs → binding-connection.runtime-DC3oUqo-.mjs} +1 -1
  9. package/dist/.setup/{bounded-turn-I8Vb-qq3.mjs → bounded-turn-Csc9Qvpm.mjs} +11 -11
  10. package/dist/.setup/{bounded-turn-isolation-B8K_ylqk.mjs → bounded-turn-isolation-Ce-oOk-D.mjs} +2 -2
  11. package/dist/.setup/{build-state--SrHyc6r.mjs → build-state-CmeL24P5.mjs} +1 -1
  12. package/dist/.setup/{client-CyquSiJ2.mjs → client-BdNoDUaQ.mjs} +268 -7
  13. package/dist/.setup/{command-dispatch-BPLz7tlx.mjs → command-dispatch-9sYDmuIo.mjs} +1 -1
  14. package/dist/.setup/{command-handlers-95-WVrcl.mjs → command-handlers-C-uyeN_H.mjs} +22 -22
  15. package/dist/.setup/{command-rpc-BDfCWgc_.mjs → command-rpc-BHE3OG7z.mjs} +11 -11
  16. package/dist/.setup/{compact-5zzFlH-W.mjs → compact-DsrYq-_j.mjs} +12 -12
  17. package/dist/.setup/{config-DKhXquav.mjs → config-DqmrqI23.mjs} +2 -2
  18. package/dist/.setup/{config-runtime-C0NbLms1.mjs → config-runtime-DDhvIeUC.mjs} +1 -1
  19. package/dist/.setup/{conversation-binding-C-0jWdSo.mjs → conversation-binding-CfIcWNVS.mjs} +15 -15
  20. package/dist/.setup/{conversation-binding-data-C746z5Pn.mjs → conversation-binding-data-DlsG-dQu.mjs} +1 -1
  21. package/dist/.setup/{conversation-control-BEotI-gH.mjs → conversation-control-BWzVNh-v.mjs} +5 -5
  22. package/dist/.setup/{dynamic-tools-D3NAwGw3.mjs → dynamic-tools-CAWsGyFZ.mjs} +7 -7
  23. package/dist/.setup/{effective-mcp-catalog-C0DfQNYU.mjs → effective-mcp-catalog-BYzIV1DD.mjs} +4 -4
  24. package/dist/.setup/{ephemeral-turn-ksZ9NfsS.mjs → ephemeral-turn-CIcaAzR4.mjs} +2 -2
  25. package/dist/.setup/{event-projector-assistant-message-BmWQXFLV.mjs → event-projector-assistant-message-CDe3ohIy.mjs} +1 -1
  26. package/dist/.setup/{isolated-completion-Ci27cKqA.mjs → isolated-completion-DLV0kBu2.mjs} +6 -6
  27. package/dist/.setup/{managed-binary-B6hQ1UKR.mjs → managed-binary-Ckgvm_4V.mjs} +1 -1
  28. package/dist/.setup/{model-catalog-qzAfnHzR.mjs → model-catalog-CbhJ0pMa.mjs} +7 -7
  29. package/dist/.setup/{models-BbEE4EWS.mjs → models-DXVC1KpU.mjs} +3 -3
  30. package/dist/.setup/{native-auth-BN-BD2AV.mjs → native-auth-BNGz77PF.mjs} +3 -3
  31. package/dist/.setup/{native-subagent-monitor-B9aAqfnU.mjs → native-subagent-monitor-GOGINNw0.mjs} +116 -27
  32. package/dist/.setup/{native-subagent-pending-assignments-DwkCzLvD.mjs → native-subagent-pending-assignments-XHNn4k5q.mjs} +51 -14
  33. package/dist/.setup/{native-task-assignments-DMQ0g3hu.mjs → native-task-assignments-Dna952zv.mjs} +2 -2
  34. package/dist/.setup/{node-cli-sessions-HC4W6FLI.mjs → node-cli-sessions-BwhIYgCZ.mjs} +2 -2
  35. package/dist/.setup/{node-exec-server.runtime-BS7jsvK-.mjs → node-exec-server.runtime-9IZtsOmo.mjs} +2 -2
  36. package/dist/.setup/{plan-DTyFfTkk.mjs → plan-BB5rf7qh.mjs} +5 -5
  37. package/dist/.setup/{plugin-activation-cNHRfaxU.mjs → plugin-activation-BaDnJKJd.mjs} +2 -2
  38. package/dist/.setup/{plugin-inventory-Cky2XJUw.mjs → plugin-inventory-B4uqIw4J.mjs} +1 -1
  39. package/dist/.setup/{plugin-metadata-cache-Q4ZFn6UH.mjs → plugin-metadata-cache-DuaAXtXC.mjs} +7 -7
  40. package/dist/.setup/{provider-Cnr_icbk.mjs → provider-BEDFjTWv.mjs} +4 -4
  41. package/dist/.setup/{provider-capabilities-ByhBukaD.mjs → provider-capabilities-DcF-V_3D.mjs} +2 -2
  42. package/dist/.setup/{request-DxKAfWyy.mjs → request-DZKa6YSy.mjs} +5 -5
  43. package/dist/.setup/{run-attempt-BZKhzSrb.mjs → run-attempt-EMGdmQqt.mjs} +75 -40
  44. package/dist/.setup/{runtime-artifact-D7lCXdhV.mjs → runtime-artifact-Riq878B2.mjs} +3 -3
  45. package/dist/.setup/{runtime-artifact-connection-D68qQn1m.mjs → runtime-artifact-connection-Bjv8P6Sx.mjs} +2 -2
  46. package/dist/.setup/{sandbox-guard-DjCz2eOw.mjs → sandbox-guard-OIYEmTRF.mjs} +1 -1
  47. package/dist/.setup/{session-binding-DGCYAfvD.mjs → session-binding-Fn7Ekzuv.mjs} +19 -4
  48. package/dist/.setup/{session-binding-record-Oe9L-CNY.mjs → session-binding-record-CUKpUKVm.mjs} +1 -1
  49. package/dist/.setup/{session-binding-sidecars-jo6H8dFr.mjs → session-binding-sidecars-BuEALwJY.mjs} +1 -1
  50. package/dist/.setup/{session-catalog-adoption-BU_pHWG7.mjs → session-catalog-adoption-58bqOngU.mjs} +5 -5
  51. package/dist/.setup/{session-catalog-BaVqm4-Q.mjs → session-catalog-apN5C2Oz.mjs} +22 -22
  52. package/dist/.setup/{session-catalog-archive-spHfihri.mjs → session-catalog-archive-BM9gCB82.mjs} +5 -5
  53. package/dist/.setup/{session-catalog-events-D9zC7gRb.mjs → session-catalog-events-DHPtqvWu.mjs} +3 -3
  54. package/dist/.setup/{session-catalog-index-CNKpHanP.mjs → session-catalog-index-JJogsGuf.mjs} +8 -8
  55. package/dist/.setup/{session-catalog-index-order-BcQpHks3.mjs → session-catalog-index-order-DQhmgM3b.mjs} +1 -1
  56. package/dist/.setup/{session-catalog-index-state-TeO7EyO-.mjs → session-catalog-index-state-DhLoAnfy.mjs} +3 -3
  57. package/dist/.setup/{session-catalog-limits-DDxOsQeC.mjs → session-catalog-limits-bz5ZvjtY.mjs} +1 -1
  58. package/dist/.setup/{session-catalog-list-request-CvtxrYSe.mjs → session-catalog-list-request-A1wN4sKw.mjs} +2 -2
  59. package/dist/.setup/{session-catalog-native-projection-DhId_sl8.mjs → session-catalog-native-projection-C_xvyztm.mjs} +4 -4
  60. package/dist/.setup/{session-catalog-node-adoption-DgXvSGu0.mjs → session-catalog-node-adoption-BdS7zDuY.mjs} +2 -2
  61. package/dist/.setup/{session-catalog-node-continue-DjKXHBbi.mjs → session-catalog-node-continue-XFJG3JGh.mjs} +5 -5
  62. package/dist/.setup/{session-catalog-node-lookup-CtAXI5W5.mjs → session-catalog-node-lookup-D9AP5D5o.mjs} +2 -2
  63. package/dist/.setup/{session-catalog-parsing-CPGaPYr-.mjs → session-catalog-parsing-CnEH565l.mjs} +1 -1
  64. package/dist/.setup/{session-catalog-projection-DcqN7DuI.mjs → session-catalog-projection-C6PSmTcX.mjs} +4 -4
  65. package/dist/.setup/{session-cli-TEVHpWaE.mjs → session-cli-B5RvT_Rs.mjs} +3 -3
  66. package/dist/.setup/{session-history-import-WhX-X33a.mjs → session-history-import-tquj9DCz.mjs} +4 -4
  67. package/dist/.setup/{session-initialization-6aveB9qb.mjs → session-initialization-DefAI1_5.mjs} +2 -2
  68. package/dist/.setup/{session-permission-policy-Ci_fVX6y.mjs → session-permission-policy-7lM447LW.mjs} +1 -1
  69. package/dist/.setup/{session-retirement-CW0ciVbW.mjs → session-retirement-Bdygfnxa.mjs} +6 -6
  70. package/dist/.setup/{settled-turn-finalizer-DlPT87wW.mjs → settled-turn-finalizer-BzVjkwgJ.mjs} +7 -7
  71. package/dist/.setup/{shared-client-tOOyadmg.mjs → shared-client-B__jQti1.mjs} +44 -31
  72. package/dist/.setup/{shared-client-lifecycle-CJ0lYVCW.mjs → shared-client-lifecycle-wN_lOZkB.mjs} +24 -2
  73. package/dist/.setup/{side-question-BbnuMFTT.mjs → side-question-B25zswMS.mjs} +15 -15
  74. package/dist/.setup/{source-Cr8STZpF.mjs → source-DuNxTQoz.mjs} +4 -4
  75. package/dist/.setup/{thread-lifecycle-DcNw9n7E.mjs → thread-lifecycle-Cw5Nsciw.mjs} +13 -13
  76. package/dist/.setup/{thread-ownership-DDban_4i.mjs → thread-ownership-Cxb01Uwq.mjs} +4 -4
  77. package/dist/.setup/{thread-policy-TTAb-1yF.mjs → thread-policy-BHr4QsDO.mjs} +3 -3
  78. package/dist/.setup/{thread-requests-DmkmrGIt.mjs → thread-requests-D-GTNAnZ.mjs} +8 -8
  79. package/dist/.setup/{thread-resume-eo3IhOhh.mjs → thread-resume-BNdEFZpM.mjs} +5 -5
  80. package/dist/.setup/{transcript-mirror-kxmCYsuF.mjs → transcript-mirror-BRNhyb1o.mjs} +1 -1
  81. package/dist/.setup/{transport-stdio-CbutOIEh.mjs → transport-stdio-DU8dIOCj.mjs} +1 -1
  82. package/dist/.setup/{transport-websocket-BTBE-LD9.mjs → transport-websocket-zu3jRPnu.mjs} +1 -1
  83. package/dist/.setup/{upstream-session-fork-BbUNlJPZ.mjs → upstream-session-fork-D8rqW9ad.mjs} +14 -14
  84. package/dist/.setup/{usage-CDiI_zkr.mjs → usage-D_W8Be4u.mjs} +3 -3
  85. package/dist/.setup/{usage-limit-error-BLnJh1mB.mjs → usage-limit-error-CpasNGjp.mjs} +1 -1
  86. package/dist/.setup/{web-search-provider.runtime-B_E2kpZN.mjs → web-search-provider.runtime-CyRLuVOO.mjs} +2 -2
  87. package/dist/.source-module-urls/0560e3825cf513bbe9e095a85951c1215dfced0c1e581c5f32b007a3e759636e.json +1 -0
  88. package/dist/.source-module-urls/89af8e902f34481d87fbb497cd5ac223d504b1fa22d95d3038b6d33a3b97c3da.json +1 -0
  89. package/dist/api.js +3 -3
  90. package/dist/catalog-page.worker.js +338 -1
  91. package/dist/cli-metadata.js +1 -1
  92. package/dist/doctor-contract-api.js +5 -5
  93. package/dist/harness.js +19 -19
  94. package/dist/index.js +52 -42
  95. package/dist/media-understanding-provider.js +2 -2
  96. package/dist/migration-provider-api.js +1 -1
  97. package/dist/provider-discovery.js +1 -1
  98. package/package.json +5 -5
  99. package/dist/.setup/client-catalog-response-B9pLl58Y.mjs +0 -285
@@ -1,23 +1,23 @@
1
+ import { f as isUnsupportedCodexAppServerVersionError, t as CodexAppServerClient } from "./client-BdNoDUaQ.mjs";
1
2
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
2
- import { n as defineCodexBuildState, t as codexBuildSymbol } from "./build-state--SrHyc6r.mjs";
3
+ import { n as defineCodexBuildState, t as codexBuildSymbol } from "./build-state-CmeL24P5.mjs";
3
4
  import { t as CODEX_APP_SERVER_AUTH_PROVIDER } from "./auth-profile-selection-DFu9e167.mjs";
4
5
  import { n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
5
6
  import { a as withEphemeralCodexAuthStore, i as withClearedEnvironmentVariables, n as resolveCodexAppServerLocalHomeDir, r as resolveCodexAppServerUserHomeDir, t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
6
7
  import { a as resolveCodexAppServerStartOptionsForAgent, d as readCodexEffectiveConfig, o as resolveCodexComputerUseConfig, t as codexAppServerStartOptionsKey, u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-CzyWLTJt.mjs";
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-B6hQ1UKR.mjs";
8
- import { a as readCodexCliAuthFileApiKey, c as resolveCodexAppServerPreparedApiKeyCacheKey, d as waitForCodexDesktopGeneration, f as readCodexDesktopArtifactTreeFingerprint, i as fingerprintTokenAuthProfileCacheKey, n as CODEX_AUTH_JSON_FILENAME, o as readFirstNonEmptyEnv, r as fingerprintApiKeyAuthProfileCacheKey, s as resolveCodexAppServerFallbackApiKeyCacheKey, t as CODEX_APP_SERVER_API_KEY_ENV_VARS, u as isCodexDesktopGenerationCurrent } from "./auth-cache-key-Bs_3kRJD.mjs";
9
- import { a as notifyDesktopGenerationDrainChecks, c as retainSharedClientEntry, d as retireSharedCodexAppServerClientIfCurrent, m as waitForUnclaimedSharedClientStartup, n as getCurrentSharedClientEntry, o as ownCodexStartup, r as getSharedCodexAppServerClientState, s as releaseSharedClientEntry, t as createCodexAppServerStartupLifetime, u as retirePendingSharedClientEntryIfUnclaimed } from "./shared-client-lifecycle-CJ0lYVCW.mjs";
10
- import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-CbutOIEh.mjs";
8
+ 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-Ckgvm_4V.mjs";
9
+ import { a as readCodexCliAuthFileApiKey, c as resolveCodexAppServerPreparedApiKeyCacheKey, d as waitForCodexDesktopGeneration, f as readCodexDesktopArtifactTreeFingerprint, i as fingerprintTokenAuthProfileCacheKey, n as CODEX_AUTH_JSON_FILENAME, o as readFirstNonEmptyEnv, r as fingerprintApiKeyAuthProfileCacheKey, s as resolveCodexAppServerFallbackApiKeyCacheKey, t as CODEX_APP_SERVER_API_KEY_ENV_VARS, u as isCodexDesktopGenerationCurrent } from "./auth-cache-key-DWIq3Lzf.mjs";
10
+ import { a as notifyDesktopGenerationDrainChecks, c as releaseSharedClientEntry, d as retirePendingSharedClientEntryIfUnclaimed, f as retireSharedCodexAppServerClientIfCurrent, h as waitForUnclaimedSharedClientStartup, l as retainSharedClientEntry, n as getCurrentSharedClientEntry, o as ownCodexStartup, r as getSharedCodexAppServerClientState, s as refreshSharedClientIdleRetirement, t as createCodexAppServerStartupLifetime } from "./shared-client-lifecycle-wN_lOZkB.mjs";
11
+ import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-DU8dIOCj.mjs";
11
12
  import { n as CodexAppServerAuthProfileUnavailableError, r as formatCodexAuthProfileUnavailableMessage } from "./auth-profile-recovery-BREezV0L.mjs";
12
13
  import { i as withTimeout } from "./timeout-CXOfNoaX.mjs";
13
14
  import { n as readCodexSessionMeta } from "./session-catalog-provenance-DoAvktcj.mjs";
14
- import { n as observeCodexCatalogClient } from "./session-catalog-events-D9zC7gRb.mjs";
15
- import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-C0NbLms1.mjs";
15
+ import { n as observeCodexCatalogClient } from "./session-catalog-events-DHPtqvWu.mjs";
16
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DDhvIeUC.mjs";
16
17
  import { a as resolveCodexAppServerAuthProfileStore, i as resolveCodexAppServerAuthProfileIdForAgent, r as resolveCodexAppServerAuthProfileId, t as isCodexAppServerNativeAuthProfile } from "./auth-profile-B0okYl2D.mjs";
17
18
  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 { f as isUnsupportedCodexAppServerVersionError, t as CodexAppServerClient } from "./client-CyquSiJ2.mjs";
19
- import { n as isCodexWebSocketOpenFailure } from "./transport-websocket-BTBE-LD9.mjs";
20
- import { t as __exportAll } from "./session-binding-sidecars-jo6H8dFr.mjs";
19
+ import { n as isCodexWebSocketOpenFailure } from "./transport-websocket-zu3jRPnu.mjs";
20
+ import { t as __exportAll } from "./session-binding-sidecars-BuEALwJY.mjs";
21
21
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
22
22
  import { createHash, randomUUID } from "node:crypto";
23
23
  import { isDeepStrictEqual } from "node:util";
@@ -1906,7 +1906,7 @@ async function readCodexClientSessionMeta(client, sessionsRoot, boundRolloutPath
1906
1906
  return structuredClone(metadata);
1907
1907
  }
1908
1908
  /** Installs one auth-refresh handler and one rate-limit observer per physical client. */
1909
- function ensureCodexAppServerClientRuntime(client, context) {
1909
+ function ensureCodexAppServerClientRuntime(client, context, onThreadOwnershipChange) {
1910
1910
  const existing = configuredClients.get(client);
1911
1911
  if (existing) {
1912
1912
  if (existing.closed) return;
@@ -1918,6 +1918,7 @@ function ensureCodexAppServerClientRuntime(client, context) {
1918
1918
  }
1919
1919
  const runtime = {
1920
1920
  context,
1921
+ onThreadOwnershipChange,
1921
1922
  closed: false,
1922
1923
  retainedThreads: /* @__PURE__ */ new Map(),
1923
1924
  claimedThreads: /* @__PURE__ */ new Map(),
@@ -1989,17 +1990,16 @@ function ensureCodexAppServerClientRuntime(client, context) {
1989
1990
  invalidateThreadOwnership(runtime, threadId);
1990
1991
  runtime.sessionMetadata.delete(threadId);
1991
1992
  runtime.workspaceReferences.delete(threadId);
1992
- scheduleRetainedThreadEviction(client, runtime);
1993
+ updateThreadOwnership(client, runtime);
1993
1994
  }
1994
1995
  }
1995
1996
  });
1996
1997
  }
1997
- function scheduleRetainedThreadEviction(client, runtime) {
1998
- if (runtime.evictionTimer) {
1999
- clearTimeout(runtime.evictionTimer);
2000
- runtime.evictionTimer = void 0;
2001
- }
1998
+ function updateThreadOwnership(client, runtime) {
1999
+ clearTimeout(runtime.evictionTimer);
2000
+ runtime.evictionTimer = void 0;
2002
2001
  if (runtime.closed) return;
2002
+ runtime.onThreadOwnershipChange?.();
2003
2003
  let expiresAt = Number.POSITIVE_INFINITY;
2004
2004
  for (const [threadId, thread] of runtime.retainedThreads) if (!runtime.protectedThreads.has(threadId)) expiresAt = Math.min(expiresAt, thread.expiresAt);
2005
2005
  if (!Number.isFinite(expiresAt)) return;
@@ -2026,7 +2026,6 @@ async function releaseRetainedThread(client, runtime, threadId, assertCurrent) {
2026
2026
  olderThreadIds.add(candidateThreadId);
2027
2027
  }
2028
2028
  runtime.retainedThreads.delete(threadId);
2029
- scheduleRetainedThreadEviction(client, runtime);
2030
2029
  const transition = {
2031
2030
  retainedOwnerToken: retained.ownerToken,
2032
2031
  completion: Promise.resolve().then(() => {
@@ -2035,6 +2034,7 @@ async function releaseRetainedThread(client, runtime, threadId, assertCurrent) {
2035
2034
  })
2036
2035
  };
2037
2036
  runtime.releasingThreads.set(threadId, transition);
2037
+ updateThreadOwnership(client, runtime);
2038
2038
  try {
2039
2039
  await transition.completion;
2040
2040
  runtime.workspaceReferences.delete(threadId);
@@ -2051,13 +2051,13 @@ async function releaseRetainedThread(client, runtime, threadId, assertCurrent) {
2051
2051
  throw error;
2052
2052
  } finally {
2053
2053
  if (runtime.releasingThreads.get(threadId) === transition) runtime.releasingThreads.delete(threadId);
2054
- scheduleRetainedThreadEviction(client, runtime);
2054
+ updateThreadOwnership(client, runtime);
2055
2055
  }
2056
2056
  }
2057
2057
  async function evictExpiredRetainedThreads(client, runtime) {
2058
2058
  const now = Date.now();
2059
2059
  for (const [threadId, thread] of runtime.retainedThreads) if (thread.expiresAt <= now && !runtime.protectedThreads.has(threadId)) await releaseRetainedThread(client, runtime, threadId);
2060
- scheduleRetainedThreadEviction(client, runtime);
2060
+ updateThreadOwnership(client, runtime);
2061
2061
  }
2062
2062
  async function evictExcessIdleThreads(client, runtime) {
2063
2063
  const idleThreads = () => [...runtime.retainedThreads].filter(([threadId, thread]) => thread.ephemeralPolicy === void 0 && !runtime.protectedThreads.has(threadId));
@@ -2098,7 +2098,7 @@ async function retainCodexAppServerLiveThread(client, threadId, releaseThread, c
2098
2098
  await evictExcessIdleThreads(client, runtime);
2099
2099
  } catch (error) {
2100
2100
  if (runtime.retainedThreads.get(threadId) === retained) runtime.retainedThreads.delete(threadId);
2101
- scheduleRetainedThreadEviction(client, runtime);
2101
+ updateThreadOwnership(client, runtime);
2102
2102
  embeddedAgentLog$1.warn("codex retained thread capacity eviction failed", {
2103
2103
  threadId,
2104
2104
  reason: formatErrorMessage$1(error)
@@ -2107,7 +2107,7 @@ async function retainCodexAppServerLiveThread(client, threadId, releaseThread, c
2107
2107
  }
2108
2108
  if (runtime.closed) return false;
2109
2109
  if (claimed !== void 0 && runtime.claimedThreads.get(threadId) === claimed) runtime.claimedThreads.delete(threadId);
2110
- scheduleRetainedThreadEviction(client, runtime);
2110
+ updateThreadOwnership(client, runtime);
2111
2111
  return true;
2112
2112
  }
2113
2113
  /** Transfer one idle subscription to its next turn or compaction without touching sibling threads. */
@@ -2146,7 +2146,7 @@ function claimCodexAppServerThreadOwnership(client, runtime, threadId, retained,
2146
2146
  runtime.claimedThreads.set(threadId, claimed);
2147
2147
  previousClaim?.invalidate();
2148
2148
  retained.ownerToken?.invalidate();
2149
- scheduleRetainedThreadEviction(client, runtime);
2149
+ updateThreadOwnership(client, runtime);
2150
2150
  const assertCurrent = () => {
2151
2151
  if (claimed.invalidated || runtime.closed || runtime.claimedThreads.get(threadId) !== claimed) throw new Error(`Codex thread subscription ownership changed: ${threadId}`);
2152
2152
  };
@@ -2187,6 +2187,7 @@ function claimCodexAppServerThreadOwnership(client, runtime, threadId, retained,
2187
2187
  }
2188
2188
  } finally {
2189
2189
  if (runtime.releasingThreads.get(threadId) === transition) runtime.releasingThreads.delete(threadId);
2190
+ updateThreadOwnership(client, runtime);
2190
2191
  }
2191
2192
  };
2192
2193
  physicalThreadReleases.set(release, retained.release);
@@ -2200,7 +2201,7 @@ function claimCodexAppServerThreadOwnership(client, runtime, threadId, retained,
2200
2201
  forget: () => {
2201
2202
  if (forgetThreadOwnership(runtime, threadId, claimed)) {
2202
2203
  runtime.workspaceReferences.delete(threadId);
2203
- scheduleRetainedThreadEviction(client, runtime);
2204
+ updateThreadOwnership(client, runtime);
2204
2205
  }
2205
2206
  }
2206
2207
  };
@@ -2210,6 +2211,11 @@ function revertCodexAppServerLiveThreadSkillsCatalog(client, threadId) {
2210
2211
  const runtime = configuredClients.get(client);
2211
2212
  if (runtime && !runtime.closed) revertRetainedThreadSkillsCatalog(runtime, threadId);
2212
2213
  }
2214
+ /** Native subscriptions, including ephemeral history and releases, pin their physical client. */
2215
+ function hasCodexAppServerThreadOwnership(client) {
2216
+ const runtime = configuredClients.get(client);
2217
+ return Boolean(runtime && !runtime.closed && (runtime.retainedThreads.size > 0 || runtime.claimedThreads.size > 0 || runtime.releasingThreads.size > 0 || runtime.protectedThreads.size > 0));
2218
+ }
2213
2219
  /** Distinguish active claimed ownership from an already-evicted idle subscription. */
2214
2220
  function hasCodexAppServerLiveThread(client, threadId) {
2215
2221
  return hasThreadOwnership(configuredClients.get(client), threadId);
@@ -2253,20 +2259,24 @@ async function unsubscribeCodexAppServerLiveThread(client, threadId, timeoutMs,
2253
2259
  physicalRelease
2254
2260
  };
2255
2261
  runtime.releasingThreads.set(threadId, transition);
2262
+ updateThreadOwnership(client, runtime);
2256
2263
  }
2257
2264
  try {
2258
2265
  await physicalRelease;
2259
2266
  if (retained !== void 0 && runtime?.retainedThreads.get(threadId) === retained) {
2260
2267
  runtime.retainedThreads.delete(threadId);
2261
2268
  retained.ownerToken?.invalidate();
2262
- scheduleRetainedThreadEviction(client, runtime);
2269
+ updateThreadOwnership(client, runtime);
2263
2270
  }
2264
2271
  if (claimed !== void 0 && runtime?.claimedThreads.get(threadId) === claimed) {
2265
2272
  runtime.claimedThreads.delete(threadId);
2266
2273
  claimed.invalidate();
2267
2274
  }
2268
2275
  } finally {
2269
- if (ownsTransition && runtime.releasingThreads.get(threadId) === transition) runtime.releasingThreads.delete(threadId);
2276
+ if (ownsTransition && runtime.releasingThreads.get(threadId) === transition) {
2277
+ runtime.releasingThreads.delete(threadId);
2278
+ updateThreadOwnership(client, runtime);
2279
+ }
2270
2280
  }
2271
2281
  }
2272
2282
  /** Reset/end owns the exact thread; failed generation retirement must never release its successor. */
@@ -2279,7 +2289,7 @@ function protectCodexAppServerLiveThread(client, threadId) {
2279
2289
  const runtime = configuredClients.get(client);
2280
2290
  if (!runtime || runtime.closed) return () => void 0;
2281
2291
  runtime.protectedThreads.set(threadId, (runtime.protectedThreads.get(threadId) ?? 0) + 1);
2282
- scheduleRetainedThreadEviction(client, runtime);
2292
+ updateThreadOwnership(client, runtime);
2283
2293
  let protectedThread = true;
2284
2294
  return () => {
2285
2295
  if (!protectedThread) return;
@@ -2295,7 +2305,7 @@ function protectCodexAppServerLiveThread(client, threadId) {
2295
2305
  runtime.retainedThreads.set(threadId, retained);
2296
2306
  }
2297
2307
  } else runtime.protectedThreads.set(threadId, count - 1);
2298
- scheduleRetainedThreadEviction(client, runtime);
2308
+ updateThreadOwnership(client, runtime);
2299
2309
  evictExcessIdleThreads(client, runtime).catch((error) => {
2300
2310
  embeddedAgentLog$1.warn("codex retained thread unpin eviction failed", {
2301
2311
  threadId,
@@ -2558,7 +2568,7 @@ async function prepareCodexInferenceRoute(params) {
2558
2568
  }
2559
2569
  pending = Promise.all([
2560
2570
  import("./inference-proxy-DhcXOgUE.mjs"),
2561
- import("./native-subagent-monitor-B9aAqfnU.mjs").then((n) => n.n),
2571
+ import("./native-subagent-monitor-GOGINNw0.mjs").then((n) => n.n),
2562
2572
  import("./inference-dispatch-CMZtjQyz.mjs")
2563
2573
  ]).then(([{ createCodexInferenceProxy }, native, { createCodexInferenceModelBinding }]) => {
2564
2574
  assertClient();
@@ -3245,7 +3255,10 @@ function createSharedCodexAppServerClientStartup(params) {
3245
3255
  }).then((client) => {
3246
3256
  const state = getSharedCodexAppServerClientState();
3247
3257
  params.entry.client = client;
3258
+ params.entry.hasOwnedThreads = () => hasCodexAppServerThreadOwnership(client);
3248
3259
  client.addCloseHandler((closedClient) => {
3260
+ clearTimeout(params.entry.idleTimer);
3261
+ params.entry.idleTimer = void 0;
3249
3262
  const entry = getCurrentSharedClientEntry(closedClient);
3250
3263
  if (entry) state.clients.delete(entry.key);
3251
3264
  });
@@ -3349,7 +3362,7 @@ async function startInitializedCodexAppServerClientOnce(params) {
3349
3362
  } finally {
3350
3363
  artifactDrain?.cancel();
3351
3364
  }
3352
- const runtimeArtifactModule = params.runtimeArtifactMode ? await import("./runtime-artifact-D7lCXdhV.mjs") : void 0;
3365
+ const runtimeArtifactModule = params.runtimeArtifactMode ? await import("./runtime-artifact-Riq878B2.mjs") : void 0;
3353
3366
  const runtimeArtifactBeforeStart = runtimeArtifactModule ? await runtimeArtifactModule.captureCodexAppServerRuntimeArtifactBeforeStart({
3354
3367
  startOptions,
3355
3368
  spawnIdentity: resolveCodexAppServerSpawnIdentity(startOptions),
@@ -3420,7 +3433,7 @@ async function startInitializedCodexAppServerClientOnce(params) {
3420
3433
  ...params.authProfileStore ? { authProfileStore: params.authProfileStore } : {},
3421
3434
  config: params.config,
3422
3435
  onAuthRefreshFailure: () => retireSharedCodexAppServerClientIfCurrent(client)
3423
- });
3436
+ }, () => refreshSharedClientIdleRetirement(client));
3424
3437
  assertStartupCurrent();
3425
3438
  const authHandoff = await waitForStartup(() => applyCodexAppServerAuthProfile({
3426
3439
  client,
@@ -1,4 +1,4 @@
1
- import { n as defineCodexBuildState } from "./build-state--SrHyc6r.mjs";
1
+ import { n as defineCodexBuildState } from "./build-state-CmeL24P5.mjs";
2
2
  //#region extensions/codex/src/app-server/shared-client-lifecycle.ts
3
3
  /** Client ownership and synchronous retirement, independent of startup/auth execution. */
4
4
  const createCodexAppServerStartupLifetime = () => ({
@@ -50,6 +50,7 @@ function retireSharedCodexAppServerClientIfCurrent(client, opts) {
50
50
  const currentEntry = getCurrentSharedClientEntry(client);
51
51
  const entry = currentEntry ?? state.entriesByClient.get(client);
52
52
  if (!entry || entry.client !== client && !entry.closeError) return;
53
+ cancelSharedClientIdleRetirement(entry);
53
54
  if (currentEntry) {
54
55
  state.clients.delete(entry.key);
55
56
  entry.closeWhenIdle = true;
@@ -84,6 +85,7 @@ function closeRetiredSharedClientEntry(entry) {
84
85
  const client = entry.client;
85
86
  if (!client) return false;
86
87
  entry.client = void 0;
88
+ cancelSharedClientIdleRetirement(entry);
87
89
  client.close();
88
90
  return true;
89
91
  }
@@ -135,8 +137,27 @@ async function retainSharedCodexAppServerClientByInstanceId(clientId) {
135
137
  function notifyDesktopGenerationDrainChecks(state) {
136
138
  for (const check of state.desktopGenerationDrainChecks) check();
137
139
  }
140
+ const CODEX_APP_SERVER_CLIENT_IDLE_GRACE_MS = 3e4;
141
+ function cancelSharedClientIdleRetirement(entry) {
142
+ clearTimeout(entry.idleTimer);
143
+ entry.idleTimer = void 0;
144
+ }
145
+ function refreshSharedClientIdleRetirement(client) {
146
+ const entry = getCurrentSharedClientEntry(client);
147
+ if (entry) scheduleSharedClientIdleRetirement(entry);
148
+ }
149
+ function scheduleSharedClientIdleRetirement(entry) {
150
+ cancelSharedClientIdleRetirement(entry);
151
+ if (entry.activeLeases > 0 || entry.pendingAcquires > 0 || !entry.client || entry.hasOwnedThreads?.() || getCurrentSharedClientEntry(entry.client) !== entry) return;
152
+ entry.idleTimer = setTimeout(() => {
153
+ entry.idleTimer = void 0;
154
+ if (entry.activeLeases === 0 && entry.pendingAcquires === 0 && !entry.hasOwnedThreads?.()) retireSharedCodexAppServerClientIfCurrent(entry.client);
155
+ }, CODEX_APP_SERVER_CLIENT_IDLE_GRACE_MS);
156
+ entry.idleTimer.unref?.();
157
+ }
138
158
  function retainSharedClientEntry(entry, counter = "activeLeases") {
139
159
  let released = false;
160
+ cancelSharedClientIdleRetirement(entry);
140
161
  entry[counter] += 1;
141
162
  return () => {
142
163
  if (released) return;
@@ -147,7 +168,8 @@ function retainSharedClientEntry(entry, counter = "activeLeases") {
147
168
  function releaseSharedClientEntry(entry, counter) {
148
169
  entry[counter] -= 1;
149
170
  closeRetiredSharedClientEntryIfIdle(entry);
171
+ scheduleSharedClientIdleRetirement(entry);
150
172
  notifyDesktopGenerationDrainChecks(getSharedCodexAppServerClientState());
151
173
  }
152
174
  //#endregion
153
- export { notifyDesktopGenerationDrainChecks as a, retainSharedClientEntry as c, retireSharedCodexAppServerClientIfCurrent as d, retireSharedCodexAppServerClientsBeforeDesktopGeneration as f, hasActiveSharedCodexAppServerWork as i, retainSharedCodexAppServerClientByInstanceId as l, waitForUnclaimedSharedClientStartup as m, getCurrentSharedClientEntry as n, ownCodexStartup as o, waitForCodexAppServerClientExit as p, getSharedCodexAppServerClientState as r, releaseSharedClientEntry as s, createCodexAppServerStartupLifetime as t, retirePendingSharedClientEntryIfUnclaimed as u };
175
+ export { notifyDesktopGenerationDrainChecks as a, releaseSharedClientEntry as c, retirePendingSharedClientEntryIfUnclaimed as d, retireSharedCodexAppServerClientIfCurrent as f, waitForUnclaimedSharedClientStartup as h, hasActiveSharedCodexAppServerWork as i, retainSharedClientEntry as l, waitForCodexAppServerClientExit as m, getCurrentSharedClientEntry as n, ownCodexStartup as o, retireSharedCodexAppServerClientsBeforeDesktopGeneration as p, getSharedCodexAppServerClientState as r, refreshSharedClientIdleRetirement as s, createCodexAppServerStartupLifetime as t, retainSharedCodexAppServerClientByInstanceId as u };
@@ -1,23 +1,23 @@
1
+ import { A as handleDynamicToolCallWithTimeout, B as resolveCodexToolAbortTerminalReason, P as resolveDynamicToolCallTimeoutMs, S as assertCodexTurnStartResponse, i as isCodexAppServerApprovalRequest, k as createCodexElicitationResponse, s as isCodexAppServerIndeterminateRequestCancellationError, w as readCodexDynamicToolCallParams, y as assertCodexThreadForkResponse, z as toCodexDynamicToolProtocolResponse } from "./client-BdNoDUaQ.mjs";
1
2
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
2
- import { v as sessionBindingIdentity } from "./session-binding-record-Oe9L-CNY.mjs";
3
+ import { v as sessionBindingIdentity } from "./session-binding-record-CUKpUKVm.mjs";
3
4
  import { c as shouldAutoApproveCodexAppServerApprovals, l as withMcpElicitationsApprovalPolicy, m as readCodexRequirementsToml, n as hasCodexMcpToolApprovalOverrides } from "./config-security-CE-FcGw9.mjs";
4
5
  import { c as isCodexPairedNodeRemoteExecPlacementSandbox, d as readCodexPluginConfig, l as isCodexRemoteExecPlacementSandbox, u as isCodexSandboxExecServerEnabled } from "./config-parsing-b088LyhT.mjs";
5
6
  import { i as resolveCodexAppServerHomeScope, l as resolveCodexModelBackedReviewerPolicyContext } from "./config-options-CzyWLTJt.mjs";
6
7
  import { n as formatCodexUsageLimitErrorMessage } from "./rate-limits-B7-X2TgG.mjs";
7
- import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection } from "./binding-connection-DTtN1KrX.mjs";
8
- import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-DKhXquav.mjs";
9
- import { Z as readRecentCodexRateLimits, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease, rt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-tOOyadmg.mjs";
10
- import { A as handleDynamicToolCallWithTimeout, B as resolveCodexToolAbortTerminalReason, P as resolveDynamicToolCallTimeoutMs, S as assertCodexTurnStartResponse, i as isCodexAppServerApprovalRequest, k as createCodexElicitationResponse, s as isCodexAppServerIndeterminateRequestCancellationError, w as readCodexDynamicToolCallParams, y as assertCodexThreadForkResponse, z as toCodexDynamicToolProtocolResponse } from "./client-CyquSiJ2.mjs";
11
- import { f as terminateCodexBackgroundTerminals, p as unsubscribeCodexThreadBestEffort, s as interruptCodexTurnAndWaitBestEffort, u as retireUnsafeCodexTurnClientBestEffort } from "./attempt-client-cleanup-93r-CLTi.mjs";
12
- import { t as CodexEphemeralTurn } from "./ephemeral-turn-ksZ9NfsS.mjs";
13
- import { Ct as refreshCodexPluginAppApprovalPolicy, D as buildCodexNativeHookRelayConfig, M as resolveCodexNativeHookRelayEvents, N as resolveCodexNativeHookRelayTtlMs, O as buildCodexNativeHookRelayDisabledConfig, St as mergeCodexThreadConfigs, ft as resolveCodexDynamicToolsLoading, g as CODEX_NATIVE_PERSONALITY_NONE, p as resolveCodexWebSearchPlan, r as buildCodexRuntimeThreadConfig, y as resolveCodexAppServerThreadModelSelection } from "./thread-requests-DmkmrGIt.mjs";
14
- import { S as resolveCodexAppServerReasoningEffort, o as buildCodexUserInput, r as buildCodexTemporalAdditionalContext, x as readCodexSupportedReasoningEfforts } from "./thread-lifecycle-DcNw9n7E.mjs";
15
- import { o as resolveCodexSessionBinding } from "./session-binding-DGCYAfvD.mjs";
16
- import { a as refreshCodexThreadPolicy, i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError } from "./thread-policy-TTAb-1yF.mjs";
17
- import { t as resolveCodexNativeExecutionBlock } from "./sandbox-guard-DjCz2eOw.mjs";
18
- import { E as CodexNativeToolLifecycleProjector, a as emitDynamicToolStartedDiagnostic, b as createCodexNativePreToolUseFailureBuffer, c as buildDynamicTools, f as resolveCodexExternalSandboxPolicyForOpenClawSandbox, g as shouldRequireCodexSandboxExecServerEnvironment, h as shouldEnableCodexAppServerNativeToolSurface, i as emitDynamicToolErrorDiagnostic, m as resolveCodexSandboxEnvironmentSelection, o as emitDynamicToolTerminalDiagnostic, p as resolveCodexMessageToolProvider, r as routeCodexAppServerElicitationRequest, s as handleCodexAppServerApprovalRequest, t as createCodexDynamicToolBridge, v as ensureCodexSandboxExecServerEnvironment, y as releaseCodexSandboxExecServerEnvironment } from "./dynamic-tools-D3NAwGw3.mjs";
19
- import { a as resolveCodexAppServerForModelProvider, i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy, t as CODEX_SESSION_PERMISSION_EXEC_MODES } from "./session-permission-policy-Ci_fVX6y.mjs";
20
- import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-ByhBukaD.mjs";
8
+ import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection } from "./binding-connection-DRPlnIgg.mjs";
9
+ import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-DqmrqI23.mjs";
10
+ import { Z as readRecentCodexRateLimits, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease, rt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-B__jQti1.mjs";
11
+ import { f as terminateCodexBackgroundTerminals, p as unsubscribeCodexThreadBestEffort, s as interruptCodexTurnAndWaitBestEffort, u as retireUnsafeCodexTurnClientBestEffort } from "./attempt-client-cleanup-C9dwStbK.mjs";
12
+ import { t as CodexEphemeralTurn } from "./ephemeral-turn-CIcaAzR4.mjs";
13
+ import { Ct as refreshCodexPluginAppApprovalPolicy, D as buildCodexNativeHookRelayConfig, M as resolveCodexNativeHookRelayEvents, N as resolveCodexNativeHookRelayTtlMs, O as buildCodexNativeHookRelayDisabledConfig, St as mergeCodexThreadConfigs, ft as resolveCodexDynamicToolsLoading, g as CODEX_NATIVE_PERSONALITY_NONE, p as resolveCodexWebSearchPlan, r as buildCodexRuntimeThreadConfig, y as resolveCodexAppServerThreadModelSelection } from "./thread-requests-D-GTNAnZ.mjs";
14
+ import { S as resolveCodexAppServerReasoningEffort, o as buildCodexUserInput, r as buildCodexTemporalAdditionalContext, x as readCodexSupportedReasoningEfforts } from "./thread-lifecycle-Cw5Nsciw.mjs";
15
+ import { o as resolveCodexSessionBinding } from "./session-binding-Fn7Ekzuv.mjs";
16
+ import { a as refreshCodexThreadPolicy, i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError } from "./thread-policy-BHr4QsDO.mjs";
17
+ import { t as resolveCodexNativeExecutionBlock } from "./sandbox-guard-OIYEmTRF.mjs";
18
+ import { E as CodexNativeToolLifecycleProjector, a as emitDynamicToolStartedDiagnostic, b as createCodexNativePreToolUseFailureBuffer, c as buildDynamicTools, f as resolveCodexExternalSandboxPolicyForOpenClawSandbox, g as shouldRequireCodexSandboxExecServerEnvironment, h as shouldEnableCodexAppServerNativeToolSurface, i as emitDynamicToolErrorDiagnostic, m as resolveCodexSandboxEnvironmentSelection, o as emitDynamicToolTerminalDiagnostic, p as resolveCodexMessageToolProvider, r as routeCodexAppServerElicitationRequest, s as handleCodexAppServerApprovalRequest, t as createCodexDynamicToolBridge, v as ensureCodexSandboxExecServerEnvironment, y as releaseCodexSandboxExecServerEnvironment } from "./dynamic-tools-CAWsGyFZ.mjs";
19
+ import { a as resolveCodexAppServerForModelProvider, i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy, t as CODEX_SESSION_PERMISSION_EXEC_MODES } from "./session-permission-policy-7lM447LW.mjs";
20
+ import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-DcF-V_3D.mjs";
21
21
  import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
22
22
  import { randomUUID } from "node:crypto";
23
23
  import { isDeepStrictEqual } from "node:util";
@@ -1,8 +1,8 @@
1
- import { a as marketplaceRef, n as isOpenAiCuratedMarketplace, o as pluginReadParams, u as CODEX_PLUGINS_MARKETPLACE_NAME } from "./plugin-inventory-Cky2XJUw.mjs";
1
+ import { a as marketplaceRef, n as isOpenAiCuratedMarketplace, o as pluginReadParams, u as CODEX_PLUGINS_MARKETPLACE_NAME } from "./plugin-inventory-B4uqIw4J.mjs";
2
2
  import { a as defaultCodexAppInventoryCache, r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-BL9B5H0L.mjs";
3
- import { o as withCodexAppServerJsonClient } from "./request-DxKAfWyy.mjs";
4
- import "./config-DKhXquav.mjs";
5
- import { t as __exportAll } from "./session-binding-sidecars-jo6H8dFr.mjs";
3
+ import { o as withCodexAppServerJsonClient } from "./request-DZKa6YSy.mjs";
4
+ import "./config-DqmrqI23.mjs";
5
+ import { t as __exportAll } from "./session-binding-sidecars-BuEALwJY.mjs";
6
6
  import { asNonArrayRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import path from "node:path";
8
8
  import os from "node:os";
@@ -1,10 +1,11 @@
1
+ import { C as assertExactSupervisionModelSelection, D as readSupervisionResponseThreadId, O as resolveCodexThreadRolloutPath, d as isCodexAppServerRequestTimeoutError, l as isCodexAppServerOverloadError, p as resolveCodexAppServerClientInstanceId, r as getCodexAppServerClientInstanceId, v as assertCodexThreadAcceptsDirectInput, x as assertCodexThreadStartResponse, y as assertCodexThreadForkResponse } from "./client-BdNoDUaQ.mjs";
1
2
  import { i as isJsonObject, r as flattenCodexDynamicToolFunctions } from "./protocol-CANUwXJ3.mjs";
2
- import { a as matchesPendingSupervisionBranch, n as assertCodexBindingMayBeReplaced, v as sessionBindingIdentity } from "./session-binding-record-Oe9L-CNY.mjs";
3
+ import { a as matchesPendingSupervisionBranch, n as assertCodexBindingMayBeReplaced, v as sessionBindingIdentity } from "./session-binding-record-CUKpUKVm.mjs";
3
4
  import { u as stringifyCodexPolicy } from "./config-security-CE-FcGw9.mjs";
4
5
  import { n as resolveCodexAppServerLocalHomeDir, t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
5
6
  import { d as readCodexEffectiveConfig, n as codexSandboxPolicyForTurn, s as assertCodexModelBackedReviewerEffectiveConfig, u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-CzyWLTJt.mjs";
6
7
  import { i as markStartedCodexManagedThread } from "./managed-thread-store-BMqgThVL.mjs";
7
- import { l as retainSharedCodexAppServerClientByInstanceId, n as getCurrentSharedClientEntry } from "./shared-client-lifecycle-CJ0lYVCW.mjs";
8
+ import { n as getCurrentSharedClientEntry, u as retainSharedCodexAppServerClientByInstanceId } from "./shared-client-lifecycle-wN_lOZkB.mjs";
8
9
  import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-Dp24d7-F.mjs";
9
10
  import { t as isIncognitoSessionKey } from "./incognito-session-C5ve_-63.mjs";
10
11
  import { n as CodexAppServerRpcError, r as isCodexThreadReadMissingError } from "./rpc-error-BlD2vuzn.mjs";
@@ -13,20 +14,19 @@ import { r as withAbortableTimeout } from "./timeout-CXOfNoaX.mjs";
13
14
  import { t as projectBoundedCodexThreadHistory } from "./transcript-history-projection-DRSifI-1.mjs";
14
15
  import { t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-BL9B5H0L.mjs";
15
16
  import { n as readCodexSessionMeta } from "./session-catalog-provenance-DoAvktcj.mjs";
16
- import { t as assertCodexSessionRuntimeOwnership } from "./binding-connection-DTtN1KrX.mjs";
17
- import "./config-DKhXquav.mjs";
17
+ import { t as assertCodexSessionRuntimeOwnership } from "./binding-connection-DRPlnIgg.mjs";
18
+ import "./config-DqmrqI23.mjs";
18
19
  import { i as sanitizeInlineImageDataUrl, r as invalidInlineImageText } from "./session-history-read-Ov3StuL4.mjs";
19
20
  import { c as resolveCodexContextEngineProjectionMaxChars, o as neutralizeCodexExplicitMentionSigils } from "./context-engine-projection-PezSESth.mjs";
20
21
  import { n as normalizeCodexAppServerBindingModelProvider } from "./auth-profile-B0okYl2D.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, et as wasCodexAppServerThreadClosed, j as getCodexInferenceThread, k as assertCodexInferenceRouteConfig, n as captureCodexAppServerClientLifetime, w as CodexThreadClientReplacementError, z as hasCodexAppServerSiblingThreadWork } from "./shared-client-tOOyadmg.mjs";
22
- import { C as assertExactSupervisionModelSelection, D as readSupervisionResponseThreadId, O as resolveCodexThreadRolloutPath, d as isCodexAppServerRequestTimeoutError, l as isCodexAppServerOverloadError, p as resolveCodexAppServerClientInstanceId, r as getCodexAppServerClientInstanceId, v as assertCodexThreadAcceptsDirectInput, x as assertCodexThreadStartResponse, y as assertCodexThreadForkResponse } from "./client-CyquSiJ2.mjs";
23
- import { c as isCodexAppServerUnsafeSubscriptionError, g as hasCodexAppServerSiblingRouteWork, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, p as unsubscribeCodexThreadBestEffort, r as CodexAppServerUnsafeSubscriptionError, u as retireUnsafeCodexTurnClientBestEffort } from "./attempt-client-cleanup-93r-CLTi.mjs";
24
- import { $ as readActiveCodexTurnIdsFromResume, B as loadCodexNativeToolCatalog, C as mergeCodexNativeProjectDocThreadConfig, E as assertCodexNativeHookRelayAllowed, F as attestCodexThreadToolSurface, G as areUserMcpServersFingerprintsCompatible, H as applyCodexNativeSkillIsolation, I as checkCodexThreadAppAvailability, J as fingerprintCodexThreadConfig, K as codexDynamicToolsFingerprint, L as discardUnattestedCodexPluginThread, Q as legacyFingerprintUserMcpServersConfigPatch, R as attestCodexRestrictedToolSurfaceMcpServersDisabled, St as mergeCodexThreadConfigs, T as CodexManagedHooksOnlyError, Tt as buildCodexAppApprovalOverrides, U as resolveCodexNativeSkillIsolation, W as areCodexDynamicToolFingerprintsCompatible, X as fingerprintJsonObject, Y as fingerprintEnvironmentSelection, Z as fingerprintUserMcpServersConfigPatch, _ as resolveCodexAppServerModelProvider, at as shouldRotateCodexGpt56MultiAgentBinding, bt as disableUnlistedCodexApps, c as codexThreadSandboxOrPermissions, d as resolveCodexThreadApprovalsReviewer, et as shouldStartTransientNoToolThread, g as CODEX_NATIVE_PERSONALITY_NONE, h as buildDeveloperInstructions, i as buildCodexRuntimeThreadConfigForRun, it as shouldRotateCodexAppServerBindingForRuntime, l as readCodexInheritedMcpServerNames, lt as isMessageOnlyCodexSourceReply, m as mergeCodexNativeShellEnvironment, mt as buildCodexPluginAppsConfigPatchFromPolicyContext, n as buildCodexRingZeroThreadConfigPatch, nt as isTransientWebSearchRestriction, o as buildThreadResumeParams, p as resolveCodexWebSearchPlan, q as codexLegacyDynamicToolsFingerprint, rt as shouldRecheckRecoverablePluginBinding, s as buildThreadStartParams, t as assertCodexManagedRequirementsDoNotOverrideToolPolicy, u as readCodexManagedRequirementsFingerprint, ut as isSystemAgentOnlyCodexDynamicToolAllowlist, v as resolveCodexAppServerRequestModelSelection, x as joinPresentSections, xt as isCodexPluginThreadBindingStale, y as resolveCodexAppServerThreadModelSelection, yt as buildPluginAppPolicyContext, z as hasCodexNativeToolCatalog } from "./thread-requests-DmkmrGIt.mjs";
25
- import { o as resolveCodexSessionBinding, r as hashCodexAppServerBindingFingerprint } from "./session-binding-DGCYAfvD.mjs";
26
- import { a as refreshCodexThreadPolicy, i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadSkillsCatalog, r as assertAdoptedCodexThreadResumeAllowed, t as CodexIncognitoPolicyChangeError } from "./thread-policy-TTAb-1yF.mjs";
27
- import { t as resumeCodexAppServerThread } from "./thread-resume-eo3IhOhh.mjs";
28
- import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-DDban_4i.mjs";
29
- import "./transcript-mirror-kxmCYsuF.mjs";
22
+ 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, et as wasCodexAppServerThreadClosed, j as getCodexInferenceThread, k as assertCodexInferenceRouteConfig, n as captureCodexAppServerClientLifetime, w as CodexThreadClientReplacementError, z as hasCodexAppServerSiblingThreadWork } from "./shared-client-B__jQti1.mjs";
23
+ import { c as isCodexAppServerUnsafeSubscriptionError, g as hasCodexAppServerSiblingRouteWork, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, p as unsubscribeCodexThreadBestEffort, r as CodexAppServerUnsafeSubscriptionError, u as retireUnsafeCodexTurnClientBestEffort } from "./attempt-client-cleanup-C9dwStbK.mjs";
24
+ import { $ as readActiveCodexTurnIdsFromResume, B as loadCodexNativeToolCatalog, C as mergeCodexNativeProjectDocThreadConfig, E as assertCodexNativeHookRelayAllowed, F as attestCodexThreadToolSurface, G as areUserMcpServersFingerprintsCompatible, H as applyCodexNativeSkillIsolation, I as checkCodexThreadAppAvailability, J as fingerprintCodexThreadConfig, K as codexDynamicToolsFingerprint, L as discardUnattestedCodexPluginThread, Q as legacyFingerprintUserMcpServersConfigPatch, R as attestCodexRestrictedToolSurfaceMcpServersDisabled, St as mergeCodexThreadConfigs, T as CodexManagedHooksOnlyError, Tt as buildCodexAppApprovalOverrides, U as resolveCodexNativeSkillIsolation, W as areCodexDynamicToolFingerprintsCompatible, X as fingerprintJsonObject, Y as fingerprintEnvironmentSelection, Z as fingerprintUserMcpServersConfigPatch, _ as resolveCodexAppServerModelProvider, at as shouldRotateCodexGpt56MultiAgentBinding, bt as disableUnlistedCodexApps, c as codexThreadSandboxOrPermissions, d as resolveCodexThreadApprovalsReviewer, et as shouldStartTransientNoToolThread, g as CODEX_NATIVE_PERSONALITY_NONE, h as buildDeveloperInstructions, i as buildCodexRuntimeThreadConfigForRun, it as shouldRotateCodexAppServerBindingForRuntime, l as readCodexInheritedMcpServerNames, lt as isMessageOnlyCodexSourceReply, m as mergeCodexNativeShellEnvironment, mt as buildCodexPluginAppsConfigPatchFromPolicyContext, n as buildCodexRingZeroThreadConfigPatch, nt as isTransientWebSearchRestriction, o as buildThreadResumeParams, p as resolveCodexWebSearchPlan, q as codexLegacyDynamicToolsFingerprint, rt as shouldRecheckRecoverablePluginBinding, s as buildThreadStartParams, t as assertCodexManagedRequirementsDoNotOverrideToolPolicy, u as readCodexManagedRequirementsFingerprint, ut as isSystemAgentOnlyCodexDynamicToolAllowlist, v as resolveCodexAppServerRequestModelSelection, x as joinPresentSections, xt as isCodexPluginThreadBindingStale, y as resolveCodexAppServerThreadModelSelection, yt as buildPluginAppPolicyContext, z as hasCodexNativeToolCatalog } from "./thread-requests-D-GTNAnZ.mjs";
25
+ import { o as resolveCodexSessionBinding, r as hashCodexAppServerBindingFingerprint } from "./session-binding-Fn7Ekzuv.mjs";
26
+ import { a as refreshCodexThreadPolicy, i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadSkillsCatalog, r as assertAdoptedCodexThreadResumeAllowed, t as CodexIncognitoPolicyChangeError } from "./thread-policy-BHr4QsDO.mjs";
27
+ import { t as resumeCodexAppServerThread } from "./thread-resume-BNdEFZpM.mjs";
28
+ import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-Cxb01Uwq.mjs";
29
+ import "./transcript-mirror-BRNhyb1o.mjs";
30
30
  import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
31
31
  import crypto from "node:crypto";
32
32
  import { isDeepStrictEqual } from "node:util";
@@ -1,8 +1,8 @@
1
- import { l as retainSharedCodexAppServerClientByInstanceId } from "./shared-client-lifecycle-CJ0lYVCW.mjs";
1
+ import { u as retainSharedCodexAppServerClientByInstanceId } from "./shared-client-lifecycle-wN_lOZkB.mjs";
2
2
  import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-Dp24d7-F.mjs";
3
- import { K as releaseCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed, q as retainCodexAppServerLiveThread } from "./shared-client-tOOyadmg.mjs";
4
- import { o as closeCodexStartupClientBestEffort, p as unsubscribeCodexThreadBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-93r-CLTi.mjs";
5
- import { t as __exportAll } from "./session-binding-sidecars-jo6H8dFr.mjs";
3
+ import { K as releaseCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed, q as retainCodexAppServerLiveThread } from "./shared-client-B__jQti1.mjs";
4
+ import { o as closeCodexStartupClientBestEffort, p as unsubscribeCodexThreadBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-C9dwStbK.mjs";
5
+ import { t as __exportAll } from "./session-binding-sidecars-BuEALwJY.mjs";
6
6
  import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
7
7
  import { runWithAsyncWorkResources } from "openclaw/plugin-sdk/agent-harness-tool-runtime";
8
8
  //#region extensions/codex/src/app-server/thread-ownership.ts
@@ -1,6 +1,6 @@
1
- import { r as requestCodexAppServerClientJson, t as CodexAppServerScopedRequestRejectedError } from "./request-DxKAfWyy.mjs";
2
- import { S as CodexAdoptedThreadActiveError } from "./shared-client-tOOyadmg.mjs";
3
- import { l as isCodexAppServerOverloadError, u as isCodexAppServerPrewriteRequestCancellationError, v as assertCodexThreadAcceptsDirectInput } from "./client-CyquSiJ2.mjs";
1
+ import { l as isCodexAppServerOverloadError, u as isCodexAppServerPrewriteRequestCancellationError, v as assertCodexThreadAcceptsDirectInput } from "./client-BdNoDUaQ.mjs";
2
+ import { r as requestCodexAppServerClientJson, t as CodexAppServerScopedRequestRejectedError } from "./request-DZKa6YSy.mjs";
3
+ import { S as CodexAdoptedThreadActiveError } from "./shared-client-B__jQti1.mjs";
4
4
  import { AgentHarnessPreflightError, embeddedAgentLog, formatErrorMessage } from "openclaw/plugin-sdk/agent-harness-runtime";
5
5
  //#region extensions/codex/src/app-server/thread-policy.ts
6
6
  /** A refusal, not a failed native write: the ephemeral conversation must stay alive. */
@@ -1,4 +1,5 @@
1
- import { l as toCodexPluginOwnedAccountApp, s as readCodexPluginInventory } from "./plugin-inventory-Cky2XJUw.mjs";
1
+ import { l as toCodexPluginOwnedAccountApp, s as readCodexPluginInventory } from "./plugin-inventory-B4uqIw4J.mjs";
2
+ import { B as resolveCodexToolAbortTerminalReason } from "./client-BdNoDUaQ.mjs";
2
3
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
3
4
  import { u as stringifyCodexPolicy } from "./config-security-CE-FcGw9.mjs";
4
5
  import { f as resolveCodexPluginsPolicy } from "./config-parsing-b088LyhT.mjs";
@@ -6,15 +7,14 @@ import { n as resolveCodexAppServerLocalHomeDir } from "./auth-start-options-BPI
6
7
  import { d as readCodexEffectiveConfig, u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-CzyWLTJt.mjs";
7
8
  import { t as isIncognitoSessionKey } from "./incognito-session-C5ve_-63.mjs";
8
9
  import { a as defaultCodexAppInventoryCache, i as CodexAppInventoryCache, o as serializeCodexAppInventoryError, s as codexAppIdentityKey, t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-BL9B5H0L.mjs";
9
- import "./config-DKhXquav.mjs";
10
+ import "./config-DqmrqI23.mjs";
10
11
  import { t as isCodexAppServerNativeAuthProfile } from "./auth-profile-B0okYl2D.mjs";
11
- import { D as nativeHookRelayUnregisterQueue, G as readCodexClientSessionMeta } from "./shared-client-tOOyadmg.mjs";
12
+ import { D as nativeHookRelayUnregisterQueue, G as readCodexClientSessionMeta } from "./shared-client-B__jQti1.mjs";
12
13
  import { a as isCodexResponsesOAuthRun, i as isCodexResponsesOAuthCredential, t as CODEX_RESPONSES_OAUTH_PROVIDER } from "./responses-oauth-twnuTaAa.mjs";
13
- import { B as resolveCodexToolAbortTerminalReason } from "./client-CyquSiJ2.mjs";
14
- import { n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, p as unsubscribeCodexThreadBestEffort } from "./attempt-client-cleanup-93r-CLTi.mjs";
15
- import { t as ensureCodexPluginActivation } from "./plugin-activation-cNHRfaxU.mjs";
16
- import { r as hashCodexAppServerBindingFingerprint } from "./session-binding-DGCYAfvD.mjs";
17
- import { t as codexNativeSubagentMonitorRuntime } from "./native-subagent-monitor-B9aAqfnU.mjs";
14
+ import { n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, p as unsubscribeCodexThreadBestEffort } from "./attempt-client-cleanup-C9dwStbK.mjs";
15
+ import { t as ensureCodexPluginActivation } from "./plugin-activation-BaDnJKJd.mjs";
16
+ import { r as hashCodexAppServerBindingFingerprint } from "./session-binding-Fn7Ekzuv.mjs";
17
+ import { t as codexNativeSubagentMonitorRuntime } from "./native-subagent-monitor-GOGINNw0.mjs";
18
18
  import { normalizeOptionalString, normalizeUniqueStringEntries, normalizeUniqueTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
19
19
  import * as crypto$1 from "node:crypto";
20
20
  import crypto, { createHash } from "node:crypto";
@@ -1,9 +1,9 @@
1
+ import { b as assertCodexThreadResumeResponse, l as isCodexAppServerOverloadError, u as isCodexAppServerPrewriteRequestCancellationError } from "./client-BdNoDUaQ.mjs";
1
2
  import { n as CodexAppServerRpcError } from "./rpc-error-BlD2vuzn.mjs";
2
- import { r as publishCodexCatalogResume } from "./session-catalog-events-D9zC7gRb.mjs";
3
- import { t as CodexAppServerScopedRequestRejectedError } from "./request-DxKAfWyy.mjs";
4
- import { L as forgetCodexWorkspaceReferences, mt as isCodexAppServerStartupError, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-tOOyadmg.mjs";
5
- import { b as assertCodexThreadResumeResponse, l as isCodexAppServerOverloadError, u as isCodexAppServerPrewriteRequestCancellationError } from "./client-CyquSiJ2.mjs";
6
- import { i as assertCodexThreadResumeSubscription, p as unsubscribeCodexThreadBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-93r-CLTi.mjs";
3
+ import { r as publishCodexCatalogResume } from "./session-catalog-events-DHPtqvWu.mjs";
4
+ import { t as CodexAppServerScopedRequestRejectedError } from "./request-DZKa6YSy.mjs";
5
+ import { L as forgetCodexWorkspaceReferences, mt as isCodexAppServerStartupError, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-B__jQti1.mjs";
6
+ import { i as assertCodexThreadResumeSubscription, p as unsubscribeCodexThreadBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-C9dwStbK.mjs";
7
7
  import { sanitizeTerminalText } from "openclaw/plugin-sdk/text-chunking";
8
8
  //#region extensions/codex/src/app-server/thread-resume.ts
9
9
  /** Owns Codex thread/resume subscription safety. */
@@ -2,7 +2,7 @@ import { t as readCodexAsyncQuestions } from "./async-questions-DdhOCwGi.mjs";
2
2
  import { i as readUpstreamUserText, n as attachUpstreamUserText, r as readMirrorIdentity, t as attachCodexMirrorIdentity } from "./upstream-prompt-provenance-fXkKbPVC.mjs";
3
3
  import { t as projectBoundedCodexThreadHistory } from "./transcript-history-projection-DRSifI-1.mjs";
4
4
  import { a as fingerprintCodexMirrorSourceMessage, c as readCodexMirrorSourceFingerprint, i as buildCodexMirrorDedupeIdentity, n as attachCodexMirrorAttestation, r as attachCodexMirrorRunId, s as isMirroredAgentMessage, t as applyCodexTranscriptTaint } from "./transcript-mirror-attestation-YSegaktH.mjs";
5
- import { t as __exportAll } from "./session-binding-sidecars-jo6H8dFr.mjs";
5
+ import { t as __exportAll } from "./session-binding-sidecars-BuEALwJY.mjs";
6
6
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { deliverAgentHarnessUserInputPrompt, embeddedAgentLog, formatErrorMessage, projectAgentHarnessTranscriptMessageForDisplay, restorePreparedUserTurnOperationalMetaForRuntime, runAgentHarnessBeforeMessageWriteHook } from "openclaw/plugin-sdk/agent-harness-runtime";
8
8
  import { withCodexSessionTranscriptMirrorWriteLock } from "openclaw/plugin-sdk/codex-session-transcript-runtime";
@@ -1,5 +1,5 @@
1
1
  import { r as normalizeCodexAppServerArgs } from "./launch-args-DbFCehO7.mjs";
2
- import { i as resolveManagedCodexNativeCommand } from "./managed-binary-B6hQ1UKR.mjs";
2
+ import { i as resolveManagedCodexNativeCommand } from "./managed-binary-Ckgvm_4V.mjs";
3
3
  import { i as recordCodexAppServerSpawnFailure, r as getCodexAppServerSpawnFailure } from "./spawn-error-CL3n6MAa.mjs";
4
4
  import { createHash, randomUUID } from "node:crypto";
5
5
  import { stripVTControlCharacters } from "node:util";
@@ -1,5 +1,5 @@
1
1
  import { r as resolveCodexAppServerUserHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
2
- import "./config-DKhXquav.mjs";
2
+ import "./config-DqmrqI23.mjs";
3
3
  import path from "node:path";
4
4
  import { EventEmitter } from "node:events";
5
5
  import net from "node:net";
@@ -1,5 +1,6 @@
1
+ import { l as isCodexAppServerOverloadError, u as isCodexAppServerPrewriteRequestCancellationError, v as assertCodexThreadAcceptsDirectInput, y as assertCodexThreadForkResponse } from "./client-BdNoDUaQ.mjs";
1
2
  import { i as isJsonObject, r as flattenCodexDynamicToolFunctions } from "./protocol-CANUwXJ3.mjs";
2
- import { v as sessionBindingIdentity } from "./session-binding-record-Oe9L-CNY.mjs";
3
+ import { v as sessionBindingIdentity } from "./session-binding-record-CUKpUKVm.mjs";
3
4
  import { d as readCodexPluginConfig } from "./config-parsing-b088LyhT.mjs";
4
5
  import { s as assertCodexModelBackedReviewerEffectiveConfig } from "./config-options-CzyWLTJt.mjs";
5
6
  import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-Dp24d7-F.mjs";
@@ -8,21 +9,20 @@ import { r as projectCodexUserItemText } from "./transcript-history-projection-D
8
9
  import { n as codexUpstreamBaseline, t as codexLastTerminalTurnId } from "./session-upstream-marker-D15C9NHp.mjs";
9
10
  import { r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-BL9B5H0L.mjs";
10
11
  import { n as readCodexSessionMeta } from "./session-catalog-provenance-DoAvktcj.mjs";
11
- import { t as CodexAppServerScopedRequestRejectedError } from "./request-DxKAfWyy.mjs";
12
- import { r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-DKhXquav.mjs";
13
- import { r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-C0NbLms1.mjs";
12
+ import { t as CodexAppServerScopedRequestRejectedError } from "./request-DZKa6YSy.mjs";
13
+ import { r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-DqmrqI23.mjs";
14
+ import { r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-DDhvIeUC.mjs";
14
15
  import { a as fingerprintCodexMirrorSourceMessage, c as readCodexMirrorSourceFingerprint } from "./transcript-mirror-attestation-YSegaktH.mjs";
15
- import { P as claimCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, f as readCodexAppServerClientDesktopGenerationFingerprint } from "./shared-client-tOOyadmg.mjs";
16
- import { l as isCodexAppServerOverloadError, u as isCodexAppServerPrewriteRequestCancellationError, v as assertCodexThreadAcceptsDirectInput, y as assertCodexThreadForkResponse } from "./client-CyquSiJ2.mjs";
17
- import { D as buildCodexNativeHookRelayConfig, E as assertCodexNativeHookRelayAllowed, H as applyCodexNativeSkillIsolation, I as checkCodexThreadAppAvailability, K as codexDynamicToolsFingerprint, M as resolveCodexNativeHookRelayEvents, St as mergeCodexThreadConfigs, U as resolveCodexNativeSkillIsolation, V as parseCodexNativeToolCatalog, X as fingerprintJsonObject, Z as fingerprintUserMcpServersConfigPatch, a as buildCodexThreadConfiguration, h as buildDeveloperInstructions, ht as buildCodexPluginThreadConfig, k as buildCodexNativeHookRelayId, p as resolveCodexWebSearchPlan, wt as shouldBuildCodexPluginThreadConfig } from "./thread-requests-DmkmrGIt.mjs";
18
- import "./session-binding-DGCYAfvD.mjs";
19
- import { a as refreshCodexThreadPolicy, n as CodexThreadPolicyHandoffError } from "./thread-policy-TTAb-1yF.mjs";
20
- import "./thread-ownership-DDban_4i.mjs";
16
+ import { P as claimCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, f as readCodexAppServerClientDesktopGenerationFingerprint } from "./shared-client-B__jQti1.mjs";
17
+ import { D as buildCodexNativeHookRelayConfig, E as assertCodexNativeHookRelayAllowed, H as applyCodexNativeSkillIsolation, I as checkCodexThreadAppAvailability, K as codexDynamicToolsFingerprint, M as resolveCodexNativeHookRelayEvents, St as mergeCodexThreadConfigs, U as resolveCodexNativeSkillIsolation, V as parseCodexNativeToolCatalog, X as fingerprintJsonObject, Z as fingerprintUserMcpServersConfigPatch, a as buildCodexThreadConfiguration, h as buildDeveloperInstructions, ht as buildCodexPluginThreadConfig, k as buildCodexNativeHookRelayId, p as resolveCodexWebSearchPlan, wt as shouldBuildCodexPluginThreadConfig } from "./thread-requests-D-GTNAnZ.mjs";
18
+ import "./session-binding-Fn7Ekzuv.mjs";
19
+ import { a as refreshCodexThreadPolicy, n as CodexThreadPolicyHandoffError } from "./thread-policy-BHr4QsDO.mjs";
20
+ import "./thread-ownership-Cxb01Uwq.mjs";
21
21
  import { n as resolveCodexNativeExecutionPolicy } from "./native-execution-policy-BxZJy5mP.mjs";
22
- import { l as prepareCodexWorkspaceDeveloperInstructions } from "./attempt-workspace-context-ejEuxrY1.mjs";
23
- import { d as isCodexDynamicToolExcluded, n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-ByhBukaD.mjs";
24
- import { n as prepareCodexSessionInitialization } from "./session-initialization-6aveB9qb.mjs";
25
- import { createImportedCodexSession } from "./session-history-import-WhX-X33a.mjs";
22
+ import { l as prepareCodexWorkspaceDeveloperInstructions } from "./attempt-workspace-context-DJrvhJDC.mjs";
23
+ import { d as isCodexDynamicToolExcluded, n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-DcF-V_3D.mjs";
24
+ import { n as prepareCodexSessionInitialization } from "./session-initialization-DefAI1_5.mjs";
25
+ import { createImportedCodexSession } from "./session-history-import-tquj9DCz.mjs";
26
26
  import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
27
27
  import { randomUUID } from "node:crypto";
28
28
  import { isDeepStrictEqual } from "node:util";
@@ -1,7 +1,7 @@
1
1
  import { t as buildCodexAppServerUsageSnapshot } from "./rate-limits-B7-X2TgG.mjs";
2
- import { n as readCodexAppServerUsage } from "./request-DxKAfWyy.mjs";
3
- import "./config-DKhXquav.mjs";
4
- import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-C0NbLms1.mjs";
2
+ import { n as readCodexAppServerUsage } from "./request-DZKa6YSy.mjs";
3
+ import "./config-DqmrqI23.mjs";
4
+ import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DDhvIeUC.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. */