@openclaw/codex 2026.9.3 → 2026.9.5

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 (146) hide show
  1. package/assets/activity.svg +30 -0
  2. package/assets/icon.png +0 -0
  3. package/dist/.setup/account-usage-runtime-C2MOIvfq.mjs +75 -0
  4. package/dist/{apply-B6el6hdO.js → .setup/apply-CJ0ZfmBG.mjs} +12 -13
  5. package/dist/.setup/async-questions-DdhOCwGi.mjs +27 -0
  6. package/dist/{attempt-client-cleanup-D6cR54TV.js → .setup/attempt-client-cleanup-BpYKdTA0.mjs} +30 -211
  7. package/dist/{attempt-context-AO4DSjE0.js → .setup/attempt-context-VXVwTCfS.mjs} +6 -6
  8. package/dist/.setup/attempt-terminal-gZrxQ35N.mjs +5 -0
  9. package/dist/{auth-binding-Co2Vfcf_.js → .setup/auth-binding-DhLWa_7K.mjs} +2 -2
  10. package/dist/{auth-cache-key-Kq6oerr6.js → .setup/auth-cache-key-QirmgiCo.mjs} +3 -3
  11. package/dist/{auth-profile-CwzO4_RG.js → .setup/auth-profile-WqZtZfXN.mjs} +1 -1
  12. package/dist/.setup/binding-connection-Bm38niE8.mjs +50 -0
  13. package/dist/.setup/binding-connection.runtime-CnRMC0ta.mjs +48 -0
  14. package/dist/{bounded-turn-lRpmZHFv.js → .setup/bounded-turn-BtlZcivC.mjs} +19 -14
  15. package/dist/{build-state-6RL6qohz.js → .setup/build-state-Xx9ybZqa.mjs} +1 -1
  16. package/dist/{capabilities-BeqLPbtM.js → .setup/capabilities-_vXcZGSx.mjs} +1 -1
  17. package/dist/{client-BEKu4yDx.js → .setup/client-vXs2929Q.mjs} +355 -164
  18. package/dist/{command-dispatch-CisT9Jqq.js → .setup/command-dispatch-naHIZwwF.mjs} +3 -3
  19. package/dist/{command-formatters-DeTfrapr.js → .setup/command-formatters-CGEkdawF.mjs} +4 -3
  20. package/dist/{command-handlers-BfIsJEuA.js → .setup/command-handlers-BtAJEW1X.mjs} +812 -152
  21. package/dist/{command-rpc-BMqRQOFX.js → .setup/command-rpc-DHFpn4le.mjs} +37 -21
  22. package/dist/{compact-CGJZ2rlb.js → .setup/compact-C3i3qlzj.mjs} +28 -43
  23. package/dist/{config-JDfTI4VI.js → .setup/config-CedDWjM-.mjs} +5 -4
  24. package/dist/{config-options-jnIFvwxD.js → .setup/config-options-BsanJ8QG.mjs} +9 -421
  25. package/dist/{protocol-CAAcVIKF.js → .setup/config-parsing-CcB9iPoq.mjs} +9 -51
  26. package/dist/{config-runtime-BWf6JLWG.js → .setup/config-runtime-CeAhl_h4.mjs} +2 -2
  27. package/dist/.setup/config-security-BRQ2mgW9.mjs +465 -0
  28. package/dist/{config-utils-C57JiJrU.js → .setup/config-utils-DujwEnhg.mjs} +2 -4
  29. package/dist/{conversation-binding-CxOlHiix.js → .setup/conversation-binding-DhzrpTM6.mjs} +60 -47
  30. package/dist/{conversation-binding-data-BiodpIzq.js → .setup/conversation-binding-data-CrcyZk6O.mjs} +1 -1
  31. package/dist/{conversation-control-CUCrSIQI.js → .setup/conversation-control-DN53ns41.mjs} +17 -13
  32. package/dist/.setup/cyber-failover-DYwbmf1o.mjs +123 -0
  33. package/dist/.setup/cyber-failover-notice-e9G3J9-e.mjs +17 -0
  34. package/dist/{dynamic-tools-D-JBoaLt.js → .setup/dynamic-tools-D16lOp67.mjs} +168 -61
  35. package/dist/{effective-mcp-catalog-J_5Ep5Um.js → .setup/effective-mcp-catalog-K6kLCN8X.mjs} +3 -3
  36. package/dist/{ephemeral-turn-DSwzP8YY.js → .setup/ephemeral-turn-R1gA8Sn6.mjs} +4 -5
  37. package/dist/{event-projector-assistant-message-BmBM4qBV.js → .setup/event-projector-assistant-message-DNUR1s0A.mjs} +6 -3
  38. package/dist/.setup/event-projector-items-DyTQ_XqL.mjs +200 -0
  39. package/dist/{attempt-notifications--H8zXR5-.js → .setup/event-projector-usage-C7Ntzs-f.mjs} +102 -9
  40. package/dist/{harness-FR6eQgyO.js → .setup/harness-rxaaoN-o.mjs} +90 -19
  41. package/dist/.setup/inference-context-fulhZuz8.mjs +94 -0
  42. package/dist/.setup/inference-proxy-CC15HuSi.mjs +311 -0
  43. package/dist/{isolated-completion-DHBefrzg.js → .setup/isolated-completion-B6srt48J.mjs} +7 -7
  44. package/dist/{launch-args-RXQwn8zV.js → .setup/launch-args-DnMak49W.mjs} +22 -1
  45. package/dist/{managed-binary-DrjjRRUD.js → .setup/managed-binary-DP6Rib3P.mjs} +11 -2
  46. package/dist/{managed-thread-store-D1t5jh3G.js → .setup/managed-thread-store-BMqgThVL.mjs} +48 -14
  47. package/dist/{model-catalog-B_6M04Wo.js → .setup/model-catalog-DkvUuBey.mjs} +35 -10
  48. package/dist/{models-P9k2qAof.js → .setup/models-BDFgm_G-.mjs} +3 -3
  49. package/dist/.setup/native-auth-BLZGqFjw.mjs +57 -0
  50. package/dist/.setup/native-subagent-history-YXaL6dMd.mjs +135 -0
  51. package/dist/.setup/native-subagent-monitor-B1hxzIOy.mjs +5031 -0
  52. package/dist/.setup/native-subagent-task-ids-DsuOonKv.mjs +411 -0
  53. package/dist/{node-cli-sessions-rj0ysJwM.js → .setup/node-cli-sessions-Cl8b2ZF3.mjs} +1 -1
  54. package/dist/{node-exec-server.runtime-BY_ctYnT.js → .setup/node-exec-server.runtime-BaViBKNz.mjs} +5 -5
  55. package/dist/{plan-BMJdMOEF.js → .setup/plan-xD7WKYTM.mjs} +331 -79
  56. package/dist/{plugin-activation-BQK-f5sV.js → .setup/plugin-activation-r8nq5Jzp.mjs} +24 -19
  57. package/dist/{plugin-app-cache-key-CdSQzWyX.js → .setup/plugin-app-cache-key-BOxKP7db.mjs} +29 -25
  58. package/dist/{plugin-approval-roundtrip-DeW95wB5.js → .setup/plugin-approval-roundtrip-CjfzafAZ.mjs} +1 -1
  59. package/dist/{plugin-inventory-CoRCzWW4.js → .setup/plugin-inventory-DUle8DLz.mjs} +12 -8
  60. package/dist/{plugin-marketplace-discovery-3akBizzF.js → .setup/plugin-marketplace-discovery-P-Vndfqq.mjs} +18 -15
  61. package/dist/{plugin-metadata-cache-DgNfRAGA.js → .setup/plugin-metadata-cache-DsS5buNa.mjs} +33 -14
  62. package/dist/{provider-capabilities-W4tfK5Y5.js → .setup/provider-capabilities-B8J4Dy-O.mjs} +2 -2
  63. package/dist/.setup/provider-fFh_-VR3.mjs +50 -0
  64. package/dist/{rate-limits-Bqnx1N4z.js → .setup/rate-limits-DOEGYRNs.mjs} +90 -46
  65. package/dist/.setup/request-BioXJLYa.mjs +292 -0
  66. package/dist/.setup/run-attempt-lifecycle-B7JbY4-F.mjs +71 -0
  67. package/dist/{run-attempt-DwKds3DN.js → .setup/run-attempt-rlA07pUv.mjs} +644 -491
  68. package/dist/{runtime-artifact-T-NwqeSH.js → .setup/runtime-artifact-Dy38Z5iU.mjs} +2 -2
  69. package/dist/{sandbox-guard-BcT66fWy.js → .setup/sandbox-guard-BBP-RbTf.mjs} +4 -3
  70. package/dist/{session-binding-CKSepwIC.js → .setup/session-binding-_0W_fHRr.mjs} +45 -63
  71. package/dist/{session-binding-record-CaZjYwNS.js → .setup/session-binding-record-TH3xA0zj.mjs} +181 -3
  72. package/dist/.setup/session-binding-sidecars-CKYEcfNn.mjs +543 -0
  73. package/dist/{session-catalog-adoption-BKLtSrwi.js → .setup/session-catalog-adoption-CR_whkEW.mjs} +6 -6
  74. package/dist/{session-catalog-archive-D0i2pGj2.js → .setup/session-catalog-archive-CwZaPacf.mjs} +6 -6
  75. package/dist/.setup/session-catalog-events-jMcYfQyd.mjs +250 -0
  76. package/dist/.setup/session-catalog-fUdWDx-U.mjs +2464 -0
  77. package/dist/.setup/session-catalog-index-B141u15s.mjs +1070 -0
  78. package/dist/.setup/session-catalog-index-order-Cc5BzlQr.mjs +48 -0
  79. package/dist/.setup/session-catalog-index-state-BAuDztHN.mjs +180 -0
  80. package/dist/{session-catalog-parsing-CdD3JhdM.js → .setup/session-catalog-native-projection-ChV3cCtm.mjs} +213 -21
  81. package/dist/{session-catalog-node-adoption-BUuDYY8R.js → .setup/session-catalog-node-adoption-BVRsYOSh.mjs} +3 -3
  82. package/dist/{session-catalog-node-continue-CBtc4wkI.js → .setup/session-catalog-node-continue-Dowv8osw.mjs} +7 -7
  83. package/dist/.setup/session-catalog-projection-C1Bj9Jl-.mjs +414 -0
  84. package/dist/{session-cli-CbgaHh0f.js → .setup/session-cli-DIj-IE-E.mjs} +4 -4
  85. package/dist/{session-history-Cz-tOOYj.js → .setup/session-history-C--SrLI8.mjs} +10 -5
  86. package/dist/{session-history-import-DFN7sWRU.js → .setup/session-history-import-JHXT5Xfi.mjs} +4 -4
  87. package/dist/{session-history-read-cxPUxyVV.js → .setup/session-history-read-B3ZfSUbF.mjs} +2 -2
  88. package/dist/{session-history.worker-CNEvGaU5.js → .setup/session-history.worker-CpNj7H_P.mjs} +192 -89
  89. package/dist/{session-initialization-Jo86C60I.js → .setup/session-initialization-DH1z6fXn.mjs} +2 -2
  90. package/dist/{session-permission-policy-B22InTp_.js → .setup/session-permission-policy-DhurXY0l.mjs} +2 -2
  91. package/dist/{session-retirement-BSNG_mhf.js → .setup/session-retirement-CU87AOg9.mjs} +6 -6
  92. package/dist/{settled-turn-context-Du6gdUDd.js → .setup/settled-turn-context-fmwouT5I.mjs} +2 -2
  93. package/dist/{settled-turn-finalizer-BuLUrZl2.js → .setup/settled-turn-finalizer-CiY2bLFK.mjs} +10 -10
  94. package/dist/{shared-client-CVhez2Uo.js → .setup/shared-client-BpTtuLQ5.mjs} +495 -156
  95. package/dist/{side-question-DLbr2vUU.js → .setup/side-question-DSCZyoBD.mjs} +64 -47
  96. package/dist/{source-Da-h6f7e.js → .setup/source-Bjp4UQij.mjs} +15 -14
  97. package/dist/{thread-archive-guard-D1bP04Tf.js → .setup/thread-archive-guard-jmecf6OJ.mjs} +1 -1
  98. package/dist/.setup/thread-history-page-BTx-4xsg.mjs +83 -0
  99. package/dist/{thread-lifecycle-D1pzRwHB.js → .setup/thread-lifecycle-Cik28qWn.mjs} +330 -150
  100. package/dist/{thread-ownership-D6oASVRu.js → .setup/thread-ownership-skomxnIt.mjs} +4 -4
  101. package/dist/{thread-policy-D8kI7yAO.js → .setup/thread-policy-Cjs4B8xf.mjs} +3 -3
  102. package/dist/{thread-resume-T5cveyxA.js → .setup/thread-resume-BkNpj9Pz.mjs} +8 -5
  103. package/dist/.setup/timeout-DZF05XrR.mjs +63 -0
  104. package/dist/{session-catalog-home-id-D7-aLiNt.js → .setup/transcript-history-projection-DHNBDhCU.mjs} +73 -20
  105. package/dist/{transcript-mirror-t5TOccct.js → .setup/transcript-mirror-D4qp_leP.mjs} +15 -6
  106. package/dist/{transcript-mirror-attestation-DibE0krH.js → .setup/transcript-mirror-attestation-CzM-94NC.mjs} +4 -1
  107. package/dist/{transport-stdio-BGjHoYLr.js → .setup/transport-stdio-Cmx94Oiy.mjs} +149 -44
  108. package/dist/{upstream-session-fork-De-sLJ2r.js → .setup/upstream-session-fork-D3UKxgVD.mjs} +27 -26
  109. package/dist/{usage-CPPTmBvZ.js → .setup/usage-BOgBEKso.mjs} +4 -4
  110. package/dist/.setup/usage-limit-error-C0ow7DOc.mjs +166 -0
  111. package/dist/{version-omm6IPI3.js → .setup/version-CoqzXPgK.mjs} +1 -1
  112. package/dist/{web-search-provider.runtime-CSVgQL0w.js → .setup/web-search-provider.runtime-CTGuJt6i.mjs} +3 -3
  113. package/dist/api.js +28 -20
  114. package/dist/cli-metadata.js +1 -1
  115. package/dist/doctor-contract-api.js +8 -528
  116. package/dist/harness.js +1 -1
  117. package/dist/index.js +130 -135
  118. package/dist/media-understanding-provider.js +3 -3
  119. package/dist/migration-provider-api.js +2 -0
  120. package/dist/native-tool-policy.js +12 -0
  121. package/dist/provider-discovery.js +18 -0
  122. package/dist/session-history-worker-runtime.js +23 -5
  123. package/dist/session-history.worker.js +2 -2
  124. package/dist/web-search-contract-api.js +1 -1
  125. package/openclaw.plugin.json +354 -68
  126. package/package.json +11 -8
  127. package/dist/binding-connection-QqgcPCgk.js +0 -60
  128. package/dist/event-projector-usage-CIyrYYid.js +0 -102
  129. package/dist/native-subagent-monitor-BbCUKRwC.js +0 -3350
  130. package/dist/request-CGvGOpeR.js +0 -198
  131. package/dist/session-catalog-HaDcp7Sv.js +0 -1533
  132. package/dist/session-catalog-provenance-DkJHo735.js +0 -124
  133. package/dist/timeout-BVw8aaM1.js +0 -33
  134. package/dist/{auth-profile-selection-DFu9e167.js → .setup/auth-profile-selection-DFu9e167.mjs} +0 -0
  135. package/dist/{context-compaction-activity-CMla5FPJ.js → .setup/context-compaction-activity-CMla5FPJ.mjs} +0 -0
  136. package/dist/{elicitation-input-DPoK8F7w.js → .setup/elicitation-input-DPoK8F7w.mjs} +0 -0
  137. package/dist/{history-rejection-B4nOXNXF.js → .setup/history-rejection-B4nOXNXF.mjs} +0 -0
  138. package/dist/{image-payload-sanitizer-tupAr-2o.js → .setup/image-payload-sanitizer-tupAr-2o.mjs} +0 -0
  139. package/dist/{incognito-session-uhrBF6wJ.js → .setup/incognito-session-uhrBF6wJ.mjs} +0 -0
  140. package/dist/{local-runtime-attribution-B_2mnqhb.js → .setup/local-runtime-attribution-B_2mnqhb.mjs} +0 -0
  141. package/dist/{native-execution-policy-umd0tgh4.js → .setup/native-execution-policy-YBMHSzC4.mjs} +1 -1
  142. /package/dist/{rolldown-runtime-8H4AJuhK.js → .setup/rolldown-runtime-8H4AJuhK.mjs} +0 -0
  143. /package/dist/{session-binding-meta-B7aEMU7g.js → .setup/session-binding-meta-B7aEMU7g.mjs} +0 -0
  144. /package/dist/{session-upstream-marker-D15C9NHp.js → .setup/session-upstream-marker-D15C9NHp.mjs} +0 -0
  145. /package/dist/{upstream-prompt-provenance-LphB8slG.js → .setup/upstream-prompt-provenance-LphB8slG.mjs} +0 -0
  146. /package/dist/{web-search-provider.shared-BrZmlqyR.js → .setup/web-search-provider.shared-BrZmlqyR.mjs} +0 -0
@@ -1,40 +1,31 @@
1
- import { l as sessionBindingIdentity } from "./session-binding-record-CaZjYwNS.js";
2
- import { b as readCodexRequirementsToml, c as hasCodexMcpToolApprovalOverrides, d as withMcpElicitationsApprovalPolicy, i as resolveCodexAppServerHomeScope, m as resolveCodexModelBackedReviewerPolicyContext, u as shouldAutoApproveCodexAppServerApprovals } from "./config-options-jnIFvwxD.js";
3
- import { b as isCodexSandboxExecServerEnabled, o as isJsonObject, v as isCodexPairedNodeRemoteExecPlacementSandbox, x as readCodexPluginConfig, y as isCodexRemoteExecPlacementSandbox } from "./protocol-CAAcVIKF.js";
4
- import { D as handleDynamicToolCallWithTimeout, E as createCodexElicitationResponse, L as resolveCodexToolAbortTerminalReason, S as readCodexDynamicToolCallParams, i as isCodexAppServerApprovalRequest, j as resolveDynamicToolCallTimeoutMs, s as isCodexAppServerIndeterminateRequestCancellationError, v as assertCodexThreadForkResponse, x as assertCodexTurnStartResponse } from "./client-BEKu4yDx.js";
5
- import { n as formatCodexUsageLimitErrorMessage } from "./rate-limits-Bqnx1N4z.js";
6
- import { n as resolveOpenClawExecPolicyForCodexAppServer, t as canUseCodexModelBackedApprovalsReviewerForModel } from "./config-JDfTI4VI.js";
7
- import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection } from "./binding-connection-QqgcPCgk.js";
8
- import { F as ensureCodexAppServerClientRuntime, Z as resolveCodexAppServerPreparedAuthHandoff, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease, q as readRecentCodexRateLimits, x as withLeasedCodexAppServerClientStartSelectionRetry } from "./shared-client-CVhez2Uo.js";
9
- import { d as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, o as interruptCodexTurnAndWaitBestEffort } from "./attempt-client-cleanup-D6cR54TV.js";
10
- import { t as CodexEphemeralTurn } from "./ephemeral-turn-DSwzP8YY.js";
11
- import { B as emitCodexNativePreToolUseFailureDiagnostic, E as resolveCodexAppServerRequestModelSelection, Et as refreshCodexPluginAppApprovalPolicy, I as buildCodexNativeHookRelayConfig, L as buildCodexNativeHookRelayDisabledConfig, N as CODEX_NATIVE_HOOK_RELAY_EVENTS, O as resolveCodexBindingModelProviderFallback, S as resolveCodexWebSearchPlan, T as resolveCodexAppServerModelProvider, Tt as mergeCodexThreadConfigs, a as readCodexSupportedReasoningEfforts, ct as resolveCodexDynamicToolsLoading, nt as filterCodexDynamicTools, o as resolveCodexAppServerReasoningEffort, t as buildCodexTemporalAdditionalContext, v as buildCodexRuntimeThreadConfig, w as CODEX_NATIVE_PERSONALITY_NONE } from "./thread-lifecycle-D1pzRwHB.js";
12
- import { o as resolveCodexSessionBinding } from "./session-binding-CKSepwIC.js";
13
- import { i as refreshCodexThreadPolicy, n as CodexThreadPolicyHandoffError, r as assertCodexSupervisionThreadLineage } from "./thread-policy-D8kI7yAO.js";
14
- import { t as resolveCodexNativeExecutionBlock } from "./sandbox-guard-BcT66fWy.js";
15
- import { C as shouldRequireCodexSandboxExecServerEnvironment, S as shouldEnableCodexAppServerNativeToolSurface, T as filterCodexVisionTools, a as emitDynamicToolStartedDiagnostic, b as resolveCodexNodePlacementToolConstructionPlan, c as ensureCodexSandboxExecServerEnvironment, d as CodexNativeToolLifecycleProjector, i as emitDynamicToolErrorDiagnostic, l as releaseCodexSandboxExecServerEnvironment, o as emitDynamicToolTerminalDiagnostic, r as routeCodexAppServerElicitationRequest, s as handleCodexAppServerApprovalRequest, t as createCodexDynamicToolBridge, v as resolveCodexExternalSandboxPolicyForOpenClawSandbox, x as resolveCodexSandboxEnvironmentSelection, y as resolveCodexMessageToolProvider } from "./dynamic-tools-D-JBoaLt.js";
16
- import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-W4tfK5Y5.js";
17
- import { a as resolveCodexAppServerForModelProvider, i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy, t as CODEX_SESSION_PERMISSION_EXEC_MODES } from "./session-permission-policy-B22InTp_.js";
1
+ import { p as sessionBindingIdentity } from "./session-binding-record-TH3xA0zj.mjs";
2
+ import { E as readCodexRequirementsToml, l as shouldAutoApproveCodexAppServerApprovals, m as isJsonObject, n as hasCodexMcpToolApprovalOverrides, u as withMcpElicitationsApprovalPolicy } from "./config-security-BRQ2mgW9.mjs";
3
+ import { c as isCodexPairedNodeRemoteExecPlacementSandbox, d as readCodexPluginConfig, l as isCodexRemoteExecPlacementSandbox, u as isCodexSandboxExecServerEnabled } from "./config-parsing-CcB9iPoq.mjs";
4
+ import { D as handleDynamicToolCallWithTimeout, E as createCodexElicitationResponse, L as resolveCodexToolAbortTerminalReason, S as readCodexDynamicToolCallParams, i as isCodexAppServerApprovalRequest, j as resolveDynamicToolCallTimeoutMs, s as isCodexAppServerIndeterminateRequestCancellationError, v as assertCodexThreadForkResponse, x as assertCodexTurnStartResponse } from "./client-vXs2929Q.mjs";
5
+ import { i as resolveCodexAppServerHomeScope, l as resolveCodexModelBackedReviewerPolicyContext } from "./config-options-BsanJ8QG.mjs";
6
+ import { n as formatCodexUsageLimitErrorMessage } from "./rate-limits-DOEGYRNs.mjs";
7
+ import { i as resolveCodexBindingAppServerConnection, r as requireCodexSupervisionModelSelection } from "./binding-connection-Bm38niE8.mjs";
8
+ import { n as resolveOpenClawExecPolicyForCodexAppServer, t as canUseCodexModelBackedApprovalsReviewerForModel } from "./config-CedDWjM-.mjs";
9
+ import { P as ensureCodexAppServerClientRuntime, Z as resolveCodexAppServerPreparedAuthHandoff, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease, q as readRecentCodexRateLimits, x as withLeasedCodexAppServerClientStartSelectionRetry } from "./shared-client-BpTtuLQ5.mjs";
10
+ import { f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, o as interruptCodexTurnAndWaitBestEffort } from "./attempt-client-cleanup-BpYKdTA0.mjs";
11
+ import { t as CodexEphemeralTurn } from "./ephemeral-turn-R1gA8Sn6.mjs";
12
+ import { A as resolveCodexBindingModelProviderFallback, D as resolveCodexAppServerModelProvider, E as CODEX_NATIVE_PERSONALITY_NONE, F as CODEX_NATIVE_HOOK_RELAY_EVENTS, H as emitCodexNativePreToolUseFailureDiagnostic, O as resolveCodexAppServerRequestModelSelection, Ot as mergeCodexThreadConfigs, R as buildCodexNativeHookRelayConfig, b as buildCodexRuntimeThreadConfig, c as resolveCodexAppServerReasoningEffort, it as filterCodexDynamicTools, kt as refreshCodexPluginAppApprovalPolicy, o as buildCodexUserInput, r as buildCodexTemporalAdditionalContext, s as readCodexSupportedReasoningEfforts, ut as resolveCodexDynamicToolsLoading, w as resolveCodexWebSearchPlan, z as buildCodexNativeHookRelayDisabledConfig } from "./thread-lifecycle-Cik28qWn.mjs";
13
+ import { o as resolveCodexSessionBinding } from "./session-binding-_0W_fHRr.mjs";
14
+ import { i as refreshCodexThreadPolicy, n as CodexThreadPolicyHandoffError, r as assertCodexSupervisionThreadLineage } from "./thread-policy-Cjs4B8xf.mjs";
15
+ import { t as resolveCodexNativeExecutionBlock } from "./sandbox-guard-BBP-RbTf.mjs";
16
+ import { C as shouldRequireCodexSandboxExecServerEnvironment, S as shouldEnableCodexAppServerNativeToolSurface, T as filterCodexVisionTools, a as emitDynamicToolStartedDiagnostic, b as resolveCodexNodePlacementToolConstructionPlan, c as ensureCodexSandboxExecServerEnvironment, d as CodexNativeToolLifecycleProjector, i as emitDynamicToolErrorDiagnostic, l as releaseCodexSandboxExecServerEnvironment, o as emitDynamicToolTerminalDiagnostic, r as routeCodexAppServerElicitationRequest, s as handleCodexAppServerApprovalRequest, t as createCodexDynamicToolBridge, v as resolveCodexExternalSandboxPolicyForOpenClawSandbox, x as resolveCodexSandboxEnvironmentSelection, y as resolveCodexMessageToolProvider } from "./dynamic-tools-D16lOp67.mjs";
17
+ import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-B8J4Dy-O.mjs";
18
+ import { a as resolveCodexAppServerForModelProvider, i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, r as resolveCodexEffectiveSessionPermissionPolicy, t as CODEX_SESSION_PERMISSION_EXEC_MODES } from "./session-permission-policy-DhurXY0l.mjs";
18
19
  import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
19
20
  import { randomUUID } from "node:crypto";
20
- import { resolveSessionAgentIdsStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
21
21
  import { isDeepStrictEqual } from "node:util";
22
+ import { resolveSessionAgentIdsStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
22
23
  import { resolveAgentWorkspaceDir } from "openclaw/plugin-sdk/agent-runtime";
23
- import { buildAgentHookContextChannelFields, embeddedAgentLog, formatErrorMessage, registerNativeHookRelay, resolveAgentDir as resolveAgentDir$2, resolveAttemptSpawnWorkspaceDir, resolveModelAuthMode, resolveSandboxContext, supportsModelTools } from "openclaw/plugin-sdk/agent-harness-runtime";
24
+ import { buildAgentHookContextChannelFields, embeddedAgentLog, formatErrorMessage, resolveAgentDir as resolveAgentDir$2, resolveAttemptSpawnWorkspaceDir, resolveModelAuthMode, resolveSandboxContext, runAgentCleanupStep, supportsModelTools } from "openclaw/plugin-sdk/agent-harness-runtime";
24
25
  import { loadExecApprovals } from "openclaw/plugin-sdk/exec-approvals-runtime";
25
26
  import { loadCodexBundleMcpApprovalConfig, resolveCodexMcpToolOverridesForAgent } from "openclaw/plugin-sdk/codex-mcp-projection";
26
- //#region extensions/codex/src/app-server/side-question.ts
27
- const SIDE_QUESTION_COMPLETION_TIMEOUT_MS = 6e5;
28
- var CodexSideQuestionTimeoutError = class extends Error {
29
- constructor(..._args) {
30
- super(..._args);
31
- this.name = "TimeoutError";
32
- }
33
- };
34
- const CODEX_SIDE_NATIVE_HOOK_RELAY_MIN_TTL_MS = 18e5;
35
- const CODEX_SIDE_NATIVE_HOOK_RELAY_TTL_GRACE_MS = 3e5;
36
- const CODEX_SIDE_NATIVE_HOOK_RELAY_STARTUP_REQUEST_COUNT = 3;
37
- const CODEX_SIDE_NATIVE_HOOK_RELAY_EVENTS_WITH_APP_SERVER_APPROVALS = CODEX_NATIVE_HOOK_RELAY_EVENTS.filter((event) => event !== "permission_request");
27
+ import { registerNativeHookRelayForBundledRuntime } from "openclaw/plugin-sdk/native-hook-relay-runtime";
28
+ //#region extensions/codex/src/app-server/side-question-instructions.ts
38
29
  const SIDE_DEVELOPER_INSTRUCTIONS = `You are in a side conversation, not the main thread.
39
30
 
40
31
  This side conversation is for answering questions and lightweight, non-mutating exploration without disrupting the main thread. Do not present yourself as continuing the main thread's active task.
@@ -48,6 +39,19 @@ External tools may be available according to this thread's current permissions.
48
39
  You may perform non-mutating inspection, including reading or searching files and running checks that do not alter repo-tracked files.
49
40
 
50
41
  Do not modify files, source, git state, permissions, configuration, workspace state, or external state unless the user explicitly requests that mutation in this side conversation. Do not request escalated permissions or broader sandbox access unless the user explicitly requests a mutation that requires it. If the user explicitly requests a mutation, keep it minimal, local to the request, and avoid disrupting the main thread.`;
42
+ //#endregion
43
+ //#region extensions/codex/src/app-server/side-question.ts
44
+ const SIDE_QUESTION_COMPLETION_TIMEOUT_MS = 6e5;
45
+ var CodexSideQuestionTimeoutError = class extends Error {
46
+ constructor(..._args) {
47
+ super(..._args);
48
+ this.name = "TimeoutError";
49
+ }
50
+ };
51
+ const CODEX_SIDE_NATIVE_HOOK_RELAY_MIN_TTL_MS = 18e5;
52
+ const CODEX_SIDE_NATIVE_HOOK_RELAY_TTL_GRACE_MS = 3e5;
53
+ const CODEX_SIDE_NATIVE_HOOK_RELAY_STARTUP_REQUEST_COUNT = 3;
54
+ const CODEX_SIDE_NATIVE_HOOK_RELAY_EVENTS_WITH_APP_SERVER_APPROVALS = CODEX_NATIVE_HOOK_RELAY_EVENTS.filter((event) => event !== "permission_request");
51
55
  async function runCodexAppServerSideQuestion(params, options) {
52
56
  const bindingIdentity = sessionBindingIdentity({
53
57
  sessionId: params.sessionId,
@@ -126,11 +130,12 @@ async function runCodexAppServerSideQuestion(params, options) {
126
130
  bindingModel: binding.model,
127
131
  nativeAuthProfile: usesSupervisionConnection || preparedNativeAuthProfile
128
132
  });
129
- const connection = resolveCodexBindingAppServerConnection({
133
+ const connection = await resolveCodexBindingAppServerConnection({
130
134
  binding,
131
135
  authProfileId,
132
136
  pluginConfig,
133
137
  execPolicy,
138
+ assertCurrent,
134
139
  modelProvider: reviewerPolicyContext.modelProvider,
135
140
  model: reviewerPolicyContext.model,
136
141
  config: params.cfg,
@@ -222,6 +227,7 @@ async function runCodexAppServerSideQuestion(params, options) {
222
227
  if (nativeExecutionBlock) throw new Error(nativeExecutionBlock);
223
228
  if (!nativeToolSurfaceEnabled) throw new Error("Codex-native /btw side-question mode is unavailable because the effective tool policy restricts Codex native tools for this session.");
224
229
  const clientOptions = {
230
+ assertCurrent,
225
231
  startOptions: appServer.start,
226
232
  timeoutMs: appServer.requestTimeoutMs,
227
233
  authRequirement: preparedRuntimeAuth.plan.modelRoute?.authRequirement,
@@ -342,7 +348,7 @@ async function runCodexAppServerSideQuestion(params, options) {
342
348
  } : {},
343
349
  config: params.cfg
344
350
  });
345
- const handleServerRequest = async (request, _scope, requestSignal) => {
351
+ const handleServerRequest = async (request, _scope, requestSignal, setExecutionTimeoutMs) => {
346
352
  const signal = AbortSignal.any([requestSignal, runAbortController.signal]);
347
353
  if (signal.aborted) return;
348
354
  if (!childThreadId || !turnId) return;
@@ -377,8 +383,10 @@ async function runCodexAppServerSideQuestion(params, options) {
377
383
  if (!call || call.threadId !== childThreadId || call.turnId !== turnId) return;
378
384
  const timeoutMs = resolveDynamicToolCallTimeoutMs({
379
385
  call,
380
- config: params.cfg
386
+ config: params.cfg,
387
+ toolBridge
381
388
  });
389
+ setExecutionTimeoutMs?.(timeoutMs);
382
390
  const toolStartedAt = Date.now();
383
391
  const diagnosticContext = {
384
392
  call,
@@ -459,6 +467,8 @@ async function runCodexAppServerSideQuestion(params, options) {
459
467
  else pendingNativePreToolUseFailures.push(failure);
460
468
  }
461
469
  }) : void 0;
470
+ await nativeHookRelay?.prepareInvocation();
471
+ assertCurrent();
462
472
  const nativeHookRelayConfig = nativeHookRelay ? buildCodexNativeHookRelayConfig({
463
473
  relay: nativeHookRelay,
464
474
  events: nativeHookRelayEvents,
@@ -579,11 +589,7 @@ async function runCodexAppServerSideQuestion(params, options) {
579
589
  });
580
590
  const turnResponse = assertCodexTurnStartResponse(await client.request("turn/start", {
581
591
  threadId: sideThreadId,
582
- input: [{
583
- type: "text",
584
- text: params.question.trim(),
585
- text_elements: []
586
- }],
592
+ input: buildCodexUserInput(params.question.trim(), params.images),
587
593
  additionalContext: buildCodexTemporalAdditionalContext(sideRunParams, { sessionStatusAvailable: toolBridge.availableTools.some((tool) => tool.name === "session_status") }),
588
594
  ...sandboxEnvironment ? {
589
595
  cwd: sandboxEnvironment.cwd,
@@ -640,17 +646,15 @@ async function runCodexAppServerSideQuestion(params, options) {
640
646
  codexErrorInfo: result.turn?.error?.codexErrorInfo ?? null
641
647
  } }, readRecentCodexRateLimits(client));
642
648
  if (result.turn?.status === "interrupted") throw new Error("Codex /btw side thread was interrupted.");
643
- const trimmed = result.text;
644
649
  assertCurrent();
645
- if (!trimmed) throw new Error("Codex /btw completed without an answer.");
650
+ if (!result.text) throw new Error("Codex /btw completed without an answer.");
646
651
  return {
647
- text: trimmed,
652
+ text: result.text,
648
653
  usage: result.usage
649
654
  };
650
655
  } finally {
651
656
  try {
652
- const runWasAbortedBeforeCleanup = runAbortController.signal.aborted;
653
- nativeToolRunWasAbortedBeforeCleanup = runWasAbortedBeforeCleanup;
657
+ nativeToolRunWasAbortedBeforeCleanup = runAbortController.signal.aborted;
654
658
  params.opts?.abortSignal?.removeEventListener("abort", abortFromUpstream);
655
659
  if (!runAbortController.signal.aborted) runAbortController.abort("codex_side_question_finished");
656
660
  await Promise.allSettled(activeDynamicToolCalls);
@@ -665,7 +669,7 @@ async function runCodexAppServerSideQuestion(params, options) {
665
669
  if (policyWriteUncertain && childClient) await retireUnsafeCodexTurnClientBestEffort(childClient, "side policy handoff");
666
670
  collector?.route.release();
667
671
  try {
668
- nativeToolLifecycleProjector?.finalizeActive(runWasAbortedBeforeCleanup);
672
+ nativeToolLifecycleProjector?.finalizeActive(nativeToolRunWasAbortedBeforeCleanup);
669
673
  } finally {
670
674
  activateNativePreToolUseFailureFallback();
671
675
  }
@@ -677,6 +681,15 @@ async function runCodexAppServerSideQuestion(params, options) {
677
681
  } finally {
678
682
  releaseCodexAppServerClientLease(clientLease);
679
683
  nativeHookRelay?.unregister();
684
+ await runAgentCleanupStep({
685
+ runId: sideRunParams.runId,
686
+ sessionId: sideRunParams.sessionId,
687
+ step: "codex-side-native-hook-relay-release",
688
+ log: embeddedAgentLog,
689
+ cleanup: async () => {
690
+ await nativeHookRelay?.drain();
691
+ }
692
+ });
680
693
  }
681
694
  }
682
695
  }
@@ -687,7 +700,7 @@ function resolveCodexSideNativeHookRelayEvents(params) {
687
700
  }
688
701
  function registerCodexSideNativeHookRelay(params) {
689
702
  if (params.options.enabled === false) return;
690
- return registerNativeHookRelay({
703
+ return registerNativeHookRelayForBundledRuntime({
691
704
  provider: "codex",
692
705
  ...params.agentId ? { agentId: params.agentId } : {},
693
706
  sessionId: params.sessionId,
@@ -797,11 +810,15 @@ async function createCodexSideToolBridge(input) {
797
810
  send: async (payload) => {
798
811
  await publishSideToolResult(payload);
799
812
  },
800
- ...input.params.messageChannel ? { messageChannel: input.params.messageChannel } : {}
813
+ ...messageToolProvider ? { messageChannel: messageToolProvider } : {}
801
814
  } : void 0;
802
815
  const allTools = createOpenClawCodingTools({
803
816
  agentId: input.sessionAgentId,
804
817
  requesterThinkingLevel: input.params.resolvedThinkLevel ?? "off",
818
+ requesterModel: input.params.runtimeModel ? {
819
+ provider: input.params.runtimeModel.provider,
820
+ model: input.params.runtimeModel.id
821
+ } : void 0,
805
822
  sessionKey: sandboxSessionKey,
806
823
  runSessionKey: input.params.sessionKey && input.params.sessionKey !== sandboxSessionKey ? input.params.sessionKey : void 0,
807
824
  sessionId: input.params.sessionId,
@@ -1,9 +1,8 @@
1
- import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { m as CODEX_PLUGINS_MARKETPLACE_NAME } from "./config-utils-C57JiJrU.js";
3
- import { r as buildCodexPluginAppCacheKey, s as defaultCodexAppInventoryCache } from "./plugin-app-cache-key-CdSQzWyX.js";
4
- import { o as withCodexAppServerJsonClient } from "./request-CGvGOpeR.js";
5
- import "./config-JDfTI4VI.js";
6
- import { i as pluginReadParams, n as isOpenAiCuratedMarketplace } from "./plugin-inventory-CoRCzWW4.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
2
+ import { c as CODEX_PLUGINS_MARKETPLACE_NAME, i as pluginReadParams, n as isOpenAiCuratedMarketplace } from "./plugin-inventory-DUle8DLz.mjs";
3
+ import { a as defaultCodexAppInventoryCache, r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-BOxKP7db.mjs";
4
+ import { o as withCodexAppServerJsonClient } from "./request-BioXJLYa.mjs";
5
+ import "./config-CedDWjM-.mjs";
7
6
  import path from "node:path";
8
7
  import os from "node:os";
9
8
  import fs from "node:fs/promises";
@@ -121,6 +120,7 @@ async function discoverCodexMemorySources(codexHome) {
121
120
  //#region extensions/codex/src/migration/source.ts
122
121
  var source_exports = /* @__PURE__ */ __exportAll({
123
122
  codexPluginMigrationSubscriptionWarning: () => codexPluginMigrationSubscriptionWarning,
123
+ defaultCodexHome: () => defaultCodexHome,
124
124
  discoverCodexSource: () => discoverCodexSource,
125
125
  hasCodexSource: () => hasCodexSource
126
126
  });
@@ -459,31 +459,32 @@ async function discoverCodexSource(options = {}) {
459
459
  const authPath = path.join(codexHome, "auth.json");
460
460
  const modelsCachePath = path.join(codexHome, "models_cache.json");
461
461
  const hooksPath = path.join(codexHome, "hooks", "hooks.json");
462
- const memoryFiles = await discoverCodexMemorySources(codexHome);
463
- const codexSkills = options.memoryOnly ? [] : await discoverSkillDirs({
462
+ const skipAssets = options.memoryOnly === true || options.authOnly === true;
463
+ const memoryFiles = options.authOnly ? [] : await discoverCodexMemorySources(codexHome);
464
+ const codexSkills = skipAssets ? [] : await discoverSkillDirs({
464
465
  root: codexSkillsDir,
465
466
  sourceLabel: "Codex skill",
466
467
  excludeSystem: true
467
468
  });
468
- const personalAgentSkills = options.memoryOnly ? [] : await discoverSkillDirs({
469
+ const personalAgentSkills = skipAssets ? [] : await discoverSkillDirs({
469
470
  root: agentsSkillsDir,
470
471
  sourceLabel: "personal AgentSkill"
471
472
  });
472
- const sourcePluginDiscovery = options.memoryOnly ? { plugins: [] } : await discoverInstalledCuratedPlugins(codexHome, options);
473
+ const sourcePluginDiscovery = skipAssets ? { plugins: [] } : await discoverInstalledCuratedPlugins(codexHome, options);
473
474
  const sourcePluginNames = new Set(sourcePluginDiscovery.plugins.flatMap((plugin) => plugin.pluginName ? [plugin.pluginName] : []));
474
- const cachedPlugins = (options.memoryOnly ? [] : await discoverPluginDirs(codexHome)).filter((plugin) => {
475
+ const cachedPlugins = (skipAssets ? [] : await discoverPluginDirs(codexHome)).filter((plugin) => {
475
476
  const normalizedName = sanitizePluginName(plugin.name);
476
477
  return !sourcePluginNames.has(normalizedName);
477
478
  });
478
479
  const plugins = [...sourcePluginDiscovery.plugins, ...cachedPlugins].toSorted((a, b) => a.source.localeCompare(b.source));
479
480
  const archivePaths = [];
480
- if (!options.memoryOnly && await exists(configPath)) archivePaths.push({
481
+ if (!skipAssets && await exists(configPath)) archivePaths.push({
481
482
  id: "archive:config.toml",
482
483
  path: configPath,
483
484
  relativePath: "config.toml",
484
485
  message: "Codex config is archived for manual review; it is not activated automatically"
485
486
  });
486
- if (!options.memoryOnly && await exists(hooksPath)) archivePaths.push({
487
+ if (!skipAssets && await exists(hooksPath)) archivePaths.push({
487
488
  id: "archive:hooks/hooks.json",
488
489
  path: hooksPath,
489
490
  relativePath: "hooks/hooks.json",
@@ -515,4 +516,4 @@ function sanitizePluginName(value) {
515
516
  return value.trim().toLowerCase().replaceAll(/\s+/gu, "-");
516
517
  }
517
518
  //#endregion
518
- export { exists as a, sanitizeName as c, source_exports as i, discoverCodexSource as n, readJsonObject as o, hasCodexSource as r, resolveHomePath as s, codexPluginMigrationSubscriptionWarning as t };
519
+ export { source_exports as a, resolveHomePath as c, hasCodexSource as i, sanitizeName as l, defaultCodexHome as n, exists as o, discoverCodexSource as r, readJsonObject as s, codexPluginMigrationSubscriptionWarning as t };
@@ -1,4 +1,4 @@
1
- import { o as isJsonObject } from "./protocol-CAAcVIKF.js";
1
+ import { m as isJsonObject } from "./config-security-BRQ2mgW9.mjs";
2
2
  import { normalizeBoundedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  //#region extensions/codex/src/app-server/thread-archive-guard.ts
4
4
  const DESCENDANT_PAGE_LIMIT = 100;
@@ -0,0 +1,83 @@
1
+ import { A as parseTranscriptPage, M as readControlCursor, g as CatalogParamsError } from "./session-catalog-native-projection-ChV3cCtm.mjs";
2
+ //#region extensions/codex/src/app-server/thread-history-page.ts
3
+ const TURN_ITEM_CURSOR_PREFIX = "turn-item:";
4
+ function encodeTurnItemCursor(turnCursor, itemId) {
5
+ return TURN_ITEM_CURSOR_PREFIX + Buffer.from(JSON.stringify([turnCursor, itemId])).toString("base64url");
6
+ }
7
+ function decodeTurnItemCursor(cursor) {
8
+ if (!cursor?.startsWith(TURN_ITEM_CURSOR_PREFIX)) return { turnCursor: cursor };
9
+ let value;
10
+ try {
11
+ value = JSON.parse(Buffer.from(cursor.slice(10), "base64url").toString());
12
+ } catch {
13
+ throw new CatalogParamsError("invalid Codex transcript item cursor");
14
+ }
15
+ if (!Array.isArray(value) || value.length !== 2 || typeof value[0] !== "string" || !value[0] || typeof value[1] !== "string" || !value[1]) throw new CatalogParamsError("invalid Codex transcript item cursor");
16
+ return {
17
+ turnCursor: value[0],
18
+ itemId: value[1]
19
+ };
20
+ }
21
+ /** Legacy stores expose only turn cursors; an item identity preserves paging across appends. */
22
+ async function readLegacyCodexHistoryPage(readTurns, request, projection) {
23
+ const { turnCursor, itemId } = decodeTurnItemCursor(request.cursor);
24
+ const page = parseTranscriptPage(await readTurns({
25
+ threadId: request.threadId,
26
+ limit: 1,
27
+ sortDirection: "desc",
28
+ itemsView: "full",
29
+ ...turnCursor ? { cursor: turnCursor } : {}
30
+ }));
31
+ const source = page.data.flatMap(({ items, ...turn }) => items.toReversed().map((item) => ({
32
+ turnId: turn.id,
33
+ item,
34
+ turn
35
+ })));
36
+ const anchorIndex = itemId ? source.findIndex(({ item }) => item.id === itemId) : -1;
37
+ if (itemId && anchorIndex < 0) throw new CatalogParamsError("Codex transcript changed; refresh the session before loading older items");
38
+ const remaining = source.slice(anchorIndex + 1);
39
+ const items = projection.project(remaining.slice(0, request.limit), request.limit);
40
+ const result = () => {
41
+ const lastSource = remaining[items.length - 1];
42
+ const partial = lastSource !== void 0 && items.length < remaining.length;
43
+ const nativeCursor = partial ? page.backwardsCursor : page.nextCursor;
44
+ const cursor = nativeCursor ? partial ? encodeTurnItemCursor(nativeCursor, lastSource.item.id) : nativeCursor : void 0;
45
+ if (partial && !cursor) throw new Error("Codex app-server did not provide a transcript continuation anchor");
46
+ return {
47
+ items,
48
+ ...cursor ? { nextCursor: cursor } : {}
49
+ };
50
+ };
51
+ let bounded = result();
52
+ while (!projection.fits(bounded)) {
53
+ if (items.length <= 1) throw new Error("Codex transcript item exceeds the safe response size");
54
+ items.pop();
55
+ bounded = result();
56
+ }
57
+ return bounded;
58
+ }
59
+ /** Callers authorize the thread; this reader owns native cursor and response-size semantics. */
60
+ async function readCodexThreadHistoryPage(control, thread, request, projection) {
61
+ if (thread.historyMode !== "paginated") return readLegacyCodexHistoryPage((params) => control.listTurnPage(params), request, projection);
62
+ let limit = request.limit;
63
+ for (;;) {
64
+ const page = await control.listItemPage({
65
+ threadId: request.threadId,
66
+ limit,
67
+ sortDirection: "desc",
68
+ ...request.cursor ? { cursor: request.cursor } : {}
69
+ });
70
+ const nextCursor = readControlCursor(page.nextCursor, "transcript next response");
71
+ const items = projection.project(page.data, limit);
72
+ const result = {
73
+ items,
74
+ ...nextCursor ? { nextCursor } : {}
75
+ };
76
+ const fittingCount = items.length - (projection.fits(result) ? 0 : 1);
77
+ if (fittingCount === page.data.length) return result;
78
+ if (fittingCount < 1) throw new Error("Codex transcript item exceeds the safe response size");
79
+ limit = fittingCount;
80
+ }
81
+ }
82
+ //#endregion
83
+ export { readLegacyCodexHistoryPage as n, readCodexThreadHistoryPage as t };