@openclaw/codex 2026.9.5 → 2026.9.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-C2MOIvfq.mjs → account-usage-runtime-Eem_WGqY.mjs} +5 -5
- package/dist/.setup/{apply-CJ0ZfmBG.mjs → apply-DDOi8uNx.mjs} +22 -28
- package/dist/.setup/{attempt-client-cleanup-BpYKdTA0.mjs → attempt-client-cleanup-CEv1cKwF.mjs} +58 -43
- package/dist/.setup/attempt-workspace-context-DUVEn_CS.mjs +331 -0
- package/dist/.setup/{auth-cache-key-QirmgiCo.mjs → auth-cache-key-B2mpaI9D.mjs} +9 -81
- package/dist/.setup/auth-profile-health-oHizqgye.mjs +53 -0
- package/dist/.setup/auth-profile-recovery-BREezV0L.mjs +14 -0
- package/dist/.setup/{binding-connection-Bm38niE8.mjs → binding-connection-ThoatDcb.mjs} +1 -1
- package/dist/.setup/{binding-connection.runtime-CnRMC0ta.mjs → binding-connection.runtime-yoHrABt-.mjs} +4 -4
- package/dist/.setup/{bounded-turn-BtlZcivC.mjs → bounded-turn-B2HScEgT.mjs} +138 -32
- package/dist/.setup/{build-state-Xx9ybZqa.mjs → build-state-C7EnDVgr.mjs} +1 -1
- package/dist/.setup/{capabilities-_vXcZGSx.mjs → capabilities-CDXOOFdZ.mjs} +1 -1
- package/dist/.setup/{client-vXs2929Q.mjs → client-Cs08OXVQ.mjs} +583 -559
- package/dist/.setup/client-catalog-response-BMgt_4q4.mjs +285 -0
- package/dist/.setup/{command-dispatch-naHIZwwF.mjs → command-dispatch-B4JuOsOk.mjs} +8 -4
- package/dist/.setup/{command-formatters-CGEkdawF.mjs → command-formatters-Bmqvr9tO.mjs} +8 -4
- package/dist/.setup/{command-handlers-BtAJEW1X.mjs → command-handlers-DW7Lx9oH.mjs} +106 -172
- package/dist/.setup/{command-rpc-DHFpn4le.mjs → command-rpc-DixIj3HW.mjs} +36 -21
- package/dist/.setup/{compact-C3i3qlzj.mjs → compact-Du5UvtxA.mjs} +14 -21
- package/dist/.setup/{config-CedDWjM-.mjs → config-BoTP_mrL.mjs} +3 -3
- package/dist/.setup/{config-options-BsanJ8QG.mjs → config-options-BvaRs51b.mjs} +46 -30
- package/dist/.setup/{config-runtime-CeAhl_h4.mjs → config-runtime-C8Rw1m1m.mjs} +1 -1
- package/dist/.setup/{config-security-BRQ2mgW9.mjs → config-security-BEReZ6go.mjs} +35 -120
- package/dist/.setup/{conversation-binding-DhzrpTM6.mjs → conversation-binding-DP-gMrBP.mjs} +21 -32
- package/dist/.setup/{conversation-control-DN53ns41.mjs → conversation-control-uK9Jomlc.mjs} +28 -67
- package/dist/.setup/{dynamic-tools-D16lOp67.mjs → dynamic-tools-BDXl-8Cw.mjs} +848 -578
- package/dist/.setup/{effective-mcp-catalog-K6kLCN8X.mjs → effective-mcp-catalog-CvnvnGIe.mjs} +3 -3
- package/dist/.setup/{ephemeral-turn-R1gA8Sn6.mjs → ephemeral-turn-poidXgek.mjs} +9 -6
- package/dist/.setup/{event-projector-assistant-message-DNUR1s0A.mjs → event-projector-assistant-message-BsruvNrH.mjs} +2 -4
- package/dist/.setup/{event-projector-items-DyTQ_XqL.mjs → event-projector-items-C6L_5ZiT.mjs} +42 -8
- package/dist/.setup/{event-projector-usage-C7Ntzs-f.mjs → event-projector-usage-CnBS8Wa3.mjs} +1 -1
- package/dist/.setup/{harness-rxaaoN-o.mjs → harness-a_MsE4-_.mjs} +23 -17
- package/dist/.setup/{inference-context-fulhZuz8.mjs → inference-context-D96l9-ew.mjs} +1 -1
- package/dist/.setup/inference-proxy-b-aJMSxm.mjs +601 -0
- package/dist/.setup/{isolated-completion-B6srt48J.mjs → isolated-completion-BIZFhTNG.mjs} +17 -10
- package/dist/.setup/launch-args-DbFCehO7.mjs +196 -0
- package/dist/.setup/{managed-binary-DP6Rib3P.mjs → managed-binary-BnshlFag.mjs} +13 -2
- package/dist/.setup/{model-catalog-DkvUuBey.mjs → model-catalog-CfXJf9Ay.mjs} +9 -10
- package/dist/.setup/{models-BDFgm_G-.mjs → models-KnqBv0hE.mjs} +3 -3
- package/dist/.setup/{native-auth-BLZGqFjw.mjs → native-auth-rWbGbMn3.mjs} +4 -4
- package/dist/.setup/{native-subagent-history-YXaL6dMd.mjs → native-subagent-history-0nYYgo0k.mjs} +26 -13
- package/dist/.setup/{native-subagent-monitor-B1hxzIOy.mjs → native-subagent-monitor-D3filLY2.mjs} +145 -317
- package/dist/.setup/{native-subagent-task-ids-DsuOonKv.mjs → native-subagent-task-ids-wb8CKZGN.mjs} +69 -39
- package/dist/.setup/{node-cli-sessions-Cl8b2ZF3.mjs → node-cli-sessions-r3avj02l.mjs} +86 -68
- package/dist/.setup/node-exec-server.runtime-BDwWXVpK.mjs +247 -0
- package/dist/.setup/{plan-xD7WKYTM.mjs → plan-CN3VwfNU.mjs} +74 -76
- package/dist/.setup/{plugin-activation-r8nq5Jzp.mjs → plugin-activation-DT3MNtqj.mjs} +7 -16
- package/dist/.setup/{plugin-app-cache-key-BOxKP7db.mjs → plugin-app-cache-key-B2CsSdnV.mjs} +4 -20
- package/dist/.setup/{plugin-approval-roundtrip-CjfzafAZ.mjs → plugin-approval-roundtrip-C0MZzCuP.mjs} +1 -1
- package/dist/.setup/{plugin-inventory-DUle8DLz.mjs → plugin-inventory-BoRei8Z4.mjs} +16 -7
- package/dist/.setup/{plugin-marketplace-discovery-P-Vndfqq.mjs → plugin-marketplace-discovery-CDOi8IFs.mjs} +4 -1
- package/dist/.setup/{plugin-metadata-cache-DsS5buNa.mjs → plugin-metadata-cache-Ctmo83k_.mjs} +224 -154
- package/dist/.setup/protocol-CANUwXJ3.mjs +17 -0
- package/dist/.setup/{provider-fFh_-VR3.mjs → provider-BOsxQHOM.mjs} +9 -5
- package/dist/.setup/{provider-capabilities-B8J4Dy-O.mjs → provider-capabilities-BfE88FZ5.mjs} +31 -3
- package/dist/.setup/{rate-limits-DOEGYRNs.mjs → rate-limits-CMU3DUD0.mjs} +116 -137
- package/dist/.setup/{request-BioXJLYa.mjs → request-D2L0zMrq.mjs} +23 -15
- package/dist/.setup/{run-attempt-rlA07pUv.mjs → run-attempt-BHu11r7h.mjs} +1197 -617
- package/dist/.setup/{runtime-artifact-Dy38Z5iU.mjs → runtime-artifact-CLZ8udh-.mjs} +29 -45
- package/dist/.setup/{sandbox-guard-BBP-RbTf.mjs → sandbox-guard-C2sRMOEY.mjs} +1 -1
- package/dist/.setup/{session-binding-_0W_fHRr.mjs → session-binding-Cm0apEbd.mjs} +3 -32
- package/dist/.setup/{session-binding-record-TH3xA0zj.mjs → session-binding-record-BGoz8wOK.mjs} +22 -3
- package/dist/.setup/{session-binding-sidecars-CKYEcfNn.mjs → session-binding-sidecars-BlB5EvIS.mjs} +48 -45
- package/dist/.setup/{session-catalog-fUdWDx-U.mjs → session-catalog-Pno1xGcl.mjs} +482 -182
- package/dist/.setup/{session-catalog-adoption-CR_whkEW.mjs → session-catalog-adoption-BI6UTDZT.mjs} +57 -25
- package/dist/.setup/{session-catalog-archive-CwZaPacf.mjs → session-catalog-archive-lHBqzhaO.mjs} +6 -6
- package/dist/.setup/{session-catalog-events-jMcYfQyd.mjs → session-catalog-events-Bj6j94E_.mjs} +122 -25
- package/dist/.setup/{session-catalog-index-B141u15s.mjs → session-catalog-index-B9_VQIUz.mjs} +178 -78
- package/dist/.setup/{session-catalog-index-order-Cc5BzlQr.mjs → session-catalog-index-order-hcdz07yN.mjs} +2 -2
- package/dist/.setup/{session-catalog-index-state-BAuDztHN.mjs → session-catalog-index-state-Dgh8ORJm.mjs} +5 -2
- package/dist/.setup/{session-catalog-native-projection-ChV3cCtm.mjs → session-catalog-native-projection-DowriLid.mjs} +30 -13
- package/dist/.setup/{session-catalog-node-adoption-BVRsYOSh.mjs → session-catalog-node-adoption-ITddWx_X.mjs} +24 -12
- package/dist/.setup/{session-catalog-node-continue-Dowv8osw.mjs → session-catalog-node-continue-6g6qi4A9.mjs} +22 -13
- package/dist/.setup/{session-catalog-projection-C1Bj9Jl-.mjs → session-catalog-projection-zK_PUsiE.mjs} +13 -5
- package/dist/.setup/{session-cli-DIj-IE-E.mjs → session-cli-irrD-uo7.mjs} +4 -4
- package/dist/.setup/{session-history-C--SrLI8.mjs → session-history-BrqhSCf9.mjs} +17 -22
- package/dist/.setup/{session-history-import-JHXT5Xfi.mjs → session-history-import-D-3wAgOP.mjs} +4 -4
- package/dist/.setup/{session-history.worker-CpNj7H_P.mjs → session-history.worker-CaCh0xF_.mjs} +5 -18
- package/dist/.setup/{session-initialization-DH1z6fXn.mjs → session-initialization-rcgbZiid.mjs} +2 -2
- package/dist/.setup/{session-permission-policy-DhurXY0l.mjs → session-permission-policy-BI1QK_98.mjs} +2 -2
- package/dist/.setup/{session-retirement-CU87AOg9.mjs → session-retirement-BH-S6qkJ.mjs} +25 -6
- package/dist/.setup/{settled-turn-finalizer-CiY2bLFK.mjs → settled-turn-finalizer-DiAi6Kx6.mjs} +8 -8
- package/dist/.setup/{shared-client-BpTtuLQ5.mjs → shared-client-DA4VR4Eb.mjs} +59 -89
- package/dist/.setup/{side-question-DSCZyoBD.mjs → side-question-BJ1wSDcB.mjs} +147 -211
- package/dist/.setup/{source-Bjp4UQij.mjs → source-CUzJq5WN.mjs} +9 -9
- package/dist/.setup/spawn-error-CL3n6MAa.mjs +57 -0
- package/dist/.setup/{thread-archive-guard-jmecf6OJ.mjs → thread-archive-guard-C9frICzX.mjs} +10 -3
- package/dist/.setup/{thread-history-page-BTx-4xsg.mjs → thread-history-page-DoVpnHim.mjs} +1 -1
- package/dist/.setup/{thread-lifecycle-Cik28qWn.mjs → thread-lifecycle-B3mfz1TG.mjs} +172 -2271
- package/dist/.setup/{thread-ownership-skomxnIt.mjs → thread-ownership-DcTtAcXj.mjs} +4 -2
- package/dist/.setup/{thread-policy-Cjs4B8xf.mjs → thread-policy-DGuQsuFC.mjs} +19 -3
- package/dist/.setup/thread-requests-BLvGkP2R.mjs +2205 -0
- package/dist/.setup/{thread-resume-BkNpj9Pz.mjs → thread-resume-DIBXwOpE.mjs} +6 -6
- package/dist/.setup/{timeout-DZF05XrR.mjs → timeout-C910MdAB.mjs} +19 -2
- package/dist/.setup/{transcript-history-projection-DHNBDhCU.mjs → transcript-history-projection-ZZpkFkJ_.mjs} +94 -64
- package/dist/.setup/{transcript-mirror-D4qp_leP.mjs → transcript-mirror-BtHDBp1G.mjs} +218 -198
- package/dist/.setup/{transport-stdio-Cmx94Oiy.mjs → transport-stdio-h2VHOskC.mjs} +135 -55
- package/dist/.setup/{upstream-session-fork-D3UKxgVD.mjs → upstream-session-fork-BUr4OUbC.mjs} +44 -36
- package/dist/.setup/{usage-BOgBEKso.mjs → usage-BML0r-ua.mjs} +5 -4
- package/dist/.setup/{usage-limit-error-C0ow7DOc.mjs → usage-limit-error-DUMbefVY.mjs} +4 -4
- package/dist/.setup/{web-search-provider.runtime-CTGuJt6i.mjs → web-search-provider.runtime-CDKlN-Rv.mjs} +4 -3
- package/dist/api.js +23 -12
- package/dist/catalog-page-worker-entrypoint.js +12 -0
- package/dist/catalog-page.worker.js +9 -0
- package/dist/cli-metadata.js +1 -1
- package/dist/doctor-contract-api.js +2 -2
- package/dist/harness.js +1 -1
- package/dist/index.js +221 -170
- package/dist/media-understanding-provider.js +2 -2
- package/dist/migration-provider-api.js +1 -1
- package/dist/provider-discovery.js +1 -1
- package/dist/session-history-worker-runtime.js +15 -32
- package/dist/session-history.worker.js +1 -1
- package/package.json +9 -6
- package/dist/.setup/attempt-context-VXVwTCfS.mjs +0 -636
- package/dist/.setup/inference-proxy-CC15HuSi.mjs +0 -311
- package/dist/.setup/launch-args-DnMak49W.mjs +0 -111
- package/dist/.setup/node-exec-server.runtime-BaViBKNz.mjs +0 -226
- package/dist/.setup/version-CoqzXPgK.mjs +0 -12
- package/dist/.setup/{native-execution-policy-YBMHSzC4.mjs → native-execution-policy-umd0tgh4.mjs} +1 -1
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { m as sessionBindingIdentity, n as assertCodexBindingMayBeReplaced } from "./session-binding-record-BGoz8wOK.mjs";
|
|
2
|
+
import { y as readCodexRequirementsToml } from "./config-security-BEReZ6go.mjs";
|
|
3
3
|
import { d as readCodexPluginConfig } from "./config-parsing-CcB9iPoq.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { d as readCodexEffectiveConfig, n as codexSandboxPolicyForTurn } from "./config-options-
|
|
4
|
+
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
5
|
+
import { d as readCodexEffectiveConfig, n as codexSandboxPolicyForTurn } from "./config-options-BvaRs51b.mjs";
|
|
6
6
|
import { o as resolveCodexDefaultWorkspaceDir } from "./conversation-binding-data-CrcyZk6O.mjs";
|
|
7
|
-
import { n as projectBoundedCodexVisibleSessionHistory } from "./transcript-history-projection-
|
|
8
|
-
import { n as resolveOpenClawExecPolicyForCodexAppServer, t as canUseCodexModelBackedApprovalsReviewerForModel } from "./config-
|
|
9
|
-
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-
|
|
7
|
+
import { n as projectBoundedCodexVisibleSessionHistory } from "./transcript-history-projection-ZZpkFkJ_.mjs";
|
|
8
|
+
import { n as resolveOpenClawExecPolicyForCodexAppServer, t as canUseCodexModelBackedApprovalsReviewerForModel } from "./config-BoTP_mrL.mjs";
|
|
9
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-C8Rw1m1m.mjs";
|
|
10
10
|
import { n as normalizeCodexAppServerBindingModelProvider, t as isCodexAppServerNativeAuthProfile } from "./auth-profile-WqZtZfXN.mjs";
|
|
11
|
-
import { I as hasCodexAppServerLiveThread, N as consumeCodexAppServerLiveThread, R as isCodexAppServerClientRuntimeLive, U as releaseCodexAppServerLiveThread, _ as retainSharedCodexAppServerClientByInstanceId, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease, x as withLeasedCodexAppServerClientStartSelectionRetry, z as isCodexAppServerLiveThreadClaimed } from "./shared-client-
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import "./
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
11
|
+
import { I as hasCodexAppServerLiveThread, N as consumeCodexAppServerLiveThread, R as isCodexAppServerClientRuntimeLive, U as releaseCodexAppServerLiveThread, _ as retainSharedCodexAppServerClientByInstanceId, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease, x as withLeasedCodexAppServerClientStartSelectionRetry, z as isCodexAppServerLiveThreadClaimed } from "./shared-client-DA4VR4Eb.mjs";
|
|
12
|
+
import { h as CodexThreadDirectInputError, l as isCodexAppServerOverloadError, s as isCodexAppServerIndeterminateRequestCancellationError, v as assertCodexThreadAcceptsDirectInput, x as assertCodexThreadStartResponse } from "./client-Cs08OXVQ.mjs";
|
|
13
|
+
import { c as isCodexAppServerUnsafeSubscriptionError, h as getCodexAppServerTurnRouter, o as closeCodexStartupClientBestEffort, p as unsubscribeCodexThreadBestEffort, s as interruptCodexTurnAndWaitBestEffort, u as retireUnsafeCodexTurnClientBestEffort, v as isCodexNotificationForTurn } from "./attempt-client-cleanup-CEv1cKwF.mjs";
|
|
14
|
+
import { _ as resolveCodexAppServerRequestModelSelection, _t as buildDisabledAppsConfigPatch, b as buildCodexProjectDocThreadConfig, h as CODEX_NATIVE_PERSONALITY_NONE, xt as mergeCodexThreadConfigs } from "./thread-requests-BLvGkP2R.mjs";
|
|
15
|
+
import "./thread-lifecycle-B3mfz1TG.mjs";
|
|
16
|
+
import "./session-binding-Cm0apEbd.mjs";
|
|
17
|
+
import { t as resumeCodexAppServerThread } from "./thread-resume-DIBXwOpE.mjs";
|
|
18
|
+
import { a as rollbackCodexAppServerBindingSubscription, n as releaseCodexAppServerBindingSubscription, r as retainCodexAppServerBindingSubscription, s as withExclusiveCodexAppServerThread, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-DcTtAcXj.mjs";
|
|
19
|
+
import { a as resolveCodexAppServerForModelProvider, i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, t as CODEX_SESSION_PERMISSION_EXEC_MODES } from "./session-permission-policy-BI1QK_98.mjs";
|
|
20
|
+
import { u as trackCodexConversationActiveTurn } from "./conversation-control-uK9Jomlc.mjs";
|
|
21
|
+
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
20
22
|
import { resolveSessionAgentIdsStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
21
23
|
import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
22
24
|
import path from "node:path";
|
|
@@ -528,21 +530,7 @@ function buildCodexConversationTurnInput(params) {
|
|
|
528
530
|
type: "text",
|
|
529
531
|
text: params.prompt,
|
|
530
532
|
text_elements: []
|
|
531
|
-
}, ...
|
|
532
|
-
}
|
|
533
|
-
function extractInboundMedia(event) {
|
|
534
|
-
const metadata = event.metadata ?? {};
|
|
535
|
-
const paths = normalizeSingleOrTrimmedStringList(metadata.mediaPaths).concat(normalizeSingleOrTrimmedStringList(metadata.mediaPath));
|
|
536
|
-
const urls = normalizeSingleOrTrimmedStringList(metadata.mediaUrls).concat(normalizeSingleOrTrimmedStringList(metadata.mediaUrl));
|
|
537
|
-
const mimeTypes = normalizeSingleOrTrimmedStringList(metadata.mediaTypes).concat(normalizeSingleOrTrimmedStringList(metadata.mediaType));
|
|
538
|
-
const count = Math.max(paths.length, urls.length, mimeTypes.length);
|
|
539
|
-
const media = [];
|
|
540
|
-
for (let index = 0; index < count; index += 1) media.push({
|
|
541
|
-
path: paths[index],
|
|
542
|
-
url: urls[index],
|
|
543
|
-
mimeType: mimeTypes[index] ?? mimeTypes[0]
|
|
544
|
-
});
|
|
545
|
-
return media;
|
|
533
|
+
}, ...(params.event.media ?? []).map(toCodexImageInput).filter((item) => item !== void 0)];
|
|
546
534
|
}
|
|
547
535
|
function toCodexImageInput(media) {
|
|
548
536
|
if (!isImageMedia(media)) return;
|
|
@@ -560,7 +548,7 @@ function toCodexImageInput(media) {
|
|
|
560
548
|
} : void 0;
|
|
561
549
|
}
|
|
562
550
|
function isImageMedia(media) {
|
|
563
|
-
if (media.
|
|
551
|
+
if (media.kind === "image" || media.contentType?.toLowerCase().startsWith("image/")) return true;
|
|
564
552
|
const candidate = media.path ?? media.url;
|
|
565
553
|
if (!candidate) return false;
|
|
566
554
|
return IMAGE_EXTENSIONS.has(path.extname(candidate.split(/[?#]/, 1)[0] ?? "").toLowerCase());
|
|
@@ -811,6 +799,7 @@ async function runBoundTurn(params) {
|
|
|
811
799
|
activeTurnCleanup = trackCodexConversationActiveTurn({
|
|
812
800
|
identity,
|
|
813
801
|
client,
|
|
802
|
+
requestTimeoutMs: runtime.requestTimeoutMs,
|
|
814
803
|
threadId,
|
|
815
804
|
turnId: activeTurnId
|
|
816
805
|
});
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { n as isCodexFastServiceTier } from "./config-utils-DujwEnhg.mjs";
|
|
2
|
-
import { r as bindingStoreKey } from "./session-binding-record-
|
|
3
|
-
import { o as formatCodexDisplayText } from "./command-formatters-
|
|
4
|
-
import
|
|
5
|
-
import "./config-CedDWjM-.mjs";
|
|
2
|
+
import { r as bindingStoreKey } from "./session-binding-record-BGoz8wOK.mjs";
|
|
3
|
+
import { o as formatCodexDisplayText } from "./command-formatters-Bmqvr9tO.mjs";
|
|
4
|
+
import "./config-BoTP_mrL.mjs";
|
|
6
5
|
import { n as normalizeCodexAppServerBindingModelProvider, t as isCodexAppServerNativeAuthProfile } from "./auth-profile-WqZtZfXN.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import "./session-binding-
|
|
6
|
+
import { _ as resolveCodexAppServerRequestModelSelection, y as resolveCodexBindingModelProviderFallback } from "./thread-requests-BLvGkP2R.mjs";
|
|
7
|
+
import "./thread-lifecycle-B3mfz1TG.mjs";
|
|
8
|
+
import "./session-binding-Cm0apEbd.mjs";
|
|
10
9
|
import { resolveAgentDir } from "openclaw/plugin-sdk/agent-runtime";
|
|
11
10
|
import { getSessionEntry, patchSessionEntry, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime";
|
|
12
11
|
import { ModelSelectionLockedError, applyModelOverrideWithAuthProfileCompatibility } from "openclaw/plugin-sdk/model-session-runtime";
|
|
@@ -34,37 +33,17 @@ async function stopCodexConversationTurn(params) {
|
|
|
34
33
|
stopped: false,
|
|
35
34
|
message: "No active Codex run to stop."
|
|
36
35
|
};
|
|
37
|
-
|
|
38
|
-
const binding = params.binding;
|
|
39
|
-
if (binding?.threadId !== active.threadId) return {
|
|
36
|
+
if (params.binding?.threadId !== active.threadId) return {
|
|
40
37
|
stopped: false,
|
|
41
38
|
message: "The active Codex run no longer matches this session binding."
|
|
42
39
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
await active.client.request("turn/interrupt", {
|
|
41
|
+
threadId: active.threadId,
|
|
42
|
+
turnId: active.turnId
|
|
43
|
+
}, {
|
|
44
|
+
timeoutMs: active.requestTimeoutMs,
|
|
48
45
|
assertCurrent: params.assertCurrent
|
|
49
46
|
});
|
|
50
|
-
const runtime = connection.appServer;
|
|
51
|
-
const client = active.client ?? await getLeasedSharedCodexAppServerClient({
|
|
52
|
-
startOptions: runtime.start,
|
|
53
|
-
timeoutMs: runtime.requestTimeoutMs,
|
|
54
|
-
authProfileId: connection.clientAuthProfileId,
|
|
55
|
-
...lookup
|
|
56
|
-
});
|
|
57
|
-
try {
|
|
58
|
-
await client.request("turn/interrupt", {
|
|
59
|
-
threadId: active.threadId,
|
|
60
|
-
turnId: active.turnId
|
|
61
|
-
}, {
|
|
62
|
-
timeoutMs: runtime.requestTimeoutMs,
|
|
63
|
-
assertCurrent: params.assertCurrent
|
|
64
|
-
});
|
|
65
|
-
} finally {
|
|
66
|
-
if (!active.client) releaseLeasedSharedCodexAppServerClient(client);
|
|
67
|
-
}
|
|
68
47
|
return {
|
|
69
48
|
stopped: true,
|
|
70
49
|
message: "Codex stop requested."
|
|
@@ -81,52 +60,34 @@ async function steerCodexConversationTurn(params) {
|
|
|
81
60
|
steered: false,
|
|
82
61
|
message: "No active Codex run to steer."
|
|
83
62
|
};
|
|
84
|
-
|
|
85
|
-
const binding = params.binding;
|
|
86
|
-
if (binding?.threadId !== active.threadId) return {
|
|
63
|
+
if (params.binding?.threadId !== active.threadId) return {
|
|
87
64
|
steered: false,
|
|
88
65
|
message: "The active Codex run no longer matches this session binding."
|
|
89
66
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
67
|
+
await active.client.request("turn/steer", {
|
|
68
|
+
threadId: active.threadId,
|
|
69
|
+
expectedTurnId: active.turnId,
|
|
70
|
+
input: [{
|
|
71
|
+
type: "text",
|
|
72
|
+
text,
|
|
73
|
+
text_elements: []
|
|
74
|
+
}]
|
|
75
|
+
}, {
|
|
76
|
+
timeoutMs: active.requestTimeoutMs,
|
|
95
77
|
assertCurrent: params.assertCurrent
|
|
96
78
|
});
|
|
97
|
-
const runtime = connection.appServer;
|
|
98
|
-
const client = active.client ?? await getLeasedSharedCodexAppServerClient({
|
|
99
|
-
startOptions: runtime.start,
|
|
100
|
-
timeoutMs: runtime.requestTimeoutMs,
|
|
101
|
-
authProfileId: connection.clientAuthProfileId,
|
|
102
|
-
...lookup
|
|
103
|
-
});
|
|
104
|
-
try {
|
|
105
|
-
await client.request("turn/steer", {
|
|
106
|
-
threadId: active.threadId,
|
|
107
|
-
expectedTurnId: active.turnId,
|
|
108
|
-
input: [{
|
|
109
|
-
type: "text",
|
|
110
|
-
text,
|
|
111
|
-
text_elements: []
|
|
112
|
-
}]
|
|
113
|
-
}, {
|
|
114
|
-
timeoutMs: runtime.requestTimeoutMs,
|
|
115
|
-
assertCurrent: params.assertCurrent
|
|
116
|
-
});
|
|
117
|
-
} finally {
|
|
118
|
-
if (!active.client) releaseLeasedSharedCodexAppServerClient(client);
|
|
119
|
-
}
|
|
120
79
|
return {
|
|
121
80
|
steered: true,
|
|
122
81
|
message: "Sent steer message to Codex."
|
|
123
82
|
};
|
|
124
83
|
}
|
|
125
|
-
async function setCodexConversationModel(
|
|
84
|
+
async function setCodexConversationModel(input) {
|
|
85
|
+
const params = { ...input };
|
|
126
86
|
const model = params.model.trim();
|
|
127
87
|
if (!model) return "Usage: /codex model <model>";
|
|
128
88
|
const lookup = buildBindingLookup(params);
|
|
129
89
|
params.assertCurrent();
|
|
90
|
+
const assertCommitAllowed = params.assertCommitAllowed ?? params.assertCurrent;
|
|
130
91
|
const binding = requirePreparedThreadBinding(params.binding);
|
|
131
92
|
if (binding.connectionScope === "supervision") throw new ModelSelectionLockedError();
|
|
132
93
|
const modelProvider = resolveConversationControlModelProvider({
|
|
@@ -161,7 +122,7 @@ async function setCodexConversationModel(params) {
|
|
|
161
122
|
sessionKey: identity.sessionKey,
|
|
162
123
|
requireWriteSuccess: true,
|
|
163
124
|
replaceEntry: true,
|
|
164
|
-
assertCommitAllowed
|
|
125
|
+
assertCommitAllowed,
|
|
165
126
|
update: (entry) => {
|
|
166
127
|
if (entry.sessionId !== identity.sessionId) throw new Error("Codex session changed while applying the model selection.");
|
|
167
128
|
applyModelOverrideWithAuthProfileCompatibility({
|
|
@@ -183,7 +144,7 @@ async function setCodexConversationModel(params) {
|
|
|
183
144
|
model: nextModel,
|
|
184
145
|
modelProvider: nextModelProvider,
|
|
185
146
|
...projectionPatch
|
|
186
|
-
},
|
|
147
|
+
}, assertCommitAllowed);
|
|
187
148
|
return `Codex model set to ${formatCodexDisplayText(nextModel)}.`;
|
|
188
149
|
}
|
|
189
150
|
async function setCodexConversationFastMode(params) {
|