@openclaw/codex 2026.9.7 → 2026.10.1-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/README.md +8 -0
- package/dist/.setup/{account-usage-runtime-DFhbh1zz.mjs → account-usage-runtime-C4GFoef_.mjs} +5 -5
- package/dist/.setup/app-server-policy-Bg4FZw1f.mjs +23 -0
- package/dist/.setup/{apply-D3GcSoSa.mjs → apply-D02fLpgN.mjs} +48 -39
- package/dist/.setup/attempt-client-cleanup-yLjGwbwT.mjs +155 -0
- package/dist/.setup/{attempt-workspace-context-C5HigshI.mjs → attempt-workspace-context-CbSzT6V2.mjs} +11 -15
- package/dist/.setup/{auth-binding-BLWz7stm.mjs → auth-binding-BoMwpuPN.mjs} +17 -25
- package/dist/.setup/{auth-cache-key-Dbvq-QgB.mjs → auth-cache-key-CEd9QlIs.mjs} +244 -82
- package/dist/.setup/{auth-profile-B0okYl2D.mjs → auth-profile-CgHQ8Vot.mjs} +2 -1
- package/dist/.setup/{auth-profile-selection-DFu9e167.mjs → auth-profile-selection-hr8ocLtz.mjs} +5 -7
- package/dist/.setup/{binding-connection-DTtN1KrX.mjs → binding-connection-C-08ez1w.mjs} +2 -2
- package/dist/.setup/{binding-connection.runtime-6TpgD1M6.mjs → binding-connection.runtime-Dn2p-fdy.mjs} +3 -3
- package/dist/.setup/{bounded-turn-CbjoN2OW.mjs → bounded-turn-DlHlNTyS.mjs} +14 -13
- package/dist/.setup/{bounded-turn-isolation-B8K_ylqk.mjs → bounded-turn-isolation-DklXNk3k.mjs} +4 -4
- package/dist/.setup/{build-state-Da1_z0kd.mjs → build-state-CIi3Ckqu.mjs} +1 -1
- package/dist/.setup/{capabilities-B3WEZl4e.mjs → capabilities-kQntafj_.mjs} +1 -1
- package/dist/.setup/{client-N0JpgSzF.mjs → client-CBzEVDyb.mjs} +438 -160
- package/dist/.setup/{client-catalog-response-5HHLdcde.mjs → client-catalog-response-CmvIiDdj.mjs} +57 -25
- package/dist/.setup/command-authorization-AikPDtcc.mjs +15 -0
- package/dist/.setup/{command-dispatch-BeAoaovI.mjs → command-dispatch-BE_RdMou.mjs} +3 -3
- package/dist/.setup/{command-formatters-R3ckE3Co.mjs → command-formatters-DV3DHhdr.mjs} +7 -5
- package/dist/.setup/{command-handlers-ylTMS00z.mjs → command-handlers-DNoRq5Ps.mjs} +82 -144
- package/dist/.setup/{command-rpc-CGJGUQ6Y.mjs → command-rpc-B6xsq2dB.mjs} +23 -31
- package/dist/.setup/{compact-C2WamavS.mjs → compact-BLSAd-ru.mjs} +117 -65
- package/dist/.setup/{plugin-metadata-cache-DsjsL1dr.mjs → computer-use-DpolvQHw.mjs} +66 -203
- package/dist/.setup/{config-DKhXquav.mjs → config-0Gxk3_eq.mjs} +5 -6
- package/dist/.setup/{config-options-CzyWLTJt.mjs → config-options-HG_Rr3W_.mjs} +13 -23
- package/dist/.setup/{config-parsing-b088LyhT.mjs → config-parsing-BQq-CHTF.mjs} +41 -4
- package/dist/.setup/{config-runtime-C0NbLms1.mjs → config-runtime-cUYrqu_a.mjs} +2 -2
- package/dist/.setup/{config-security-CE-FcGw9.mjs → config-security-KAPScztc.mjs} +20 -36
- package/dist/.setup/{context-engine-projection-PezSESth.mjs → context-engine-projection-CsgYSQhW.mjs} +11 -14
- package/dist/.setup/{conversation-binding-3Min8qvP.mjs → conversation-binding-CgSSD1Qz.mjs} +36 -48
- package/dist/.setup/{conversation-binding-data-C746z5Pn.mjs → conversation-binding-data-DJ4ix-W5.mjs} +1 -1
- package/dist/.setup/{conversation-control-CEP8X5JC.mjs → conversation-control-tCg763cI.mjs} +19 -21
- package/dist/.setup/{cyber-failover-XV0nNRZu.mjs → cyber-failover-Bb1J6hS1.mjs} +1 -1
- package/dist/.setup/{cyber-failover-notice-RNpGpTyP.mjs → cyber-failover-notice-XR03ef31.mjs} +1 -1
- package/dist/.setup/doctor-start-options-DPW9JxIE.mjs +63 -0
- package/dist/.setup/dynamic-tool-build-CVrx02cH.mjs +463 -0
- package/dist/.setup/{dynamic-tools-DzlsLUuS.mjs → dynamic-tools-DdsymYGQ.mjs} +238 -878
- package/dist/.setup/{effective-mcp-catalog-CxUtC-xG.mjs → effective-mcp-catalog-BysTBZCW.mjs} +83 -11
- package/dist/.setup/{elicitation-input-DPoK8F7w.mjs → elicitation-input-r9axtppm.mjs} +4 -2
- package/dist/.setup/{ephemeral-turn-CDsPJOa2.mjs → ephemeral-turn-oPKxs3ia.mjs} +2 -2
- package/dist/.setup/{event-projector-assistant-message-CigreO4K.mjs → event-projector-assistant-message-YCL2wspu.mjs} +2 -2
- package/dist/.setup/{event-projector-values-DJSz8BTk.mjs → event-projector-values-DTqZHizf.mjs} +2 -12
- package/dist/.setup/{inference-dispatch-CMZtjQyz.mjs → inference-dispatch-B5UKEUyC.mjs} +12 -21
- package/dist/.setup/{inference-proxy-DhcXOgUE.mjs → inference-proxy-DUO5E2QQ.mjs} +6 -5
- package/dist/.setup/{isolated-completion-Dm3PzxJk.mjs → isolated-completion-D5gbKm6k.mjs} +8 -8
- package/dist/.setup/{managed-binary-kiWRhNRE.mjs → managed-binary-C1VFoVPf.mjs} +31 -38
- package/dist/.setup/mcp-app-session-preparation-CdqsXwZX.mjs +223 -0
- package/dist/.setup/mcp-tool-metadata-j10HhfTC.mjs +43 -0
- package/dist/.setup/{model-catalog-PAuZgJC6.mjs → model-catalog-Dj_uvusa.mjs} +7 -7
- package/dist/.setup/{models-DHXZtVVk.mjs → models-Du_i5G_t.mjs} +10 -7
- package/dist/.setup/{native-auth-CuG53tu4.mjs → native-auth-Cjb9y7IZ.mjs} +5 -6
- package/dist/.setup/{native-execution-policy-BxZJy5mP.mjs → native-execution-policy-ClzpdG3D.mjs} +1 -12
- package/dist/.setup/native-mcp-app-DV7VbfzF.mjs +310 -0
- package/dist/.setup/{native-subagent-monitor-Dpsmf2wz.mjs → native-subagent-monitor-CCEFO6qK.mjs} +235 -318
- package/dist/.setup/{native-subagent-pending-assignments-DwkCzLvD.mjs → native-subagent-pending-assignments-BDqhOdJp.mjs} +0 -4
- package/dist/.setup/{native-task-assignments-DMQ0g3hu.mjs → native-task-assignments-C6KVqiN1.mjs} +9 -8
- package/dist/.setup/{node-cli-sessions-HC4W6FLI.mjs → node-cli-sessions-B5oNDkUS.mjs} +11 -17
- package/dist/.setup/{node-exec-server.runtime-BgBfWQqo.mjs → node-exec-server.runtime-0xSEjKYt.mjs} +2 -2
- package/dist/.setup/{plan-Y-QIvrKB.mjs → plan-CUHSIOep.mjs} +67 -89
- package/dist/.setup/{plugin-activation-cNHRfaxU.mjs → plugin-activation-BcyBv8PG.mjs} +4 -4
- package/dist/.setup/{plugin-app-cache-key-BL9B5H0L.mjs → plugin-app-cache-key-BW8rd98k.mjs} +11 -15
- package/dist/.setup/plugin-approval-roundtrip-uAR-oQfr.mjs +109 -0
- package/dist/.setup/{plugin-inventory-Cky2XJUw.mjs → plugin-inventory-Bf0_piTw.mjs} +29 -51
- package/dist/.setup/{plugin-marketplace-discovery-D_dV9FXa.mjs → plugin-marketplace-discovery-SQPhSuic.mjs} +2 -16
- package/dist/.setup/plugin-metadata-cache-DWnB7VMj.mjs +84 -0
- package/dist/.setup/plugin-thread-config-deadline-CdRzGJt4.mjs +124 -0
- package/dist/.setup/{provider-DH8NSzGt.mjs → provider-BP8ZaZqn.mjs} +4 -4
- package/dist/.setup/provider-capabilities-Z5ZbBxqP.mjs +50 -0
- package/dist/.setup/{rate-limits-B7-X2TgG.mjs → rate-limits-CMPy24F5.mjs} +1 -5
- package/dist/.setup/{request-BHZ1nz8d.mjs → request-BH3FvYUE.mjs} +189 -49
- package/dist/.setup/rpc-error-hmWM21RB.mjs +57 -0
- package/dist/.setup/{run-attempt-D8RZUOzY.mjs → run-attempt-CgvFoW7R.mjs} +553 -727
- package/dist/.setup/{run-attempt-lifecycle-C-6O3Exn.mjs → run-attempt-lifecycle-BuZgVbDA.mjs} +19 -3
- package/dist/.setup/{runtime-artifact-DDQ-HGXf.mjs → runtime-artifact-CUTOOnKw.mjs} +5 -6
- package/dist/.setup/{runtime-artifact-connection-D68qQn1m.mjs → runtime-artifact-connection-CADz3_BY.mjs} +5 -4
- package/dist/.setup/{sandbox-guard-DjCz2eOw.mjs → sandbox-guard-WqE8yPge.mjs} +3 -3
- package/dist/.setup/service-tier-normalization-Cei89SW6.mjs +15 -0
- package/dist/.setup/{session-binding-DGCYAfvD.mjs → session-binding-Ce7BqiPN.mjs} +92 -102
- package/dist/.setup/session-binding-meta-Lkm5Lpf4.mjs +15 -0
- package/dist/.setup/session-binding-record-BZB8RgcF.mjs +179 -0
- package/dist/.setup/session-binding-record-codec-z4ZpDn6E.mjs +216 -0
- package/dist/.setup/{session-binding-sidecars-jo6H8dFr.mjs → session-binding-sidecars-BrdV95Fg.mjs} +8 -2
- package/dist/.setup/{session-catalog-adoption-BU_pHWG7.mjs → session-catalog-adoption-CPIP4S_y.mjs} +34 -18
- package/dist/.setup/{session-catalog-archive-spHfihri.mjs → session-catalog-archive-DcgwvSbF.mjs} +24 -29
- package/dist/.setup/{session-catalog-events-DePDzzjc.mjs → session-catalog-events-KIXOoSnQ.mjs} +5 -5
- package/dist/.setup/{session-catalog-index-CZvDzC6z.mjs → session-catalog-index-DPICGlxr.mjs} +361 -72
- package/dist/.setup/{session-catalog-index-order-BcQpHks3.mjs → session-catalog-index-order-nhyO0wdW.mjs} +1 -1
- package/dist/.setup/{session-catalog-limits-DDxOsQeC.mjs → session-catalog-limits-DEU36Qlo.mjs} +1 -1
- package/dist/.setup/{session-catalog-index-state-TeO7EyO-.mjs → session-catalog-list-request-tXephOB4.mjs} +180 -6
- package/dist/.setup/{session-catalog-native-projection-DjhwGL6x.mjs → session-catalog-native-projection-CTBd4EUm.mjs} +7 -6
- package/dist/.setup/{session-catalog-node-adoption-DgXvSGu0.mjs → session-catalog-node-adoption-7-WEQTB1.mjs} +12 -2
- package/dist/.setup/{session-catalog-node-continue-DjKXHBbi.mjs → session-catalog-node-continue-DLWBwAAO.mjs} +11 -15
- package/dist/.setup/{session-catalog-node-lookup-CtAXI5W5.mjs → session-catalog-node-lookup-Uufckwcm.mjs} +2 -2
- package/dist/.setup/{session-catalog-parsing-CPGaPYr-.mjs → session-catalog-parsing-B-qWJh2x.mjs} +70 -28
- package/dist/.setup/{session-catalog-projection-Cr5qP5Dj.mjs → session-catalog-projection-CE0_Hffi.mjs} +6 -122
- package/dist/.setup/{session-catalog-provenance-DoAvktcj.mjs → session-catalog-provenance-CmsOE5mh.mjs} +6 -1
- package/dist/.setup/{session-cli-Cn_nCqfq.mjs → session-cli-kH4vuGod.mjs} +1 -2
- package/dist/.setup/{session-history-D83lJWHG.mjs → session-history-BogBHKLk.mjs} +1 -1
- package/dist/.setup/{session-history-import-WhX-X33a.mjs → session-history-import-NWKPa4ZO.mjs} +4 -4
- package/dist/.setup/{session-history-read-Ov3StuL4.mjs → session-history-read-CNN8zwbD.mjs} +8 -19
- package/dist/.setup/{session-history.worker-MnPKncqP.mjs → session-history.worker-Cq_4DYgN.mjs} +3 -3
- package/dist/.setup/{session-initialization-6aveB9qb.mjs → session-initialization-D6dtFQkE.mjs} +2 -2
- package/dist/.setup/{session-permission-policy-Ci_fVX6y.mjs → session-permission-policy-BxIUJ0Zd.mjs} +8 -37
- package/dist/.setup/{session-retirement-qMTxkNx2.mjs → session-retirement-aC60o6P3.mjs} +14 -15
- package/dist/.setup/{settled-turn-context-D4yj4rxf.mjs → settled-turn-context-BZsMjkIO.mjs} +13 -6
- package/dist/.setup/{settled-turn-finalizer-BsvEabkw.mjs → settled-turn-finalizer-CDxCejjC.mjs} +8 -8
- package/dist/.setup/{shared-client-DqyTMYug.mjs → shared-client-DJJ3ljH2.mjs} +291 -272
- package/dist/.setup/{provider-capabilities-CAxoF-X1.mjs → shell-dynamic-tools-Do9lIAT1.mjs} +16 -55
- package/dist/.setup/{side-question-C4kCmQy1.mjs → side-question-B7T0_GEC.mjs} +99 -91
- package/dist/.setup/{source-CS_7GFJZ.mjs → source-DH70LqN0.mjs} +24 -40
- package/dist/.setup/{thread-lifecycle-DPflntEJ.mjs → thread-lifecycle-DkcoX9q-.mjs} +262 -305
- package/dist/.setup/{thread-ownership-roNP0l1c.mjs → thread-ownership-0aRHD9iK.mjs} +10 -8
- package/dist/.setup/{thread-policy-DTd-DtkX.mjs → thread-policy-CXZV97TS.mjs} +22 -21
- package/dist/.setup/{thread-requests-B_bRnMGN.mjs → thread-requests-COrRJcZb.mjs} +107 -98
- package/dist/.setup/{thread-resume-CdDaoc7T.mjs → thread-resume-rx7J68Rx.mjs} +10 -18
- package/dist/.setup/{transcript-history-projection-DRSifI-1.mjs → transcript-history-projection-B9a7HwUV.mjs} +11 -16
- package/dist/.setup/{transcript-mirror-kxmCYsuF.mjs → transcript-mirror-BfLRARNL.mjs} +64 -67
- package/dist/.setup/{transport-stdio-Bdegpn2V.mjs → transport-stdio-a0HDa2Mj.mjs} +27 -8
- package/dist/.setup/{transport-websocket-BTBE-LD9.mjs → transport-websocket-zqJ0Cmtn.mjs} +3 -8
- package/dist/.setup/{attempt-client-cleanup-DOP-cW5j.mjs → turn-router-CX1-EoCp.mjs} +75 -170
- package/dist/.setup/{upstream-session-fork-CBeVjBpT.mjs → upstream-session-fork-LYlaQnbt.mjs} +35 -46
- package/dist/.setup/{usage-BMzNxeR_.mjs → usage-Dmx7B0W2.mjs} +4 -4
- package/dist/.setup/{usage-limit-error-QXerDo3i.mjs → usage-limit-error-M8jVnITZ.mjs} +4 -4
- package/dist/.setup/{web-search-provider.runtime-P77OUeoo.mjs → web-search-provider.runtime-CsVmqbFm.mjs} +4 -20
- package/dist/.setup/websocket-data-XlRvt8Ys.mjs +6 -0
- package/dist/.setup/workspace-write-sandbox-probe-DmUHLrrl.mjs +118 -0
- package/dist/api.js +34 -54
- package/dist/catalog-page.worker.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +15 -27
- package/dist/harness.js +37 -22
- package/dist/index.js +2880 -276
- package/dist/media-understanding-provider.js +2 -2
- package/dist/migration-provider-api.js +1 -1
- package/dist/native-session-binding-api.js +2 -0
- package/dist/provider-discovery.js +1 -1
- package/dist/session-history-worker-runtime.js +33 -4
- package/dist/session-history.worker.js +1 -1
- package/openclaw.plugin.json +3 -3
- package/package.json +6 -6
- package/dist/.setup/config-utils-D0CXecki.mjs +0 -57
- package/dist/.setup/incognito-session-DWYapfwf.mjs +0 -2
- package/dist/.setup/managed-thread-store-BMqgThVL.mjs +0 -100
- package/dist/.setup/rpc-error-BlD2vuzn.mjs +0 -31
- package/dist/.setup/session-binding-meta-B7aEMU7g.mjs +0 -6
- package/dist/.setup/session-binding-record-Oe9L-CNY.mjs +0 -375
- package/dist/.setup/session-catalog-4sCdv5qx.mjs +0 -2610
- package/dist/.setup/session-catalog-list-request-CvtxrYSe.mjs +0 -170
- package/dist/.setup/shared-client-lifecycle-DJIgqgMw.mjs +0 -153
package/dist/.setup/{effective-mcp-catalog-CxUtC-xG.mjs → effective-mcp-catalog-BysTBZCW.mjs}
RENAMED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./shared-client-
|
|
4
|
-
import "./session-binding-
|
|
1
|
+
import { m as sessionBindingIdentity } from "./session-binding-record-BZB8RgcF.mjs";
|
|
2
|
+
import { S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-CEd9QlIs.mjs";
|
|
3
|
+
import { U as protectCodexAppServerLiveThread } from "./shared-client-DJJ3ljH2.mjs";
|
|
4
|
+
import "./session-binding-Ce7BqiPN.mjs";
|
|
5
|
+
import { n as projectCodexMcpToolMetadata, t as projectCodexMcpServerMetadata } from "./mcp-tool-metadata-j10HhfTC.mjs";
|
|
5
6
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
7
|
import { assignMcpCatalogSafeServerNames } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
7
8
|
//#region extensions/codex/src/app-server/effective-mcp-catalog.ts
|
|
@@ -10,7 +11,8 @@ const MCP_STATUS_MAX_PAGES = 100;
|
|
|
10
11
|
function catalogTool(params) {
|
|
11
12
|
const raw = asOptionalRecord(params.raw);
|
|
12
13
|
const description = normalizeOptionalString(raw?.description);
|
|
13
|
-
const title =
|
|
14
|
+
const { title, ...metadata } = projectCodexMcpToolMetadata(params.toolName, raw);
|
|
15
|
+
const ui = asOptionalRecord(asOptionalRecord(raw?._meta)?.ui);
|
|
14
16
|
return {
|
|
15
17
|
serverName: params.serverName,
|
|
16
18
|
safeServerName: params.safeServerName,
|
|
@@ -18,7 +20,8 @@ function catalogTool(params) {
|
|
|
18
20
|
...title ? { title } : {},
|
|
19
21
|
...description ? { description } : {},
|
|
20
22
|
inputSchema: asOptionalRecord(raw?.inputSchema) ?? { type: "object" },
|
|
21
|
-
|
|
23
|
+
...metadata,
|
|
24
|
+
...Array.isArray(ui?.visibility) ? { uiVisibility: ui.visibility.filter((value) => value === "app" || value === "model") } : {},
|
|
22
25
|
...params.deniedBySession ? { deniedBySession: true } : {}
|
|
23
26
|
};
|
|
24
27
|
}
|
|
@@ -43,8 +46,7 @@ function buildCodexEffectiveMcpCatalog(statuses, toolOverrides) {
|
|
|
43
46
|
raw,
|
|
44
47
|
...deniedBySession ? { deniedBySession } : {}
|
|
45
48
|
});
|
|
46
|
-
|
|
47
|
-
else tools.push(tool);
|
|
49
|
+
(deniedBySession ? sessionDeniedTools : tools).push(tool);
|
|
48
50
|
}
|
|
49
51
|
for (const toolName of [...deniedNames].toSorted()) {
|
|
50
52
|
if (observedNames.has(toolName)) continue;
|
|
@@ -56,9 +58,8 @@ function buildCodexEffectiveMcpCatalog(statuses, toolOverrides) {
|
|
|
56
58
|
}));
|
|
57
59
|
}
|
|
58
60
|
serverEntries.push([status.name, {
|
|
59
|
-
|
|
61
|
+
...projectCodexMcpServerMetadata(status),
|
|
60
62
|
safeServerName,
|
|
61
|
-
launchSummary: "Codex native MCP connection",
|
|
62
63
|
toolCount: observedNames.size + [...deniedNames].filter((name) => !observedNames.has(name)).length
|
|
63
64
|
}]);
|
|
64
65
|
}
|
|
@@ -107,5 +108,76 @@ async function loadCodexEffectiveMcpCatalog(params, options) {
|
|
|
107
108
|
await retained.release();
|
|
108
109
|
}
|
|
109
110
|
}
|
|
111
|
+
/** Explicit App requests retain the thread owner, never start a second MCP client. */
|
|
112
|
+
async function acquireCodexMcpAppRuntime(params, options) {
|
|
113
|
+
const identity = sessionBindingIdentity(params);
|
|
114
|
+
let binding = options.bindingStore.read(identity);
|
|
115
|
+
let retained = await retainSharedCodexAppServerClientByInstanceId(binding?.clientId);
|
|
116
|
+
if (!retained && params.prepareSession) {
|
|
117
|
+
const preparation = await params.prepareSession();
|
|
118
|
+
params.assertCurrent();
|
|
119
|
+
const { prepareCodexMcpAppSession } = await import("./mcp-app-session-preparation-CdqsXwZX.mjs");
|
|
120
|
+
await prepareCodexMcpAppSession({
|
|
121
|
+
preparation,
|
|
122
|
+
bindingStore: options.bindingStore,
|
|
123
|
+
pluginConfig: options.pluginConfig,
|
|
124
|
+
assertCurrent: params.assertCurrent
|
|
125
|
+
});
|
|
126
|
+
params.assertCurrent();
|
|
127
|
+
binding = options.bindingStore.read(identity);
|
|
128
|
+
retained = await retainSharedCodexAppServerClientByInstanceId(binding?.clientId);
|
|
129
|
+
}
|
|
130
|
+
if (!binding?.clientId || !retained) return;
|
|
131
|
+
const acquired = retained;
|
|
132
|
+
const admittedBinding = binding;
|
|
133
|
+
try {
|
|
134
|
+
const assertBinding = () => {
|
|
135
|
+
const latest = options.bindingStore.read(identity);
|
|
136
|
+
if (!latest || latest.clientId !== admittedBinding.clientId || latest.threadId !== admittedBinding.threadId) throw new Error("Native MCP session binding changed");
|
|
137
|
+
};
|
|
138
|
+
params.assertCurrent();
|
|
139
|
+
assertBinding();
|
|
140
|
+
const { createNativeMcpRuntime } = await import("./native-mcp-app-DV7VbfzF.mjs").then((n) => n.n);
|
|
141
|
+
params.assertCurrent();
|
|
142
|
+
const runtime = createNativeMcpRuntime({
|
|
143
|
+
client: retained.client,
|
|
144
|
+
threadId: binding.threadId,
|
|
145
|
+
attempt: params,
|
|
146
|
+
appRequester: params.appRequester,
|
|
147
|
+
originCallId: "",
|
|
148
|
+
assertCurrent: assertBinding
|
|
149
|
+
});
|
|
150
|
+
const allowed = new Set(params.mcpServerNames.filter((name) => name !== "codex_apps"));
|
|
151
|
+
const getCatalog = runtime.getCatalog;
|
|
152
|
+
let catalog = null;
|
|
153
|
+
runtime.getCatalog = async () => {
|
|
154
|
+
const loaded = await getCatalog();
|
|
155
|
+
for (const server of Object.values(loaded.servers)) if (server.serverName !== "codex_apps" && server.pluginId) allowed.add(server.serverName);
|
|
156
|
+
catalog = {
|
|
157
|
+
...loaded,
|
|
158
|
+
servers: Object.fromEntries(Object.entries(loaded.servers).filter(([name]) => allowed.has(name))),
|
|
159
|
+
tools: loaded.tools.filter((tool) => allowed.has(tool.serverName) && !params.toolOverrides?.mcpToolsDeny?.[tool.serverName]?.includes(tool.toolName))
|
|
160
|
+
};
|
|
161
|
+
return catalog;
|
|
162
|
+
};
|
|
163
|
+
runtime.peekCatalog = () => catalog;
|
|
164
|
+
const unprotect = protectCodexAppServerLiveThread(acquired.client, admittedBinding.threadId);
|
|
165
|
+
let cleanup;
|
|
166
|
+
runtime.joinCleanup = async () => {
|
|
167
|
+
await cleanup;
|
|
168
|
+
};
|
|
169
|
+
return {
|
|
170
|
+
runtime,
|
|
171
|
+
releaseLease: () => {
|
|
172
|
+
unprotect();
|
|
173
|
+
cleanup = acquired.release();
|
|
174
|
+
cleanup?.catch(() => void 0);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
} catch (error) {
|
|
178
|
+
await retained.release();
|
|
179
|
+
throw error;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
110
182
|
//#endregion
|
|
111
|
-
export { loadCodexEffectiveMcpCatalog };
|
|
183
|
+
export { acquireCodexMcpAppRuntime, loadCodexEffectiveMcpCatalog };
|
|
@@ -22,7 +22,7 @@ function compileCodexOrdinaryElicitation(params) {
|
|
|
22
22
|
protocolName: "MCP"
|
|
23
23
|
})
|
|
24
24
|
};
|
|
25
|
-
if (mode !== "form" && mode !== "openai/form") return {
|
|
25
|
+
if (mode !== "form" && mode !== "openai/form" && mode !== "openaiForm") return {
|
|
26
26
|
kind: "compiled",
|
|
27
27
|
input: {
|
|
28
28
|
kind: "unsupported",
|
|
@@ -36,7 +36,9 @@ function compileCodexOrdinaryElicitation(params) {
|
|
|
36
36
|
message: readCodexElicitationString(params.snapshot, "message"),
|
|
37
37
|
fallbackMessage: "Codex needs input",
|
|
38
38
|
options: {
|
|
39
|
-
protocolName: mode === "
|
|
39
|
+
protocolName: mode === "form" ? "MCP" : "OpenAI",
|
|
40
|
+
allowRichForms: mode === "openaiForm",
|
|
41
|
+
resourceContext: params.resourceContext,
|
|
40
42
|
allowEmptyForm: true,
|
|
41
43
|
minimumChoiceCount: 1,
|
|
42
44
|
allowEnumNames: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { x as readCodexTurnCompletedNotification } from "./client-CBzEVDyb.mjs";
|
|
3
|
+
import { n as getCodexAppServerTurnRouter } from "./turn-router-CX1-EoCp.mjs";
|
|
4
4
|
import { o as isTerminalTurnStatus, s as readCodexNotificationItem, t as CodexUsageProjection } from "./event-projector-usage-03R0I2dM.mjs";
|
|
5
5
|
import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { toStringifiedError } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as codexProviderRefusalDiagnostics } from "./event-projector-values-
|
|
2
|
-
import { o as resolveCodexLocalRuntimeAttribution } from "./native-subagent-monitor-
|
|
1
|
+
import { t as codexProviderRefusalDiagnostics } from "./event-projector-values-DTqZHizf.mjs";
|
|
2
|
+
import { o as resolveCodexLocalRuntimeAttribution } from "./native-subagent-monitor-CCEFO6qK.mjs";
|
|
3
3
|
import { createAgentHarnessAssistantMessage } from "openclaw/plugin-sdk/agent-harness-attempt-runtime";
|
|
4
4
|
//#region extensions/codex/src/app-server/event-projector-assistant-message.ts
|
|
5
5
|
function createAssistantMessage(params, text, options) {
|
package/dist/.setup/{event-projector-values-DJSz8BTk.mjs → event-projector-values-DTqZHizf.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { Buffer } from "node:buffer";
|
|
4
4
|
//#region extensions/codex/src/app-server/event-projector-values.ts
|
|
5
5
|
const BIO_POLICY_SAFETY_ACCESS_BLOCK_PREFIX = "This content was flagged for possible biological risk.";
|
|
@@ -53,18 +53,11 @@ function codexProviderRefusalDiagnostics(refusal, timestamp) {
|
|
|
53
53
|
details: codexProviderRefusalDetails(refusal)
|
|
54
54
|
}] } : {};
|
|
55
55
|
}
|
|
56
|
-
function readNonEmptyString(record, key) {
|
|
57
|
-
return normalizeOptionalString$1(record[key]);
|
|
58
|
-
}
|
|
59
56
|
function readNullableString(record, key) {
|
|
60
57
|
const value = record[key];
|
|
61
58
|
if (value === null) return null;
|
|
62
59
|
return typeof value === "string" ? value : void 0;
|
|
63
60
|
}
|
|
64
|
-
function readNonNegativeInteger(record, key) {
|
|
65
|
-
const value = asFiniteNumber(record[key]);
|
|
66
|
-
return value !== void 0 && Number.isInteger(value) && value >= 0 ? value : void 0;
|
|
67
|
-
}
|
|
68
61
|
function readCodexErrorNotificationMessage(record) {
|
|
69
62
|
const error = record.error;
|
|
70
63
|
return isJsonObject(error) ? readStringField(error, "message") : void 0;
|
|
@@ -82,9 +75,6 @@ function readHookOutputEntries(value) {
|
|
|
82
75
|
}];
|
|
83
76
|
});
|
|
84
77
|
}
|
|
85
|
-
function splitPlanText(text) {
|
|
86
|
-
return text.split(/\r?\n/).map((line) => line.trim().replace(/^[-*]\s+/, "")).filter((line) => line.length > 0);
|
|
87
|
-
}
|
|
88
78
|
function extractRawAssistantText(item) {
|
|
89
79
|
const parts = (Array.isArray(item.content) ? item.content : []).flatMap((entry) => {
|
|
90
80
|
if (!isJsonObject(entry)) return [];
|
|
@@ -103,4 +93,4 @@ function readItem(value) {
|
|
|
103
93
|
return value;
|
|
104
94
|
}
|
|
105
95
|
//#endregion
|
|
106
|
-
export {
|
|
96
|
+
export { readHookOutputEntries as a, readCodexProviderRefusal as i, extractRawAssistantText as n, readItem as o, readCodexErrorNotificationMessage as r, readNullableString as s, codexProviderRefusalDiagnostics as t };
|
|
@@ -149,12 +149,8 @@ function createCodexInferenceModelBinding(params) {
|
|
|
149
149
|
const reviewer = metadata.subagent === "guardian" && metadata.threadSource === "guardian_review";
|
|
150
150
|
const classifier = metadata.subagent === "guardian" && metadata.threadSource === "guardian_classifier";
|
|
151
151
|
if (path === "/guardian" && !reviewer || path === "/guardian-classifier" && !classifier || path === "/responses/compact" && metadata.requestKind !== "compaction") throw new CodexInferenceAuthorizationError("owner");
|
|
152
|
-
if (path === "/responses" && metadata.requestKind === "prewarm" && body.generate === false) return {
|
|
153
|
-
assertCurrent: assertClient,
|
|
154
|
-
release: () => {}
|
|
155
|
-
};
|
|
156
152
|
const memory = metadata.threadSource === "memory_consolidation" && (metadata.requestKind === "memory" || metadata.subagent === "memory_consolidation");
|
|
157
|
-
if (memory && params.memoryConfigured() && path === "/responses") return {
|
|
153
|
+
if (path === "/responses" && metadata.requestKind === "prewarm" && body.generate === false || memory && params.memoryConfigured() && path === "/responses") return {
|
|
158
154
|
assertCurrent: assertClient,
|
|
159
155
|
release: () => {}
|
|
160
156
|
};
|
|
@@ -189,6 +185,11 @@ function createCodexInferenceModelBinding(params) {
|
|
|
189
185
|
};
|
|
190
186
|
let model;
|
|
191
187
|
let releaseAbort = () => {};
|
|
188
|
+
const release = () => {
|
|
189
|
+
releaseAbort();
|
|
190
|
+
model?.release();
|
|
191
|
+
captured.release();
|
|
192
|
+
};
|
|
192
193
|
try {
|
|
193
194
|
captured.assertCurrent();
|
|
194
195
|
signal.throwIfAborted();
|
|
@@ -209,10 +210,9 @@ function createCodexInferenceModelBinding(params) {
|
|
|
209
210
|
throw new CodexInferenceAuthorizationError("model");
|
|
210
211
|
}
|
|
211
212
|
if (!model) throw new CodexInferenceAuthorizationError("owner");
|
|
212
|
-
|
|
213
|
-
model?.signal.
|
|
214
|
-
|
|
215
|
-
if (model?.signal.aborted) revoke();
|
|
213
|
+
model.signal.addEventListener("abort", cancelNativeTurn, { once: true });
|
|
214
|
+
releaseAbort = () => model?.signal.removeEventListener("abort", cancelNativeTurn);
|
|
215
|
+
if (model.signal.aborted) cancelNativeTurn();
|
|
216
216
|
}
|
|
217
217
|
if (!parentExecution) captured.recordNativeReviewRequirement(metadata.autoReviewEnabled === true || metadata.nodeReplAutoReviewRequired === true);
|
|
218
218
|
const assertExecution = () => {
|
|
@@ -228,16 +228,10 @@ function createCodexInferenceModelBinding(params) {
|
|
|
228
228
|
return {
|
|
229
229
|
assertCurrent: assertExecution,
|
|
230
230
|
signal: model?.signal ?? captured.source?.signal,
|
|
231
|
-
release
|
|
232
|
-
releaseAbort();
|
|
233
|
-
model?.release();
|
|
234
|
-
captured.release();
|
|
235
|
-
}
|
|
231
|
+
release
|
|
236
232
|
};
|
|
237
233
|
} catch (error) {
|
|
238
|
-
|
|
239
|
-
model?.release();
|
|
240
|
-
captured.release();
|
|
234
|
+
release();
|
|
241
235
|
return refuseOwner(error, signal);
|
|
242
236
|
}
|
|
243
237
|
};
|
|
@@ -344,9 +338,6 @@ async function readProxyBody(stream, maxBytes) {
|
|
|
344
338
|
}
|
|
345
339
|
return Buffer.concat(chunks);
|
|
346
340
|
}
|
|
347
|
-
function readProxyWebSocketBody(data) {
|
|
348
|
-
return Array.isArray(data) ? Buffer.concat(data) : Buffer.isBuffer(data) ? data : Buffer.from(data);
|
|
349
|
-
}
|
|
350
341
|
function isTerminalResponse(bytes) {
|
|
351
342
|
try {
|
|
352
343
|
const event = JSON.parse(bytes.toString("utf8"));
|
|
@@ -356,4 +347,4 @@ function isTerminalResponse(bytes) {
|
|
|
356
347
|
}
|
|
357
348
|
}
|
|
358
349
|
//#endregion
|
|
359
|
-
export { CODEX_INFERENCE_TRANSPORT_FAILURE, CodexInferenceAuthorizationError, authorizationFailure, createCodexInferenceDispatch, createCodexInferenceModelBinding, isTerminalResponse, createUploadAdmission as n, readProxyBody,
|
|
350
|
+
export { CODEX_INFERENCE_TRANSPORT_FAILURE, CodexInferenceAuthorizationError, authorizationFailure, createCodexInferenceDispatch, createCodexInferenceModelBinding, isTerminalResponse, createUploadAdmission as n, readProxyBody, MAX_BODY_BYTES as t };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as codexWebSocketDataToBuffer } from "./websocket-data-XlRvt8Ys.mjs";
|
|
2
|
+
import { CODEX_INFERENCE_TRANSPORT_FAILURE, authorizationFailure, createCodexInferenceDispatch, isTerminalResponse, n as createUploadAdmission, readProxyBody, t as MAX_BODY_BYTES } from "./inference-dispatch-B5UKEUyC.mjs";
|
|
2
3
|
import { t as createCodexInferenceContext } from "./inference-context-D-9gWlTR.mjs";
|
|
3
4
|
import { createPermitPool } from "openclaw/plugin-sdk/concurrency-runtime";
|
|
4
5
|
import { Writable } from "node:stream";
|
|
@@ -471,7 +472,7 @@ async function createCodexInferenceProxy(params) {
|
|
|
471
472
|
let prepared;
|
|
472
473
|
try {
|
|
473
474
|
if (binary) throw new Error(CODEX_INFERENCE_TRANSPORT_FAILURE);
|
|
474
|
-
prepared = await prepare(
|
|
475
|
+
prepared = await prepare(codexWebSocketDataToBuffer(data), sampling, path, req.headers, signal, "websocket");
|
|
475
476
|
prepared.assertCurrent();
|
|
476
477
|
const frame = prepared;
|
|
477
478
|
const onAbort = () => close();
|
|
@@ -498,11 +499,11 @@ async function createCodexInferenceProxy(params) {
|
|
|
498
499
|
});
|
|
499
500
|
accepted.once("close", () => releaseFrame());
|
|
500
501
|
remote.on("message", (data, binary) => {
|
|
501
|
-
if (accepted.readyState !== WebSocket.OPEN || accepted.bufferedAmount +
|
|
502
|
+
if (accepted.readyState !== WebSocket.OPEN || accepted.bufferedAmount + codexWebSocketDataToBuffer(data).length > 33554432) {
|
|
502
503
|
close();
|
|
503
504
|
return;
|
|
504
505
|
}
|
|
505
|
-
const terminal = !binary && isTerminalResponse(
|
|
506
|
+
const terminal = !binary && isTerminalResponse(codexWebSocketDataToBuffer(data));
|
|
506
507
|
const releaseCompletedFrame = terminal ? settleFrame : void 0;
|
|
507
508
|
accepted.send(data, { binary }, (error) => {
|
|
508
509
|
if (error) close();
|
|
@@ -558,4 +559,4 @@ async function createCodexInferenceProxy(params) {
|
|
|
558
559
|
}
|
|
559
560
|
}
|
|
560
561
|
//#endregion
|
|
561
|
-
export {
|
|
562
|
+
export { createCodexInferenceProxy };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { d as readCodexPluginConfig } from "./config-parsing-
|
|
2
|
-
import { i as resolveCodexAppServerHomeScope } from "./config-options-
|
|
3
|
-
import "./config-
|
|
4
|
-
import { tt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-
|
|
5
|
-
import {
|
|
6
|
-
import { runBoundedCodexAppServerTurn } from "./bounded-turn-
|
|
7
|
-
import { t as resolveCodexBoundedTurnIsolation } from "./bounded-turn-isolation-
|
|
8
|
-
import { a as createAttributedCodexAssistantMessage } from "./event-projector-assistant-message-
|
|
1
|
+
import { d as readCodexPluginConfig } from "./config-parsing-BQq-CHTF.mjs";
|
|
2
|
+
import { i as resolveCodexAppServerHomeScope } from "./config-options-HG_Rr3W_.mjs";
|
|
3
|
+
import "./config-0Gxk3_eq.mjs";
|
|
4
|
+
import { tt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-DJJ3ljH2.mjs";
|
|
5
|
+
import { f as assertCodexPassiveTurnItems } from "./client-CBzEVDyb.mjs";
|
|
6
|
+
import { runBoundedCodexAppServerTurn } from "./bounded-turn-DlHlNTyS.mjs";
|
|
7
|
+
import { t as resolveCodexBoundedTurnIsolation } from "./bounded-turn-isolation-DklXNk3k.mjs";
|
|
8
|
+
import { a as createAttributedCodexAssistantMessage } from "./event-projector-assistant-message-YCL2wspu.mjs";
|
|
9
9
|
//#region extensions/codex/src/app-server/isolated-completion.ts
|
|
10
10
|
/** Runs prompt-only Codex inference on an ephemeral, ring-zero native thread. */
|
|
11
11
|
async function runCodexIsolatedCompletion(params, options) {
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
1
|
+
import { t as __exportAll } from "./session-binding-sidecars-BrdV95Fg.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
|
+
import { resolveGlobalSingleton } from "openclaw/plugin-sdk/global-singleton";
|
|
3
4
|
import { constants, existsSync, realpathSync } from "node:fs";
|
|
4
5
|
import path from "node:path";
|
|
5
6
|
import { access } from "node:fs/promises";
|
|
6
|
-
import { expectDefined } from "openclaw/plugin-sdk/expect-runtime";
|
|
7
|
-
import { resolveGlobalSingleton } from "openclaw/plugin-sdk/global-singleton";
|
|
8
7
|
//#region extensions/codex/src/app-server/desktop-app-paths.ts
|
|
9
8
|
/** Shared path candidates for Codex's macOS desktop app bundle. */
|
|
10
|
-
const MACOS_DESKTOP_CODEX_APP_PATH_CANDIDATES = [{
|
|
11
|
-
appName
|
|
12
|
-
appBundlePath
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}, candidate]
|
|
9
|
+
const MACOS_DESKTOP_CODEX_APP_PATH_CANDIDATES = ["ChatGPT.app", "Codex.app"].flatMap((appName) => {
|
|
10
|
+
const appBundlePath = `/Applications/${appName}`;
|
|
11
|
+
const resources = `${appBundlePath}/Contents/Resources`;
|
|
12
|
+
const computerUseServiceAppPaths = [`${resources}/cua_node/lib/node_modules/@oai/sky/Codex Computer Use.app`, `${resources}/plugins/openai-bundled/plugins/computer-use/Codex Computer Use.app`];
|
|
13
|
+
if (appName === "Codex.app") computerUseServiceAppPaths.reverse();
|
|
14
|
+
const candidate = {
|
|
15
|
+
appName,
|
|
16
|
+
appBundlePath,
|
|
17
|
+
appServerCommandPath: `${resources}/codex`,
|
|
18
|
+
bundledMarketplacePath: `${resources}/plugins/openai-bundled`,
|
|
19
|
+
computerUseServiceAppPaths
|
|
20
|
+
};
|
|
21
|
+
return [{
|
|
22
|
+
...candidate,
|
|
23
|
+
appServerCommandPath: path.join(appBundlePath, "Contents", "Resources", "codex-cli", "CodexCLI.app", "Contents", "MacOS", "codex")
|
|
24
|
+
}, candidate];
|
|
25
|
+
});
|
|
26
26
|
function resolveMacOSDesktopCodexAppPathCandidates(platform = process.platform) {
|
|
27
27
|
return platform === "darwin" ? MACOS_DESKTOP_CODEX_APP_PATH_CANDIDATES : [];
|
|
28
28
|
}
|
|
@@ -47,7 +47,7 @@ function resolveFirstExistingMacOSDesktopCodexBundledMarketplacePath(params = {}
|
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region extensions/codex/src/app-server/version.ts
|
|
49
49
|
/** Exact Codex app-server version shipped by the OpenClaw Codex bridge. */
|
|
50
|
-
const CODEX_APP_SERVER_VERSION = "0.
|
|
50
|
+
const CODEX_APP_SERVER_VERSION = "0.160.0";
|
|
51
51
|
/** Inclusive runtime compatibility floor for external app-server binaries. */
|
|
52
52
|
const MIN_SUPPORTED_CODEX_APP_SERVER_VERSION = "0.149.0";
|
|
53
53
|
const MANAGED_CODEX_APP_SERVER_PACKAGE = "@openai/codex";
|
|
@@ -76,13 +76,16 @@ async function resolveManagedCodexAppServerStartOptions(startOptions, options =
|
|
|
76
76
|
const pluginRoot = options.pluginRoot ?? registeredCodexPlugin.root;
|
|
77
77
|
if (!pluginRoot) throw new Error("Codex plugin root is unavailable. Load the Codex plugin before starting its managed app-server.");
|
|
78
78
|
const platform = options.platform ?? process.platform;
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
const candidateCommandPaths = resolveManagedCodexAppServerCommandCandidates(pluginRoot, platform, startOptions.managedCommandOrder ?? "package-first");
|
|
80
|
+
const pathExists = options.pathExists ?? commandPathExists;
|
|
81
|
+
const commandPaths = [];
|
|
82
|
+
for (const commandPath of candidateCommandPaths) if (await pathExists(commandPath, platform)) commandPaths.push(commandPath);
|
|
83
|
+
const [commandPath, ...managedFallbackCommandPaths] = commandPaths;
|
|
84
|
+
if (commandPath === void 0) throw new Error([
|
|
85
|
+
`Managed Codex app-server binary was not found for ${MANAGED_CODEX_APP_SERVER_PACKAGE}.`,
|
|
86
|
+
"Reinstall or update OpenClaw, or run pnpm install in a source checkout.",
|
|
87
|
+
"Set plugins.entries.codex.config.appServer.command or OPENCLAW_CODEX_APP_SERVER_BIN to use a custom Codex binary."
|
|
88
|
+
].join(" "));
|
|
86
89
|
return {
|
|
87
90
|
...startOptions,
|
|
88
91
|
command: commandPath,
|
|
@@ -113,7 +116,7 @@ function resolvePackagedCodexNativeCommand(entrypoint) {
|
|
|
113
116
|
}
|
|
114
117
|
/** Returns whether a command is one of the standard macOS desktop app executables. */
|
|
115
118
|
function isManagedCodexDesktopCommand(command, platform = process.platform) {
|
|
116
|
-
return platform === "darwin" && resolveMacOSDesktopCodexAppServerCommandCandidates(platform).
|
|
119
|
+
return platform === "darwin" && resolveMacOSDesktopCodexAppServerCommandCandidates(platform).includes(command);
|
|
117
120
|
}
|
|
118
121
|
function resolveManagedCodexPackageRootForCommand(command, platform) {
|
|
119
122
|
const pathApi = platform === "win32" ? path.win32 : path.posix;
|
|
@@ -180,16 +183,6 @@ function resolveManagedCodexPackageEntrypoint(pluginRoot) {
|
|
|
180
183
|
return;
|
|
181
184
|
}
|
|
182
185
|
}
|
|
183
|
-
async function findManagedCodexAppServerCommandPaths(params) {
|
|
184
|
-
const commandPaths = [];
|
|
185
|
-
for (const commandPath of params.candidateCommandPaths) if (await params.pathExists(commandPath, params.platform)) commandPaths.push(commandPath);
|
|
186
|
-
if (commandPaths.length > 0) return commandPaths;
|
|
187
|
-
throw new Error([
|
|
188
|
-
`Managed Codex app-server binary was not found for ${MANAGED_CODEX_APP_SERVER_PACKAGE}.`,
|
|
189
|
-
"Reinstall or update OpenClaw, or run pnpm install in a source checkout.",
|
|
190
|
-
"Set plugins.entries.codex.config.appServer.command or OPENCLAW_CODEX_APP_SERVER_BIN to use a custom Codex binary."
|
|
191
|
-
].join(" "));
|
|
192
|
-
}
|
|
193
186
|
async function commandPathExists(filePath, platform) {
|
|
194
187
|
try {
|
|
195
188
|
await access(filePath, platform === "win32" ? constants.F_OK : constants.X_OK);
|