@openclaw/codex 2026.10.5-beta.4 → 2026.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.setup/{account-usage-runtime-CoVpNIlD.mjs → account-usage-runtime-E3SrjJVn.mjs} +3 -3
- package/dist/.setup/{app-server-policy-D_zv8J7V.mjs → app-server-policy-V8zuN8q_.mjs} +1 -1
- package/dist/.setup/{apply-BXDMd05l.mjs → apply-C3s-1Zxe.mjs} +14 -14
- package/dist/.setup/{attempt-client-cleanup-zNuNTKVr.mjs → attempt-client-cleanup-BVww-ct8.mjs} +5 -5
- package/dist/.setup/attempt-terminal-sZutF0WY.mjs +1 -0
- package/dist/.setup/{attempt-workspace-context-CcwP3DA3.mjs → attempt-workspace-context-BkA0W8Jy.mjs} +1 -1
- package/dist/.setup/{auth-binding-BaxlhaNx.mjs → auth-binding-BFTkrP_b.mjs} +1 -1
- package/dist/.setup/{auth-cache-key-f8ODJ_OX.mjs → auth-cache-key-CXK7tmkb.mjs} +6 -5
- package/dist/.setup/{auth-profile-health-oHizqgye.mjs → auth-profile-health-B05o5BAm.mjs} +12 -5
- package/dist/.setup/{binding-connection-B7HAAZSI.mjs → binding-connection-C0t9TBX_.mjs} +2 -2
- package/dist/.setup/{binding-connection.runtime-DAXn7iFl.mjs → binding-connection.runtime-Wdm5G_bw.mjs} +2 -2
- package/dist/.setup/{bounded-turn-isolation-BfDAo-qZ.mjs → bounded-turn-isolation-CIQJykuM.mjs} +4 -4
- package/dist/.setup/{bounded-turn-DfIJtRlv.mjs → bounded-turn-vdpL2efh.mjs} +13 -12
- package/dist/.setup/{build-state-Ds14X10-.mjs → build-state-DPMC9C_U.mjs} +1 -1
- package/dist/.setup/{client-D93nbdB8.mjs → client-Div-zqnz.mjs} +22 -18
- package/dist/.setup/{client-catalog-response-CuVLp4I0.mjs → client-catalog-response-Dtob_lVt.mjs} +1 -1
- package/dist/.setup/{command-dispatch-DxdH5a9-.mjs → command-dispatch-ByO36LmS.mjs} +1 -1
- package/dist/.setup/{command-handlers-fiYvYYq0.mjs → command-handlers-CJqo6LZS.mjs} +24 -24
- package/dist/.setup/{command-rpc-HIvsy3wS.mjs → command-rpc-Co0UzT-T.mjs} +11 -11
- package/dist/.setup/{compact-ClZ7Ar7L.mjs → compact-CzNBg4cQ.mjs} +13 -13
- package/dist/.setup/{computer-use-DL2v3Kxq.mjs → computer-use-BcDrQlxi.mjs} +8 -8
- package/dist/.setup/{config-C1YVVLEA.mjs → config-LQemoqTL.mjs} +5 -6
- package/dist/.setup/{config-options-DDzeNQ8m.mjs → config-options-CZmH25Xq.mjs} +2 -3
- package/dist/.setup/{config-parsing-DsWSCPHO.mjs → config-parsing-CVK2Q463.mjs} +44 -6
- package/dist/.setup/{config-runtime-DWzK-k0n.mjs → config-runtime-DGB1-VbB.mjs} +2 -2
- package/dist/.setup/{config-security-clxAZYWX.mjs → config-security-DpkGNy5T.mjs} +2 -3
- package/dist/.setup/{conversation-binding-BieJZRRV.mjs → conversation-binding-Dcv7_rs-.mjs} +42 -33
- package/dist/.setup/{conversation-binding-data-UgLuTSQT.mjs → conversation-binding-data-GRGSgAro.mjs} +1 -1
- package/dist/.setup/{conversation-control-GXM3unE4.mjs → conversation-control-BtPxevoK.mjs} +4 -4
- package/dist/.setup/{cyber-failover-D4dgNfFf.mjs → cyber-failover-B-q6oT01.mjs} +2 -2
- package/dist/.setup/{cyber-failover-notice-ljgGGL0s.mjs → cyber-failover-notice-poL3Advd.mjs} +1 -1
- package/dist/.setup/{doctor-start-options-JjTAl-q_.mjs → doctor-start-options-C28ek2hD.mjs} +5 -5
- package/dist/.setup/{dynamic-tool-build-DcaPmBlE.mjs → dynamic-tool-build-DjbDZzOJ.mjs} +5 -5
- package/dist/.setup/{dynamic-tools-CnQFnNKH.mjs → dynamic-tools-75qoSOch.mjs} +10 -10
- package/dist/.setup/{effective-mcp-catalog-B5HKFZNK.mjs → effective-mcp-catalog-Dz0J8iAj.mjs} +7 -7
- package/dist/.setup/{ephemeral-turn-De3qb8EQ.mjs → ephemeral-turn-K_d99r9P.mjs} +2 -2
- package/dist/.setup/{inference-proxy-BDWV0djM.mjs → inference-proxy-DSnaS-uS.mjs} +5 -4
- package/dist/.setup/{isolated-completion-BPJdvk5F.mjs → isolated-completion-dNt4kRLw.mjs} +7 -7
- package/dist/.setup/{managed-binary-BtIjV7yN.mjs → managed-binary-DwC9wxch.mjs} +1 -1
- package/dist/.setup/{mcp-app-session-preparation-Dz2GOwyE.mjs → mcp-app-session-preparation-C7LyxbAm.mjs} +12 -17
- package/dist/.setup/{mcp-tool-metadata-DW41snf3.mjs → mcp-tool-metadata-_sawBkIh.mjs} +1 -1
- package/dist/.setup/{model-catalog-ZNwltCKl.mjs → model-catalog-BRJ7RMXY.mjs} +8 -8
- package/dist/.setup/{models-BHpbAuz8.mjs → models-CusrgpiY.mjs} +3 -3
- package/dist/.setup/{native-auth-esN5MdIv.mjs → native-auth-CveRfTpz.mjs} +4 -4
- package/dist/.setup/{native-hook-relay-wq7jrNLk.mjs → native-hook-relay-BvwSj5bt.mjs} +5 -5
- package/dist/.setup/{native-mcp-app-DX3nyTtc.mjs → native-mcp-app-DDEtVQED.mjs} +6 -6
- package/dist/.setup/{native-skill-isolation-DSBeF-Yy.mjs → native-skill-isolation-Cx2AkUco.mjs} +3 -3
- package/dist/.setup/{native-subagent-monitor-DOLEIf9r.mjs → native-subagent-monitor-CBYFkNsB.mjs} +67 -20
- package/dist/.setup/{native-task-assignments-DimsQ9Qa.mjs → native-task-assignments-DYL9uxNe.mjs} +3 -3
- package/dist/.setup/{node-cli-sessions-CzKg2nGq.mjs → node-cli-sessions-BxVYZNuY.mjs} +2 -2
- package/dist/.setup/{node-exec-server.runtime-BWkULhBM.mjs → node-exec-server.runtime-8RehgPdQ.mjs} +2 -2
- package/dist/.setup/{plan-41-YOBMq.mjs → plan-BKFbfVsV.mjs} +5 -5
- package/dist/.setup/{plugin-activation-D7WkJMvU.mjs → plugin-activation-BgfNFH2L.mjs} +2 -2
- package/dist/.setup/{plugin-approval-roundtrip-CD88q3yx.mjs → plugin-approval-roundtrip-CXXXhuKi.mjs} +1 -1
- package/dist/.setup/{plugin-inventory-CYgdo14P.mjs → plugin-inventory-OhiCoyPH.mjs} +1 -1
- package/dist/.setup/{plugin-marketplace-discovery-BblHM3DU.mjs → plugin-marketplace-discovery-BNyI1zd_.mjs} +1 -1
- package/dist/.setup/{project-doc-thread-config-BVcvnps8.mjs → project-doc-thread-config-D_sWbxFR.mjs} +6 -6
- package/dist/.setup/{provider-LWKll6dV.mjs → provider-BVV8SWlx.mjs} +4 -4
- package/dist/.setup/{provider-capabilities-Dn2WwH4P.mjs → provider-capabilities-B-pTlDsf.mjs} +1 -1
- package/dist/.setup/{request-Bo0kKABI.mjs → request-m-H-7FMu.mjs} +6 -6
- package/dist/.setup/{run-attempt-ClU8MxhZ.mjs → run-attempt-Ch1emiZE.mjs} +113 -74
- package/dist/.setup/{run-attempt-lifecycle-KN4oh-7O.mjs → run-attempt-lifecycle-DN-ATDp9.mjs} +1 -1
- package/dist/.setup/{runtime-artifact-C13pR7tD.mjs → runtime-artifact-CCPLKFGR.mjs} +3 -3
- package/dist/.setup/{runtime-artifact-connection-jS5DeCok.mjs → runtime-artifact-connection-dFoSOKy7.mjs} +3 -3
- package/dist/.setup/{sandbox-guard-DIImwCy1.mjs → sandbox-guard-Cf9XMRrg.mjs} +2 -2
- package/dist/.setup/{service-tier-normalization-BPgw2Wdt.mjs → service-tier-normalization-C2OVdF6E.mjs} +4 -1
- package/dist/.setup/{session-binding-JEHNMPsr.mjs → session-binding-BDnNz-Co.mjs} +3 -3
- package/dist/.setup/{session-binding-record-DU_0biMD.mjs → session-binding-record-C2kDBZhx.mjs} +2 -2
- package/dist/.setup/{session-binding-record-codec-BpH8u_G9.mjs → session-binding-record-codec-CWQXr9os.mjs} +1 -2
- package/dist/.setup/{session-binding-sidecars-DD-enC8w.mjs → session-binding-sidecars-DijNZb31.mjs} +1 -1
- package/dist/.setup/{session-catalog-adoption-Ca3OYGYM.mjs → session-catalog-adoption-Cl6fHxS5.mjs} +5 -5
- package/dist/.setup/{session-catalog-archive-Bv6gV7x9.mjs → session-catalog-archive-CUU7jEkO.mjs} +5 -5
- package/dist/.setup/{session-catalog-events-kR2Ot6nX.mjs → session-catalog-events-BBV3DMG7.mjs} +5 -5
- package/dist/.setup/{session-catalog-index-CrnfVEnT.mjs → session-catalog-index-B00GIRi3.mjs} +8 -8
- package/dist/.setup/{session-catalog-index-order-CTfoefow.mjs → session-catalog-index-order-B30rjUEJ.mjs} +1 -1
- package/dist/.setup/{session-catalog-limits-BynIoOYm.mjs → session-catalog-limits-Daqt3JLk.mjs} +1 -1
- package/dist/.setup/{session-catalog-list-request-D4MYNgDB.mjs → session-catalog-list-request-SJyGz02j.mjs} +3 -3
- package/dist/.setup/{session-catalog-native-projection-CWqCU1I_.mjs → session-catalog-native-projection-BJupfCyt.mjs} +4 -4
- package/dist/.setup/{session-catalog-node-adoption-BdP9Zjqo.mjs → session-catalog-node-adoption-D11N0CMr.mjs} +2 -2
- package/dist/.setup/{session-catalog-node-continue-CNJibO4_.mjs → session-catalog-node-continue-Ct62GeL1.mjs} +5 -5
- package/dist/.setup/{session-catalog-node-lookup-BH_DBGa9.mjs → session-catalog-node-lookup-DQVe6vhs.mjs} +2 -2
- package/dist/.setup/{session-catalog-parsing-DkeoVn60.mjs → session-catalog-parsing-B4OyhylL.mjs} +1 -1
- package/dist/.setup/{session-catalog-projection-BzHiV818.mjs → session-catalog-projection-CYgFTaYm.mjs} +4 -4
- package/dist/.setup/{session-catalog-source-DGuRdGvM.mjs → session-catalog-source-Xt6-hNns.mjs} +1 -1
- package/dist/.setup/{session-cli-GwU0izn-.mjs → session-cli-BoJSZfGd.mjs} +1 -1
- package/dist/.setup/{session-history-import-CaO8s6ta.mjs → session-history-import-DgwRu2eD.mjs} +4 -4
- package/dist/.setup/{session-initialization-Bi_2DKhc.mjs → session-initialization-BjVtsTzi.mjs} +2 -2
- package/dist/.setup/{session-permission-policy-CD2MAWU8.mjs → session-permission-policy-C7kYxPGd.mjs} +1 -1
- package/dist/.setup/{session-retirement-B3U5hpGJ.mjs → session-retirement-DIqF1vQ4.mjs} +6 -6
- package/dist/.setup/{settled-turn-finalizer-CYCVpTv2.mjs → settled-turn-finalizer-dVv34G_E.mjs} +5 -5
- package/dist/.setup/{shared-client-BCx1wbyA.mjs → shared-client-CNGDTv68.mjs} +32 -20
- package/dist/.setup/{side-question-Bz2UQW0l.mjs → side-question-D1Wa21s9.mjs} +22 -22
- package/dist/.setup/{source-DipMO9hL.mjs → source-DyVuYlTN.mjs} +4 -4
- package/dist/.setup/{thread-lifecycle-run-C_aYiYqk.mjs → thread-lifecycle-run-DjSfTw6v.mjs} +66 -42
- package/dist/.setup/{thread-ownership-BoUd0i6L.mjs → thread-ownership-BBsOFzCM.mjs} +4 -4
- package/dist/.setup/{thread-policy-B3wBRNph.mjs → thread-policy-BEiS7ITh.mjs} +3 -3
- package/dist/.setup/{thread-requests-BgzJwJtS.mjs → thread-requests-DjyDmCo4.mjs} +11 -32
- package/dist/.setup/{thread-resume-D-3bsr1j.mjs → thread-resume-BqOca2Iy.mjs} +4 -4
- package/dist/.setup/{transcript-mirror-Bee2o6jj.mjs → transcript-mirror-DVEzdOs0.mjs} +1 -1
- package/dist/.setup/{transport-stdio-CRWTkKOn.mjs → transport-stdio-lgeKKHyw.mjs} +2 -17
- package/dist/.setup/{transport-websocket-DIyPfkHo.mjs → transport-websocket-CEBjEtFP.mjs} +1 -1
- package/dist/.setup/{turn-router-DBVMToGo.mjs → turn-router-DM0fRrYI.mjs} +1 -1
- package/dist/.setup/{upstream-session-fork-p5fwKi7w.mjs → upstream-session-fork-CxgShpwe.mjs} +19 -19
- package/dist/.setup/{usage-C2Kq7oej.mjs → usage-DV8T9Yau.mjs} +3 -3
- package/dist/.setup/{usage-limit-error-BQX8RHAd.mjs → usage-limit-error-ryR1PGou.mjs} +1 -1
- package/dist/.setup/{web-search-provider.runtime-D89djc7e.mjs → web-search-provider.runtime-DkciK2gS.mjs} +2 -2
- package/dist/.setup/{workspace-write-sandbox-probe-BDWO2Qkh.mjs → workspace-write-sandbox-probe-DvfWTvuR.mjs} +2 -2
- package/dist/api.js +4 -4
- package/dist/catalog-page.worker.js +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +5 -5
- package/dist/harness.js +22 -22
- package/dist/index.js +56 -56
- package/dist/media-understanding-provider.js +2 -2
- package/dist/migration-provider-api.js +1 -2
- package/dist/native-session-binding-api.js +1 -2
- package/dist/provider-discovery.js +1 -1
- package/dist/session-history.worker.js +1 -2
- package/package.json +4 -4
- package/dist/.setup/attempt-terminal-jO5IMj9K.mjs +0 -2
- package/dist/.setup/config-contracts.shared-D85SGEuq.mjs +0 -4
- package/dist/.setup/config-utils-DN_YT7dE.mjs +0 -47
package/dist/harness.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CODEX_NATIVE_TOOL_REQUIREMENTS, CODEX_TOOL_POLICY_SAFE_DENY_NAMES } from "./native-tool-policy.js";
|
|
2
2
|
import { n as readCodexRuntimeModelId } from "./.setup/model-runtime-BdqzOMkU.mjs";
|
|
3
|
-
import { m as sessionBindingIdentity } from "./.setup/session-binding-record-
|
|
4
|
-
import { t as codexBuildSymbol } from "./.setup/build-state-
|
|
3
|
+
import { m as sessionBindingIdentity } from "./.setup/session-binding-record-C2kDBZhx.mjs";
|
|
4
|
+
import { t as codexBuildSymbol } from "./.setup/build-state-DPMC9C_U.mjs";
|
|
5
5
|
import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
6
6
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
//#region extensions/codex/harness.ts
|
|
@@ -93,7 +93,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
93
93
|
executionEnvironment: "host-only",
|
|
94
94
|
upstreamKinds: ["codex-app-server"],
|
|
95
95
|
fork: async (params) => {
|
|
96
|
-
const { forkCodexUpstreamSession } = await import("./.setup/upstream-session-fork-
|
|
96
|
+
const { forkCodexUpstreamSession } = await import("./.setup/upstream-session-fork-CxgShpwe.mjs");
|
|
97
97
|
return await forkCodexUpstreamSession(params, {
|
|
98
98
|
bindingStore: options.bindingStore,
|
|
99
99
|
controlFactory: sessionCatalogControlFactory,
|
|
@@ -104,22 +104,22 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
104
104
|
}
|
|
105
105
|
} } : {},
|
|
106
106
|
authBinding: { fingerprint: async (params) => {
|
|
107
|
-
const { fingerprintCodexAppServerAuthBinding } = await import("./.setup/auth-binding-
|
|
107
|
+
const { fingerprintCodexAppServerAuthBinding } = await import("./.setup/auth-binding-BFTkrP_b.mjs").then((n) => n.t);
|
|
108
108
|
return fingerprintCodexAppServerAuthBinding(params);
|
|
109
109
|
} },
|
|
110
110
|
runtimeArtifact: { validate: async (binding) => {
|
|
111
|
-
const { validateCodexAppServerRuntimeArtifact } = await import("./.setup/runtime-artifact-
|
|
112
|
-
const { isCodexConfiguredConnectionArtifact } = await import("./.setup/runtime-artifact-connection-
|
|
111
|
+
const { validateCodexAppServerRuntimeArtifact } = await import("./.setup/runtime-artifact-CCPLKFGR.mjs");
|
|
112
|
+
const { isCodexConfiguredConnectionArtifact } = await import("./.setup/runtime-artifact-connection-dFoSOKy7.mjs");
|
|
113
113
|
if (!isCodexConfiguredConnectionArtifact(binding.id)) return validateCodexAppServerRuntimeArtifact(binding);
|
|
114
|
-
const { resolveCodexAppServerRuntimeOptions } = await import("./.setup/config-
|
|
114
|
+
const { resolveCodexAppServerRuntimeOptions } = await import("./.setup/config-LQemoqTL.mjs").then((n) => n.t);
|
|
115
115
|
return validateCodexAppServerRuntimeArtifact(binding, void 0, resolveCodexAppServerRuntimeOptions({ pluginConfig: resolveAttemptPluginConfig(options.resolveConfig?.()) }).start);
|
|
116
116
|
} },
|
|
117
117
|
fetchUsageSnapshot: async (ctx) => {
|
|
118
|
-
const { fetchCodexAppServerUsageSnapshot } = await import("./.setup/usage-
|
|
118
|
+
const { fetchCodexAppServerUsageSnapshot } = await import("./.setup/usage-DV8T9Yau.mjs");
|
|
119
119
|
return await fetchCodexAppServerUsageSnapshot(ctx, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
|
|
120
120
|
},
|
|
121
121
|
loadModelCatalog: async (params) => {
|
|
122
|
-
const { createCodexAppServerModelCatalog } = await import("./.setup/model-catalog-
|
|
122
|
+
const { createCodexAppServerModelCatalog } = await import("./.setup/model-catalog-BRJ7RMXY.mjs");
|
|
123
123
|
if (disposed) return { entries: [] };
|
|
124
124
|
modelCatalog ??= createCodexAppServerModelCatalog(harnessRuntimeId);
|
|
125
125
|
return { entries: await modelCatalog.load(params, resolveAttemptPluginConfig(params.config)) };
|
|
@@ -129,7 +129,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
129
129
|
return asOptionalRecord(asOptionalRecord(resolveAttemptPluginConfig(config))?.appServer)?.enableUltrafast === false ? serviceTiers.filter((tier) => tier !== "ultrafast") : serviceTiers;
|
|
130
130
|
},
|
|
131
131
|
acquireMcpAppRuntime: async (params) => {
|
|
132
|
-
const { acquireCodexMcpAppRuntime } = await import("./.setup/effective-mcp-catalog-
|
|
132
|
+
const { acquireCodexMcpAppRuntime } = await import("./.setup/effective-mcp-catalog-Dz0J8iAj.mjs");
|
|
133
133
|
if (disposed) return;
|
|
134
134
|
params.assertCurrent();
|
|
135
135
|
return await acquireCodexMcpAppRuntime(params, {
|
|
@@ -138,7 +138,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
138
138
|
});
|
|
139
139
|
},
|
|
140
140
|
loadMcpToolCatalog: async (params) => {
|
|
141
|
-
const { loadCodexEffectiveMcpCatalog } = await import("./.setup/effective-mcp-catalog-
|
|
141
|
+
const { loadCodexEffectiveMcpCatalog } = await import("./.setup/effective-mcp-catalog-Dz0J8iAj.mjs");
|
|
142
142
|
return await loadCodexEffectiveMcpCatalog(params, { bindingStore: options.bindingStore });
|
|
143
143
|
},
|
|
144
144
|
supports: (ctx) => {
|
|
@@ -170,9 +170,9 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
170
170
|
};
|
|
171
171
|
},
|
|
172
172
|
runAttempt: async (params) => {
|
|
173
|
-
const { runCodexAppServerAttempt } = await import("./.setup/run-attempt-
|
|
174
|
-
const { planCodexCyberEscalation, readCodexCyberAttemptVerdict, recordCodexCyberTargetUnavailable, reserveCodexCyberProbe, resolveCodexCyberFailoverConfig } = await import("./.setup/cyber-failover-
|
|
175
|
-
const { emitCodexCyberNotice } = await import("./.setup/cyber-failover-notice-
|
|
173
|
+
const { runCodexAppServerAttempt } = await import("./.setup/run-attempt-Ch1emiZE.mjs");
|
|
174
|
+
const { planCodexCyberEscalation, readCodexCyberAttemptVerdict, recordCodexCyberTargetUnavailable, reserveCodexCyberProbe, resolveCodexCyberFailoverConfig } = await import("./.setup/cyber-failover-B-q6oT01.mjs");
|
|
175
|
+
const { emitCodexCyberNotice } = await import("./.setup/cyber-failover-notice-poL3Advd.mjs");
|
|
176
176
|
const pluginConfig = resolveAttemptPluginConfig(params.config);
|
|
177
177
|
const attemptModel = readCodexRuntimeModelId(params.model, params.modelId);
|
|
178
178
|
const runAttemptOnModel = (model, isRetry = false) => runCodexAppServerAttempt(isRetry ? {
|
|
@@ -236,7 +236,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
236
236
|
const { runHostPreparedIsolatedCompletion } = await import("openclaw/plugin-sdk/simple-completion-runtime");
|
|
237
237
|
return runHostPreparedIsolatedCompletion(params);
|
|
238
238
|
}
|
|
239
|
-
const { runCodexIsolatedCompletion } = await import("./.setup/isolated-completion-
|
|
239
|
+
const { runCodexIsolatedCompletion } = await import("./.setup/isolated-completion-dNt4kRLw.mjs");
|
|
240
240
|
return runCodexIsolatedCompletion(params, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
|
|
241
241
|
},
|
|
242
242
|
runIsolatedCompletion: async (params) => {
|
|
@@ -252,11 +252,11 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
252
252
|
});
|
|
253
253
|
},
|
|
254
254
|
finalizeSettledTurn: async (params) => {
|
|
255
|
-
const { runCodexSettledTurnFinalization } = await import("./.setup/settled-turn-finalizer-
|
|
255
|
+
const { runCodexSettledTurnFinalization } = await import("./.setup/settled-turn-finalizer-dVv34G_E.mjs");
|
|
256
256
|
return runCodexSettledTurnFinalization(params, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
|
|
257
257
|
},
|
|
258
258
|
runSideQuestion: async (params) => {
|
|
259
|
-
const { runCodexAppServerSideQuestion } = await import("./.setup/side-question-
|
|
259
|
+
const { runCodexAppServerSideQuestion } = await import("./.setup/side-question-D1Wa21s9.mjs");
|
|
260
260
|
return runCodexAppServerSideQuestion(params, {
|
|
261
261
|
bindingStore: options.bindingStore,
|
|
262
262
|
pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig,
|
|
@@ -267,25 +267,25 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
267
267
|
},
|
|
268
268
|
compact: async (params) => {
|
|
269
269
|
const admittedParams = requireCodexCompactionCapabilities(params);
|
|
270
|
-
const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-
|
|
270
|
+
const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-CzNBg4cQ.mjs");
|
|
271
271
|
return maybeCompactCodexAppServerSession(admittedParams, {
|
|
272
272
|
bindingStore: options.bindingStore,
|
|
273
273
|
pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig
|
|
274
274
|
});
|
|
275
275
|
},
|
|
276
276
|
withSessionDeletion: async (params, run) => {
|
|
277
|
-
const { withCodexAppServerSessionDeletion } = await import("./.setup/session-retirement-
|
|
277
|
+
const { withCodexAppServerSessionDeletion } = await import("./.setup/session-retirement-DIqF1vQ4.mjs");
|
|
278
278
|
params.assertCurrent();
|
|
279
279
|
return withCodexAppServerSessionDeletion(options.bindingStore, params, run);
|
|
280
280
|
},
|
|
281
281
|
withSessionContextReset: async (params, run) => {
|
|
282
|
-
const { withCodexAppServerSessionContextReset } = await import("./.setup/session-retirement-
|
|
282
|
+
const { withCodexAppServerSessionContextReset } = await import("./.setup/session-retirement-DIqF1vQ4.mjs");
|
|
283
283
|
params.assertCurrent();
|
|
284
284
|
return withCodexAppServerSessionContextReset(options.bindingStore, params, run);
|
|
285
285
|
},
|
|
286
286
|
reset: async (params) => {
|
|
287
287
|
if (params.sessionId && params.reason !== "deleted") {
|
|
288
|
-
const [{ reclaimCurrentCodexSessionGeneration }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./.setup/session-binding-
|
|
288
|
+
const [{ reclaimCurrentCodexSessionGeneration }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./.setup/session-binding-BDnNz-Co.mjs").then((n) => n.a), import("./.setup/session-retirement-DIqF1vQ4.mjs")]);
|
|
289
289
|
const identity = sessionBindingIdentity({
|
|
290
290
|
agentId: params.agentId,
|
|
291
291
|
sessionId: params.sessionId,
|
|
@@ -318,7 +318,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
318
318
|
function createCodexAppServerNativeCompaction(options) {
|
|
319
319
|
return async (params) => {
|
|
320
320
|
const admittedParams = requireCodexCompactionCapabilities(params);
|
|
321
|
-
const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-
|
|
321
|
+
const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-CzNBg4cQ.mjs");
|
|
322
322
|
return maybeCompactCodexAppServerSession(admittedParams, {
|
|
323
323
|
bindingStore: options.bindingStore,
|
|
324
324
|
pluginConfig: options.resolvePluginConfig?.() ?? options.pluginConfig,
|
package/dist/index.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { registerCodexCliMetadata } from "./cli-metadata.js";
|
|
2
|
-
import { A as unwrapNodeInvokePayload, C as readGatewayParams, E as requireOnlyKeys, S as readControlCursor, _ as normalizeLimit, a as CODEX_LOCAL_SESSION_HOST_ID, b as parseTranscriptPage, f as catalogError, g as isInteractiveThreadSource, h as filterCatalogPageByTitle, i as CODEX_CATALOG_TRANSCRIPT_READ_COMMAND, j as CODEX_INTERACTIVE_THREAD_SOURCE_KINDS, l as MAX_TRANSCRIPT_PAGE_BYTES, n as CODEX_APP_SERVER_THREADS_LIST_COMMAND, o as CatalogParamsError, r as CODEX_APP_SERVER_THREAD_TURNS_LIST_COMMAND, s as MAX_CURSOR_LENGTH, t as CODEX_APP_SERVER_THREADS_CAPABILITY, u as NODE_INVOKE_TIMEOUT_MS, v as parseCatalogPage, w as readPageParams, x as readBoundedOptionalString, y as parseJsonParams } from "./.setup/session-catalog-parsing-
|
|
2
|
+
import { A as unwrapNodeInvokePayload, C as readGatewayParams, E as requireOnlyKeys, S as readControlCursor, _ as normalizeLimit, a as CODEX_LOCAL_SESSION_HOST_ID, b as parseTranscriptPage, f as catalogError, g as isInteractiveThreadSource, h as filterCatalogPageByTitle, i as CODEX_CATALOG_TRANSCRIPT_READ_COMMAND, j as CODEX_INTERACTIVE_THREAD_SOURCE_KINDS, l as MAX_TRANSCRIPT_PAGE_BYTES, n as CODEX_APP_SERVER_THREADS_LIST_COMMAND, o as CatalogParamsError, r as CODEX_APP_SERVER_THREAD_TURNS_LIST_COMMAND, s as MAX_CURSOR_LENGTH, t as CODEX_APP_SERVER_THREADS_CAPABILITY, u as NODE_INVOKE_TIMEOUT_MS, v as parseCatalogPage, w as readPageParams, x as readBoundedOptionalString, y as parseJsonParams } from "./.setup/session-catalog-parsing-B4OyhylL.mjs";
|
|
3
3
|
import { i as isJsonObject, n as assertCodexThreadForkParams } from "./.setup/protocol-CANUwXJ3.mjs";
|
|
4
|
-
import { d as readCurrentCodexNativeSubagentSubmissions, f as readCurrentNativePendingAssignments, l as readCurrentCodexAppServerBinding, m as sessionBindingIdentity, n as assertCodexBindingMayBeReplaced, u as readCurrentCodexAppServerBindings } from "./.setup/session-binding-record-
|
|
5
|
-
import { n as defineCodexBuildState } from "./.setup/build-state-
|
|
4
|
+
import { d as readCurrentCodexNativeSubagentSubmissions, f as readCurrentNativePendingAssignments, l as readCurrentCodexAppServerBinding, m as sessionBindingIdentity, n as assertCodexBindingMayBeReplaced, u as readCurrentCodexAppServerBindings } from "./.setup/session-binding-record-C2kDBZhx.mjs";
|
|
5
|
+
import { n as defineCodexBuildState } from "./.setup/build-state-DPMC9C_U.mjs";
|
|
6
6
|
import { createCodexAppServerAgentHarness, createCodexAppServerNativeCompaction } from "./harness.js";
|
|
7
7
|
import { buildCodexMediaUnderstandingProvider } from "./media-understanding-provider.js";
|
|
8
8
|
import codexProviderDiscovery from "./provider-discovery.js";
|
|
9
9
|
import { n as createCodexAuthProfileSelection } from "./.setup/auth-profile-selection-hr8ocLtz.mjs";
|
|
10
|
-
import { t as assertCodexAppServerConnectionSecurity } from "./.setup/config-security-
|
|
11
|
-
import { d as readCodexPluginConfig } from "./.setup/config-parsing-
|
|
10
|
+
import { t as assertCodexAppServerConnectionSecurity } from "./.setup/config-security-DpkGNy5T.mjs";
|
|
11
|
+
import { d as readCodexPluginConfig } from "./.setup/config-parsing-CVK2Q463.mjs";
|
|
12
12
|
import { n as resolveCodexAppServerLocalHomeDir, r as resolveCodexAppServerUserHomeDir, t as resolveCodexAppServerHomeDir } from "./.setup/auth-start-options-BPIPeEX8.mjs";
|
|
13
|
-
import { r as createCodexAppServerConfig, t as codexAppServerStartOptionsKey } from "./.setup/config-options-
|
|
14
|
-
import { o as setManagedCodexPluginRoot } from "./.setup/managed-binary-
|
|
15
|
-
import { O as createCodexDesktopGenerationService, T as retireSharedCodexAppServerClientsBeforeDesktopGeneration, m as hasActiveSharedCodexAppServerWork, p as getSharedCodexAppServerClientState, s as resolveCodexAppServerFallbackApiKeyCacheKey } from "./.setup/auth-cache-key-
|
|
13
|
+
import { r as createCodexAppServerConfig, t as codexAppServerStartOptionsKey } from "./.setup/config-options-CZmH25Xq.mjs";
|
|
14
|
+
import { o as setManagedCodexPluginRoot } from "./.setup/managed-binary-DwC9wxch.mjs";
|
|
15
|
+
import { O as createCodexDesktopGenerationService, T as retireSharedCodexAppServerClientsBeforeDesktopGeneration, m as hasActiveSharedCodexAppServerWork, p as getSharedCodexAppServerClientState, s as resolveCodexAppServerFallbackApiKeyCacheKey } from "./.setup/auth-cache-key-CXK7tmkb.mjs";
|
|
16
16
|
import { i as CODEX_APP_SERVER_BINDING_NAMESPACE, r as CODEX_APP_SERVER_BINDING_MAX_ENTRIES } from "./.setup/session-binding-meta-Lkm5Lpf4.mjs";
|
|
17
|
-
import {
|
|
18
|
-
import { n as codexNativeProfileRecoveryService } from "./.setup/auth-profile-health-
|
|
17
|
+
import { s as createCodexAppServerProcessReaperService } from "./.setup/transport-stdio-lgeKKHyw.mjs";
|
|
18
|
+
import { n as codexNativeProfileRecoveryService } from "./.setup/auth-profile-health-B05o5BAm.mjs";
|
|
19
19
|
import { n as withCodexConversationThreadActivity } from "./.setup/thread-ownership-queue-CeyYScUC.mjs";
|
|
20
20
|
import { a as canMutateCodexHost, r as CODEX_NATIVE_EXECUTION_AUTH_ERROR } from "./.setup/command-authorization-AikPDtcc.mjs";
|
|
21
21
|
import { o as formatCodexDisplayText } from "./.setup/command-formatters-xW9KpoSZ.mjs";
|
|
22
|
-
import { a as readCodexConversationBindingDataRecord, i as readCodexConversationBindingData, o as resolveCodexDefaultWorkspaceDir } from "./.setup/conversation-binding-data-
|
|
23
|
-
import { t as buildCodexMigrationProvider } from "./.setup/provider-
|
|
22
|
+
import { a as readCodexConversationBindingDataRecord, i as readCodexConversationBindingData, o as resolveCodexDefaultWorkspaceDir } from "./.setup/conversation-binding-data-GRGSgAro.mjs";
|
|
23
|
+
import { t as buildCodexMigrationProvider } from "./.setup/provider-BVV8SWlx.mjs";
|
|
24
24
|
import { r as CodexAppServerRpcError, s as isCodexThreadReadMissingError } from "./.setup/rpc-error-C98SHchT.mjs";
|
|
25
25
|
import { t as CODEX_CONTROL_METHODS } from "./.setup/capabilities-DbOzOglY.mjs";
|
|
26
|
-
import { n as filterCodexMarketplacePlugins, t as discoverCodexMarketplacePlugins } from "./.setup/plugin-marketplace-discovery-
|
|
26
|
+
import { n as filterCodexMarketplacePlugins, t as discoverCodexMarketplacePlugins } from "./.setup/plugin-marketplace-discovery-BNyI1zd_.mjs";
|
|
27
27
|
import { t as assertCodexArchiveDescendantsUnowned } from "./.setup/thread-archive-guard-LKdwQKyr.mjs";
|
|
28
|
-
import { a as createCodexCliSessionNodeInvokePolicies, c as resolveCodexCliSessionForBindingOnNode, i as createCodexCliSessionNodeHostCommands, l as resumeCodexCliSessionOnNode, s as listCodexCliSessionsOnNode } from "./.setup/node-cli-sessions-
|
|
28
|
+
import { a as createCodexCliSessionNodeInvokePolicies, c as resolveCodexCliSessionForBindingOnNode, i as createCodexCliSessionNodeHostCommands, l as resumeCodexCliSessionOnNode, s as listCodexCliSessionsOnNode } from "./.setup/node-cli-sessions-BxVYZNuY.mjs";
|
|
29
29
|
import { n as codexCatalogHomeIdFromCanonicalPath } from "./.setup/session-catalog-home-id-vlih0B_g.mjs";
|
|
30
|
-
import { t as CODEX_CATALOG_MAX_ROWS } from "./.setup/session-catalog-limits-
|
|
31
|
-
import { a as CodexCatalogLoadingError, n as currentCodexCatalogListRequest, o as withCodexCatalogLoadingTimeout, r as withCodexCatalogListRequest, s as CODEX_CATALOG_STATE_NAMESPACE, t as CodexCatalogListRequest } from "./.setup/session-catalog-list-request-
|
|
30
|
+
import { t as CODEX_CATALOG_MAX_ROWS } from "./.setup/session-catalog-limits-Daqt3JLk.mjs";
|
|
31
|
+
import { a as CodexCatalogLoadingError, n as currentCodexCatalogListRequest, o as withCodexCatalogLoadingTimeout, r as withCodexCatalogListRequest, s as CODEX_CATALOG_STATE_NAMESPACE, t as CodexCatalogListRequest } from "./.setup/session-catalog-list-request-SJyGz02j.mjs";
|
|
32
32
|
import { i as withTimeout$1 } from "./.setup/timeout-D0mEWSGG.mjs";
|
|
33
|
-
import { t as lookupNodeCodexCatalogRecord } from "./.setup/session-catalog-node-lookup-
|
|
33
|
+
import { t as lookupNodeCodexCatalogRecord } from "./.setup/session-catalog-node-lookup-DQVe6vhs.mjs";
|
|
34
34
|
import { r as projectCodexUserItemText } from "./.setup/transcript-history-projection-DfKcoZCB.mjs";
|
|
35
35
|
import { r as codexUpstreamContinueResult } from "./.setup/session-upstream-marker-D15C9NHp.mjs";
|
|
36
36
|
import { t as buildCodexAppServerConnectionFingerprint } from "./.setup/plugin-app-cache-key-Bg9DbDI6.mjs";
|
|
37
37
|
import { n as readCodexSessionMeta } from "./.setup/session-catalog-provenance-CmsOE5mh.mjs";
|
|
38
|
-
import { t as codexCatalogResidentHomeKey } from "./.setup/session-catalog-events-
|
|
39
|
-
import { a as setCodexCatalogConnectionHomeResolver } from "./.setup/binding-connection-
|
|
38
|
+
import { t as codexCatalogResidentHomeKey } from "./.setup/session-catalog-events-BBV3DMG7.mjs";
|
|
39
|
+
import { a as setCodexCatalogConnectionHomeResolver } from "./.setup/binding-connection-C0t9TBX_.mjs";
|
|
40
40
|
import { n as findCodexAppServerSpawnError } from "./.setup/spawn-error-CL3n6MAa.mjs";
|
|
41
|
-
import { r as requestCodexAppServerJson } from "./.setup/request-
|
|
41
|
+
import { r as requestCodexAppServerJson } from "./.setup/request-m-H-7FMu.mjs";
|
|
42
42
|
import { t as createCodexWebSearchProviderBase } from "./.setup/web-search-provider.shared-BrZmlqyR.mjs";
|
|
43
43
|
import { normalizePluginsConfig, resolveEffectiveEnableState, resolveLivePluginConfigObject, resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
44
44
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
@@ -52,6 +52,7 @@ import path from "node:path";
|
|
|
52
52
|
import fs from "node:fs/promises";
|
|
53
53
|
import { coerceErrorMessage, formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
54
54
|
import { canonicalPathFromExistingAncestor } from "openclaw/plugin-sdk/file-access-runtime";
|
|
55
|
+
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
55
56
|
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue";
|
|
56
57
|
import { scheduler } from "node:timers/promises";
|
|
57
58
|
import { isIncognitoSessionKey } from "openclaw/plugin-sdk/session-key-runtime";
|
|
@@ -64,13 +65,12 @@ import { isMainThread, threadId } from "node:worker_threads";
|
|
|
64
65
|
import { areDiagnosticsEnabledForProcess, createSubsystemLogger } from "openclaw/plugin-sdk/diagnostic-runtime";
|
|
65
66
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
66
67
|
import { publishSessionCatalogHost, sessionCatalogPaging } from "openclaw/plugin-sdk/session-catalog-paging";
|
|
67
|
-
import { raceWithTimeout } from "openclaw/plugin-sdk/time-runtime";
|
|
68
68
|
import { decodeNodePtyResumeParams, decodeNodePtyStartParams, resolveNodeHostExecutable, runNodePtyCommand } from "openclaw/plugin-sdk/node-host";
|
|
69
69
|
import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
|
|
70
70
|
//#region extensions/codex/src/account-usage.ts
|
|
71
71
|
function registerCodexAccountUsage(api) {
|
|
72
72
|
api.registerGatewayMethod("codex.accountUsage", async (options) => {
|
|
73
|
-
const { handleCodexAccountUsage } = await import("./.setup/account-usage-runtime-
|
|
73
|
+
const { handleCodexAccountUsage } = await import("./.setup/account-usage-runtime-E3SrjJVn.mjs");
|
|
74
74
|
await handleCodexAccountUsage(options);
|
|
75
75
|
}, { scope: "operator.admin" });
|
|
76
76
|
}
|
|
@@ -82,7 +82,7 @@ function createCodexAppServerConnectionHealthService(options) {
|
|
|
82
82
|
let abortController;
|
|
83
83
|
let monitor;
|
|
84
84
|
const run = async (ctx, signal) => {
|
|
85
|
-
const { resolveCodexAppServerRuntimeOptions } = await import("./.setup/config-runtime-
|
|
85
|
+
const { resolveCodexAppServerRuntimeOptions } = await import("./.setup/config-runtime-DGB1-VbB.mjs").then((n) => n.t);
|
|
86
86
|
let consecutiveFailures = 0;
|
|
87
87
|
while (!signal.aborted) {
|
|
88
88
|
let pluginConfig;
|
|
@@ -98,9 +98,9 @@ function createCodexAppServerConnectionHealthService(options) {
|
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
100
|
if (runtime.start.transport !== "websocket") return;
|
|
101
|
-
const { getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./.setup/shared-client-
|
|
101
|
+
const { getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient } = await import("./.setup/shared-client-CNGDTv68.mjs").then((n) => n.v);
|
|
102
102
|
const { sleepWithAbort } = await import("openclaw/plugin-sdk/runtime-env");
|
|
103
|
-
const { isUnsupportedCodexAppServerVersionError } = await import("./.setup/client-
|
|
103
|
+
const { isUnsupportedCodexAppServerVersionError } = await import("./.setup/client-Div-zqnz.mjs").then((n) => n.n);
|
|
104
104
|
if (signal.aborted) return;
|
|
105
105
|
let leasedClient;
|
|
106
106
|
try {
|
|
@@ -267,7 +267,7 @@ function createCodexManagedThreadStore(state) {
|
|
|
267
267
|
/** Keeps lifecycle/auth loading behind mutations while sharing the canonical read codec. */
|
|
268
268
|
function createLazyCodexAppServerBindingStore(state, managedThreadState) {
|
|
269
269
|
let resolved;
|
|
270
|
-
const store = () => resolved ??= import("./.setup/session-binding-
|
|
270
|
+
const store = () => resolved ??= import("./.setup/session-binding-BDnNz-Co.mjs").then((n) => n.a).then(({ createCodexAppServerBindingStore }) => createCodexAppServerBindingStore(state));
|
|
271
271
|
const managedThreads = managedThreadState ? createCodexManagedThreadStore(managedThreadState) : void 0;
|
|
272
272
|
return {
|
|
273
273
|
...managedThreads ? { managedThreads } : {},
|
|
@@ -314,7 +314,7 @@ function createCodexCommand(options) {
|
|
|
314
314
|
...ctx,
|
|
315
315
|
gatewayClientScopes: ctx.gatewayClientScopes?.slice()
|
|
316
316
|
};
|
|
317
|
-
const { handleCodexCommand } = await import("./.setup/command-dispatch-
|
|
317
|
+
const { handleCodexCommand } = await import("./.setup/command-dispatch-ByO36LmS.mjs");
|
|
318
318
|
return handleCodexCommand(commandContext, options);
|
|
319
319
|
}
|
|
320
320
|
};
|
|
@@ -346,7 +346,7 @@ async function handleCodexConversationInboundClaim(event, ctx, options) {
|
|
|
346
346
|
if (data.kind === "codex-cli-node-session") return {
|
|
347
347
|
handled: true,
|
|
348
348
|
reply: { text: await getNodeConversationState().queue.enqueue(`${data.nodeId}:${data.sessionId}`, async () => {
|
|
349
|
-
const { resolveCodexNativeSandboxBlock } = await import("./.setup/sandbox-guard-
|
|
349
|
+
const { resolveCodexNativeSandboxBlock } = await import("./.setup/sandbox-guard-Cf9XMRrg.mjs").then((n) => n.r);
|
|
350
350
|
const blocked = resolveCodexNativeSandboxBlock({
|
|
351
351
|
config: options.config,
|
|
352
352
|
sessionKey,
|
|
@@ -376,7 +376,7 @@ async function handleCodexConversationInboundClaim(event, ctx, options) {
|
|
|
376
376
|
return {
|
|
377
377
|
handled: true,
|
|
378
378
|
reply: await withCodexConversationThreadActivity(data.bindingId, async () => {
|
|
379
|
-
const { resolveCodexNativeExecutionBlock } = await import("./.setup/sandbox-guard-
|
|
379
|
+
const { resolveCodexNativeExecutionBlock } = await import("./.setup/sandbox-guard-Cf9XMRrg.mjs").then((n) => n.r);
|
|
380
380
|
const nativeExecutionBlock = resolveCodexNativeExecutionBlock({
|
|
381
381
|
config: options.config,
|
|
382
382
|
sessionKey,
|
|
@@ -385,7 +385,7 @@ async function handleCodexConversationInboundClaim(event, ctx, options) {
|
|
|
385
385
|
});
|
|
386
386
|
if (nativeExecutionBlock) return { text: nativeExecutionBlock };
|
|
387
387
|
const { getSessionBindingService } = await import("openclaw/plugin-sdk/conversation-binding-runtime");
|
|
388
|
-
const { runBoundTurnWithMissingThreadRecovery } = await import("./.setup/conversation-binding-
|
|
388
|
+
const { runBoundTurnWithMissingThreadRecovery } = await import("./.setup/conversation-binding-Dcv7_rs-.mjs");
|
|
389
389
|
const current = options.bindingStore.read(identity);
|
|
390
390
|
if (!isCurrentPublicBinding(publicBinding, getSessionBindingService()) || expected && (!current || current.threadId !== expected.threadId || current.conversationStartId !== expected.conversationStartId) || !expected && current && data.start?.id && current.conversationStartId !== data.start.id) return { text: "This Codex conversation was detached or changed before its message could run." };
|
|
391
391
|
return await runBoundTurnWithMissingThreadRecovery({
|
|
@@ -419,7 +419,7 @@ async function handleCodexConversationBindingResolved(event, options) {
|
|
|
419
419
|
const binding = options.bindingStore.read(identity);
|
|
420
420
|
assertCodexBindingMayBeReplaced(binding, "clearing a denied conversation binding");
|
|
421
421
|
if (binding && (!data.start?.id || binding.conversationStartId === data.start.id)) await withCodexConversationThreadActivity(identity.bindingId, async () => {
|
|
422
|
-
const { retireCodexConversationThreadBinding } = await import("./.setup/thread-ownership-
|
|
422
|
+
const { retireCodexConversationThreadBinding } = await import("./.setup/thread-ownership-BBsOFzCM.mjs").then((n) => n.o);
|
|
423
423
|
return retireCodexConversationThreadBinding({
|
|
424
424
|
bindingStore: options.bindingStore,
|
|
425
425
|
identity,
|
|
@@ -454,7 +454,7 @@ function createCodexPluginsTool(options) {
|
|
|
454
454
|
const query = typeof params.query === "string" ? params.query : "";
|
|
455
455
|
const marketplace = typeof params.marketplace === "string" ? params.marketplace.trim() : void 0;
|
|
456
456
|
const limit = typeof params.limit === "number" && Number.isInteger(params.limit) ? Math.max(1, Math.min(params.limit, 20)) : 12;
|
|
457
|
-
const { codexBindingConnectionSelection, resolveCodexBindingAppServerConnection } = await import("./.setup/binding-connection-
|
|
457
|
+
const { codexBindingConnectionSelection, resolveCodexBindingAppServerConnection } = await import("./.setup/binding-connection-C0t9TBX_.mjs").then((n) => n.n);
|
|
458
458
|
const pluginConfig = options.getPluginConfig();
|
|
459
459
|
const config = runtimeConfig();
|
|
460
460
|
const identity = options.context.sessionId ? sessionBindingIdentity({
|
|
@@ -471,7 +471,7 @@ function createCodexPluginsTool(options) {
|
|
|
471
471
|
if (runtimeConfig() !== config || !isDeepStrictEqual(options.getPluginConfig(), pluginConfig) || !isDeepStrictEqual(codexBindingConnectionSelection(readBinding()), selection)) throw new Error("Codex plugin discovery ownership changed; retry the request.");
|
|
472
472
|
};
|
|
473
473
|
const workspaceDir = binding?.cwd?.trim() || options.context.workspaceDir?.trim() || resolveCodexDefaultWorkspaceDir(pluginConfig);
|
|
474
|
-
const request = options.request ?? (await import("./.setup/command-rpc-
|
|
474
|
+
const request = options.request ?? (await import("./.setup/command-rpc-Co0UzT-T.mjs").then((n) => n.n)).codexControlRequest;
|
|
475
475
|
const connection = await resolveCodexBindingAppServerConnection({
|
|
476
476
|
binding,
|
|
477
477
|
pluginConfig,
|
|
@@ -635,10 +635,10 @@ function createCodexThreadsTool(options) {
|
|
|
635
635
|
const threadResult = (response) => jsonResult(mayReadRawTranscripts ? response : redactNativeThreadResponse(response));
|
|
636
636
|
if ((action === "fork" || action === "rename" || action === "archive" || action === "unarchive") && supervision?.enabled === true && supervision.allowWriteControls !== true) throw new Error("Codex native thread mutations are disabled for this codex plugin supervision config.");
|
|
637
637
|
const run = async (archiveAdmission) => {
|
|
638
|
-
const request = options.request ?? (await import("./.setup/command-rpc-
|
|
638
|
+
const request = options.request ?? (await import("./.setup/command-rpc-Co0UzT-T.mjs").then((n) => n.n)).codexControlRequest;
|
|
639
639
|
const { isModelSelectionLocked, ModelSelectionLockedError } = await import("openclaw/plugin-sdk/model-session-runtime");
|
|
640
|
-
const { codexBindingConnectionSelection, resolveCodexBindingAppServerConnection } = await import("./.setup/binding-connection-
|
|
641
|
-
const { resolveCodexSupervisionAppServerRuntimeOptions } = await import("./.setup/config-runtime-
|
|
640
|
+
const { codexBindingConnectionSelection, resolveCodexBindingAppServerConnection } = await import("./.setup/binding-connection-C0t9TBX_.mjs").then((n) => n.n);
|
|
641
|
+
const { resolveCodexSupervisionAppServerRuntimeOptions } = await import("./.setup/config-runtime-DGB1-VbB.mjs").then((n) => n.t);
|
|
642
642
|
const requestOptions = async () => {
|
|
643
643
|
const base = {
|
|
644
644
|
agentDir: options.context.agentDir,
|
|
@@ -768,8 +768,8 @@ function createCodexThreadsTool(options) {
|
|
|
768
768
|
const usesSupervisionConnection = binding?.connectionScope === "supervision" || admissionPlugin.appServer?.homeScope !== "user" && supervision?.enabled === true;
|
|
769
769
|
if (attach && usesSupervisionConnection) throw new Error("Supervised Codex forks must stay detached; set attach=false.");
|
|
770
770
|
const forkOptions = await requestOptions();
|
|
771
|
-
const { retainCodexAppServerBindingSubscription, rollbackCodexAppServerBindingSubscription } = await import("./.setup/thread-ownership-
|
|
772
|
-
const { closeCodexStartupClientBestEffort } = await import("./.setup/attempt-client-cleanup-
|
|
771
|
+
const { retainCodexAppServerBindingSubscription, rollbackCodexAppServerBindingSubscription } = await import("./.setup/thread-ownership-BBsOFzCM.mjs").then((n) => n.o);
|
|
772
|
+
const { closeCodexStartupClientBestEffort } = await import("./.setup/attempt-client-cleanup-BVww-ct8.mjs").then((n) => n.a);
|
|
773
773
|
if (attach) {
|
|
774
774
|
assertCodexBindingMayBeReplaced(binding, "attaching a different native fork");
|
|
775
775
|
assertThreadIdle(await request(admissionConfig, CODEX_CONTROL_METHODS.readThread, {
|
|
@@ -893,7 +893,7 @@ function createCodexNodeExecServerCommand() {
|
|
|
893
893
|
signal: AbortSignal.any([io.signal, context.signal])
|
|
894
894
|
} : io;
|
|
895
895
|
const assertExecAuthorized = context.prepareExecAuthorization(request.authorization);
|
|
896
|
-
const { runCodexNodeExecServer } = await import("./.setup/node-exec-server.runtime-
|
|
896
|
+
const { runCodexNodeExecServer } = await import("./.setup/node-exec-server.runtime-8RehgPdQ.mjs");
|
|
897
897
|
runtimeIo.signal.throwIfAborted();
|
|
898
898
|
const workspace = await context.acquireManagedWorkspaceAsync(workspaceRequest);
|
|
899
899
|
try {
|
|
@@ -1649,7 +1649,7 @@ function hostFailure(source, error) {
|
|
|
1649
1649
|
}
|
|
1650
1650
|
async function projectLocalHost(params, agentId, source, page) {
|
|
1651
1651
|
params.signal?.throwIfAborted();
|
|
1652
|
-
const { listAdoptedSessionEntries } = await import("./.setup/session-catalog-adoption-
|
|
1652
|
+
const { listAdoptedSessionEntries } = await import("./.setup/session-catalog-adoption-Cl6fHxS5.mjs");
|
|
1653
1653
|
const { sessionCatalogAdoptedSourceKey } = await import("openclaw/plugin-sdk/session-catalog");
|
|
1654
1654
|
params.signal?.throwIfAborted();
|
|
1655
1655
|
const finishTiming = startCodexCatalogListTiming("adoptionSumMs", "adoptionCalls");
|
|
@@ -1871,8 +1871,8 @@ var CodexCatalogListDriver = class {
|
|
|
1871
1871
|
}
|
|
1872
1872
|
params.signal?.throwIfAborted();
|
|
1873
1873
|
this.nodeSnapshots.observe(this.nodeGeneration, inventory);
|
|
1874
|
-
const { listNodeAdoptedSessionEntries, nodeAdoptedSourceKey } = await import("./.setup/session-catalog-node-adoption-
|
|
1875
|
-
const { compareNodeLabels, listPairedNode, nodeLabel } = await import("./.setup/session-catalog-node-continue-
|
|
1874
|
+
const { listNodeAdoptedSessionEntries, nodeAdoptedSourceKey } = await import("./.setup/session-catalog-node-adoption-D11N0CMr.mjs");
|
|
1875
|
+
const { compareNodeLabels, listPairedNode, nodeLabel } = await import("./.setup/session-catalog-node-continue-Ct62GeL1.mjs");
|
|
1876
1876
|
params.signal?.throwIfAborted();
|
|
1877
1877
|
const adopted = listNodeAdoptedSessionEntries({
|
|
1878
1878
|
agentId,
|
|
@@ -2315,7 +2315,7 @@ async function readCodexSessionTranscript(params) {
|
|
|
2315
2315
|
cursor,
|
|
2316
2316
|
limit
|
|
2317
2317
|
});
|
|
2318
|
-
const { nodeLabel } = await import("./.setup/session-catalog-node-continue-
|
|
2318
|
+
const { nodeLabel } = await import("./.setup/session-catalog-node-continue-Ct62GeL1.mjs");
|
|
2319
2319
|
return {
|
|
2320
2320
|
hostId: params.hostId,
|
|
2321
2321
|
label: nodeLabel(node),
|
|
@@ -2479,8 +2479,8 @@ async function requireEligibleCodexThread(params) {
|
|
|
2479
2479
|
remaining();
|
|
2480
2480
|
if (thread.id !== threadId || thread.ephemeral === true || !isInteractiveThreadSource(thread.source)) throw unverified();
|
|
2481
2481
|
if (!root) {
|
|
2482
|
-
const { CODEX_CATALOG_NATIVE_PAGE_LIMIT } = await import("./.setup/session-catalog-native-projection-
|
|
2483
|
-
const { CODEX_CATALOG_MAX_ROWS } = await import("./.setup/session-catalog-limits-
|
|
2482
|
+
const { CODEX_CATALOG_NATIVE_PAGE_LIMIT } = await import("./.setup/session-catalog-native-projection-BJupfCyt.mjs").then((n) => n.a);
|
|
2483
|
+
const { CODEX_CATALOG_MAX_ROWS } = await import("./.setup/session-catalog-limits-Daqt3JLk.mjs").then((n) => n.r);
|
|
2484
2484
|
let cursor;
|
|
2485
2485
|
const seenCursors = /* @__PURE__ */ new Set();
|
|
2486
2486
|
for (;;) {
|
|
@@ -2932,7 +2932,7 @@ function createCodexSessionCatalogControl(params) {
|
|
|
2932
2932
|
if (closed || generation !== config || residentEpoch !== epoch) throw new Error("Codex catalog configuration changed");
|
|
2933
2933
|
let index = indexes.get(homeId);
|
|
2934
2934
|
if (!index) {
|
|
2935
|
-
const [{ CodexCatalogIndex }, { canReuseCodexCatalogPreview, projectCodexCatalogDeltaPage, projectCodexCatalogPage }] = await Promise.all([import("./.setup/session-catalog-index-
|
|
2935
|
+
const [{ CodexCatalogIndex }, { canReuseCodexCatalogPreview, projectCodexCatalogDeltaPage, projectCodexCatalogPage }] = await Promise.all([import("./.setup/session-catalog-index-B00GIRi3.mjs"), import("./.setup/session-catalog-projection-CYgFTaYm.mjs")]);
|
|
2936
2936
|
source?.assertCurrent();
|
|
2937
2937
|
if (closed || generation !== config || residentEpoch !== epoch) throw new Error("Codex catalog configuration changed");
|
|
2938
2938
|
index = indexes.get(homeId);
|
|
@@ -3057,7 +3057,7 @@ function createCodexSessionCatalogControl(params) {
|
|
|
3057
3057
|
const runtime = source?.appServer ?? resolveRuntimeOptions({ pluginConfig });
|
|
3058
3058
|
const requestOptions = resolveRequestOptions(runtime.start, agentId, source);
|
|
3059
3059
|
return createCodexCatalogRequestSnapshot(runtime.requestTimeoutMs, async (method, requestParams, timeoutMs, assertCurrent, observation) => {
|
|
3060
|
-
const { codexControlRequest } = await import("./.setup/command-rpc-
|
|
3060
|
+
const { codexControlRequest } = await import("./.setup/command-rpc-Co0UzT-T.mjs").then((n) => n.n);
|
|
3061
3061
|
return await codexControlRequest(pluginConfig, method, requestParams, {
|
|
3062
3062
|
...requestOptions,
|
|
3063
3063
|
authProfileId: null,
|
|
@@ -3079,9 +3079,9 @@ function createCodexSessionCatalogControl(params) {
|
|
|
3079
3079
|
const runtime = source?.appServer ?? resolveRuntimeOptions({ pluginConfig });
|
|
3080
3080
|
const { agentDir, config: runtimeConfig, startOptions } = resolveRequestOptions(runtime.start, agentId, source);
|
|
3081
3081
|
let catalogIndex;
|
|
3082
|
-
const { getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient, retireSharedCodexAppServerClientIfCurrent } = await import("./.setup/shared-client-
|
|
3083
|
-
const { resolveCodexAppServerClientInstanceId } = await import("./.setup/client-
|
|
3084
|
-
const { requestCodexAppServerClientJson } = await import("./.setup/request-
|
|
3082
|
+
const { getLeasedSharedCodexAppServerClient, releaseLeasedSharedCodexAppServerClient, retireSharedCodexAppServerClientIfCurrent } = await import("./.setup/shared-client-CNGDTv68.mjs").then((n) => n.v);
|
|
3083
|
+
const { resolveCodexAppServerClientInstanceId } = await import("./.setup/client-Div-zqnz.mjs").then((n) => n.n);
|
|
3084
|
+
const { requestCodexAppServerClientJson } = await import("./.setup/request-m-H-7FMu.mjs").then((n) => n.i);
|
|
3085
3085
|
const client = await getLeasedSharedCodexAppServerClient({
|
|
3086
3086
|
agentDir,
|
|
3087
3087
|
config: runtimeConfig,
|
|
@@ -3150,7 +3150,7 @@ function createCodexSessionCatalogControl(params) {
|
|
|
3150
3150
|
await Promise.allSettled(residentRequests);
|
|
3151
3151
|
const clients = getSharedCodexAppServerClientState();
|
|
3152
3152
|
if (clients.liveClients.size > 0 || clients.startup.pending.size > 0) {
|
|
3153
|
-
const { clearSharedCodexAppServerClientAndWait } = await import("./.setup/shared-client-
|
|
3153
|
+
const { clearSharedCodexAppServerClientAndWait } = await import("./.setup/shared-client-CNGDTv68.mjs").then((n) => n.v);
|
|
3154
3154
|
await clearSharedCodexAppServerClientAndWait();
|
|
3155
3155
|
}
|
|
3156
3156
|
},
|
|
@@ -3395,7 +3395,7 @@ function registerCodexSessionCatalog(params) {
|
|
|
3395
3395
|
if (!config) throw new Error("OpenClaw runtime config is unavailable");
|
|
3396
3396
|
if (request.hostId.startsWith("node:")) {
|
|
3397
3397
|
const agentId = resolveRequestAgentId(request.agentId);
|
|
3398
|
-
const { continueNodeCodexSession } = await import("./.setup/session-catalog-node-continue-
|
|
3398
|
+
const { continueNodeCodexSession } = await import("./.setup/session-catalog-node-continue-Ct62GeL1.mjs");
|
|
3399
3399
|
return await continueNodeCodexSession({
|
|
3400
3400
|
agentId,
|
|
3401
3401
|
api: params.api,
|
|
@@ -3410,7 +3410,7 @@ function registerCodexSessionCatalog(params) {
|
|
|
3410
3410
|
const { agentId, source, control } = await bindLocalRequest(request);
|
|
3411
3411
|
source.assertCurrent();
|
|
3412
3412
|
let upstreamBaseline;
|
|
3413
|
-
const { continueLocalCodexSession } = await import("./.setup/session-catalog-adoption-
|
|
3413
|
+
const { continueLocalCodexSession } = await import("./.setup/session-catalog-adoption-Cl6fHxS5.mjs");
|
|
3414
3414
|
const continued = await continueLocalCodexSession({
|
|
3415
3415
|
agentId,
|
|
3416
3416
|
api: params.api,
|
|
@@ -3439,7 +3439,7 @@ function registerCodexSessionCatalog(params) {
|
|
|
3439
3439
|
if (!config) throw new Error("OpenClaw runtime config is unavailable");
|
|
3440
3440
|
const { agentId, source, control } = await bindLocalRequest(request);
|
|
3441
3441
|
source.assertCurrent();
|
|
3442
|
-
const { archiveLocalCodexSession } = await import("./.setup/session-catalog-archive-
|
|
3442
|
+
const { archiveLocalCodexSession } = await import("./.setup/session-catalog-archive-CUU7jEkO.mjs");
|
|
3443
3443
|
await archiveLocalCodexSession({
|
|
3444
3444
|
agentId,
|
|
3445
3445
|
bindingStore: params.bindingStore,
|
|
@@ -4150,7 +4150,7 @@ function createCodexSupervisionTools(options) {
|
|
|
4150
4150
|
}
|
|
4151
4151
|
//#endregion
|
|
4152
4152
|
//#region extensions/codex/src/web-search-provider.ts
|
|
4153
|
-
const loadCodexWebSearchRuntime = createLazyRuntimeModule(() => import("./.setup/web-search-provider.runtime-
|
|
4153
|
+
const loadCodexWebSearchRuntime = createLazyRuntimeModule(() => import("./.setup/web-search-provider.runtime-DkciK2gS.mjs"));
|
|
4154
4154
|
const CodexWebSearchSchema = {
|
|
4155
4155
|
type: "object",
|
|
4156
4156
|
properties: { query: {
|
|
@@ -4415,7 +4415,7 @@ var codex_default = definePluginEntry({
|
|
|
4415
4415
|
if (endedSessionKey && nextSessionKey && nextSessionKey !== endedSessionKey) return;
|
|
4416
4416
|
if (event.nextSessionId?.trim() === event.sessionId.trim()) return;
|
|
4417
4417
|
const config = resolveCurrentConfig();
|
|
4418
|
-
const [{ sessionBindingIdentity }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./.setup/session-binding-
|
|
4418
|
+
const [{ sessionBindingIdentity }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./.setup/session-binding-BDnNz-Co.mjs").then((n) => n.a), import("./.setup/session-retirement-DIqF1vQ4.mjs")]);
|
|
4419
4419
|
await retireCodexAppServerSessionGeneration({
|
|
4420
4420
|
bindingStore,
|
|
4421
4421
|
identity: sessionBindingIdentity({
|
|
@@ -33,7 +33,7 @@ async function describeCodexImages(req, options) {
|
|
|
33
33
|
const model = req.model.trim();
|
|
34
34
|
if (!model) throw new Error("Codex image understanding requires model id.");
|
|
35
35
|
req.signal?.throwIfAborted();
|
|
36
|
-
const { runBoundedCodexAppServerTurn } = await import("./.setup/bounded-turn-
|
|
36
|
+
const { runBoundedCodexAppServerTurn } = await import("./.setup/bounded-turn-vdpL2efh.mjs");
|
|
37
37
|
req.signal?.throwIfAborted();
|
|
38
38
|
const { text } = await runBoundedCodexAppServerTurn({
|
|
39
39
|
config: req.cfg,
|
|
@@ -73,7 +73,7 @@ async function extractCodexStructured(req, options) {
|
|
|
73
73
|
if (req.input.length === 0) throw new Error("Codex structured extraction requires at least one input.");
|
|
74
74
|
if (!req.input.some((entry) => entry.type === "image")) throw new Error("Codex structured extraction requires at least one image input.");
|
|
75
75
|
req.signal?.throwIfAborted();
|
|
76
|
-
const { runBoundedCodexAppServerTurn } = await import("./.setup/bounded-turn-
|
|
76
|
+
const { runBoundedCodexAppServerTurn } = await import("./.setup/bounded-turn-vdpL2efh.mjs");
|
|
77
77
|
req.signal?.throwIfAborted();
|
|
78
78
|
const { text } = await runBoundedCodexAppServerTurn({
|
|
79
79
|
config: req.cfg,
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { buildCodexMigrationProvider as buildMigrationProvider };
|
|
1
|
+
export { t as buildMigrationProvider } from "./.setup/provider-BVV8SWlx.mjs";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { readStoredCodexAppServerBinding as readNativeSessionBindingRecord };
|
|
1
|
+
export { a as readNativeSessionBindingRecord } from "./.setup/session-binding-record-codec-CWQXr9os.mjs";
|
|
@@ -5,7 +5,7 @@ const codexProviderDiscovery = {
|
|
|
5
5
|
auth: [],
|
|
6
6
|
prepareSyntheticAuth: async ({ config, provider, env, signal, pluginRoot }) => {
|
|
7
7
|
if (provider !== "codex") return;
|
|
8
|
-
const { probeCodexNativeAuth } = await import("./.setup/native-auth-
|
|
8
|
+
const { probeCodexNativeAuth } = await import("./.setup/native-auth-CveRfTpz.mjs");
|
|
9
9
|
return await probeCodexNativeAuth({
|
|
10
10
|
config,
|
|
11
11
|
env,
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { runCodexHistoryWorkerInput };
|
|
1
|
+
export { t as runCodexHistoryWorkerInput } from "./.setup/session-history.worker-DJQfek5p.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/codex",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.6",
|
|
4
4
|
"description": "OpenClaw Codex app-server harness and native session supervision plugin.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
]
|
|
39
39
|
},
|
|
40
40
|
"compat": {
|
|
41
|
-
"pluginApi": ">=2026.10.
|
|
41
|
+
"pluginApi": ">=2026.10.6"
|
|
42
42
|
},
|
|
43
43
|
"build": {
|
|
44
|
-
"openclawVersion": "2026.10.
|
|
44
|
+
"openclawVersion": "2026.10.6",
|
|
45
45
|
"workerEntries": [
|
|
46
46
|
"./catalog-page.worker.ts"
|
|
47
47
|
]
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"assets/activity.svg"
|
|
67
67
|
],
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"openclaw": ">=2026.10.
|
|
69
|
+
"openclaw": ">=2026.10.6"
|
|
70
70
|
},
|
|
71
71
|
"peerDependenciesMeta": {
|
|
72
72
|
"openclaw": {
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { t as normalizeCodexServiceTier } from "./service-tier-normalization-BPgw2Wdt.mjs";
|
|
2
|
-
import { asOptionalRecord as readRecord, normalizeOptionalString as readNonEmptyString, normalizeTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
-
import { createHmac, randomBytes } from "node:crypto";
|
|
4
|
-
import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
5
|
-
import { resolveGlobalSingleton } from "openclaw/plugin-sdk/global-singleton";
|
|
6
|
-
import { splitCommandArgs } from "openclaw/plugin-sdk/process-runtime";
|
|
7
|
-
//#region extensions/codex/src/app-server/config-utils.ts
|
|
8
|
-
const START_OPTIONS_KEY_SECRET = resolveGlobalSingleton(Symbol.for("openclaw.codexAppServerStartOptionsKeySecret"), () => randomBytes(32));
|
|
9
|
-
const PLAIN_DECIMAL_NUMBER_RE = /^[+-]?(?:(?:\d+\.?\d*)|(?:\.\d+))$/;
|
|
10
|
-
function appendCodexGitConfigParameters(base, parameters) {
|
|
11
|
-
return !base ? parameters : base === parameters || base.endsWith(` ${parameters}`) ? base : `${base} ${parameters}`;
|
|
12
|
-
}
|
|
13
|
-
function isCodexFastServiceTier(value) {
|
|
14
|
-
return normalizeCodexServiceTier(value) === "priority";
|
|
15
|
-
}
|
|
16
|
-
function normalizeHeaders(value) {
|
|
17
|
-
return Object.fromEntries(Object.entries(value ?? {}).flatMap(([key, child]) => {
|
|
18
|
-
const name = key.trim();
|
|
19
|
-
const header = normalizeResolvedSecretInputString({
|
|
20
|
-
value: child,
|
|
21
|
-
path: `plugins.entries.codex.config.appServer.headers.${key}`
|
|
22
|
-
});
|
|
23
|
-
return name && header ? [[name, header]] : [];
|
|
24
|
-
}));
|
|
25
|
-
}
|
|
26
|
-
function readExecSecurity(value) {
|
|
27
|
-
return value === "deny" || value === "allowlist" || value === "full" ? value : void 0;
|
|
28
|
-
}
|
|
29
|
-
function readExecAsk(value) {
|
|
30
|
-
return value === "off" || value === "on-miss" || value === "always" ? value : void 0;
|
|
31
|
-
}
|
|
32
|
-
function readNumberEnv(value) {
|
|
33
|
-
const trimmed = value?.trim();
|
|
34
|
-
if (!trimmed || !PLAIN_DECIMAL_NUMBER_RE.test(trimmed)) return;
|
|
35
|
-
const parsed = Number(trimmed);
|
|
36
|
-
return Number.isFinite(parsed) ? parsed : void 0;
|
|
37
|
-
}
|
|
38
|
-
function resolveArgs(configArgs, envArgs) {
|
|
39
|
-
if (Array.isArray(configArgs)) return normalizeTrimmedStringList(configArgs);
|
|
40
|
-
return splitCommandArgs(configArgs ?? envArgs ?? "", { allowUnclosedQuotes: true });
|
|
41
|
-
}
|
|
42
|
-
function hashSecretForKey(value, label) {
|
|
43
|
-
if (!value) return null;
|
|
44
|
-
return createHmac("sha256", START_OPTIONS_KEY_SECRET).update(label).update("\0").update(value).digest("hex");
|
|
45
|
-
}
|
|
46
|
-
//#endregion
|
|
47
|
-
export { readExecAsk as a, readNumberEnv as c, normalizeHeaders as i, readRecord as l, hashSecretForKey as n, readExecSecurity as o, isCodexFastServiceTier as r, readNonEmptyString as s, appendCodexGitConfigParameters as t, resolveArgs as u };
|