@openclaw/codex 2026.10.5-beta.1 → 2026.10.5-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/.setup/{account-usage-runtime-QBZsvZS8.mjs → account-usage-runtime-CBR8imwK.mjs} +1 -1
  2. package/dist/.setup/{apply-CBMV8LN0.mjs → apply-CfWD3Bk6.mjs} +4 -4
  3. package/dist/.setup/{attempt-client-cleanup-t-kd_1ys.mjs → attempt-client-cleanup-D3YvP0N7.mjs} +4 -4
  4. package/dist/.setup/{auth-cache-key-DyfUvsSa.mjs → auth-cache-key-BzYrcgwJ.mjs} +1 -1
  5. package/dist/.setup/{bounded-turn-CyQVQwGe.mjs → bounded-turn-BmChqNaK.mjs} +7 -7
  6. package/dist/.setup/{build-state-CzLMy1S9.mjs → build-state-sjOWPg_o.mjs} +1 -1
  7. package/dist/.setup/{client-y7nO6X9c.mjs → client-aPKNc4Ii.mjs} +3 -3
  8. package/dist/.setup/{client-catalog-response-DsbEAtpd.mjs → client-catalog-response-Du2GmrOV.mjs} +1 -1
  9. package/dist/.setup/{command-dispatch-uA9lz2Kf.mjs → command-dispatch-CF6mgl3u.mjs} +1 -1
  10. package/dist/.setup/{command-handlers-VBaJnpZo.mjs → command-handlers-DlycReQg.mjs} +10 -10
  11. package/dist/.setup/{command-rpc-C9VxOLuG.mjs → command-rpc-CUy4Bo-0.mjs} +6 -6
  12. package/dist/.setup/{compact-CD8xJxXS.mjs → compact-BCCjM_cb.mjs} +9 -9
  13. package/dist/.setup/{computer-use-CiToXF5C.mjs → computer-use-C6yYfm6-.mjs} +4 -4
  14. package/dist/.setup/{conversation-binding-CTSLDM9S.mjs → conversation-binding-CP_mK17t.mjs} +7 -7
  15. package/dist/.setup/{dynamic-tool-build-D731PCdv.mjs → dynamic-tool-build-DKko0Jjw.mjs} +1 -1
  16. package/dist/.setup/{dynamic-tools-D0pYbxHH.mjs → dynamic-tools-8hqa1jVc.mjs} +6 -6
  17. package/dist/.setup/{effective-mcp-catalog-1hWFKghy.mjs → effective-mcp-catalog-uIZ4w7Nh.mjs} +4 -4
  18. package/dist/.setup/{ephemeral-turn-Cphy5Qr_.mjs → ephemeral-turn-DAlEbytF.mjs} +2 -2
  19. package/dist/.setup/{isolated-completion-Bhqd2yBq.mjs → isolated-completion-BWEjVHBf.mjs} +3 -3
  20. package/dist/.setup/{mcp-app-session-preparation-DqSvxFqc.mjs → mcp-app-session-preparation-CJR8ib5s.mjs} +3 -3
  21. package/dist/.setup/{model-catalog-B227ST3D.mjs → model-catalog-Ben3FsFp.mjs} +26 -19
  22. package/dist/.setup/{models-DdRyi93L.mjs → models-BB0l-gUb.mjs} +3 -3
  23. package/dist/.setup/{native-hook-relay-BUWIOrSr.mjs → native-hook-relay-DQzvuJ-W.mjs} +3 -3
  24. package/dist/.setup/{native-mcp-app-CjxJQ4F7.mjs → native-mcp-app-UkwXOBfS.mjs} +4 -4
  25. package/dist/.setup/{native-skill-isolation-UMVoNjZz.mjs → native-skill-isolation-DoRxgQPX.mjs} +2 -2
  26. package/dist/.setup/{native-subagent-monitor-iHc8oLg5.mjs → native-subagent-monitor-DC4clzAD.mjs} +6 -6
  27. package/dist/.setup/{plan-C_F3aio0.mjs → plan-DFVngccH.mjs} +2 -2
  28. package/dist/.setup/{plugin-approval-roundtrip-BSV-51ig.mjs → plugin-approval-roundtrip-68FoMlaZ.mjs} +1 -1
  29. package/dist/.setup/{provider-BJ4xhaGX.mjs → provider-BCXRBKEb.mjs} +4 -4
  30. package/dist/.setup/{provider-capabilities-CjRaV3bx.mjs → provider-capabilities-DWH29sy3.mjs} +1 -1
  31. package/dist/.setup/{request-Y8dmbqZ3.mjs → request-DInueZ2q.mjs} +1 -1
  32. package/dist/.setup/{run-attempt-Dx7a4Mfm.mjs → run-attempt-BN-0TO0P.mjs} +27 -22
  33. package/dist/.setup/{session-catalog-events-DzFlXNUe.mjs → session-catalog-events-DujfzcAY.mjs} +3 -3
  34. package/dist/.setup/{session-catalog-index-DozvkUPd.mjs → session-catalog-index-DQ9_sj42.mjs} +4 -4
  35. package/dist/.setup/{session-catalog-native-projection-rCKnZud1.mjs → session-catalog-native-projection-BY2zMkMO.mjs} +1 -1
  36. package/dist/.setup/{session-catalog-projection-DDVmALHj.mjs → session-catalog-projection-BTXOyzl_.mjs} +1 -1
  37. package/dist/.setup/{session-catalog-source-CygTGmrb.mjs → session-catalog-source-yQpy2Y6b.mjs} +1 -1
  38. package/dist/.setup/{session-retirement-IoS3zr17.mjs → session-retirement-CIDqLMII.mjs} +5 -5
  39. package/dist/.setup/{settled-turn-finalizer-X-Fylp-u.mjs → settled-turn-finalizer-C6tjH8RJ.mjs} +3 -3
  40. package/dist/.setup/{shared-client-ByIwuAC-.mjs → shared-client-CCz9ldpr.mjs} +11 -6
  41. package/dist/.setup/{side-question-BDUdozFy.mjs → side-question-COaYBoON.mjs} +9 -9
  42. package/dist/.setup/{source-Bxbqf3S1.mjs → source-DsubBCYm.mjs} +1 -1
  43. package/dist/.setup/{thread-lifecycle-run-CfP4PnEf.mjs → thread-lifecycle-run-CxVfnkG-.mjs} +71 -47
  44. package/dist/.setup/{thread-ownership-Be53aiaG.mjs → thread-ownership-_2e1sjfi.mjs} +3 -3
  45. package/dist/.setup/{thread-policy-CHgY-KNl.mjs → thread-policy-CLTwg3ZA.mjs} +3 -3
  46. package/dist/.setup/{thread-resume-B2EmMcgE.mjs → thread-resume-C6qsk8_o.mjs} +4 -4
  47. package/dist/.setup/{turn-router-DKDAziUW.mjs → turn-router-CSJl3yYQ.mjs} +1 -1
  48. package/dist/.setup/{upstream-session-fork-Djp_yssT.mjs → upstream-session-fork-BC45E4Pe.mjs} +8 -8
  49. package/dist/.setup/{usage-DQA-peQC.mjs → usage-1eNaNDM2.mjs} +1 -1
  50. package/dist/.setup/{usage-limit-error-2t3KBqiX.mjs → usage-limit-error-CJoJ_F8V.mjs} +1 -1
  51. package/dist/.setup/{web-search-provider.runtime-BsuCMNix.mjs → web-search-provider.runtime-Qq_wUrvv.mjs} +1 -1
  52. package/dist/catalog-page.worker.js +1 -1
  53. package/dist/harness.js +15 -15
  54. package/dist/index.js +24 -24
  55. package/dist/media-understanding-provider.js +2 -2
  56. package/dist/migration-provider-api.js +1 -1
  57. package/package.json +4 -4
@@ -5,7 +5,7 @@ import { l as fingerprintCodexPolicy } from "./config-security-clxAZYWX.mjs";
5
5
  import { f as resolveCodexPluginsPolicy } from "./config-parsing-DsWSCPHO.mjs";
6
6
  import { n as resolveCodexAppServerLocalHomeDir, t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
7
7
  import { d as readCodexEffectiveConfig, s as assertCodexModelBackedReviewerEffectiveConfig, u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-DDzeNQ8m.mjs";
8
- import { S as retainSharedCodexAppServerClientByInstanceId, d as getCurrentSharedClientEntry } from "./auth-cache-key-DyfUvsSa.mjs";
8
+ import { S as retainSharedCodexAppServerClientByInstanceId, d as getCurrentSharedClientEntry } from "./auth-cache-key-BzYrcgwJ.mjs";
9
9
  import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-CeyYScUC.mjs";
10
10
  import { o as isCodexAppServerOverloadError, r as CodexAppServerRpcError, s as isCodexThreadReadMissingError } from "./rpc-error-C98SHchT.mjs";
11
11
  import { t as codexCatalogHomeId } from "./session-catalog-home-id-vlih0B_g.mjs";
@@ -18,22 +18,22 @@ import { c as resolveRecoverableCodexPluginConfigKeys } from "./plugin-inventory
18
18
  import "./config-C1YVVLEA.mjs";
19
19
  import { c as resolveCodexContextEngineProjectionMaxChars } from "./context-engine-projection-ps-yn_ci.mjs";
20
20
  import { n as normalizeCodexAppServerBindingModelProvider } from "./auth-profile-CgHQ8Vot.mjs";
21
- import { 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-ByIwuAC-.mjs";
22
- import { C as resolveCodexThreadRolloutPath, F as getCodexAppServerClientInstanceId, L as resolveCodexAppServerClientInstanceId, S as readSupervisionResponseThreadId, c as isCodexAppServerRequestTimeoutError, g as assertCodexThreadStartResponse, m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, v as assertExactSupervisionModelSelection } from "./client-y7nO6X9c.mjs";
23
- import { r as hasCodexAppServerSiblingRouteWork } from "./turn-router-DKDAziUW.mjs";
24
- import { f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-t-kd_1ys.mjs";
21
+ import { $ as createCodexEphemeralThreadPolicy, A as bindCodexInferenceThread, B as isCodexAppServerClientRuntimeLive, C as CodexThreadBindingConflictError, F as consumeCodexAppServerLiveThread, H as isCodexAppServerLiveThreadProtected, K as releaseCodexAppServerLiveThread, M as getCodexInferenceThreadQualification, N as prepareCodexInferenceThreadConfig, S as CodexAdoptedThreadActiveError, T as CodexThreadStartRequestError, V as isCodexAppServerLiveThreadClaimed, Y as unsubscribeCodexAppServerLiveThread, j as getCodexInferenceThread, k as assertCodexInferenceRouteConfig, n as captureCodexAppServerClientLifetime, w as CodexThreadClientReplacementError, z as hasCodexAppServerSiblingThreadWork } from "./shared-client-CCz9ldpr.mjs";
22
+ import { C as resolveCodexThreadRolloutPath, F as getCodexAppServerClientInstanceId, L as resolveCodexAppServerClientInstanceId, S as readSupervisionResponseThreadId, c as isCodexAppServerRequestTimeoutError, g as assertCodexThreadStartResponse, m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, v as assertExactSupervisionModelSelection } from "./client-aPKNc4Ii.mjs";
23
+ import { r as hasCodexAppServerSiblingRouteWork } from "./turn-router-CSJl3yYQ.mjs";
24
+ import { f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-D3YvP0N7.mjs";
25
25
  import { a as buildCodexPluginThreadConfigInputFingerprint, c as buildPluginAppPolicyContext, d as mergeCodexThreadConfigs, i as buildCodexPluginThreadConfig, l as disableUnlistedCodexApps, m as buildCodexAppApprovalOverrides, n as mergeCodexNativeProjectDocThreadConfig, o as buildCodexPluginThreadConfigTimeoutFallback, p as shouldBuildCodexPluginThreadConfig, r as buildCodexPluginAppsConfigPatchFromPolicyContext, u as isCodexPluginThreadBindingStale } from "./project-doc-thread-config-BVcvnps8.mjs";
26
26
  import { A as isTransientWebSearchRestriction, C as fingerprintEnvironmentSelection, D as readActiveCodexTurnIdsFromResume, E as legacyFingerprintUserMcpServersConfigPatch, I as isMessageOnlyCodexSourceReply, L as isSystemAgentOnlyCodexDynamicToolAllowlist, M as shouldRotateCodexAppServerBindingForRuntime, N as shouldRotateCodexGpt56MultiAgentBinding, O as shouldStartTransientNoToolThread, S as fingerprintCodexThreadConfig, T as fingerprintUserMcpServersConfigPatch, _ as buildDeveloperInstructions, b as codexDynamicToolsFingerprint, c as codexThreadSandboxOrPermissions, d as readCodexManagedRequirementsFingerprint, f as resolveCodexThreadApprovalsReviewer, g as mergeCodexNativeShellEnvironment, h as resolveCodexWebSearchPlan, i as buildCodexRuntimeThreadConfigForRun, j as shouldRecheckRecoverablePluginBinding, n as buildCodexRingZeroThreadConfigPatch, o as buildThreadResumeParams, p as attestCodexRestrictedToolSurfaceMcpServersDisabled, s as buildThreadStartParams, t as assertCodexManagedRequirementsDoNotOverrideToolPolicy, u as readCodexInheritedMcpServerNames, v as areCodexDynamicToolFingerprintsCompatible, w as fingerprintJsonObject, x as codexLegacyDynamicToolsFingerprint, y as areUserMcpServersFingerprintsCompatible } from "./thread-requests-BgzJwJtS.mjs";
27
27
  import { i as resolveCodexSessionBinding, o as hashCodexAppServerBindingFingerprint } from "./session-binding-JEHNMPsr.mjs";
28
28
  import { i as resolveCodexAppServerThreadModelSelection, n as resolveCodexAppServerModelProvider } from "./thread-model-selection-DcVebr8N.mjs";
29
- import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-Be53aiaG.mjs";
30
- import { a as refreshCodexThreadInstructions, i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy, r as assertAdoptedCodexThreadResumeAllowed, t as CodexIncognitoPolicyChangeError } from "./thread-policy-CHgY-KNl.mjs";
31
- import { t as resumeCodexAppServerThread } from "./thread-resume-B2EmMcgE.mjs";
29
+ import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-_2e1sjfi.mjs";
30
+ import { a as refreshCodexThreadInstructions, i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy, r as assertAdoptedCodexThreadResumeAllowed, t as CodexIncognitoPolicyChangeError } from "./thread-policy-CLTwg3ZA.mjs";
31
+ import { t as resumeCodexAppServerThread } from "./thread-resume-C6qsk8_o.mjs";
32
32
  import { r as readCodexMcpToolConnectorId } from "./mcp-tool-metadata-DW41snf3.mjs";
33
- import { n as disableCodexPluginThreadConfig } from "./dynamic-tool-build-D731PCdv.mjs";
34
- import { n as CodexManagedHooksOnlyError, r as assertCodexNativeHookRelayAllowed } from "./native-hook-relay-BUWIOrSr.mjs";
33
+ import { n as disableCodexPluginThreadConfig } from "./dynamic-tool-build-DKko0Jjw.mjs";
34
+ import { n as CodexManagedHooksOnlyError, r as assertCodexNativeHookRelayAllowed } from "./native-hook-relay-DQzvuJ-W.mjs";
35
35
  import { t as defaultCodexPluginMetadataCache } from "./plugin-metadata-cache-Bi8TAPwX.mjs";
36
- import { a as discardUnattestedCodexPluginThread, i as checkCodexThreadAppAvailability, n as resolveCodexNativeSkillIsolation, o as hasCodexNativeToolCatalog, r as attestCodexThreadToolSurface, s as loadCodexNativeToolCatalog, t as applyCodexNativeSkillIsolation } from "./native-skill-isolation-UMVoNjZz.mjs";
36
+ import { a as discardUnattestedCodexPluginThread, i as checkCodexThreadAppAvailability, n as resolveCodexNativeSkillIsolation, o as hasCodexNativeToolCatalog, r as attestCodexThreadToolSurface, s as loadCodexNativeToolCatalog, t as applyCodexNativeSkillIsolation } from "./native-skill-isolation-DoRxgQPX.mjs";
37
37
  import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
38
38
  import crypto from "node:crypto";
39
39
  import { isDeepStrictEqual } from "node:util";
@@ -1220,7 +1220,7 @@ async function releaseCodexBoundLiveThread(options) {
1220
1220
  if (changedClient && !previous) return false;
1221
1221
  const client = previous?.client ?? options.client;
1222
1222
  try {
1223
- if (isCodexAppServerLiveThreadClaimed(client, options.threadId)) throw new Error(`Codex thread ${options.threadId} is claimed by active work; stop it first.`);
1223
+ if (isCodexAppServerLiveThreadClaimed(client, options.threadId) || isCodexAppServerLiveThreadProtected(client, options.threadId)) throw new Error(`Codex thread ${options.threadId} is claimed by active work; stop it first.`);
1224
1224
  return await releaseCodexRetainedLiveThread({
1225
1225
  ...options,
1226
1226
  client,
@@ -1232,7 +1232,7 @@ async function releaseCodexBoundLiveThread(options) {
1232
1232
  } : void 0
1233
1233
  });
1234
1234
  } finally {
1235
- const retiredExit = previous?.release(!isCodexAppServerLiveThreadClaimed(client, options.threadId));
1235
+ const retiredExit = previous?.release(!isCodexAppServerLiveThreadClaimed(client, options.threadId) && !isCodexAppServerLiveThreadProtected(client, options.threadId));
1236
1236
  if (retiredExit) await racePromiseWithAbortSignal(retiredExit, options.signal, codexThreadLifecycleAbortError);
1237
1237
  }
1238
1238
  }
@@ -1276,6 +1276,33 @@ async function tryReuseCodexLiveThread(options) {
1276
1276
  let ownershipTransferred = false;
1277
1277
  let preserveSubscription = false;
1278
1278
  let nativeThread;
1279
+ const cleanup = async (retainSubscription, ownership = retainedThread) => {
1280
+ let failure;
1281
+ try {
1282
+ let pendingRetention;
1283
+ if (retainSubscription) {
1284
+ const retain = () => {
1285
+ assertWarmOwner();
1286
+ if (isSameCodexAppServerThreadOwner(params.bindingStore.read(bindingIdentity), binding)) pendingRetention = retainCodexAppServerBindingSubscription(params.client, binding.threadId, ownership);
1287
+ };
1288
+ try {
1289
+ if (params.authority) await params.authority.withCurrent(retain);
1290
+ else retain();
1291
+ } catch {}
1292
+ }
1293
+ if (pendingRetention) {
1294
+ if (!await pendingRetention) failure = { cause: /* @__PURE__ */ new Error("Codex live thread ownership could not be returned to its session") };
1295
+ } else await retainedThread.release(binding.threadId);
1296
+ } catch (cause) {
1297
+ failure = { cause };
1298
+ }
1299
+ if (failure) await abandonCodexLiveThreadRelease({
1300
+ client: params.client,
1301
+ abandonClient: params.abandonClient,
1302
+ lifecycleTiming,
1303
+ threadId: binding.threadId
1304
+ }, failure.cause);
1305
+ };
1279
1306
  try {
1280
1307
  assertWarmOwner();
1281
1308
  if (binding.preserveNativeModel || binding.connectionScope === "supervision") {
@@ -1294,7 +1321,10 @@ async function tryReuseCodexLiveThread(options) {
1294
1321
  }
1295
1322
  const pluginThreadConfig = await options.buildLoadedPluginThreadConfig(binding);
1296
1323
  assertWarmOwner();
1297
- if (pluginThreadConfig && pluginThreadConfig.fingerprint !== binding.pluginAppsFingerprint) return { kind: "rotate" };
1324
+ if (pluginThreadConfig && pluginThreadConfig.fingerprint !== binding.pluginAppsFingerprint) {
1325
+ preserveSubscription = true;
1326
+ return { kind: "rotate" };
1327
+ }
1298
1328
  const prebuiltFinalConfigPatch = await prepareCodexThreadFinalConfigPatch(params, options.nativeModelInputTools, binding);
1299
1329
  const pluginAppsConfigPatch = pluginThreadConfig?.configPatch ?? (params.pluginThreadConfig?.enabled && binding.pluginAppPolicyContext ? buildCodexPluginAppsConfigPatchFromPolicyContext(binding.pluginAppPolicyContext) : void 0);
1300
1330
  const resumeAuthProfileId = binding.connectionScope === "supervision" ? void 0 : params.params.authProfileId ?? binding.authProfileId;
@@ -1369,50 +1399,30 @@ async function tryReuseCodexLiveThread(options) {
1369
1399
  threadId: binding.threadId,
1370
1400
  action: "resumed"
1371
1401
  });
1402
+ const liveThreadEphemeralPolicy = ephemeralPolicy && {
1403
+ ...ephemeralPolicy,
1404
+ refreshableInstructions: params.refreshableInstructions
1405
+ };
1372
1406
  ownershipTransferred = true;
1373
1407
  return {
1374
1408
  kind: "ready",
1409
+ cleanupOnFailure: () => cleanup(isCodexAppServerLiveThreadProtected(params.client, binding.threadId), {
1410
+ ...retainedThread,
1411
+ configFingerprint: liveThreadConfigFingerprint,
1412
+ ephemeralPolicy: liveThreadEphemeralPolicy
1413
+ }),
1375
1414
  binding: {
1376
1415
  ...binding,
1377
1416
  ...!incognito ? bindingPatch : {},
1378
1417
  liveThreadConfigFingerprint,
1379
- liveThreadEphemeralPolicy: ephemeralPolicy && {
1380
- ...ephemeralPolicy,
1381
- refreshableInstructions: params.refreshableInstructions
1382
- },
1418
+ liveThreadEphemeralPolicy,
1383
1419
  liveThreadOwnership: retainedThread,
1384
1420
  ...!incognito && retainedThread.serviceTier && resumeParams.serviceTier === void 0 ? { clearInheritedServiceTier: true } : {},
1385
1421
  lifecycle: { action: "resumed" }
1386
1422
  }
1387
1423
  };
1388
1424
  } finally {
1389
- if (!ownershipTransferred) {
1390
- let failure;
1391
- try {
1392
- let pendingRetention;
1393
- if (preserveSubscription) {
1394
- const retain = () => {
1395
- assertWarmOwner();
1396
- if (isSameCodexAppServerThreadOwner(params.bindingStore.read(bindingIdentity), binding)) pendingRetention = retainCodexAppServerBindingSubscription(params.client, binding.threadId, retainedThread);
1397
- };
1398
- try {
1399
- if (params.authority) await params.authority.withCurrent(retain);
1400
- else retain();
1401
- } catch {}
1402
- }
1403
- if (pendingRetention) {
1404
- if (!await pendingRetention) failure = { cause: /* @__PURE__ */ new Error("Codex live thread ownership could not be returned to its session") };
1405
- } else await retainedThread.release(binding.threadId);
1406
- } catch (cause) {
1407
- failure = { cause };
1408
- }
1409
- if (failure) await abandonCodexLiveThreadRelease({
1410
- client: params.client,
1411
- abandonClient: params.abandonClient,
1412
- lifecycleTiming,
1413
- threadId: binding.threadId
1414
- }, failure.cause);
1415
- }
1425
+ if (!ownershipTransferred) await cleanup(preserveSubscription);
1416
1426
  }
1417
1427
  }
1418
1428
  //#endregion
@@ -1879,7 +1889,8 @@ async function recoverPendingSupervisionArtifacts(params, pending) {
1879
1889
  async function startOrResumeThread(input) {
1880
1890
  const incognito = isIncognitoSessionKey(input.params.sessionKey);
1881
1891
  const clientId = resolveCodexAppServerClientInstanceId(input.client);
1882
- return await withCodexThreadLifecycleBinding(input, async (bindingIdentity, saved, authority) => {
1892
+ let cleanupWarmBinding;
1893
+ const prep = withCodexThreadLifecycleBinding(input, async (bindingIdentity, saved, authority) => {
1883
1894
  const assert = authority.assertCurrent;
1884
1895
  const params = {
1885
1896
  ...input,
@@ -2143,7 +2154,10 @@ async function startOrResumeThread(input) {
2143
2154
  clientId,
2144
2155
  buildLoadedPluginThreadConfig
2145
2156
  });
2146
- if (warmReuse.kind === "ready") return publishCodexThreadInferenceBinding(params, warmReuse.binding, true);
2157
+ if (warmReuse.kind === "ready") {
2158
+ cleanupWarmBinding = warmReuse.cleanupOnFailure;
2159
+ return publishCodexThreadInferenceBinding(params, warmReuse.binding, true);
2160
+ }
2147
2161
  if (incognito || warmReuse.kind === "rotate") {
2148
2162
  throwIfAborted();
2149
2163
  stageBindingReplacement(incognito ? "rotating an unavailable ephemeral thread binding" : "rotating a stale plugin app binding");
@@ -2178,6 +2192,16 @@ async function startOrResumeThread(input) {
2178
2192
  if (replacementPredecessor && !preserveExistingBinding && configuredMcpOwnershipChanged) await releaseRetainedThread(replacementPredecessor.threadId, replacementPredecessor.clientId);
2179
2193
  return publishCodexThreadInferenceBinding(params, started);
2180
2194
  });
2195
+ try {
2196
+ return await prep;
2197
+ } catch (error) {
2198
+ if (cleanupWarmBinding) try {
2199
+ await cleanupWarmBinding();
2200
+ } catch (releaseError) {
2201
+ throw new AggregateError([error, releaseError], "Codex warm thread preparation and subscription cleanup failed", { cause: releaseError });
2202
+ }
2203
+ throw error;
2204
+ }
2181
2205
  }
2182
2206
  //#endregion
2183
2207
  export { prepareCodexPluginThreadConfigStartupProvider as a, buildLegacyScheduledCodexAppRecoveryPrompt as c, resolveScheduledCodexAppCreatorCaptureDecision as d, isContextEngineBindingCompatible as i, buildScheduledCodexAppServerConnectionIdentity as l, isCodexAppServerProfilerEnabled as n, resolveCodexPluginThreadConfigStartupPolicy as o, buildContextEngineBinding as r, assertScheduledCodexAppAuthorityRuntime as s, startOrResumeThread as t, captureScheduledCodexAppAuthority as u };
@@ -1,7 +1,7 @@
1
- import { S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-DyfUvsSa.mjs";
1
+ import { S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-BzYrcgwJ.mjs";
2
2
  import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-CeyYScUC.mjs";
3
- import { G as releaseCodexAppServerLiveThread, K as retainCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed } from "./shared-client-ByIwuAC-.mjs";
4
- import { f as unsubscribeCodexThreadBestEffort, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-t-kd_1ys.mjs";
3
+ import { K as releaseCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed, q as retainCodexAppServerLiveThread } from "./shared-client-CCz9ldpr.mjs";
4
+ import { f as unsubscribeCodexThreadBestEffort, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-D3YvP0N7.mjs";
5
5
  import { t as __exportAll } from "./session-binding-sidecars-DD-enC8w.mjs";
6
6
  import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
7
7
  import { runWithAsyncWorkResources } from "openclaw/plugin-sdk/agent-harness-tool-runtime";
@@ -1,7 +1,7 @@
1
1
  import { i as CodexAppServerScopedRequestRejectedError, o as isCodexAppServerOverloadError } from "./rpc-error-C98SHchT.mjs";
2
- import { n as requestCodexAppServerClientJson } from "./request-Y8dmbqZ3.mjs";
3
- import { S as CodexAdoptedThreadActiveError } from "./shared-client-ByIwuAC-.mjs";
4
- import { p as assertCodexThreadAcceptsDirectInput, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-y7nO6X9c.mjs";
2
+ import { n as requestCodexAppServerClientJson } from "./request-DInueZ2q.mjs";
3
+ import { S as CodexAdoptedThreadActiveError } from "./shared-client-CCz9ldpr.mjs";
4
+ import { p as assertCodexThreadAcceptsDirectInput, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-aPKNc4Ii.mjs";
5
5
  import { AgentHarnessPreflightError, embeddedAgentLog, formatErrorMessage } from "openclaw/plugin-sdk/agent-harness-runtime";
6
6
  //#region extensions/codex/src/app-server/thread-policy.ts
7
7
  /** A refusal, not a failed native write: the ephemeral conversation must stay alive. */
@@ -1,8 +1,8 @@
1
1
  import { i as CodexAppServerScopedRequestRejectedError, o as isCodexAppServerOverloadError, r as CodexAppServerRpcError } from "./rpc-error-C98SHchT.mjs";
2
- import { r as publishCodexCatalogResume } from "./session-catalog-events-DzFlXNUe.mjs";
3
- import { L as forgetCodexWorkspaceReferences, ft as isCodexAppServerStartupError, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-ByIwuAC-.mjs";
4
- import { h as assertCodexThreadResumeResponse, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-y7nO6X9c.mjs";
5
- import { f as unsubscribeCodexThreadBestEffort, i as assertCodexThreadResumeSubscription, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-t-kd_1ys.mjs";
2
+ import { r as publishCodexCatalogResume } from "./session-catalog-events-DujfzcAY.mjs";
3
+ import { L as forgetCodexWorkspaceReferences, pt as isCodexAppServerStartupError, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-CCz9ldpr.mjs";
4
+ import { h as assertCodexThreadResumeResponse, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-aPKNc4Ii.mjs";
5
+ import { f as unsubscribeCodexThreadBestEffort, i as assertCodexThreadResumeSubscription, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-D3YvP0N7.mjs";
6
6
  import { sanitizeTerminalText } from "openclaw/plugin-sdk/text-chunking";
7
7
  //#region extensions/codex/src/app-server/thread-resume.ts
8
8
  /** Owns Codex thread/resume subscription safety. */
@@ -1,6 +1,6 @@
1
1
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
2
2
  import { n as waitForPromiseOrAbort, t as abortReason } from "./timeout-D0mEWSGG.mjs";
3
- import { x as readCodexTurnCompletedNotification } from "./client-y7nO6X9c.mjs";
3
+ import { x as readCodexTurnCompletedNotification } from "./client-aPKNc4Ii.mjs";
4
4
  import { normalizeOptionalString, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { AsyncResource } from "node:async_hooks";
6
6
  import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
@@ -9,22 +9,22 @@ import { r as projectCodexUserItemText } from "./transcript-history-projection-D
9
9
  import { n as codexUpstreamBaseline, t as codexLastTerminalTurnId } from "./session-upstream-marker-D15C9NHp.mjs";
10
10
  import { r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-Bg9DbDI6.mjs";
11
11
  import { n as readCodexSessionMeta } from "./session-catalog-provenance-CmsOE5mh.mjs";
12
- import "./request-Y8dmbqZ3.mjs";
12
+ import "./request-DInueZ2q.mjs";
13
13
  import { r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-C1YVVLEA.mjs";
14
14
  import { r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-DWzK-k0n.mjs";
15
15
  import { l as readCodexMirrorSourceFingerprint, o as fingerprintCodexMirrorSourceMessage } from "./transcript-mirror-attestation-BzUXnrvv.mjs";
16
- import { P as claimCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, f as readCodexAppServerClientDesktopGenerationFingerprint } from "./shared-client-ByIwuAC-.mjs";
17
- import { m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-y7nO6X9c.mjs";
16
+ import { P as claimCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, f as readCodexAppServerClientDesktopGenerationFingerprint } from "./shared-client-CCz9ldpr.mjs";
17
+ import { m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-aPKNc4Ii.mjs";
18
18
  import { d as mergeCodexThreadConfigs, i as buildCodexPluginThreadConfig, p as shouldBuildCodexPluginThreadConfig } from "./project-doc-thread-config-BVcvnps8.mjs";
19
19
  import { T as fingerprintUserMcpServersConfigPatch, _ as buildDeveloperInstructions, a as buildCodexThreadConfiguration, b as codexDynamicToolsFingerprint, h as resolveCodexWebSearchPlan, w as fingerprintJsonObject } from "./thread-requests-BgzJwJtS.mjs";
20
20
  import "./session-binding-JEHNMPsr.mjs";
21
- import "./thread-ownership-Be53aiaG.mjs";
21
+ import "./thread-ownership-_2e1sjfi.mjs";
22
22
  import { n as resolveCodexNativeExecutionPolicy } from "./native-execution-policy-MXEe7PB3.mjs";
23
- import { n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy } from "./thread-policy-CHgY-KNl.mjs";
24
- import { b as isCodexDynamicToolExcluded, f as codexNativeHookRemoteCredentialPath, i as buildCodexNativeHookRelayConfig, l as resolveCodexNativeHookRelayEvents, o as buildCodexNativeHookRelayId, r as assertCodexNativeHookRelayAllowed } from "./native-hook-relay-BUWIOrSr.mjs";
25
- import { c as parseCodexNativeToolCatalog, i as checkCodexThreadAppAvailability, n as resolveCodexNativeSkillIsolation, t as applyCodexNativeSkillIsolation } from "./native-skill-isolation-UMVoNjZz.mjs";
23
+ import { n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy } from "./thread-policy-CLTwg3ZA.mjs";
24
+ import { b as isCodexDynamicToolExcluded, f as codexNativeHookRemoteCredentialPath, i as buildCodexNativeHookRelayConfig, l as resolveCodexNativeHookRelayEvents, o as buildCodexNativeHookRelayId, r as assertCodexNativeHookRelayAllowed } from "./native-hook-relay-DQzvuJ-W.mjs";
25
+ import { c as parseCodexNativeToolCatalog, i as checkCodexThreadAppAvailability, n as resolveCodexNativeSkillIsolation, t as applyCodexNativeSkillIsolation } from "./native-skill-isolation-DoRxgQPX.mjs";
26
26
  import { c as prepareCodexWorkspaceDeveloperInstructions } from "./attempt-workspace-context-CcwP3DA3.mjs";
27
- import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-CjRaV3bx.mjs";
27
+ import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-DWH29sy3.mjs";
28
28
  import { n as prepareCodexSessionInitialization } from "./session-initialization-Bi_2DKhc.mjs";
29
29
  import { createImportedCodexSession } from "./session-history-import-CaO8s6ta.mjs";
30
30
  import { isRecord, normalizeOptionalString, readNonBlankString } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -1,5 +1,5 @@
1
1
  import { t as buildCodexAppServerUsageSnapshot } from "./rate-limits-CI8pTPqL.mjs";
2
- import { t as readCodexAppServerUsage } from "./request-Y8dmbqZ3.mjs";
2
+ import { t as readCodexAppServerUsage } from "./request-DInueZ2q.mjs";
3
3
  import "./config-C1YVVLEA.mjs";
4
4
  import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DWzK-k0n.mjs";
5
5
  import { CODEX_APP_SERVER_AUTH_MARKER } from "openclaw/plugin-sdk/agent-runtime";
@@ -1,7 +1,7 @@
1
1
  import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
2
2
  import { a as shouldRefreshCodexRateLimitsForUsageLimitMessage, i as resolveCodexUsageLimitResetAtMs, n as formatCodexUsageLimitErrorMessage } from "./rate-limits-CI8pTPqL.mjs";
3
3
  import { t as CODEX_CONTROL_METHODS } from "./capabilities-DbOzOglY.mjs";
4
- import { X as readRecentCodexRateLimits, Y as readCodexRateLimitsRevision, Z as rememberCodexRateLimitsRead } from "./shared-client-ByIwuAC-.mjs";
4
+ import { Q as rememberCodexRateLimitsRead, X as readCodexRateLimitsRevision, Z as readRecentCodexRateLimits } from "./shared-client-CCz9ldpr.mjs";
5
5
  import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import { markAuthProfileBlockedUntil } from "openclaw/plugin-sdk/agent-runtime";
7
7
  import { embeddedAgentLog, formatErrorMessage } from "openclaw/plugin-sdk/agent-harness-runtime";
@@ -1,5 +1,5 @@
1
1
  import { m as buildCodexNativeWebSearchThreadConfig } from "./thread-requests-BgzJwJtS.mjs";
2
- import { runBoundedCodexAppServerTurn } from "./bounded-turn-CyQVQwGe.mjs";
2
+ import { runBoundedCodexAppServerTurn } from "./bounded-turn-BmChqNaK.mjs";
3
3
  import { t as projectCodexWebSearchItem } from "./web-search-item-CvokaZOo.mjs";
4
4
  import { readStringParam, resolveSearchTimeoutSeconds, wrapWebContent } from "openclaw/plugin-sdk/provider-web-search";
5
5
  //#region extensions/codex/src/web-search-provider.runtime.ts
@@ -1,4 +1,4 @@
1
- import { t as createCodexCatalogDecoder } from "./.setup/client-catalog-response-DsbEAtpd.mjs";
1
+ import { t as createCodexCatalogDecoder } from "./.setup/client-catalog-response-Du2GmrOV.mjs";
2
2
  import { serveWorkerTasks } from "openclaw/plugin-sdk/worker-task-server";
3
3
  //#region extensions/codex/catalog-page.worker.ts
4
4
  const decode = createCodexCatalogDecoder();
package/dist/harness.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CODEX_NATIVE_TOOL_REQUIREMENTS, CODEX_TOOL_POLICY_SAFE_DENY_NAMES } from "./native-tool-policy.js";
2
2
  import { n as readCodexRuntimeModelId } from "./.setup/model-runtime-BdqzOMkU.mjs";
3
3
  import { m as sessionBindingIdentity } from "./.setup/session-binding-record-DU_0biMD.mjs";
4
- import { t as codexBuildSymbol } from "./.setup/build-state-CzLMy1S9.mjs";
4
+ import { t as codexBuildSymbol } from "./.setup/build-state-sjOWPg_o.mjs";
5
5
  import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime";
6
6
  import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  //#region extensions/codex/harness.ts
@@ -93,7 +93,7 @@ function createCodexAppServerAgentHarness(options) {
93
93
  executionEnvironment: "host-only",
94
94
  upstreamKinds: ["codex-app-server"],
95
95
  fork: async (params) => {
96
- const { forkCodexUpstreamSession } = await import("./.setup/upstream-session-fork-Djp_yssT.mjs");
96
+ const { forkCodexUpstreamSession } = await import("./.setup/upstream-session-fork-BC45E4Pe.mjs");
97
97
  return await forkCodexUpstreamSession(params, {
98
98
  bindingStore: options.bindingStore,
99
99
  controlFactory: sessionCatalogControlFactory,
@@ -115,11 +115,11 @@ function createCodexAppServerAgentHarness(options) {
115
115
  return validateCodexAppServerRuntimeArtifact(binding, void 0, resolveCodexAppServerRuntimeOptions({ pluginConfig: resolveAttemptPluginConfig(options.resolveConfig?.()) }).start);
116
116
  } },
117
117
  fetchUsageSnapshot: async (ctx) => {
118
- const { fetchCodexAppServerUsageSnapshot } = await import("./.setup/usage-DQA-peQC.mjs");
118
+ const { fetchCodexAppServerUsageSnapshot } = await import("./.setup/usage-1eNaNDM2.mjs");
119
119
  return await fetchCodexAppServerUsageSnapshot(ctx, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
120
120
  },
121
121
  loadModelCatalog: async (params) => {
122
- const { createCodexAppServerModelCatalog } = await import("./.setup/model-catalog-B227ST3D.mjs");
122
+ const { createCodexAppServerModelCatalog } = await import("./.setup/model-catalog-Ben3FsFp.mjs");
123
123
  if (disposed) return { entries: [] };
124
124
  modelCatalog ??= createCodexAppServerModelCatalog(harnessRuntimeId);
125
125
  return { entries: await modelCatalog.load(params, resolveAttemptPluginConfig(params.config)) };
@@ -129,7 +129,7 @@ function createCodexAppServerAgentHarness(options) {
129
129
  return asOptionalRecord(asOptionalRecord(resolveAttemptPluginConfig(config))?.appServer)?.enableUltrafast === false ? serviceTiers.filter((tier) => tier !== "ultrafast") : serviceTiers;
130
130
  },
131
131
  acquireMcpAppRuntime: async (params) => {
132
- const { acquireCodexMcpAppRuntime } = await import("./.setup/effective-mcp-catalog-1hWFKghy.mjs");
132
+ const { acquireCodexMcpAppRuntime } = await import("./.setup/effective-mcp-catalog-uIZ4w7Nh.mjs");
133
133
  if (disposed) return;
134
134
  params.assertCurrent();
135
135
  return await acquireCodexMcpAppRuntime(params, {
@@ -138,7 +138,7 @@ function createCodexAppServerAgentHarness(options) {
138
138
  });
139
139
  },
140
140
  loadMcpToolCatalog: async (params) => {
141
- const { loadCodexEffectiveMcpCatalog } = await import("./.setup/effective-mcp-catalog-1hWFKghy.mjs");
141
+ const { loadCodexEffectiveMcpCatalog } = await import("./.setup/effective-mcp-catalog-uIZ4w7Nh.mjs");
142
142
  return await loadCodexEffectiveMcpCatalog(params, { bindingStore: options.bindingStore });
143
143
  },
144
144
  supports: (ctx) => {
@@ -170,7 +170,7 @@ function createCodexAppServerAgentHarness(options) {
170
170
  };
171
171
  },
172
172
  runAttempt: async (params) => {
173
- const { runCodexAppServerAttempt } = await import("./.setup/run-attempt-Dx7a4Mfm.mjs");
173
+ const { runCodexAppServerAttempt } = await import("./.setup/run-attempt-BN-0TO0P.mjs");
174
174
  const { planCodexCyberEscalation, readCodexCyberAttemptVerdict, recordCodexCyberTargetUnavailable, reserveCodexCyberProbe, resolveCodexCyberFailoverConfig } = await import("./.setup/cyber-failover-D4dgNfFf.mjs");
175
175
  const { emitCodexCyberNotice } = await import("./.setup/cyber-failover-notice-ljgGGL0s.mjs");
176
176
  const pluginConfig = resolveAttemptPluginConfig(params.config);
@@ -236,7 +236,7 @@ function createCodexAppServerAgentHarness(options) {
236
236
  const { runHostPreparedIsolatedCompletion } = await import("openclaw/plugin-sdk/simple-completion-runtime");
237
237
  return runHostPreparedIsolatedCompletion(params);
238
238
  }
239
- const { runCodexIsolatedCompletion } = await import("./.setup/isolated-completion-Bhqd2yBq.mjs");
239
+ const { runCodexIsolatedCompletion } = await import("./.setup/isolated-completion-BWEjVHBf.mjs");
240
240
  return runCodexIsolatedCompletion(params, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
241
241
  },
242
242
  runIsolatedCompletion: async (params) => {
@@ -252,11 +252,11 @@ function createCodexAppServerAgentHarness(options) {
252
252
  });
253
253
  },
254
254
  finalizeSettledTurn: async (params) => {
255
- const { runCodexSettledTurnFinalization } = await import("./.setup/settled-turn-finalizer-X-Fylp-u.mjs");
255
+ const { runCodexSettledTurnFinalization } = await import("./.setup/settled-turn-finalizer-C6tjH8RJ.mjs");
256
256
  return runCodexSettledTurnFinalization(params, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
257
257
  },
258
258
  runSideQuestion: async (params) => {
259
- const { runCodexAppServerSideQuestion } = await import("./.setup/side-question-BDUdozFy.mjs");
259
+ const { runCodexAppServerSideQuestion } = await import("./.setup/side-question-COaYBoON.mjs");
260
260
  return runCodexAppServerSideQuestion(params, {
261
261
  bindingStore: options.bindingStore,
262
262
  pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig,
@@ -267,25 +267,25 @@ function createCodexAppServerAgentHarness(options) {
267
267
  },
268
268
  compact: async (params) => {
269
269
  const admittedParams = requireCodexCompactionCapabilities(params);
270
- const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-CD8xJxXS.mjs");
270
+ const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-BCCjM_cb.mjs");
271
271
  return maybeCompactCodexAppServerSession(admittedParams, {
272
272
  bindingStore: options.bindingStore,
273
273
  pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig
274
274
  });
275
275
  },
276
276
  withSessionDeletion: async (params, run) => {
277
- const { withCodexAppServerSessionDeletion } = await import("./.setup/session-retirement-IoS3zr17.mjs");
277
+ const { withCodexAppServerSessionDeletion } = await import("./.setup/session-retirement-CIDqLMII.mjs");
278
278
  params.assertCurrent();
279
279
  return withCodexAppServerSessionDeletion(options.bindingStore, params, run);
280
280
  },
281
281
  withSessionContextReset: async (params, run) => {
282
- const { withCodexAppServerSessionContextReset } = await import("./.setup/session-retirement-IoS3zr17.mjs");
282
+ const { withCodexAppServerSessionContextReset } = await import("./.setup/session-retirement-CIDqLMII.mjs");
283
283
  params.assertCurrent();
284
284
  return withCodexAppServerSessionContextReset(options.bindingStore, params, run);
285
285
  },
286
286
  reset: async (params) => {
287
287
  if (params.sessionId && params.reason !== "deleted") {
288
- const [{ reclaimCurrentCodexSessionGeneration }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./.setup/session-binding-JEHNMPsr.mjs").then((n) => n.a), import("./.setup/session-retirement-IoS3zr17.mjs")]);
288
+ const [{ reclaimCurrentCodexSessionGeneration }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./.setup/session-binding-JEHNMPsr.mjs").then((n) => n.a), import("./.setup/session-retirement-CIDqLMII.mjs")]);
289
289
  const identity = sessionBindingIdentity({
290
290
  agentId: params.agentId,
291
291
  sessionId: params.sessionId,
@@ -318,7 +318,7 @@ function createCodexAppServerAgentHarness(options) {
318
318
  function createCodexAppServerNativeCompaction(options) {
319
319
  return async (params) => {
320
320
  const admittedParams = requireCodexCompactionCapabilities(params);
321
- const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-CD8xJxXS.mjs");
321
+ const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-BCCjM_cb.mjs");
322
322
  return maybeCompactCodexAppServerSession(admittedParams, {
323
323
  bindingStore: options.bindingStore,
324
324
  pluginConfig: options.resolvePluginConfig?.() ?? options.pluginConfig,