@openclaw/codex 2026.9.4 → 2026.9.6
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/assets/activity.svg +30 -0
- package/assets/icon.png +0 -0
- package/dist/.setup/account-usage-runtime-Eem_WGqY.mjs +75 -0
- package/dist/{apply-CvT8tW5i.js → .setup/apply-DDOi8uNx.mjs} +24 -30
- package/dist/.setup/async-questions-DdhOCwGi.mjs +27 -0
- package/dist/{attempt-client-cleanup-DKHzbwt5.js → .setup/attempt-client-cleanup-CEv1cKwF.mjs} +79 -49
- package/dist/.setup/attempt-terminal-gZrxQ35N.mjs +5 -0
- package/dist/.setup/attempt-workspace-context-DUVEn_CS.mjs +331 -0
- package/dist/{auth-binding-CWlKVccJ.js → .setup/auth-binding-DhLWa_7K.mjs} +1 -1
- package/dist/{auth-cache-key-7orQae_j.js → .setup/auth-cache-key-B2mpaI9D.mjs} +9 -81
- package/dist/{auth-profile-CwzO4_RG.js → .setup/auth-profile-WqZtZfXN.mjs} +1 -1
- package/dist/.setup/auth-profile-health-oHizqgye.mjs +53 -0
- package/dist/.setup/auth-profile-recovery-BREezV0L.mjs +14 -0
- package/dist/.setup/binding-connection-ThoatDcb.mjs +50 -0
- package/dist/.setup/binding-connection.runtime-yoHrABt-.mjs +48 -0
- package/dist/{bounded-turn-C_Hneydj.js → .setup/bounded-turn-B2HScEgT.mjs} +143 -32
- package/dist/{build-state-BCmg9-5p.js → .setup/build-state-C7EnDVgr.mjs} +1 -1
- package/dist/{capabilities-8vx68WLH.js → .setup/capabilities-CDXOOFdZ.mjs} +1 -1
- package/dist/{client-B57KWPQx.js → .setup/client-Cs08OXVQ.mjs} +705 -512
- package/dist/.setup/client-catalog-response-BMgt_4q4.mjs +285 -0
- package/dist/{command-dispatch-BpduNGVf.js → .setup/command-dispatch-B4JuOsOk.mjs} +8 -4
- package/dist/{command-formatters-lxlkNZgU.js → .setup/command-formatters-Bmqvr9tO.mjs} +8 -4
- package/dist/{command-handlers-tiL9iWj7.js → .setup/command-handlers-DW7Lx9oH.mjs} +137 -186
- package/dist/{command-rpc-CR5EOEZX.js → .setup/command-rpc-DixIj3HW.mjs} +47 -23
- package/dist/{compact-B_H3AOd7.js → .setup/compact-Du5UvtxA.mjs} +29 -51
- package/dist/{config-oIORaQ5T.js → .setup/config-BoTP_mrL.mjs} +5 -4
- package/dist/{config-options-CXMq1T-C.js → .setup/config-options-BvaRs51b.mjs} +50 -446
- package/dist/{protocol-5bh1G-H7.js → .setup/config-parsing-CcB9iPoq.mjs} +9 -51
- package/dist/{config-runtime-D0zGNIHu.js → .setup/config-runtime-C8Rw1m1m.mjs} +2 -2
- package/dist/.setup/config-security-BEReZ6go.mjs +380 -0
- package/dist/{conversation-binding-DsB4-O7U.js → .setup/conversation-binding-DP-gMrBP.mjs} +29 -38
- package/dist/{conversation-binding-data-BiodpIzq.js → .setup/conversation-binding-data-CrcyZk6O.mjs} +1 -1
- package/dist/{conversation-control-CtUu1b3m.js → .setup/conversation-control-uK9Jomlc.mjs} +32 -67
- package/dist/.setup/cyber-failover-DYwbmf1o.mjs +123 -0
- package/dist/.setup/cyber-failover-notice-e9G3J9-e.mjs +17 -0
- package/dist/{dynamic-tools-CmN5RAip.js → .setup/dynamic-tools-BDXl-8Cw.mjs} +936 -620
- package/dist/{effective-mcp-catalog-Bd73bqA8.js → .setup/effective-mcp-catalog-CvnvnGIe.mjs} +3 -3
- package/dist/{ephemeral-turn-D78_VmzO.js → .setup/ephemeral-turn-poidXgek.mjs} +9 -7
- package/dist/{event-projector-assistant-message-BmBM4qBV.js → .setup/event-projector-assistant-message-BsruvNrH.mjs} +8 -7
- package/dist/{event-projector-items-5VhsECCO.js → .setup/event-projector-items-C6L_5ZiT.mjs} +42 -8
- package/dist/{attempt-notifications-C9XufG6l.js → .setup/event-projector-usage-CnBS8Wa3.mjs} +102 -9
- package/dist/{harness-C7rRa7bm.js → .setup/harness-a_MsE4-_.mjs} +81 -21
- package/dist/{inference-context-Dr_mzvk4.js → .setup/inference-context-D96l9-ew.mjs} +1 -1
- package/dist/.setup/inference-proxy-b-aJMSxm.mjs +601 -0
- package/dist/{isolated-completion-DWVb5U2J.js → .setup/isolated-completion-BIZFhTNG.mjs} +18 -11
- package/dist/.setup/launch-args-DbFCehO7.mjs +196 -0
- package/dist/{managed-binary-D22rNEcR.js → .setup/managed-binary-BnshlFag.mjs} +14 -3
- package/dist/{managed-thread-store-D1t5jh3G.js → .setup/managed-thread-store-BMqgThVL.mjs} +48 -14
- package/dist/{model-catalog-Dq2n8f_p.js → .setup/model-catalog-CfXJf9Ay.mjs} +36 -12
- package/dist/{models-PCKOim-h.js → .setup/models-KnqBv0hE.mjs} +3 -3
- package/dist/.setup/native-auth-rWbGbMn3.mjs +57 -0
- package/dist/{native-subagent-history-DjtPloaU.js → .setup/native-subagent-history-0nYYgo0k.mjs} +43 -35
- package/dist/.setup/native-subagent-monitor-D3filLY2.mjs +4859 -0
- package/dist/{native-subagent-task-ids-BzTdT0Uw.js → .setup/native-subagent-task-ids-wb8CKZGN.mjs} +98 -44
- package/dist/{node-cli-sessions-DKaOmVUh.js → .setup/node-cli-sessions-r3avj02l.mjs} +86 -68
- package/dist/.setup/node-exec-server.runtime-BDwWXVpK.mjs +247 -0
- package/dist/{plan-7uG-Fp36.js → .setup/plan-CN3VwfNU.mjs} +133 -119
- package/dist/{plugin-activation-BYQculil.js → .setup/plugin-activation-DT3MNtqj.mjs} +7 -16
- package/dist/{plugin-app-cache-key-d0eKxy7b.js → .setup/plugin-app-cache-key-B2CsSdnV.mjs} +32 -44
- package/dist/{plugin-approval-roundtrip-Bz3FT8W5.js → .setup/plugin-approval-roundtrip-C0MZzCuP.mjs} +1 -1
- package/dist/{plugin-inventory-oL4Na1ZG.js → .setup/plugin-inventory-BoRei8Z4.mjs} +21 -11
- package/dist/{plugin-marketplace-discovery-P-Vndfqq.js → .setup/plugin-marketplace-discovery-CDOi8IFs.mjs} +4 -1
- package/dist/{plugin-metadata-cache-ClPJpRio.js → .setup/plugin-metadata-cache-Ctmo83k_.mjs} +226 -141
- package/dist/.setup/protocol-CANUwXJ3.mjs +17 -0
- package/dist/{provider-MQ8PVkuE.js → .setup/provider-BOsxQHOM.mjs} +9 -5
- package/dist/{provider-capabilities-BvCUL69A.js → .setup/provider-capabilities-BfE88FZ5.mjs} +31 -3
- package/dist/{rate-limits-CBMmWBr9.js → .setup/rate-limits-CMU3DUD0.mjs} +174 -151
- package/dist/{request-B7hEkBGq.js → .setup/request-D2L0zMrq.mjs} +130 -42
- package/dist/{run-attempt-CvsAAGa0.js → .setup/run-attempt-BHu11r7h.mjs} +1628 -966
- package/dist/.setup/run-attempt-lifecycle-B7JbY4-F.mjs +71 -0
- package/dist/{runtime-artifact-BJ0rXBZ_.js → .setup/runtime-artifact-CLZ8udh-.mjs} +29 -45
- package/dist/{sandbox-guard-BxgyoM8M.js → .setup/sandbox-guard-C2sRMOEY.mjs} +3 -3
- package/dist/{session-binding-CI8UuilT.js → .setup/session-binding-Cm0apEbd.mjs} +36 -83
- package/dist/{session-binding-record-Bcvslnhf.js → .setup/session-binding-record-BGoz8wOK.mjs} +202 -5
- package/dist/.setup/session-binding-sidecars-BlB5EvIS.mjs +546 -0
- package/dist/.setup/session-catalog-Pno1xGcl.mjs +2764 -0
- package/dist/{session-catalog-adoption-tcZi1IfX.js → .setup/session-catalog-adoption-BI6UTDZT.mjs} +58 -26
- package/dist/{session-catalog-archive-CwKg8Xz2.js → .setup/session-catalog-archive-lHBqzhaO.mjs} +6 -6
- package/dist/.setup/session-catalog-events-Bj6j94E_.mjs +347 -0
- package/dist/.setup/session-catalog-index-B9_VQIUz.mjs +1170 -0
- package/dist/.setup/session-catalog-index-order-hcdz07yN.mjs +48 -0
- package/dist/.setup/session-catalog-index-state-Dgh8ORJm.mjs +183 -0
- package/dist/{thread-history-page-D0JIp48V.js → .setup/session-catalog-native-projection-DowriLid.mjs} +223 -95
- package/dist/{session-catalog-node-adoption-B1tgDW-m.js → .setup/session-catalog-node-adoption-ITddWx_X.mjs} +25 -13
- package/dist/{session-catalog-node-continue-Ci-DXyJP.js → .setup/session-catalog-node-continue-6g6qi4A9.mjs} +24 -15
- package/dist/.setup/session-catalog-projection-zK_PUsiE.mjs +422 -0
- package/dist/{session-cli-DNN_jhGc.js → .setup/session-cli-irrD-uo7.mjs} +3 -3
- package/dist/{session-history-Cz-tOOYj.js → .setup/session-history-BrqhSCf9.mjs} +19 -19
- package/dist/{session-history-import-DwyijFI6.js → .setup/session-history-import-D-3wAgOP.mjs} +4 -4
- package/dist/{session-history-read-cxPUxyVV.js → .setup/session-history-read-B3ZfSUbF.mjs} +2 -2
- package/dist/{session-history.worker-BeK1YOyT.js → .setup/session-history.worker-CaCh0xF_.mjs} +10 -24
- package/dist/{session-initialization-Ct0_Hzmg.js → .setup/session-initialization-rcgbZiid.mjs} +2 -2
- package/dist/{session-permission-policy-BBmXA8Eg.js → .setup/session-permission-policy-BI1QK_98.mjs} +2 -2
- package/dist/{session-retirement-B2YfbAAT.js → .setup/session-retirement-BH-S6qkJ.mjs} +26 -7
- package/dist/{settled-turn-context-Du6gdUDd.js → .setup/settled-turn-context-fmwouT5I.mjs} +2 -2
- package/dist/{settled-turn-finalizer-Dn91stmc.js → .setup/settled-turn-finalizer-DiAi6Kx6.mjs} +12 -12
- package/dist/{shared-client-CscigXXL.js → .setup/shared-client-DA4VR4Eb.mjs} +332 -221
- package/dist/{side-question-BGMJQf4U.js → .setup/side-question-BJ1wSDcB.mjs} +183 -230
- package/dist/{source-CElXU0Oy.js → .setup/source-CUzJq5WN.mjs} +11 -10
- package/dist/.setup/spawn-error-CL3n6MAa.mjs +57 -0
- package/dist/{thread-archive-guard-DfpBr-Sz.js → .setup/thread-archive-guard-C9frICzX.mjs} +10 -3
- package/dist/.setup/thread-history-page-DoVpnHim.mjs +83 -0
- package/dist/{thread-lifecycle-DXl1-I6b.js → .setup/thread-lifecycle-B3mfz1TG.mjs} +347 -2318
- package/dist/{thread-ownership-BsDRTsyp.js → .setup/thread-ownership-DcTtAcXj.mjs} +6 -4
- package/dist/{thread-policy-BuEQfE0g.js → .setup/thread-policy-DGuQsuFC.mjs} +19 -3
- package/dist/.setup/thread-requests-BLvGkP2R.mjs +2205 -0
- package/dist/{thread-resume-DsDOZpFg.js → .setup/thread-resume-DIBXwOpE.mjs} +8 -5
- package/dist/.setup/timeout-C910MdAB.mjs +80 -0
- package/dist/{transcript-history-projection-v17wXgdK.js → .setup/transcript-history-projection-ZZpkFkJ_.mjs} +96 -61
- package/dist/{transcript-mirror-C5CKgNy6.js → .setup/transcript-mirror-BtHDBp1G.mjs} +224 -195
- package/dist/{transcript-mirror-attestation-DibE0krH.js → .setup/transcript-mirror-attestation-CzM-94NC.mjs} +4 -1
- package/dist/{transport-stdio-BGjHoYLr.js → .setup/transport-stdio-h2VHOskC.mjs} +274 -89
- package/dist/{upstream-session-fork-BZerMte_.js → .setup/upstream-session-fork-BUr4OUbC.mjs} +51 -42
- package/dist/{usage-tCk-mg_x.js → .setup/usage-BML0r-ua.mjs} +5 -4
- package/dist/.setup/usage-limit-error-DUMbefVY.mjs +166 -0
- package/dist/{web-search-provider.runtime-B7bGbGWq.js → .setup/web-search-provider.runtime-CDKlN-Rv.mjs} +4 -3
- package/dist/api.js +23 -12
- 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 +8 -528
- package/dist/harness.js +1 -1
- package/dist/index.js +306 -215
- package/dist/media-understanding-provider.js +3 -3
- package/dist/migration-provider-api.js +1 -1
- package/dist/native-tool-policy.js +12 -0
- package/dist/provider-discovery.js +18 -0
- package/dist/session-history-worker-runtime.js +36 -35
- package/dist/session-history.worker.js +2 -2
- package/dist/web-search-contract-api.js +1 -1
- package/openclaw.plugin.json +354 -69
- package/package.json +14 -8
- package/dist/attempt-context-D44yeDII.js +0 -636
- package/dist/binding-connection-D3udKbIE.js +0 -60
- package/dist/event-projector-usage-BfXmpOec.js +0 -102
- package/dist/inference-proxy-HGXKUIre.js +0 -311
- package/dist/launch-args-RXQwn8zV.js +0 -90
- package/dist/native-subagent-history-owner-Pcp7JuVF.js +0 -34
- package/dist/native-subagent-monitor-fQ7eIXEf.js +0 -2978
- package/dist/node-exec-server.runtime-Cl2vapEi.js +0 -226
- package/dist/rpc-error-ttN_QjEm.js +0 -30
- package/dist/session-catalog-ct-AH01I.js +0 -1477
- package/dist/session-catalog-home-id-CwhLdC03.js +0 -18
- package/dist/session-catalog-provenance-D-dIfRAH.js +0 -96
- package/dist/timeout-BVw8aaM1.js +0 -33
- package/dist/version-omm6IPI3.js +0 -12
- /package/dist/{auth-profile-selection-DFu9e167.js → .setup/auth-profile-selection-DFu9e167.mjs} +0 -0
- /package/dist/{config-utils-DujwEnhg.js → .setup/config-utils-DujwEnhg.mjs} +0 -0
- /package/dist/{context-compaction-activity-CMla5FPJ.js → .setup/context-compaction-activity-CMla5FPJ.mjs} +0 -0
- /package/dist/{elicitation-input-DPoK8F7w.js → .setup/elicitation-input-DPoK8F7w.mjs} +0 -0
- /package/dist/{history-rejection-B4nOXNXF.js → .setup/history-rejection-B4nOXNXF.mjs} +0 -0
- /package/dist/{image-payload-sanitizer-tupAr-2o.js → .setup/image-payload-sanitizer-tupAr-2o.mjs} +0 -0
- /package/dist/{incognito-session-uhrBF6wJ.js → .setup/incognito-session-uhrBF6wJ.mjs} +0 -0
- /package/dist/{local-runtime-attribution-B_2mnqhb.js → .setup/local-runtime-attribution-B_2mnqhb.mjs} +0 -0
- /package/dist/{native-execution-policy-umd0tgh4.js → .setup/native-execution-policy-umd0tgh4.mjs} +0 -0
- /package/dist/{rolldown-runtime-8H4AJuhK.js → .setup/rolldown-runtime-8H4AJuhK.mjs} +0 -0
- /package/dist/{session-binding-meta-B7aEMU7g.js → .setup/session-binding-meta-B7aEMU7g.mjs} +0 -0
- /package/dist/{session-upstream-marker-D15C9NHp.js → .setup/session-upstream-marker-D15C9NHp.mjs} +0 -0
- /package/dist/{upstream-prompt-provenance-LphB8slG.js → .setup/upstream-prompt-provenance-LphB8slG.mjs} +0 -0
- /package/dist/{web-search-provider.shared-BrZmlqyR.js → .setup/web-search-provider.shared-BrZmlqyR.mjs} +0 -0
package/dist/{upstream-session-fork-BZerMte_.js → .setup/upstream-session-fork-BUr4OUbC.mjs}
RENAMED
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { i as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { t as CodexAppServerScopedRequestRejectedError } from "./request-
|
|
12
|
-
import { n as resolveOpenClawExecPolicyForCodexAppServer } from "./config-
|
|
13
|
-
import { r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-
|
|
14
|
-
import { a as fingerprintCodexMirrorSourceMessage, c as readCodexMirrorSourceFingerprint } from "./transcript-mirror-attestation-
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import "./
|
|
18
|
-
import
|
|
19
|
-
import "./thread-
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
1
|
+
import { m as sessionBindingIdentity } from "./session-binding-record-BGoz8wOK.mjs";
|
|
2
|
+
import { d as readCodexPluginConfig } from "./config-parsing-CcB9iPoq.mjs";
|
|
3
|
+
import { i as isJsonObject, r as flattenCodexDynamicToolFunctions } from "./protocol-CANUwXJ3.mjs";
|
|
4
|
+
import { s as assertCodexModelBackedReviewerEffectiveConfig } from "./config-options-BvaRs51b.mjs";
|
|
5
|
+
import { o as readCodexSessionMeta } from "./session-catalog-events-Bj6j94E_.mjs";
|
|
6
|
+
import { n as withCodexAppServerThreadMutation } from "./incognito-session-uhrBF6wJ.mjs";
|
|
7
|
+
import { i as readUpstreamUserText, r as readMirrorIdentity } from "./upstream-prompt-provenance-LphB8slG.mjs";
|
|
8
|
+
import { i as projectCodexUserItemText } from "./transcript-history-projection-ZZpkFkJ_.mjs";
|
|
9
|
+
import { n as codexUpstreamBaseline, t as codexLastTerminalTurnId } from "./session-upstream-marker-D15C9NHp.mjs";
|
|
10
|
+
import { r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-B2CsSdnV.mjs";
|
|
11
|
+
import { t as CodexAppServerScopedRequestRejectedError } from "./request-D2L0zMrq.mjs";
|
|
12
|
+
import { n as resolveOpenClawExecPolicyForCodexAppServer } from "./config-BoTP_mrL.mjs";
|
|
13
|
+
import { r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-C8Rw1m1m.mjs";
|
|
14
|
+
import { a as fingerprintCodexMirrorSourceMessage, c as readCodexMirrorSourceFingerprint } from "./transcript-mirror-attestation-CzM-94NC.mjs";
|
|
15
|
+
import { I as hasCodexAppServerLiveThread, M as claimCodexAppServerLiveThread, f as readCodexAppServerClientDesktopGenerationFingerprint } from "./shared-client-DA4VR4Eb.mjs";
|
|
16
|
+
import { l as isCodexAppServerOverloadError, u as isCodexAppServerPrewriteRequestCancellationError, v as assertCodexThreadAcceptsDirectInput, y as assertCodexThreadForkResponse } from "./client-Cs08OXVQ.mjs";
|
|
17
|
+
import { B as parseCodexNativeToolCatalog, Ct as shouldBuildCodexPluginThreadConfig, E as buildCodexNativeHookRelayConfig, F as checkCodexThreadAppAvailability, H as resolveCodexNativeSkillIsolation, K as codexDynamicToolsFingerprint, O as buildCodexNativeHookRelayId, T as assertCodexNativeHookRelayAllowed, V as applyCodexNativeSkillIsolation, X as fingerprintJsonObject, Z as fingerprintUserMcpServersConfigPatch, a as buildCodexThreadConfiguration, j as resolveCodexNativeHookRelayEvents, m as buildDeveloperInstructions, mt as buildCodexPluginThreadConfig, p as resolveCodexWebSearchPlan, xt as mergeCodexThreadConfigs } from "./thread-requests-BLvGkP2R.mjs";
|
|
18
|
+
import "./session-binding-Cm0apEbd.mjs";
|
|
19
|
+
import { a as refreshCodexThreadPolicy, n as CodexThreadPolicyHandoffError } from "./thread-policy-DGuQsuFC.mjs";
|
|
20
|
+
import "./thread-ownership-DcTtAcXj.mjs";
|
|
21
|
+
import { n as resolveCodexNativeExecutionPolicy } from "./native-execution-policy-umd0tgh4.mjs";
|
|
22
|
+
import { d as isCodexDynamicToolExcluded, n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-BfE88FZ5.mjs";
|
|
23
|
+
import { u as prepareCodexWorkspaceDeveloperInstructions } from "./attempt-workspace-context-DUVEn_CS.mjs";
|
|
24
|
+
import { n as prepareCodexSessionInitialization } from "./session-initialization-rcgbZiid.mjs";
|
|
25
|
+
import { createImportedCodexSession } from "./session-history-import-D-3wAgOP.mjs";
|
|
25
26
|
import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
26
27
|
import { randomUUID } from "node:crypto";
|
|
28
|
+
import { isDeepStrictEqual } from "node:util";
|
|
27
29
|
import path from "node:path";
|
|
28
30
|
import { lstat } from "node:fs/promises";
|
|
29
|
-
import { constants, createZstdDecompress } from "node:zlib";
|
|
30
31
|
import { root } from "openclaw/plugin-sdk/file-access-runtime";
|
|
32
|
+
import { constants, createZstdDecompress } from "node:zlib";
|
|
31
33
|
import { resolveAgentWorkspaceDir } from "openclaw/plugin-sdk/agent-runtime";
|
|
32
34
|
import { loadCodexBundleMcpThreadConfig } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
33
35
|
import { loadExecApprovals } from "openclaw/plugin-sdk/exec-approvals-runtime";
|
|
34
|
-
import { isDeepStrictEqual } from "node:util";
|
|
35
36
|
import { resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
36
37
|
import { buildCodexUserMcpServersThreadConfigPatchForRuntime, resolveCodexMcpToolOverridesForAgent } from "openclaw/plugin-sdk/codex-mcp-projection";
|
|
37
38
|
import { buildNativeHookRelayCommandPlan } from "openclaw/plugin-sdk/native-hook-relay-runtime";
|
|
@@ -258,7 +259,7 @@ async function prepareCanonicalCodexFork(params) {
|
|
|
258
259
|
const nativeSkillIsolation = await resolveCodexNativeSkillIsolation({
|
|
259
260
|
client: context.client,
|
|
260
261
|
cwd,
|
|
261
|
-
codexHome: appServer.start.env?.CODEX_HOME,
|
|
262
|
+
codexHome: appServer.start.codexHome ?? appServer.start.env?.CODEX_HOME,
|
|
262
263
|
home: appServer.start.env?.HOME,
|
|
263
264
|
userProfile: appServer.start.env?.USERPROFILE
|
|
264
265
|
});
|
|
@@ -374,15 +375,15 @@ function resolveCodexUpstreamForkBoundaryFromTurns(params) {
|
|
|
374
375
|
if (item.type !== "userMessage") continue;
|
|
375
376
|
const isSteer = userMessagesInTurn > 0;
|
|
376
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;
|
|
377
382
|
const nativeText = textOnlyMessage(item.content);
|
|
378
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.");
|
|
379
|
-
const local = params.localPrefix[localIndex];
|
|
380
384
|
const upstreamText = local && readUpstreamUserText(local.message);
|
|
381
385
|
const text = upstreamText ? nativeText : projectCodexUserItemText(item);
|
|
382
386
|
if (!text) continue;
|
|
383
|
-
const identity = local && readMirrorIdentity(local.message);
|
|
384
|
-
const matchesIdentity = identity === `${turn.id}:${item.id}` || !isSteer && identity === `${turn.id}:prompt`;
|
|
385
|
-
if (!matchedPrefix && !matchesIdentity) continue;
|
|
386
387
|
matchedPrefix = true;
|
|
387
388
|
const localText = textOnlyMessage(local && "content" in local.message ? local.message.content : void 0);
|
|
388
389
|
const upstreamPromptVerified = !upstreamText || local?.message.role === "user" && readCodexMirrorSourceFingerprint(local.message) === fingerprintCodexMirrorSourceMessage(local.message);
|
|
@@ -566,6 +567,7 @@ async function forkCanonicalCodexSession(params) {
|
|
|
566
567
|
}
|
|
567
568
|
});
|
|
568
569
|
const assertCurrent = () => {
|
|
570
|
+
fork.assertCurrent();
|
|
569
571
|
initialization.assertCurrent();
|
|
570
572
|
if (ownership && !subscriptionReleased) ownership.assertCurrent();
|
|
571
573
|
};
|
|
@@ -731,7 +733,7 @@ function readConnectionFingerprint(ref) {
|
|
|
731
733
|
async function forkCodexUpstreamSession(params, options) {
|
|
732
734
|
try {
|
|
733
735
|
const sourceFingerprint = params.upstream.kind === "codex-app-server" ? readConnectionFingerprint(params.upstream.ref) : void 0;
|
|
734
|
-
const requestControl = sourceFingerprint ? options.controlFactory.forUpstream(params.source.agentId, sourceFingerprint) : void 0;
|
|
736
|
+
const requestControl = sourceFingerprint ? await options.controlFactory.forUpstream(params.source.agentId, sourceFingerprint) : void 0;
|
|
735
737
|
if (!sourceFingerprint || !requestControl) return {
|
|
736
738
|
status: "failed",
|
|
737
739
|
code: "upstream-unavailable",
|
|
@@ -796,16 +798,23 @@ async function forkCodexUpstreamSession(params, options) {
|
|
|
796
798
|
code: precheck.code,
|
|
797
799
|
message: precheck.message
|
|
798
800
|
};
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
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
|
+
}
|
|
809
818
|
const forkedThreadId = threadId;
|
|
810
819
|
try {
|
|
811
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-CMU3DUD0.mjs";
|
|
2
|
+
import { n as readCodexAppServerUsage } from "./request-D2L0zMrq.mjs";
|
|
3
|
+
import "./config-BoTP_mrL.mjs";
|
|
4
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-C8Rw1m1m.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,
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
|
+
import { a as shouldRefreshCodexRateLimitsForUsageLimitMessage, i as resolveCodexUsageLimitResetAtMs, n as formatCodexUsageLimitErrorMessage } from "./rate-limits-CMU3DUD0.mjs";
|
|
3
|
+
import { t as CODEX_CONTROL_METHODS } from "./capabilities-CDXOOFdZ.mjs";
|
|
4
|
+
import { J as rememberCodexRateLimitsRead, K as readCodexRateLimitsRevision, q as readRecentCodexRateLimits } from "./shared-client-DA4VR4Eb.mjs";
|
|
5
|
+
import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
+
import { markAuthProfileBlockedUntil } from "openclaw/plugin-sdk/agent-runtime";
|
|
7
|
+
import { embeddedAgentLog, formatErrorMessage } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
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
|
+
const CODEX_USAGE_LIMIT_RATE_LIMIT_REFRESH_TIMEOUT_MS = 5e3;
|
|
14
|
+
var CodexUsageLimitPromptError = class extends Error {
|
|
15
|
+
constructor(..._args) {
|
|
16
|
+
super(..._args);
|
|
17
|
+
this.status = 429;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
function resolveCodexPromptError(source) {
|
|
21
|
+
const usageLimitMessage = formatCodexUsageLimitErrorMessage(source);
|
|
22
|
+
if (usageLimitMessage) return new CodexUsageLimitPromptError(usageLimitMessage);
|
|
23
|
+
const info = source.codexErrorInfo;
|
|
24
|
+
let status = info === "rateLimitExceeded" ? 429 : info === "serverOverloaded" ? 503 : info === "internalServerError" ? 500 : void 0;
|
|
25
|
+
if (isJsonObject(info)) for (const variant of [
|
|
26
|
+
"httpConnectionFailed",
|
|
27
|
+
"responseStreamConnectionFailed",
|
|
28
|
+
"responseStreamDisconnected",
|
|
29
|
+
"responseTooManyFailedAttempts"
|
|
30
|
+
]) {
|
|
31
|
+
const detail = info[variant];
|
|
32
|
+
if (isJsonObject(detail) && typeof detail.httpStatusCode === "number") {
|
|
33
|
+
status = detail.httpStatusCode;
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return status === void 0 ? source.message ?? void 0 : Object.assign(new Error(source.message ?? "codex app-server error"), {
|
|
38
|
+
status,
|
|
39
|
+
...info === "serverOverloaded" ? { code: "OVERLOADED" } : {}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/** Marks a Codex auth profile blocked until the reset time advertised by rate limits. */
|
|
43
|
+
async function markCodexAuthProfileBlockedFromRateLimits(params) {
|
|
44
|
+
const authProfileId = params.authProfileId?.trim();
|
|
45
|
+
if (!authProfileId || !params.params.authProfileStore) return;
|
|
46
|
+
const blockedUntil = resolveCodexUsageLimitResetAtMs(params.rateLimits);
|
|
47
|
+
if (!blockedUntil) return;
|
|
48
|
+
try {
|
|
49
|
+
await markAuthProfileBlockedUntil({
|
|
50
|
+
store: params.params.authProfileStore,
|
|
51
|
+
profileId: authProfileId,
|
|
52
|
+
blockedUntil,
|
|
53
|
+
source: "codex_rate_limits",
|
|
54
|
+
agentDir: params.params.agentDir,
|
|
55
|
+
runId: params.params.runId,
|
|
56
|
+
modelId: params.params.modelId
|
|
57
|
+
});
|
|
58
|
+
} catch (error) {
|
|
59
|
+
embeddedAgentLog.debug("failed to mark Codex auth profile blocked from app-server limits", {
|
|
60
|
+
authProfileId,
|
|
61
|
+
error: formatErrorMessage(error)
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/** Formats a turn-start usage-limit error, refreshing rate limits when needed. */
|
|
66
|
+
async function formatCodexTurnStartUsageLimitError(params) {
|
|
67
|
+
return refreshCodexUsageLimitError({
|
|
68
|
+
client: params.client,
|
|
69
|
+
source: readCodexTurnStartUsageLimitErrorSource(params.client, params.error, params.errorNotification, params.rateLimitsRevisionBeforeTurnStart),
|
|
70
|
+
timeoutMs: params.timeoutMs,
|
|
71
|
+
signal: params.signal
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/** Refreshes a generic prompt usage-limit message into a reset-aware message. */
|
|
75
|
+
async function refreshCodexUsageLimitPromptError(params) {
|
|
76
|
+
if (!shouldRefreshCodexRateLimitsForUsageLimitMessage(params.message)) return;
|
|
77
|
+
return refreshCodexUsageLimitError({
|
|
78
|
+
client: params.client,
|
|
79
|
+
source: {
|
|
80
|
+
message: params.message,
|
|
81
|
+
codexErrorInfo: "usageLimitExceeded",
|
|
82
|
+
rateLimits: readRecentCodexRateLimits(params.client)
|
|
83
|
+
},
|
|
84
|
+
timeoutMs: params.timeoutMs,
|
|
85
|
+
signal: params.signal
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
async function refreshCodexUsageLimitError(params) {
|
|
89
|
+
const initialMessage = formatCodexUsageLimitErrorMessage(params.source);
|
|
90
|
+
if (!shouldRefreshCodexRateLimitsForUsageLimitMessage(initialMessage)) return initialMessage ? {
|
|
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
|
+
});
|
|
99
|
+
if (!rateLimits) return initialMessage ? {
|
|
100
|
+
message: initialMessage,
|
|
101
|
+
...params.source.rateLimitsTrustedForProfile ? { rateLimitsForProfile: params.source.rateLimits } : {}
|
|
102
|
+
} : void 0;
|
|
103
|
+
const message = formatCodexUsageLimitErrorMessage({
|
|
104
|
+
message: params.source.message,
|
|
105
|
+
codexErrorInfo: params.source.codexErrorInfo,
|
|
106
|
+
rateLimits,
|
|
107
|
+
rateLimitsAuthoritative: true
|
|
108
|
+
}) ?? initialMessage;
|
|
109
|
+
return message ? {
|
|
110
|
+
message,
|
|
111
|
+
rateLimitsForProfile: rateLimits
|
|
112
|
+
} : void 0;
|
|
113
|
+
}
|
|
114
|
+
async function readCodexRateLimitsFromAppServerForUsageLimitError(params) {
|
|
115
|
+
if (params.signal?.aborted) return;
|
|
116
|
+
try {
|
|
117
|
+
const rateLimits = await params.client.request(CODEX_CONTROL_METHODS.rateLimits, void 0, {
|
|
118
|
+
timeoutMs: resolveCodexUsageLimitRateLimitRefreshTimeoutMs(params.timeoutMs),
|
|
119
|
+
signal: params.signal
|
|
120
|
+
});
|
|
121
|
+
rememberCodexRateLimitsRead(params.client, rateLimits);
|
|
122
|
+
return rateLimits;
|
|
123
|
+
} catch (error) {
|
|
124
|
+
embeddedAgentLog.debug("codex app-server rate-limit refresh failed after usage-limit error", { error: formatErrorMessage(error) });
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function resolveCodexUsageLimitRateLimitRefreshTimeoutMs(timeoutMs) {
|
|
129
|
+
if (timeoutMs === void 0 || !Number.isFinite(timeoutMs) || timeoutMs <= 0) return CODEX_USAGE_LIMIT_RATE_LIMIT_REFRESH_TIMEOUT_MS;
|
|
130
|
+
return Math.max(100, Math.min(timeoutMs, CODEX_USAGE_LIMIT_RATE_LIMIT_REFRESH_TIMEOUT_MS));
|
|
131
|
+
}
|
|
132
|
+
function readCodexTurnStartUsageLimitErrorSource(client, error, errorNotification, rateLimitsRevisionBeforeTurnStart) {
|
|
133
|
+
const notificationError = readCodexErrorNotification(errorNotification);
|
|
134
|
+
const errorPayload = readCodexErrorPayload(error);
|
|
135
|
+
const rateLimits = errorPayload.rateLimits ?? readRecentCodexRateLimits(client);
|
|
136
|
+
const cacheUpdatedDuringTurnStart = rateLimitsRevisionBeforeTurnStart !== void 0 && readCodexRateLimitsRevision(client) > rateLimitsRevisionBeforeTurnStart;
|
|
137
|
+
return {
|
|
138
|
+
message: notificationError?.message ?? errorPayload.message ?? formatErrorMessage(error),
|
|
139
|
+
codexErrorInfo: notificationError?.codexErrorInfo ?? errorPayload.codexErrorInfo,
|
|
140
|
+
rateLimits,
|
|
141
|
+
rateLimitsTrustedForProfile: errorPayload.rateLimits !== void 0 || cacheUpdatedDuringTurnStart
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
function readCodexErrorNotification(notification) {
|
|
145
|
+
if (notification?.method !== "error" || !isJsonObject(notification.params)) return;
|
|
146
|
+
const error = notification.params.error;
|
|
147
|
+
return isJsonObject(error) ? {
|
|
148
|
+
message: readStringField(error, "message"),
|
|
149
|
+
codexErrorInfo: error.codexErrorInfo
|
|
150
|
+
} : void 0;
|
|
151
|
+
}
|
|
152
|
+
function readCodexErrorPayload(error) {
|
|
153
|
+
const message = error instanceof Error ? error.message : void 0;
|
|
154
|
+
if (!error || typeof error !== "object" || !("data" in error)) return { message };
|
|
155
|
+
const data = error.data;
|
|
156
|
+
if (!isJsonObject(data)) return { message };
|
|
157
|
+
const nestedError = isJsonObject(data.error) ? data.error : data;
|
|
158
|
+
const rateLimits = nestedError.rateLimits ?? data.rateLimits;
|
|
159
|
+
return {
|
|
160
|
+
message: readStringField(nestedError, "message") ?? message,
|
|
161
|
+
codexErrorInfo: nestedError.codexErrorInfo,
|
|
162
|
+
rateLimits
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
//#endregion
|
|
166
|
+
export { resolveCodexPromptError as a, refreshCodexUsageLimitPromptError as i, formatCodexTurnStartUsageLimitError as n, markCodexAuthProfileBlockedFromRateLimits as r, CodexUsageLimitPromptError as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { runBoundedCodexAppServerTurn } from "./bounded-turn-
|
|
1
|
+
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
|
+
import { f as buildCodexNativeWebSearchThreadConfig } from "./thread-requests-BLvGkP2R.mjs";
|
|
3
|
+
import { runBoundedCodexAppServerTurn } from "./bounded-turn-B2HScEgT.mjs";
|
|
4
4
|
import { normalizeOptionalString } 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
|
|
@@ -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",
|
package/dist/api.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import { n as
|
|
1
|
+
import { d as readCodexPluginConfig } from "./.setup/config-parsing-CcB9iPoq.mjs";
|
|
2
|
+
import { a as resolveCodexAppServerStartOptionsForAgent } from "./.setup/config-options-BvaRs51b.mjs";
|
|
3
|
+
import { i as resolveManagedCodexNativeCommand, r as resolveManagedCodexAppServerStartOptions, s as CODEX_APP_SERVER_VERSION, t as isManagedCodexDesktopCommand } from "./.setup/managed-binary-BnshlFag.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-BoTP_mrL.mjs";
|
|
7
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./.setup/config-runtime-C8Rw1m1m.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";
|
|
@@ -67,7 +69,7 @@ function createCodexManagedAppServerHealthCheck(params) {
|
|
|
67
69
|
const isFinalization = ctx.mode === "fix" && env.OPENCLAW_UPDATE_POST_CORE === "1";
|
|
68
70
|
const versionFailureSeverity = isFinalization ? "warning" : "error";
|
|
69
71
|
const versionFailureHint = isFinalization ? "Codex readiness will be rechecked by its plugin after restart; inspect the Codex plugin if the warning persists." : void 0;
|
|
70
|
-
|
|
72
|
+
const candidates = [];
|
|
71
73
|
for (const agentId of listAgentIds(ctx.cfg)) {
|
|
72
74
|
const model = resolveDefaultModelForAgent({
|
|
73
75
|
cfg: ctx.cfg,
|
|
@@ -79,13 +81,20 @@ function createCodexManagedAppServerHealthCheck(params) {
|
|
|
79
81
|
modelId: model.model,
|
|
80
82
|
agentId
|
|
81
83
|
}) !== "codex") continue;
|
|
82
|
-
|
|
84
|
+
candidates.push(resolveAgentStartOptions({
|
|
83
85
|
startOptions: start,
|
|
84
86
|
agentDir: resolveAgentDir(ctx.cfg, agentId, env),
|
|
85
87
|
env
|
|
86
|
-
});
|
|
88
|
+
}));
|
|
89
|
+
}
|
|
90
|
+
if (ctx.cfg.plugins?.entries?.codex?.enabled === true && readCodexPluginConfig(pluginConfig).sessionCatalog?.enabled !== false) candidates.push({
|
|
91
|
+
...start,
|
|
92
|
+
managedCommandOrder: "package-only"
|
|
93
|
+
});
|
|
94
|
+
let resolved;
|
|
95
|
+
for (const candidate of candidates) {
|
|
87
96
|
try {
|
|
88
|
-
resolved = await resolveStartOptions(
|
|
97
|
+
resolved = await resolveStartOptions(candidate, { pluginRoot: params.pluginRoot });
|
|
89
98
|
} catch (error) {
|
|
90
99
|
return [managedCodexFinding({
|
|
91
100
|
message: `Managed Codex app-server could not be resolved: ${readErrorMessage(error)}`,
|
|
@@ -109,16 +118,17 @@ function createCodexManagedAppServerHealthCheck(params) {
|
|
|
109
118
|
try {
|
|
110
119
|
output = await (params.deps?.runVersionCommand ? params.deps.runVersionCommand(nativeCommand) : runVersionCommand(nativeCommand, env));
|
|
111
120
|
} catch (error) {
|
|
121
|
+
const spawnFailure = findCodexAppServerSpawnError(describeCodexSpawnError(error, nativeCommand));
|
|
112
122
|
return [managedCodexFinding({
|
|
113
|
-
message: `Managed Codex app-server version check failed: ${readErrorMessage(error)}`,
|
|
114
|
-
severity: versionFailureSeverity,
|
|
123
|
+
message: spawnFailure?.message ?? `Managed Codex app-server version check failed: ${readErrorMessage(error)}`,
|
|
124
|
+
severity: spawnFailure && resolved.managedCommandOrder === "package-only" ? "warning" : versionFailureSeverity,
|
|
115
125
|
path: nativeCommand,
|
|
116
126
|
requirement: `Codex ${CODEX_APP_SERVER_VERSION} must report its version within ${CODEX_VERSION_TIMEOUT_MS} ms`,
|
|
117
127
|
fixHint: versionFailureHint ?? "Repair or reinstall the staged OpenClaw package, then rerun the candidate check before cutover."
|
|
118
128
|
})];
|
|
119
129
|
}
|
|
120
130
|
const detectedVersion = parseCodexVersion(`${output.stdout}\n${output.stderr}`);
|
|
121
|
-
if (detectedVersion !== "0.
|
|
131
|
+
if (detectedVersion !== "0.155.1") return [managedCodexFinding({
|
|
122
132
|
severity: versionFailureSeverity,
|
|
123
133
|
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
134
|
path: nativeCommand,
|
|
@@ -144,6 +154,7 @@ function registerCodexManagedAppServerDoctorChecks(host) {
|
|
|
144
154
|
...host,
|
|
145
155
|
pluginRoot: CODEX_PLUGIN_ROOT
|
|
146
156
|
});
|
|
157
|
+
if (!host.getHealthCheck(codexNativeProfileRecoveryHealthCheck.id)) host.registerHealthCheck(codexNativeProfileRecoveryHealthCheck);
|
|
147
158
|
}
|
|
148
159
|
//#endregion
|
|
149
160
|
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-BMgt_4q4.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("
|
|
5
|
+
const { registerCodexSessionCli } = await import("./.setup/session-cli-irrD-uo7.mjs");
|
|
6
6
|
registerCodexSessionCli(program);
|
|
7
7
|
}, { descriptors: [{
|
|
8
8
|
name: "codex",
|