@openclaw/codex 2026.9.5 → 2026.9.7
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.
- package/README.md +2 -0
- package/assets/icon.png +0 -0
- package/dist/.setup/{account-usage-runtime-C2MOIvfq.mjs → account-usage-runtime-DFhbh1zz.mjs} +6 -6
- package/dist/.setup/{apply-CJ0ZfmBG.mjs → apply-D3GcSoSa.mjs} +35 -55
- package/dist/.setup/{attempt-client-cleanup-BpYKdTA0.mjs → attempt-client-cleanup-DOP-cW5j.mjs} +179 -73
- package/dist/.setup/attempt-workspace-context-C5HigshI.mjs +164 -0
- package/dist/.setup/{auth-binding-DhLWa_7K.mjs → auth-binding-BLWz7stm.mjs} +14 -1
- package/dist/.setup/{auth-cache-key-QirmgiCo.mjs → auth-cache-key-Dbvq-QgB.mjs} +41 -111
- package/dist/.setup/{auth-profile-WqZtZfXN.mjs → auth-profile-B0okYl2D.mjs} +1 -2
- package/dist/.setup/auth-profile-health-oHizqgye.mjs +53 -0
- package/dist/.setup/auth-profile-recovery-BREezV0L.mjs +14 -0
- package/dist/.setup/auth-start-options-BPIPeEX8.mjs +44 -0
- package/dist/.setup/{binding-connection-Bm38niE8.mjs → binding-connection-DTtN1KrX.mjs} +2 -2
- package/dist/.setup/{binding-connection.runtime-CnRMC0ta.mjs → binding-connection.runtime-6TpgD1M6.mjs} +5 -5
- package/dist/.setup/{bounded-turn-BtlZcivC.mjs → bounded-turn-CbjoN2OW.mjs} +140 -37
- package/dist/.setup/bounded-turn-isolation-B8K_ylqk.mjs +14 -0
- package/dist/.setup/{build-state-Xx9ybZqa.mjs → build-state-Da1_z0kd.mjs} +1 -1
- package/dist/.setup/{capabilities-_vXcZGSx.mjs → capabilities-B3WEZl4e.mjs} +2 -10
- package/dist/.setup/{client-vXs2929Q.mjs → client-N0JpgSzF.mjs} +635 -872
- package/dist/.setup/client-catalog-response-5HHLdcde.mjs +285 -0
- package/dist/.setup/{command-dispatch-naHIZwwF.mjs → command-dispatch-BeAoaovI.mjs} +9 -8
- package/dist/.setup/{command-formatters-CGEkdawF.mjs → command-formatters-R3ckE3Co.mjs} +36 -64
- package/dist/.setup/{command-handlers-BtAJEW1X.mjs → command-handlers-ylTMS00z.mjs} +301 -488
- package/dist/.setup/{command-rpc-DHFpn4le.mjs → command-rpc-CGJGUQ6Y.mjs} +40 -28
- package/dist/.setup/compact-C2WamavS.mjs +776 -0
- package/dist/.setup/{config-CedDWjM-.mjs → config-DKhXquav.mjs} +26 -28
- package/dist/.setup/{config-options-BsanJ8QG.mjs → config-options-CzyWLTJt.mjs} +68 -65
- package/dist/.setup/{config-parsing-CcB9iPoq.mjs → config-parsing-b088LyhT.mjs} +57 -60
- package/dist/.setup/{config-runtime-CeAhl_h4.mjs → config-runtime-C0NbLms1.mjs} +2 -2
- package/dist/.setup/{config-security-BRQ2mgW9.mjs → config-security-CE-FcGw9.mjs} +51 -215
- package/dist/.setup/{config-utils-DujwEnhg.mjs → config-utils-D0CXecki.mjs} +3 -13
- package/dist/.setup/context-engine-projection-PezSESth.mjs +387 -0
- package/dist/.setup/{conversation-binding-DhzrpTM6.mjs → conversation-binding-3Min8qvP.mjs} +71 -105
- package/dist/.setup/{conversation-binding-data-CrcyZk6O.mjs → conversation-binding-data-C746z5Pn.mjs} +8 -12
- package/dist/.setup/{conversation-control-DN53ns41.mjs → conversation-control-CEP8X5JC.mjs} +30 -69
- package/dist/.setup/{cyber-failover-DYwbmf1o.mjs → cyber-failover-XV0nNRZu.mjs} +1 -1
- package/dist/.setup/{cyber-failover-notice-e9G3J9-e.mjs → cyber-failover-notice-RNpGpTyP.mjs} +1 -1
- package/dist/.setup/{dynamic-tools-D16lOp67.mjs → dynamic-tools-DzlsLUuS.mjs} +3136 -3167
- package/dist/.setup/{effective-mcp-catalog-K6kLCN8X.mjs → effective-mcp-catalog-CxUtC-xG.mjs} +8 -17
- package/dist/.setup/{ephemeral-turn-R1gA8Sn6.mjs → ephemeral-turn-CDsPJOa2.mjs} +9 -6
- package/dist/.setup/event-projector-assistant-message-CigreO4K.mjs +69 -0
- package/dist/.setup/{event-projector-usage-C7Ntzs-f.mjs → event-projector-usage-03R0I2dM.mjs} +4 -26
- package/dist/.setup/event-projector-values-DJSz8BTk.mjs +106 -0
- package/dist/.setup/incognito-session-DWYapfwf.mjs +2 -0
- package/dist/.setup/{inference-context-fulhZuz8.mjs → inference-context-D-9gWlTR.mjs} +16 -18
- package/dist/.setup/inference-dispatch-CMZtjQyz.mjs +359 -0
- package/dist/.setup/inference-metadata-CgIf7sOx.mjs +81 -0
- package/dist/.setup/inference-proxy-DhcXOgUE.mjs +561 -0
- package/dist/.setup/{isolated-completion-B6srt48J.mjs → isolated-completion-Dm3PzxJk.mjs} +15 -11
- package/dist/.setup/launch-args-DbFCehO7.mjs +196 -0
- package/dist/.setup/{managed-binary-DP6Rib3P.mjs → managed-binary-kiWRhNRE.mjs} +16 -9
- package/dist/.setup/{model-catalog-DkvUuBey.mjs → model-catalog-PAuZgJC6.mjs} +14 -14
- package/dist/.setup/model-runtime-BdqzOMkU.mjs +11 -0
- package/dist/.setup/{models-BDFgm_G-.mjs → models-DHXZtVVk.mjs} +9 -18
- package/dist/.setup/{native-auth-BLZGqFjw.mjs → native-auth-CuG53tu4.mjs} +5 -5
- package/dist/.setup/{native-execution-policy-YBMHSzC4.mjs → native-execution-policy-BxZJy5mP.mjs} +6 -31
- package/dist/.setup/{native-subagent-monitor-B1hxzIOy.mjs → native-subagent-monitor-Dpsmf2wz.mjs} +4422 -3808
- package/dist/.setup/native-subagent-pending-assignments-DwkCzLvD.mjs +203 -0
- package/dist/.setup/native-task-assignments-DMQ0g3hu.mjs +194 -0
- package/dist/.setup/{node-cli-sessions-Cl8b2ZF3.mjs → node-cli-sessions-HC4W6FLI.mjs} +99 -111
- package/dist/.setup/node-exec-server.runtime-BgBfWQqo.mjs +244 -0
- package/dist/.setup/{plan-xD7WKYTM.mjs → plan-Y-QIvrKB.mjs} +118 -163
- package/dist/.setup/{plugin-activation-r8nq5Jzp.mjs → plugin-activation-cNHRfaxU.mjs} +10 -47
- package/dist/.setup/{plugin-app-cache-key-BOxKP7db.mjs → plugin-app-cache-key-BL9B5H0L.mjs} +9 -42
- package/dist/.setup/{plugin-inventory-DUle8DLz.mjs → plugin-inventory-Cky2XJUw.mjs} +32 -23
- package/dist/.setup/{plugin-marketplace-discovery-P-Vndfqq.mjs → plugin-marketplace-discovery-D_dV9FXa.mjs} +22 -25
- package/dist/.setup/{plugin-metadata-cache-DsS5buNa.mjs → plugin-metadata-cache-DsjsL1dr.mjs} +328 -318
- package/dist/.setup/protocol-CANUwXJ3.mjs +17 -0
- package/dist/.setup/provider-DH8NSzGt.mjs +51 -0
- package/dist/.setup/{provider-capabilities-B8J4Dy-O.mjs → provider-capabilities-CAxoF-X1.mjs} +35 -12
- package/dist/.setup/{rate-limits-DOEGYRNs.mjs → rate-limits-B7-X2TgG.mjs} +123 -166
- package/dist/.setup/{request-BioXJLYa.mjs → request-BHZ1nz8d.mjs} +25 -16
- package/dist/.setup/responses-oauth-twnuTaAa.mjs +93 -0
- package/dist/.setup/rpc-error-BlD2vuzn.mjs +31 -0
- package/dist/.setup/{run-attempt-rlA07pUv.mjs → run-attempt-D8RZUOzY.mjs} +2046 -1454
- package/dist/.setup/{run-attempt-lifecycle-B7JbY4-F.mjs → run-attempt-lifecycle-C-6O3Exn.mjs} +10 -24
- package/dist/.setup/{runtime-artifact-Dy38Z5iU.mjs → runtime-artifact-DDQ-HGXf.mjs} +43 -47
- package/dist/.setup/runtime-artifact-connection-D68qQn1m.mjs +78 -0
- package/dist/.setup/sandbox-guard-DjCz2eOw.mjs +126 -0
- package/dist/.setup/scope-DOC1Xjc8.mjs +6 -0
- package/dist/.setup/session-binding-DGCYAfvD.mjs +443 -0
- package/dist/.setup/{session-binding-record-TH3xA0zj.mjs → session-binding-record-Oe9L-CNY.mjs} +73 -132
- package/dist/.setup/{session-binding-sidecars-CKYEcfNn.mjs → session-binding-sidecars-jo6H8dFr.mjs} +242 -60
- package/dist/.setup/{session-catalog-fUdWDx-U.mjs → session-catalog-4sCdv5qx.mjs} +598 -452
- package/dist/.setup/{session-catalog-adoption-CR_whkEW.mjs → session-catalog-adoption-BU_pHWG7.mjs} +59 -26
- package/dist/.setup/{session-catalog-archive-CwZaPacf.mjs → session-catalog-archive-spHfihri.mjs} +7 -7
- package/dist/.setup/session-catalog-events-DePDzzjc.mjs +139 -0
- package/dist/.setup/session-catalog-home-id-vlih0B_g.mjs +22 -0
- package/dist/.setup/{session-catalog-index-B141u15s.mjs → session-catalog-index-CZvDzC6z.mjs} +286 -182
- package/dist/.setup/{session-catalog-index-order-Cc5BzlQr.mjs → session-catalog-index-order-BcQpHks3.mjs} +2 -2
- package/dist/.setup/{session-catalog-index-state-BAuDztHN.mjs → session-catalog-index-state-TeO7EyO-.mjs} +6 -2
- package/dist/.setup/session-catalog-limits-DDxOsQeC.mjs +14 -0
- package/dist/.setup/session-catalog-list-request-CvtxrYSe.mjs +170 -0
- package/dist/.setup/session-catalog-native-projection-DjhwGL6x.mjs +178 -0
- package/dist/.setup/{session-catalog-node-adoption-BVRsYOSh.mjs → session-catalog-node-adoption-DgXvSGu0.mjs} +30 -35
- package/dist/.setup/{session-catalog-node-continue-Dowv8osw.mjs → session-catalog-node-continue-DjKXHBbi.mjs} +25 -18
- package/dist/.setup/session-catalog-node-lookup-CtAXI5W5.mjs +56 -0
- package/dist/.setup/{session-catalog-native-projection-ChV3cCtm.mjs → session-catalog-parsing-CPGaPYr-.mjs} +14 -180
- package/dist/.setup/{session-catalog-projection-C1Bj9Jl-.mjs → session-catalog-projection-Cr5qP5Dj.mjs} +15 -5
- package/dist/.setup/session-catalog-provenance-DoAvktcj.mjs +95 -0
- package/dist/.setup/{session-cli-DIj-IE-E.mjs → session-cli-Cn_nCqfq.mjs} +11 -24
- package/dist/.setup/{session-history-C--SrLI8.mjs → session-history-D83lJWHG.mjs} +16 -23
- package/dist/.setup/{session-history-import-JHXT5Xfi.mjs → session-history-import-WhX-X33a.mjs} +7 -10
- package/dist/.setup/session-history-read-Ov3StuL4.mjs +133 -0
- package/dist/.setup/{session-history.worker-CpNj7H_P.mjs → session-history.worker-MnPKncqP.mjs} +14 -23
- package/dist/.setup/session-initialization-6aveB9qb.mjs +22 -0
- package/dist/.setup/{session-permission-policy-DhurXY0l.mjs → session-permission-policy-Ci_fVX6y.mjs} +4 -8
- package/dist/.setup/{session-retirement-CU87AOg9.mjs → session-retirement-qMTxkNx2.mjs} +31 -12
- package/dist/.setup/{settled-turn-context-fmwouT5I.mjs → settled-turn-context-D4yj4rxf.mjs} +1 -1
- package/dist/.setup/{settled-turn-finalizer-CiY2bLFK.mjs → settled-turn-finalizer-BsvEabkw.mjs} +17 -13
- package/dist/.setup/{shared-client-BpTtuLQ5.mjs → shared-client-DqyTMYug.mjs} +826 -485
- package/dist/.setup/shared-client-lifecycle-DJIgqgMw.mjs +153 -0
- package/dist/.setup/{side-question-DSCZyoBD.mjs → side-question-C4kCmQy1.mjs} +206 -334
- package/dist/.setup/{source-Bjp4UQij.mjs → source-CS_7GFJZ.mjs} +82 -139
- package/dist/.setup/spawn-error-CL3n6MAa.mjs +57 -0
- package/dist/.setup/{thread-archive-guard-jmecf6OJ.mjs → thread-archive-guard-C9frICzX.mjs} +10 -3
- package/dist/.setup/thread-lifecycle-DPflntEJ.mjs +2362 -0
- package/dist/.setup/{incognito-session-uhrBF6wJ.mjs → thread-ownership-queue-Dp24d7-F.mjs} +1 -2
- package/dist/.setup/{thread-ownership-skomxnIt.mjs → thread-ownership-roNP0l1c.mjs} +47 -10
- package/dist/.setup/thread-policy-DTd-DtkX.mjs +109 -0
- package/dist/.setup/thread-requests-B_bRnMGN.mjs +2102 -0
- package/dist/.setup/{thread-resume-BkNpj9Pz.mjs → thread-resume-CdDaoc7T.mjs} +6 -6
- package/dist/.setup/timeout-CXOfNoaX.mjs +46 -0
- package/dist/.setup/transcript-history-projection-DRSifI-1.mjs +201 -0
- package/dist/.setup/{transcript-mirror-attestation-CzM-94NC.mjs → transcript-mirror-attestation-YSegaktH.mjs} +3 -4
- package/dist/.setup/{transcript-mirror-D4qp_leP.mjs → transcript-mirror-kxmCYsuF.mjs} +224 -206
- package/dist/.setup/{transport-stdio-Cmx94Oiy.mjs → transport-stdio-Bdegpn2V.mjs} +138 -75
- package/dist/.setup/transport-websocket-BTBE-LD9.mjs +211 -0
- package/dist/.setup/{upstream-prompt-provenance-LphB8slG.mjs → upstream-prompt-provenance-fXkKbPVC.mjs} +3 -9
- package/dist/.setup/{upstream-session-fork-D3UKxgVD.mjs → upstream-session-fork-CBeVjBpT.mjs} +48 -40
- package/dist/.setup/{usage-BOgBEKso.mjs → usage-BMzNxeR_.mjs} +5 -4
- package/dist/.setup/{usage-limit-error-C0ow7DOc.mjs → usage-limit-error-QXerDo3i.mjs} +5 -20
- package/dist/.setup/{web-search-provider.runtime-CTGuJt6i.mjs → web-search-provider.runtime-P77OUeoo.mjs} +10 -20
- package/dist/api.js +25 -16
- package/dist/catalog-page-worker-entrypoint.js +12 -0
- package/dist/catalog-page.worker.js +9 -0
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +50 -8
- package/dist/harness.js +344 -1
- package/dist/index.js +345 -346
- package/dist/media-understanding-provider.js +9 -22
- package/dist/migration-provider-api.js +1 -1
- package/dist/provider-discovery.js +1 -1
- package/dist/session-history-worker-runtime.js +16 -33
- package/dist/session-history.worker.js +1 -1
- package/openclaw.plugin.json +14 -2
- package/package.json +11 -7
- package/dist/.setup/attempt-context-VXVwTCfS.mjs +0 -636
- package/dist/.setup/compact-C3i3qlzj.mjs +0 -687
- package/dist/.setup/event-projector-assistant-message-DNUR1s0A.mjs +0 -105
- package/dist/.setup/event-projector-items-DyTQ_XqL.mjs +0 -200
- package/dist/.setup/harness-rxaaoN-o.mjs +0 -349
- package/dist/.setup/history-rejection-B4nOXNXF.mjs +0 -13
- package/dist/.setup/image-payload-sanitizer-tupAr-2o.mjs +0 -79
- package/dist/.setup/inference-proxy-CC15HuSi.mjs +0 -311
- package/dist/.setup/launch-args-DnMak49W.mjs +0 -111
- package/dist/.setup/local-runtime-attribution-B_2mnqhb.mjs +0 -19
- package/dist/.setup/native-subagent-history-YXaL6dMd.mjs +0 -135
- package/dist/.setup/native-subagent-task-ids-DsuOonKv.mjs +0 -411
- package/dist/.setup/node-exec-server.runtime-BaViBKNz.mjs +0 -226
- package/dist/.setup/plugin-approval-roundtrip-CjfzafAZ.mjs +0 -122
- package/dist/.setup/provider-fFh_-VR3.mjs +0 -50
- package/dist/.setup/rolldown-runtime-8H4AJuhK.mjs +0 -14
- package/dist/.setup/sandbox-guard-BBP-RbTf.mjs +0 -166
- package/dist/.setup/session-binding-_0W_fHRr.mjs +0 -721
- package/dist/.setup/session-catalog-events-jMcYfQyd.mjs +0 -250
- package/dist/.setup/session-history-read-B3ZfSUbF.mjs +0 -50
- package/dist/.setup/session-initialization-DH1z6fXn.mjs +0 -75
- package/dist/.setup/thread-history-page-BTx-4xsg.mjs +0 -83
- package/dist/.setup/thread-lifecycle-Cik28qWn.mjs +0 -4904
- package/dist/.setup/thread-policy-Cjs4B8xf.mjs +0 -54
- package/dist/.setup/timeout-DZF05XrR.mjs +0 -63
- package/dist/.setup/transcript-history-projection-DHNBDhCU.mjs +0 -243
- package/dist/.setup/version-CoqzXPgK.mjs +0 -12
package/dist/.setup/{upstream-session-fork-D3UKxgVD.mjs → upstream-session-fork-CBeVjBpT.mjs}
RENAMED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { d as readCodexPluginConfig } from "./config-parsing-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { i as projectCodexUserItemText } from "./transcript-history-projection-DHNBDhCU.mjs";
|
|
1
|
+
import { i as isJsonObject, r as flattenCodexDynamicToolFunctions } from "./protocol-CANUwXJ3.mjs";
|
|
2
|
+
import { v as sessionBindingIdentity } from "./session-binding-record-Oe9L-CNY.mjs";
|
|
3
|
+
import { d as readCodexPluginConfig } from "./config-parsing-b088LyhT.mjs";
|
|
4
|
+
import { s as assertCodexModelBackedReviewerEffectiveConfig } from "./config-options-CzyWLTJt.mjs";
|
|
5
|
+
import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-Dp24d7-F.mjs";
|
|
6
|
+
import { i as readUpstreamUserText, r as readMirrorIdentity } from "./upstream-prompt-provenance-fXkKbPVC.mjs";
|
|
7
|
+
import { r as projectCodexUserItemText } from "./transcript-history-projection-DRSifI-1.mjs";
|
|
9
8
|
import { n as codexUpstreamBaseline, t as codexLastTerminalTurnId } from "./session-upstream-marker-D15C9NHp.mjs";
|
|
10
|
-
import { r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-
|
|
11
|
-
import {
|
|
12
|
-
import { t as CodexAppServerScopedRequestRejectedError } from "./request-
|
|
13
|
-
import {
|
|
14
|
-
import { r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-
|
|
15
|
-
import { a as fingerprintCodexMirrorSourceMessage, c as readCodexMirrorSourceFingerprint } from "./transcript-mirror-attestation-
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import "./
|
|
19
|
-
import
|
|
20
|
-
import "./thread-
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { n as
|
|
25
|
-
import {
|
|
9
|
+
import { r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-BL9B5H0L.mjs";
|
|
10
|
+
import { n as readCodexSessionMeta } from "./session-catalog-provenance-DoAvktcj.mjs";
|
|
11
|
+
import { t as CodexAppServerScopedRequestRejectedError } from "./request-BHZ1nz8d.mjs";
|
|
12
|
+
import { r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-DKhXquav.mjs";
|
|
13
|
+
import { r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-C0NbLms1.mjs";
|
|
14
|
+
import { a as fingerprintCodexMirrorSourceMessage, c as readCodexMirrorSourceFingerprint } from "./transcript-mirror-attestation-YSegaktH.mjs";
|
|
15
|
+
import { P as claimCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, f as readCodexAppServerClientDesktopGenerationFingerprint } from "./shared-client-DqyTMYug.mjs";
|
|
16
|
+
import { l as isCodexAppServerOverloadError, u as isCodexAppServerPrewriteRequestCancellationError, v as assertCodexThreadAcceptsDirectInput, y as assertCodexThreadForkResponse } from "./client-N0JpgSzF.mjs";
|
|
17
|
+
import { D as buildCodexNativeHookRelayConfig, E as assertCodexNativeHookRelayAllowed, H as applyCodexNativeSkillIsolation, I as checkCodexThreadAppAvailability, K as codexDynamicToolsFingerprint, M as resolveCodexNativeHookRelayEvents, St as mergeCodexThreadConfigs, U as resolveCodexNativeSkillIsolation, V as parseCodexNativeToolCatalog, X as fingerprintJsonObject, Z as fingerprintUserMcpServersConfigPatch, a as buildCodexThreadConfiguration, h as buildDeveloperInstructions, ht as buildCodexPluginThreadConfig, k as buildCodexNativeHookRelayId, p as resolveCodexWebSearchPlan, wt as shouldBuildCodexPluginThreadConfig } from "./thread-requests-B_bRnMGN.mjs";
|
|
18
|
+
import "./session-binding-DGCYAfvD.mjs";
|
|
19
|
+
import { a as refreshCodexThreadPolicy, n as CodexThreadPolicyHandoffError } from "./thread-policy-DTd-DtkX.mjs";
|
|
20
|
+
import "./thread-ownership-roNP0l1c.mjs";
|
|
21
|
+
import { n as resolveCodexNativeExecutionPolicy } from "./native-execution-policy-BxZJy5mP.mjs";
|
|
22
|
+
import { l as prepareCodexWorkspaceDeveloperInstructions } from "./attempt-workspace-context-C5HigshI.mjs";
|
|
23
|
+
import { d as isCodexDynamicToolExcluded, n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-CAxoF-X1.mjs";
|
|
24
|
+
import { n as prepareCodexSessionInitialization } from "./session-initialization-6aveB9qb.mjs";
|
|
25
|
+
import { createImportedCodexSession } from "./session-history-import-WhX-X33a.mjs";
|
|
26
26
|
import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
27
27
|
import { randomUUID } from "node:crypto";
|
|
28
28
|
import { isDeepStrictEqual } from "node:util";
|
|
29
29
|
import path from "node:path";
|
|
30
30
|
import { lstat } from "node:fs/promises";
|
|
31
|
-
import { constants, createZstdDecompress } from "node:zlib";
|
|
32
31
|
import { root } from "openclaw/plugin-sdk/file-access-runtime";
|
|
32
|
+
import { constants, createZstdDecompress } from "node:zlib";
|
|
33
33
|
import { resolveAgentWorkspaceDir } from "openclaw/plugin-sdk/agent-runtime";
|
|
34
34
|
import { loadCodexBundleMcpThreadConfig } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
35
35
|
import { loadExecApprovals } from "openclaw/plugin-sdk/exec-approvals-runtime";
|
|
@@ -259,7 +259,7 @@ async function prepareCanonicalCodexFork(params) {
|
|
|
259
259
|
const nativeSkillIsolation = await resolveCodexNativeSkillIsolation({
|
|
260
260
|
client: context.client,
|
|
261
261
|
cwd,
|
|
262
|
-
codexHome: appServer.start.env?.CODEX_HOME,
|
|
262
|
+
codexHome: appServer.start.codexHome ?? appServer.start.env?.CODEX_HOME,
|
|
263
263
|
home: appServer.start.env?.HOME,
|
|
264
264
|
userProfile: appServer.start.env?.USERPROFILE
|
|
265
265
|
});
|
|
@@ -375,15 +375,15 @@ function resolveCodexUpstreamForkBoundaryFromTurns(params) {
|
|
|
375
375
|
if (item.type !== "userMessage") continue;
|
|
376
376
|
const isSteer = userMessagesInTurn > 0;
|
|
377
377
|
userMessagesInTurn += 1;
|
|
378
|
+
const local = params.localPrefix[localIndex];
|
|
379
|
+
const identity = local && readMirrorIdentity(local.message);
|
|
380
|
+
const matchesIdentity = identity === `${turn.id}:${item.id}` || !isSteer && identity === `${turn.id}:prompt`;
|
|
381
|
+
if (!matchedPrefix && !matchesIdentity) continue;
|
|
378
382
|
const nativeText = textOnlyMessage(item.content);
|
|
379
383
|
if (nativeText === void 0) return failure("drift-mismatch", "A message before the fork point contains images or attachments that cannot be verified across OpenClaw and Codex. Fork from a text-only span instead.");
|
|
380
|
-
const local = params.localPrefix[localIndex];
|
|
381
384
|
const upstreamText = local && readUpstreamUserText(local.message);
|
|
382
385
|
const text = upstreamText ? nativeText : projectCodexUserItemText(item);
|
|
383
386
|
if (!text) continue;
|
|
384
|
-
const identity = local && readMirrorIdentity(local.message);
|
|
385
|
-
const matchesIdentity = identity === `${turn.id}:${item.id}` || !isSteer && identity === `${turn.id}:prompt`;
|
|
386
|
-
if (!matchedPrefix && !matchesIdentity) continue;
|
|
387
387
|
matchedPrefix = true;
|
|
388
388
|
const localText = textOnlyMessage(local && "content" in local.message ? local.message.content : void 0);
|
|
389
389
|
const upstreamPromptVerified = !upstreamText || local?.message.role === "user" && readCodexMirrorSourceFingerprint(local.message) === fingerprintCodexMirrorSourceMessage(local.message);
|
|
@@ -567,6 +567,7 @@ async function forkCanonicalCodexSession(params) {
|
|
|
567
567
|
}
|
|
568
568
|
});
|
|
569
569
|
const assertCurrent = () => {
|
|
570
|
+
fork.assertCurrent();
|
|
570
571
|
initialization.assertCurrent();
|
|
571
572
|
if (ownership && !subscriptionReleased) ownership.assertCurrent();
|
|
572
573
|
};
|
|
@@ -797,16 +798,23 @@ async function forkCodexUpstreamSession(params, options) {
|
|
|
797
798
|
code: precheck.code,
|
|
798
799
|
message: precheck.message
|
|
799
800
|
};
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
801
|
+
let response;
|
|
802
|
+
let threadId;
|
|
803
|
+
try {
|
|
804
|
+
const rawResponse = await control.forkThread({
|
|
805
|
+
threadId: sourceThreadId,
|
|
806
|
+
beforeTurnId: resolved.boundary.beforeTurnId,
|
|
807
|
+
...params.sandbox === "required" ? { sandbox: "workspace-write" } : {},
|
|
808
|
+
excludeTurns: true
|
|
809
|
+
}, params.assertCurrent);
|
|
810
|
+
response = assertCodexThreadForkResponse(rawResponse);
|
|
811
|
+
threadId = response.thread.id.trim();
|
|
812
|
+
if (!threadId) throw new Error("Codex thread/fork response did not include a thread id");
|
|
813
|
+
if (threadId === sourceThreadId || threadId === sourceBinding?.threadId) throw new Error("Codex thread/fork response reused the source thread id");
|
|
814
|
+
} catch (error) {
|
|
815
|
+
if (!(error instanceof CodexAppServerScopedRequestRejectedError) && !isCodexAppServerPrewriteRequestCancellationError(error) && !isCodexAppServerOverloadError(error)) control.retireConnection?.();
|
|
816
|
+
throw error;
|
|
817
|
+
}
|
|
810
818
|
const forkedThreadId = threadId;
|
|
811
819
|
try {
|
|
812
820
|
const connectionFingerprint = normalizeOptionalString(control.connectionFingerprint);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as buildCodexAppServerUsageSnapshot } from "./rate-limits-
|
|
2
|
-
import { n as readCodexAppServerUsage } from "./request-
|
|
3
|
-
import "./config-
|
|
4
|
-
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-
|
|
1
|
+
import { t as buildCodexAppServerUsageSnapshot } from "./rate-limits-B7-X2TgG.mjs";
|
|
2
|
+
import { n as readCodexAppServerUsage } from "./request-BHZ1nz8d.mjs";
|
|
3
|
+
import "./config-DKhXquav.mjs";
|
|
4
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-C0NbLms1.mjs";
|
|
5
5
|
import { CODEX_APP_SERVER_AUTH_MARKER } from "openclaw/plugin-sdk/agent-runtime";
|
|
6
6
|
//#region extensions/codex/src/app-server/usage.ts
|
|
7
7
|
/** Handles the synthetic usage credential for a Codex-backed OpenAI route. */
|
|
@@ -10,6 +10,7 @@ async function fetchCodexAppServerUsageSnapshot(ctx, options = {}) {
|
|
|
10
10
|
const appServer = resolveCodexAppServerRuntimeOptions({ pluginConfig: options.pluginConfig });
|
|
11
11
|
const usage = await (options.readUsage ?? readCodexAppServerUsage)({
|
|
12
12
|
timeoutMs: ctx.timeoutMs,
|
|
13
|
+
signal: ctx.signal,
|
|
13
14
|
agentDir: ctx.agentDir,
|
|
14
15
|
...ctx.authProfileId ? { authProfileId: ctx.authProfileId } : {},
|
|
15
16
|
config: ctx.config,
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as shouldRefreshCodexRateLimitsForUsageLimitMessage, i as resolveCodexUsageLimitResetAtMs, n as formatCodexUsageLimitErrorMessage } from "./rate-limits-
|
|
3
|
-
import { t as CODEX_CONTROL_METHODS } from "./capabilities-
|
|
4
|
-
import {
|
|
1
|
+
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
|
+
import { a as shouldRefreshCodexRateLimitsForUsageLimitMessage, i as resolveCodexUsageLimitResetAtMs, n as formatCodexUsageLimitErrorMessage } from "./rate-limits-B7-X2TgG.mjs";
|
|
3
|
+
import { t as CODEX_CONTROL_METHODS } from "./capabilities-B3WEZl4e.mjs";
|
|
4
|
+
import { X as readRecentCodexRateLimits, Y as readCodexRateLimitsRevision, Z as rememberCodexRateLimitsRead } from "./shared-client-DqyTMYug.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";
|
|
8
8
|
//#region extensions/codex/src/app-server/usage-limit-error.ts
|
|
9
|
-
/**
|
|
10
|
-
* Enriches Codex usage-limit failures with current rate-limit information and
|
|
11
|
-
* marks blocked auth profiles when Codex exposes a reset time.
|
|
12
|
-
*/
|
|
13
9
|
const CODEX_USAGE_LIMIT_RATE_LIMIT_REFRESH_TIMEOUT_MS = 5e3;
|
|
14
10
|
var CodexUsageLimitPromptError = class extends Error {
|
|
15
11
|
constructor(..._args) {
|
|
@@ -39,7 +35,6 @@ function resolveCodexPromptError(source) {
|
|
|
39
35
|
...info === "serverOverloaded" ? { code: "OVERLOADED" } : {}
|
|
40
36
|
});
|
|
41
37
|
}
|
|
42
|
-
/** Marks a Codex auth profile blocked until the reset time advertised by rate limits. */
|
|
43
38
|
async function markCodexAuthProfileBlockedFromRateLimits(params) {
|
|
44
39
|
const authProfileId = params.authProfileId?.trim();
|
|
45
40
|
if (!authProfileId || !params.params.authProfileStore) return;
|
|
@@ -62,7 +57,6 @@ async function markCodexAuthProfileBlockedFromRateLimits(params) {
|
|
|
62
57
|
});
|
|
63
58
|
}
|
|
64
59
|
}
|
|
65
|
-
/** Formats a turn-start usage-limit error, refreshing rate limits when needed. */
|
|
66
60
|
async function formatCodexTurnStartUsageLimitError(params) {
|
|
67
61
|
return refreshCodexUsageLimitError({
|
|
68
62
|
client: params.client,
|
|
@@ -71,7 +65,6 @@ async function formatCodexTurnStartUsageLimitError(params) {
|
|
|
71
65
|
signal: params.signal
|
|
72
66
|
});
|
|
73
67
|
}
|
|
74
|
-
/** Refreshes a generic prompt usage-limit message into a reset-aware message. */
|
|
75
68
|
async function refreshCodexUsageLimitPromptError(params) {
|
|
76
69
|
if (!shouldRefreshCodexRateLimitsForUsageLimitMessage(params.message)) return;
|
|
77
70
|
return refreshCodexUsageLimitError({
|
|
@@ -87,15 +80,7 @@ async function refreshCodexUsageLimitPromptError(params) {
|
|
|
87
80
|
}
|
|
88
81
|
async function refreshCodexUsageLimitError(params) {
|
|
89
82
|
const initialMessage = formatCodexUsageLimitErrorMessage(params.source);
|
|
90
|
-
|
|
91
|
-
message: initialMessage,
|
|
92
|
-
...params.source.rateLimitsTrustedForProfile ? { rateLimitsForProfile: params.source.rateLimits } : {}
|
|
93
|
-
} : void 0;
|
|
94
|
-
const rateLimits = await readCodexRateLimitsFromAppServerForUsageLimitError({
|
|
95
|
-
client: params.client,
|
|
96
|
-
timeoutMs: params.timeoutMs,
|
|
97
|
-
signal: params.signal
|
|
98
|
-
});
|
|
83
|
+
const rateLimits = shouldRefreshCodexRateLimitsForUsageLimitMessage(initialMessage) ? await readCodexRateLimitsFromAppServerForUsageLimitError(params) : void 0;
|
|
99
84
|
if (!rateLimits) return initialMessage ? {
|
|
100
85
|
message: initialMessage,
|
|
101
86
|
...params.source.rateLimitsTrustedForProfile ? { rateLimitsForProfile: params.source.rateLimits } : {}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { runBoundedCodexAppServerTurn } from "./bounded-turn-
|
|
4
|
-
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
1
|
+
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
|
+
import { f as buildCodexNativeWebSearchThreadConfig } from "./thread-requests-B_bRnMGN.mjs";
|
|
3
|
+
import { runBoundedCodexAppServerTurn } from "./bounded-turn-CbjoN2OW.mjs";
|
|
4
|
+
import { normalizeOptionalString, normalizeTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { readStringParam, resolveSearchTimeoutSeconds, wrapWebContent } from "openclaw/plugin-sdk/provider-web-search";
|
|
6
6
|
//#region extensions/codex/src/web-search-provider.runtime.ts
|
|
7
7
|
async function executeCodexWebSearchProviderTool(ctx, args, executionContext, options) {
|
|
@@ -13,6 +13,7 @@ async function executeCodexWebSearchProviderTool(ctx, args, executionContext, op
|
|
|
13
13
|
modelProvider: "openai",
|
|
14
14
|
timeoutMs: resolveSearchTimeoutSeconds(ctx.searchConfig) * 1e3,
|
|
15
15
|
signal: executionContext?.signal,
|
|
16
|
+
assertCurrent: executionContext?.assertCurrent,
|
|
16
17
|
agentDir: ctx.agentDir,
|
|
17
18
|
options,
|
|
18
19
|
taskLabel: "hosted search",
|
|
@@ -45,11 +46,11 @@ async function executeCodexWebSearchProviderTool(ctx, args, executionContext, op
|
|
|
45
46
|
}
|
|
46
47
|
function summarizeCodexWebSearchItem(item) {
|
|
47
48
|
const action = isJsonObject(item.action) ? item.action : void 0;
|
|
48
|
-
const actionType =
|
|
49
|
-
const queries = actionType === "search" ?
|
|
50
|
-
const query = normalizeOptionalString(item.query) ?? (actionType === "search" ?
|
|
51
|
-
const url =
|
|
52
|
-
const pattern =
|
|
49
|
+
const actionType = normalizeOptionalString(action?.type);
|
|
50
|
+
const queries = actionType === "search" ? normalizeTrimmedStringList(action?.queries) : [];
|
|
51
|
+
const query = normalizeOptionalString(item.query) ?? (actionType === "search" ? normalizeOptionalString(action?.query) : void 0) ?? queries[0];
|
|
52
|
+
const url = normalizeOptionalString(action?.url);
|
|
53
|
+
const pattern = normalizeOptionalString(action?.pattern);
|
|
53
54
|
return {
|
|
54
55
|
...query ? { query } : {},
|
|
55
56
|
...queries.length > 0 ? { queries } : {},
|
|
@@ -58,16 +59,5 @@ function summarizeCodexWebSearchItem(item) {
|
|
|
58
59
|
...pattern ? { pattern } : {}
|
|
59
60
|
};
|
|
60
61
|
}
|
|
61
|
-
function readNonEmptyString(record, key) {
|
|
62
|
-
return record ? normalizeOptionalString(record[key]) : void 0;
|
|
63
|
-
}
|
|
64
|
-
function readNonEmptyStringArray(record, key) {
|
|
65
|
-
const value = record?.[key];
|
|
66
|
-
if (!Array.isArray(value)) return [];
|
|
67
|
-
return value.flatMap((entry) => {
|
|
68
|
-
const normalized = normalizeOptionalString(entry);
|
|
69
|
-
return normalized ? [normalized] : [];
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
62
|
//#endregion
|
|
73
63
|
export { executeCodexWebSearchProviderTool };
|
package/dist/api.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "./.setup/
|
|
5
|
-
import { n as
|
|
1
|
+
import { d as readCodexPluginConfig } from "./.setup/config-parsing-b088LyhT.mjs";
|
|
2
|
+
import { a as resolveCodexAppServerStartOptionsForAgent } from "./.setup/config-options-CzyWLTJt.mjs";
|
|
3
|
+
import { i as resolveManagedCodexNativeCommand, r as resolveManagedCodexAppServerStartOptions, s as CODEX_APP_SERVER_VERSION, t as isManagedCodexDesktopCommand } from "./.setup/managed-binary-kiWRhNRE.mjs";
|
|
4
|
+
import { t as codexNativeProfileRecoveryHealthCheck } from "./.setup/auth-profile-health-oHizqgye.mjs";
|
|
5
|
+
import { n as findCodexAppServerSpawnError, t as describeCodexSpawnError } from "./.setup/spawn-error-CL3n6MAa.mjs";
|
|
6
|
+
import "./.setup/config-DKhXquav.mjs";
|
|
7
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./.setup/config-runtime-C0NbLms1.mjs";
|
|
6
8
|
import { listAgentIds, resolveAgentDir } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
7
9
|
import { runUtf8CommandWithTimeout } from "openclaw/plugin-sdk/process-runtime";
|
|
8
10
|
import path from "node:path";
|
|
11
|
+
import { coerceErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
9
12
|
import { fileURLToPath } from "node:url";
|
|
10
13
|
import { resolveDefaultModelForAgent } from "openclaw/plugin-sdk/agent-runtime";
|
|
11
14
|
import { resolveEffectiveAgentRuntime } from "openclaw/plugin-sdk/command-auth-native";
|
|
@@ -24,9 +27,6 @@ function managedCodexFinding(params) {
|
|
|
24
27
|
...params.fixHint ? { fixHint: params.fixHint } : {}
|
|
25
28
|
};
|
|
26
29
|
}
|
|
27
|
-
function readErrorMessage(error) {
|
|
28
|
-
return error instanceof Error ? error.message : String(error);
|
|
29
|
-
}
|
|
30
30
|
function parseCodexVersion(output) {
|
|
31
31
|
return /(?:^|\s)(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?)(?:\s|$)/u.exec(output)?.[1];
|
|
32
32
|
}
|
|
@@ -67,7 +67,7 @@ function createCodexManagedAppServerHealthCheck(params) {
|
|
|
67
67
|
const isFinalization = ctx.mode === "fix" && env.OPENCLAW_UPDATE_POST_CORE === "1";
|
|
68
68
|
const versionFailureSeverity = isFinalization ? "warning" : "error";
|
|
69
69
|
const versionFailureHint = isFinalization ? "Codex readiness will be rechecked by its plugin after restart; inspect the Codex plugin if the warning persists." : void 0;
|
|
70
|
-
|
|
70
|
+
const candidates = [];
|
|
71
71
|
for (const agentId of listAgentIds(ctx.cfg)) {
|
|
72
72
|
const model = resolveDefaultModelForAgent({
|
|
73
73
|
cfg: ctx.cfg,
|
|
@@ -79,16 +79,23 @@ function createCodexManagedAppServerHealthCheck(params) {
|
|
|
79
79
|
modelId: model.model,
|
|
80
80
|
agentId
|
|
81
81
|
}) !== "codex") continue;
|
|
82
|
-
|
|
82
|
+
candidates.push(resolveAgentStartOptions({
|
|
83
83
|
startOptions: start,
|
|
84
84
|
agentDir: resolveAgentDir(ctx.cfg, agentId, env),
|
|
85
85
|
env
|
|
86
|
-
});
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
if (ctx.cfg.plugins?.entries?.codex?.enabled === true && readCodexPluginConfig(pluginConfig).sessionCatalog?.enabled !== false) candidates.push({
|
|
89
|
+
...start,
|
|
90
|
+
managedCommandOrder: "package-only"
|
|
91
|
+
});
|
|
92
|
+
let resolved;
|
|
93
|
+
for (const candidate of candidates) {
|
|
87
94
|
try {
|
|
88
|
-
resolved = await resolveStartOptions(
|
|
95
|
+
resolved = await resolveStartOptions(candidate, { pluginRoot: params.pluginRoot });
|
|
89
96
|
} catch (error) {
|
|
90
97
|
return [managedCodexFinding({
|
|
91
|
-
message: `Managed Codex app-server could not be resolved: ${
|
|
98
|
+
message: `Managed Codex app-server could not be resolved: ${coerceErrorMessage(error)}`,
|
|
92
99
|
path: params.pluginRoot,
|
|
93
100
|
requirement: `an executable Codex ${CODEX_APP_SERVER_VERSION} managed artifact`,
|
|
94
101
|
fixHint: "Reinstall the staged OpenClaw package with its @openai/codex platform dependency, then rerun the candidate check."
|
|
@@ -109,16 +116,17 @@ function createCodexManagedAppServerHealthCheck(params) {
|
|
|
109
116
|
try {
|
|
110
117
|
output = await (params.deps?.runVersionCommand ? params.deps.runVersionCommand(nativeCommand) : runVersionCommand(nativeCommand, env));
|
|
111
118
|
} catch (error) {
|
|
119
|
+
const spawnFailure = findCodexAppServerSpawnError(describeCodexSpawnError(error, nativeCommand));
|
|
112
120
|
return [managedCodexFinding({
|
|
113
|
-
message: `Managed Codex app-server version check failed: ${
|
|
114
|
-
severity: versionFailureSeverity,
|
|
121
|
+
message: spawnFailure?.message ?? `Managed Codex app-server version check failed: ${coerceErrorMessage(error)}`,
|
|
122
|
+
severity: spawnFailure && resolved.managedCommandOrder === "package-only" ? "warning" : versionFailureSeverity,
|
|
115
123
|
path: nativeCommand,
|
|
116
124
|
requirement: `Codex ${CODEX_APP_SERVER_VERSION} must report its version within ${CODEX_VERSION_TIMEOUT_MS} ms`,
|
|
117
125
|
fixHint: versionFailureHint ?? "Repair or reinstall the staged OpenClaw package, then rerun the candidate check before cutover."
|
|
118
126
|
})];
|
|
119
127
|
}
|
|
120
128
|
const detectedVersion = parseCodexVersion(`${output.stdout}\n${output.stderr}`);
|
|
121
|
-
if (detectedVersion !== "0.
|
|
129
|
+
if (detectedVersion !== "0.158.0") return [managedCodexFinding({
|
|
122
130
|
severity: versionFailureSeverity,
|
|
123
131
|
message: detectedVersion ? `Managed Codex app-server version mismatch: expected ${CODEX_APP_SERVER_VERSION}, detected ${detectedVersion}.` : `Managed Codex app-server did not report a parseable version; expected ${CODEX_APP_SERVER_VERSION}.`,
|
|
124
132
|
path: nativeCommand,
|
|
@@ -144,6 +152,7 @@ function registerCodexManagedAppServerDoctorChecks(host) {
|
|
|
144
152
|
...host,
|
|
145
153
|
pluginRoot: CODEX_PLUGIN_ROOT
|
|
146
154
|
});
|
|
155
|
+
if (!host.getHealthCheck(codexNativeProfileRecoveryHealthCheck.id)) host.registerHealthCheck(codexNativeProfileRecoveryHealthCheck);
|
|
147
156
|
}
|
|
148
157
|
//#endregion
|
|
149
158
|
export { CODEX_MANAGED_APP_SERVER_CHECK_ID, registerCodexManagedAppServerDoctorChecks };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region extensions/codex/catalog-page-worker-entrypoint.ts
|
|
2
|
+
const codexCatalogPageWorkerEntrypoint = {
|
|
3
|
+
currentModuleUrl: import.meta.url,
|
|
4
|
+
sourceWorkerName: "catalog-page.worker",
|
|
5
|
+
distWorkerPath: "extensions/codex/catalog-page.worker.js",
|
|
6
|
+
package: {
|
|
7
|
+
name: "@openclaw/codex",
|
|
8
|
+
distWorkerPath: "catalog-page.worker.js"
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { codexCatalogPageWorkerEntrypoint };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { t as createCodexCatalogDecoder } from "./.setup/client-catalog-response-5HHLdcde.mjs";
|
|
2
|
+
import { serveWorkerTasks } from "openclaw/plugin-sdk/worker-task-server";
|
|
3
|
+
//#region extensions/codex/catalog-page.worker.ts
|
|
4
|
+
const decode = createCodexCatalogDecoder();
|
|
5
|
+
serveWorkerTasks((input) => {
|
|
6
|
+
return decode(input);
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
9
|
+
export {};
|
package/dist/cli-metadata.js
CHANGED
|
@@ -2,7 +2,7 @@ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
|
2
2
|
//#region extensions/codex/cli-metadata.ts
|
|
3
3
|
function registerCodexCliMetadata(api) {
|
|
4
4
|
api.registerCli(async ({ program }) => {
|
|
5
|
-
const { registerCodexSessionCli } = await import("./.setup/session-cli-
|
|
5
|
+
const { registerCodexSessionCli } = await import("./.setup/session-cli-Cn_nCqfq.mjs");
|
|
6
6
|
registerCodexSessionCli(program);
|
|
7
7
|
}, { descriptors: [{
|
|
8
8
|
name: "codex",
|
|
@@ -114,6 +114,11 @@ function hasRetiredApprovalPolicy(value) {
|
|
|
114
114
|
const approvalPolicy = asNullableRecord(value)?.approvalPolicy;
|
|
115
115
|
return approvalPolicy === "on-failure" || approvalPolicy === "untrusted";
|
|
116
116
|
}
|
|
117
|
+
function hasBlankNetworkProxyOptionalFields(value) {
|
|
118
|
+
const appServer = asNullableRecord(value);
|
|
119
|
+
const networkProxy = asNullableRecord(appServer?.networkProxy);
|
|
120
|
+
return networkProxy?.enabled === true && [networkProxy.profileName, appServer?.remoteWorkspaceRoot].some((field) => typeof field === "string" && !field.trim());
|
|
121
|
+
}
|
|
117
122
|
const RETIRED_TURN_IDLE_TIMEOUT_KEYS = [
|
|
118
123
|
"turnCompletionIdleTimeoutMs",
|
|
119
124
|
"turnAssistantCompletionIdleTimeoutMs",
|
|
@@ -167,10 +172,21 @@ const legacyConfigRules = [
|
|
|
167
172
|
],
|
|
168
173
|
message: "Codex app-server turn idle timeouts are retired; native Codex owns provider liveness and turn completion. The existing agents.defaults.timeoutSeconds run limit remains unchanged. Run \"openclaw doctor --fix\" to remove the old settings.",
|
|
169
174
|
match: hasRetiredTurnIdleTimeout
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
path: [
|
|
178
|
+
"plugins",
|
|
179
|
+
"entries",
|
|
180
|
+
"codex",
|
|
181
|
+
"config",
|
|
182
|
+
"appServer"
|
|
183
|
+
],
|
|
184
|
+
message: "Blank plugins.entries.codex.config.appServer.networkProxy.profileName or appServer.remoteWorkspaceRoot must be removed to use the defaults with network restrictions. Run \"openclaw doctor --fix\".",
|
|
185
|
+
match: hasBlankNetworkProxyOptionalFields
|
|
170
186
|
}
|
|
171
187
|
];
|
|
172
188
|
/**
|
|
173
|
-
*
|
|
189
|
+
* Repairs legacy Codex plugin config while preserving unrelated config.
|
|
174
190
|
*/
|
|
175
191
|
function normalizeCompatibilityConfig({ cfg }) {
|
|
176
192
|
const rawEntry = asNullableRecord(cfg.plugins?.entries?.codex);
|
|
@@ -181,7 +197,8 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
181
197
|
const shouldRewriteDestructivePolicy = hasLegacyPluginDestructivePolicy(rawCodexPlugins);
|
|
182
198
|
const shouldRewriteApprovalPolicy = hasRetiredApprovalPolicy(rawAppServer);
|
|
183
199
|
const shouldRemoveTurnIdleTimeouts = hasRetiredTurnIdleTimeout(rawAppServer);
|
|
184
|
-
|
|
200
|
+
const shouldRemoveBlankNetworkProxyFields = hasBlankNetworkProxyOptionalFields(rawAppServer);
|
|
201
|
+
if (!rawPluginConfig || !shouldRemoveDynamicToolsProfile && !shouldRewriteDestructivePolicy && !shouldRewriteApprovalPolicy && !shouldRemoveTurnIdleTimeouts && !shouldRemoveBlankNetworkProxyFields) return {
|
|
185
202
|
config: cfg,
|
|
186
203
|
changes: []
|
|
187
204
|
};
|
|
@@ -216,6 +233,21 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
216
233
|
changes.push(`Removed retired plugins.entries.codex.config.appServer.${key}; native Codex owns provider liveness and turn completion. agents.defaults.timeoutSeconds was not changed.`);
|
|
217
234
|
}
|
|
218
235
|
}
|
|
236
|
+
if (nextAppServer && shouldRemoveBlankNetworkProxyFields) {
|
|
237
|
+
const nextNetworkProxy = asNullableRecord(nextAppServer.networkProxy);
|
|
238
|
+
for (const [target, key, configPath] of [[
|
|
239
|
+
nextNetworkProxy,
|
|
240
|
+
"profileName",
|
|
241
|
+
"networkProxy.profileName"
|
|
242
|
+
], [
|
|
243
|
+
nextAppServer,
|
|
244
|
+
"remoteWorkspaceRoot",
|
|
245
|
+
"remoteWorkspaceRoot"
|
|
246
|
+
]]) if (target && typeof target[key] === "string" && !target[key].trim()) {
|
|
247
|
+
delete target[key];
|
|
248
|
+
changes.push(`Removed blank plugins.entries.codex.config.appServer.${configPath}; the default now applies.`);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
219
251
|
if (shouldRewriteApprovalPolicy) {
|
|
220
252
|
if (nextAppServer?.approvalPolicy === "on-failure" || nextAppServer?.approvalPolicy === "untrusted") nextAppServer.approvalPolicy = "on-request";
|
|
221
253
|
changes.push("Renamed retired plugins.entries.codex.config.appServer.approvalPolicy to \"on-request\".");
|
|
@@ -225,11 +257,21 @@ function normalizeCompatibilityConfig({ cfg }) {
|
|
|
225
257
|
changes
|
|
226
258
|
};
|
|
227
259
|
}
|
|
228
|
-
const stateMigrations = [
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
260
|
+
const stateMigrations = [
|
|
261
|
+
{
|
|
262
|
+
id: "codex-app-server-sidecars-to-plugin-state",
|
|
263
|
+
label: "Codex app-server thread bindings",
|
|
264
|
+
detectLegacyState: async (params) => (await import("./.setup/session-binding-sidecars-jo6H8dFr.mjs")).detectLegacySessionBindingSidecars(params),
|
|
265
|
+
migrateLegacyState: async (params) => (await import("./.setup/session-binding-sidecars-jo6H8dFr.mjs")).migrateLegacySessionBindingSidecars(params)
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
id: "codex-native-task-assignments",
|
|
269
|
+
label: "Codex native pending assignments",
|
|
270
|
+
collectBackupResources: async (params) => (await import("./.setup/native-task-assignments-DMQ0g3hu.mjs")).codexNativeTaskAssignmentMigration.collectBackupResources(params),
|
|
271
|
+
detectLegacyState: async (params) => (await import("./.setup/native-task-assignments-DMQ0g3hu.mjs")).codexNativeTaskAssignmentMigration.detectLegacyState(params),
|
|
272
|
+
migrateLegacyState: async (params) => (await import("./.setup/native-task-assignments-DMQ0g3hu.mjs")).codexNativeTaskAssignmentMigration.migrateLegacyState(params)
|
|
273
|
+
},
|
|
274
|
+
codexOrphanedSessionBindingMigration
|
|
275
|
+
];
|
|
234
276
|
//#endregion
|
|
235
277
|
export { legacyConfigRules, normalizeCompatibilityConfig, stateMigrations };
|