@openclaw/codex 2026.10.2 → 2026.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/.setup/{account-usage-runtime-DPXsyONK.mjs → account-usage-runtime-BsPb0Y3w.mjs} +1 -1
  2. package/dist/.setup/{apply-CQ3brq3z.mjs → apply-CMLZMIVH.mjs} +4 -4
  3. package/dist/.setup/{attempt-client-cleanup-DPUGAWP2.mjs → attempt-client-cleanup-hUrW3fmJ.mjs} +4 -4
  4. package/dist/.setup/{attempt-workspace-context-GllQy8mw.mjs → attempt-workspace-context-BRvpkEo_.mjs} +1 -1
  5. package/dist/.setup/{auth-cache-key-BE1HXsNo.mjs → auth-cache-key-CeVZHm9H.mjs} +1 -1
  6. package/dist/.setup/{bounded-turn-9YflG60n.mjs → bounded-turn-DVI5FRqE.mjs} +9 -9
  7. package/dist/.setup/{build-state-LS-A65iX.mjs → build-state-DP9Coy_6.mjs} +1 -1
  8. package/dist/.setup/{client-ChJtGEdJ.mjs → client-DIC12QQ_.mjs} +2 -2
  9. package/dist/.setup/{client-catalog-response-BprQziLV.mjs → client-catalog-response-Bhc23x3Q.mjs} +1 -1
  10. package/dist/.setup/{command-dispatch-BoC9hvFs.mjs → command-dispatch-Dc95dWpV.mjs} +1 -1
  11. package/dist/.setup/{command-handlers-BVX2quUD.mjs → command-handlers-K365hYqd.mjs} +11 -11
  12. package/dist/.setup/{command-rpc-M4gYsRiV.mjs → command-rpc-C207n84A.mjs} +6 -6
  13. package/dist/.setup/{compact-D3JNLG_b.mjs → compact-DNLigO9M.mjs} +9 -9
  14. package/dist/.setup/{computer-use-CF0jsDi1.mjs → computer-use-rt0M8Bom.mjs} +4 -4
  15. package/dist/.setup/{conversation-binding-7kceEUf0.mjs → conversation-binding-BQ5GWV_6.mjs} +10 -10
  16. package/dist/.setup/{conversation-control-BpJpPo0t.mjs → conversation-control-DMDuo_D6.mjs} +2 -2
  17. package/dist/.setup/{dynamic-tool-build-BCi00feJ.mjs → dynamic-tool-build-CdUp03dV.mjs} +2 -2
  18. package/dist/.setup/{dynamic-tools-DUv6Sr6h.mjs → dynamic-tools-3hNi6oog.mjs} +6 -6
  19. package/dist/.setup/{effective-mcp-catalog-CIdbHp1t.mjs → effective-mcp-catalog-DHEOnIwA.mjs} +4 -4
  20. package/dist/.setup/{ephemeral-turn-U4th15a6.mjs → ephemeral-turn-BVauXzx9.mjs} +2 -2
  21. package/dist/.setup/{event-projector-assistant-message-BwG5TUYW.mjs → event-projector-assistant-message-CRadIRA4.mjs} +1 -1
  22. package/dist/.setup/{isolated-completion-C6QKyyDS.mjs → isolated-completion-Dab4vUwO.mjs} +4 -4
  23. package/dist/.setup/{mcp-app-session-preparation-JFCtSkRp.mjs → mcp-app-session-preparation-8CGBwfHK.mjs} +5 -5
  24. package/dist/.setup/{model-catalog-DD-evckc.mjs → model-catalog-CQXEzyxr.mjs} +5 -5
  25. package/dist/.setup/{models-DaW-7tld.mjs → models-CR97NoEB.mjs} +3 -3
  26. package/dist/.setup/{native-mcp-app-ChpyWmL-.mjs → native-mcp-app-D4VcVFK7.mjs} +4 -4
  27. package/dist/.setup/{native-subagent-monitor-wh_-K3Vo.mjs → native-subagent-monitor-CkpiZfm0.mjs} +6 -6
  28. package/dist/.setup/{plan-CUHSuL6_.mjs → plan-LJsaUrXA.mjs} +2 -2
  29. package/dist/.setup/{plugin-approval-roundtrip-bPQbG8BI.mjs → plugin-approval-roundtrip-D7LyYiO6.mjs} +1 -1
  30. package/dist/.setup/{plugin-thread-config-deadline-C5i1S6RN.mjs → plugin-thread-config-deadline-DZw8qiVC.mjs} +3 -3
  31. package/dist/.setup/{provider-Ct6-1lsF.mjs → provider-CGCiFHsg.mjs} +4 -4
  32. package/dist/.setup/{provider-capabilities-DhkeeHJd.mjs → provider-capabilities-NZytgEzO.mjs} +1 -1
  33. package/dist/.setup/{request-CZkKkN6c.mjs → request-Ddy7nOme.mjs} +1 -1
  34. package/dist/.setup/{run-attempt-C6-678kR.mjs → run-attempt-BqC2g0aO.mjs} +23 -23
  35. package/dist/.setup/{session-catalog-events-Cj-b2FpC.mjs → session-catalog-events-Ce-JJuIv.mjs} +2 -2
  36. package/dist/.setup/{session-catalog-index-BnvC43eZ.mjs → session-catalog-index-BnHv8CX_.mjs} +3 -3
  37. package/dist/.setup/{session-catalog-native-projection-DCtsWKSF.mjs → session-catalog-native-projection-Cpc9sZnx.mjs} +1 -1
  38. package/dist/.setup/{session-catalog-projection-Cn0bLb-d.mjs → session-catalog-projection-D7YtgdS_.mjs} +1 -1
  39. package/dist/.setup/{session-retirement-Bo81t4Fb.mjs → session-retirement-D8akYv0Q.mjs} +5 -5
  40. package/dist/.setup/{settled-turn-finalizer-CFARFqNd.mjs → settled-turn-finalizer-CEyM5wo_.mjs} +5 -5
  41. package/dist/.setup/{shared-client-5NUq43f3.mjs → shared-client-D2ivOIey.mjs} +11 -6
  42. package/dist/.setup/{shell-dynamic-tools-Bmedt1QE.mjs → shell-dynamic-tools-CkHxyESN.mjs} +1 -1
  43. package/dist/.setup/{side-question-oTlegAz3.mjs → side-question-DiQ2HCos.mjs} +10 -10
  44. package/dist/.setup/{source-1cabQi3x.mjs → source-3uDpVdu3.mjs} +1 -1
  45. package/dist/.setup/{thread-lifecycle--EPPTNTe.mjs → thread-lifecycle-BSVWNPZt.mjs} +69 -45
  46. package/dist/.setup/{thread-ownership-T7T_iffm.mjs → thread-ownership-GlDZf8J7.mjs} +3 -3
  47. package/dist/.setup/{thread-policy-VtqLex1l.mjs → thread-policy-Brc0nbdS.mjs} +3 -3
  48. package/dist/.setup/{thread-requests-Bj_Lixmv.mjs → thread-requests-CKEQxo_5.mjs} +4 -4
  49. package/dist/.setup/{thread-resume-buZujRcC.mjs → thread-resume-BfkvLUZY.mjs} +4 -4
  50. package/dist/.setup/{turn-router-BOKSJmfw.mjs → turn-router-CaGl9iS1.mjs} +1 -1
  51. package/dist/.setup/{upstream-session-fork-C4sbIoZb.mjs → upstream-session-fork-BdvuVrvg.mjs} +9 -9
  52. package/dist/.setup/{usage-Cq21xTMZ.mjs → usage-Drw_79Hn.mjs} +1 -1
  53. package/dist/.setup/{usage-limit-error-CGJUoQu8.mjs → usage-limit-error-B26Xp5eo.mjs} +1 -1
  54. package/dist/.setup/{web-search-provider.runtime-DrVE7-Br.mjs → web-search-provider.runtime-94j6OiyW.mjs} +3 -3
  55. package/dist/catalog-page.worker.js +1 -1
  56. package/dist/harness.js +15 -15
  57. package/dist/index.js +24 -24
  58. package/dist/media-understanding-provider.js +2 -2
  59. package/dist/migration-provider-api.js +1 -1
  60. package/package.json +4 -4
@@ -11,7 +11,7 @@ function buildCodexMigrationProvider(params = {}) {
11
11
  ].join(" "),
12
12
  supportedItemKinds: ["memory", "auth"],
13
13
  async detect(ctx) {
14
- const { discoverCodexSource, hasCodexSource } = await import("./source-1cabQi3x.mjs").then((n) => n.a);
14
+ const { discoverCodexSource, hasCodexSource } = await import("./source-3uDpVdu3.mjs").then((n) => n.a);
15
15
  const memoryOnly = isOnlyMigrationKind(ctx, "memory");
16
16
  const authOnly = isOnlyMigrationKind(ctx, "auth");
17
17
  const source = await discoverCodexSource({
@@ -29,16 +29,16 @@ function buildCodexMigrationProvider(params = {}) {
29
29
  };
30
30
  },
31
31
  async plan(ctx) {
32
- const { buildCodexMigrationPlan } = await import("./plan-CUHSuL6_.mjs");
32
+ const { buildCodexMigrationPlan } = await import("./plan-LJsaUrXA.mjs");
33
33
  return buildCodexMigrationPlan(ctx);
34
34
  },
35
35
  deferredApply: { retrySafe: true },
36
36
  prepareApply(ctx) {
37
37
  if (isOnlyMigrationKind(ctx, "memory") || isOnlyMigrationKind(ctx, "auth")) return;
38
- return import("./apply-CQ3brq3z.mjs").then(({ prepareTargetCodexAppServer }) => prepareTargetCodexAppServer(ctx));
38
+ return import("./apply-CMLZMIVH.mjs").then(({ prepareTargetCodexAppServer }) => prepareTargetCodexAppServer(ctx));
39
39
  },
40
40
  async apply(ctx, plan) {
41
- const { applyCodexMigrationPlan } = await import("./apply-CQ3brq3z.mjs");
41
+ const { applyCodexMigrationPlan } = await import("./apply-CMLZMIVH.mjs");
42
42
  return await applyCodexMigrationPlan({
43
43
  ctx,
44
44
  plan,
@@ -1,4 +1,4 @@
1
- import { h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-5NUq43f3.mjs";
1
+ import { h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-D2ivOIey.mjs";
2
2
  //#region extensions/codex/src/app-server/provider-capabilities.ts
3
3
  function resolveOverriddenProviderWebSearchSupport(modelProviderOverride) {
4
4
  const provider = modelProviderOverride?.trim().toLowerCase();
@@ -316,7 +316,7 @@ async function withCodexAppServerJsonClient(params, run) {
316
316
  timeoutMessage,
317
317
  promise: (async () => {
318
318
  const { resolveCodexAppServerDirectSandboxBypassBlock } = await import("./sandbox-guard-WqE8yPge.mjs").then((n) => n.r);
319
- const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, isCodexAppServerStartSelectionChangedError, releaseLeasedSharedCodexAppServerClient, retireSharedCodexAppServerClientIfCurrent } = await import("./shared-client-5NUq43f3.mjs").then((n) => n.v);
319
+ const { createIsolatedCodexAppServerClient, getLeasedSharedCodexAppServerClient, isCodexAppServerStartSelectionChangedError, releaseLeasedSharedCodexAppServerClient, retireSharedCodexAppServerClientIfCurrent } = await import("./shared-client-D2ivOIey.mjs").then((n) => n.v);
320
320
  for (let attempt = 0; attempt < 2; attempt += 1) {
321
321
  errorPhase = void 0;
322
322
  setPhase("prepare");
@@ -2,13 +2,13 @@ import { n as readCodexRuntimeModelId } from "./model-runtime-BdqzOMkU.mjs";
2
2
  import { g as createCodexNativeSubagentHistoryOwner } from "./native-subagent-pending-assignments-BDqhOdJp.mjs";
3
3
  import { i as isJsonObject, r as flattenCodexDynamicToolFunctions } from "./protocol-CANUwXJ3.mjs";
4
4
  import { i as matchesCodexNativeSubagentSubmissionBinding, m as sessionBindingIdentity, n as assertCodexBindingMayBeReplaced } from "./session-binding-record-BZB8RgcF.mjs";
5
- import { n as defineCodexBuildState } from "./build-state-LS-A65iX.mjs";
5
+ import { n as defineCodexBuildState } from "./build-state-DP9Coy_6.mjs";
6
6
  import { c as shouldAutoApproveCodexAppServerApprovals, f as readCodexRequirementsToml, l as withMcpElicitationsApprovalPolicy, n as hasCodexMcpToolApprovalOverrides } from "./config-security-KAPScztc.mjs";
7
7
  import { c as isCodexPairedNodeRemoteExecPlacementSandbox, d as readCodexPluginConfig, f as resolveCodexPluginsPolicy, l as isCodexRemoteExecPlacementSandbox, u as isCodexSandboxExecServerEnabled } from "./config-parsing-BQq-CHTF.mjs";
8
8
  import { n as isCodexAppServerProxyLaunch } from "./launch-args-DbFCehO7.mjs";
9
9
  import { t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
10
10
  import { i as resolveCodexAppServerHomeScope, l as resolveCodexModelBackedReviewerPolicyContext, o as resolveCodexComputerUseConfig } from "./config-options-HG_Rr3W_.mjs";
11
- import { c as resolveCodexAppServerPreparedApiKeyCacheKey, s as resolveCodexAppServerFallbackApiKeyCacheKey, w as retireSharedCodexAppServerClientIfCurrent } from "./auth-cache-key-BE1HXsNo.mjs";
11
+ import { c as resolveCodexAppServerPreparedApiKeyCacheKey, s as resolveCodexAppServerFallbackApiKeyCacheKey, w as retireSharedCodexAppServerClientIfCurrent } from "./auth-cache-key-CeVZHm9H.mjs";
12
12
  import { o as formatCodexDisplayText } from "./command-formatters-DV3DHhdr.mjs";
13
13
  import { a as codexPrewriteRejectionCause, i as CodexAppServerScopedRequestRejectedError, r as CodexAppServerRpcError } from "./rpc-error-hmWM21RB.mjs";
14
14
  import { n as waitForPromiseOrAbort } from "./timeout-CXOfNoaX.mjs";
@@ -17,46 +17,46 @@ import { i as readCodexProviderRefusal, n as extractRawAssistantText, o as readI
17
17
  import { r as readMirrorIdentity, t as attachCodexMirrorIdentity } from "./upstream-prompt-provenance-fXkKbPVC.mjs";
18
18
  import { n as buildCodexAppServerRuntimeFingerprint, r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-BW8rd98k.mjs";
19
19
  import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection, t as assertCodexSessionRuntimeOwnership } from "./binding-connection-C-08ez1w.mjs";
20
- import { n as requestCodexAppServerClientJson } from "./request-CZkKkN6c.mjs";
20
+ import { n as requestCodexAppServerClientJson } from "./request-Ddy7nOme.mjs";
21
21
  import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-0Gxk3_eq.mjs";
22
22
  import { a as isCodexDurableCustomMessage, c as resolveCodexContextEngineProjectionMaxChars, i as fitCodexProjectedContextForTurnStart, l as resolveCodexContinuityProjectionMaxChars, n as CodexContextAttachmentError, o as neutralizeCodexExplicitMentionSigils, r as buildCodexContinuityCalibration, s as projectContextEngineAssemblyForCodex, t as CODEX_TURN_START_TEXT_INPUT_MAX_CHARS, u as resolveProjectionPromptBudgetTokens } from "./context-engine-projection-CsgYSQhW.mjs";
23
23
  import { o as hasCodexMirrorOrigin, t as applyCodexTranscriptTaint } from "./transcript-mirror-attestation-YSegaktH.mjs";
24
24
  import { t as readCodexMirroredSessionHistoryMessages } from "./session-history-BogBHKLk.mjs";
25
25
  import { i as resolveCodexAppServerAuthProfileIdForAgent, r as resolveCodexAppServerAuthProfileId } from "./auth-profile-CgHQ8Vot.mjs";
26
- import { E as isCodexContextRestartSelectionChangedError, H as prepareCodexWorkspaceReferences, I as ensureCodexAppServerClientRuntime, M as getCodexInferenceThreadQualification, U as protectCodexAppServerLiveThread, X as readRecentCodexRateLimits, Y as readCodexRateLimitsRevision, _ as retainSharedCodexAppServerClientIfCurrent, a as clearSharedCodexAppServerClientIfCurrentAndUnclaimed, c as getLeasedSharedCodexAppServerClient, dt as TURN_TERMINAL_SETTLEMENT_TIMEOUT_MS, et as resolveCodexAppServerAuthAccountCacheKey, f as readCodexAppServerClientDesktopGenerationFingerprint, h as releaseLeasedSharedCodexAppServerClient, ht as withCodexStartupTimeout, i as clearSharedCodexAppServerClientIfCurrent, j as getCodexInferenceThread, l as getSharedCodexAppServerClient, lt as CodexAppServerStartupError, mt as resolveCodexStartupTimeoutMs, s as createIsolatedCodexAppServerClient, tt as resolveCodexAppServerPreparedAuthHandoff, u as isCodexAppServerStartSelectionChangedError, ut as TURN_FINALIZE_DRAIN_ABORT_GRACE_MS, w as CodexThreadClientReplacementError, x as CODEX_APP_SERVER_CONTEXT_RESTART_SELECTION_CHANGED } from "./shared-client-5NUq43f3.mjs";
26
+ import { E as isCodexContextRestartSelectionChangedError, I as ensureCodexAppServerClientRuntime, M as getCodexInferenceThreadQualification, U as prepareCodexWorkspaceReferences, W as protectCodexAppServerLiveThread, X as readCodexRateLimitsRevision, Z as readRecentCodexRateLimits, _ as retainSharedCodexAppServerClientIfCurrent, a as clearSharedCodexAppServerClientIfCurrentAndUnclaimed, c as getLeasedSharedCodexAppServerClient, dt as TURN_FINALIZE_DRAIN_ABORT_GRACE_MS, f as readCodexAppServerClientDesktopGenerationFingerprint, ft as TURN_TERMINAL_SETTLEMENT_TIMEOUT_MS, gt as withCodexStartupTimeout, h as releaseLeasedSharedCodexAppServerClient, ht as resolveCodexStartupTimeoutMs, i as clearSharedCodexAppServerClientIfCurrent, j as getCodexInferenceThread, l as getSharedCodexAppServerClient, nt as resolveCodexAppServerPreparedAuthHandoff, s as createIsolatedCodexAppServerClient, tt as resolveCodexAppServerAuthAccountCacheKey, u as isCodexAppServerStartSelectionChangedError, ut as CodexAppServerStartupError, w as CodexThreadClientReplacementError, x as CODEX_APP_SERVER_CONTEXT_RESTART_SELECTION_CHANGED } from "./shared-client-D2ivOIey.mjs";
27
27
  import { a as isCodexResponsesOAuthRun, r as isCodexResponsesOAuth } from "./responses-oauth-twnuTaAa.mjs";
28
- import { A as resolveTerminalDynamicToolBatchAction, D as isDynamicToolTerminalDiagnosticEvent, E as hasPendingDynamicToolTerminalDiagnostic, H as resolveCodexAppServerClientInstanceId, M as toCodexDynamicToolProgressResponse, N as toCodexDynamicToolProtocolResponse, O as isMatchingDynamicToolTerminalDiagnostic, T as handleDynamicToolCallWithTimeout, _ as assertCodexTurnStartResponse, a as isCodexAppServerIndeterminateRequestCancellationError, i as isCodexAppServerConnectionClosedError, j as shouldReleaseTurnAfterTerminalDynamicTool, k as resolveDynamicToolCallTimeoutMs, l as CodexServerRequestResolvedError, o as isCodexAppServerIndeterminateTransportError, r as isCodexAppServerApprovalRequest, w as createCodexElicitationResponse, x as readCodexTurnCompletedNotification, y as readCodexDynamicToolCallParams, z as CODEX_APP_SERVER_OPT_OUT_NOTIFICATION_METHODS } from "./client-ChJtGEdJ.mjs";
28
+ import { A as resolveTerminalDynamicToolBatchAction, D as isDynamicToolTerminalDiagnosticEvent, E as hasPendingDynamicToolTerminalDiagnostic, H as resolveCodexAppServerClientInstanceId, M as toCodexDynamicToolProgressResponse, N as toCodexDynamicToolProtocolResponse, O as isMatchingDynamicToolTerminalDiagnostic, T as handleDynamicToolCallWithTimeout, _ as assertCodexTurnStartResponse, a as isCodexAppServerIndeterminateRequestCancellationError, i as isCodexAppServerConnectionClosedError, j as shouldReleaseTurnAfterTerminalDynamicTool, k as resolveDynamicToolCallTimeoutMs, l as CodexServerRequestResolvedError, o as isCodexAppServerIndeterminateTransportError, r as isCodexAppServerApprovalRequest, w as createCodexElicitationResponse, x as readCodexTurnCompletedNotification, y as readCodexDynamicToolCallParams, z as CODEX_APP_SERVER_OPT_OUT_NOTIFICATION_METHODS } from "./client-DIC12QQ_.mjs";
29
29
  import { n as isCodexWebSocketOpenFailure } from "./transport-websocket-zqJ0Cmtn.mjs";
30
- import { a as isCodexNotificationForTurn, b as shouldClearTerminalPresentationForNativeItem, g as itemName, i as CodexProjectionDiagnostics, n as getCodexAppServerTurnRouter, o as readCodexNotificationThreadId, t as CODEX_APP_SERVER_NATIVE_TURN_WAIT_TIMEOUT_MS, y as matchesCodexSnapshotTurn } from "./turn-router-BOKSJmfw.mjs";
31
- import { d as terminateCodexBackgroundTerminals, f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError, s as interruptCodexTurnAndWaitBestEffort, u as shouldRetireCodexStartupClient } from "./attempt-client-cleanup-DPUGAWP2.mjs";
30
+ import { a as isCodexNotificationForTurn, b as shouldClearTerminalPresentationForNativeItem, g as itemName, i as CodexProjectionDiagnostics, n as getCodexAppServerTurnRouter, o as readCodexNotificationThreadId, t as CODEX_APP_SERVER_NATIVE_TURN_WAIT_TIMEOUT_MS, y as matchesCodexSnapshotTurn } from "./turn-router-CaGl9iS1.mjs";
31
+ import { d as terminateCodexBackgroundTerminals, f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError, s as interruptCodexTurnAndWaitBestEffort, u as shouldRetireCodexStartupClient } from "./attempt-client-cleanup-hUrW3fmJ.mjs";
32
32
  import { r as prepareCodexAppServerAuthBinding } from "./auth-binding-BoMwpuPN.mjs";
33
33
  import { a as isRawFunctionToolOutputCompletionNotification, c as readNotificationItemId, i as isPendingOpenClawDynamicToolCompletionNotification, l as readRawResponseToolCallId, o as isTerminalTurnStatus, r as isCodexTurnAbortMarkerNotification, s as readCodexNotificationItem, t as CodexUsageProjection, u as updateActiveTurnItemIds } from "./event-projector-usage-03R0I2dM.mjs";
34
- import { n as listAllCodexAppServerModels } from "./models-DaW-7tld.mjs";
35
- import { B as hasCodexNativeToolCatalog, Ct as mergeCodexThreadConfigs, D as assertCodexNativeHookRelayAllowed, E as CodexManagedHooksOnlyError, F as scheduleCodexNativeHookRelayUnregister, G as areCodexDynamicToolFingerprintsCompatible, J as codexLegacyDynamicToolsFingerprint, N as resolveCodexNativeHookRelayEvents, O as buildCodexNativeHookRelayConfig, P as resolveCodexNativeHookRelayTtlMs, S as joinPresentSections, T as CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS, V as loadCodexNativeToolCatalog, Z as fingerprintJsonObject, _t as buildCodexPluginThreadConfigInputFingerprint, b as resolveCodexAppServerThreadModelSelection, dt as isSystemAgentOnlyCodexDynamicToolAllowlist, g as buildDeveloperInstructions, j as createCodexNativeHookRelay, k as buildCodexNativeHookRelayDisabledConfig, l as isCodexNativeDelegationDisabledForRun, m as resolveCodexWebSearchPlan, mt as resolveCodexDynamicToolsLoadingForRuntime, nt as stabilizeJsonValue, q as codexDynamicToolsFingerprint, st as filterCodexDynamicTools } from "./thread-requests-Bj_Lixmv.mjs";
36
- import { _ as buildContextEngineBinding, a as buildTurnStartParams, c as assertScheduledCodexAppAuthorityRuntime, d as buildScheduledCodexAppServerConnectionIdentity, f as captureScheduledCodexAppAuthority, g as isCodexAppServerProfilerEnabled, h as resolveScheduledCodexAppCreatorCaptureDecision, i as buildTurnCollaborationMode, l as buildLegacyScheduledCodexAppRecoveryPrompt, n as buildCodexParentLocalInstructions, o as buildCodexUserInput, s as startOrResumeThread, t as buildCodexHistoryProvenancePrefix, u as buildScheduledCodexAppAuthorityInputFingerprint, v as isContextEngineBindingCompatible } from "./thread-lifecycle--EPPTNTe.mjs";
34
+ import { n as listAllCodexAppServerModels } from "./models-CR97NoEB.mjs";
35
+ import { B as hasCodexNativeToolCatalog, Ct as mergeCodexThreadConfigs, D as assertCodexNativeHookRelayAllowed, E as CodexManagedHooksOnlyError, F as scheduleCodexNativeHookRelayUnregister, G as areCodexDynamicToolFingerprintsCompatible, J as codexLegacyDynamicToolsFingerprint, N as resolveCodexNativeHookRelayEvents, O as buildCodexNativeHookRelayConfig, P as resolveCodexNativeHookRelayTtlMs, S as joinPresentSections, T as CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS, V as loadCodexNativeToolCatalog, Z as fingerprintJsonObject, _t as buildCodexPluginThreadConfigInputFingerprint, b as resolveCodexAppServerThreadModelSelection, dt as isSystemAgentOnlyCodexDynamicToolAllowlist, g as buildDeveloperInstructions, j as createCodexNativeHookRelay, k as buildCodexNativeHookRelayDisabledConfig, l as isCodexNativeDelegationDisabledForRun, m as resolveCodexWebSearchPlan, mt as resolveCodexDynamicToolsLoadingForRuntime, nt as stabilizeJsonValue, q as codexDynamicToolsFingerprint, st as filterCodexDynamicTools } from "./thread-requests-CKEQxo_5.mjs";
36
+ import { _ as buildContextEngineBinding, a as buildTurnStartParams, c as assertScheduledCodexAppAuthorityRuntime, d as buildScheduledCodexAppServerConnectionIdentity, f as captureScheduledCodexAppAuthority, g as isCodexAppServerProfilerEnabled, h as resolveScheduledCodexAppCreatorCaptureDecision, i as buildTurnCollaborationMode, l as buildLegacyScheduledCodexAppRecoveryPrompt, n as buildCodexParentLocalInstructions, o as buildCodexUserInput, s as startOrResumeThread, t as buildCodexHistoryProvenancePrefix, u as buildScheduledCodexAppAuthorityInputFingerprint, v as isContextEngineBindingCompatible } from "./thread-lifecycle-BSVWNPZt.mjs";
37
37
  import { o as createCodexSessionGenerationSupersededError, r as resolveCodexSessionBinding, s as resolveCodexRunSessionBindingAuthority, t as clearCodexBindingForClient } from "./session-binding-Ce7BqiPN.mjs";
38
- import { a as CodexToolTranscriptProjection, c as shouldEmitTranscriptToolProgress, d as resolveCodexToolProgressDetailMode, f as sanitizeCodexAgentEventRecord, i as emitCodexAgentEvent, p as sanitizeCodexToolArguments, r as CodexEventProjection, s as CodexToolProgressProjection, t as codexNativeSubagentMonitorRuntime, u as isCodexCommandBearingToolCall } from "./native-subagent-monitor-wh_-K3Vo.mjs";
39
- import { a as requestPluginApprovalOutcome } from "./plugin-approval-roundtrip-bPQbG8BI.mjs";
40
- import { n as CodexThreadPolicyHandoffError, s as restoreCodexThreadInstructionsAfterCompaction } from "./thread-policy-VtqLex1l.mjs";
41
- import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-T7T_iffm.mjs";
42
- import { a as resolveCodexPromptError, i as refreshCodexUsageLimitPromptError, n as formatCodexTurnStartUsageLimitError, r as markCodexAuthProfileBlockedFromRateLimits, t as CodexUsageLimitPromptError } from "./usage-limit-error-CGJUoQu8.mjs";
38
+ import { a as CodexToolTranscriptProjection, c as shouldEmitTranscriptToolProgress, d as resolveCodexToolProgressDetailMode, f as sanitizeCodexAgentEventRecord, i as emitCodexAgentEvent, p as sanitizeCodexToolArguments, r as CodexEventProjection, s as CodexToolProgressProjection, t as codexNativeSubagentMonitorRuntime, u as isCodexCommandBearingToolCall } from "./native-subagent-monitor-CkpiZfm0.mjs";
39
+ import { a as requestPluginApprovalOutcome } from "./plugin-approval-roundtrip-D7LyYiO6.mjs";
40
+ import { n as CodexThreadPolicyHandoffError, s as restoreCodexThreadInstructionsAfterCompaction } from "./thread-policy-Brc0nbdS.mjs";
41
+ import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-GlDZf8J7.mjs";
42
+ import { a as resolveCodexPromptError, i as refreshCodexUsageLimitPromptError, n as formatCodexTurnStartUsageLimitError, r as markCodexAuthProfileBlockedFromRateLimits, t as CodexUsageLimitPromptError } from "./usage-limit-error-B26Xp5eo.mjs";
43
43
  import { t as persistCodexContextCompactionActivity } from "./context-compaction-activity-CMla5FPJ.mjs";
44
44
  import { t as attemptTerminal } from "./attempt-terminal-gZrxQ35N.mjs";
45
45
  import { a as runCodexAgentEndHook, i as reportCodexBackgroundCleanupFailure, n as ensureCodexWorkspaceDirOnce, o as shouldKeepCodexSharedAbortOpen, r as estimateCodexAppServerProjectedTurnTokens, s as withCodexAppServerFastModeServiceTier, t as emitCodexAppServerEvent } from "./run-attempt-lifecycle-BuZgVbDA.mjs";
46
46
  import { t as CODEX_INFERENCE_GENERATION_KEY } from "./inference-metadata-CgIf7sOx.mjs";
47
47
  import "./inference-context-D-9gWlTR.mjs";
48
- import { i as createAssistantReasoningMessage, n as createAssistantCommentaryMessage, r as createAssistantMessage, t as createAssistantAsyncMessage } from "./event-projector-assistant-message-BwG5TUYW.mjs";
49
- import { a as resolveCodexExternalSandboxPolicyForOpenClawSandbox, c as shouldEnableCodexAppServerNativeToolSurface, i as resolveCodexAppServerHookChannelId, l as shouldRequireCodexSandboxExecServerEnvironment, o as resolveCodexMessageToolProvider, p as mapCodexAppServerRemoteWorkspacePath, r as resolveCodexAppServerExecutionCwd, s as resolveCodexSandboxEnvironmentSelection, t as buildDynamicTools, u as shouldWarnCodexDynamicToolBuildStageSummary } from "./dynamic-tool-build-BCi00feJ.mjs";
50
- import { n as resolveCodexPluginThreadConfigStartupPolicy, t as createCodexPluginThreadConfigStartupProvider } from "./plugin-thread-config-deadline-C5i1S6RN.mjs";
48
+ import { i as createAssistantReasoningMessage, n as createAssistantCommentaryMessage, r as createAssistantMessage, t as createAssistantAsyncMessage } from "./event-projector-assistant-message-CRadIRA4.mjs";
49
+ import { a as resolveCodexExternalSandboxPolicyForOpenClawSandbox, c as shouldEnableCodexAppServerNativeToolSurface, i as resolveCodexAppServerHookChannelId, l as shouldRequireCodexSandboxExecServerEnvironment, o as resolveCodexMessageToolProvider, p as mapCodexAppServerRemoteWorkspacePath, r as resolveCodexAppServerExecutionCwd, s as resolveCodexSandboxEnvironmentSelection, t as buildDynamicTools, u as shouldWarnCodexDynamicToolBuildStageSummary } from "./dynamic-tool-build-CdUp03dV.mjs";
50
+ import { n as resolveCodexPluginThreadConfigStartupPolicy, t as createCodexPluginThreadConfigStartupProvider } from "./plugin-thread-config-deadline-DZw8qiVC.mjs";
51
51
  import { i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy } from "./session-permission-policy-BxIUJ0Zd.mjs";
52
- import { r as prepareCodexNativeMcpFormResourceContext, t as createCodexNativeMcpAppResultDetailsPreparer } from "./native-mcp-app-ChpyWmL-.mjs";
53
- import { a as emitDynamicToolStartedDiagnostic, c as ensureCodexSandboxExecServerEnvironment, d as CodexNativeProcessAuthority, f as readCodexRetainedBackgroundCommands, i as emitDynamicToolErrorDiagnostic, l as releaseCodexSandboxExecServerEnvironment, m as CodexNativeToolLifecycleProjector, n as projectCodexExecutableDynamicTools, o as emitDynamicToolTerminalDiagnostic, p as createCodexRemoteWorkspaceFileReader, r as routeCodexAppServerElicitationRequest, s as handleCodexAppServerApprovalRequest, t as createCodexDynamicToolBridge, u as createCodexNativePreToolUseFailureBuffer } from "./dynamic-tools-DUv6Sr6h.mjs";
52
+ import { r as prepareCodexNativeMcpFormResourceContext, t as createCodexNativeMcpAppResultDetailsPreparer } from "./native-mcp-app-D4VcVFK7.mjs";
53
+ import { a as emitDynamicToolStartedDiagnostic, c as ensureCodexSandboxExecServerEnvironment, d as CodexNativeProcessAuthority, f as readCodexRetainedBackgroundCommands, i as emitDynamicToolErrorDiagnostic, l as releaseCodexSandboxExecServerEnvironment, m as CodexNativeToolLifecycleProjector, n as projectCodexExecutableDynamicTools, o as emitDynamicToolTerminalDiagnostic, p as createCodexRemoteWorkspaceFileReader, r as routeCodexAppServerElicitationRequest, s as handleCodexAppServerApprovalRequest, t as createCodexDynamicToolBridge, u as createCodexNativePreToolUseFailureBuffer } from "./dynamic-tools-3hNi6oog.mjs";
54
54
  import { c as promptSnapshot, i as mirrorPromptAtTurnStartBestEffort, n as createCodexAppServerUserMessagePersistenceNotifier, o as buildCodexUserPromptMessage, s as buildResolvedCodexUserPromptMessage, t as codexTranscriptMirrorRuntime } from "./transcript-mirror-BfLRARNL.mjs";
55
55
  import { t as resolveCodexAppServerForModelProvider } from "./app-server-policy-Bg4FZw1f.mjs";
56
- import { a as getCodexContextFileDisplayBasename, i as getCodexContextFileBasename, n as CODEX_NATIVE_PROJECT_DOC_BASENAMES, o as isNonEmptyString, r as buildCodexWorkspaceBootstrapContext, s as normalizeCodexContextFilePath } from "./attempt-workspace-context-GllQy8mw.mjs";
56
+ import { a as getCodexContextFileDisplayBasename, i as getCodexContextFileBasename, n as CODEX_NATIVE_PROJECT_DOC_BASENAMES, o as isNonEmptyString, r as buildCodexWorkspaceBootstrapContext, s as normalizeCodexContextFilePath } from "./attempt-workspace-context-BRvpkEo_.mjs";
57
57
  import { n as captureCodexSettledTurnFinalizationContext } from "./settled-turn-context-BZsMjkIO.mjs";
58
- import { t as resolveCodexProviderWebSearchSupport } from "./provider-capabilities-DhkeeHJd.mjs";
59
- import { a as runCodexComputerUseLiveTest, i as createComputerUseRequest, t as ensureCodexComputerUse } from "./computer-use-CF0jsDi1.mjs";
58
+ import { t as resolveCodexProviderWebSearchSupport } from "./provider-capabilities-NZytgEzO.mjs";
59
+ import { a as runCodexComputerUseLiveTest, i as createComputerUseRequest, t as ensureCodexComputerUse } from "./computer-use-rt0M8Bom.mjs";
60
60
  import { asOptionalRecord, normalizeLowercaseStringOrEmpty, readNonBlankString, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
61
61
  import { createHash } from "node:crypto";
62
62
  import { isDeepStrictEqual } from "node:util";
@@ -1,10 +1,10 @@
1
1
  import { c as MAX_CWD_LENGTH, d as boundedCatalogString } from "./session-catalog-parsing-B-qWJh2x.mjs";
2
- import { n as defineCodexBuildState } from "./build-state-LS-A65iX.mjs";
2
+ import { n as defineCodexBuildState } from "./build-state-DP9Coy_6.mjs";
3
3
  import { r as inferCodexAppServerConnectionClass } from "./config-security-KAPScztc.mjs";
4
4
  import { n as resolveCodexAppServerLocalHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
5
5
  import { n as codexCatalogHomeIdFromCanonicalPath } from "./session-catalog-home-id-vlih0B_g.mjs";
6
6
  import { t as buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key-BW8rd98k.mjs";
7
- import { d as observeCodexCatalogEphemeralThreads, r as projectCodexCatalogNativeThread, s as codexCatalogSourceForClient } from "./session-catalog-native-projection-DCtsWKSF.mjs";
7
+ import { d as observeCodexCatalogEphemeralThreads, r as projectCodexCatalogNativeThread, s as codexCatalogSourceForClient } from "./session-catalog-native-projection-Cpc9sZnx.mjs";
8
8
  import { createHash } from "node:crypto";
9
9
  import { embeddedAgentLog } from "openclaw/plugin-sdk/agent-harness-registration";
10
10
  import path from "node:path";
@@ -2,10 +2,10 @@ import { S as readControlCursor, _ as normalizeLimit, c as MAX_CWD_LENGTH, d as
2
2
  import { n as detachCodexCatalogString, t as CODEX_CATALOG_MAX_ROWS } from "./session-catalog-limits-DEU36Qlo.mjs";
3
3
  import { i as retainCodexCatalogRow, n as codexCatalogRowRecency, r as compareCodexCatalogRows, t as CodexCatalogOrdering } from "./session-catalog-index-order-nhyO0wdW.mjs";
4
4
  import { c as codexCatalogMetadataPage, i as CodexCatalogAvailability, r as withCodexCatalogListRequest, s as CodexCatalogPersistence } from "./session-catalog-list-request-tXephOB4.mjs";
5
- import { l as getCodexCatalogSource, p as setCodexCatalogSource, r as projectCodexCatalogNativeThread, u as hasLiveCodexCatalogSource } from "./session-catalog-native-projection-DCtsWKSF.mjs";
6
- import { i as subscribeCodexCatalogEvents } from "./session-catalog-events-Cj-b2FpC.mjs";
5
+ import { l as getCodexCatalogSource, p as setCodexCatalogSource, r as projectCodexCatalogNativeThread, u as hasLiveCodexCatalogSource } from "./session-catalog-native-projection-Cpc9sZnx.mjs";
6
+ import { i as subscribeCodexCatalogEvents } from "./session-catalog-events-Ce-JJuIv.mjs";
7
7
  import { a as reportCodexCatalogSpawnFailure, n as findCodexAppServerSpawnError } from "./spawn-error-CL3n6MAa.mjs";
8
- import { CodexCatalogProjectionCapacityError, CodexCatalogProjections, mergeCodexCatalogRolloutRow, n as readCodexCatalogRollout, projectCodexCatalogThread, r as resolveCodexCatalogRolloutFingerprint, t as codexCatalogRolloutLogicalPath } from "./session-catalog-projection-Cn0bLb-d.mjs";
8
+ import { CodexCatalogProjectionCapacityError, CodexCatalogProjections, mergeCodexCatalogRolloutRow, n as readCodexCatalogRollout, projectCodexCatalogThread, r as resolveCodexCatalogRolloutFingerprint, t as codexCatalogRolloutLogicalPath } from "./session-catalog-projection-D7YtgdS_.mjs";
9
9
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
10
10
  import { createHash } from "node:crypto";
11
11
  import { isDeepStrictEqual } from "node:util";
@@ -1,6 +1,6 @@
1
1
  import { D as selectCodexCatalogPreviewInput, c as MAX_CWD_LENGTH, d as boundedCatalogString, k as truncateCodexCatalogPreview } from "./session-catalog-parsing-B-qWJh2x.mjs";
2
2
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
3
- import { n as defineCodexBuildState } from "./build-state-LS-A65iX.mjs";
3
+ import { n as defineCodexBuildState } from "./build-state-DP9Coy_6.mjs";
4
4
  import { n as detachCodexCatalogString } from "./session-catalog-limits-DEU36Qlo.mjs";
5
5
  import { t as __exportAll } from "./session-binding-sidecars-BrdV95Fg.mjs";
6
6
  import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
@@ -2,7 +2,7 @@ import { D as selectCodexCatalogPreviewInput, O as toCatalogSession, S as readCo
2
2
  import { n as detachCodexCatalogString } from "./session-catalog-limits-DEU36Qlo.mjs";
3
3
  import { n as codexCatalogRowRecency } from "./session-catalog-index-order-nhyO0wdW.mjs";
4
4
  import { t as isOpenClawManagedCodexThread } from "./session-catalog-provenance-CmsOE5mh.mjs";
5
- import { c as copyCodexCatalogSource, l as getCodexCatalogSource, p as setCodexCatalogSource, r as projectCodexCatalogNativeThread } from "./session-catalog-native-projection-DCtsWKSF.mjs";
5
+ import { c as copyCodexCatalogSource, l as getCodexCatalogSource, p as setCodexCatalogSource, r as projectCodexCatalogNativeThread } from "./session-catalog-native-projection-Cpc9sZnx.mjs";
6
6
  import { asFiniteNumber, isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import path from "node:path";
8
8
  import fs from "node:fs/promises";
@@ -1,9 +1,9 @@
1
- import { S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-BE1HXsNo.mjs";
1
+ import { S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-CeVZHm9H.mjs";
2
2
  import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-Dp24d7-F.mjs";
3
- import { G as releaseCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed } from "./shared-client-5NUq43f3.mjs";
4
- import { f as unsubscribeCodexThreadBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-DPUGAWP2.mjs";
5
- import { t as codexNativeSubagentMonitorRuntime } from "./native-subagent-monitor-wh_-K3Vo.mjs";
6
- import { t as isSameCodexAppServerThreadOwner } from "./thread-ownership-T7T_iffm.mjs";
3
+ import { K as releaseCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed } from "./shared-client-D2ivOIey.mjs";
4
+ import { f as unsubscribeCodexThreadBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-hUrW3fmJ.mjs";
5
+ import { t as codexNativeSubagentMonitorRuntime } from "./native-subagent-monitor-CkpiZfm0.mjs";
6
+ import { t as isSameCodexAppServerThreadOwner } from "./thread-ownership-GlDZf8J7.mjs";
7
7
  import { t as getCodexSessionInitializationRollback } from "./session-initialization-D6dtFQkE.mjs";
8
8
  import { isIncognitoSessionKey } from "openclaw/plugin-sdk/session-key-runtime";
9
9
  import { isNativeSessionDeletionUnresolved, wrapNativeSessionDeletionMutation } from "openclaw/plugin-sdk/agent-harness-session-runtime";
@@ -1,11 +1,11 @@
1
1
  import { r as readMirrorIdentity, t as attachCodexMirrorIdentity } from "./upstream-prompt-provenance-fXkKbPVC.mjs";
2
2
  import { a as fingerprintCodexMirrorSourceMessage, c as readCodexMirrorSourceFingerprint } from "./transcript-mirror-attestation-YSegaktH.mjs";
3
- import { tt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-5NUq43f3.mjs";
4
- import { f as assertCodexPassiveTurnItems } from "./client-ChJtGEdJ.mjs";
5
- import { o as resolveCodexLocalRuntimeAttribution } from "./native-subagent-monitor-wh_-K3Vo.mjs";
6
- import { runBoundedCodexAppServerTurn } from "./bounded-turn-9YflG60n.mjs";
3
+ import { nt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-D2ivOIey.mjs";
4
+ import { f as assertCodexPassiveTurnItems } from "./client-DIC12QQ_.mjs";
5
+ import { o as resolveCodexLocalRuntimeAttribution } from "./native-subagent-monitor-CkpiZfm0.mjs";
6
+ import { runBoundedCodexAppServerTurn } from "./bounded-turn-DVI5FRqE.mjs";
7
7
  import { t as resolveCodexBoundedTurnIsolation } from "./bounded-turn-isolation-DklXNk3k.mjs";
8
- import { a as createAttributedCodexAssistantMessage } from "./event-projector-assistant-message-BwG5TUYW.mjs";
8
+ import { a as createAttributedCodexAssistantMessage } from "./event-projector-assistant-message-CRadIRA4.mjs";
9
9
  import { t as codexTranscriptMirrorRuntime } from "./transcript-mirror-BfLRARNL.mjs";
10
10
  import { t as CodexSettledTurnContext } from "./settled-turn-context-BZsMjkIO.mjs";
11
11
  import { isSilentReplyText } from "openclaw/plugin-sdk/reply-runtime";
@@ -1,21 +1,21 @@
1
1
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
2
- import { n as defineCodexBuildState, t as codexBuildSymbol } from "./build-state-LS-A65iX.mjs";
2
+ import { n as defineCodexBuildState, t as codexBuildSymbol } from "./build-state-DP9Coy_6.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
6
  import { a as resolveCodexAppServerStartOptionsForAgent, d as readCodexEffectiveConfig, o as resolveCodexComputerUseConfig, t as codexAppServerStartOptionsKey, u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-HG_Rr3W_.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-C1VFoVPf.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-BE1HXsNo.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-CeVZHm9H.mjs";
9
9
  import { n as resolveCodexAppServerSpawnEnv } from "./transport-stdio-a0HDa2Mj.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-hmWM21RB.mjs";
12
12
  import { i as withTimeout } from "./timeout-CXOfNoaX.mjs";
13
13
  import { n as readCodexSessionMeta } from "./session-catalog-provenance-CmsOE5mh.mjs";
14
- import { n as observeCodexCatalogClient } from "./session-catalog-events-Cj-b2FpC.mjs";
14
+ import { n as observeCodexCatalogClient } from "./session-catalog-events-Ce-JJuIv.mjs";
15
15
  import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-cUYrqu_a.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 { R as isUnsupportedCodexAppServerVersionError, t as CodexAppServerClient } from "./client-ChJtGEdJ.mjs";
18
+ import { R as isUnsupportedCodexAppServerVersionError, t as CodexAppServerClient } from "./client-DIC12QQ_.mjs";
19
19
  import { n as isCodexWebSocketOpenFailure } from "./transport-websocket-zqJ0Cmtn.mjs";
20
20
  import { t as __exportAll } from "./session-binding-sidecars-BrdV95Fg.mjs";
21
21
  import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -2189,6 +2189,11 @@ function isCodexAppServerLiveThreadClaimed(client, threadId) {
2189
2189
  const runtime = configuredClients.get(client);
2190
2190
  return runtime !== void 0 && !runtime.closed && runtime.claimedThreads.has(threadId);
2191
2191
  }
2192
+ /** Native commands and children can still need an otherwise-idle subscription. */
2193
+ function isCodexAppServerLiveThreadProtected(client, threadId) {
2194
+ const runtime = configuredClients.get(client);
2195
+ return runtime !== void 0 && !runtime.closed && runtime.protectedThreads.has(threadId);
2196
+ }
2192
2197
  function hasCodexAppServerSiblingThreadWork(client, threadId) {
2193
2198
  return hasSiblingThreadWork(configuredClients.get(client), threadId);
2194
2199
  }
@@ -2535,7 +2540,7 @@ async function prepareCodexInferenceRoute(params) {
2535
2540
  }
2536
2541
  pending = Promise.all([
2537
2542
  import("./inference-proxy-DUO5E2QQ.mjs"),
2538
- import("./native-subagent-monitor-wh_-K3Vo.mjs").then((n) => n.n),
2543
+ import("./native-subagent-monitor-CkpiZfm0.mjs").then((n) => n.n),
2539
2544
  import("./inference-dispatch-B5UKEUyC.mjs")
2540
2545
  ]).then(([{ createCodexInferenceProxy }, native, { createCodexInferenceModelBinding }]) => {
2541
2546
  assertClient();
@@ -3613,4 +3618,4 @@ function clearSharedCodexAppServerClientIfCurrentAndUnclaimed(client) {
3613
3618
  };
3614
3619
  }
3615
3620
  //#endregion
3616
- export { reconcileCodexComputerUseStartArtifacts as $, bindCodexInferenceThread as A, isCodexAppServerClientRuntimeLive as B, CodexThreadBindingConflictError as C, nativeHookRelayUnregisterQueue as D, isCodexContextRestartSelectionChangedError as E, consumeCodexAppServerLiveThread as F, releaseCodexAppServerLiveThread as G, prepareCodexWorkspaceReferences as H, ensureCodexAppServerClientRuntime as I, unsubscribeCodexAppServerLiveThread as J, retainCodexAppServerLiveThread as K, forgetCodexWorkspaceReferences as L, getCodexInferenceThreadQualification as M, prepareCodexInferenceThreadConfig as N, acquireCodexNativeConfigFence as O, claimCodexAppServerLiveThread as P, createCodexEphemeralThreadPolicy as Q, hasCodexAppServerLiveThread as R, CodexAdoptedThreadActiveError as S, CodexThreadStartRequestError as T, protectCodexAppServerLiveThread as U, isCodexAppServerLiveThreadClaimed as V, readCodexClientSessionMeta as W, readRecentCodexRateLimits as X, readCodexRateLimitsRevision as Y, rememberCodexRateLimitsRead as Z, retainSharedCodexAppServerClientIfCurrent as _, clearSharedCodexAppServerClientIfCurrentAndUnclaimed as a, isLegacyCodexComputerUsePluginDisabled as at, withLeasedCodexAppServerClientStartSelectionRetry as b, getLeasedSharedCodexAppServerClient as c, assertNotSymlink as ct, readCodexAppServerClientDesktopGeneration as d, TURN_TERMINAL_SETTLEMENT_TIMEOUT_MS as dt, resolveCodexAppServerAuthAccountCacheKey as et, readCodexAppServerClientDesktopGenerationFingerprint as f, isCodexAppServerStartupError as ft, resolveCodexNativeConfigFenceKey as g, releaseLeasedSharedCodexAppServerClient as h, withCodexStartupTimeout as ht, clearSharedCodexAppServerClientIfCurrent as i, hasLegacyCodexComputerUseMcpPolicy as it, getCodexInferenceThread as j, assertCodexInferenceRouteConfig as k, getSharedCodexAppServerClient as l, CodexAppServerStartupError as lt, releaseCodexAppServerClientLease as m, resolveCodexStartupTimeoutMs as mt, captureCodexAppServerClientLifetime as n, resolveBundledComputerUseMarketplacePath as nt, clearSharedCodexAppServerClientIfCurrentAndWait as o, resolveManagedCodexComputerUseConfig as ot, readCodexAppServerClientProcessIdentity as p, resolveCodexGatewayTimeoutWithGraceMs as pt, revertCodexAppServerLiveThreadInstructions as q, captureSharedCodexAppServerCatalogLifetime as r, resolveClientManagedBundledMarketplacePath as rt, createIsolatedCodexAppServerClient as s, ensureCodexComputerUseSharedPluginCache as st, assertCodexAppServerClientStartSelectionCurrent as t, resolveCodexAppServerPreparedAuthHandoff as tt, isCodexAppServerStartSelectionChangedError as u, TURN_FINALIZE_DRAIN_ABORT_GRACE_MS 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 };
3621
+ 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 };
@@ -1,4 +1,4 @@
1
- import { ft as normalizeCodexDynamicToolName } from "./thread-requests-Bj_Lixmv.mjs";
1
+ import { ft as normalizeCodexDynamicToolName } from "./thread-requests-CKEQxo_5.mjs";
2
2
  import { pinExecToolTarget } from "openclaw/plugin-sdk/codex-mcp-projection";
3
3
  import { loadNodeExecAvailability } from "openclaw/plugin-sdk/node-selection-runtime";
4
4
  //#region extensions/codex/src/app-server/shell-dynamic-tools.ts
@@ -6,20 +6,20 @@ import { i as resolveCodexAppServerHomeScope, l as resolveCodexModelBackedReview
6
6
  import { n as formatCodexUsageLimitErrorMessage } from "./rate-limits-CMPy24F5.mjs";
7
7
  import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection } from "./binding-connection-C-08ez1w.mjs";
8
8
  import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-0Gxk3_eq.mjs";
9
- import { X as readRecentCodexRateLimits, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease, tt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-5NUq43f3.mjs";
10
- import { N as toCodexDynamicToolProtocolResponse, P as resolveCodexToolAbortTerminalReason, T as handleDynamicToolCallWithTimeout, _ as assertCodexTurnStartResponse, a as isCodexAppServerIndeterminateRequestCancellationError, k as resolveDynamicToolCallTimeoutMs, m as assertCodexThreadForkResponse, r as isCodexAppServerApprovalRequest, w as createCodexElicitationResponse, y as readCodexDynamicToolCallParams } from "./client-ChJtGEdJ.mjs";
11
- import { d as terminateCodexBackgroundTerminals, f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, s as interruptCodexTurnAndWaitBestEffort } from "./attempt-client-cleanup-DPUGAWP2.mjs";
12
- import { t as CodexEphemeralTurn } from "./ephemeral-turn-U4th15a6.mjs";
13
- import { Ct as mergeCodexThreadConfigs, N as resolveCodexNativeHookRelayEvents, O as buildCodexNativeHookRelayConfig, P as resolveCodexNativeHookRelayTtlMs, _ as CODEX_NATIVE_PERSONALITY_NONE, b as resolveCodexAppServerThreadModelSelection, k as buildCodexNativeHookRelayDisabledConfig, m as resolveCodexWebSearchPlan, pt as resolveCodexDynamicToolsLoading, r as buildCodexRuntimeThreadConfig, wt as refreshCodexPluginAppApprovalPolicy } from "./thread-requests-Bj_Lixmv.mjs";
14
- import { b as resolveCodexAppServerReasoningEffort, o as buildCodexUserInput, r as buildCodexTemporalAdditionalContext, y as readCodexSupportedReasoningEfforts } from "./thread-lifecycle--EPPTNTe.mjs";
9
+ import { Z as readRecentCodexRateLimits, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease, nt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-D2ivOIey.mjs";
10
+ import { N as toCodexDynamicToolProtocolResponse, P as resolveCodexToolAbortTerminalReason, T as handleDynamicToolCallWithTimeout, _ as assertCodexTurnStartResponse, a as isCodexAppServerIndeterminateRequestCancellationError, k as resolveDynamicToolCallTimeoutMs, m as assertCodexThreadForkResponse, r as isCodexAppServerApprovalRequest, w as createCodexElicitationResponse, y as readCodexDynamicToolCallParams } from "./client-DIC12QQ_.mjs";
11
+ import { d as terminateCodexBackgroundTerminals, f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, s as interruptCodexTurnAndWaitBestEffort } from "./attempt-client-cleanup-hUrW3fmJ.mjs";
12
+ import { t as CodexEphemeralTurn } from "./ephemeral-turn-BVauXzx9.mjs";
13
+ import { Ct as mergeCodexThreadConfigs, N as resolveCodexNativeHookRelayEvents, O as buildCodexNativeHookRelayConfig, P as resolveCodexNativeHookRelayTtlMs, _ as CODEX_NATIVE_PERSONALITY_NONE, b as resolveCodexAppServerThreadModelSelection, k as buildCodexNativeHookRelayDisabledConfig, m as resolveCodexWebSearchPlan, pt as resolveCodexDynamicToolsLoading, r as buildCodexRuntimeThreadConfig, wt as refreshCodexPluginAppApprovalPolicy } from "./thread-requests-CKEQxo_5.mjs";
14
+ import { b as resolveCodexAppServerReasoningEffort, o as buildCodexUserInput, r as buildCodexTemporalAdditionalContext, y as readCodexSupportedReasoningEfforts } from "./thread-lifecycle-BSVWNPZt.mjs";
15
15
  import { r as resolveCodexSessionBinding } from "./session-binding-Ce7BqiPN.mjs";
16
- import { i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy } from "./thread-policy-VtqLex1l.mjs";
16
+ import { i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy } from "./thread-policy-Brc0nbdS.mjs";
17
17
  import { t as resolveCodexNativeExecutionBlock } from "./sandbox-guard-WqE8yPge.mjs";
18
- import { a as resolveCodexExternalSandboxPolicyForOpenClawSandbox, c as shouldEnableCodexAppServerNativeToolSurface, l as shouldRequireCodexSandboxExecServerEnvironment, o as resolveCodexMessageToolProvider, s as resolveCodexSandboxEnvironmentSelection, t as buildDynamicTools } from "./dynamic-tool-build-BCi00feJ.mjs";
18
+ import { a as resolveCodexExternalSandboxPolicyForOpenClawSandbox, c as shouldEnableCodexAppServerNativeToolSurface, l as shouldRequireCodexSandboxExecServerEnvironment, o as resolveCodexMessageToolProvider, s as resolveCodexSandboxEnvironmentSelection, t as buildDynamicTools } from "./dynamic-tool-build-CdUp03dV.mjs";
19
19
  import { i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy, t as CODEX_SESSION_PERMISSION_EXEC_MODES } from "./session-permission-policy-BxIUJ0Zd.mjs";
20
- import { a as emitDynamicToolStartedDiagnostic, c as ensureCodexSandboxExecServerEnvironment, i as emitDynamicToolErrorDiagnostic, l as releaseCodexSandboxExecServerEnvironment, m as CodexNativeToolLifecycleProjector, o as emitDynamicToolTerminalDiagnostic, r as routeCodexAppServerElicitationRequest, s as handleCodexAppServerApprovalRequest, t as createCodexDynamicToolBridge, u as createCodexNativePreToolUseFailureBuffer } from "./dynamic-tools-DUv6Sr6h.mjs";
20
+ import { a as emitDynamicToolStartedDiagnostic, c as ensureCodexSandboxExecServerEnvironment, i as emitDynamicToolErrorDiagnostic, l as releaseCodexSandboxExecServerEnvironment, m as CodexNativeToolLifecycleProjector, o as emitDynamicToolTerminalDiagnostic, r as routeCodexAppServerElicitationRequest, s as handleCodexAppServerApprovalRequest, t as createCodexDynamicToolBridge, u as createCodexNativePreToolUseFailureBuffer } from "./dynamic-tools-3hNi6oog.mjs";
21
21
  import { t as resolveCodexAppServerForModelProvider } from "./app-server-policy-Bg4FZw1f.mjs";
22
- import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-DhkeeHJd.mjs";
22
+ import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-NZytgEzO.mjs";
23
23
  import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
24
24
  import { randomUUID } from "node:crypto";
25
25
  import { isDeepStrictEqual } from "node:util";
@@ -1,5 +1,5 @@
1
1
  import { a as defaultCodexAppInventoryCache, r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-BW8rd98k.mjs";
2
- import { a as withCodexAppServerJsonClient } from "./request-CZkKkN6c.mjs";
2
+ import { a as withCodexAppServerJsonClient } from "./request-Ddy7nOme.mjs";
3
3
  import { a as pluginReadParams, i as marketplaceRef, l as CODEX_PLUGINS_MARKETPLACE_NAME, n as isOpenAiCuratedMarketplaceName } from "./plugin-inventory-Bf0_piTw.mjs";
4
4
  import "./config-0Gxk3_eq.mjs";
5
5
  import { t as __exportAll } from "./session-binding-sidecars-BrdV95Fg.mjs";
@@ -4,7 +4,7 @@ import { m as sessionBindingIdentity, n as assertCodexBindingMayBeReplaced } fro
4
4
  import { u as fingerprintCodexPolicy } from "./config-security-KAPScztc.mjs";
5
5
  import { n as resolveCodexAppServerLocalHomeDir, t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
6
6
  import { d as readCodexEffectiveConfig, n as codexSandboxPolicyForTurn, s as assertCodexModelBackedReviewerEffectiveConfig, u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-HG_Rr3W_.mjs";
7
- import { S as retainSharedCodexAppServerClientByInstanceId, d as getCurrentSharedClientEntry } from "./auth-cache-key-BE1HXsNo.mjs";
7
+ import { S as retainSharedCodexAppServerClientByInstanceId, d as getCurrentSharedClientEntry } from "./auth-cache-key-CeVZHm9H.mjs";
8
8
  import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-Dp24d7-F.mjs";
9
9
  import { o as isCodexAppServerOverloadError, r as CodexAppServerRpcError, s as isCodexThreadReadMissingError } from "./rpc-error-hmWM21RB.mjs";
10
10
  import { t as codexCatalogHomeId } from "./session-catalog-home-id-vlih0B_g.mjs";
@@ -17,16 +17,16 @@ import "./config-0Gxk3_eq.mjs";
17
17
  import { r as invalidInlineImageText } from "./session-history-read-CNN8zwbD.mjs";
18
18
  import { c as resolveCodexContextEngineProjectionMaxChars, o as neutralizeCodexExplicitMentionSigils } from "./context-engine-projection-CsgYSQhW.mjs";
19
19
  import { n as normalizeCodexAppServerBindingModelProvider } from "./auth-profile-CgHQ8Vot.mjs";
20
- import { A as bindCodexInferenceThread, B as isCodexAppServerClientRuntimeLive, C as CodexThreadBindingConflictError, F as consumeCodexAppServerLiveThread, G as releaseCodexAppServerLiveThread, J as unsubscribeCodexAppServerLiveThread, M as getCodexInferenceThreadQualification, N as prepareCodexInferenceThreadConfig, Q as createCodexEphemeralThreadPolicy, S as CodexAdoptedThreadActiveError, T as CodexThreadStartRequestError, V as isCodexAppServerLiveThreadClaimed, j as getCodexInferenceThread, k as assertCodexInferenceRouteConfig, n as captureCodexAppServerClientLifetime, w as CodexThreadClientReplacementError, z as hasCodexAppServerSiblingThreadWork } from "./shared-client-5NUq43f3.mjs";
21
- import { B as getCodexAppServerClientInstanceId, C as resolveCodexThreadRolloutPath, H as resolveCodexAppServerClientInstanceId, S as readSupervisionResponseThreadId, c as isCodexAppServerRequestTimeoutError, g as assertCodexThreadStartResponse, m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, v as assertExactSupervisionModelSelection } from "./client-ChJtGEdJ.mjs";
22
- import { r as hasCodexAppServerSiblingRouteWork } from "./turn-router-BOKSJmfw.mjs";
23
- 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-DPUGAWP2.mjs";
24
- import { $ as legacyFingerprintUserMcpServersConfigPatch, B as hasCodexNativeToolCatalog, Ct as mergeCodexThreadConfigs, D as assertCodexNativeHookRelayAllowed, E as CodexManagedHooksOnlyError, Et as buildCodexAppApprovalOverrides, G as areCodexDynamicToolFingerprintsCompatible, I as attestCodexThreadToolSurface, J as codexLegacyDynamicToolsFingerprint, K as areUserMcpServersFingerprintsCompatible, L as checkCodexThreadAppAvailability, Q as fingerprintUserMcpServersConfigPatch, R as discardUnattestedCodexPluginThread, S as joinPresentSections, St as isCodexPluginThreadBindingStale, U as applyCodexNativeSkillIsolation, V as loadCodexNativeToolCatalog, W as resolveCodexNativeSkillIsolation, X as fingerprintEnvironmentSelection, Y as fingerprintCodexThreadConfig, Z as fingerprintJsonObject, _ as CODEX_NATIVE_PERSONALITY_NONE, at as shouldRotateCodexAppServerBindingForRuntime, b as resolveCodexAppServerThreadModelSelection, bt as buildPluginAppPolicyContext, c as codexThreadSandboxOrPermissions, d as readCodexManagedRequirementsFingerprint, dt as isSystemAgentOnlyCodexDynamicToolAllowlist, et as readActiveCodexTurnIdsFromResume, f as resolveCodexThreadApprovalsReviewer, g as buildDeveloperInstructions, h as mergeCodexNativeShellEnvironment, ht as buildCodexPluginAppsConfigPatchFromPolicyContext, i as buildCodexRuntimeThreadConfigForRun, it as shouldRecheckRecoverablePluginBinding, m as resolveCodexWebSearchPlan, n as buildCodexRingZeroThreadConfigPatch, o as buildThreadResumeParams, ot as shouldRotateCodexGpt56MultiAgentBinding, q as codexDynamicToolsFingerprint, rt as isTransientWebSearchRestriction, s as buildThreadStartParams, t as assertCodexManagedRequirementsDoNotOverrideToolPolicy, tt as shouldStartTransientNoToolThread, u as readCodexInheritedMcpServerNames, ut as isMessageOnlyCodexSourceReply, v as resolveCodexAppServerModelProvider, w as mergeCodexNativeProjectDocThreadConfig, xt as disableUnlistedCodexApps, y as resolveCodexAppServerRequestModelSelection, z as attestCodexRestrictedToolSurfaceMcpServersDisabled } from "./thread-requests-Bj_Lixmv.mjs";
20
+ 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-D2ivOIey.mjs";
21
+ import { B as getCodexAppServerClientInstanceId, C as resolveCodexThreadRolloutPath, H as resolveCodexAppServerClientInstanceId, S as readSupervisionResponseThreadId, c as isCodexAppServerRequestTimeoutError, g as assertCodexThreadStartResponse, m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, v as assertExactSupervisionModelSelection } from "./client-DIC12QQ_.mjs";
22
+ import { r as hasCodexAppServerSiblingRouteWork } from "./turn-router-CaGl9iS1.mjs";
23
+ 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-hUrW3fmJ.mjs";
24
+ import { $ as legacyFingerprintUserMcpServersConfigPatch, B as hasCodexNativeToolCatalog, Ct as mergeCodexThreadConfigs, D as assertCodexNativeHookRelayAllowed, E as CodexManagedHooksOnlyError, Et as buildCodexAppApprovalOverrides, G as areCodexDynamicToolFingerprintsCompatible, I as attestCodexThreadToolSurface, J as codexLegacyDynamicToolsFingerprint, K as areUserMcpServersFingerprintsCompatible, L as checkCodexThreadAppAvailability, Q as fingerprintUserMcpServersConfigPatch, R as discardUnattestedCodexPluginThread, S as joinPresentSections, St as isCodexPluginThreadBindingStale, U as applyCodexNativeSkillIsolation, V as loadCodexNativeToolCatalog, W as resolveCodexNativeSkillIsolation, X as fingerprintEnvironmentSelection, Y as fingerprintCodexThreadConfig, Z as fingerprintJsonObject, _ as CODEX_NATIVE_PERSONALITY_NONE, at as shouldRotateCodexAppServerBindingForRuntime, b as resolveCodexAppServerThreadModelSelection, bt as buildPluginAppPolicyContext, c as codexThreadSandboxOrPermissions, d as readCodexManagedRequirementsFingerprint, dt as isSystemAgentOnlyCodexDynamicToolAllowlist, et as readActiveCodexTurnIdsFromResume, f as resolveCodexThreadApprovalsReviewer, g as buildDeveloperInstructions, h as mergeCodexNativeShellEnvironment, ht as buildCodexPluginAppsConfigPatchFromPolicyContext, i as buildCodexRuntimeThreadConfigForRun, it as shouldRecheckRecoverablePluginBinding, m as resolveCodexWebSearchPlan, n as buildCodexRingZeroThreadConfigPatch, o as buildThreadResumeParams, ot as shouldRotateCodexGpt56MultiAgentBinding, q as codexDynamicToolsFingerprint, rt as isTransientWebSearchRestriction, s as buildThreadStartParams, t as assertCodexManagedRequirementsDoNotOverrideToolPolicy, tt as shouldStartTransientNoToolThread, u as readCodexInheritedMcpServerNames, ut as isMessageOnlyCodexSourceReply, v as resolveCodexAppServerModelProvider, w as mergeCodexNativeProjectDocThreadConfig, xt as disableUnlistedCodexApps, y as resolveCodexAppServerRequestModelSelection, z as attestCodexRestrictedToolSurfaceMcpServersDisabled } from "./thread-requests-CKEQxo_5.mjs";
25
25
  import { a as hashCodexAppServerBindingFingerprint, r as resolveCodexSessionBinding } from "./session-binding-Ce7BqiPN.mjs";
26
26
  import { r as readCodexMcpToolConnectorId } from "./mcp-tool-metadata-j10HhfTC.mjs";
27
- import { a as refreshCodexThreadInstructions, i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy, r as assertAdoptedCodexThreadResumeAllowed, t as CodexIncognitoPolicyChangeError } from "./thread-policy-VtqLex1l.mjs";
28
- import { t as resumeCodexAppServerThread } from "./thread-resume-buZujRcC.mjs";
29
- import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-T7T_iffm.mjs";
27
+ import { a as refreshCodexThreadInstructions, i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy, r as assertAdoptedCodexThreadResumeAllowed, t as CodexIncognitoPolicyChangeError } from "./thread-policy-Brc0nbdS.mjs";
28
+ import { t as resumeCodexAppServerThread } from "./thread-resume-BfkvLUZY.mjs";
29
+ import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-GlDZf8J7.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";
@@ -1134,7 +1134,7 @@ async function releaseCodexBoundLiveThread(options) {
1134
1134
  if (changedClient && !previous) return false;
1135
1135
  const client = previous?.client ?? options.client;
1136
1136
  try {
1137
- if (isCodexAppServerLiveThreadClaimed(client, options.threadId)) throw new Error(`Codex thread ${options.threadId} is claimed by active work; stop it first.`);
1137
+ if (isCodexAppServerLiveThreadClaimed(client, options.threadId) || isCodexAppServerLiveThreadProtected(client, options.threadId)) throw new Error(`Codex thread ${options.threadId} is claimed by active work; stop it first.`);
1138
1138
  return await releaseCodexRetainedLiveThread({
1139
1139
  ...options,
1140
1140
  client,
@@ -1146,7 +1146,7 @@ async function releaseCodexBoundLiveThread(options) {
1146
1146
  } : void 0
1147
1147
  });
1148
1148
  } finally {
1149
- const retiredExit = previous?.release(!isCodexAppServerLiveThreadClaimed(client, options.threadId));
1149
+ const retiredExit = previous?.release(!isCodexAppServerLiveThreadClaimed(client, options.threadId) && !isCodexAppServerLiveThreadProtected(client, options.threadId));
1150
1150
  if (retiredExit) await racePromiseWithAbortSignal(retiredExit, options.signal, codexThreadLifecycleAbortError);
1151
1151
  }
1152
1152
  }
@@ -1190,6 +1190,33 @@ async function tryReuseCodexLiveThread(options) {
1190
1190
  let ownershipTransferred = false;
1191
1191
  let preserveSubscription = false;
1192
1192
  let nativeThread;
1193
+ const cleanup = async (retainSubscription, ownership = retainedThread) => {
1194
+ let failure;
1195
+ try {
1196
+ let pendingRetention;
1197
+ if (retainSubscription) {
1198
+ const retain = () => {
1199
+ assertWarmOwner();
1200
+ if (isSameCodexAppServerThreadOwner(params.bindingStore.read(bindingIdentity), binding)) pendingRetention = retainCodexAppServerBindingSubscription(params.client, binding.threadId, ownership);
1201
+ };
1202
+ try {
1203
+ if (params.authority) await params.authority.withCurrent(retain);
1204
+ else retain();
1205
+ } catch {}
1206
+ }
1207
+ if (pendingRetention) {
1208
+ if (!await pendingRetention) failure = { cause: /* @__PURE__ */ new Error("Codex live thread ownership could not be returned to its session") };
1209
+ } else await retainedThread.release(binding.threadId);
1210
+ } catch (cause) {
1211
+ failure = { cause };
1212
+ }
1213
+ if (failure) await abandonCodexLiveThreadRelease({
1214
+ client: params.client,
1215
+ abandonClient: params.abandonClient,
1216
+ lifecycleTiming,
1217
+ threadId: binding.threadId
1218
+ }, failure.cause);
1219
+ };
1193
1220
  try {
1194
1221
  assertWarmOwner();
1195
1222
  if (binding.preserveNativeModel || binding.connectionScope === "supervision") {
@@ -1208,7 +1235,10 @@ async function tryReuseCodexLiveThread(options) {
1208
1235
  }
1209
1236
  const pluginThreadConfig = await options.buildLoadedPluginThreadConfig(binding);
1210
1237
  assertWarmOwner();
1211
- if (pluginThreadConfig && pluginThreadConfig.fingerprint !== binding.pluginAppsFingerprint) return { kind: "rotate" };
1238
+ if (pluginThreadConfig && pluginThreadConfig.fingerprint !== binding.pluginAppsFingerprint) {
1239
+ preserveSubscription = true;
1240
+ return { kind: "rotate" };
1241
+ }
1212
1242
  const prebuiltFinalConfigPatch = await prepareCodexThreadFinalConfigPatch(params, options.nativeModelInputTools, binding);
1213
1243
  const pluginAppsConfigPatch = pluginThreadConfig?.configPatch ?? (params.pluginThreadConfig?.enabled && binding.pluginAppPolicyContext ? buildCodexPluginAppsConfigPatchFromPolicyContext(binding.pluginAppPolicyContext) : void 0);
1214
1244
  const resumeAuthProfileId = binding.connectionScope === "supervision" ? void 0 : params.params.authProfileId ?? binding.authProfileId;
@@ -1299,50 +1329,30 @@ async function tryReuseCodexLiveThread(options) {
1299
1329
  threadId: binding.threadId,
1300
1330
  action: "resumed"
1301
1331
  });
1332
+ const liveThreadEphemeralPolicy = ephemeralPolicy && {
1333
+ ...ephemeralPolicy,
1334
+ refreshableInstructions: params.refreshableInstructions
1335
+ };
1302
1336
  ownershipTransferred = true;
1303
1337
  return {
1304
1338
  kind: "ready",
1339
+ cleanupOnFailure: () => cleanup(isCodexAppServerLiveThreadProtected(params.client, binding.threadId), {
1340
+ ...retainedThread,
1341
+ configFingerprint: liveThreadConfigFingerprint,
1342
+ ephemeralPolicy: liveThreadEphemeralPolicy
1343
+ }),
1305
1344
  binding: {
1306
1345
  ...binding,
1307
1346
  ...!incognito ? bindingPatch : {},
1308
1347
  liveThreadConfigFingerprint,
1309
- liveThreadEphemeralPolicy: ephemeralPolicy && {
1310
- ...ephemeralPolicy,
1311
- refreshableInstructions: params.refreshableInstructions
1312
- },
1348
+ liveThreadEphemeralPolicy,
1313
1349
  liveThreadOwnership: retainedThread,
1314
1350
  ...!incognito && retainedThread.serviceTier && resumeParams.serviceTier === void 0 ? { clearInheritedServiceTier: true } : {},
1315
1351
  lifecycle: { action: "resumed" }
1316
1352
  }
1317
1353
  };
1318
1354
  } finally {
1319
- if (!ownershipTransferred) {
1320
- let failure;
1321
- try {
1322
- let pendingRetention;
1323
- if (preserveSubscription) {
1324
- const retain = () => {
1325
- assertWarmOwner();
1326
- if (isSameCodexAppServerThreadOwner(params.bindingStore.read(bindingIdentity), binding)) pendingRetention = retainCodexAppServerBindingSubscription(params.client, binding.threadId, retainedThread);
1327
- };
1328
- try {
1329
- if (params.authority) await params.authority.withCurrent(retain);
1330
- else retain();
1331
- } catch {}
1332
- }
1333
- if (pendingRetention) {
1334
- if (!await pendingRetention) failure = { cause: /* @__PURE__ */ new Error("Codex live thread ownership could not be returned to its session") };
1335
- } else await retainedThread.release(binding.threadId);
1336
- } catch (cause) {
1337
- failure = { cause };
1338
- }
1339
- if (failure) await abandonCodexLiveThreadRelease({
1340
- client: params.client,
1341
- abandonClient: params.abandonClient,
1342
- lifecycleTiming,
1343
- threadId: binding.threadId
1344
- }, failure.cause);
1345
- }
1355
+ if (!ownershipTransferred) await cleanup(preserveSubscription);
1346
1356
  }
1347
1357
  }
1348
1358
  //#endregion
@@ -1837,7 +1847,8 @@ async function recoverPendingSupervisionArtifacts(params, pending) {
1837
1847
  async function startOrResumeThread(input) {
1838
1848
  const incognito = isIncognitoSessionKey(input.params.sessionKey);
1839
1849
  const clientId = resolveCodexAppServerClientInstanceId(input.client);
1840
- return await withCodexThreadLifecycleBinding(input, async (bindingIdentity, saved, authority) => {
1850
+ let cleanupWarmBinding;
1851
+ const prep = withCodexThreadLifecycleBinding(input, async (bindingIdentity, saved, authority) => {
1841
1852
  const assert = authority.assertCurrent;
1842
1853
  const params = {
1843
1854
  ...input,
@@ -2118,7 +2129,10 @@ async function startOrResumeThread(input) {
2118
2129
  clientId,
2119
2130
  buildLoadedPluginThreadConfig
2120
2131
  });
2121
- if (warmReuse.kind === "ready") return publishCodexThreadInferenceBinding(params, warmReuse.binding, true);
2132
+ if (warmReuse.kind === "ready") {
2133
+ cleanupWarmBinding = warmReuse.cleanupOnFailure;
2134
+ return publishCodexThreadInferenceBinding(params, warmReuse.binding, true);
2135
+ }
2122
2136
  if (incognito || warmReuse.kind === "rotate") {
2123
2137
  throwIfAborted();
2124
2138
  stageBindingReplacement(incognito ? "rotating an unavailable ephemeral thread binding" : "rotating a stale plugin app binding");
@@ -2153,6 +2167,16 @@ async function startOrResumeThread(input) {
2153
2167
  if (replacementPredecessor && !preserveExistingBinding && configuredMcpOwnershipChanged) await releaseRetainedThread(replacementPredecessor.threadId, replacementPredecessor.clientId);
2154
2168
  return publishCodexThreadInferenceBinding(params, started);
2155
2169
  });
2170
+ try {
2171
+ return await prep;
2172
+ } catch (error) {
2173
+ if (cleanupWarmBinding) try {
2174
+ await cleanupWarmBinding();
2175
+ } catch (releaseError) {
2176
+ throw new AggregateError([error, releaseError], "Codex warm thread preparation and subscription cleanup failed", { cause: releaseError });
2177
+ }
2178
+ throw error;
2179
+ }
2156
2180
  }
2157
2181
  //#endregion
2158
2182
  //#region extensions/codex/src/app-server/user-input.ts