@openclaw/codex 2026.9.6 → 2026.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/assets/icon.png +0 -0
- package/dist/.setup/{account-usage-runtime-Eem_WGqY.mjs → account-usage-runtime-DFhbh1zz.mjs} +5 -5
- package/dist/.setup/{apply-DDOi8uNx.mjs → apply-D3GcSoSa.mjs} +22 -36
- package/dist/.setup/{attempt-client-cleanup-CEv1cKwF.mjs → attempt-client-cleanup-DOP-cW5j.mjs} +128 -37
- package/dist/.setup/attempt-workspace-context-C5HigshI.mjs +164 -0
- package/dist/.setup/{auth-binding-DhLWa_7K.mjs → auth-binding-BLWz7stm.mjs} +14 -1
- package/dist/.setup/{auth-cache-key-B2mpaI9D.mjs → auth-cache-key-Dbvq-QgB.mjs} +36 -34
- package/dist/.setup/{auth-profile-WqZtZfXN.mjs → auth-profile-B0okYl2D.mjs} +1 -2
- package/dist/.setup/auth-start-options-BPIPeEX8.mjs +44 -0
- package/dist/.setup/{binding-connection-ThoatDcb.mjs → binding-connection-DTtN1KrX.mjs} +2 -2
- package/dist/.setup/{binding-connection.runtime-yoHrABt-.mjs → binding-connection.runtime-6TpgD1M6.mjs} +4 -4
- package/dist/.setup/{bounded-turn-B2HScEgT.mjs → bounded-turn-CbjoN2OW.mjs} +15 -18
- package/dist/.setup/bounded-turn-isolation-B8K_ylqk.mjs +14 -0
- package/dist/.setup/{build-state-C7EnDVgr.mjs → build-state-Da1_z0kd.mjs} +1 -1
- package/dist/.setup/{capabilities-CDXOOFdZ.mjs → capabilities-B3WEZl4e.mjs} +2 -10
- package/dist/.setup/{client-Cs08OXVQ.mjs → client-N0JpgSzF.mjs} +138 -399
- package/dist/.setup/{client-catalog-response-BMgt_4q4.mjs → client-catalog-response-5HHLdcde.mjs} +1 -1
- package/dist/.setup/{command-dispatch-B4JuOsOk.mjs → command-dispatch-BeAoaovI.mjs} +5 -8
- package/dist/.setup/{command-formatters-Bmqvr9tO.mjs → command-formatters-R3ckE3Co.mjs} +29 -61
- package/dist/.setup/{command-handlers-DW7Lx9oH.mjs → command-handlers-ylTMS00z.mjs} +222 -343
- package/dist/.setup/{command-rpc-DixIj3HW.mjs → command-rpc-CGJGUQ6Y.mjs} +15 -18
- package/dist/.setup/compact-C2WamavS.mjs +776 -0
- package/dist/.setup/{config-BoTP_mrL.mjs → config-DKhXquav.mjs} +26 -28
- package/dist/.setup/{config-options-BvaRs51b.mjs → config-options-CzyWLTJt.mjs} +24 -37
- package/dist/.setup/{config-parsing-CcB9iPoq.mjs → config-parsing-b088LyhT.mjs} +57 -60
- package/dist/.setup/{config-runtime-C8Rw1m1m.mjs → config-runtime-C0NbLms1.mjs} +2 -2
- package/dist/.setup/{config-security-BEReZ6go.mjs → config-security-CE-FcGw9.mjs} +32 -111
- package/dist/.setup/{config-utils-DujwEnhg.mjs → config-utils-D0CXecki.mjs} +3 -13
- package/dist/.setup/context-engine-projection-PezSESth.mjs +387 -0
- package/dist/.setup/{conversation-binding-DP-gMrBP.mjs → conversation-binding-3Min8qvP.mjs} +67 -90
- package/dist/.setup/{conversation-binding-data-CrcyZk6O.mjs → conversation-binding-data-C746z5Pn.mjs} +8 -12
- package/dist/.setup/{conversation-control-uK9Jomlc.mjs → conversation-control-CEP8X5JC.mjs} +8 -8
- package/dist/.setup/{cyber-failover-DYwbmf1o.mjs → cyber-failover-XV0nNRZu.mjs} +1 -1
- package/dist/.setup/{cyber-failover-notice-e9G3J9-e.mjs → cyber-failover-notice-RNpGpTyP.mjs} +1 -1
- package/dist/.setup/{dynamic-tools-BDXl-8Cw.mjs → dynamic-tools-DzlsLUuS.mjs} +2305 -2606
- package/dist/.setup/{effective-mcp-catalog-CvnvnGIe.mjs → effective-mcp-catalog-CxUtC-xG.mjs} +8 -17
- package/dist/.setup/{ephemeral-turn-poidXgek.mjs → ephemeral-turn-CDsPJOa2.mjs} +3 -3
- package/dist/.setup/event-projector-assistant-message-CigreO4K.mjs +69 -0
- package/dist/.setup/{event-projector-usage-CnBS8Wa3.mjs → event-projector-usage-03R0I2dM.mjs} +3 -25
- package/dist/.setup/event-projector-values-DJSz8BTk.mjs +106 -0
- package/dist/.setup/incognito-session-DWYapfwf.mjs +2 -0
- package/dist/.setup/{inference-context-D96l9-ew.mjs → inference-context-D-9gWlTR.mjs} +16 -18
- package/dist/.setup/inference-dispatch-CMZtjQyz.mjs +359 -0
- package/dist/.setup/inference-metadata-CgIf7sOx.mjs +81 -0
- package/dist/.setup/{inference-proxy-b-aJMSxm.mjs → inference-proxy-DhcXOgUE.mjs} +174 -214
- package/dist/.setup/{isolated-completion-BIZFhTNG.mjs → isolated-completion-Dm3PzxJk.mjs} +9 -12
- package/dist/.setup/{managed-binary-BnshlFag.mjs → managed-binary-kiWRhNRE.mjs} +8 -12
- package/dist/.setup/{model-catalog-CfXJf9Ay.mjs → model-catalog-PAuZgJC6.mjs} +11 -10
- package/dist/.setup/model-runtime-BdqzOMkU.mjs +11 -0
- package/dist/.setup/{models-KnqBv0hE.mjs → models-DHXZtVVk.mjs} +9 -18
- package/dist/.setup/{native-auth-rWbGbMn3.mjs → native-auth-CuG53tu4.mjs} +4 -4
- package/dist/.setup/{native-execution-policy-umd0tgh4.mjs → native-execution-policy-BxZJy5mP.mjs} +5 -30
- package/dist/.setup/{native-subagent-monitor-D3filLY2.mjs → native-subagent-monitor-Dpsmf2wz.mjs} +4395 -3609
- package/dist/.setup/native-subagent-pending-assignments-DwkCzLvD.mjs +203 -0
- package/dist/.setup/native-task-assignments-DMQ0g3hu.mjs +194 -0
- package/dist/.setup/{node-cli-sessions-r3avj02l.mjs → node-cli-sessions-HC4W6FLI.mjs} +19 -49
- package/dist/.setup/{node-exec-server.runtime-BDwWXVpK.mjs → node-exec-server.runtime-BgBfWQqo.mjs} +3 -6
- package/dist/.setup/{plan-CN3VwfNU.mjs → plan-Y-QIvrKB.mjs} +49 -92
- package/dist/.setup/{plugin-activation-DT3MNtqj.mjs → plugin-activation-cNHRfaxU.mjs} +8 -36
- package/dist/.setup/{plugin-app-cache-key-B2CsSdnV.mjs → plugin-app-cache-key-BL9B5H0L.mjs} +6 -23
- package/dist/.setup/{plugin-inventory-BoRei8Z4.mjs → plugin-inventory-Cky2XJUw.mjs} +21 -21
- package/dist/.setup/{plugin-marketplace-discovery-CDOi8IFs.mjs → plugin-marketplace-discovery-D_dV9FXa.mjs} +18 -24
- package/dist/.setup/{plugin-metadata-cache-Ctmo83k_.mjs → plugin-metadata-cache-DsjsL1dr.mjs} +115 -175
- package/dist/.setup/{provider-BOsxQHOM.mjs → provider-DH8NSzGt.mjs} +11 -14
- package/dist/.setup/{provider-capabilities-BfE88FZ5.mjs → provider-capabilities-CAxoF-X1.mjs} +13 -18
- package/dist/.setup/{rate-limits-CMU3DUD0.mjs → rate-limits-B7-X2TgG.mjs} +9 -31
- package/dist/.setup/{request-D2L0zMrq.mjs → request-BHZ1nz8d.mjs} +7 -6
- package/dist/.setup/responses-oauth-twnuTaAa.mjs +93 -0
- package/dist/.setup/rpc-error-BlD2vuzn.mjs +31 -0
- package/dist/.setup/{run-attempt-BHu11r7h.mjs → run-attempt-D8RZUOzY.mjs} +1035 -1023
- package/dist/.setup/{run-attempt-lifecycle-B7JbY4-F.mjs → run-attempt-lifecycle-C-6O3Exn.mjs} +10 -24
- package/dist/.setup/{runtime-artifact-CLZ8udh-.mjs → runtime-artifact-DDQ-HGXf.mjs} +16 -4
- package/dist/.setup/runtime-artifact-connection-D68qQn1m.mjs +78 -0
- package/dist/.setup/sandbox-guard-DjCz2eOw.mjs +126 -0
- package/dist/.setup/scope-DOC1Xjc8.mjs +6 -0
- package/dist/.setup/session-binding-DGCYAfvD.mjs +443 -0
- package/dist/.setup/{session-binding-record-BGoz8wOK.mjs → session-binding-record-Oe9L-CNY.mjs} +52 -130
- package/dist/.setup/{session-binding-sidecars-BlB5EvIS.mjs → session-binding-sidecars-jo6H8dFr.mjs} +196 -17
- package/dist/.setup/{session-catalog-Pno1xGcl.mjs → session-catalog-4sCdv5qx.mjs} +170 -324
- package/dist/.setup/{session-catalog-adoption-BI6UTDZT.mjs → session-catalog-adoption-BU_pHWG7.mjs} +7 -6
- package/dist/.setup/{session-catalog-archive-lHBqzhaO.mjs → session-catalog-archive-spHfihri.mjs} +6 -6
- package/dist/.setup/session-catalog-events-DePDzzjc.mjs +139 -0
- package/dist/.setup/session-catalog-home-id-vlih0B_g.mjs +22 -0
- package/dist/.setup/{session-catalog-index-B9_VQIUz.mjs → session-catalog-index-CZvDzC6z.mjs} +126 -122
- package/dist/.setup/{session-catalog-index-order-hcdz07yN.mjs → session-catalog-index-order-BcQpHks3.mjs} +1 -1
- package/dist/.setup/{session-catalog-index-state-Dgh8ORJm.mjs → session-catalog-index-state-TeO7EyO-.mjs} +3 -2
- package/dist/.setup/session-catalog-limits-DDxOsQeC.mjs +14 -0
- package/dist/.setup/session-catalog-list-request-CvtxrYSe.mjs +170 -0
- package/dist/.setup/session-catalog-native-projection-DjhwGL6x.mjs +178 -0
- package/dist/.setup/{session-catalog-node-adoption-ITddWx_X.mjs → session-catalog-node-adoption-DgXvSGu0.mjs} +10 -27
- package/dist/.setup/{session-catalog-node-continue-6g6qi4A9.mjs → session-catalog-node-continue-DjKXHBbi.mjs} +8 -10
- package/dist/.setup/session-catalog-node-lookup-CtAXI5W5.mjs +56 -0
- package/dist/.setup/{session-catalog-native-projection-DowriLid.mjs → session-catalog-parsing-CPGaPYr-.mjs} +11 -194
- package/dist/.setup/{session-catalog-projection-zK_PUsiE.mjs → session-catalog-projection-Cr5qP5Dj.mjs} +6 -4
- package/dist/.setup/session-catalog-provenance-DoAvktcj.mjs +95 -0
- package/dist/.setup/{session-cli-irrD-uo7.mjs → session-cli-Cn_nCqfq.mjs} +9 -22
- package/dist/.setup/{session-history-BrqhSCf9.mjs → session-history-D83lJWHG.mjs} +4 -6
- package/dist/.setup/{session-history-import-D-3wAgOP.mjs → session-history-import-WhX-X33a.mjs} +7 -10
- package/dist/.setup/session-history-read-Ov3StuL4.mjs +133 -0
- package/dist/.setup/{session-history.worker-CaCh0xF_.mjs → session-history.worker-MnPKncqP.mjs} +9 -5
- package/dist/.setup/session-initialization-6aveB9qb.mjs +22 -0
- package/dist/.setup/{session-permission-policy-BI1QK_98.mjs → session-permission-policy-Ci_fVX6y.mjs} +4 -8
- package/dist/.setup/{session-retirement-BH-S6qkJ.mjs → session-retirement-qMTxkNx2.mjs} +17 -17
- package/dist/.setup/{settled-turn-context-fmwouT5I.mjs → settled-turn-context-D4yj4rxf.mjs} +1 -1
- package/dist/.setup/{settled-turn-finalizer-DiAi6Kx6.mjs → settled-turn-finalizer-BsvEabkw.mjs} +14 -10
- package/dist/.setup/{shared-client-DA4VR4Eb.mjs → shared-client-DqyTMYug.mjs} +783 -412
- package/dist/.setup/shared-client-lifecycle-DJIgqgMw.mjs +153 -0
- package/dist/.setup/{side-question-BJ1wSDcB.mjs → side-question-C4kCmQy1.mjs} +79 -143
- package/dist/.setup/{source-CUzJq5WN.mjs → source-CS_7GFJZ.mjs} +80 -137
- package/dist/.setup/{thread-lifecycle-B3mfz1TG.mjs → thread-lifecycle-DPflntEJ.mjs} +294 -737
- package/dist/.setup/{incognito-session-uhrBF6wJ.mjs → thread-ownership-queue-Dp24d7-F.mjs} +1 -2
- package/dist/.setup/{thread-ownership-DcTtAcXj.mjs → thread-ownership-roNP0l1c.mjs} +45 -10
- package/dist/.setup/{thread-policy-DGuQsuFC.mjs → thread-policy-DTd-DtkX.mjs} +46 -7
- package/dist/.setup/{thread-requests-BLvGkP2R.mjs → thread-requests-B_bRnMGN.mjs} +199 -302
- package/dist/.setup/{thread-resume-DIBXwOpE.mjs → thread-resume-CdDaoc7T.mjs} +6 -6
- package/dist/.setup/{timeout-C910MdAB.mjs → timeout-CXOfNoaX.mjs} +1 -35
- package/dist/.setup/{transcript-history-projection-ZZpkFkJ_.mjs → transcript-history-projection-DRSifI-1.mjs} +17 -89
- package/dist/.setup/{transcript-mirror-attestation-CzM-94NC.mjs → transcript-mirror-attestation-YSegaktH.mjs} +3 -4
- package/dist/.setup/{transcript-mirror-BtHDBp1G.mjs → transcript-mirror-kxmCYsuF.mjs} +7 -9
- package/dist/.setup/{transport-stdio-h2VHOskC.mjs → transport-stdio-Bdegpn2V.mjs} +5 -22
- package/dist/.setup/transport-websocket-BTBE-LD9.mjs +211 -0
- package/dist/.setup/{upstream-prompt-provenance-LphB8slG.mjs → upstream-prompt-provenance-fXkKbPVC.mjs} +3 -9
- package/dist/.setup/{upstream-session-fork-BUr4OUbC.mjs → upstream-session-fork-CBeVjBpT.mjs} +23 -23
- package/dist/.setup/{usage-BML0r-ua.mjs → usage-BMzNxeR_.mjs} +4 -4
- package/dist/.setup/{usage-limit-error-DUMbefVY.mjs → usage-limit-error-QXerDo3i.mjs} +4 -19
- package/dist/.setup/{web-search-provider.runtime-CDKlN-Rv.mjs → web-search-provider.runtime-P77OUeoo.mjs} +8 -19
- package/dist/api.js +9 -11
- package/dist/catalog-page.worker.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +50 -8
- package/dist/harness.js +344 -1
- package/dist/index.js +193 -245
- package/dist/media-understanding-provider.js +9 -22
- package/dist/migration-provider-api.js +1 -1
- package/dist/provider-discovery.js +1 -1
- package/dist/session-history-worker-runtime.js +3 -3
- package/dist/session-history.worker.js +1 -1
- package/openclaw.plugin.json +14 -2
- package/package.json +7 -6
- package/dist/.setup/attempt-workspace-context-DUVEn_CS.mjs +0 -331
- package/dist/.setup/compact-Du5UvtxA.mjs +0 -680
- package/dist/.setup/event-projector-assistant-message-BsruvNrH.mjs +0 -103
- package/dist/.setup/event-projector-items-C6L_5ZiT.mjs +0 -234
- package/dist/.setup/harness-a_MsE4-_.mjs +0 -355
- package/dist/.setup/history-rejection-B4nOXNXF.mjs +0 -13
- package/dist/.setup/image-payload-sanitizer-tupAr-2o.mjs +0 -79
- package/dist/.setup/local-runtime-attribution-B_2mnqhb.mjs +0 -19
- package/dist/.setup/native-subagent-history-0nYYgo0k.mjs +0 -148
- package/dist/.setup/native-subagent-task-ids-wb8CKZGN.mjs +0 -441
- package/dist/.setup/plugin-approval-roundtrip-C0MZzCuP.mjs +0 -122
- package/dist/.setup/rolldown-runtime-8H4AJuhK.mjs +0 -14
- package/dist/.setup/sandbox-guard-C2sRMOEY.mjs +0 -166
- package/dist/.setup/session-binding-Cm0apEbd.mjs +0 -692
- package/dist/.setup/session-catalog-events-Bj6j94E_.mjs +0 -347
- package/dist/.setup/session-history-read-B3ZfSUbF.mjs +0 -50
- package/dist/.setup/session-initialization-rcgbZiid.mjs +0 -75
- package/dist/.setup/thread-history-page-DoVpnHim.mjs +0 -83
package/dist/.setup/{plugin-metadata-cache-Ctmo83k_.mjs → plugin-metadata-cache-DsjsL1dr.mjs}
RENAMED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as resolveCodexComputerUseConfig } from "./config-options-
|
|
3
|
-
import { d as resolveMacOSDesktopCodexBundledMarketplaceCandidates,
|
|
4
|
-
import { n as describeControlFailure } from "./capabilities-
|
|
5
|
-
import { r as requestCodexAppServerClientJson } from "./request-
|
|
6
|
-
import "./config-
|
|
7
|
-
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-
|
|
8
|
-
import { $ as
|
|
9
|
-
import { c as isCodexAppServerIndeterminateTransportError, o as isCodexAppServerConnectionClosedError, s as isCodexAppServerIndeterminateRequestCancellationError } from "./client-
|
|
10
|
-
import { r as CodexAppServerUnsafeSubscriptionError, u as retireUnsafeCodexTurnClientBestEffort } from "./attempt-client-cleanup-
|
|
11
|
-
import { existsSync } from "node:fs";
|
|
1
|
+
import { t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
|
|
2
|
+
import { o as resolveCodexComputerUseConfig } from "./config-options-CzyWLTJt.mjs";
|
|
3
|
+
import { d as resolveMacOSDesktopCodexBundledMarketplaceCandidates, t as isManagedCodexDesktopCommand } from "./managed-binary-kiWRhNRE.mjs";
|
|
4
|
+
import { n as describeControlFailure } from "./capabilities-B3WEZl4e.mjs";
|
|
5
|
+
import { r as requestCodexAppServerClientJson } from "./request-BHZ1nz8d.mjs";
|
|
6
|
+
import "./config-DKhXquav.mjs";
|
|
7
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-C0NbLms1.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-DqyTMYug.mjs";
|
|
9
|
+
import { c as isCodexAppServerIndeterminateTransportError, o as isCodexAppServerConnectionClosedError, s as isCodexAppServerIndeterminateRequestCancellationError } from "./client-N0JpgSzF.mjs";
|
|
10
|
+
import { r as CodexAppServerUnsafeSubscriptionError, u as retireUnsafeCodexTurnClientBestEffort } from "./attempt-client-cleanup-DOP-cW5j.mjs";
|
|
12
11
|
import path from "node:path";
|
|
13
|
-
import fs
|
|
12
|
+
import fs from "node:fs/promises";
|
|
14
13
|
import { toErrorObject } from "openclaw/plugin-sdk/error-runtime";
|
|
15
14
|
//#region extensions/codex/src/app-server/computer-use-readiness.ts
|
|
16
15
|
/** Computer Use readiness probes and their native subscription lifecycle. */
|
|
@@ -162,11 +161,38 @@ function skippedLiveTestStatus(config, message) {
|
|
|
162
161
|
};
|
|
163
162
|
}
|
|
164
163
|
//#endregion
|
|
164
|
+
//#region extensions/codex/src/app-server/computer-use-status.ts
|
|
165
|
+
function unavailableStatus(config, reason, message) {
|
|
166
|
+
const disabled = reason === "disabled";
|
|
167
|
+
return {
|
|
168
|
+
enabled: !disabled,
|
|
169
|
+
ready: false,
|
|
170
|
+
reason,
|
|
171
|
+
installed: reason === "plugin_disabled" ? null : false,
|
|
172
|
+
pluginEnabled: false,
|
|
173
|
+
mcpServerAvailable: false,
|
|
174
|
+
pluginName: config.pluginName,
|
|
175
|
+
mcpServerName: config.mcpServerName,
|
|
176
|
+
...!disabled && config.marketplaceName ? { marketplaceName: config.marketplaceName } : {},
|
|
177
|
+
...!disabled && config.marketplacePath ? { marketplacePath: config.marketplacePath } : {},
|
|
178
|
+
tools: [],
|
|
179
|
+
installation: {
|
|
180
|
+
status: disabled ? "disabled" : reason === "plugin_disabled" ? "unchecked" : reason === "marketplace_missing" ? "marketplace_missing" : "not_installed",
|
|
181
|
+
ok: false,
|
|
182
|
+
message
|
|
183
|
+
},
|
|
184
|
+
exposure: {
|
|
185
|
+
status: "skipped",
|
|
186
|
+
ok: false,
|
|
187
|
+
message: disabled ? "MCP exposure was not checked because Computer Use is disabled." : "MCP exposure was not checked because Computer Use installation is not ready."
|
|
188
|
+
},
|
|
189
|
+
liveTest: skippedLiveTestStatus(config, disabled ? "Computer Use live test was not run because Computer Use is disabled." : "Computer Use live test was not run because installation is not ready."),
|
|
190
|
+
warnings: [],
|
|
191
|
+
message
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
//#endregion
|
|
165
195
|
//#region extensions/codex/src/app-server/computer-use.ts
|
|
166
|
-
/**
|
|
167
|
-
* Computer Use plugin/MCP readiness checks and optional install flow for Codex
|
|
168
|
-
* app-server sessions.
|
|
169
|
-
*/
|
|
170
196
|
var CodexComputerUseSetupError = class extends Error {
|
|
171
197
|
constructor(status) {
|
|
172
198
|
super(status.message);
|
|
@@ -186,13 +212,13 @@ const COMPUTER_USE_MARKETPLACE_NAME_PRIORITY = [
|
|
|
186
212
|
/** Reads Computer Use readiness without installing or mutating app-server state. */
|
|
187
213
|
async function readCodexComputerUseStatus(params = {}) {
|
|
188
214
|
const config = resolveComputerUseConfig(params);
|
|
189
|
-
if (!config.enabled) return
|
|
215
|
+
if (!config.enabled) return unavailableStatus(config, "disabled", "Computer Use is disabled.");
|
|
190
216
|
try {
|
|
191
217
|
return await inspectCodexComputerUse({
|
|
192
218
|
...params,
|
|
193
219
|
computerUseConfig: config,
|
|
194
220
|
runLiveTest: true,
|
|
195
|
-
|
|
221
|
+
installMode: "none"
|
|
196
222
|
});
|
|
197
223
|
} catch (error) {
|
|
198
224
|
return unavailableStatus(config, "check_failed", `Computer Use check failed: ${describeControlFailure(error)}`);
|
|
@@ -204,12 +230,13 @@ async function readCodexComputerUseStatus(params = {}) {
|
|
|
204
230
|
*/
|
|
205
231
|
async function ensureCodexComputerUse(params = {}) {
|
|
206
232
|
const config = resolveComputerUseConfig(params);
|
|
207
|
-
if (!config.enabled) return
|
|
233
|
+
if (!config.enabled) return unavailableStatus(config, "disabled", "Computer Use is disabled.");
|
|
208
234
|
const status = await inspectCodexComputerUse({
|
|
209
235
|
...params,
|
|
210
236
|
computerUseConfig: config,
|
|
211
237
|
runLiveTest: config.strictReadiness,
|
|
212
|
-
|
|
238
|
+
installMode: "none",
|
|
239
|
+
refreshSharedCache: config.autoInstall
|
|
213
240
|
});
|
|
214
241
|
if (status.ready) return status;
|
|
215
242
|
if (config.autoInstall) {
|
|
@@ -219,13 +246,13 @@ async function ensureCodexComputerUse(params = {}) {
|
|
|
219
246
|
...params,
|
|
220
247
|
computerUseConfig: config,
|
|
221
248
|
runLiveTest: config.strictReadiness,
|
|
222
|
-
|
|
249
|
+
installMode: "automatic",
|
|
250
|
+
refreshSharedCache: true
|
|
223
251
|
});
|
|
224
252
|
if (!installedStatus.ready) throw new CodexComputerUseSetupError(installedStatus);
|
|
225
253
|
return installedStatus;
|
|
226
254
|
}
|
|
227
|
-
|
|
228
|
-
return status;
|
|
255
|
+
throw new CodexComputerUseSetupError(status);
|
|
229
256
|
}
|
|
230
257
|
/** Forces Computer Use plugin installation and returns the ready status. */
|
|
231
258
|
async function installCodexComputerUse(params = {}) {
|
|
@@ -242,7 +269,7 @@ async function installCodexComputerUse(params = {}) {
|
|
|
242
269
|
...params,
|
|
243
270
|
computerUseConfig: config,
|
|
244
271
|
runLiveTest: true,
|
|
245
|
-
|
|
272
|
+
installMode: "explicit"
|
|
246
273
|
});
|
|
247
274
|
if (!status.ready) throw new CodexComputerUseSetupError(status);
|
|
248
275
|
return status;
|
|
@@ -273,7 +300,7 @@ async function inspectCodexComputerUse(params) {
|
|
|
273
300
|
});
|
|
274
301
|
lease.client = client;
|
|
275
302
|
}
|
|
276
|
-
if (!params.
|
|
303
|
+
if (params.installMode === "none" && !params.refreshSharedCache) {
|
|
277
304
|
if (!lease.client) return await inspectCodexComputerUseWithoutFence(params);
|
|
278
305
|
return await withLeasedCodexAppServerClientStartSelectionRetry({
|
|
279
306
|
lease,
|
|
@@ -340,18 +367,16 @@ async function inspectCodexComputerUse(params) {
|
|
|
340
367
|
});
|
|
341
368
|
let releaseFenceOnReturn = true;
|
|
342
369
|
try {
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
await client.closeAndRunAfterExit(release, "Computer Use config mutation");
|
|
352
|
-
}
|
|
353
|
-
throw error;
|
|
370
|
+
return await inspectCodexComputerUseWithoutFence({
|
|
371
|
+
...inspectionParams,
|
|
372
|
+
releaseNativeConfigFence: release
|
|
373
|
+
});
|
|
374
|
+
} catch (error) {
|
|
375
|
+
if (client && (isCodexAppServerIndeterminateRequestCancellationError(error) || isCodexAppServerIndeterminateTransportError(error) || isCodexAppServerConnectionClosedError(error))) {
|
|
376
|
+
releaseFenceOnReturn = false;
|
|
377
|
+
await client.closeAndRunAfterExit(release, "Computer Use config mutation");
|
|
354
378
|
}
|
|
379
|
+
throw error;
|
|
355
380
|
} finally {
|
|
356
381
|
if (releaseFenceOnReturn) release();
|
|
357
382
|
}
|
|
@@ -361,38 +386,59 @@ async function inspectCodexComputerUse(params) {
|
|
|
361
386
|
}
|
|
362
387
|
async function inspectCodexComputerUseWithoutFence(params) {
|
|
363
388
|
const request = createComputerUseRequest(params);
|
|
364
|
-
if (params.
|
|
389
|
+
if (params.installMode !== "none") {
|
|
365
390
|
if (!resolveCodexComputerUseConfig({ pluginConfig: params.pluginConfig }).autoInstall) await prepareExplicitManagedComputerUseInstall(params);
|
|
366
|
-
await request("experimentalFeature/enablement/set", { enablement: { plugins: true } });
|
|
367
391
|
}
|
|
368
|
-
const managedMarketplacePath = await resolveClientManagedBundledMarketplacePath(params.client, params.agentDir);
|
|
392
|
+
const managedMarketplacePath = await resolveClientManagedBundledMarketplacePath(params.client?.getRuntimeIdentity()?.codexHome, params.agentDir);
|
|
369
393
|
const managedCodexHome = managedMarketplacePath ? params.client?.getRuntimeIdentity()?.codexHome : void 0;
|
|
370
|
-
|
|
394
|
+
let computerUseConfig = await resolveManagedCodexComputerUseConfig(params.computerUseConfig, managedMarketplacePath);
|
|
395
|
+
const nativeDisableStatus = computerUseConfig !== params.computerUseConfig && params.installMode !== "explicit" ? unavailableStatus(params.computerUseConfig, "plugin_disabled", "Computer Use is disabled by native plugin policy. Run /codex computer-use install for explicit recovery, or enable computer-use@openai-bundled in native Codex config for automatic replacement.") : void 0;
|
|
396
|
+
if (computerUseConfig !== params.computerUseConfig) {
|
|
397
|
+
const nativeConfig = await request("config/read", { includeLayers: false });
|
|
398
|
+
if (nativeDisableStatus && isLegacyCodexComputerUsePluginDisabled(nativeConfig.config)) return nativeDisableStatus;
|
|
399
|
+
if (hasLegacyCodexComputerUseMcpPolicy(nativeConfig.config)) computerUseConfig = params.computerUseConfig;
|
|
400
|
+
}
|
|
401
|
+
if (params.installMode !== "none") await request("experimentalFeature/enablement/set", { enablement: { plugins: true } });
|
|
402
|
+
if (params.installMode !== "none" && managedCodexHome) await assertNotSymlink(path.join(managedCodexHome, "config.toml"), "Codex config");
|
|
371
403
|
const marketplace = await resolveMarketplaceRef({
|
|
372
404
|
request,
|
|
373
|
-
config:
|
|
374
|
-
allowAdd: params.
|
|
405
|
+
config: computerUseConfig,
|
|
406
|
+
allowAdd: params.installMode !== "none",
|
|
375
407
|
signal: params.signal,
|
|
376
408
|
defaultBundledMarketplacePath: params.defaultBundledMarketplacePath ?? managedMarketplacePath,
|
|
377
409
|
defaultBundledMarketplacePathCandidates: params.defaultBundledMarketplacePathCandidates,
|
|
378
410
|
managedCodexHome
|
|
379
411
|
});
|
|
380
|
-
if (!marketplace.marketplace) return unavailableStatus(
|
|
412
|
+
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.`);
|
|
381
413
|
const pluginInspection = await ensureComputerUsePlugin({
|
|
382
414
|
request,
|
|
383
|
-
config:
|
|
415
|
+
config: computerUseConfig,
|
|
384
416
|
marketplace: marketplace.marketplace,
|
|
385
|
-
|
|
417
|
+
nativeDisableStatus,
|
|
418
|
+
installPlugin: params.installMode !== "none"
|
|
386
419
|
});
|
|
387
420
|
if (!pluginInspection.ok) return pluginInspection.status;
|
|
421
|
+
if (params.refreshSharedCache && computerUseConfig !== params.computerUseConfig && managedCodexHome && managedMarketplacePath && params.agentDir && params.client) {
|
|
422
|
+
const client = params.client;
|
|
423
|
+
await ensureCodexComputerUseSharedPluginCache({
|
|
424
|
+
codexHome: managedCodexHome,
|
|
425
|
+
ownershipRoot: params.agentDir,
|
|
426
|
+
bundledMarketplacePath: managedMarketplacePath,
|
|
427
|
+
config: computerUseConfig,
|
|
428
|
+
assertCurrent: () => {
|
|
429
|
+
params.assertCurrent?.();
|
|
430
|
+
assertCodexAppServerClientStartSelectionCurrent({ client });
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
}
|
|
388
434
|
return await readComputerUseTools({
|
|
389
435
|
request,
|
|
390
436
|
client: params.client,
|
|
391
437
|
signal: params.signal,
|
|
392
|
-
config:
|
|
438
|
+
config: computerUseConfig,
|
|
393
439
|
plugin: pluginInspection.plugin,
|
|
394
440
|
runLiveTest: params.runLiveTest,
|
|
395
|
-
installPlugin: params.
|
|
441
|
+
installPlugin: params.installMode !== "none",
|
|
396
442
|
releaseNativeConfigFence: params.releaseNativeConfigFence
|
|
397
443
|
});
|
|
398
444
|
}
|
|
@@ -431,7 +477,7 @@ async function resolveExplicitManagedComputerUseInstallContext(params) {
|
|
|
431
477
|
const desktopGeneration = readCodexAppServerClientDesktopGeneration(params.client);
|
|
432
478
|
if (!desktopGeneration) throw new Error("Codex Computer Use install requires a desktop-generation-bound client; reconnect and retry.");
|
|
433
479
|
const expectedHome = resolveCodexAppServerHomeDir(params.agentDir);
|
|
434
|
-
const [actualRealHome, expectedRealHome] = await Promise.all([fs
|
|
480
|
+
const [actualRealHome, expectedRealHome] = await Promise.all([fs.realpath(codexHome).catch(() => void 0), fs.realpath(expectedHome).catch(() => void 0)]);
|
|
435
481
|
if (!actualRealHome || actualRealHome !== expectedRealHome) return;
|
|
436
482
|
return {
|
|
437
483
|
client: params.client,
|
|
@@ -441,29 +487,18 @@ async function resolveExplicitManagedComputerUseInstallContext(params) {
|
|
|
441
487
|
desktopGeneration
|
|
442
488
|
};
|
|
443
489
|
}
|
|
444
|
-
async function resolveClientManagedBundledMarketplacePath(client, agentDir) {
|
|
445
|
-
const codexHome = client?.getRuntimeIdentity()?.codexHome;
|
|
446
|
-
if (!codexHome || !agentDir) return;
|
|
447
|
-
const [actualRealHome, expectedRealHome] = await Promise.all([fs$1.realpath(codexHome).catch(() => void 0), fs$1.realpath(resolveCodexAppServerHomeDir(agentDir)).catch(() => void 0)]);
|
|
448
|
-
if (!actualRealHome || actualRealHome !== expectedRealHome) return;
|
|
449
|
-
const managedPath = resolveCodexManagedBundledMarketplacePath(codexHome);
|
|
450
|
-
return existsSync(managedPath) ? managedPath : void 0;
|
|
451
|
-
}
|
|
452
490
|
async function ensureComputerUsePlugin(params) {
|
|
453
491
|
let plugin = await readComputerUsePlugin(params.request, params.marketplace, params.config.pluginName);
|
|
454
|
-
if (
|
|
455
|
-
|
|
492
|
+
if (params.nativeDisableStatus) {
|
|
493
|
+
const nativeConfig = await params.request("config/read", { includeLayers: false });
|
|
494
|
+
if (isLegacyCodexComputerUsePluginDisabled(nativeConfig.config)) return {
|
|
456
495
|
ok: false,
|
|
457
|
-
status:
|
|
458
|
-
config: params.config,
|
|
459
|
-
plugin,
|
|
460
|
-
tools: [],
|
|
461
|
-
reason: pluginSetupReason(plugin),
|
|
462
|
-
message: pluginSetupMessage(params.config, plugin)
|
|
463
|
-
})
|
|
496
|
+
status: params.nativeDisableStatus
|
|
464
497
|
};
|
|
498
|
+
}
|
|
499
|
+
if (params.installPlugin && (!plugin.summary.installed || !plugin.summary.enabled)) {
|
|
465
500
|
await params.request("plugin/install", pluginRequestParams(params.marketplace, params.config.pluginName));
|
|
466
|
-
await
|
|
501
|
+
await params.request("config/mcpServer/reload", void 0);
|
|
467
502
|
plugin = await readComputerUsePlugin(params.request, params.marketplace, params.config.pluginName);
|
|
468
503
|
}
|
|
469
504
|
if (!plugin.summary.installed || !plugin.summary.enabled) return {
|
|
@@ -472,8 +507,8 @@ async function ensureComputerUsePlugin(params) {
|
|
|
472
507
|
config: params.config,
|
|
473
508
|
plugin,
|
|
474
509
|
tools: [],
|
|
475
|
-
reason:
|
|
476
|
-
message:
|
|
510
|
+
reason: plugin.summary.installed ? "plugin_disabled" : "plugin_not_installed",
|
|
511
|
+
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."
|
|
477
512
|
})
|
|
478
513
|
};
|
|
479
514
|
return {
|
|
@@ -485,7 +520,7 @@ async function readComputerUseTools(params) {
|
|
|
485
520
|
let server = await readMcpServerStatus(params.request, params.config.mcpServerName);
|
|
486
521
|
let tools = Object.keys(server?.tools ?? {}).toSorted();
|
|
487
522
|
if ((!server || tools.length === 0) && params.installPlugin) {
|
|
488
|
-
await
|
|
523
|
+
await params.request("config/mcpServer/reload", void 0);
|
|
489
524
|
server = await readMcpServerStatus(params.request, params.config.mcpServerName);
|
|
490
525
|
tools = Object.keys(server?.tools ?? {}).toSorted();
|
|
491
526
|
}
|
|
@@ -605,11 +640,6 @@ function blockUnsafeAutoInstallStatus(config) {
|
|
|
605
640
|
function shouldAddBundledComputerUseMarketplace(params) {
|
|
606
641
|
return params.allowAdd && !params.config.marketplaceSource && !params.config.marketplacePath && !params.config.marketplaceName && Boolean(resolveBundledComputerUseMarketplacePath(params));
|
|
607
642
|
}
|
|
608
|
-
function resolveBundledComputerUseMarketplacePath(params) {
|
|
609
|
-
if (params.defaultBundledMarketplacePath) return existsSync(params.defaultBundledMarketplacePath) ? params.defaultBundledMarketplacePath : void 0;
|
|
610
|
-
if (!params.defaultBundledMarketplacePathCandidates) return;
|
|
611
|
-
return resolveFirstExistingMacOSDesktopCodexBundledMarketplacePath({ candidates: params.defaultBundledMarketplacePathCandidates });
|
|
612
|
-
}
|
|
613
643
|
function findComputerUseMarketplaces(listed, pluginName) {
|
|
614
644
|
return listed.marketplaces.flatMap((marketplace) => {
|
|
615
645
|
const plugin = marketplace.plugins.find((candidate) => candidate.name === pluginName || candidate.id === pluginName || candidate.id === `${pluginName}@${marketplace.name}`);
|
|
@@ -674,9 +704,6 @@ async function readMcpServerStatus(request, serverName) {
|
|
|
674
704
|
cursor = response.nextCursor;
|
|
675
705
|
} while (cursor);
|
|
676
706
|
}
|
|
677
|
-
async function reloadMcpServers(request) {
|
|
678
|
-
await request("config/mcpServer/reload", void 0);
|
|
679
|
-
}
|
|
680
707
|
function pluginRequestParams(marketplace, pluginName) {
|
|
681
708
|
return marketplace.kind === "local" ? {
|
|
682
709
|
marketplacePath: marketplace.path,
|
|
@@ -686,13 +713,6 @@ function pluginRequestParams(marketplace, pluginName) {
|
|
|
686
713
|
pluginName: marketplace.remotePluginId
|
|
687
714
|
};
|
|
688
715
|
}
|
|
689
|
-
function pluginSetupReason(plugin) {
|
|
690
|
-
return plugin.summary.installed ? "plugin_disabled" : "plugin_not_installed";
|
|
691
|
-
}
|
|
692
|
-
function pluginSetupMessage(config, plugin) {
|
|
693
|
-
if (!plugin.summary.installed) return "Computer Use is available but not installed. Run /codex computer-use install or enable computerUse.autoInstall.";
|
|
694
|
-
return `Computer Use is installed, but the ${config.pluginName} plugin is disabled. Run /codex computer-use install or enable computerUse.autoInstall to re-enable it.`;
|
|
695
|
-
}
|
|
696
716
|
function statusFromPlugin(params) {
|
|
697
717
|
return {
|
|
698
718
|
enabled: true,
|
|
@@ -709,99 +729,26 @@ function statusFromPlugin(params) {
|
|
|
709
729
|
installation: installationStatusFromPlugin(params.plugin, params.message),
|
|
710
730
|
exposure: exposureStatusFromTools(params.config, params.tools),
|
|
711
731
|
liveTest: skippedLiveTestStatus(params.config, "Computer Use live test was not run."),
|
|
712
|
-
warnings:
|
|
732
|
+
warnings: params.plugin.summary.source?.type === "remote" ? ["Computer Use plugin is resolved from a remote marketplace; live local bundles are preferred."] : [],
|
|
713
733
|
message: params.message
|
|
714
734
|
};
|
|
715
735
|
}
|
|
716
|
-
function disabledStatus(config) {
|
|
717
|
-
return {
|
|
718
|
-
enabled: false,
|
|
719
|
-
ready: false,
|
|
720
|
-
reason: "disabled",
|
|
721
|
-
installed: false,
|
|
722
|
-
pluginEnabled: false,
|
|
723
|
-
mcpServerAvailable: false,
|
|
724
|
-
pluginName: config.pluginName,
|
|
725
|
-
mcpServerName: config.mcpServerName,
|
|
726
|
-
tools: [],
|
|
727
|
-
installation: {
|
|
728
|
-
status: "disabled",
|
|
729
|
-
ok: false,
|
|
730
|
-
message: "Computer Use is disabled."
|
|
731
|
-
},
|
|
732
|
-
exposure: {
|
|
733
|
-
status: "skipped",
|
|
734
|
-
ok: false,
|
|
735
|
-
message: "MCP exposure was not checked because Computer Use is disabled."
|
|
736
|
-
},
|
|
737
|
-
liveTest: skippedLiveTestStatus(config, "Computer Use live test was not run because Computer Use is disabled."),
|
|
738
|
-
warnings: [],
|
|
739
|
-
message: "Computer Use is disabled."
|
|
740
|
-
};
|
|
741
|
-
}
|
|
742
|
-
function unavailableStatus(config, reason, message) {
|
|
743
|
-
return {
|
|
744
|
-
enabled: true,
|
|
745
|
-
ready: false,
|
|
746
|
-
reason,
|
|
747
|
-
installed: false,
|
|
748
|
-
pluginEnabled: false,
|
|
749
|
-
mcpServerAvailable: false,
|
|
750
|
-
pluginName: config.pluginName,
|
|
751
|
-
mcpServerName: config.mcpServerName,
|
|
752
|
-
...config.marketplaceName ? { marketplaceName: config.marketplaceName } : {},
|
|
753
|
-
...config.marketplacePath ? { marketplacePath: config.marketplacePath } : {},
|
|
754
|
-
tools: [],
|
|
755
|
-
installation: {
|
|
756
|
-
status: reason === "marketplace_missing" ? "marketplace_missing" : "not_installed",
|
|
757
|
-
ok: false,
|
|
758
|
-
message
|
|
759
|
-
},
|
|
760
|
-
exposure: {
|
|
761
|
-
status: "skipped",
|
|
762
|
-
ok: false,
|
|
763
|
-
message: "MCP exposure was not checked because Computer Use installation is not ready."
|
|
764
|
-
},
|
|
765
|
-
liveTest: skippedLiveTestStatus(config, "Computer Use live test was not run because installation is not ready."),
|
|
766
|
-
warnings: [],
|
|
767
|
-
message
|
|
768
|
-
};
|
|
769
|
-
}
|
|
770
736
|
function installationStatusFromPlugin(plugin, message) {
|
|
771
|
-
|
|
772
|
-
status: "not_installed",
|
|
773
|
-
ok: false,
|
|
774
|
-
message
|
|
775
|
-
};
|
|
776
|
-
if (!plugin.summary.enabled) return {
|
|
777
|
-
status: "installed_disabled",
|
|
778
|
-
ok: false,
|
|
779
|
-
message
|
|
780
|
-
};
|
|
737
|
+
const installed = plugin.summary.installed && plugin.summary.enabled;
|
|
781
738
|
return {
|
|
782
|
-
status: "installed",
|
|
783
|
-
ok:
|
|
784
|
-
message: "Computer Use plugin is installed and enabled."
|
|
739
|
+
status: !plugin.summary.installed ? "not_installed" : installed ? "installed" : "installed_disabled",
|
|
740
|
+
ok: installed,
|
|
741
|
+
message: installed ? "Computer Use plugin is installed and enabled." : message
|
|
785
742
|
};
|
|
786
743
|
}
|
|
787
744
|
function exposureStatusFromTools(config, tools) {
|
|
788
|
-
|
|
789
|
-
status: "missing",
|
|
790
|
-
ok: false,
|
|
791
|
-
message: `Computer Use MCP server ${config.mcpServerName} is not exposed.`
|
|
792
|
-
};
|
|
745
|
+
const available = tools.length > 0;
|
|
793
746
|
return {
|
|
794
|
-
status: "available",
|
|
795
|
-
ok:
|
|
796
|
-
message: `Computer Use MCP server ${config.mcpServerName} exposes ${tools.length} tools.`
|
|
747
|
+
status: available ? "available" : "missing",
|
|
748
|
+
ok: available,
|
|
749
|
+
message: available ? `Computer Use MCP server ${config.mcpServerName} exposes ${tools.length} tools.` : `Computer Use MCP server ${config.mcpServerName} is not exposed.`
|
|
797
750
|
};
|
|
798
751
|
}
|
|
799
|
-
function pluginWarnings(plugin) {
|
|
800
|
-
const warnings = [];
|
|
801
|
-
const source = plugin.summary.source;
|
|
802
|
-
if (source && typeof source === "object" && "type" in source && source.type === "remote") warnings.push("Computer Use plugin is resolved from a remote marketplace; live local bundles are preferred.");
|
|
803
|
-
return warnings;
|
|
804
|
-
}
|
|
805
752
|
function resolveComputerUseConfig(params) {
|
|
806
753
|
const overrides = params.forceEnable ? {
|
|
807
754
|
...params.overrides,
|
|
@@ -815,7 +762,6 @@ function resolveComputerUseConfig(params) {
|
|
|
815
762
|
//#endregion
|
|
816
763
|
//#region extensions/codex/src/app-server/plugin-metadata-cache.ts
|
|
817
764
|
const CODEX_PLUGIN_METADATA_CACHE_TTL_MS = 36e5;
|
|
818
|
-
/** Process-local plugin metadata cache with coalesced loads per query. */
|
|
819
765
|
var CodexPluginMetadataCache = class {
|
|
820
766
|
constructor(nowMs = Date.now) {
|
|
821
767
|
this.nowMs = nowMs;
|
|
@@ -824,7 +770,6 @@ var CodexPluginMetadataCache = class {
|
|
|
824
770
|
this.generations = /* @__PURE__ */ new Map();
|
|
825
771
|
this.clearGeneration = 0;
|
|
826
772
|
}
|
|
827
|
-
/** Returns a fresh cached snapshot without issuing a request. */
|
|
828
773
|
read(appCacheKey, queryKind, requestParams, catalogScope) {
|
|
829
774
|
const entryKey = buildMetadataCacheEntryKey(appCacheKey, queryKind, requestParams, catalogScope);
|
|
830
775
|
const entry = this.entries.get(entryKey);
|
|
@@ -857,7 +802,7 @@ var CodexPluginMetadataCache = class {
|
|
|
857
802
|
queryKind: params.queryKind,
|
|
858
803
|
response
|
|
859
804
|
};
|
|
860
|
-
if (generation === (this.generations.get(params.appCacheKey) ?? 0) && clearGeneration === this.clearGeneration &&
|
|
805
|
+
if (generation === (this.generations.get(params.appCacheKey) ?? 0) && clearGeneration === this.clearGeneration && response.marketplaceLoadErrors.length === 0 && (params.cacheable?.(response) ?? true)) this.entries.set(entryKey, {
|
|
861
806
|
snapshot,
|
|
862
807
|
expiresAtMs: this.nowMs() + CODEX_PLUGIN_METADATA_CACHE_TTL_MS
|
|
863
808
|
});
|
|
@@ -873,7 +818,6 @@ var CodexPluginMetadataCache = class {
|
|
|
873
818
|
if (this.inFlight.get(entryKey)?.promise === promise) this.inFlight.delete(entryKey);
|
|
874
819
|
}
|
|
875
820
|
}
|
|
876
|
-
/** Invalidates all plugin metadata queries for one app-server runtime. */
|
|
877
821
|
invalidate(appCacheKey) {
|
|
878
822
|
this.generations.set(appCacheKey, (this.generations.get(appCacheKey) ?? 0) + 1);
|
|
879
823
|
for (const [entryKey, entry] of this.entries) if (entry.snapshot.appCacheKey === appCacheKey) this.entries.delete(entryKey);
|
|
@@ -887,11 +831,7 @@ var CodexPluginMetadataCache = class {
|
|
|
887
831
|
this.inFlight.clear();
|
|
888
832
|
}
|
|
889
833
|
};
|
|
890
|
-
/** Shared plugin metadata cache used by Codex app-server runtime paths. */
|
|
891
834
|
const defaultCodexPluginMetadataCache = new CodexPluginMetadataCache();
|
|
892
|
-
function hasMarketplaceLoadErrors(response) {
|
|
893
|
-
return response.marketplaceLoadErrors.length > 0;
|
|
894
|
-
}
|
|
895
835
|
function buildMetadataCacheEntryKey(appCacheKey, queryKind, requestParams, catalogScope) {
|
|
896
836
|
if (queryKind !== "installed") {
|
|
897
837
|
const listParams = requestParams;
|
|
@@ -913,4 +853,4 @@ function buildMetadataCacheEntryKey(appCacheKey, queryKind, requestParams, catal
|
|
|
913
853
|
]);
|
|
914
854
|
}
|
|
915
855
|
//#endregion
|
|
916
|
-
export {
|
|
856
|
+
export { createComputerUseRequest as a, readCodexComputerUseStatus as i, ensureCodexComputerUse as n, runCodexComputerUseLiveTest as o, installCodexComputerUse as r, defaultCodexPluginMetadataCache as t };
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
+
import { t as isOnlyMigrationKind } from "./scope-DOC1Xjc8.mjs";
|
|
1
2
|
//#region extensions/codex/src/migration/provider.ts
|
|
2
|
-
function isMemoryOnlyMigration(ctx) {
|
|
3
|
-
return Boolean(ctx.itemKinds && ctx.itemKinds.length > 0 && ctx.itemKinds.every((kind) => kind === "memory"));
|
|
4
|
-
}
|
|
5
|
-
function isAuthOnlyMigration(ctx) {
|
|
6
|
-
return Boolean(ctx.itemKinds && ctx.itemKinds.length > 0 && ctx.itemKinds.every((kind) => kind === "auth"));
|
|
7
|
-
}
|
|
8
3
|
function buildCodexMigrationProvider(params = {}) {
|
|
9
4
|
return {
|
|
10
5
|
id: "codex",
|
|
@@ -16,13 +11,15 @@ function buildCodexMigrationProvider(params = {}) {
|
|
|
16
11
|
].join(" "),
|
|
17
12
|
supportedItemKinds: ["memory", "auth"],
|
|
18
13
|
async detect(ctx) {
|
|
19
|
-
const { discoverCodexSource, hasCodexSource } = await import("./source-
|
|
14
|
+
const { discoverCodexSource, hasCodexSource } = await import("./source-CS_7GFJZ.mjs").then((n) => n.a);
|
|
15
|
+
const memoryOnly = isOnlyMigrationKind(ctx, "memory");
|
|
16
|
+
const authOnly = isOnlyMigrationKind(ctx, "auth");
|
|
20
17
|
const source = await discoverCodexSource({
|
|
21
18
|
input: ctx.source,
|
|
22
|
-
memoryOnly
|
|
23
|
-
authOnly
|
|
19
|
+
memoryOnly,
|
|
20
|
+
authOnly
|
|
24
21
|
});
|
|
25
|
-
const found =
|
|
22
|
+
const found = memoryOnly ? source.memoryFiles.length > 0 : authOnly ? Boolean(source.authPath) : hasCodexSource(source);
|
|
26
23
|
return {
|
|
27
24
|
found,
|
|
28
25
|
source: source.root,
|
|
@@ -32,16 +29,16 @@ function buildCodexMigrationProvider(params = {}) {
|
|
|
32
29
|
};
|
|
33
30
|
},
|
|
34
31
|
async plan(ctx) {
|
|
35
|
-
const { buildCodexMigrationPlan } = await import("./plan-
|
|
32
|
+
const { buildCodexMigrationPlan } = await import("./plan-Y-QIvrKB.mjs");
|
|
36
33
|
return buildCodexMigrationPlan(ctx);
|
|
37
34
|
},
|
|
38
35
|
deferredApply: { retrySafe: true },
|
|
39
36
|
prepareApply(ctx) {
|
|
40
|
-
if (
|
|
41
|
-
return import("./apply-
|
|
37
|
+
if (isOnlyMigrationKind(ctx, "memory") || isOnlyMigrationKind(ctx, "auth")) return;
|
|
38
|
+
return import("./apply-D3GcSoSa.mjs").then(({ prepareTargetCodexAppServer }) => prepareTargetCodexAppServer(ctx));
|
|
42
39
|
},
|
|
43
40
|
async apply(ctx, plan) {
|
|
44
|
-
const { applyCodexMigrationPlan } = await import("./apply-
|
|
41
|
+
const { applyCodexMigrationPlan } = await import("./apply-D3GcSoSa.mjs");
|
|
45
42
|
return await applyCodexMigrationPlan({
|
|
46
43
|
ctx,
|
|
47
44
|
plan,
|
package/dist/.setup/{provider-capabilities-BfE88FZ5.mjs → provider-capabilities-CAxoF-X1.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-
|
|
2
|
-
import {
|
|
1
|
+
import { h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-DqyTMYug.mjs";
|
|
2
|
+
import { dt as normalizeCodexDynamicToolName } from "./thread-requests-B_bRnMGN.mjs";
|
|
3
3
|
import { pinExecToolTarget } from "openclaw/plugin-sdk/codex-mcp-projection";
|
|
4
4
|
import { loadNodeExecAvailability } from "openclaw/plugin-sdk/node-selection-runtime";
|
|
5
5
|
//#region extensions/codex/src/app-server/shell-dynamic-tools.ts
|
|
@@ -7,7 +7,6 @@ const CODEX_NODE_EXEC_DYNAMIC_TOOL_NAME = "node_exec";
|
|
|
7
7
|
const CODEX_GATEWAY_EXEC_DYNAMIC_TOOL_NAME = "gateway_exec";
|
|
8
8
|
const CODEX_GATEWAY_PROCESS_DYNAMIC_TOOL_NAME = "gateway_process";
|
|
9
9
|
const PROCESS_FOLLOWUP_TEXT = "Use process (list/poll/log/write/send-keys/submit/paste/kill/clear/remove) for follow-up.";
|
|
10
|
-
/** Returns true when plugin config explicitly removes any named dynamic tool. */
|
|
11
10
|
function isCodexDynamicToolExcluded(config, names) {
|
|
12
11
|
const normalizedNames = new Set(names.map((name) => normalizeCodexDynamicToolName(name)));
|
|
13
12
|
return (config.codexDynamicToolsExclude ?? []).some((name) => normalizedNames.has(normalizeCodexDynamicToolName(name)));
|
|
@@ -21,18 +20,11 @@ async function createNodeExecAliasDynamicTool(execTool, node, discoverySignal, a
|
|
|
21
20
|
host: "node",
|
|
22
21
|
...pinnedNode ? { node: pinnedNode } : {}
|
|
23
22
|
});
|
|
24
|
-
const execute = async (toolCallId, args, signal, onUpdate) => {
|
|
25
|
-
const result = await pinnedTool.execute(toolCallId, args, signal, onUpdate);
|
|
26
|
-
return {
|
|
27
|
-
...result,
|
|
28
|
-
content: result.content.map((item) => item.type === "text" ? Object.assign({}, item, { text: item.text.replace(PROCESS_FOLLOWUP_TEXT, "Remote-node background follow-up is unavailable. Wait for the command to complete.") }) : item)
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
23
|
return {
|
|
32
24
|
...pinnedTool,
|
|
33
25
|
name: CODEX_NODE_EXEC_DYNAMIC_TOOL_NAME,
|
|
34
26
|
description: pinnedNode ? "Run a shell command to completion on the OpenClaw configured remote node for this session. This tool always uses OpenClaw host=node internally and follows the existing node exec approval and allowlist policy. Remote-node background follow-up is unavailable. Use Codex's native shell for local app-server work when it is available." : "Run a shell command to completion on an OpenClaw remote node. The sole connected node that can execute commands is selected automatically; select by name or id when several can. This tool always uses OpenClaw host=node internally and follows the existing node exec approval and allowlist policy. Remote-node background follow-up is unavailable. Use Codex's native shell for local app-server work when it is available.",
|
|
35
|
-
execute
|
|
27
|
+
execute: withProcessFollowupText(pinnedTool, "Remote-node background follow-up is unavailable. Wait for the command to complete.")
|
|
36
28
|
};
|
|
37
29
|
}
|
|
38
30
|
function createGatewayExecProjection(createProjection, execTool, params) {
|
|
@@ -56,13 +48,16 @@ function createSandboxExecProjection(execTool) {
|
|
|
56
48
|
...execTool,
|
|
57
49
|
name: "sandbox_exec",
|
|
58
50
|
description: "Run a shell command through OpenClaw's configured sandbox backend for this session. Use when OpenClaw sandboxing is active or when a command must execute in the sandbox backend, such as an SSH-backed sandbox or Docker container-path bind layout. Use Codex's native shell only when no OpenClaw sandbox is active and native Code Mode is available.",
|
|
59
|
-
execute:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
51
|
+
execute: withProcessFollowupText(execTool, "Use sandbox_process (list/poll/log/write/send-keys/submit/paste/kill/clear/remove) for follow-up.")
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function withProcessFollowupText(tool, followupText) {
|
|
55
|
+
return async (toolCallId, args, signal, onUpdate) => {
|
|
56
|
+
const result = await tool.execute(toolCallId, args, signal, onUpdate);
|
|
57
|
+
return {
|
|
58
|
+
...result,
|
|
59
|
+
content: result.content.map((item) => item.type === "text" ? Object.assign({}, item, { text: item.text.replace(PROCESS_FOLLOWUP_TEXT, followupText) }) : item)
|
|
60
|
+
};
|
|
66
61
|
};
|
|
67
62
|
}
|
|
68
63
|
function createSandboxProcessProjection(processTool) {
|