@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,88 +1,61 @@
|
|
|
1
|
-
import "./config-security-
|
|
2
|
-
import {
|
|
1
|
+
import "./config-security-clxAZYWX.mjs";
|
|
2
|
+
import { a as readExecAsk, l as readRecord, o as readExecSecurity } from "./config-utils-DN_YT7dE.mjs";
|
|
3
|
+
import "./config-parsing-DsWSCPHO.mjs";
|
|
3
4
|
import "./auth-start-options-BPIPeEX8.mjs";
|
|
4
|
-
import { c as canUseCodexModelBackedApprovalsReviewerForModel$1 } from "./config-options-
|
|
5
|
-
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-
|
|
6
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
5
|
+
import { c as canUseCodexModelBackedApprovalsReviewerForModel$1 } from "./config-options-DDzeNQ8m.mjs";
|
|
6
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-DWzK-k0n.mjs";
|
|
7
|
+
import { t as __exportAll } from "./session-binding-sidecars-DD-enC8w.mjs";
|
|
7
8
|
import { resolveAgentConfig } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
8
9
|
import { execPolicy } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
9
10
|
import { resolveExecApprovalsFromFile } from "openclaw/plugin-sdk/exec-approvals-runtime";
|
|
10
11
|
import { resolveProviderIdForAuth } from "openclaw/plugin-sdk/provider-auth-aliases";
|
|
11
12
|
//#region extensions/codex/src/app-server/config-exec-approvals.ts
|
|
12
|
-
function
|
|
13
|
+
function resolveOpenClawExecPolicyForCodexAppServer(params) {
|
|
14
|
+
if (params.permissionMode === "full") return resolveOpenClawExecPolicy({ mode: "full" });
|
|
13
15
|
const globalExec = readRecord(params.config?.tools?.exec);
|
|
14
|
-
const globalPolicy = applyOpenClawExecPolicyLayer({
|
|
15
|
-
...resolveOpenClawExecPolicyForMode("full"),
|
|
16
|
-
touched: false
|
|
17
|
-
}, globalExec);
|
|
16
|
+
const globalPolicy = applyOpenClawExecPolicyLayer(resolveOpenClawExecPolicy({ mode: "full" }, false), globalExec);
|
|
18
17
|
const agentId = params.agentId?.trim();
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
function resolveOpenClawExecPolicyForCodexAppServer(params) {
|
|
22
|
-
if (params.permissionMode === "full") return {
|
|
23
|
-
...resolveOpenClawExecPolicyForMode("full"),
|
|
24
|
-
touched: true
|
|
25
|
-
};
|
|
26
|
-
const overridePolicy = applyOpenClawExecPolicyLayer(resolveOpenClawExecPolicyFromConfig({
|
|
27
|
-
config: params.config,
|
|
28
|
-
agentId: params.agentId
|
|
29
|
-
}), params.execOverrides);
|
|
30
|
-
return applyOpenClawExecApprovalFloors(overridePolicy, params.approvals ? resolveExecApprovalsFromFile({
|
|
18
|
+
const overridePolicy = applyOpenClawExecPolicyLayer(applyOpenClawExecPolicyLayer(globalPolicy, agentId ? readRecord(resolveAgentConfig(params.config ?? {}, agentId)?.tools?.exec) : void 0), params.execOverrides);
|
|
19
|
+
const approvalFloors = params.approvals ? resolveExecApprovalsFromFile({
|
|
31
20
|
file: params.approvals,
|
|
32
21
|
agentId: params.agentId,
|
|
33
22
|
overrides: {
|
|
34
23
|
security: overridePolicy.security,
|
|
35
24
|
ask: overridePolicy.ask
|
|
36
25
|
}
|
|
37
|
-
}).agent : void 0
|
|
26
|
+
}).agent : void 0;
|
|
27
|
+
if (!approvalFloors) return overridePolicy;
|
|
28
|
+
const nextSecurity = approvalFloors.security ? execPolicy.minSecurity(overridePolicy.security, approvalFloors.security) : overridePolicy.security;
|
|
29
|
+
const nextAsk = approvalFloors.ask ? execPolicy.maxAsk(overridePolicy.ask, approvalFloors.ask) : overridePolicy.ask;
|
|
30
|
+
if (nextSecurity === overridePolicy.security && nextAsk === overridePolicy.ask) return overridePolicy;
|
|
31
|
+
return resolveOpenClawExecPolicy({
|
|
32
|
+
security: nextSecurity,
|
|
33
|
+
ask: nextAsk
|
|
34
|
+
});
|
|
38
35
|
}
|
|
39
36
|
function applyOpenClawExecPolicyLayer(base, exec) {
|
|
40
37
|
if (!exec) return base;
|
|
41
38
|
const mode = readExecMode(exec.mode);
|
|
42
|
-
if (mode !== void 0) return {
|
|
43
|
-
...resolveOpenClawExecPolicyForMode(mode),
|
|
44
|
-
touched: true
|
|
45
|
-
};
|
|
39
|
+
if (mode !== void 0) return resolveOpenClawExecPolicy({ mode });
|
|
46
40
|
const security = readExecSecurity(exec.security);
|
|
47
41
|
const ask = readExecAsk(exec.ask);
|
|
48
42
|
if (security === void 0 && ask === void 0) return base;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
security: nextSecurity,
|
|
54
|
-
ask: nextAsk
|
|
55
|
-
}).mode,
|
|
56
|
-
security: nextSecurity,
|
|
57
|
-
ask: nextAsk,
|
|
58
|
-
touched: true
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
function applyOpenClawExecApprovalFloors(base, approvalFloors) {
|
|
62
|
-
if (!approvalFloors) return base;
|
|
63
|
-
const nextSecurity = approvalFloors.security ? execPolicy.minSecurity(base.security, approvalFloors.security) : base.security;
|
|
64
|
-
const nextAsk = approvalFloors.ask ? execPolicy.maxAsk(base.ask, approvalFloors.ask) : base.ask;
|
|
65
|
-
if (nextSecurity === base.security && nextAsk === base.ask) return base;
|
|
66
|
-
return {
|
|
67
|
-
mode: execPolicy.resolveExecModePolicy({
|
|
68
|
-
security: nextSecurity,
|
|
69
|
-
ask: nextAsk
|
|
70
|
-
}).mode,
|
|
71
|
-
security: nextSecurity,
|
|
72
|
-
ask: nextAsk,
|
|
73
|
-
touched: true
|
|
74
|
-
};
|
|
43
|
+
return resolveOpenClawExecPolicy({
|
|
44
|
+
security: security ?? base.security,
|
|
45
|
+
ask: ask ?? base.ask
|
|
46
|
+
});
|
|
75
47
|
}
|
|
76
|
-
function
|
|
77
|
-
const { security, ask } = execPolicy.resolveExecModePolicy({
|
|
78
|
-
mode,
|
|
79
|
-
security: "full",
|
|
80
|
-
ask: "off"
|
|
48
|
+
function resolveOpenClawExecPolicy(policy, touched = true) {
|
|
49
|
+
const { mode, security, ask } = execPolicy.resolveExecModePolicy({
|
|
50
|
+
mode: policy.mode,
|
|
51
|
+
security: policy.security ?? "full",
|
|
52
|
+
ask: policy.ask ?? "off"
|
|
81
53
|
});
|
|
82
54
|
return {
|
|
83
55
|
mode,
|
|
84
56
|
security,
|
|
85
|
-
ask
|
|
57
|
+
ask,
|
|
58
|
+
touched
|
|
86
59
|
};
|
|
87
60
|
}
|
|
88
61
|
function readExecMode(value) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
4
|
-
import { a as DEFAULT_CODEX_COMPUTER_USE_PLUGIN_NAME,
|
|
2
|
+
import { _ as resolveCodexPolicyModeForOpenClawExecMode, a as resolveDefaultCodexAppServerPolicy, b as selectForcedDangerFullAccessSandbox, d as readCodexRequirementsToml, g as resolveApprovalPolicy, h as assertCodexAppServerAllowedForOpenClawExecMode, i as resolveCodexAppServerNetworkProxy, o as resolvePolicyMode, r as inferCodexAppServerConnectionClass, t as assertCodexAppServerConnectionSecurity, u as parseCodexRequirementsPolicy, v as resolveEffectiveOpenClawExecModeForCodexAppServer, x as selectForcedPromptingSandbox, y as resolveSandbox } from "./config-security-clxAZYWX.mjs";
|
|
3
|
+
import { c as readNumberEnv, i as normalizeHeaders, l as readRecord, n as hashSecretForKey, s as readNonEmptyString, u as resolveArgs } from "./config-utils-DN_YT7dE.mjs";
|
|
4
|
+
import { a as DEFAULT_CODEX_COMPUTER_USE_PLUGIN_NAME, d as readCodexPluginConfig, n as DEFAULT_CODEX_COMPUTER_USE_LIVE_TEST_TIMEOUT_MS, o as DEFAULT_CODEX_COMPUTER_USE_TOOL_CALL_TIMEOUT_MS, r as DEFAULT_CODEX_COMPUTER_USE_MARKETPLACE_DISCOVERY_TIMEOUT_MS, s as assertCodexAppServerCommandHasNoInlineArgs } from "./config-parsing-DsWSCPHO.mjs";
|
|
5
5
|
import { i as readCodexAppServerConfigOptions } from "./launch-args-DbFCehO7.mjs";
|
|
6
6
|
import { r as resolveCodexAppServerUserHomeDir, t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
|
|
7
7
|
import { normalizeTrimmedStringList, parseBooleanValue } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -55,12 +55,16 @@ function canUseCodexModelBackedApprovalsReviewerForModel(params, resolveAuthProv
|
|
|
55
55
|
const explicitProvider = params.modelProvider?.trim().toLowerCase();
|
|
56
56
|
const inferredProvider = inferProviderFromModelRef(params.model);
|
|
57
57
|
if (explicitProvider && explicitProvider !== "codex" && explicitProvider !== "openai") return false;
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
function isTrustedCodexModelBackedOpenAIProvider(params, resolveAuthProviderId) {
|
|
58
|
+
if ((inferredProvider ?? explicitProvider) !== "openai") return false;
|
|
61
59
|
if (![params.env?.OPENAI_BASE_URL, params.env?.OPENAI_API_BASE].every(isNativeOpenAIBaseUrl)) return false;
|
|
62
60
|
if (!nativeCodexConfigIsTrustedForModelBackedReview(params)) return false;
|
|
63
|
-
|
|
61
|
+
const config = params.config;
|
|
62
|
+
const providerRecords = readRecord(readRecord(readRecord(config)?.models)?.providers);
|
|
63
|
+
return Object.entries(providerRecords ?? {}).flatMap(([providerId, providerConfig]) => {
|
|
64
|
+
if (resolveAuthProviderId(providerId, { config }) !== "openai") return [];
|
|
65
|
+
const record = readRecord(providerConfig);
|
|
66
|
+
return record ? [record] : [];
|
|
67
|
+
}).every((provider) => configuredOpenAIProviderIsTrustedForModelBackedReview(provider, params.model));
|
|
64
68
|
}
|
|
65
69
|
function resolveCodexModelBackedReviewerPolicyContext(params) {
|
|
66
70
|
const provider = params.provider?.trim();
|
|
@@ -141,8 +145,7 @@ function readCodexAppServerConfigToml(params) {
|
|
|
141
145
|
}
|
|
142
146
|
function codexConfigEnablesNativeComputerUse(params) {
|
|
143
147
|
const configToml = readCodexAppServerConfigToml(params);
|
|
144
|
-
if (configToml
|
|
145
|
-
if (configToml === void 0) return false;
|
|
148
|
+
if (typeof configToml !== "string") return configToml === false;
|
|
146
149
|
let parsedConfig;
|
|
147
150
|
try {
|
|
148
151
|
parsedConfig = parse(configToml, { integersAsBigInt: true });
|
|
@@ -153,14 +156,7 @@ function codexConfigEnablesNativeComputerUse(params) {
|
|
|
153
156
|
if (rawPlugins === void 0) return false;
|
|
154
157
|
const plugins = readRecord(rawPlugins);
|
|
155
158
|
if (!plugins) return true;
|
|
156
|
-
|
|
157
|
-
if (!params.pluginNames.some((pluginName) => pluginId === pluginName || pluginId.startsWith(`${pluginName}@`))) continue;
|
|
158
|
-
const pluginConfig = readRecord(rawPluginConfig);
|
|
159
|
-
if (!pluginConfig) return true;
|
|
160
|
-
if (pluginConfig.enabled === false) continue;
|
|
161
|
-
return true;
|
|
162
|
-
}
|
|
163
|
-
return false;
|
|
159
|
+
return Object.entries(plugins).some(([pluginId, pluginConfig]) => params.pluginNames.some((pluginName) => pluginId === pluginName || pluginId.startsWith(`${pluginName}@`)) && readRecord(pluginConfig)?.enabled !== false);
|
|
164
160
|
}
|
|
165
161
|
function resolveCodexAppServerConfigPath(params) {
|
|
166
162
|
if (params.codexHome) return path.join(params.codexHome, CODEX_CONFIG_TOML_FILENAME);
|
|
@@ -171,17 +167,6 @@ function resolveCodexAppServerConfigPath(params) {
|
|
|
171
167
|
function readErrorCode(error) {
|
|
172
168
|
return error && typeof error === "object" && "code" in error ? String(error.code) : void 0;
|
|
173
169
|
}
|
|
174
|
-
function readConfiguredOpenAIProvidersForModelBackedReview(config, resolveAuthProviderId) {
|
|
175
|
-
const providerRecords = readRecord(readRecord(readRecord(config)?.models)?.providers);
|
|
176
|
-
if (!providerRecords) return [];
|
|
177
|
-
const openAIProviders = [];
|
|
178
|
-
for (const [providerId, providerConfig] of Object.entries(providerRecords)) {
|
|
179
|
-
if (resolveAuthProviderId(providerId, { config }) !== "openai") continue;
|
|
180
|
-
const record = readRecord(providerConfig);
|
|
181
|
-
if (record) openAIProviders.push(record);
|
|
182
|
-
}
|
|
183
|
-
return openAIProviders;
|
|
184
|
-
}
|
|
185
170
|
function configuredOpenAIProviderIsTrustedForModelBackedReview(openAIProvider, modelInput) {
|
|
186
171
|
if (readRecord(openAIProvider.localService) || hasNonEmptyRecord(openAIProvider.headers) || hasNonEmptyRecord(openAIProvider.request) || typeof openAIProvider.authHeader === "boolean" || !isNativeOpenAIBaseUrl(openAIProvider.baseUrl)) return false;
|
|
187
172
|
const models = openAIProvider.models;
|
|
@@ -238,15 +223,18 @@ function inferProviderFromModelRef(model) {
|
|
|
238
223
|
function resolveCodexAppServerHomeScope(params) {
|
|
239
224
|
const configured = params.appServer?.homeScope;
|
|
240
225
|
if (configured) return configured;
|
|
241
|
-
return params.connectionScope === "supervision" &&
|
|
226
|
+
return params.connectionScope === "supervision" && params.appServer?.transport !== "websocket" ? "user" : "agent";
|
|
242
227
|
}
|
|
243
228
|
function createCodexAppServerConfig({ resolveProviderIdForAuth }) {
|
|
244
|
-
function
|
|
229
|
+
function resolveRuntimeOptions(params, connectionScope) {
|
|
245
230
|
const env = params.env ?? process.env;
|
|
246
231
|
const pluginConfig = readCodexPluginConfig(params.pluginConfig);
|
|
247
232
|
const config = pluginConfig.appServer ?? {};
|
|
248
|
-
const transport =
|
|
249
|
-
const homeScope = resolveCodexAppServerHomeScope({
|
|
233
|
+
const transport = config.transport ?? "stdio";
|
|
234
|
+
const homeScope = resolveCodexAppServerHomeScope({
|
|
235
|
+
appServer: config,
|
|
236
|
+
connectionScope
|
|
237
|
+
});
|
|
250
238
|
if (transport !== "stdio" && pluginConfig.sessionCatalog?.homes?.length) throw new Error("plugins.entries.codex.config.sessionCatalog.homes requires appServer.transport=stdio");
|
|
251
239
|
const configCommand = readNonEmptyString(config.command);
|
|
252
240
|
const envCommand = readNonEmptyString(env.OPENCLAW_CODEX_APP_SERVER_BIN);
|
|
@@ -268,16 +256,12 @@ function createCodexAppServerConfig({ resolveProviderIdForAuth }) {
|
|
|
268
256
|
transport,
|
|
269
257
|
url
|
|
270
258
|
});
|
|
271
|
-
const remoteAppsSubstrate = "preconfigured";
|
|
272
259
|
const remoteWorkspaceRoot = readNonEmptyString(config.remoteWorkspaceRoot);
|
|
273
|
-
const execMode = resolveEffectiveOpenClawExecModeForCodexAppServer(
|
|
274
|
-
execMode: params.execMode,
|
|
275
|
-
execPolicy: params.execPolicy
|
|
276
|
-
});
|
|
260
|
+
const execMode = resolveEffectiveOpenClawExecModeForCodexAppServer(params);
|
|
277
261
|
if (!params.sessionPermissionMode) assertCodexAppServerAllowedForOpenClawExecMode(execMode);
|
|
278
|
-
const explicitPolicyMode =
|
|
279
|
-
const configuredSandbox =
|
|
280
|
-
const explicitApprovalsReviewer =
|
|
262
|
+
const explicitPolicyMode = config.mode ?? resolvePolicyMode(env.OPENCLAW_CODEX_APP_SERVER_MODE);
|
|
263
|
+
const configuredSandbox = config.sandbox ?? resolveSandbox(env.OPENCLAW_CODEX_APP_SERVER_SANDBOX);
|
|
264
|
+
const explicitApprovalsReviewer = config.approvalsReviewer;
|
|
281
265
|
const normalizedPolicyMode = resolveCodexPolicyModeForOpenClawExecMode(execMode);
|
|
282
266
|
const ignoreLegacyYoloPolicyMode = normalizedPolicyMode === "guardian" && explicitPolicyMode === "yolo";
|
|
283
267
|
const canUseModelBackedReviewer = canUseCodexModelBackedApprovalsReviewerForModel({
|
|
@@ -295,25 +279,19 @@ function createCodexAppServerConfig({ resolveProviderIdForAuth }) {
|
|
|
295
279
|
const forceDangerFullAccessSandbox = params.execPolicy?.touched === true && params.execPolicy.security === "full" && params.execPolicy.ask === "always";
|
|
296
280
|
const forcePerCommandApprovals = params.execPolicy?.ask === "always";
|
|
297
281
|
const requirementsToml = forcePerCommandApprovals ? readCodexRequirementsToml({
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
requirementsPath: params.requirementsPath,
|
|
301
|
-
readRequirementsFile: params.readRequirementsFile,
|
|
302
|
-
platform: params.platform
|
|
282
|
+
...params,
|
|
283
|
+
env
|
|
303
284
|
}) ?? null : params.requirementsToml;
|
|
304
285
|
if (forcePerCommandApprovals && requirementsToml && parseCodexRequirementsPolicy(requirementsToml).allowedApprovalPolicies?.has("untrusted") === false) throw new Error("tools.exec.ask=always requires Codex app-server per-command approvals");
|
|
305
286
|
const forceRuntimePolicy = forceUserReviewer || forceGuardianReviewer || forceDangerFullAccessSandbox;
|
|
306
287
|
const defaultPolicy = explicitPolicyMode && !forceRuntimePolicy && !ignoreLegacyYoloPolicyMode ? void 0 : resolveDefaultCodexAppServerPolicy({
|
|
288
|
+
...params,
|
|
307
289
|
transport,
|
|
308
290
|
env,
|
|
309
291
|
forceGuardian: normalizedPolicyMode === "guardian",
|
|
310
292
|
forceUserReviewer: forceUserReviewer || !canUseModelBackedReviewer,
|
|
311
293
|
execModeRequiringPromptingApprovals,
|
|
312
294
|
requirementsToml,
|
|
313
|
-
requirementsPath: params.requirementsPath,
|
|
314
|
-
readRequirementsFile: params.readRequirementsFile,
|
|
315
|
-
platform: params.platform,
|
|
316
|
-
hostName: params.hostName,
|
|
317
295
|
execModeRequiringUserReviewer: forceUserReviewer ? execMode : void 0
|
|
318
296
|
});
|
|
319
297
|
const preserveExplicitAutoSandbox = forceGuardianReviewer && configuredSandbox === "read-only";
|
|
@@ -330,7 +308,7 @@ function createCodexAppServerConfig({ resolveProviderIdForAuth }) {
|
|
|
330
308
|
approvalsReviewer: defaultPolicy?.approvalsReviewer ?? (forceUserReviewer ? "user" : "auto_review")
|
|
331
309
|
} : void 0;
|
|
332
310
|
const policyMode = ignoreLegacyYoloPolicyMode ? normalizedPolicyMode : explicitPolicyMode ?? normalizedPolicyMode ?? defaultPolicy?.mode ?? "yolo";
|
|
333
|
-
const serviceTier =
|
|
311
|
+
const serviceTier = config.serviceTier;
|
|
334
312
|
const resolvedSandbox = forcedPolicy?.sandbox ?? configuredSandbox ?? defaultPolicy?.sandbox ?? (policyMode === "guardian" ? "workspace-write" : "danger-full-access");
|
|
335
313
|
if (transport === "websocket" && !url) throw new Error("plugins.entries.codex.config.appServer.url is required when appServer.transport is websocket");
|
|
336
314
|
if (transport === "websocket" && homeScope === "user") throw new Error("plugins.entries.codex.config.appServer.homeScope=user requires appServer.transport=stdio or unix");
|
|
@@ -342,10 +320,9 @@ function createCodexAppServerConfig({ resolveProviderIdForAuth }) {
|
|
|
342
320
|
authToken,
|
|
343
321
|
headers
|
|
344
322
|
});
|
|
345
|
-
const configApprovalPolicy =
|
|
323
|
+
const configApprovalPolicy = config.approvalPolicy;
|
|
346
324
|
const envApprovalPolicy = resolveApprovalPolicy(env.OPENCLAW_CODEX_APP_SERVER_APPROVAL_POLICY);
|
|
347
325
|
const approvalPolicy = configApprovalPolicy ?? envApprovalPolicy ?? defaultPolicy?.approvalPolicy ?? (policyMode === "guardian" ? "on-request" : "never");
|
|
348
|
-
const approvalPolicySource = configApprovalPolicy ? "config" : envApprovalPolicy ? "env" : defaultPolicy?.approvalPolicy ? "requirements" : "implicit";
|
|
349
326
|
const computerUseConfig = resolveCodexComputerUseConfig({
|
|
350
327
|
pluginConfig: params.pluginConfig,
|
|
351
328
|
env
|
|
@@ -372,13 +349,12 @@ function createCodexAppServerConfig({ resolveProviderIdForAuth }) {
|
|
|
372
349
|
...transport === "stdio" && clearEnv.length > 0 ? { clearEnv } : {}
|
|
373
350
|
},
|
|
374
351
|
connectionClass,
|
|
375
|
-
remoteAppsSubstrate,
|
|
376
352
|
...remoteWorkspaceRoot ? { remoteWorkspaceRoot } : {},
|
|
353
|
+
...config.nativeHookRelay ? { nativeHookRelay: config.nativeHookRelay } : {},
|
|
377
354
|
codeModeOnly: config.codeModeOnly === true,
|
|
378
355
|
loopDetectionPreToolUseRelay: config.loopDetectionPreToolUseRelay !== false,
|
|
379
356
|
requestTimeoutMs: resolvePositiveTimerTimeoutMs(config.requestTimeoutMs, 6e4),
|
|
380
357
|
approvalPolicy: forcedPolicy?.approvalPolicy ?? approvalPolicy,
|
|
381
|
-
approvalPolicySource,
|
|
382
358
|
sandbox: resolvedSandbox,
|
|
383
359
|
approvalsReviewer: forcedPolicy?.approvalsReviewer ?? explicitApprovalsReviewer ?? defaultPolicy?.approvalsReviewer ?? (policyMode === "guardian" ? "auto_review" : "user"),
|
|
384
360
|
...serviceTier ? { serviceTier } : {},
|
|
@@ -386,28 +362,9 @@ function createCodexAppServerConfig({ resolveProviderIdForAuth }) {
|
|
|
386
362
|
...resolveCodexAppServerNetworkProxy(config.networkProxy, resolvedSandbox)
|
|
387
363
|
};
|
|
388
364
|
}
|
|
389
|
-
/** Resolves the passive supervision control connection without changing harness defaults. */
|
|
390
|
-
function resolveCodexSupervisionAppServerRuntimeOptions(params = {}) {
|
|
391
|
-
const pluginConfig = readCodexPluginConfig(params.pluginConfig);
|
|
392
|
-
const appServer = pluginConfig.appServer ?? {};
|
|
393
|
-
const homeScope = resolveCodexAppServerHomeScope({
|
|
394
|
-
appServer,
|
|
395
|
-
connectionScope: "supervision"
|
|
396
|
-
});
|
|
397
|
-
return resolveCodexAppServerRuntimeOptions({
|
|
398
|
-
...params,
|
|
399
|
-
pluginConfig: {
|
|
400
|
-
...pluginConfig,
|
|
401
|
-
appServer: {
|
|
402
|
-
...appServer,
|
|
403
|
-
homeScope
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
});
|
|
407
|
-
}
|
|
408
365
|
return {
|
|
409
|
-
resolveCodexAppServerRuntimeOptions,
|
|
410
|
-
resolveCodexSupervisionAppServerRuntimeOptions
|
|
366
|
+
resolveCodexAppServerRuntimeOptions: (params = {}) => resolveRuntimeOptions(params, "harness"),
|
|
367
|
+
resolveCodexSupervisionAppServerRuntimeOptions: (params = {}) => resolveRuntimeOptions(params, "supervision")
|
|
411
368
|
};
|
|
412
369
|
}
|
|
413
370
|
/**
|
|
@@ -437,22 +394,27 @@ function resolveCodexAppServerStartOptionsForAgent(params) {
|
|
|
437
394
|
function resolveCodexComputerUseConfig(params = {}) {
|
|
438
395
|
const env = params.env ?? process.env;
|
|
439
396
|
const config = readCodexPluginConfig(params.pluginConfig).computerUse ?? {};
|
|
440
|
-
const
|
|
441
|
-
const
|
|
442
|
-
const
|
|
443
|
-
const
|
|
444
|
-
const
|
|
445
|
-
const
|
|
446
|
-
const
|
|
447
|
-
const
|
|
448
|
-
const
|
|
449
|
-
const
|
|
450
|
-
const
|
|
451
|
-
const
|
|
452
|
-
const
|
|
453
|
-
const
|
|
397
|
+
const option = (key) => params.overrides?.[key] ?? config[key];
|
|
398
|
+
const envOption = (key) => env[`OPENCLAW_CODEX_COMPUTER_USE_${key.replace(/[A-Z]/g, "_$&").toUpperCase()}`];
|
|
399
|
+
const stringOption = (key) => readNonEmptyString(params.overrides?.[key]) ?? readNonEmptyString(config[key]) ?? readNonEmptyString(envOption(key));
|
|
400
|
+
const booleanOption = (key) => option(key) ?? parseBooleanValue(envOption(key)) ?? false;
|
|
401
|
+
const timeoutOption = (key, fallback) => resolvePositiveTimerTimeoutMs(option(key) ?? readNumberEnv(envOption(key)), fallback);
|
|
402
|
+
const marketplaceSource = stringOption("marketplaceSource");
|
|
403
|
+
const marketplacePath = stringOption("marketplacePath");
|
|
404
|
+
const marketplaceName = stringOption("marketplaceName");
|
|
405
|
+
const configuredPluginName = stringOption("pluginName");
|
|
406
|
+
const configuredMcpServerName = stringOption("mcpServerName");
|
|
407
|
+
const autoInstall = booleanOption("autoInstall");
|
|
408
|
+
const marketplaceDiscoveryTimeoutMs = timeoutOption("marketplaceDiscoveryTimeoutMs", DEFAULT_CODEX_COMPUTER_USE_MARKETPLACE_DISCOVERY_TIMEOUT_MS);
|
|
409
|
+
const liveTestTimeoutMs = timeoutOption("liveTestTimeoutMs", DEFAULT_CODEX_COMPUTER_USE_LIVE_TEST_TIMEOUT_MS);
|
|
410
|
+
const toolCallTimeoutMs = timeoutOption("toolCallTimeoutMs", DEFAULT_CODEX_COMPUTER_USE_TOOL_CALL_TIMEOUT_MS);
|
|
411
|
+
const healthCheckIntervalMinutes = normalizeComputerUseHealthCheckIntervalMinutes(option("healthCheckIntervalMinutes") ?? readNumberEnv(envOption("healthCheckIntervalMinutes")));
|
|
412
|
+
const healthCheckEnabled = booleanOption("healthCheckEnabled");
|
|
413
|
+
const pluginCacheMode = normalizeComputerUsePluginCacheMode(params.overrides?.pluginCacheMode) ?? config.pluginCacheMode ?? normalizeComputerUsePluginCacheMode(envOption("pluginCacheMode")) ?? "independent";
|
|
414
|
+
const strictReadiness = booleanOption("strictReadiness");
|
|
415
|
+
const autoRepair = booleanOption("autoRepair");
|
|
454
416
|
return {
|
|
455
|
-
enabled:
|
|
417
|
+
enabled: option("enabled") ?? parseBooleanValue(env.OPENCLAW_CODEX_COMPUTER_USE) ?? Boolean(autoInstall || marketplaceSource || marketplacePath || marketplaceName || configuredPluginName || configuredMcpServerName),
|
|
456
418
|
autoInstall,
|
|
457
419
|
marketplaceDiscoveryTimeoutMs,
|
|
458
420
|
liveTestTimeoutMs,
|
|
@@ -1,45 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { t as CODEX_PLUGIN_MARKETPLACE_NAME_PATTERN } from "./config-contracts.shared-D85SGEuq.mjs";
|
|
2
|
+
import { t as normalizeCodexServiceTier } from "./service-tier-normalization-BPgw2Wdt.mjs";
|
|
3
|
+
import "./config-utils-DN_YT7dE.mjs";
|
|
4
|
+
import { asNullableRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
5
|
import { z } from "zod";
|
|
5
|
-
import { buildSecretInputSchema
|
|
6
|
+
import { buildSecretInputSchema } from "openclaw/plugin-sdk/secret-input";
|
|
6
7
|
import { detectWindowsSpawnCommandInlineArgs } from "openclaw/plugin-sdk/windows-spawn";
|
|
7
|
-
import { resolveGlobalSingleton } from "openclaw/plugin-sdk/global-singleton";
|
|
8
|
-
import { splitCommandArgs } from "openclaw/plugin-sdk/process-runtime";
|
|
9
|
-
//#region extensions/codex/src/app-server/config-utils.ts
|
|
10
|
-
const START_OPTIONS_KEY_SECRET = resolveGlobalSingleton(Symbol.for("openclaw.codexAppServerStartOptionsKeySecret"), () => randomBytes(32));
|
|
11
|
-
const PLAIN_DECIMAL_NUMBER_RE = /^[+-]?(?:(?:\d+\.?\d*)|(?:\.\d+))$/;
|
|
12
|
-
function isCodexFastServiceTier(value) {
|
|
13
|
-
return normalizeCodexServiceTier(value) === "priority";
|
|
14
|
-
}
|
|
15
|
-
function normalizeHeaders(value) {
|
|
16
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) return {};
|
|
17
|
-
return Object.fromEntries(Object.entries(value).map(([key, child]) => [key.trim(), normalizeResolvedSecretInputString({
|
|
18
|
-
value: child,
|
|
19
|
-
path: `plugins.entries.codex.config.appServer.headers.${key}`
|
|
20
|
-
})]).filter((entry) => Boolean(entry[0] && entry[1])));
|
|
21
|
-
}
|
|
22
|
-
function readExecSecurity(value) {
|
|
23
|
-
return value === "deny" || value === "allowlist" || value === "full" ? value : void 0;
|
|
24
|
-
}
|
|
25
|
-
function readExecAsk(value) {
|
|
26
|
-
return value === "off" || value === "on-miss" || value === "always" ? value : void 0;
|
|
27
|
-
}
|
|
28
|
-
function readNumberEnv(value) {
|
|
29
|
-
const trimmed = value?.trim();
|
|
30
|
-
if (!trimmed || !PLAIN_DECIMAL_NUMBER_RE.test(trimmed)) return;
|
|
31
|
-
const parsed = Number(trimmed);
|
|
32
|
-
return Number.isFinite(parsed) ? parsed : void 0;
|
|
33
|
-
}
|
|
34
|
-
function resolveArgs(configArgs, envArgs) {
|
|
35
|
-
if (Array.isArray(configArgs)) return normalizeTrimmedStringList(configArgs);
|
|
36
|
-
return splitCommandArgs(typeof configArgs === "string" ? configArgs : envArgs ?? "", { allowUnclosedQuotes: true });
|
|
37
|
-
}
|
|
38
|
-
function hashSecretForKey(value, label) {
|
|
39
|
-
if (!value) return null;
|
|
40
|
-
return createHmac("sha256", START_OPTIONS_KEY_SECRET).update(label).update("\0").update(value).digest("hex");
|
|
41
|
-
}
|
|
42
|
-
//#endregion
|
|
43
8
|
//#region extensions/codex/src/app-server/session-discovery-config.ts
|
|
44
9
|
const codexSessionCatalogHomeSchema = z.union([z.string().trim().min(1), z.object({
|
|
45
10
|
path: z.string().trim().min(1),
|
|
@@ -168,6 +133,13 @@ const codexPluginConfigSchema = z.strictObject({
|
|
|
168
133
|
headers: z.record(z.string(), SecretInputSchema).optional(),
|
|
169
134
|
clearEnv: z.array(z.string()).optional(),
|
|
170
135
|
remoteWorkspaceRoot: z.string().trim().min(1).optional(),
|
|
136
|
+
nativeHookRelay: z.strictObject({
|
|
137
|
+
url: z.string().url().refine((value) => {
|
|
138
|
+
const url = new URL(value);
|
|
139
|
+
return url.protocol === "https:" && !url.username && !url.password && !url.search && !url.hash;
|
|
140
|
+
}, "Native hook relay URL must use HTTPS without credentials, query, or fragment"),
|
|
141
|
+
credentialDirectory: z.string().trim().refine((value) => value.startsWith("/") && value !== "/" && !value.split("/").includes(".."), "Native hook relay credentials require an absolute private directory")
|
|
142
|
+
}).optional(),
|
|
171
143
|
codeModeOnly: z.boolean().optional(),
|
|
172
144
|
loopDetectionPreToolUseRelay: z.boolean().optional(),
|
|
173
145
|
requestTimeoutMs: z.number().positive().optional(),
|
|
@@ -195,6 +167,7 @@ function readCodexPluginConfig(value) {
|
|
|
195
167
|
if (appServer?.approvalPolicy === "untrusted") throw new Error("plugins.entries.codex.config.appServer.approvalPolicy=\"untrusted\" is retired; run \"openclaw doctor --fix\" to migrate it to \"on-request\".");
|
|
196
168
|
const parsed = codexPluginConfigSchema.safeParse(value);
|
|
197
169
|
if (!parsed.success) {
|
|
170
|
+
if (appServer?.nativeHookRelay !== void 0) throw new Error("Invalid plugins.entries.codex.config.appServer.nativeHookRelay configuration; remote hooks require an HTTPS URL and an absolute private credential directory.");
|
|
198
171
|
if (asNullableRecord(appServer?.networkProxy)?.enabled === true) {
|
|
199
172
|
const issuePath = parsed.error.issues[0]?.path ?? [];
|
|
200
173
|
const fieldDepth = issuePath[0] === "appServer" && issuePath[1] === "networkProxy" ? 3 : 2;
|
|
@@ -229,39 +202,30 @@ function assertCodexAppServerCommandHasNoInlineArgs(params) {
|
|
|
229
202
|
}
|
|
230
203
|
function resolveCodexPluginsPolicy(pluginConfig) {
|
|
231
204
|
const config = readCodexPluginConfig(pluginConfig).codexPlugins;
|
|
232
|
-
const configured = config !== void 0;
|
|
233
205
|
const enabled = config?.enabled === true;
|
|
234
|
-
const destructivePolicy = resolveCodexPluginDestructivePolicy(config?.allow_destructive_actions ?? true);
|
|
235
206
|
const pluginPolicies = Object.entries(config?.plugins ?? {}).flatMap(([configKey, entry]) => {
|
|
236
207
|
if (!entry.marketplaceName || !entry.pluginName) return [];
|
|
237
|
-
const entryDestructivePolicy = resolveCodexPluginDestructivePolicy(entry.allow_destructive_actions ?? config?.allow_destructive_actions ?? true);
|
|
238
208
|
return [{
|
|
239
209
|
configKey,
|
|
240
210
|
marketplaceName: entry.marketplaceName,
|
|
241
211
|
pluginName: entry.pluginName,
|
|
242
212
|
enabled: enabled && entry.enabled !== false,
|
|
243
|
-
|
|
244
|
-
destructiveApprovalMode: entryDestructivePolicy.destructiveApprovalMode
|
|
213
|
+
...resolveCodexPluginDestructivePolicy(entry.allow_destructive_actions ?? config?.allow_destructive_actions ?? true)
|
|
245
214
|
}];
|
|
246
215
|
}).toSorted((left, right) => left.configKey.localeCompare(right.configKey));
|
|
247
216
|
return {
|
|
248
|
-
configured,
|
|
217
|
+
configured: config !== void 0,
|
|
249
218
|
enabled,
|
|
250
219
|
allowAllPlugins: enabled && config?.allow_all_plugins === true,
|
|
251
|
-
|
|
252
|
-
destructiveApprovalMode: destructivePolicy.destructiveApprovalMode,
|
|
220
|
+
...resolveCodexPluginDestructivePolicy(config?.allow_destructive_actions ?? true),
|
|
253
221
|
pluginPolicies
|
|
254
222
|
};
|
|
255
223
|
}
|
|
256
224
|
function resolveCodexPluginDestructivePolicy(policy) {
|
|
257
|
-
if (policy === "auto" || policy === "ask") return {
|
|
258
|
-
allowDestructiveActions: true,
|
|
259
|
-
destructiveApprovalMode: policy
|
|
260
|
-
};
|
|
261
225
|
return {
|
|
262
|
-
allowDestructiveActions: policy,
|
|
263
|
-
destructiveApprovalMode: policy ? "allow" : "deny"
|
|
226
|
+
allowDestructiveActions: policy !== false,
|
|
227
|
+
destructiveApprovalMode: typeof policy === "string" ? policy : policy ? "allow" : "deny"
|
|
264
228
|
};
|
|
265
229
|
}
|
|
266
230
|
//#endregion
|
|
267
|
-
export {
|
|
231
|
+
export { DEFAULT_CODEX_COMPUTER_USE_PLUGIN_NAME as a, isCodexPairedNodeRemoteExecPlacementSandbox as c, readCodexPluginConfig as d, resolveCodexPluginsPolicy as f, DEFAULT_CODEX_COMPUTER_USE_MCP_SERVER_NAME as i, isCodexRemoteExecPlacementSandbox as l, DEFAULT_CODEX_COMPUTER_USE_LIVE_TEST_TIMEOUT_MS as n, DEFAULT_CODEX_COMPUTER_USE_TOOL_CALL_TIMEOUT_MS as o, DEFAULT_CODEX_COMPUTER_USE_MARKETPLACE_DISCOVERY_TIMEOUT_MS as r, assertCodexAppServerCommandHasNoInlineArgs as s, DEFAULT_CODEX_APP_SERVER_NETWORK_PROXY_PROFILE_PREFIX as t, isCodexSandboxExecServerEnabled as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as createCodexAppServerConfig } from "./config-options-
|
|
2
|
-
import { t as __exportAll } from "./session-binding-sidecars-
|
|
1
|
+
import { r as createCodexAppServerConfig } from "./config-options-DDzeNQ8m.mjs";
|
|
2
|
+
import { t as __exportAll } from "./session-binding-sidecars-DD-enC8w.mjs";
|
|
3
3
|
import { resolveProviderIdForAuth } from "openclaw/plugin-sdk/provider-auth-aliases";
|
|
4
4
|
//#region extensions/codex/src/app-server/config-runtime.ts
|
|
5
5
|
var config_runtime_exports = /* @__PURE__ */ __exportAll({
|