@openclaw/codex 2026.9.3 → 2026.9.4
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/api.js +26 -18
- package/dist/{apply-B6el6hdO.js → apply-CvT8tW5i.js} +11 -12
- package/dist/{attempt-client-cleanup-D6cR54TV.js → attempt-client-cleanup-DKHzbwt5.js} +8 -204
- package/dist/{attempt-context-AO4DSjE0.js → attempt-context-D44yeDII.js} +3 -3
- package/dist/{attempt-notifications--H8zXR5-.js → attempt-notifications-C9XufG6l.js} +1 -1
- package/dist/{auth-binding-Co2Vfcf_.js → auth-binding-CWlKVccJ.js} +1 -1
- package/dist/{auth-cache-key-Kq6oerr6.js → auth-cache-key-7orQae_j.js} +2 -2
- package/dist/{binding-connection-QqgcPCgk.js → binding-connection-D3udKbIE.js} +3 -3
- package/dist/{bounded-turn-lRpmZHFv.js → bounded-turn-C_Hneydj.js} +12 -12
- package/dist/{build-state-6RL6qohz.js → build-state-BCmg9-5p.js} +1 -1
- package/dist/{capabilities-BeqLPbtM.js → capabilities-8vx68WLH.js} +1 -1
- package/dist/cli-metadata.js +1 -1
- package/dist/{client-BEKu4yDx.js → client-B57KWPQx.js} +27 -5
- package/dist/{command-dispatch-CisT9Jqq.js → command-dispatch-BpduNGVf.js} +3 -3
- package/dist/{command-formatters-DeTfrapr.js → command-formatters-lxlkNZgU.js} +4 -3
- package/dist/{command-handlers-BfIsJEuA.js → command-handlers-tiL9iWj7.js} +783 -140
- package/dist/{command-rpc-BMqRQOFX.js → command-rpc-CR5EOEZX.js} +26 -19
- package/dist/{compact-CGJZ2rlb.js → compact-B_H3AOd7.js} +14 -14
- package/dist/{config-JDfTI4VI.js → config-oIORaQ5T.js} +4 -4
- package/dist/{config-options-jnIFvwxD.js → config-options-CXMq1T-C.js} +5 -5
- package/dist/{config-runtime-BWf6JLWG.js → config-runtime-D0zGNIHu.js} +1 -1
- package/dist/{config-utils-C57JiJrU.js → config-utils-DujwEnhg.js} +2 -4
- package/dist/{conversation-binding-CxOlHiix.js → conversation-binding-DsB4-O7U.js} +53 -42
- package/dist/{conversation-control-CUCrSIQI.js → conversation-control-CtUu1b3m.js} +8 -8
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{dynamic-tools-D-JBoaLt.js → dynamic-tools-CmN5RAip.js} +76 -15
- package/dist/{effective-mcp-catalog-J_5Ep5Um.js → effective-mcp-catalog-Bd73bqA8.js} +3 -3
- package/dist/{ephemeral-turn-DSwzP8YY.js → ephemeral-turn-D78_VmzO.js} +5 -5
- package/dist/event-projector-items-5VhsECCO.js +200 -0
- package/dist/{event-projector-usage-CIyrYYid.js → event-projector-usage-BfXmpOec.js} +1 -1
- package/dist/{harness-FR6eQgyO.js → harness-C7rRa7bm.js} +33 -16
- package/dist/harness.js +1 -1
- package/dist/index.js +39 -84
- package/dist/inference-context-Dr_mzvk4.js +94 -0
- package/dist/inference-proxy-HGXKUIre.js +311 -0
- package/dist/{isolated-completion-DHBefrzg.js → isolated-completion-DWVb5U2J.js} +6 -6
- package/dist/{managed-binary-DrjjRRUD.js → managed-binary-D22rNEcR.js} +10 -1
- package/dist/media-understanding-provider.js +2 -2
- package/dist/migration-provider-api.js +2 -0
- package/dist/{model-catalog-B_6M04Wo.js → model-catalog-Dq2n8f_p.js} +6 -6
- package/dist/{models-P9k2qAof.js → models-PCKOim-h.js} +3 -3
- package/dist/native-subagent-history-DjtPloaU.js +140 -0
- package/dist/native-subagent-history-owner-Pcp7JuVF.js +34 -0
- package/dist/{native-subagent-monitor-BbCUKRwC.js → native-subagent-monitor-fQ7eIXEf.js} +52 -424
- package/dist/native-subagent-task-ids-BzTdT0Uw.js +387 -0
- package/dist/{node-cli-sessions-rj0ysJwM.js → node-cli-sessions-DKaOmVUh.js} +1 -1
- package/dist/{node-exec-server.runtime-BY_ctYnT.js → node-exec-server.runtime-Cl2vapEi.js} +3 -3
- package/dist/{plan-BMJdMOEF.js → plan-7uG-Fp36.js} +288 -52
- package/dist/{plugin-activation-BQK-f5sV.js → plugin-activation-BYQculil.js} +24 -19
- package/dist/{plugin-app-cache-key-CdSQzWyX.js → plugin-app-cache-key-d0eKxy7b.js} +1 -1
- package/dist/{plugin-approval-roundtrip-DeW95wB5.js → plugin-approval-roundtrip-Bz3FT8W5.js} +1 -1
- package/dist/{plugin-inventory-CoRCzWW4.js → plugin-inventory-oL4Na1ZG.js} +7 -4
- package/dist/{plugin-marketplace-discovery-3akBizzF.js → plugin-marketplace-discovery-P-Vndfqq.js} +18 -15
- package/dist/{plugin-metadata-cache-DgNfRAGA.js → plugin-metadata-cache-ClPJpRio.js} +13 -9
- package/dist/{protocol-CAAcVIKF.js → protocol-5bh1G-H7.js} +1 -1
- package/dist/provider-MQ8PVkuE.js +50 -0
- package/dist/{provider-capabilities-W4tfK5Y5.js → provider-capabilities-BvCUL69A.js} +2 -2
- package/dist/{rate-limits-Bqnx1N4z.js → rate-limits-CBMmWBr9.js} +1 -1
- package/dist/{request-CGvGOpeR.js → request-B7hEkBGq.js} +72 -58
- package/dist/rpc-error-ttN_QjEm.js +30 -0
- package/dist/{run-attempt-DwKds3DN.js → run-attempt-CvsAAGa0.js} +108 -37
- package/dist/{runtime-artifact-T-NwqeSH.js → runtime-artifact-BJ0rXBZ_.js} +1 -1
- package/dist/{sandbox-guard-BcT66fWy.js → sandbox-guard-BxgyoM8M.js} +2 -1
- package/dist/{session-binding-CKSepwIC.js → session-binding-CI8UuilT.js} +3 -3
- package/dist/{session-binding-record-CaZjYwNS.js → session-binding-record-Bcvslnhf.js} +1 -1
- package/dist/{session-catalog-adoption-BKLtSrwi.js → session-catalog-adoption-tcZi1IfX.js} +5 -5
- package/dist/{session-catalog-archive-D0i2pGj2.js → session-catalog-archive-CwKg8Xz2.js} +6 -6
- package/dist/{session-catalog-HaDcp7Sv.js → session-catalog-ct-AH01I.js} +31 -87
- package/dist/session-catalog-home-id-CwhLdC03.js +18 -0
- package/dist/{session-catalog-node-adoption-BUuDYY8R.js → session-catalog-node-adoption-B1tgDW-m.js} +2 -2
- package/dist/{session-catalog-node-continue-CBtc4wkI.js → session-catalog-node-continue-Ci-DXyJP.js} +4 -4
- package/dist/{session-catalog-provenance-DkJHo735.js → session-catalog-provenance-D-dIfRAH.js} +2 -30
- package/dist/{session-cli-CbgaHh0f.js → session-cli-DNN_jhGc.js} +2 -2
- package/dist/{session-history-import-DFN7sWRU.js → session-history-import-DwyijFI6.js} +4 -4
- package/dist/session-history-worker-runtime.js +1 -1
- package/dist/{session-history.worker-CNEvGaU5.js → session-history.worker-BeK1YOyT.js} +187 -83
- package/dist/session-history.worker.js +1 -1
- package/dist/{session-initialization-Jo86C60I.js → session-initialization-Ct0_Hzmg.js} +2 -2
- package/dist/{session-permission-policy-B22InTp_.js → session-permission-policy-BBmXA8Eg.js} +2 -2
- package/dist/{session-retirement-BSNG_mhf.js → session-retirement-B2YfbAAT.js} +5 -5
- package/dist/{settled-turn-finalizer-BuLUrZl2.js → settled-turn-finalizer-Dn91stmc.js} +5 -5
- package/dist/{shared-client-CVhez2Uo.js → shared-client-CscigXXL.js} +228 -30
- package/dist/{side-question-DLbr2vUU.js → side-question-BGMJQf4U.js} +18 -18
- package/dist/{source-Da-h6f7e.js → source-CElXU0Oy.js} +12 -12
- package/dist/{thread-archive-guard-D1bP04Tf.js → thread-archive-guard-DfpBr-Sz.js} +1 -1
- package/dist/{session-catalog-parsing-CdD3JhdM.js → thread-history-page-D0JIp48V.js} +83 -2
- package/dist/{thread-lifecycle-D1pzRwHB.js → thread-lifecycle-DXl1-I6b.js} +96 -44
- package/dist/{thread-ownership-D6oASVRu.js → thread-ownership-BsDRTsyp.js} +2 -2
- package/dist/{thread-policy-D8kI7yAO.js → thread-policy-BuEQfE0g.js} +3 -3
- package/dist/{thread-resume-T5cveyxA.js → thread-resume-DsDOZpFg.js} +5 -5
- package/dist/{session-catalog-home-id-D7-aLiNt.js → transcript-history-projection-v17wXgdK.js} +66 -18
- package/dist/{transcript-mirror-t5TOccct.js → transcript-mirror-C5CKgNy6.js} +1 -1
- package/dist/{upstream-session-fork-De-sLJ2r.js → upstream-session-fork-BZerMte_.js} +20 -20
- package/dist/{usage-CPPTmBvZ.js → usage-tCk-mg_x.js} +4 -4
- package/dist/{web-search-provider.runtime-CSVgQL0w.js → web-search-provider.runtime-B7bGbGWq.js} +3 -3
- package/openclaw.plugin.json +1 -0
- package/package.json +4 -4
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { o as isJsonObject } from "./protocol-
|
|
3
|
-
import { n as describeControlFailure, t as CODEX_CONTROL_METHODS } from "./capabilities-
|
|
4
|
-
import { i as requestCodexAppServerJson, o as withCodexAppServerJsonClient } from "./request-
|
|
5
|
-
import "./config-
|
|
6
|
-
import { n as resolveCodexAppServerRuntimeOptions, r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-
|
|
7
|
-
import {
|
|
2
|
+
import { o as isJsonObject } from "./protocol-5bh1G-H7.js";
|
|
3
|
+
import { n as describeControlFailure, t as CODEX_CONTROL_METHODS } from "./capabilities-8vx68WLH.js";
|
|
4
|
+
import { i as requestCodexAppServerJson, o as withCodexAppServerJsonClient } from "./request-B7hEkBGq.js";
|
|
5
|
+
import "./config-oIORaQ5T.js";
|
|
6
|
+
import { n as resolveCodexAppServerRuntimeOptions, r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-D0zGNIHu.js";
|
|
7
|
+
import { r as prepareCodexAppServerAuthBinding } from "./auth-binding-CWlKVccJ.js";
|
|
8
8
|
import { a as resolveCodexAppServerAuthProfileStore, r as resolveCodexAppServerAuthProfileId } from "./auth-profile-CwzO4_RG.js";
|
|
9
|
-
import {
|
|
10
|
-
import { a as closeCodexStartupClientBestEffort } from "./attempt-client-cleanup-
|
|
11
|
-
import { n as listCodexAppServerModels } from "./models-
|
|
12
|
-
import { n as createCodexSessionGenerationSupersededError } from "./session-binding-
|
|
13
|
-
import { t as resumeCodexAppServerThread } from "./thread-resume-
|
|
9
|
+
import { tt as resolveCodexAppServerPreparedAuthHandoff } from "./shared-client-CscigXXL.js";
|
|
10
|
+
import { a as closeCodexStartupClientBestEffort } from "./attempt-client-cleanup-DKHzbwt5.js";
|
|
11
|
+
import { n as listCodexAppServerModels } from "./models-PCKOim-h.js";
|
|
12
|
+
import { n as createCodexSessionGenerationSupersededError } from "./session-binding-CI8UuilT.js";
|
|
13
|
+
import { t as resumeCodexAppServerThread } from "./thread-resume-DsDOZpFg.js";
|
|
14
14
|
import { resolveAgentDir, resolveSessionAgentIdsStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
15
15
|
import { resolveAgentWorkspaceDir } from "openclaw/plugin-sdk/agent-runtime";
|
|
16
16
|
import { prepareAgentRuntimeAuth } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
@@ -20,16 +20,20 @@ import { resolveApiKeyForProvider } from "openclaw/plugin-sdk/provider-auth-runt
|
|
|
20
20
|
//#region extensions/codex/src/command-rpc.ts
|
|
21
21
|
var command_rpc_exports = /* @__PURE__ */ __exportAll({
|
|
22
22
|
codexControlRequest: () => codexControlRequest,
|
|
23
|
+
prepareCodexControlSessionAuth: () => prepareCodexControlSessionAuth,
|
|
23
24
|
readCodexStatusProbes: () => readCodexStatusProbes,
|
|
24
25
|
requestOptions: () => requestOptions,
|
|
25
26
|
safeCodexControlRequest: () => safeCodexControlRequest
|
|
26
27
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
/** Selects the same prepared auth partition as an admitted session turn. */
|
|
29
|
+
async function prepareCodexControlSessionAuth(options, startOptions) {
|
|
30
|
+
if (!options.config || !options.sessionKey || !options.sessionId) {
|
|
31
|
+
if (options.onResponse) throw new Error("Codex control subscription requires admitted session authority.");
|
|
32
|
+
return {
|
|
33
|
+
authProfileId: options.authProfileId ?? void 0,
|
|
34
|
+
clientOptions: { authProfileId: options.authProfileId }
|
|
35
|
+
};
|
|
36
|
+
}
|
|
33
37
|
const config = options.config;
|
|
34
38
|
const { sessionAgentId } = resolveSessionAgentIdsStrict({
|
|
35
39
|
config,
|
|
@@ -128,7 +132,10 @@ function requestOptions(pluginConfig, limit, config, agentDir) {
|
|
|
128
132
|
async function codexControlRequest(pluginConfig, method, requestParams, options = {}) {
|
|
129
133
|
const runtime = options.startOptions ? resolveCodexSupervisionAppServerRuntimeOptions({ pluginConfig }) : resolveCodexAppServerRuntimeOptions({ pluginConfig });
|
|
130
134
|
const startOptions = options.startOptions ?? runtime.start;
|
|
131
|
-
const auth = await
|
|
135
|
+
const auth = options.onResponse ? await prepareCodexControlSessionAuth(options, startOptions) : {
|
|
136
|
+
authProfileId: options.authProfileId ?? void 0,
|
|
137
|
+
clientOptions: { authProfileId: options.authProfileId }
|
|
138
|
+
};
|
|
132
139
|
const controlRequestOptions = {
|
|
133
140
|
timeoutMs: options.timeoutMs ?? runtime.requestTimeoutMs,
|
|
134
141
|
assertCurrent: options.assertCurrent,
|
|
@@ -223,4 +230,4 @@ async function safeValue(read) {
|
|
|
223
230
|
}
|
|
224
231
|
}
|
|
225
232
|
//#endregion
|
|
226
|
-
export {
|
|
233
|
+
export { requestOptions as a, readCodexStatusProbes as i, command_rpc_exports as n, safeCodexControlRequest as o, prepareCodexControlSessionAuth as r, codexControlRequest as t };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { l as sessionBindingIdentity } from "./session-binding-record-
|
|
2
|
-
import { o as isJsonObject } from "./protocol-
|
|
3
|
-
import { u as isCodexAppServerPrewriteRequestCancellationError } from "./client-
|
|
1
|
+
import { l as sessionBindingIdentity } from "./session-binding-record-Bcvslnhf.js";
|
|
2
|
+
import { o as isJsonObject } from "./protocol-5bh1G-H7.js";
|
|
3
|
+
import { u as isCodexAppServerPrewriteRequestCancellationError } from "./client-B57KWPQx.js";
|
|
4
4
|
import { n as withCodexAppServerThreadMutation, t as isIncognitoSessionKey } from "./incognito-session-uhrBF6wJ.js";
|
|
5
|
-
import {
|
|
6
|
-
import { i as resolveCodexBindingAppServerConnection } from "./binding-connection-
|
|
7
|
-
import {
|
|
8
|
-
import { _ as readCodexNotificationTurnId, a as closeCodexStartupClientBestEffort, c as isCodexNoActiveTurnInterruptError, d as unsubscribeCodexThreadBestEffort, g as readCodexNotificationThreadId, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-
|
|
9
|
-
import { s as readCodexNotificationItem } from "./attempt-notifications
|
|
10
|
-
import { n as readCodexThreadContextSnapshot } from "./event-projector-usage-
|
|
11
|
-
import { o as resolveCodexSessionBinding, t as CODEX_APP_SERVER_BINDING_GUARDED_REQUEST_TIMEOUT_MS } from "./session-binding-
|
|
12
|
-
import { r as assertCodexSupervisionThreadLineage } from "./thread-policy-
|
|
13
|
-
import { t as resumeCodexAppServerThread } from "./thread-resume-
|
|
14
|
-
import { t as isSameCodexAppServerThreadOwner } from "./thread-ownership-
|
|
5
|
+
import { t as CodexAppServerRpcError } from "./rpc-error-ttN_QjEm.js";
|
|
6
|
+
import { i as resolveCodexBindingAppServerConnection } from "./binding-connection-D3udKbIE.js";
|
|
7
|
+
import { J as retainCodexAppServerLiveThread, R as consumeCodexAppServerLiveThread, c as getLeasedSharedCodexAppServerClient, h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-CscigXXL.js";
|
|
8
|
+
import { _ as readCodexNotificationTurnId, a as closeCodexStartupClientBestEffort, c as isCodexNoActiveTurnInterruptError, d as unsubscribeCodexThreadBestEffort, g as readCodexNotificationThreadId, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-DKHzbwt5.js";
|
|
9
|
+
import { s as readCodexNotificationItem } from "./attempt-notifications-C9XufG6l.js";
|
|
10
|
+
import { n as readCodexThreadContextSnapshot } from "./event-projector-usage-BfXmpOec.js";
|
|
11
|
+
import { o as resolveCodexSessionBinding, t as CODEX_APP_SERVER_BINDING_GUARDED_REQUEST_TIMEOUT_MS } from "./session-binding-CI8UuilT.js";
|
|
12
|
+
import { r as assertCodexSupervisionThreadLineage } from "./thread-policy-BuEQfE0g.js";
|
|
13
|
+
import { t as resumeCodexAppServerThread } from "./thread-resume-DsDOZpFg.js";
|
|
14
|
+
import { t as isSameCodexAppServerThreadOwner } from "./thread-ownership-BsDRTsyp.js";
|
|
15
15
|
import { t as persistCodexContextCompactionActivity } from "./context-compaction-activity-CMla5FPJ.js";
|
|
16
|
-
import { t as resolveCodexNativeExecutionBlock } from "./sandbox-guard-
|
|
16
|
+
import { t as resolveCodexNativeExecutionBlock } from "./sandbox-guard-BxgyoM8M.js";
|
|
17
17
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
18
18
|
import { resolveDefaultAgentId } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
19
19
|
import { coerceErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as readExecAsk, f as readRecord, l as readExecSecurity } from "./config-utils-
|
|
2
|
-
import { p as canUseCodexModelBackedApprovalsReviewerForModel$1 } from "./config-options-
|
|
3
|
-
import "./protocol-
|
|
4
|
-
import "./config-runtime-
|
|
1
|
+
import { c as readExecAsk, f as readRecord, l as readExecSecurity } from "./config-utils-DujwEnhg.js";
|
|
2
|
+
import { p as canUseCodexModelBackedApprovalsReviewerForModel$1 } from "./config-options-CXMq1T-C.js";
|
|
3
|
+
import "./protocol-5bh1G-H7.js";
|
|
4
|
+
import "./config-runtime-D0zGNIHu.js";
|
|
5
5
|
import { resolveAgentConfig } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
6
6
|
import { execPolicy } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
7
7
|
import { resolveExecApprovalsFromFile } from "openclaw/plugin-sdk/exec-approvals-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as normalizeHeaders, d as readNumberEnv, f as readRecord, i as normalizeCodexServiceTier, o as normalizePositiveNumber, p as resolveArgs, r as normalizeCodexAppServerSecretInput, s as readBooleanEnv, t as hashSecretForKey, u as readNonEmptyString } from "./config-utils-
|
|
2
|
-
import { _ as assertCodexAppServerCommandHasNoInlineArgs, d as DEFAULT_CODEX_APP_SERVER_NETWORK_PROXY_PROFILE_PREFIX, f as DEFAULT_CODEX_COMPUTER_USE_LIVE_TEST_TIMEOUT_MS, g as DEFAULT_CODEX_COMPUTER_USE_TOOL_CALL_TIMEOUT_MS, h as DEFAULT_CODEX_COMPUTER_USE_PLUGIN_NAME, l as resolveCodexAppServerUserHomeDir, o as isJsonObject, p as DEFAULT_CODEX_COMPUTER_USE_MARKETPLACE_DISCOVERY_TIMEOUT_MS, s as resolveCodexAppServerHomeDir, x as readCodexPluginConfig } from "./protocol-
|
|
1
|
+
import { a as normalizeHeaders, d as readNumberEnv, f as readRecord, i as normalizeCodexServiceTier, o as normalizePositiveNumber, p as resolveArgs, r as normalizeCodexAppServerSecretInput, s as readBooleanEnv, t as hashSecretForKey, u as readNonEmptyString } from "./config-utils-DujwEnhg.js";
|
|
2
|
+
import { _ as assertCodexAppServerCommandHasNoInlineArgs, d as DEFAULT_CODEX_APP_SERVER_NETWORK_PROXY_PROFILE_PREFIX, f as DEFAULT_CODEX_COMPUTER_USE_LIVE_TEST_TIMEOUT_MS, g as DEFAULT_CODEX_COMPUTER_USE_TOOL_CALL_TIMEOUT_MS, h as DEFAULT_CODEX_COMPUTER_USE_PLUGIN_NAME, l as resolveCodexAppServerUserHomeDir, o as isJsonObject, p as DEFAULT_CODEX_COMPUTER_USE_MARKETPLACE_DISCOVERY_TIMEOUT_MS, s as resolveCodexAppServerHomeDir, x as readCodexPluginConfig } from "./protocol-5bh1G-H7.js";
|
|
3
3
|
import { r as readCodexAppServerConfigOptions } from "./launch-args-RXQwn8zV.js";
|
|
4
4
|
import { normalizeTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
@@ -256,11 +256,11 @@ const CODEX_SESSION_OVERRIDABLE_LAYER_TYPES = /* @__PURE__ */ new Set([
|
|
|
256
256
|
"sessionFlags"
|
|
257
257
|
]);
|
|
258
258
|
/** Read one effective snapshot for the current boundary's reviewer and tool-policy checks. */
|
|
259
|
-
async function readCodexEffectiveConfig(client, cwd,
|
|
259
|
+
async function readCodexEffectiveConfig(client, cwd, options) {
|
|
260
260
|
const response = await client.request("config/read", {
|
|
261
261
|
cwd: path.resolve(cwd),
|
|
262
262
|
includeLayers: true
|
|
263
|
-
},
|
|
263
|
+
}, options);
|
|
264
264
|
if (!isJsonObject(response) || !isJsonObject(response.config)) throw new Error("Codex config/read returned an invalid effective config");
|
|
265
265
|
return response;
|
|
266
266
|
}
|
|
@@ -270,7 +270,7 @@ const CODEX_CONFIG_TOML_FILENAME = "config.toml";
|
|
|
270
270
|
/** Cloud/system config can redirect reviews after local home/profile checks have passed. */
|
|
271
271
|
async function assertCodexModelBackedReviewerEffectiveConfig(params) {
|
|
272
272
|
if (params.approvalsReviewer !== "auto_review" && params.approvalsReviewer !== "guardian_subagent") return;
|
|
273
|
-
const response = await readCodexEffectiveConfig(params.client, params.cwd, params.signal);
|
|
273
|
+
const response = await readCodexEffectiveConfig(params.client, params.cwd, { signal: params.signal });
|
|
274
274
|
const effectiveConfig = response.config;
|
|
275
275
|
const modelProvider = effectiveConfig.model_provider;
|
|
276
276
|
const providers = effectiveConfig.model_providers;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { r as createCodexAppServerConfig } from "./config-options-
|
|
2
|
+
import { r as createCodexAppServerConfig } from "./config-options-CXMq1T-C.js";
|
|
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({
|
|
@@ -3,9 +3,7 @@ import { createHmac, randomBytes } from "node:crypto";
|
|
|
3
3
|
import { resolvePositiveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
4
4
|
import { splitCommandArgs } from "openclaw/plugin-sdk/process-runtime";
|
|
5
5
|
import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
6
|
-
//#region extensions/codex/src/app-server/config-contracts.ts
|
|
7
|
-
const CODEX_PLUGINS_MARKETPLACE_NAME = "openai-curated";
|
|
8
|
-
const CODEX_PLUGINS_WORKSPACE_MARKETPLACE_NAME = "workspace-directory";
|
|
6
|
+
//#region extensions/codex/src/app-server/config-contracts.shared.ts
|
|
9
7
|
const CODEX_PLUGIN_MARKETPLACE_NAME_PATTERN = /^[A-Za-z0-9_-]+$/;
|
|
10
8
|
//#endregion
|
|
11
9
|
//#region extensions/codex/src/app-server/config-utils.ts
|
|
@@ -66,4 +64,4 @@ function getStartOptionsKeySecret() {
|
|
|
66
64
|
return globalState[START_OPTIONS_KEY_SECRET_SYMBOL];
|
|
67
65
|
}
|
|
68
66
|
//#endregion
|
|
69
|
-
export { normalizeHeaders as a, readExecAsk as c, readNumberEnv as d, readRecord as f,
|
|
67
|
+
export { normalizeHeaders as a, readExecAsk as c, readNumberEnv as d, readRecord as f, normalizeCodexServiceTier as i, readExecSecurity as l, CODEX_PLUGIN_MARKETPLACE_NAME_PATTERN as m, isCodexFastServiceTier as n, normalizePositiveNumber as o, resolveArgs as p, normalizeCodexAppServerSecretInput as r, readBooleanEnv as s, hashSecretForKey as t, readNonEmptyString as u };
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { l as sessionBindingIdentity, n as assertCodexBindingMayBeReplaced } from "./session-binding-record-
|
|
2
|
-
import { b as readCodexRequirementsToml, n as codexSandboxPolicyForTurn } from "./config-options-
|
|
3
|
-
import { o as isJsonObject, x as readCodexPluginConfig } from "./protocol-
|
|
4
|
-
import { _ as assertCodexThreadAcceptsDirectInput, b as assertCodexThreadStartResponse, l as isCodexAppServerOverloadError, m as CodexThreadDirectInputError, s as isCodexAppServerIndeterminateRequestCancellationError } from "./client-
|
|
1
|
+
import { l as sessionBindingIdentity, n as assertCodexBindingMayBeReplaced } from "./session-binding-record-Bcvslnhf.js";
|
|
2
|
+
import { b as readCodexRequirementsToml, g as readCodexEffectiveConfig, n as codexSandboxPolicyForTurn } from "./config-options-CXMq1T-C.js";
|
|
3
|
+
import { o as isJsonObject, x as readCodexPluginConfig } from "./protocol-5bh1G-H7.js";
|
|
4
|
+
import { _ as assertCodexThreadAcceptsDirectInput, b as assertCodexThreadStartResponse, l as isCodexAppServerOverloadError, m as CodexThreadDirectInputError, s as isCodexAppServerIndeterminateRequestCancellationError } from "./client-B57KWPQx.js";
|
|
5
5
|
import { o as resolveCodexDefaultWorkspaceDir } from "./conversation-binding-data-BiodpIzq.js";
|
|
6
|
-
import {
|
|
7
|
-
import { n as resolveOpenClawExecPolicyForCodexAppServer, t as canUseCodexModelBackedApprovalsReviewerForModel } from "./config-
|
|
8
|
-
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-
|
|
6
|
+
import { n as projectBoundedCodexVisibleSessionHistory } from "./transcript-history-projection-v17wXgdK.js";
|
|
7
|
+
import { n as resolveOpenClawExecPolicyForCodexAppServer, t as canUseCodexModelBackedApprovalsReviewerForModel } from "./config-oIORaQ5T.js";
|
|
8
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-D0zGNIHu.js";
|
|
9
9
|
import { n as normalizeCodexAppServerBindingModelProvider, t as isCodexAppServerNativeAuthProfile } from "./auth-profile-CwzO4_RG.js";
|
|
10
|
-
import {
|
|
11
|
-
import { a as closeCodexStartupClientBestEffort, d as unsubscribeCodexThreadBestEffort, h as isCodexNotificationForTurn, l as retireUnsafeCodexTurnClientBestEffort, o as interruptCodexTurnAndWaitBestEffort, p as getCodexAppServerTurnRouter, s as isCodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-
|
|
12
|
-
import { n as isAssistantCommentaryCompletionNotification } from "./attempt-notifications
|
|
13
|
-
import {
|
|
14
|
-
import "./session-binding-
|
|
15
|
-
import { t as resumeCodexAppServerThread } from "./thread-resume-
|
|
16
|
-
import { a as rollbackCodexAppServerBindingSubscription, n as releaseCodexAppServerBindingSubscription, r as retainCodexAppServerBindingSubscription, s as withExclusiveCodexAppServerThread, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-
|
|
17
|
-
import { a as resolveCodexAppServerForModelProvider, i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, t as CODEX_SESSION_PERMISSION_EXEC_MODES } from "./session-permission-policy-
|
|
18
|
-
import { u as trackCodexConversationActiveTurn } from "./conversation-control-
|
|
10
|
+
import { H as isCodexAppServerClientRuntimeLive, R as consumeCodexAppServerLiveThread, U as isCodexAppServerLiveThreadClaimed, V as hasCodexAppServerLiveThread, _ as retainSharedCodexAppServerClientByInstanceId, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease, q as releaseCodexAppServerLiveThread, x as withLeasedCodexAppServerClientStartSelectionRetry } from "./shared-client-CscigXXL.js";
|
|
11
|
+
import { a as closeCodexStartupClientBestEffort, d as unsubscribeCodexThreadBestEffort, h as isCodexNotificationForTurn, l as retireUnsafeCodexTurnClientBestEffort, o as interruptCodexTurnAndWaitBestEffort, p as getCodexAppServerTurnRouter, s as isCodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-DKHzbwt5.js";
|
|
12
|
+
import { n as isAssistantCommentaryCompletionNotification } from "./attempt-notifications-C9XufG6l.js";
|
|
13
|
+
import { D as resolveCodexAppServerRequestModelSelection, Et as mergeCodexThreadConfigs, M as buildCodexProjectDocThreadConfig, T as CODEX_NATIVE_PERSONALITY_NONE, Tt as buildDisabledAppsConfigPatch } from "./thread-lifecycle-DXl1-I6b.js";
|
|
14
|
+
import "./session-binding-CI8UuilT.js";
|
|
15
|
+
import { t as resumeCodexAppServerThread } from "./thread-resume-DsDOZpFg.js";
|
|
16
|
+
import { a as rollbackCodexAppServerBindingSubscription, n as releaseCodexAppServerBindingSubscription, r as retainCodexAppServerBindingSubscription, s as withExclusiveCodexAppServerThread, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-BsDRTsyp.js";
|
|
17
|
+
import { a as resolveCodexAppServerForModelProvider, i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, t as CODEX_SESSION_PERMISSION_EXEC_MODES } from "./session-permission-policy-BBmXA8Eg.js";
|
|
18
|
+
import { u as trackCodexConversationActiveTurn } from "./conversation-control-CtUu1b3m.js";
|
|
19
19
|
import { asOptionalRecord, normalizeOptionalString, normalizeSingleOrTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
20
20
|
import { resolveSessionAgentIdsStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
21
21
|
import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -157,7 +157,7 @@ async function resolveThreadBindingRuntime(params) {
|
|
|
157
157
|
clientOptions
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
|
-
function buildConversationThreadRequest(resolved, serviceTier) {
|
|
160
|
+
function buildConversationThreadRequest(resolved, serviceTier, effectiveNativeConfig) {
|
|
161
161
|
return {
|
|
162
162
|
cwd: resolved.workspaceDir,
|
|
163
163
|
...resolved.model ? { model: resolved.model } : {},
|
|
@@ -166,13 +166,18 @@ function buildConversationThreadRequest(resolved, serviceTier) {
|
|
|
166
166
|
approvalPolicy: resolved.runtime.approvalPolicy,
|
|
167
167
|
approvalsReviewer: resolved.runtime.approvalsReviewer,
|
|
168
168
|
...resolved.runtime.sessionRoot ? { runtimeWorkspaceRoots: [resolved.runtime.sessionRoot] } : {},
|
|
169
|
-
...codexConversationSandboxOrPermissions(resolved.runtime, resolved.runtime.sandbox),
|
|
169
|
+
...codexConversationSandboxOrPermissions(resolved.runtime, resolved.runtime.sandbox, effectiveNativeConfig),
|
|
170
170
|
...serviceTier ? { serviceTier } : {}
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
async function buildConversationThreadRequestForClient(client, resolved, serviceTier, requestOptions) {
|
|
174
|
+
const effectiveConfig = await readCodexEffectiveConfig(client, resolved.workspaceDir, requestOptions());
|
|
175
|
+
requestOptions();
|
|
176
|
+
return buildConversationThreadRequest(resolved, serviceTier, effectiveConfig);
|
|
177
|
+
}
|
|
178
|
+
function codexConversationSandboxOrPermissions(runtime, sandbox, effectiveNativeConfig) {
|
|
174
179
|
const networkProxy = runtime.networkProxy;
|
|
175
|
-
const config = buildCodexProjectDocThreadConfig(mergeCodexThreadConfigs(networkProxy?.configPatch, buildDisabledAppsConfigPatch()));
|
|
180
|
+
const config = buildCodexProjectDocThreadConfig(mergeCodexThreadConfigs(networkProxy?.configPatch, buildDisabledAppsConfigPatch()), effectiveNativeConfig);
|
|
176
181
|
return networkProxy ? { config } : {
|
|
177
182
|
sandbox,
|
|
178
183
|
config
|
|
@@ -233,7 +238,7 @@ async function bindThread(params, threadId) {
|
|
|
233
238
|
lease: clientLease,
|
|
234
239
|
options: resolved.clientOptions,
|
|
235
240
|
run: async (client, requestOptions) => {
|
|
236
|
-
const request =
|
|
241
|
+
const request = await buildConversationThreadRequestForClient(client, resolved, params.serviceTier ?? resolved.runtime.serviceTier, requestOptions);
|
|
237
242
|
let response;
|
|
238
243
|
if (threadId && !resolved.runtime.networkProxy) {
|
|
239
244
|
if (isCodexAppServerLiveThreadClaimed(client, threadId)) throw new Error(`Codex thread ${threadId} has an active run; stop it before binding its conversation.`);
|
|
@@ -682,12 +687,15 @@ async function runBoundTurn(params) {
|
|
|
682
687
|
const response = assertCodexThreadStartResponse(await withLeasedCodexAppServerClientStartSelectionRetry({
|
|
683
688
|
lease: clientLease,
|
|
684
689
|
options: clientOptions,
|
|
685
|
-
run: async (requestClient, requestOptions) =>
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
690
|
+
run: async (requestClient, requestOptions) => {
|
|
691
|
+
const threadRequest = await buildConversationThreadRequestForClient(requestClient, threadRequestRuntime, serviceTier, requestOptions);
|
|
692
|
+
return await requestClient.request("thread/start", {
|
|
693
|
+
...threadRequest,
|
|
694
|
+
developerInstructions: CODEX_CONVERSATION_THREAD_DEVELOPER_INSTRUCTIONS,
|
|
695
|
+
experimentalRawEvents: true,
|
|
696
|
+
...params.incognito ? { ephemeral: true } : {}
|
|
697
|
+
}, requestOptions());
|
|
698
|
+
},
|
|
691
699
|
onClientChange: (nextClient) => {
|
|
692
700
|
client = nextClient;
|
|
693
701
|
}
|
|
@@ -733,21 +741,24 @@ async function runBoundTurn(params) {
|
|
|
733
741
|
const response = await withLeasedCodexAppServerClientStartSelectionRetry({
|
|
734
742
|
lease: clientLease,
|
|
735
743
|
options: clientOptions,
|
|
736
|
-
run: async (requestClient, requestOptions) =>
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
744
|
+
run: async (requestClient, requestOptions) => {
|
|
745
|
+
const threadRequest = await buildConversationThreadRequestForClient(requestClient, threadRequestRuntime, serviceTier, requestOptions);
|
|
746
|
+
return await resumeCodexAppServerThread({
|
|
747
|
+
client: requestClient,
|
|
748
|
+
onSubscriptionReleased: () => {
|
|
749
|
+
isolatedSubscriptionClient = requestClient;
|
|
750
|
+
},
|
|
751
|
+
abandonClient: async () => {
|
|
752
|
+
await closeCodexStartupClientBestEffort(requestClient);
|
|
753
|
+
isolatedSubscriptionClient = requestClient;
|
|
754
|
+
},
|
|
755
|
+
request: {
|
|
756
|
+
threadId,
|
|
757
|
+
...threadRequest
|
|
758
|
+
},
|
|
759
|
+
requestResume: (request) => requestClient.request("thread/resume", request, requestOptions())
|
|
760
|
+
});
|
|
761
|
+
},
|
|
751
762
|
onClientChange: (nextClient) => {
|
|
752
763
|
client = nextClient;
|
|
753
764
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { n as isCodexFastServiceTier } from "./config-utils-
|
|
2
|
-
import { r as bindingStoreKey } from "./session-binding-record-
|
|
3
|
-
import {
|
|
4
|
-
import "./config-
|
|
5
|
-
import { i as resolveCodexBindingAppServerConnection } from "./binding-connection-
|
|
1
|
+
import { n as isCodexFastServiceTier } from "./config-utils-DujwEnhg.js";
|
|
2
|
+
import { r as bindingStoreKey } from "./session-binding-record-Bcvslnhf.js";
|
|
3
|
+
import { o as formatCodexDisplayText } from "./command-formatters-lxlkNZgU.js";
|
|
4
|
+
import "./config-oIORaQ5T.js";
|
|
5
|
+
import { i as resolveCodexBindingAppServerConnection } from "./binding-connection-D3udKbIE.js";
|
|
6
6
|
import { n as normalizeCodexAppServerBindingModelProvider, t as isCodexAppServerNativeAuthProfile } from "./auth-profile-CwzO4_RG.js";
|
|
7
|
-
import { c as getLeasedSharedCodexAppServerClient, h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-
|
|
8
|
-
import {
|
|
9
|
-
import "./session-binding-
|
|
7
|
+
import { c as getLeasedSharedCodexAppServerClient, h as releaseLeasedSharedCodexAppServerClient } from "./shared-client-CscigXXL.js";
|
|
8
|
+
import { D as resolveCodexAppServerRequestModelSelection, k as resolveCodexBindingModelProviderFallback } from "./thread-lifecycle-DXl1-I6b.js";
|
|
9
|
+
import "./session-binding-CI8UuilT.js";
|
|
10
10
|
import { resolveAgentDir } from "openclaw/plugin-sdk/agent-runtime";
|
|
11
11
|
import { getSessionEntry, patchSessionEntry, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
12
12
|
import { ModelSelectionLockedError, applyModelOverrideWithAuthProfileCompatibility } from "openclaw/plugin-sdk/model-session-runtime";
|
|
@@ -391,7 +391,7 @@ async function migrateSource(source, candidates, params, store) {
|
|
|
391
391
|
return await withFileLock(source.sidecarPath, LEGACY_BINDING_LOCK_OPTIONS, async () => {
|
|
392
392
|
const [contents, stat] = await Promise.all([fs.readFile(source.sidecarPath, "utf8"), fs.stat(source.sidecarPath)]);
|
|
393
393
|
const raw = JSON.parse(contents);
|
|
394
|
-
const [{ bindingStoreKey, createStoredCodexAppServerBinding, normalizeStoredCodexAppServerBindingFingerprints, readStoredCodexAppServerBinding }, { legacyCodexConversationBindingId }] = await Promise.all([import("./session-binding-
|
|
394
|
+
const [{ bindingStoreKey, createStoredCodexAppServerBinding, normalizeStoredCodexAppServerBindingFingerprints, readStoredCodexAppServerBinding }, { legacyCodexConversationBindingId }] = await Promise.all([import("./session-binding-CI8UuilT.js").then((n) => n.c), import("./conversation-binding-data-BiodpIzq.js").then((n) => n.t)]);
|
|
395
395
|
const agentId = owner?.agentId ?? (source.agentIds.size === 1 ? [...source.agentIds][0] : void 0);
|
|
396
396
|
const baseStored = createStoredCodexAppServerBinding(raw, {
|
|
397
397
|
now: stat.mtime.toISOString(),
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { a as flattenCodexDynamicToolFunctions, o as isJsonObject, r as CODEX_OPENCLAW_DIRECT_DYNAMIC_TOOL_NAMESPACE, x as readCodexPluginConfig, y as isCodexRemoteExecPlacementSandbox } from "./protocol-
|
|
2
|
-
import { B as withDynamicToolTranscriptDetails, E as createCodexElicitationResponse, L as resolveCodexToolAbortTerminalReason, R as createFailedDynamicToolResponse, w as readCodexTurn, z as withDynamicToolExecutionState } from "./client-
|
|
3
|
-
import {
|
|
4
|
-
import "./
|
|
1
|
+
import { a as flattenCodexDynamicToolFunctions, o as isJsonObject, r as CODEX_OPENCLAW_DIRECT_DYNAMIC_TOOL_NAMESPACE, x as readCodexPluginConfig, y as isCodexRemoteExecPlacementSandbox } from "./protocol-5bh1G-H7.js";
|
|
2
|
+
import { B as withDynamicToolTranscriptDetails, E as createCodexElicitationResponse, L as resolveCodexToolAbortTerminalReason, R as createFailedDynamicToolResponse, w as readCodexTurn, z as withDynamicToolExecutionState } from "./client-B57KWPQx.js";
|
|
3
|
+
import { o as formatCodexDisplayText } from "./command-formatters-lxlkNZgU.js";
|
|
4
|
+
import { c as itemName, f as shouldClearTerminalPresentationForNativeItem, l as itemStatus, n as auditNativeToolTerminalStatus, r as auditNativeToolUnfinishedStatus, t as auditNativeToolName, x as readItem } from "./event-projector-items-5VhsECCO.js";
|
|
5
|
+
import "./config-oIORaQ5T.js";
|
|
5
6
|
import { r as sanitizeInlineImageDataUrl, t as invalidInlineImageText } from "./image-payload-sanitizer-tupAr-2o.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
7
|
+
import { h as isCodexNotificationForTurn } from "./attempt-client-cleanup-DKHzbwt5.js";
|
|
8
|
+
import { C as resolveCodexWebSearchPlan, V as emitCodexNativePreToolUseFailureDiagnostic, at as isForcedPrivateQaCodexRuntime, ct as normalizeCodexDynamicToolName, it as filterCodexDynamicToolsForDisabledNativeSurface, rt as filterCodexDynamicTools, st as isSystemAgentOnlyCodexDynamicToolAllowlist } from "./thread-lifecycle-DXl1-I6b.js";
|
|
8
9
|
import { n as resolveCodexNativeExecutionPolicy, r as resolveCodexNodeExecToolOverrides } from "./native-execution-policy-umd0tgh4.js";
|
|
9
|
-
import { a as CODEX_NODE_EXEC_DYNAMIC_TOOL_NAME, c as createNodeExecAliasDynamicTool, i as CODEX_GATEWAY_PROCESS_DYNAMIC_TOOL_NAME, l as isCodexDynamicToolExcluded, o as createGatewayExecProjection, r as CODEX_GATEWAY_EXEC_DYNAMIC_TOOL_NAME, s as createGatewayProcessProjection } from "./provider-capabilities-
|
|
10
|
-
import { a as requestPluginApprovalOutcome, c as truncateCodexApprovalDisplayText, i as requestPluginApproval, l as waitForPluginApprovalDecision, n as codexApprovalTimeoutText, o as sanitizeCodexApprovalVisibleText, r as mapExecDecisionToOutcome, s as stripDanglingCodexApprovalTerminalSequence, t as approvalRequestExplicitlyUnavailable } from "./plugin-approval-roundtrip-
|
|
10
|
+
import { a as CODEX_NODE_EXEC_DYNAMIC_TOOL_NAME, c as createNodeExecAliasDynamicTool, i as CODEX_GATEWAY_PROCESS_DYNAMIC_TOOL_NAME, l as isCodexDynamicToolExcluded, o as createGatewayExecProjection, r as CODEX_GATEWAY_EXEC_DYNAMIC_TOOL_NAME, s as createGatewayProcessProjection } from "./provider-capabilities-BvCUL69A.js";
|
|
11
|
+
import { a as requestPluginApprovalOutcome, c as truncateCodexApprovalDisplayText, i as requestPluginApproval, l as waitForPluginApprovalDecision, n as codexApprovalTimeoutText, o as sanitizeCodexApprovalVisibleText, r as mapExecDecisionToOutcome, s as stripDanglingCodexApprovalTerminalSequence, t as approvalRequestExplicitlyUnavailable } from "./plugin-approval-roundtrip-Bz3FT8W5.js";
|
|
11
12
|
import { createRequire } from "node:module";
|
|
12
13
|
import { asNonArrayRecord, asOptionalRecord, isRecord, normalizeOptionalString, normalizeTrimmedStringList, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
13
14
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -32,10 +33,10 @@ import { isIP } from "node:net";
|
|
|
32
33
|
import { redactToolPayloadText } from "openclaw/plugin-sdk/logging-core";
|
|
33
34
|
import { formatMcpCodexApprovalRemedy, requiresMcpCodexToolApproval, resolveCodexScheduledToolProjectionFactory, resolveProjectedMcpCodexToolApprovalMode, runWithCronCreatorAuthorityCapabilityResolver } from "openclaw/plugin-sdk/codex-mcp-projection";
|
|
34
35
|
import { buildRemoteCommand, isToolAllowed, sanitizeEnvVars } from "openclaw/plugin-sdk/sandbox";
|
|
36
|
+
import { SsrFBlockedError, isBlockedHostnameOrIp } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
35
37
|
import { saveMediaBuffer } from "openclaw/plugin-sdk/media-store";
|
|
36
38
|
import { getMediaDir } from "openclaw/plugin-sdk/media-runtime";
|
|
37
39
|
import { consumeTrustedToolNoStartError, copyInternalToolResultState, getCoreTtsToolResultMediaUrls } from "openclaw/plugin-sdk/agent-harness-tool-runtime";
|
|
38
|
-
import { SsrFBlockedError, isBlockedHostnameOrIp } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
39
40
|
import { normalizeOpenAIStrictCompatSchema } from "openclaw/plugin-sdk/provider-tools";
|
|
40
41
|
//#region extensions/codex/src/app-server/dynamic-tool-build-state.ts
|
|
41
42
|
/** Mutable dependency seam shared by dynamic-tool construction and its behavioral tests. */
|
|
@@ -4662,6 +4663,64 @@ function readFirstString$1(record, keys) {
|
|
|
4662
4663
|
}
|
|
4663
4664
|
}
|
|
4664
4665
|
//#endregion
|
|
4666
|
+
//#region extensions/codex/src/app-server/dynamic-tool-automations-allowlist.ts
|
|
4667
|
+
function createCodexAutomationsToolsAllowResolver(specs) {
|
|
4668
|
+
const names = /* @__PURE__ */ new Set();
|
|
4669
|
+
const qualifiedNames = /* @__PURE__ */ new Map();
|
|
4670
|
+
for (const spec of specs) {
|
|
4671
|
+
if (spec.type === "function") {
|
|
4672
|
+
names.add(spec.name);
|
|
4673
|
+
continue;
|
|
4674
|
+
}
|
|
4675
|
+
for (const tool of spec.tools) {
|
|
4676
|
+
names.add(tool.name);
|
|
4677
|
+
const separator = spec.name.endsWith("_") || tool.name.startsWith("_") ? "" : "__";
|
|
4678
|
+
qualifiedNames.set(`${spec.name}${separator}${tool.name}`, tool.name);
|
|
4679
|
+
}
|
|
4680
|
+
}
|
|
4681
|
+
function resolveList(value) {
|
|
4682
|
+
const resolved = value.map((name) => typeof name !== "string" || names.has(name) ? name : qualifiedNames.get(name) ?? name);
|
|
4683
|
+
return resolved.every((name, index) => name === value[index]) ? value : resolved;
|
|
4684
|
+
}
|
|
4685
|
+
function resolvePayload(value) {
|
|
4686
|
+
if (!isJsonObject(value) || !Array.isArray(value.toolsAllow)) return value;
|
|
4687
|
+
const toolsAllow = resolveList(value.toolsAllow);
|
|
4688
|
+
return toolsAllow === value.toolsAllow ? value : {
|
|
4689
|
+
...value,
|
|
4690
|
+
toolsAllow
|
|
4691
|
+
};
|
|
4692
|
+
}
|
|
4693
|
+
function resolveJobFields(value, paddedKeys) {
|
|
4694
|
+
let resolved = value;
|
|
4695
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
4696
|
+
const field = paddedKeys ? key.trim() : key;
|
|
4697
|
+
if (key !== field && Object.hasOwn(value, field)) continue;
|
|
4698
|
+
const next = field === "toolsAllow" && Array.isArray(entry) ? resolveList(entry) : field === "payload" || field === "namePayload" ? resolvePayload(entry) : entry;
|
|
4699
|
+
if (next !== entry) {
|
|
4700
|
+
if (resolved === value) resolved = { ...value };
|
|
4701
|
+
resolved[key] = next;
|
|
4702
|
+
}
|
|
4703
|
+
}
|
|
4704
|
+
return resolved;
|
|
4705
|
+
}
|
|
4706
|
+
return (args) => {
|
|
4707
|
+
if (!isJsonObject(args)) return args;
|
|
4708
|
+
const job = args.job;
|
|
4709
|
+
if (!job || isJsonObject(job) && Object.keys(job).length === 0) return resolveJobFields(args, false);
|
|
4710
|
+
if (!isJsonObject(job)) return args;
|
|
4711
|
+
const wrapper = isJsonObject(job.data) ? "data" : isJsonObject(job.job) ? "job" : void 0;
|
|
4712
|
+
const wrapped = wrapper ? job[wrapper] : void 0;
|
|
4713
|
+
const resolved = wrapper && isJsonObject(wrapped) ? {
|
|
4714
|
+
...job,
|
|
4715
|
+
[wrapper]: resolveJobFields(wrapped, true)
|
|
4716
|
+
} : resolveJobFields(job, true);
|
|
4717
|
+
return resolved === job ? args : {
|
|
4718
|
+
...args,
|
|
4719
|
+
job: resolved
|
|
4720
|
+
};
|
|
4721
|
+
};
|
|
4722
|
+
}
|
|
4723
|
+
//#endregion
|
|
4665
4724
|
//#region extensions/codex/src/app-server/dynamic-tool-catalog.ts
|
|
4666
4725
|
/** Namespace attached to OpenClaw-owned dynamic tools exposed to Codex. */
|
|
4667
4726
|
const CODEX_OPENCLAW_DYNAMIC_TOOL_NAMESPACE = "openclaw";
|
|
@@ -5121,6 +5180,12 @@ function createCodexDynamicToolBridge(params) {
|
|
|
5121
5180
|
const legacyExtensionRunner = createCodexAppServerToolResultExtensionRunner(toolResultHookContext);
|
|
5122
5181
|
const executionSnapshotStates = /* @__PURE__ */ new Map();
|
|
5123
5182
|
const directToolNames = params.directToolNames;
|
|
5183
|
+
const specs = inheritedSpecs ?? createCodexDynamicToolSpecs({
|
|
5184
|
+
entries: registeredSpecTools,
|
|
5185
|
+
loading: params.loading ?? "searchable",
|
|
5186
|
+
directToolNames
|
|
5187
|
+
});
|
|
5188
|
+
const resolveAutomationsToolsAllow = createCodexAutomationsToolsAllowResolver(specs);
|
|
5124
5189
|
let readRemoteWorkspaceFile;
|
|
5125
5190
|
return {
|
|
5126
5191
|
availableTools: availableTools.map((entry) => entry.tool),
|
|
@@ -5136,11 +5201,7 @@ function createCodexDynamicToolBridge(params) {
|
|
|
5136
5201
|
loading: params.loading ?? "searchable",
|
|
5137
5202
|
directToolNames
|
|
5138
5203
|
}),
|
|
5139
|
-
specs
|
|
5140
|
-
entries: registeredSpecTools,
|
|
5141
|
-
loading: params.loading ?? "searchable",
|
|
5142
|
-
directToolNames
|
|
5143
|
-
}),
|
|
5204
|
+
specs,
|
|
5144
5205
|
resultContentSourceForTool: (toolName) => toolMap.get(toolName)?.tool.resultContentSource,
|
|
5145
5206
|
sideEffectOwnerKeyForTool: (toolName) => {
|
|
5146
5207
|
const tool = toolMap.get(toolName)?.tool;
|
|
@@ -5177,7 +5238,7 @@ function createCodexDynamicToolBridge(params) {
|
|
|
5177
5238
|
});
|
|
5178
5239
|
}
|
|
5179
5240
|
const { tool, name: toolName } = toolEntry;
|
|
5180
|
-
const rawArguments = call.arguments;
|
|
5241
|
+
const rawArguments = toolName === "automations" ? resolveAutomationsToolsAllow(call.arguments) : call.arguments;
|
|
5181
5242
|
const args = asNonArrayRecord(rawArguments);
|
|
5182
5243
|
const startedAt = Date.now();
|
|
5183
5244
|
const signal = composeAbortSignals(params.signal, options?.signal);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as sessionBindingIdentity } from "./session-binding-record-
|
|
2
|
-
import { _ as retainSharedCodexAppServerClientByInstanceId } from "./shared-client-
|
|
3
|
-
import "./session-binding-
|
|
1
|
+
import { l as sessionBindingIdentity } from "./session-binding-record-Bcvslnhf.js";
|
|
2
|
+
import { _ as retainSharedCodexAppServerClientByInstanceId } from "./shared-client-CscigXXL.js";
|
|
3
|
+
import "./session-binding-CI8UuilT.js";
|
|
4
4
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { assignMcpCatalogSafeServerNames } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
6
6
|
//#region extensions/codex/src/app-server/effective-mcp-catalog.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { o as isJsonObject } from "./protocol-
|
|
2
|
-
import { T as readCodexTurnCompletedNotification } from "./client-
|
|
3
|
-
import { p as getCodexAppServerTurnRouter } from "./attempt-client-cleanup-
|
|
4
|
-
import { o as isTerminalTurnStatus, s as readCodexNotificationItem } from "./attempt-notifications
|
|
5
|
-
import { t as CodexUsageProjection } from "./event-projector-usage-
|
|
1
|
+
import { o as isJsonObject } from "./protocol-5bh1G-H7.js";
|
|
2
|
+
import { T as readCodexTurnCompletedNotification } from "./client-B57KWPQx.js";
|
|
3
|
+
import { p as getCodexAppServerTurnRouter } from "./attempt-client-cleanup-DKHzbwt5.js";
|
|
4
|
+
import { o as isTerminalTurnStatus, s as readCodexNotificationItem } from "./attempt-notifications-C9XufG6l.js";
|
|
5
|
+
import { t as CodexUsageProjection } from "./event-projector-usage-BfXmpOec.js";
|
|
6
6
|
import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { toStringifiedError } from "openclaw/plugin-sdk/error-runtime";
|
|
8
8
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|