@openclaw/codex 2026.10.1-beta.2 → 2026.10.5-beta.1
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/dist/.setup/{account-usage-runtime-DGqFpAud.mjs → account-usage-runtime-QBZsvZS8.mjs} +8 -7
- package/dist/.setup/{app-server-policy-Bg4FZw1f.mjs → app-server-policy-D_zv8J7V.mjs} +3 -4
- package/dist/.setup/{apply-CXTudl9p.mjs → apply-CBMV8LN0.mjs} +40 -51
- package/dist/.setup/{attempt-client-cleanup-BH0hW2xU.mjs → attempt-client-cleanup-t-kd_1ys.mjs} +6 -6
- package/dist/.setup/attempt-terminal-jO5IMj9K.mjs +2 -0
- package/dist/.setup/{attempt-workspace-context-BY0jprWJ.mjs → attempt-workspace-context-CcwP3DA3.mjs} +21 -18
- package/dist/.setup/{auth-binding-BoMwpuPN.mjs → auth-binding-BaxlhaNx.mjs} +2 -2
- package/dist/.setup/{auth-cache-key-CGm0UJOr.mjs → auth-cache-key-DyfUvsSa.mjs} +30 -41
- package/dist/.setup/{binding-connection-C-08ez1w.mjs → binding-connection-B7HAAZSI.mjs} +2 -2
- package/dist/.setup/{binding-connection.runtime-Dn2p-fdy.mjs → binding-connection.runtime-DAXn7iFl.mjs} +6 -5
- package/dist/.setup/{bounded-turn-pGsfXcmH.mjs → bounded-turn-CyQVQwGe.mjs} +21 -17
- package/dist/.setup/{bounded-turn-isolation-DklXNk3k.mjs → bounded-turn-isolation-BfDAo-qZ.mjs} +4 -4
- package/dist/.setup/{build-state-CqQnsg7T.mjs → build-state-CzLMy1S9.mjs} +1 -1
- package/dist/.setup/{capabilities-kQntafj_.mjs → capabilities-DbOzOglY.mjs} +1 -1
- package/dist/.setup/{client-catalog-response-Bqp7WG51.mjs → client-catalog-response-DsbEAtpd.mjs} +25 -32
- package/dist/.setup/{client-C8lgBOoO.mjs → client-y7nO6X9c.mjs} +198 -247
- package/dist/.setup/{command-dispatch-DhBbFIQ5.mjs → command-dispatch-uA9lz2Kf.mjs} +3 -4
- package/dist/.setup/{command-formatters-DV3DHhdr.mjs → command-formatters-xW9KpoSZ.mjs} +16 -26
- package/dist/.setup/{command-handlers-ztOOzm6O.mjs → command-handlers-VBaJnpZo.mjs} +270 -360
- package/dist/.setup/{command-rpc-CuC5fPom.mjs → command-rpc-C9VxOLuG.mjs} +19 -18
- package/dist/.setup/{compact-tUb9AYfH.mjs → compact-CD8xJxXS.mjs} +41 -61
- package/dist/.setup/{computer-use-BBN9y326.mjs → computer-use-CiToXF5C.mjs} +109 -147
- package/dist/.setup/{config-0Gxk3_eq.mjs → config-C1YVVLEA.mjs} +32 -59
- package/dist/.setup/config-contracts.shared-D85SGEuq.mjs +4 -0
- package/dist/.setup/{config-options-HG_Rr3W_.mjs → config-options-DDzeNQ8m.mjs} +52 -90
- package/dist/.setup/{config-parsing-BQq-CHTF.mjs → config-parsing-DsWSCPHO.mjs} +19 -55
- package/dist/.setup/{config-runtime-cUYrqu_a.mjs → config-runtime-DWzK-k0n.mjs} +2 -2
- package/dist/.setup/{config-security-KAPScztc.mjs → config-security-clxAZYWX.mjs} +35 -39
- package/dist/.setup/config-utils-DN_YT7dE.mjs +47 -0
- package/dist/.setup/{context-engine-projection-CsgYSQhW.mjs → context-engine-projection-ps-yn_ci.mjs} +10 -22
- package/dist/.setup/{conversation-binding-B3MNMVzb.mjs → conversation-binding-CTSLDM9S.mjs} +85 -119
- package/dist/.setup/{conversation-binding-data-DJ4ix-W5.mjs → conversation-binding-data-UgLuTSQT.mjs} +9 -8
- package/dist/.setup/{conversation-control-CYsMlCuE.mjs → conversation-control-GXM3unE4.mjs} +7 -10
- package/dist/.setup/{cyber-failover-Bb1J6hS1.mjs → cyber-failover-D4dgNfFf.mjs} +2 -5
- package/dist/.setup/{cyber-failover-notice-XR03ef31.mjs → cyber-failover-notice-ljgGGL0s.mjs} +1 -1
- package/dist/.setup/{doctor-start-options-DPW9JxIE.mjs → doctor-start-options-JjTAl-q_.mjs} +5 -5
- package/dist/.setup/{dynamic-tool-build-C8xGEXmR.mjs → dynamic-tool-build-D731PCdv.mjs} +57 -69
- package/dist/.setup/{dynamic-tools-DyERJnR6.mjs → dynamic-tools-D0pYbxHH.mjs} +689 -710
- package/dist/.setup/{effective-mcp-catalog-C26Mio5l.mjs → effective-mcp-catalog-1hWFKghy.mjs} +11 -20
- package/dist/.setup/{elicitation-input-r9axtppm.mjs → elicitation-input-DXG_qaXr.mjs} +14 -20
- package/dist/.setup/{ephemeral-turn-D8VcDTNo.mjs → ephemeral-turn-Cphy5Qr_.mjs} +3 -3
- package/dist/.setup/{event-projector-assistant-message-BN7CNUB5.mjs → event-projector-assistant-message-CLMKN4x-.mjs} +2 -2
- package/dist/.setup/{event-projector-usage-03R0I2dM.mjs → event-projector-usage-BpKfdoTm.mjs} +20 -33
- package/dist/.setup/{event-projector-values-DTqZHizf.mjs → event-projector-values-CLvG1Hil.mjs} +4 -5
- package/dist/.setup/history-rejection-B4nOXNXF.mjs +13 -0
- package/dist/.setup/{inference-context-D-9gWlTR.mjs → inference-context-DNlGwzwy.mjs} +10 -11
- package/dist/.setup/{inference-dispatch-B5UKEUyC.mjs → inference-dispatch-CO6tTs4q.mjs} +5 -4
- package/dist/.setup/{inference-metadata-CgIf7sOx.mjs → inference-metadata-DCvcG_N_.mjs} +36 -41
- package/dist/.setup/{inference-proxy-DUO5E2QQ.mjs → inference-proxy-BDWV0djM.mjs} +10 -14
- package/dist/.setup/{isolated-completion-C0jrcplS.mjs → isolated-completion-Bhqd2yBq.mjs} +8 -8
- package/dist/.setup/local-runtime-attribution-CZz2DJ4q.mjs +15 -0
- package/dist/.setup/{managed-binary-C1VFoVPf.mjs → managed-binary-BtIjV7yN.mjs} +16 -36
- package/dist/.setup/{mcp-app-session-preparation-BxN0_CYe.mjs → mcp-app-session-preparation-DqSvxFqc.mjs} +24 -25
- package/dist/.setup/{mcp-tool-metadata-j10HhfTC.mjs → mcp-tool-metadata-DW41snf3.mjs} +1 -1
- package/dist/.setup/{model-catalog-DZyNeDKG.mjs → model-catalog-B227ST3D.mjs} +6 -6
- package/dist/.setup/{models-DSseKSMg.mjs → models-DdRyi93L.mjs} +6 -10
- package/dist/.setup/{native-auth-Cjb9y7IZ.mjs → native-auth-esN5MdIv.mjs} +5 -5
- package/dist/.setup/{native-execution-policy-ClzpdG3D.mjs → native-execution-policy-MXEe7PB3.mjs} +11 -28
- package/dist/.setup/native-hook-relay-BUWIOrSr.mjs +561 -0
- package/dist/.setup/{native-mcp-app-CqcPVmhH.mjs → native-mcp-app-CjxJQ4F7.mjs} +6 -6
- package/dist/.setup/native-skill-isolation-UMVoNjZz.mjs +391 -0
- package/dist/.setup/{native-subagent-monitor-BUYOUp9X.mjs → native-subagent-monitor-iHc8oLg5.mjs} +505 -639
- package/dist/.setup/{native-subagent-pending-assignments-BDqhOdJp.mjs → native-subagent-pending-assignments-DmVhedNs.mjs} +11 -23
- package/dist/.setup/{native-task-assignments-C6KVqiN1.mjs → native-task-assignments-DimsQ9Qa.mjs} +73 -27
- package/dist/.setup/{node-cli-sessions-B5oNDkUS.mjs → node-cli-sessions-CzKg2nGq.mjs} +18 -26
- package/dist/.setup/{node-exec-server.runtime-0xSEjKYt.mjs → node-exec-server.runtime-BWkULhBM.mjs} +5 -8
- package/dist/.setup/{plan-BJ37d2Og.mjs → plan-C_F3aio0.mjs} +40 -50
- package/dist/.setup/{plugin-activation-BcyBv8PG.mjs → plugin-activation-D7WkJMvU.mjs} +4 -5
- package/dist/.setup/{plugin-app-cache-key-BW8rd98k.mjs → plugin-app-cache-key-Bg9DbDI6.mjs} +18 -23
- package/dist/.setup/{plugin-approval-roundtrip-CuahdPLC.mjs → plugin-approval-roundtrip-BSV-51ig.mjs} +4 -6
- package/dist/.setup/{plugin-inventory-Bf0_piTw.mjs → plugin-inventory-CYgdo14P.mjs} +28 -43
- package/dist/.setup/{plugin-marketplace-discovery-SQPhSuic.mjs → plugin-marketplace-discovery-BblHM3DU.mjs} +7 -10
- package/dist/.setup/{plugin-metadata-cache-DWnB7VMj.mjs → plugin-metadata-cache-Bi8TAPwX.mjs} +5 -10
- package/dist/.setup/project-doc-thread-config-BVcvnps8.mjs +490 -0
- package/dist/.setup/{provider-BnwHVD_z.mjs → provider-BJ4xhaGX.mjs} +4 -4
- package/dist/.setup/{provider-capabilities-D68Whix6.mjs → provider-capabilities-CjRaV3bx.mjs} +1 -1
- package/dist/.setup/{rate-limits-CMPy24F5.mjs → rate-limits-CI8pTPqL.mjs} +15 -32
- package/dist/.setup/reasoning-effort-CS9kKWB9.mjs +37 -0
- package/dist/.setup/{request-jSbhc1sg.mjs → request-Y8dmbqZ3.mjs} +28 -48
- package/dist/.setup/{rpc-error-hmWM21RB.mjs → rpc-error-C98SHchT.mjs} +3 -6
- package/dist/.setup/{run-attempt-BLDZeYLD.mjs → run-attempt-Dx7a4Mfm.mjs} +927 -849
- package/dist/.setup/{run-attempt-lifecycle-BuZgVbDA.mjs → run-attempt-lifecycle-KN4oh-7O.mjs} +13 -4
- package/dist/.setup/{runtime-artifact-CUTOOnKw.mjs → runtime-artifact-C13pR7tD.mjs} +18 -22
- package/dist/.setup/{runtime-artifact-connection-CADz3_BY.mjs → runtime-artifact-connection-jS5DeCok.mjs} +3 -3
- package/dist/.setup/{sandbox-guard-WqE8yPge.mjs → sandbox-guard-DIImwCy1.mjs} +4 -6
- package/dist/.setup/service-tier-normalization-BPgw2Wdt.mjs +9 -0
- package/dist/.setup/{session-binding-Ce7BqiPN.mjs → session-binding-JEHNMPsr.mjs} +13 -40
- package/dist/.setup/{session-binding-record-BZB8RgcF.mjs → session-binding-record-DU_0biMD.mjs} +4 -4
- package/dist/.setup/{session-binding-record-codec-z4ZpDn6E.mjs → session-binding-record-codec-BpH8u_G9.mjs} +16 -39
- package/dist/.setup/{session-binding-sidecars-BrdV95Fg.mjs → session-binding-sidecars-DD-enC8w.mjs} +49 -54
- package/dist/.setup/{session-catalog-adoption-CPIP4S_y.mjs → session-catalog-adoption-Ca3OYGYM.mjs} +23 -27
- package/dist/.setup/{session-catalog-archive-DcgwvSbF.mjs → session-catalog-archive-Bv6gV7x9.mjs} +6 -6
- package/dist/.setup/{session-catalog-events-Bdjw9HEn.mjs → session-catalog-events-DzFlXNUe.mjs} +6 -5
- package/dist/.setup/{session-catalog-index-DufISKJ6.mjs → session-catalog-index-DozvkUPd.mjs} +111 -105
- package/dist/.setup/{session-catalog-index-order-nhyO0wdW.mjs → session-catalog-index-order-CTfoefow.mjs} +28 -5
- package/dist/.setup/{session-catalog-limits-DEU36Qlo.mjs → session-catalog-limits-BynIoOYm.mjs} +1 -1
- package/dist/.setup/{session-catalog-list-request-tXephOB4.mjs → session-catalog-list-request-D4MYNgDB.mjs} +11 -8
- package/dist/.setup/{session-catalog-native-projection-D6IiLtMb.mjs → session-catalog-native-projection-rCKnZud1.mjs} +5 -61
- package/dist/.setup/{session-catalog-node-adoption-7-WEQTB1.mjs → session-catalog-node-adoption-BdP9Zjqo.mjs} +2 -2
- package/dist/.setup/{session-catalog-node-continue-DLWBwAAO.mjs → session-catalog-node-continue-CNJibO4_.mjs} +27 -49
- package/dist/.setup/{session-catalog-node-lookup-Uufckwcm.mjs → session-catalog-node-lookup-BH_DBGa9.mjs} +3 -3
- package/dist/.setup/{session-catalog-parsing-B-qWJh2x.mjs → session-catalog-parsing-DkeoVn60.mjs} +9 -19
- package/dist/.setup/{session-catalog-projection-8aHNwzWD.mjs → session-catalog-projection-DDVmALHj.mjs} +8 -22
- package/dist/.setup/session-catalog-source-CygTGmrb.mjs +58 -0
- package/dist/.setup/{session-cli-kH4vuGod.mjs → session-cli-GwU0izn-.mjs} +20 -41
- package/dist/.setup/{session-history-BogBHKLk.mjs → session-history-BO6i_pfk.mjs} +1 -1
- package/dist/.setup/{session-history-import-NWKPa4ZO.mjs → session-history-import-CaO8s6ta.mjs} +4 -4
- package/dist/.setup/{session-history-read-CNN8zwbD.mjs → session-history-read-BI_2jRED.mjs} +4 -15
- package/dist/.setup/{session-history.worker-Cq_4DYgN.mjs → session-history.worker-DJQfek5p.mjs} +147 -159
- package/dist/.setup/{session-initialization-D6dtFQkE.mjs → session-initialization-Bi_2DKhc.mjs} +3 -5
- package/dist/.setup/{session-permission-policy-BxIUJ0Zd.mjs → session-permission-policy-CD2MAWU8.mjs} +12 -20
- package/dist/.setup/{session-retirement-Czbchv_O.mjs → session-retirement-IoS3zr17.mjs} +7 -7
- package/dist/.setup/{settled-turn-context-BZsMjkIO.mjs → settled-turn-context-BPL6D3RO.mjs} +1 -1
- package/dist/.setup/{settled-turn-finalizer-DjZsIwbZ.mjs → settled-turn-finalizer-X-Fylp-u.mjs} +12 -11
- package/dist/.setup/{shared-client-qhyYWbew.mjs → shared-client-ByIwuAC-.mjs} +172 -229
- package/dist/.setup/{side-question-D3NJlgbl.mjs → side-question-BDUdozFy.mjs} +116 -137
- package/dist/.setup/{source-BYu0T780.mjs → source-Bxbqf3S1.mjs} +37 -56
- package/dist/.setup/thread-archive-guard-LKdwQKyr.mjs +56 -0
- package/dist/.setup/{thread-lifecycle-Cbz_7ySv.mjs → thread-lifecycle-run-CfP4PnEf.mjs} +348 -484
- package/dist/.setup/thread-model-selection-DcVebr8N.mjs +61 -0
- package/dist/.setup/{thread-ownership-DwuSrt3s.mjs → thread-ownership-Be53aiaG.mjs} +5 -5
- package/dist/.setup/{thread-ownership-queue-Dp24d7-F.mjs → thread-ownership-queue-CeyYScUC.mjs} +5 -6
- package/dist/.setup/{thread-policy-DoNxbhqt.mjs → thread-policy-CHgY-KNl.mjs} +4 -4
- package/dist/.setup/thread-requests-BgzJwJtS.mjs +745 -0
- package/dist/.setup/{thread-resume-BT6NHMkM.mjs → thread-resume-B2EmMcgE.mjs} +5 -5
- package/dist/.setup/{timeout-CXOfNoaX.mjs → timeout-D0mEWSGG.mjs} +6 -12
- package/dist/.setup/{transcript-history-projection-B9a7HwUV.mjs → transcript-history-projection-DfKcoZCB.mjs} +3 -4
- package/dist/.setup/{transcript-mirror-BfLRARNL.mjs → transcript-mirror-Bee2o6jj.mjs} +68 -68
- package/dist/.setup/{transcript-mirror-attestation-YSegaktH.mjs → transcript-mirror-attestation-BzUXnrvv.mjs} +5 -2
- package/dist/.setup/{transport-stdio-a0HDa2Mj.mjs → transport-stdio-CRWTkKOn.mjs} +67 -77
- package/dist/.setup/{transport-websocket-zqJ0Cmtn.mjs → transport-websocket-DIyPfkHo.mjs} +8 -16
- package/dist/.setup/{turn-router-sS69wYnI.mjs → turn-router-DKDAziUW.mjs} +30 -31
- package/dist/.setup/upstream-prompt-provenance-Ccd9MFRJ.mjs +44 -0
- package/dist/.setup/{upstream-session-fork-ChSld66u.mjs → upstream-session-fork-Djp_yssT.mjs} +50 -43
- package/dist/.setup/{usage-D8e8Xiqf.mjs → usage-DQA-peQC.mjs} +4 -4
- package/dist/.setup/{usage-limit-error-GbT-5NcW.mjs → usage-limit-error-2t3KBqiX.mjs} +12 -21
- package/dist/.setup/web-search-item-CvokaZOo.mjs +20 -0
- package/dist/.setup/{web-search-provider.runtime-dL2GD1Kl.mjs → web-search-provider.runtime-BsuCMNix.mjs} +3 -3
- package/dist/.setup/{workspace-write-sandbox-probe-DmUHLrrl.mjs → workspace-write-sandbox-probe-BDWO2Qkh.mjs} +4 -4
- package/dist/api.js +15 -15
- package/dist/catalog-page.worker.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +5 -6
- package/dist/harness.js +32 -61
- package/dist/index.js +302 -416
- package/dist/media-understanding-provider.js +32 -43
- package/dist/migration-provider-api.js +1 -1
- package/dist/native-session-binding-api.js +1 -1
- package/dist/native-tool-policy.js +23 -1
- package/dist/provider-discovery.js +1 -1
- package/dist/session-history-worker-runtime.js +52 -31
- package/dist/session-history.worker.js +1 -1
- package/openclaw.plugin.json +20 -3
- package/package.json +7 -7
- package/dist/.setup/attempt-terminal-gZrxQ35N.mjs +0 -5
- package/dist/.setup/plugin-thread-config-deadline-B8LGaZNW.mjs +0 -124
- package/dist/.setup/service-tier-normalization-Cei89SW6.mjs +0 -15
- package/dist/.setup/shell-dynamic-tools-D3Brj3g9.mjs +0 -85
- package/dist/.setup/thread-archive-guard-C9frICzX.mjs +0 -60
- package/dist/.setup/thread-requests-CL1e8Wmx.mjs +0 -2111
- package/dist/.setup/upstream-prompt-provenance-fXkKbPVC.mjs +0 -37
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
|
-
import { o as isCodexAppServerOverloadError, r as CodexAppServerRpcError } from "./rpc-error-
|
|
3
|
-
import { n as describeControlFailure, t as CODEX_CONTROL_METHODS } from "./capabilities-
|
|
4
|
-
import { a as withCodexAppServerJsonClient, r as requestCodexAppServerJson } from "./request-
|
|
5
|
-
import "./config-
|
|
6
|
-
import { n as resolveCodexAppServerRuntimeOptions, r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-
|
|
2
|
+
import { o as isCodexAppServerOverloadError, r as CodexAppServerRpcError } from "./rpc-error-C98SHchT.mjs";
|
|
3
|
+
import { n as describeControlFailure, t as CODEX_CONTROL_METHODS } from "./capabilities-DbOzOglY.mjs";
|
|
4
|
+
import { a as withCodexAppServerJsonClient, r as requestCodexAppServerJson } from "./request-Y8dmbqZ3.mjs";
|
|
5
|
+
import "./config-C1YVVLEA.mjs";
|
|
6
|
+
import { n as resolveCodexAppServerRuntimeOptions, r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-DWzK-k0n.mjs";
|
|
7
7
|
import { a as resolveCodexAppServerAuthProfileStore, r as resolveCodexAppServerAuthProfileId } from "./auth-profile-CgHQ8Vot.mjs";
|
|
8
|
-
import { tt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-
|
|
9
|
-
import { a as isCodexAppServerIndeterminateRequestCancellationError, o as isCodexAppServerIndeterminateTransportError } from "./client-
|
|
10
|
-
import { o as closeCodexStartupClientBestEffort } from "./attempt-client-cleanup-
|
|
11
|
-
import { r as prepareCodexAppServerAuthBinding } from "./auth-binding-
|
|
12
|
-
import { r as listCodexAppServerModels } from "./models-
|
|
13
|
-
import {
|
|
14
|
-
import { t as resumeCodexAppServerThread } from "./thread-resume-
|
|
15
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
8
|
+
import { tt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-ByIwuAC-.mjs";
|
|
9
|
+
import { a as isCodexAppServerIndeterminateRequestCancellationError, o as isCodexAppServerIndeterminateTransportError } from "./client-y7nO6X9c.mjs";
|
|
10
|
+
import { o as closeCodexStartupClientBestEffort } from "./attempt-client-cleanup-t-kd_1ys.mjs";
|
|
11
|
+
import { r as prepareCodexAppServerAuthBinding } from "./auth-binding-BaxlhaNx.mjs";
|
|
12
|
+
import { r as listCodexAppServerModels } from "./models-DdRyi93L.mjs";
|
|
13
|
+
import { n as createCodexSessionGenerationSupersededError } from "./session-binding-JEHNMPsr.mjs";
|
|
14
|
+
import { t as resumeCodexAppServerThread } from "./thread-resume-B2EmMcgE.mjs";
|
|
15
|
+
import { t as __exportAll } from "./session-binding-sidecars-DD-enC8w.mjs";
|
|
16
16
|
import { resolveAgentDir, resolveSessionAgentIdsStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
17
|
-
import { prepareAgentRuntimeAuth } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
18
17
|
import { resolveAgentWorkspaceDir } from "openclaw/plugin-sdk/agent-runtime";
|
|
18
|
+
import { prepareAgentRuntimeAuth } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
19
19
|
import { getSessionEntry, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
20
20
|
import { resolveSessionModelRef } from "openclaw/plugin-sdk/model-session-runtime";
|
|
21
21
|
import { resolveApiKeyForProvider } from "openclaw/plugin-sdk/provider-auth-runtime";
|
|
@@ -214,12 +214,13 @@ async function readCodexStatusProbes(pluginConfig, config, agentDir) {
|
|
|
214
214
|
config,
|
|
215
215
|
agentDir
|
|
216
216
|
};
|
|
217
|
+
const probe = (method, params) => safeCodexControlRequest(pluginConfig, method, params, options);
|
|
217
218
|
const [models, account, limits, mcps, skills] = await Promise.all([
|
|
218
219
|
safeValue(() => listCodexAppServerModels(requestOptions(pluginConfig, 20, config, agentDir))),
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
220
|
+
probe(CODEX_CONTROL_METHODS.account, { refreshToken: false }),
|
|
221
|
+
probe(CODEX_CONTROL_METHODS.rateLimits, void 0),
|
|
222
|
+
probe(CODEX_CONTROL_METHODS.listMcpServers, { limit: 100 }),
|
|
223
|
+
probe(CODEX_CONTROL_METHODS.listSkills, {})
|
|
223
224
|
]);
|
|
224
225
|
return {
|
|
225
226
|
models,
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { n as readCodexRuntimeModelId } from "./model-runtime-BdqzOMkU.mjs";
|
|
2
2
|
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
3
|
-
import { m as sessionBindingIdentity } from "./session-binding-record-
|
|
4
|
-
import { E as waitForCodexAppServerClientExit, S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-
|
|
3
|
+
import { m as sessionBindingIdentity } from "./session-binding-record-DU_0biMD.mjs";
|
|
4
|
+
import { E as waitForCodexAppServerClientExit, S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-DyfUvsSa.mjs";
|
|
5
5
|
import { t as CODEX_APP_SERVER_BINDING_GUARDED_REQUEST_TIMEOUT_MS } from "./session-binding-meta-Lkm5Lpf4.mjs";
|
|
6
|
-
import { i as CodexAppServerScopedRequestRejectedError, r as CodexAppServerRpcError } from "./rpc-error-
|
|
7
|
-
import { i as resolveCodexBindingAppServerConnection } from "./binding-connection-
|
|
8
|
-
import { F as consumeCodexAppServerLiveThread, K as retainCodexAppServerLiveThread, M as getCodexInferenceThreadQualification, U as protectCodexAppServerLiveThread, _ as retainSharedCodexAppServerClientIfCurrent, q as revertCodexAppServerLiveThreadInstructions, s as createIsolatedCodexAppServerClient } from "./shared-client-
|
|
6
|
+
import { i as CodexAppServerScopedRequestRejectedError, r as CodexAppServerRpcError } from "./rpc-error-C98SHchT.mjs";
|
|
7
|
+
import { i as resolveCodexBindingAppServerConnection } from "./binding-connection-B7HAAZSI.mjs";
|
|
8
|
+
import { F as consumeCodexAppServerLiveThread, K as retainCodexAppServerLiveThread, M as getCodexInferenceThreadQualification, U as protectCodexAppServerLiveThread, _ as retainSharedCodexAppServerClientIfCurrent, q as revertCodexAppServerLiveThreadInstructions, s as createIsolatedCodexAppServerClient } from "./shared-client-ByIwuAC-.mjs";
|
|
9
9
|
import "./responses-oauth-twnuTaAa.mjs";
|
|
10
|
-
import { a as isCodexAppServerIndeterminateRequestCancellationError, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-
|
|
11
|
-
import {
|
|
12
|
-
import { c as isCodexNoActiveTurnInterruptError, f as unsubscribeCodexThreadBestEffort, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-
|
|
13
|
-
import { n as readCodexThreadContextSnapshot, s as readCodexNotificationItem } from "./event-projector-usage-
|
|
14
|
-
import {
|
|
15
|
-
import { t as
|
|
16
|
-
import { i as assertCodexSupervisionThreadLineage } from "./thread-policy-DoNxbhqt.mjs";
|
|
17
|
-
import { t as resumeCodexAppServerThread } from "./thread-resume-BT6NHMkM.mjs";
|
|
18
|
-
import { s as withCodexAppServerThreadMutationHold, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-DwuSrt3s.mjs";
|
|
19
|
-
import { t as resolveCodexNativeExecutionBlock } from "./sandbox-guard-WqE8yPge.mjs";
|
|
10
|
+
import { a as isCodexAppServerIndeterminateRequestCancellationError, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-y7nO6X9c.mjs";
|
|
11
|
+
import { c as readCodexNotificationTurnId, s as readCodexNotificationThreadId } from "./turn-router-DKDAziUW.mjs";
|
|
12
|
+
import { c as isCodexNoActiveTurnInterruptError, f as unsubscribeCodexThreadBestEffort, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-t-kd_1ys.mjs";
|
|
13
|
+
import { n as readCodexThreadContextSnapshot, s as readCodexNotificationItem } from "./event-projector-usage-BpKfdoTm.mjs";
|
|
14
|
+
import { i as resolveCodexSessionBinding } from "./session-binding-JEHNMPsr.mjs";
|
|
15
|
+
import { s as withCodexAppServerThreadMutationHold, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-Be53aiaG.mjs";
|
|
20
16
|
import { t as persistCodexContextCompactionActivity } from "./context-compaction-activity-CMla5FPJ.mjs";
|
|
17
|
+
import { t as codexNativeSubagentMonitorRuntime } from "./native-subagent-monitor-iHc8oLg5.mjs";
|
|
18
|
+
import { t as resolveCodexNativeExecutionBlock } from "./sandbox-guard-DIImwCy1.mjs";
|
|
19
|
+
import { i as assertCodexSupervisionThreadLineage } from "./thread-policy-CHgY-KNl.mjs";
|
|
20
|
+
import { t as resumeCodexAppServerThread } from "./thread-resume-B2EmMcgE.mjs";
|
|
21
21
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
22
22
|
import { coerceErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
23
23
|
import { isIncognitoSessionKey } from "openclaw/plugin-sdk/session-key-runtime";
|
|
24
24
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
25
25
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
26
|
+
import { resolveAgentDir } from "openclaw/plugin-sdk/agent-runtime";
|
|
26
27
|
import { AgentHarnessSessionSupersededError, embeddedAgentLog, resolveCompactionTimeoutMs } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
27
|
-
import { resolveAgentDir as resolveAgentDir$1 } from "openclaw/plugin-sdk/agent-runtime";
|
|
28
28
|
import { runWithAsyncWorkResources } from "openclaw/plugin-sdk/agent-harness-tool-runtime";
|
|
29
29
|
import { createNativeSessionBindingAuthority } from "openclaw/plugin-sdk/agent-harness-session-runtime";
|
|
30
30
|
import { createDedupeCache } from "openclaw/plugin-sdk/dedupe-runtime";
|
|
@@ -86,19 +86,8 @@ const warnedIgnoredCompactionOverrides = createDedupeCache({
|
|
|
86
86
|
maxSize: 4096
|
|
87
87
|
});
|
|
88
88
|
function warnIfIgnoringOpenClawCompactionOverrides(params) {
|
|
89
|
-
const ignoredConfig = readIgnoredCompactionOverridePaths(params);
|
|
90
|
-
if (ignoredConfig.length === 0) return;
|
|
91
|
-
const warningKey = ignoredConfig.join("\0");
|
|
92
|
-
if (warnedIgnoredCompactionOverrides.check(warningKey)) return;
|
|
93
|
-
embeddedAgentLog.warn("ignoring OpenClaw compaction overrides for Codex app-server compaction; Codex uses native server-side compaction", {
|
|
94
|
-
sessionId: params.sessionId,
|
|
95
|
-
sessionKey: params.sessionKey,
|
|
96
|
-
ignoredConfig
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
function readIgnoredCompactionOverridePaths(params) {
|
|
100
89
|
const compaction = asOptionalRecord(params.config?.agents?.defaults?.compaction);
|
|
101
|
-
|
|
90
|
+
const ignoredConfig = [
|
|
102
91
|
"model",
|
|
103
92
|
"thinkingLevel",
|
|
104
93
|
"provider"
|
|
@@ -106,15 +95,13 @@ function readIgnoredCompactionOverridePaths(params) {
|
|
|
106
95
|
const value = compaction?.[field];
|
|
107
96
|
return typeof value === "string" && value.trim() ? [`agents.defaults.compaction.${field}`] : [];
|
|
108
97
|
});
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
sessionKey: params.sandboxSessionKey ?? params.sessionKey,
|
|
98
|
+
if (ignoredConfig.length === 0) return;
|
|
99
|
+
const warningKey = ignoredConfig.join("\0");
|
|
100
|
+
if (warnedIgnoredCompactionOverrides.check(warningKey)) return;
|
|
101
|
+
embeddedAgentLog.warn("ignoring OpenClaw compaction overrides for Codex app-server compaction; Codex uses native server-side compaction", {
|
|
114
102
|
sessionId: params.sessionId,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
surface: "native compaction"
|
|
103
|
+
sessionKey: params.sessionKey,
|
|
104
|
+
ignoredConfig
|
|
118
105
|
});
|
|
119
106
|
}
|
|
120
107
|
//#endregion
|
|
@@ -245,20 +232,11 @@ function watchCodexNativeCompactionCompletion(params) {
|
|
|
245
232
|
if (notification.method !== "turn/completed" || !compactionTurnId || notificationTurnId !== compactionTurnId) return;
|
|
246
233
|
const turn = isJsonObject(notification.params.turn) ? notification.params.turn : void 0;
|
|
247
234
|
const status = typeof turn?.status === "string" ? turn.status : void 0;
|
|
248
|
-
if (admissionFailure)
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
fail(`codex app-server compaction turn ended with status ${status ?? "unknown"}`);
|
|
254
|
-
return;
|
|
255
|
-
}
|
|
256
|
-
const incompleteReason = !compactionItemId ? "codex app-server compaction turn completed without a compaction item" : !compactionItemCompleted ? "codex app-server compaction turn completed before its compaction item" : void 0;
|
|
257
|
-
if (incompleteReason) {
|
|
258
|
-
fail(incompleteReason);
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
complete();
|
|
235
|
+
if (admissionFailure) fail(admissionFailure);
|
|
236
|
+
else if (status !== "completed") fail(`codex app-server compaction turn ended with status ${status ?? "unknown"}`);
|
|
237
|
+
else if (!compactionItemId) fail("codex app-server compaction turn completed without a compaction item");
|
|
238
|
+
else if (!compactionItemCompleted) fail("codex app-server compaction turn completed before its compaction item");
|
|
239
|
+
else complete();
|
|
262
240
|
});
|
|
263
241
|
removeCloseHandler = params.client.addCloseHandler(() => {
|
|
264
242
|
retireUnconfirmed("codex app-server closed before native compaction completed");
|
|
@@ -365,7 +343,14 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
365
343
|
}
|
|
366
344
|
});
|
|
367
345
|
}
|
|
368
|
-
const nativeExecutionBlock =
|
|
346
|
+
const nativeExecutionBlock = resolveCodexNativeExecutionBlock({
|
|
347
|
+
config: params.config,
|
|
348
|
+
sessionKey: params.sandboxSessionKey ?? params.sessionKey,
|
|
349
|
+
sessionId: params.sessionId,
|
|
350
|
+
agentId: params.sandboxAgentId ?? params.agentId,
|
|
351
|
+
sandbox: params.sandbox,
|
|
352
|
+
surface: "native compaction"
|
|
353
|
+
});
|
|
369
354
|
if (nativeExecutionBlock) return {
|
|
370
355
|
ok: false,
|
|
371
356
|
compacted: false,
|
|
@@ -377,7 +362,7 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
377
362
|
agentId: params.agentId,
|
|
378
363
|
config: params.config
|
|
379
364
|
});
|
|
380
|
-
const abortedResult = (attempt, expectedThreadId, currentThreadId
|
|
365
|
+
const abortedResult = (attempt, expectedThreadId, currentThreadId) => options.allowNonManualNativeRequest ? skippedCodexNativeCompactionResult(attempt, {
|
|
381
366
|
reason: "codex app-server compaction aborted before native compaction",
|
|
382
367
|
code: "aborted_before_native_compaction",
|
|
383
368
|
request: options.nativeCompactionRequest ?? "after_context_engine",
|
|
@@ -401,7 +386,8 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
401
386
|
});
|
|
402
387
|
} catch (error) {
|
|
403
388
|
if (!params.abortSignal?.aborted) throw error;
|
|
404
|
-
|
|
389
|
+
const threadId = options.bindingStore.read(bindingIdentity)?.threadId;
|
|
390
|
+
return abortedResult(params, threadId, threadId);
|
|
405
391
|
}
|
|
406
392
|
const { binding: initialBinding, authority } = resolvedBinding;
|
|
407
393
|
const assertCurrent = authority.assertCurrent;
|
|
@@ -437,7 +423,7 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
437
423
|
pluginConfig: options.pluginConfig,
|
|
438
424
|
config,
|
|
439
425
|
assertCurrent,
|
|
440
|
-
agentDir: resolveAgentDir
|
|
426
|
+
agentDir: resolveAgentDir(config, bindingIdentity.agentId)
|
|
441
427
|
});
|
|
442
428
|
} catch (error) {
|
|
443
429
|
return {
|
|
@@ -618,13 +604,7 @@ async function maybeCompactCodexAppServerSession(params, options) {
|
|
|
618
604
|
if (!options.allowNonManualNativeRequest) attempt.abortSignal.throwIfAborted();
|
|
619
605
|
return {
|
|
620
606
|
started: false,
|
|
621
|
-
result:
|
|
622
|
-
reason: "codex app-server compaction aborted before native compaction",
|
|
623
|
-
code: "aborted_before_native_compaction",
|
|
624
|
-
request: options.nativeCompactionRequest ?? "after_context_engine",
|
|
625
|
-
expectedThreadId: binding.threadId,
|
|
626
|
-
currentThreadId: currentBinding?.threadId
|
|
627
|
-
})
|
|
607
|
+
result: abortedResult(attempt, binding.threadId, currentBinding?.threadId)
|
|
628
608
|
};
|
|
629
609
|
}
|
|
630
610
|
assertCurrent();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
|
|
2
|
-
import { o as resolveCodexComputerUseConfig } from "./config-options-
|
|
3
|
-
import { d as resolveMacOSDesktopCodexBundledMarketplaceCandidates, t as isManagedCodexDesktopCommand } from "./managed-binary-
|
|
4
|
-
import { n as describeControlFailure } from "./capabilities-
|
|
5
|
-
import { n as requestCodexAppServerClientJson } from "./request-
|
|
6
|
-
import "./config-
|
|
7
|
-
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-
|
|
8
|
-
import { $ as reconcileCodexComputerUseStartArtifacts, O as acquireCodexNativeConfigFence, at as isLegacyCodexComputerUsePluginDisabled, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, ct as assertNotSymlink, d as readCodexAppServerClientDesktopGeneration, g as resolveCodexNativeConfigFenceKey, h as releaseLeasedSharedCodexAppServerClient, it as hasLegacyCodexComputerUseMcpPolicy, nt as resolveBundledComputerUseMarketplacePath, ot as resolveManagedCodexComputerUseConfig, p as readCodexAppServerClientProcessIdentity, rt as resolveClientManagedBundledMarketplacePath, st as ensureCodexComputerUseSharedPluginCache, t as assertCodexAppServerClientStartSelectionCurrent, u as isCodexAppServerStartSelectionChangedError, y as waitForCodexAppServerClientDesktopGenerationDrain } from "./shared-client-
|
|
9
|
-
import { a as isCodexAppServerIndeterminateRequestCancellationError, i as isCodexAppServerConnectionClosedError, o as isCodexAppServerIndeterminateTransportError } from "./client-
|
|
10
|
-
import { l as retireUnsafeCodexTurnClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-
|
|
2
|
+
import { o as resolveCodexComputerUseConfig } from "./config-options-DDzeNQ8m.mjs";
|
|
3
|
+
import { d as resolveMacOSDesktopCodexBundledMarketplaceCandidates, t as isManagedCodexDesktopCommand } from "./managed-binary-BtIjV7yN.mjs";
|
|
4
|
+
import { n as describeControlFailure } from "./capabilities-DbOzOglY.mjs";
|
|
5
|
+
import { n as requestCodexAppServerClientJson } from "./request-Y8dmbqZ3.mjs";
|
|
6
|
+
import "./config-C1YVVLEA.mjs";
|
|
7
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DWzK-k0n.mjs";
|
|
8
|
+
import { $ as reconcileCodexComputerUseStartArtifacts, O as acquireCodexNativeConfigFence, at as isLegacyCodexComputerUsePluginDisabled, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, ct as assertNotSymlink, d as readCodexAppServerClientDesktopGeneration, g as resolveCodexNativeConfigFenceKey, h as releaseLeasedSharedCodexAppServerClient, it as hasLegacyCodexComputerUseMcpPolicy, nt as resolveBundledComputerUseMarketplacePath, ot as resolveManagedCodexComputerUseConfig, p as readCodexAppServerClientProcessIdentity, rt as resolveClientManagedBundledMarketplacePath, st as ensureCodexComputerUseSharedPluginCache, t as assertCodexAppServerClientStartSelectionCurrent, u as isCodexAppServerStartSelectionChangedError, y as waitForCodexAppServerClientDesktopGenerationDrain } from "./shared-client-ByIwuAC-.mjs";
|
|
9
|
+
import { a as isCodexAppServerIndeterminateRequestCancellationError, i as isCodexAppServerConnectionClosedError, o as isCodexAppServerIndeterminateTransportError } from "./client-y7nO6X9c.mjs";
|
|
10
|
+
import { l as retireUnsafeCodexTurnClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-t-kd_1ys.mjs";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import fs from "node:fs/promises";
|
|
13
13
|
import { toErrorObject } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -33,7 +33,7 @@ function createComputerUseRequest(params) {
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
const COMPUTER_USE_LIVE_TEST_RETRY_COUNT = 1;
|
|
36
|
-
const COMPUTER_USE_LIVE_TEST_THREAD_NAME = "OpenClaw Computer Use readiness
|
|
36
|
+
const COMPUTER_USE_LIVE_TEST_THREAD_NAME = "OpenClaw Computer Use readiness check";
|
|
37
37
|
const COMPUTER_USE_LIST_APPS_TOOL = "list_apps";
|
|
38
38
|
const COMPUTER_USE_UNIFIED_JS_TOOL = "js";
|
|
39
39
|
const COMPUTER_USE_UNIFIED_JS_PROBE = "await cua.listApps();";
|
|
@@ -41,7 +41,13 @@ async function runCodexComputerUseLiveTest(params) {
|
|
|
41
41
|
const startedAt = Date.now();
|
|
42
42
|
let lastError;
|
|
43
43
|
let repair;
|
|
44
|
-
const probe =
|
|
44
|
+
const probe = params.tools?.includes(COMPUTER_USE_UNIFIED_JS_TOOL) && !params.tools.includes(COMPUTER_USE_LIST_APPS_TOOL) ? {
|
|
45
|
+
tool: COMPUTER_USE_UNIFIED_JS_TOOL,
|
|
46
|
+
arguments: { code: COMPUTER_USE_UNIFIED_JS_PROBE }
|
|
47
|
+
} : {
|
|
48
|
+
tool: COMPUTER_USE_LIST_APPS_TOOL,
|
|
49
|
+
arguments: {}
|
|
50
|
+
};
|
|
45
51
|
const liveTestStatus = (attempts, error) => ({
|
|
46
52
|
status: error === void 0 ? "passed" : "failed",
|
|
47
53
|
ok: error === void 0,
|
|
@@ -69,15 +75,9 @@ async function runCodexComputerUseLiveTest(params) {
|
|
|
69
75
|
tool: probe.tool,
|
|
70
76
|
arguments: probe.arguments
|
|
71
77
|
}, { timeoutMs: params.config.toolCallTimeoutMs })).isError === true) throw new Error(`Computer Use readiness tool ${params.config.mcpServerName}.${probe.tool} returned an error result`);
|
|
72
|
-
outcome = {
|
|
73
|
-
ok: true,
|
|
74
|
-
liveTest: liveTestStatus(attempt + 1)
|
|
75
|
-
};
|
|
78
|
+
outcome = { liveTest: liveTestStatus(attempt + 1) };
|
|
76
79
|
} catch (error) {
|
|
77
|
-
outcome = {
|
|
78
|
-
ok: false,
|
|
79
|
-
error
|
|
80
|
-
};
|
|
80
|
+
outcome = { error };
|
|
81
81
|
}
|
|
82
82
|
let cleanupError;
|
|
83
83
|
if (threadId) try {
|
|
@@ -85,9 +85,9 @@ async function runCodexComputerUseLiveTest(params) {
|
|
|
85
85
|
} catch (error) {
|
|
86
86
|
cleanupError = toErrorObject(error, "Computer Use readiness cleanup failed");
|
|
87
87
|
}
|
|
88
|
-
if (
|
|
88
|
+
if ("error" in outcome && (params.signal?.aborted || isCodexAppServerStartSelectionChangedError(outcome.error))) throw toErrorObject(outcome.error, "Computer Use live test failed");
|
|
89
89
|
if (cleanupError) throw cleanupError;
|
|
90
|
-
if (outcome
|
|
90
|
+
if ("liveTest" in outcome) return {
|
|
91
91
|
liveTest: outcome.liveTest,
|
|
92
92
|
...repair ? { repair } : {}
|
|
93
93
|
};
|
|
@@ -99,16 +99,6 @@ async function runCodexComputerUseLiveTest(params) {
|
|
|
99
99
|
...repair ? { repair } : {}
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
function resolveComputerUseLiveTestProbe(tools) {
|
|
103
|
-
if (tools?.includes(COMPUTER_USE_UNIFIED_JS_TOOL) && !tools.includes(COMPUTER_USE_LIST_APPS_TOOL)) return {
|
|
104
|
-
tool: COMPUTER_USE_UNIFIED_JS_TOOL,
|
|
105
|
-
arguments: { code: COMPUTER_USE_UNIFIED_JS_PROBE }
|
|
106
|
-
};
|
|
107
|
-
return {
|
|
108
|
-
tool: COMPUTER_USE_LIST_APPS_TOOL,
|
|
109
|
-
arguments: {}
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
102
|
async function repairComputerUseMcpRuntime(request, config) {
|
|
113
103
|
try {
|
|
114
104
|
await request("config/mcpServer/reload", void 0, { timeoutMs: config.liveTestTimeoutMs });
|
|
@@ -222,29 +212,27 @@ async function readCodexComputerUseStatus(params = {}) {
|
|
|
222
212
|
async function ensureCodexComputerUse(params = {}) {
|
|
223
213
|
const config = resolveComputerUseConfig(params);
|
|
224
214
|
if (!config.enabled) return unavailableStatus(config, "disabled", "Computer Use is disabled.");
|
|
225
|
-
const
|
|
226
|
-
...params,
|
|
215
|
+
const inspection = {
|
|
227
216
|
computerUseConfig: config,
|
|
228
217
|
runLiveTest: config.strictReadiness,
|
|
229
|
-
installMode: "none",
|
|
230
218
|
refreshSharedCache: config.autoInstall
|
|
219
|
+
};
|
|
220
|
+
let status = await inspectCodexComputerUse({
|
|
221
|
+
...params,
|
|
222
|
+
...inspection,
|
|
223
|
+
installMode: "none"
|
|
231
224
|
});
|
|
232
|
-
if (status.ready)
|
|
233
|
-
if (config.autoInstall) {
|
|
225
|
+
if (!status.ready && config.autoInstall) {
|
|
234
226
|
if (config.marketplaceSource) throw new CodexComputerUseSetupError(unavailableStatus(config, "auto_install_blocked", "Computer Use auto-install only uses marketplaces Codex app-server has already discovered. Run /codex computer-use install to install from a configured marketplace source."));
|
|
235
|
-
|
|
227
|
+
status = await inspectCodexComputerUse({
|
|
236
228
|
...params,
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
installMode: "automatic",
|
|
240
|
-
refreshSharedCache: true
|
|
229
|
+
...inspection,
|
|
230
|
+
installMode: "automatic"
|
|
241
231
|
});
|
|
242
|
-
if (!installedStatus.ready) throw new CodexComputerUseSetupError(installedStatus);
|
|
243
|
-
return installedStatus;
|
|
244
232
|
}
|
|
245
|
-
throw new CodexComputerUseSetupError(status);
|
|
233
|
+
if (!status.ready) throw new CodexComputerUseSetupError(status);
|
|
234
|
+
return status;
|
|
246
235
|
}
|
|
247
|
-
/** Forces Computer Use plugin installation and returns the ready status. */
|
|
248
236
|
async function installCodexComputerUse(params = {}) {
|
|
249
237
|
const config = resolveComputerUseConfig({
|
|
250
238
|
...params,
|
|
@@ -376,9 +364,7 @@ async function inspectCodexComputerUse(params) {
|
|
|
376
364
|
}
|
|
377
365
|
async function inspectCodexComputerUseWithoutFence(params) {
|
|
378
366
|
const request = createComputerUseRequest(params);
|
|
379
|
-
if (params.installMode !== "none")
|
|
380
|
-
if (!resolveCodexComputerUseConfig({ pluginConfig: params.pluginConfig }).autoInstall) await prepareExplicitManagedComputerUseInstall(params);
|
|
381
|
-
}
|
|
367
|
+
if (params.installMode !== "none" && !resolveCodexComputerUseConfig({ pluginConfig: params.pluginConfig }).autoInstall) await prepareExplicitManagedComputerUseInstall(params);
|
|
382
368
|
const managedMarketplacePath = await resolveClientManagedBundledMarketplacePath(params.client?.getRuntimeIdentity()?.codexHome, params.agentDir);
|
|
383
369
|
const managedCodexHome = managedMarketplacePath ? params.client?.getRuntimeIdentity()?.codexHome : void 0;
|
|
384
370
|
let computerUseConfig = await resolveManagedCodexComputerUseConfig(params.computerUseConfig, managedMarketplacePath);
|
|
@@ -400,14 +386,8 @@ async function inspectCodexComputerUseWithoutFence(params) {
|
|
|
400
386
|
managedCodexHome
|
|
401
387
|
});
|
|
402
388
|
if (!marketplace.marketplace) return unavailableStatus(computerUseConfig, "marketplace_missing", marketplace.message ?? `No Codex marketplace containing ${computerUseConfig.pluginName} is registered. Configure computerUse.marketplaceSource or computerUse.marketplacePath, then run /codex computer-use install.`);
|
|
403
|
-
const pluginInspection = await ensureComputerUsePlugin(
|
|
404
|
-
|
|
405
|
-
config: computerUseConfig,
|
|
406
|
-
marketplace: marketplace.marketplace,
|
|
407
|
-
nativeDisableStatus,
|
|
408
|
-
installPlugin: params.installMode !== "none"
|
|
409
|
-
});
|
|
410
|
-
if (!pluginInspection.ok) return pluginInspection.status;
|
|
389
|
+
const pluginInspection = await ensureComputerUsePlugin(marketplace.marketplace, params.installMode !== "none");
|
|
390
|
+
if ("status" in pluginInspection) return pluginInspection.status;
|
|
411
391
|
if (params.refreshSharedCache && computerUseConfig !== params.computerUseConfig && managedCodexHome && managedMarketplacePath && params.agentDir && params.client) {
|
|
412
392
|
const client = params.client;
|
|
413
393
|
await ensureCodexComputerUseSharedPluginCache({
|
|
@@ -421,16 +401,74 @@ async function inspectCodexComputerUseWithoutFence(params) {
|
|
|
421
401
|
}
|
|
422
402
|
});
|
|
423
403
|
}
|
|
424
|
-
return await readComputerUseTools(
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
installPlugin
|
|
432
|
-
|
|
433
|
-
|
|
404
|
+
return await readComputerUseTools(pluginInspection.plugin, params.installMode !== "none");
|
|
405
|
+
async function ensureComputerUsePlugin(source, installPlugin) {
|
|
406
|
+
let plugin = await readComputerUsePlugin(request, source, computerUseConfig.pluginName);
|
|
407
|
+
if (nativeDisableStatus) {
|
|
408
|
+
const nativeConfig = await request("config/read", { includeLayers: false });
|
|
409
|
+
if (isLegacyCodexComputerUsePluginDisabled(nativeConfig.config)) return { status: nativeDisableStatus };
|
|
410
|
+
}
|
|
411
|
+
if (installPlugin && (!plugin.summary.installed || !plugin.summary.enabled)) {
|
|
412
|
+
await request("plugin/install", pluginRequestParams(source, computerUseConfig.pluginName));
|
|
413
|
+
await request("config/mcpServer/reload", void 0);
|
|
414
|
+
plugin = await readComputerUsePlugin(request, source, computerUseConfig.pluginName);
|
|
415
|
+
}
|
|
416
|
+
if (!plugin.summary.installed || !plugin.summary.enabled) return { status: statusFromPlugin({
|
|
417
|
+
config: computerUseConfig,
|
|
418
|
+
plugin,
|
|
419
|
+
tools: [],
|
|
420
|
+
reason: plugin.summary.installed ? "plugin_disabled" : "plugin_not_installed",
|
|
421
|
+
message: plugin.summary.installed ? `Computer Use is installed, but the ${computerUseConfig.pluginName} plugin is disabled. Run /codex computer-use install or enable computerUse.autoInstall to re-enable it.` : "Computer Use is available but not installed. Run /codex computer-use install or enable computerUse.autoInstall."
|
|
422
|
+
}) };
|
|
423
|
+
return { plugin };
|
|
424
|
+
}
|
|
425
|
+
async function readComputerUseTools(plugin, installPlugin) {
|
|
426
|
+
const { client, signal, runLiveTest, releaseNativeConfigFence } = params;
|
|
427
|
+
let server = await readMcpServerStatus(request, computerUseConfig.mcpServerName);
|
|
428
|
+
let tools = Object.keys(server?.tools ?? {}).toSorted();
|
|
429
|
+
if ((!server || tools.length === 0) && installPlugin) {
|
|
430
|
+
await request("config/mcpServer/reload", void 0);
|
|
431
|
+
server = await readMcpServerStatus(request, computerUseConfig.mcpServerName);
|
|
432
|
+
tools = Object.keys(server?.tools ?? {}).toSorted();
|
|
433
|
+
}
|
|
434
|
+
if (!server || tools.length === 0) return statusFromPlugin({
|
|
435
|
+
config: computerUseConfig,
|
|
436
|
+
plugin,
|
|
437
|
+
tools,
|
|
438
|
+
reason: "mcp_missing",
|
|
439
|
+
message: server ? `Computer Use is installed, but the ${computerUseConfig.mcpServerName} MCP server exposes no tools.` : `Computer Use is installed, but the ${computerUseConfig.mcpServerName} MCP server is not available.`
|
|
440
|
+
});
|
|
441
|
+
const status = statusFromPlugin({
|
|
442
|
+
config: computerUseConfig,
|
|
443
|
+
plugin,
|
|
444
|
+
tools,
|
|
445
|
+
reason: "ready",
|
|
446
|
+
message: "Computer Use is ready."
|
|
447
|
+
});
|
|
448
|
+
if (!runLiveTest) return status;
|
|
449
|
+
releaseNativeConfigFence?.();
|
|
450
|
+
const { liveTest, repair } = await runCodexComputerUseLiveTest({
|
|
451
|
+
request,
|
|
452
|
+
client,
|
|
453
|
+
signal,
|
|
454
|
+
config: computerUseConfig,
|
|
455
|
+
tools
|
|
456
|
+
});
|
|
457
|
+
const compatibilityStartupAllowed = !liveTest.ok && !computerUseConfig.strictReadiness;
|
|
458
|
+
return {
|
|
459
|
+
...status,
|
|
460
|
+
ready: liveTest.ok,
|
|
461
|
+
reason: liveTest.ok ? "ready" : "live_test_failed",
|
|
462
|
+
liveTest,
|
|
463
|
+
...repair ? { repair } : {},
|
|
464
|
+
warnings: [
|
|
465
|
+
...status.warnings,
|
|
466
|
+
...repair?.warnings ?? [],
|
|
467
|
+
...compatibilityStartupAllowed ? ["Computer Use live test failed, but compatibility startup remains enabled; set computerUse.strictReadiness to true to fail closed."] : []
|
|
468
|
+
],
|
|
469
|
+
message: liveTest.ok ? "Computer Use is ready." : compatibilityStartupAllowed ? `${liveTest.message} Startup is allowed because computerUse.strictReadiness is false.` : liveTest.message
|
|
470
|
+
};
|
|
471
|
+
}
|
|
434
472
|
}
|
|
435
473
|
async function prepareExplicitManagedComputerUseInstall(params) {
|
|
436
474
|
const context = params.explicitManagedInstall;
|
|
@@ -477,81 +515,6 @@ async function resolveExplicitManagedComputerUseInstallContext(params) {
|
|
|
477
515
|
desktopGeneration
|
|
478
516
|
};
|
|
479
517
|
}
|
|
480
|
-
async function ensureComputerUsePlugin(params) {
|
|
481
|
-
let plugin = await readComputerUsePlugin(params.request, params.marketplace, params.config.pluginName);
|
|
482
|
-
if (params.nativeDisableStatus) {
|
|
483
|
-
const nativeConfig = await params.request("config/read", { includeLayers: false });
|
|
484
|
-
if (isLegacyCodexComputerUsePluginDisabled(nativeConfig.config)) return {
|
|
485
|
-
ok: false,
|
|
486
|
-
status: params.nativeDisableStatus
|
|
487
|
-
};
|
|
488
|
-
}
|
|
489
|
-
if (params.installPlugin && (!plugin.summary.installed || !plugin.summary.enabled)) {
|
|
490
|
-
await params.request("plugin/install", pluginRequestParams(params.marketplace, params.config.pluginName));
|
|
491
|
-
await params.request("config/mcpServer/reload", void 0);
|
|
492
|
-
plugin = await readComputerUsePlugin(params.request, params.marketplace, params.config.pluginName);
|
|
493
|
-
}
|
|
494
|
-
if (!plugin.summary.installed || !plugin.summary.enabled) return {
|
|
495
|
-
ok: false,
|
|
496
|
-
status: statusFromPlugin({
|
|
497
|
-
config: params.config,
|
|
498
|
-
plugin,
|
|
499
|
-
tools: [],
|
|
500
|
-
reason: plugin.summary.installed ? "plugin_disabled" : "plugin_not_installed",
|
|
501
|
-
message: plugin.summary.installed ? `Computer Use is installed, but the ${params.config.pluginName} plugin is disabled. Run /codex computer-use install or enable computerUse.autoInstall to re-enable it.` : "Computer Use is available but not installed. Run /codex computer-use install or enable computerUse.autoInstall."
|
|
502
|
-
})
|
|
503
|
-
};
|
|
504
|
-
return {
|
|
505
|
-
ok: true,
|
|
506
|
-
plugin
|
|
507
|
-
};
|
|
508
|
-
}
|
|
509
|
-
async function readComputerUseTools(params) {
|
|
510
|
-
let server = await readMcpServerStatus(params.request, params.config.mcpServerName);
|
|
511
|
-
let tools = Object.keys(server?.tools ?? {}).toSorted();
|
|
512
|
-
if ((!server || tools.length === 0) && params.installPlugin) {
|
|
513
|
-
await params.request("config/mcpServer/reload", void 0);
|
|
514
|
-
server = await readMcpServerStatus(params.request, params.config.mcpServerName);
|
|
515
|
-
tools = Object.keys(server?.tools ?? {}).toSorted();
|
|
516
|
-
}
|
|
517
|
-
if (!server || tools.length === 0) return statusFromPlugin({
|
|
518
|
-
config: params.config,
|
|
519
|
-
plugin: params.plugin,
|
|
520
|
-
tools,
|
|
521
|
-
reason: "mcp_missing",
|
|
522
|
-
message: server ? `Computer Use is installed, but the ${params.config.mcpServerName} MCP server exposes no tools.` : `Computer Use is installed, but the ${params.config.mcpServerName} MCP server is not available.`
|
|
523
|
-
});
|
|
524
|
-
const status = statusFromPlugin({
|
|
525
|
-
config: params.config,
|
|
526
|
-
plugin: params.plugin,
|
|
527
|
-
tools,
|
|
528
|
-
reason: "ready",
|
|
529
|
-
message: "Computer Use is ready."
|
|
530
|
-
});
|
|
531
|
-
if (!params.runLiveTest) return status;
|
|
532
|
-
params.releaseNativeConfigFence?.();
|
|
533
|
-
const { liveTest, repair } = await runCodexComputerUseLiveTest({
|
|
534
|
-
request: params.request,
|
|
535
|
-
client: params.client,
|
|
536
|
-
signal: params.signal,
|
|
537
|
-
config: params.config,
|
|
538
|
-
tools
|
|
539
|
-
});
|
|
540
|
-
const compatibilityStartupAllowed = !liveTest.ok && !params.config.strictReadiness;
|
|
541
|
-
return {
|
|
542
|
-
...status,
|
|
543
|
-
ready: liveTest.ok,
|
|
544
|
-
reason: liveTest.ok ? "ready" : "live_test_failed",
|
|
545
|
-
liveTest,
|
|
546
|
-
...repair ? { repair } : {},
|
|
547
|
-
warnings: [
|
|
548
|
-
...status.warnings,
|
|
549
|
-
...repair?.warnings ?? [],
|
|
550
|
-
...compatibilityStartupAllowed ? ["Computer Use live test failed, but compatibility startup remains enabled; set computerUse.strictReadiness to true to fail closed."] : []
|
|
551
|
-
],
|
|
552
|
-
message: liveTest.ok ? "Computer Use is ready." : compatibilityStartupAllowed ? `${liveTest.message} Startup is allowed because computerUse.strictReadiness is false.` : liveTest.message
|
|
553
|
-
};
|
|
554
|
-
}
|
|
555
518
|
async function resolveMarketplaceRef(params) {
|
|
556
519
|
let preferredMarketplaceName = params.config.marketplaceName;
|
|
557
520
|
if (params.config.marketplaceSource && params.allowAdd) {
|
|
@@ -612,12 +575,8 @@ async function migrateLegacyBundledMarketplaceSource(params) {
|
|
|
612
575
|
await params.request("marketplace/remove", { marketplaceName: BUNDLED_MARKETPLACE_NAME });
|
|
613
576
|
}
|
|
614
577
|
async function listComputerUseMarketplaceCandidates(request, config) {
|
|
615
|
-
|
|
616
|
-
}
|
|
617
|
-
async function codexNativePluginsDisabled(request) {
|
|
618
|
-
return (await request("experimentalFeature/list", {})).data.find(({ name }) => name === "plugins")?.enabled === false;
|
|
619
|
-
}
|
|
620
|
-
function findComputerUseMarketplaces(listed, pluginName) {
|
|
578
|
+
const listed = await request("plugin/list", { cwds: [] });
|
|
579
|
+
const { pluginName } = config;
|
|
621
580
|
return listed.marketplaces.flatMap((marketplace) => {
|
|
622
581
|
const plugin = marketplace.plugins.find((candidate) => candidate.name === pluginName || candidate.id === pluginName || candidate.id === `${pluginName}@${marketplace.name}`);
|
|
623
582
|
if (!plugin) return [];
|
|
@@ -635,6 +594,9 @@ function findComputerUseMarketplaces(listed, pluginName) {
|
|
|
635
594
|
}];
|
|
636
595
|
});
|
|
637
596
|
}
|
|
597
|
+
async function codexNativePluginsDisabled(request) {
|
|
598
|
+
return (await request("experimentalFeature/list", {})).data.find(({ name }) => name === "plugins")?.enabled === false;
|
|
599
|
+
}
|
|
638
600
|
function chooseKnownComputerUseMarketplace(candidates) {
|
|
639
601
|
for (const marketplaceName of COMPUTER_USE_MARKETPLACE_NAME_PRIORITY) {
|
|
640
602
|
const candidate = candidates.find((marketplace) => marketplace.name === marketplaceName);
|