@openclaw/codex 2026.9.5 → 2026.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/assets/icon.png +0 -0
- package/dist/.setup/{account-usage-runtime-C2MOIvfq.mjs → account-usage-runtime-DFhbh1zz.mjs} +6 -6
- package/dist/.setup/{apply-CJ0ZfmBG.mjs → apply-D3GcSoSa.mjs} +35 -55
- package/dist/.setup/{attempt-client-cleanup-BpYKdTA0.mjs → attempt-client-cleanup-DOP-cW5j.mjs} +179 -73
- package/dist/.setup/attempt-workspace-context-C5HigshI.mjs +164 -0
- package/dist/.setup/{auth-binding-DhLWa_7K.mjs → auth-binding-BLWz7stm.mjs} +14 -1
- package/dist/.setup/{auth-cache-key-QirmgiCo.mjs → auth-cache-key-Dbvq-QgB.mjs} +41 -111
- package/dist/.setup/{auth-profile-WqZtZfXN.mjs → auth-profile-B0okYl2D.mjs} +1 -2
- package/dist/.setup/auth-profile-health-oHizqgye.mjs +53 -0
- package/dist/.setup/auth-profile-recovery-BREezV0L.mjs +14 -0
- package/dist/.setup/auth-start-options-BPIPeEX8.mjs +44 -0
- package/dist/.setup/{binding-connection-Bm38niE8.mjs → binding-connection-DTtN1KrX.mjs} +2 -2
- package/dist/.setup/{binding-connection.runtime-CnRMC0ta.mjs → binding-connection.runtime-6TpgD1M6.mjs} +5 -5
- package/dist/.setup/{bounded-turn-BtlZcivC.mjs → bounded-turn-CbjoN2OW.mjs} +140 -37
- package/dist/.setup/bounded-turn-isolation-B8K_ylqk.mjs +14 -0
- package/dist/.setup/{build-state-Xx9ybZqa.mjs → build-state-Da1_z0kd.mjs} +1 -1
- package/dist/.setup/{capabilities-_vXcZGSx.mjs → capabilities-B3WEZl4e.mjs} +2 -10
- package/dist/.setup/{client-vXs2929Q.mjs → client-N0JpgSzF.mjs} +635 -872
- package/dist/.setup/client-catalog-response-5HHLdcde.mjs +285 -0
- package/dist/.setup/{command-dispatch-naHIZwwF.mjs → command-dispatch-BeAoaovI.mjs} +9 -8
- package/dist/.setup/{command-formatters-CGEkdawF.mjs → command-formatters-R3ckE3Co.mjs} +36 -64
- package/dist/.setup/{command-handlers-BtAJEW1X.mjs → command-handlers-ylTMS00z.mjs} +301 -488
- package/dist/.setup/{command-rpc-DHFpn4le.mjs → command-rpc-CGJGUQ6Y.mjs} +40 -28
- package/dist/.setup/compact-C2WamavS.mjs +776 -0
- package/dist/.setup/{config-CedDWjM-.mjs → config-DKhXquav.mjs} +26 -28
- package/dist/.setup/{config-options-BsanJ8QG.mjs → config-options-CzyWLTJt.mjs} +68 -65
- package/dist/.setup/{config-parsing-CcB9iPoq.mjs → config-parsing-b088LyhT.mjs} +57 -60
- package/dist/.setup/{config-runtime-CeAhl_h4.mjs → config-runtime-C0NbLms1.mjs} +2 -2
- package/dist/.setup/{config-security-BRQ2mgW9.mjs → config-security-CE-FcGw9.mjs} +51 -215
- package/dist/.setup/{config-utils-DujwEnhg.mjs → config-utils-D0CXecki.mjs} +3 -13
- package/dist/.setup/context-engine-projection-PezSESth.mjs +387 -0
- package/dist/.setup/{conversation-binding-DhzrpTM6.mjs → conversation-binding-3Min8qvP.mjs} +71 -105
- package/dist/.setup/{conversation-binding-data-CrcyZk6O.mjs → conversation-binding-data-C746z5Pn.mjs} +8 -12
- package/dist/.setup/{conversation-control-DN53ns41.mjs → conversation-control-CEP8X5JC.mjs} +30 -69
- package/dist/.setup/{cyber-failover-DYwbmf1o.mjs → cyber-failover-XV0nNRZu.mjs} +1 -1
- package/dist/.setup/{cyber-failover-notice-e9G3J9-e.mjs → cyber-failover-notice-RNpGpTyP.mjs} +1 -1
- package/dist/.setup/{dynamic-tools-D16lOp67.mjs → dynamic-tools-DzlsLUuS.mjs} +3136 -3167
- package/dist/.setup/{effective-mcp-catalog-K6kLCN8X.mjs → effective-mcp-catalog-CxUtC-xG.mjs} +8 -17
- package/dist/.setup/{ephemeral-turn-R1gA8Sn6.mjs → ephemeral-turn-CDsPJOa2.mjs} +9 -6
- package/dist/.setup/event-projector-assistant-message-CigreO4K.mjs +69 -0
- package/dist/.setup/{event-projector-usage-C7Ntzs-f.mjs → event-projector-usage-03R0I2dM.mjs} +4 -26
- package/dist/.setup/event-projector-values-DJSz8BTk.mjs +106 -0
- package/dist/.setup/incognito-session-DWYapfwf.mjs +2 -0
- package/dist/.setup/{inference-context-fulhZuz8.mjs → inference-context-D-9gWlTR.mjs} +16 -18
- package/dist/.setup/inference-dispatch-CMZtjQyz.mjs +359 -0
- package/dist/.setup/inference-metadata-CgIf7sOx.mjs +81 -0
- package/dist/.setup/inference-proxy-DhcXOgUE.mjs +561 -0
- package/dist/.setup/{isolated-completion-B6srt48J.mjs → isolated-completion-Dm3PzxJk.mjs} +15 -11
- package/dist/.setup/launch-args-DbFCehO7.mjs +196 -0
- package/dist/.setup/{managed-binary-DP6Rib3P.mjs → managed-binary-kiWRhNRE.mjs} +16 -9
- package/dist/.setup/{model-catalog-DkvUuBey.mjs → model-catalog-PAuZgJC6.mjs} +14 -14
- package/dist/.setup/model-runtime-BdqzOMkU.mjs +11 -0
- package/dist/.setup/{models-BDFgm_G-.mjs → models-DHXZtVVk.mjs} +9 -18
- package/dist/.setup/{native-auth-BLZGqFjw.mjs → native-auth-CuG53tu4.mjs} +5 -5
- package/dist/.setup/{native-execution-policy-YBMHSzC4.mjs → native-execution-policy-BxZJy5mP.mjs} +6 -31
- package/dist/.setup/{native-subagent-monitor-B1hxzIOy.mjs → native-subagent-monitor-Dpsmf2wz.mjs} +4422 -3808
- package/dist/.setup/native-subagent-pending-assignments-DwkCzLvD.mjs +203 -0
- package/dist/.setup/native-task-assignments-DMQ0g3hu.mjs +194 -0
- package/dist/.setup/{node-cli-sessions-Cl8b2ZF3.mjs → node-cli-sessions-HC4W6FLI.mjs} +99 -111
- package/dist/.setup/node-exec-server.runtime-BgBfWQqo.mjs +244 -0
- package/dist/.setup/{plan-xD7WKYTM.mjs → plan-Y-QIvrKB.mjs} +118 -163
- package/dist/.setup/{plugin-activation-r8nq5Jzp.mjs → plugin-activation-cNHRfaxU.mjs} +10 -47
- package/dist/.setup/{plugin-app-cache-key-BOxKP7db.mjs → plugin-app-cache-key-BL9B5H0L.mjs} +9 -42
- package/dist/.setup/{plugin-inventory-DUle8DLz.mjs → plugin-inventory-Cky2XJUw.mjs} +32 -23
- package/dist/.setup/{plugin-marketplace-discovery-P-Vndfqq.mjs → plugin-marketplace-discovery-D_dV9FXa.mjs} +22 -25
- package/dist/.setup/{plugin-metadata-cache-DsS5buNa.mjs → plugin-metadata-cache-DsjsL1dr.mjs} +328 -318
- package/dist/.setup/protocol-CANUwXJ3.mjs +17 -0
- package/dist/.setup/provider-DH8NSzGt.mjs +51 -0
- package/dist/.setup/{provider-capabilities-B8J4Dy-O.mjs → provider-capabilities-CAxoF-X1.mjs} +35 -12
- package/dist/.setup/{rate-limits-DOEGYRNs.mjs → rate-limits-B7-X2TgG.mjs} +123 -166
- package/dist/.setup/{request-BioXJLYa.mjs → request-BHZ1nz8d.mjs} +25 -16
- package/dist/.setup/responses-oauth-twnuTaAa.mjs +93 -0
- package/dist/.setup/rpc-error-BlD2vuzn.mjs +31 -0
- package/dist/.setup/{run-attempt-rlA07pUv.mjs → run-attempt-D8RZUOzY.mjs} +2046 -1454
- package/dist/.setup/{run-attempt-lifecycle-B7JbY4-F.mjs → run-attempt-lifecycle-C-6O3Exn.mjs} +10 -24
- package/dist/.setup/{runtime-artifact-Dy38Z5iU.mjs → runtime-artifact-DDQ-HGXf.mjs} +43 -47
- package/dist/.setup/runtime-artifact-connection-D68qQn1m.mjs +78 -0
- package/dist/.setup/sandbox-guard-DjCz2eOw.mjs +126 -0
- package/dist/.setup/scope-DOC1Xjc8.mjs +6 -0
- package/dist/.setup/session-binding-DGCYAfvD.mjs +443 -0
- package/dist/.setup/{session-binding-record-TH3xA0zj.mjs → session-binding-record-Oe9L-CNY.mjs} +73 -132
- package/dist/.setup/{session-binding-sidecars-CKYEcfNn.mjs → session-binding-sidecars-jo6H8dFr.mjs} +242 -60
- package/dist/.setup/{session-catalog-fUdWDx-U.mjs → session-catalog-4sCdv5qx.mjs} +598 -452
- package/dist/.setup/{session-catalog-adoption-CR_whkEW.mjs → session-catalog-adoption-BU_pHWG7.mjs} +59 -26
- package/dist/.setup/{session-catalog-archive-CwZaPacf.mjs → session-catalog-archive-spHfihri.mjs} +7 -7
- package/dist/.setup/session-catalog-events-DePDzzjc.mjs +139 -0
- package/dist/.setup/session-catalog-home-id-vlih0B_g.mjs +22 -0
- package/dist/.setup/{session-catalog-index-B141u15s.mjs → session-catalog-index-CZvDzC6z.mjs} +286 -182
- package/dist/.setup/{session-catalog-index-order-Cc5BzlQr.mjs → session-catalog-index-order-BcQpHks3.mjs} +2 -2
- package/dist/.setup/{session-catalog-index-state-BAuDztHN.mjs → session-catalog-index-state-TeO7EyO-.mjs} +6 -2
- package/dist/.setup/session-catalog-limits-DDxOsQeC.mjs +14 -0
- package/dist/.setup/session-catalog-list-request-CvtxrYSe.mjs +170 -0
- package/dist/.setup/session-catalog-native-projection-DjhwGL6x.mjs +178 -0
- package/dist/.setup/{session-catalog-node-adoption-BVRsYOSh.mjs → session-catalog-node-adoption-DgXvSGu0.mjs} +30 -35
- package/dist/.setup/{session-catalog-node-continue-Dowv8osw.mjs → session-catalog-node-continue-DjKXHBbi.mjs} +25 -18
- package/dist/.setup/session-catalog-node-lookup-CtAXI5W5.mjs +56 -0
- package/dist/.setup/{session-catalog-native-projection-ChV3cCtm.mjs → session-catalog-parsing-CPGaPYr-.mjs} +14 -180
- package/dist/.setup/{session-catalog-projection-C1Bj9Jl-.mjs → session-catalog-projection-Cr5qP5Dj.mjs} +15 -5
- package/dist/.setup/session-catalog-provenance-DoAvktcj.mjs +95 -0
- package/dist/.setup/{session-cli-DIj-IE-E.mjs → session-cli-Cn_nCqfq.mjs} +11 -24
- package/dist/.setup/{session-history-C--SrLI8.mjs → session-history-D83lJWHG.mjs} +16 -23
- package/dist/.setup/{session-history-import-JHXT5Xfi.mjs → session-history-import-WhX-X33a.mjs} +7 -10
- package/dist/.setup/session-history-read-Ov3StuL4.mjs +133 -0
- package/dist/.setup/{session-history.worker-CpNj7H_P.mjs → session-history.worker-MnPKncqP.mjs} +14 -23
- package/dist/.setup/session-initialization-6aveB9qb.mjs +22 -0
- package/dist/.setup/{session-permission-policy-DhurXY0l.mjs → session-permission-policy-Ci_fVX6y.mjs} +4 -8
- package/dist/.setup/{session-retirement-CU87AOg9.mjs → session-retirement-qMTxkNx2.mjs} +31 -12
- package/dist/.setup/{settled-turn-context-fmwouT5I.mjs → settled-turn-context-D4yj4rxf.mjs} +1 -1
- package/dist/.setup/{settled-turn-finalizer-CiY2bLFK.mjs → settled-turn-finalizer-BsvEabkw.mjs} +17 -13
- package/dist/.setup/{shared-client-BpTtuLQ5.mjs → shared-client-DqyTMYug.mjs} +826 -485
- package/dist/.setup/shared-client-lifecycle-DJIgqgMw.mjs +153 -0
- package/dist/.setup/{side-question-DSCZyoBD.mjs → side-question-C4kCmQy1.mjs} +206 -334
- package/dist/.setup/{source-Bjp4UQij.mjs → source-CS_7GFJZ.mjs} +82 -139
- 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-lifecycle-DPflntEJ.mjs +2362 -0
- package/dist/.setup/{incognito-session-uhrBF6wJ.mjs → thread-ownership-queue-Dp24d7-F.mjs} +1 -2
- package/dist/.setup/{thread-ownership-skomxnIt.mjs → thread-ownership-roNP0l1c.mjs} +47 -10
- package/dist/.setup/thread-policy-DTd-DtkX.mjs +109 -0
- package/dist/.setup/thread-requests-B_bRnMGN.mjs +2102 -0
- package/dist/.setup/{thread-resume-BkNpj9Pz.mjs → thread-resume-CdDaoc7T.mjs} +6 -6
- package/dist/.setup/timeout-CXOfNoaX.mjs +46 -0
- package/dist/.setup/transcript-history-projection-DRSifI-1.mjs +201 -0
- package/dist/.setup/{transcript-mirror-attestation-CzM-94NC.mjs → transcript-mirror-attestation-YSegaktH.mjs} +3 -4
- package/dist/.setup/{transcript-mirror-D4qp_leP.mjs → transcript-mirror-kxmCYsuF.mjs} +224 -206
- package/dist/.setup/{transport-stdio-Cmx94Oiy.mjs → transport-stdio-Bdegpn2V.mjs} +138 -75
- package/dist/.setup/transport-websocket-BTBE-LD9.mjs +211 -0
- package/dist/.setup/{upstream-prompt-provenance-LphB8slG.mjs → upstream-prompt-provenance-fXkKbPVC.mjs} +3 -9
- package/dist/.setup/{upstream-session-fork-D3UKxgVD.mjs → upstream-session-fork-CBeVjBpT.mjs} +48 -40
- package/dist/.setup/{usage-BOgBEKso.mjs → usage-BMzNxeR_.mjs} +5 -4
- package/dist/.setup/{usage-limit-error-C0ow7DOc.mjs → usage-limit-error-QXerDo3i.mjs} +5 -20
- package/dist/.setup/{web-search-provider.runtime-CTGuJt6i.mjs → web-search-provider.runtime-P77OUeoo.mjs} +10 -20
- package/dist/api.js +25 -16
- 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 +50 -8
- package/dist/harness.js +344 -1
- package/dist/index.js +345 -346
- package/dist/media-understanding-provider.js +9 -22
- package/dist/migration-provider-api.js +1 -1
- package/dist/provider-discovery.js +1 -1
- package/dist/session-history-worker-runtime.js +16 -33
- package/dist/session-history.worker.js +1 -1
- package/openclaw.plugin.json +14 -2
- package/package.json +11 -7
- package/dist/.setup/attempt-context-VXVwTCfS.mjs +0 -636
- package/dist/.setup/compact-C3i3qlzj.mjs +0 -687
- package/dist/.setup/event-projector-assistant-message-DNUR1s0A.mjs +0 -105
- package/dist/.setup/event-projector-items-DyTQ_XqL.mjs +0 -200
- package/dist/.setup/harness-rxaaoN-o.mjs +0 -349
- package/dist/.setup/history-rejection-B4nOXNXF.mjs +0 -13
- package/dist/.setup/image-payload-sanitizer-tupAr-2o.mjs +0 -79
- package/dist/.setup/inference-proxy-CC15HuSi.mjs +0 -311
- package/dist/.setup/launch-args-DnMak49W.mjs +0 -111
- package/dist/.setup/local-runtime-attribution-B_2mnqhb.mjs +0 -19
- package/dist/.setup/native-subagent-history-YXaL6dMd.mjs +0 -135
- package/dist/.setup/native-subagent-task-ids-DsuOonKv.mjs +0 -411
- package/dist/.setup/node-exec-server.runtime-BaViBKNz.mjs +0 -226
- package/dist/.setup/plugin-approval-roundtrip-CjfzafAZ.mjs +0 -122
- package/dist/.setup/provider-fFh_-VR3.mjs +0 -50
- package/dist/.setup/rolldown-runtime-8H4AJuhK.mjs +0 -14
- package/dist/.setup/sandbox-guard-BBP-RbTf.mjs +0 -166
- package/dist/.setup/session-binding-_0W_fHRr.mjs +0 -721
- package/dist/.setup/session-catalog-events-jMcYfQyd.mjs +0 -250
- package/dist/.setup/session-history-read-B3ZfSUbF.mjs +0 -50
- package/dist/.setup/session-initialization-DH1z6fXn.mjs +0 -75
- package/dist/.setup/thread-history-page-BTx-4xsg.mjs +0 -83
- package/dist/.setup/thread-lifecycle-Cik28qWn.mjs +0 -4904
- package/dist/.setup/thread-policy-Cjs4B8xf.mjs +0 -54
- package/dist/.setup/timeout-DZF05XrR.mjs +0 -63
- package/dist/.setup/transcript-history-projection-DHNBDhCU.mjs +0 -243
- package/dist/.setup/version-CoqzXPgK.mjs +0 -12
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { d as readCodexEffectiveConfig, n as codexSandboxPolicyForTurn } from "./config-options-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { n as
|
|
9
|
-
import { n as
|
|
10
|
-
import { n as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import "./
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
1
|
+
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
|
+
import { n as assertCodexBindingMayBeReplaced, v as sessionBindingIdentity } from "./session-binding-record-Oe9L-CNY.mjs";
|
|
3
|
+
import { m as readCodexRequirementsToml } from "./config-security-CE-FcGw9.mjs";
|
|
4
|
+
import { d as readCodexPluginConfig } from "./config-parsing-b088LyhT.mjs";
|
|
5
|
+
import { d as readCodexEffectiveConfig, n as codexSandboxPolicyForTurn } from "./config-options-CzyWLTJt.mjs";
|
|
6
|
+
import { l as retainSharedCodexAppServerClientByInstanceId } from "./shared-client-lifecycle-DJIgqgMw.mjs";
|
|
7
|
+
import { o as resolveCodexDefaultWorkspaceDir } from "./conversation-binding-data-C746z5Pn.mjs";
|
|
8
|
+
import { n as projectBoundedCodexVisibleSessionHistory } from "./transcript-history-projection-DRSifI-1.mjs";
|
|
9
|
+
import { n as canUseCodexModelBackedApprovalsReviewerForModel, r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-DKhXquav.mjs";
|
|
10
|
+
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-C0NbLms1.mjs";
|
|
11
|
+
import { n as normalizeCodexAppServerBindingModelProvider, t as isCodexAppServerNativeAuthProfile } from "./auth-profile-B0okYl2D.mjs";
|
|
12
|
+
import { B as isCodexAppServerClientRuntimeLive, F as consumeCodexAppServerLiveThread, G as releaseCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed, b as withLeasedCodexAppServerClientStartSelectionRetry, c as getLeasedSharedCodexAppServerClient, m as releaseCodexAppServerClientLease } from "./shared-client-DqyTMYug.mjs";
|
|
13
|
+
import { h as CodexThreadDirectInputError, l as isCodexAppServerOverloadError, s as isCodexAppServerIndeterminateRequestCancellationError, v as assertCodexThreadAcceptsDirectInput, x as assertCodexThreadStartResponse } from "./client-N0JpgSzF.mjs";
|
|
14
|
+
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-DOP-cW5j.mjs";
|
|
15
|
+
import { S as buildCodexProjectDocThreadConfig, St as mergeCodexThreadConfigs, g as CODEX_NATIVE_PERSONALITY_NONE, v as resolveCodexAppServerRequestModelSelection, vt as buildDisabledAppsConfigPatch } from "./thread-requests-B_bRnMGN.mjs";
|
|
16
|
+
import "./thread-lifecycle-DPflntEJ.mjs";
|
|
17
|
+
import "./session-binding-DGCYAfvD.mjs";
|
|
18
|
+
import { t as resumeCodexAppServerThread } from "./thread-resume-CdDaoc7T.mjs";
|
|
19
|
+
import { a as rollbackCodexAppServerBindingSubscription, c as withExclusiveCodexAppServerThread, n as releaseCodexAppServerBindingSubscription, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-roNP0l1c.mjs";
|
|
20
|
+
import { a as resolveCodexAppServerForModelProvider, i as resolveCodexSessionPermissionCwd, n as applyCodexSessionPermissionPolicy, t as CODEX_SESSION_PERMISSION_EXEC_MODES } from "./session-permission-policy-Ci_fVX6y.mjs";
|
|
21
|
+
import { u as trackCodexConversationActiveTurn } from "./conversation-control-CEP8X5JC.mjs";
|
|
22
|
+
import { asOptionalRecord, normalizeOptionalString, readNonEmptyStringPreservingWhitespace } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
20
23
|
import { resolveSessionAgentIdsStrict } from "openclaw/plugin-sdk/agent-scope-runtime";
|
|
21
24
|
import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
22
25
|
import path from "node:path";
|
|
@@ -80,16 +83,24 @@ async function resolveConversationAppServerRuntime(params) {
|
|
|
80
83
|
env: process.env,
|
|
81
84
|
agentDir: params.agentDir
|
|
82
85
|
});
|
|
86
|
+
const runtime = applyCodexSessionPermissionPolicy({
|
|
87
|
+
appServer: configuredRuntime,
|
|
88
|
+
permissionMode,
|
|
89
|
+
sessionRoot,
|
|
90
|
+
defaultRoot: agentWorkspaceDir,
|
|
91
|
+
pluginConfig: readCodexPluginConfig(params.pluginConfig),
|
|
92
|
+
canUseAutoReview,
|
|
93
|
+
requirementsToml: readCodexRequirementsToml({}),
|
|
94
|
+
execMode: execPolicy.mode
|
|
95
|
+
});
|
|
83
96
|
return {
|
|
84
|
-
runtime:
|
|
85
|
-
appServer:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
requirementsToml: readCodexRequirementsToml({}),
|
|
92
|
-
execMode: execPolicy.mode
|
|
97
|
+
runtime: resolveCodexAppServerForModelProvider({
|
|
98
|
+
appServer: runtime,
|
|
99
|
+
provider: params.modelProvider,
|
|
100
|
+
model: params.model,
|
|
101
|
+
config: params.config,
|
|
102
|
+
env: process.env,
|
|
103
|
+
agentDir: params.agentDir
|
|
93
104
|
}),
|
|
94
105
|
workspaceDir: resolveCodexSessionPermissionCwd({
|
|
95
106
|
permissionMode,
|
|
@@ -111,12 +122,12 @@ async function resolveThreadBindingRuntime(params) {
|
|
|
111
122
|
modelProvider: params.modelProvider,
|
|
112
123
|
...agentLookup
|
|
113
124
|
});
|
|
114
|
-
const modelSelection =
|
|
125
|
+
const modelSelection = params.model?.trim() ? resolveCodexAppServerRequestModelSelection({
|
|
115
126
|
model: params.model,
|
|
116
127
|
modelProvider,
|
|
117
128
|
authProfileId: params.authProfileId,
|
|
118
129
|
...agentLookup
|
|
119
|
-
});
|
|
130
|
+
}) : void 0;
|
|
120
131
|
const reviewerModelProvider = resolveModelBackedReviewerPolicyProvider({
|
|
121
132
|
authProfileId: params.authProfileId,
|
|
122
133
|
modelProvider: params.modelProvider,
|
|
@@ -133,15 +144,7 @@ async function resolveThreadBindingRuntime(params) {
|
|
|
133
144
|
model: params.model,
|
|
134
145
|
agentDir: params.agentDir
|
|
135
146
|
});
|
|
136
|
-
|
|
137
|
-
appServer: runtime,
|
|
138
|
-
provider: reviewerModelProvider,
|
|
139
|
-
model: params.model,
|
|
140
|
-
config: params.config,
|
|
141
|
-
env: process.env,
|
|
142
|
-
agentDir: params.agentDir
|
|
143
|
-
});
|
|
144
|
-
assertNativeConversationApprovalPolicySupported(modelScopedRuntime);
|
|
147
|
+
assertNativeConversationApprovalPolicySupported(runtime);
|
|
145
148
|
const clientOptions = {
|
|
146
149
|
startOptions: runtime.start,
|
|
147
150
|
timeoutMs: runtime.requestTimeoutMs,
|
|
@@ -149,7 +152,7 @@ async function resolveThreadBindingRuntime(params) {
|
|
|
149
152
|
...agentLookup
|
|
150
153
|
};
|
|
151
154
|
return {
|
|
152
|
-
runtime
|
|
155
|
+
runtime,
|
|
153
156
|
workspaceDir,
|
|
154
157
|
agentLookup,
|
|
155
158
|
model: modelSelection?.model,
|
|
@@ -158,6 +161,8 @@ async function resolveThreadBindingRuntime(params) {
|
|
|
158
161
|
};
|
|
159
162
|
}
|
|
160
163
|
function buildConversationThreadRequest(resolved, serviceTier, effectiveNativeConfig) {
|
|
164
|
+
const { runtime } = resolved;
|
|
165
|
+
const config = buildCodexProjectDocThreadConfig(mergeCodexThreadConfigs(runtime.networkProxy?.configPatch, buildDisabledAppsConfigPatch()), effectiveNativeConfig);
|
|
161
166
|
return {
|
|
162
167
|
cwd: resolved.workspaceDir,
|
|
163
168
|
...resolved.model ? { model: resolved.model } : {},
|
|
@@ -166,7 +171,10 @@ function buildConversationThreadRequest(resolved, serviceTier, effectiveNativeCo
|
|
|
166
171
|
approvalPolicy: resolved.runtime.approvalPolicy,
|
|
167
172
|
approvalsReviewer: resolved.runtime.approvalsReviewer,
|
|
168
173
|
...resolved.runtime.sessionRoot ? { runtimeWorkspaceRoots: [resolved.runtime.sessionRoot] } : {},
|
|
169
|
-
...
|
|
174
|
+
...runtime.networkProxy ? { config } : {
|
|
175
|
+
sandbox: runtime.sandbox,
|
|
176
|
+
config
|
|
177
|
+
},
|
|
170
178
|
...serviceTier ? { serviceTier } : {}
|
|
171
179
|
};
|
|
172
180
|
}
|
|
@@ -175,14 +183,6 @@ async function buildConversationThreadRequestForClient(client, resolved, service
|
|
|
175
183
|
requestOptions();
|
|
176
184
|
return buildConversationThreadRequest(resolved, serviceTier, effectiveConfig);
|
|
177
185
|
}
|
|
178
|
-
function codexConversationSandboxOrPermissions(runtime, sandbox, effectiveNativeConfig) {
|
|
179
|
-
const networkProxy = runtime.networkProxy;
|
|
180
|
-
const config = buildCodexProjectDocThreadConfig(mergeCodexThreadConfigs(networkProxy?.configPatch, buildDisabledAppsConfigPatch()), effectiveNativeConfig);
|
|
181
|
-
return networkProxy ? { config } : {
|
|
182
|
-
sandbox,
|
|
183
|
-
config
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
186
|
async function writeThreadBindingFromResponse(params, resolved, client, response, requestOptions) {
|
|
187
187
|
let retained = false;
|
|
188
188
|
let sameOwner = false;
|
|
@@ -202,7 +202,10 @@ async function writeThreadBindingFromResponse(params, resolved, client, response
|
|
|
202
202
|
}
|
|
203
203
|
if (current && !sameOwner) {
|
|
204
204
|
const { assertCurrent } = requestOptions();
|
|
205
|
-
await releaseCodexAppServerBindingSubscription(current, {
|
|
205
|
+
await releaseCodexAppServerBindingSubscription(current, {
|
|
206
|
+
assertCurrent,
|
|
207
|
+
retainedClientId: client.getInstanceId()
|
|
208
|
+
});
|
|
206
209
|
}
|
|
207
210
|
requestOptions();
|
|
208
211
|
if (!await params.bindingStore.mutate(params.identity, {
|
|
@@ -373,7 +376,7 @@ async function projectConversationSourceHistory(source, target, config) {
|
|
|
373
376
|
});
|
|
374
377
|
const history = projectBoundedCodexVisibleSessionHistory(entries);
|
|
375
378
|
if (history.length === 0) return;
|
|
376
|
-
const clientLease = retainSharedCodexAppServerClientByInstanceId(target.clientId);
|
|
379
|
+
const clientLease = await retainSharedCodexAppServerClientByInstanceId(target.clientId);
|
|
377
380
|
if (!clientLease) throw new Error("Codex conversation source history lost its bound client owner.");
|
|
378
381
|
try {
|
|
379
382
|
await clientLease.client.request("thread/inject_items", {
|
|
@@ -381,7 +384,7 @@ async function projectConversationSourceHistory(source, target, config) {
|
|
|
381
384
|
items: history
|
|
382
385
|
});
|
|
383
386
|
} finally {
|
|
384
|
-
clientLease.release();
|
|
387
|
+
await clientLease.release();
|
|
385
388
|
}
|
|
386
389
|
}
|
|
387
390
|
function resolveThreadRequestModelProvider(params) {
|
|
@@ -390,16 +393,6 @@ function resolveThreadRequestModelProvider(params) {
|
|
|
390
393
|
if (isCodexAppServerNativeAuthProfile(params) && modelProvider.toLowerCase() === "openai") return;
|
|
391
394
|
return modelProvider.toLowerCase() === "openai" ? "openai" : modelProvider;
|
|
392
395
|
}
|
|
393
|
-
function resolveOptionalThreadRequestModelSelection(params) {
|
|
394
|
-
if (!params.model?.trim()) return;
|
|
395
|
-
return resolveCodexAppServerRequestModelSelection({
|
|
396
|
-
model: params.model,
|
|
397
|
-
modelProvider: params.modelProvider,
|
|
398
|
-
authProfileId: params.authProfileId,
|
|
399
|
-
agentDir: params.agentDir,
|
|
400
|
-
config: params.config
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
396
|
function resolveModelBackedReviewerPolicyProvider(params) {
|
|
404
397
|
const modelProvider = params.modelProvider?.trim();
|
|
405
398
|
if (modelProvider && modelProvider.toLowerCase() !== "codex") return modelProvider.toLowerCase() === "openai" ? "openai" : modelProvider;
|
|
@@ -452,7 +445,7 @@ function createCodexConversationTurnCollector(threadId) {
|
|
|
452
445
|
if (!params || !turnId || !isCodexNotificationForTurn(params, threadId, turnId)) return;
|
|
453
446
|
if (notification.method === "item/agentMessage/delta") {
|
|
454
447
|
const itemId = normalizeOptionalString(params.itemId) ?? "assistant";
|
|
455
|
-
const delta =
|
|
448
|
+
const delta = readNonEmptyStringPreservingWhitespace(params.delta);
|
|
456
449
|
if (!delta) return;
|
|
457
450
|
assistantTextByItem.set(itemId, `${assistantTextByItem.get(itemId) ?? ""}${delta}`);
|
|
458
451
|
return;
|
|
@@ -507,11 +500,7 @@ function createCodexConversationTurnCollector(threadId) {
|
|
|
507
500
|
};
|
|
508
501
|
}
|
|
509
502
|
function readAssistantReplyText(item) {
|
|
510
|
-
return item.phase === "commentary" || item.delivery === "async" ? void 0 :
|
|
511
|
-
}
|
|
512
|
-
function readTextString(record, key) {
|
|
513
|
-
const value = record?.[key];
|
|
514
|
-
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
503
|
+
return item.phase === "commentary" || item.delivery === "async" ? void 0 : readNonEmptyStringPreservingWhitespace(item.text);
|
|
515
504
|
}
|
|
516
505
|
//#endregion
|
|
517
506
|
//#region extensions/codex/src/conversation-turn-input.ts
|
|
@@ -528,21 +517,7 @@ function buildCodexConversationTurnInput(params) {
|
|
|
528
517
|
type: "text",
|
|
529
518
|
text: params.prompt,
|
|
530
519
|
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;
|
|
520
|
+
}, ...(params.event.media ?? []).map(toCodexImageInput).filter((item) => item !== void 0)];
|
|
546
521
|
}
|
|
547
522
|
function toCodexImageInput(media) {
|
|
548
523
|
if (!isImageMedia(media)) return;
|
|
@@ -560,7 +535,7 @@ function toCodexImageInput(media) {
|
|
|
560
535
|
} : void 0;
|
|
561
536
|
}
|
|
562
537
|
function isImageMedia(media) {
|
|
563
|
-
if (media.
|
|
538
|
+
if (media.kind === "image" || media.contentType?.toLowerCase().startsWith("image/")) return true;
|
|
564
539
|
const candidate = media.path ?? media.url;
|
|
565
540
|
if (!candidate) return false;
|
|
566
541
|
return IMAGE_EXTENSIONS.has(path.extname(candidate.split(/[?#]/, 1)[0] ?? "").toLowerCase());
|
|
@@ -622,23 +597,13 @@ async function runBoundTurn(params) {
|
|
|
622
597
|
model: binding.model,
|
|
623
598
|
agentDir: params.data.agentDir
|
|
624
599
|
});
|
|
625
|
-
const
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
model: binding.model,
|
|
629
|
-
config: params.config,
|
|
630
|
-
env: process.env,
|
|
631
|
-
agentDir: params.data.agentDir
|
|
632
|
-
});
|
|
633
|
-
const sessionRoot = modelScopedRuntime.sessionRoot;
|
|
634
|
-
const approvalPolicy = modelScopedRuntime.approvalPolicy;
|
|
635
|
-
const sandbox = modelScopedRuntime.sandbox;
|
|
636
|
-
const permissionProfile = modelScopedRuntime.networkProxy?.profileName;
|
|
637
|
-
const networkProxyConfigFingerprint = modelScopedRuntime.networkProxy?.configFingerprint;
|
|
600
|
+
const { sessionRoot, approvalPolicy, sandbox } = runtime;
|
|
601
|
+
const permissionProfile = runtime.networkProxy?.profileName;
|
|
602
|
+
const networkProxyConfigFingerprint = runtime.networkProxy?.configFingerprint;
|
|
638
603
|
const networkProxyBindingChanged = binding.networkProxyProfileName !== permissionProfile || binding.networkProxyConfigFingerprint !== networkProxyConfigFingerprint;
|
|
639
604
|
const serviceTier = binding.serviceTier ?? runtime.serviceTier;
|
|
640
605
|
let useStickyNetworkProfile = permissionProfile !== void 0 && binding.networkProxyProfileName === permissionProfile && binding.networkProxyConfigFingerprint === networkProxyConfigFingerprint;
|
|
641
|
-
assertNativeConversationApprovalPolicySupported(
|
|
606
|
+
assertNativeConversationApprovalPolicySupported(runtime);
|
|
642
607
|
const modelSelection = binding.model ? resolveCodexAppServerRequestModelSelection({
|
|
643
608
|
model: binding.model,
|
|
644
609
|
modelProvider: binding.modelProvider,
|
|
@@ -646,7 +611,7 @@ async function runBoundTurn(params) {
|
|
|
646
611
|
...agentLookup
|
|
647
612
|
}) : void 0;
|
|
648
613
|
const threadRequestRuntime = {
|
|
649
|
-
runtime
|
|
614
|
+
runtime,
|
|
650
615
|
workspaceDir,
|
|
651
616
|
...modelSelection
|
|
652
617
|
};
|
|
@@ -715,7 +680,7 @@ async function runBoundTurn(params) {
|
|
|
715
680
|
throw error;
|
|
716
681
|
}
|
|
717
682
|
liveThreadOwnership = void 0;
|
|
718
|
-
} else if (binding.threadId !== threadId) await releaseCodexAppServerBindingSubscription(binding);
|
|
683
|
+
} else if (binding.threadId !== threadId) await releaseCodexAppServerBindingSubscription(binding, { retainedClientId: client.getInstanceId() });
|
|
719
684
|
if (!await params.bindingStore.mutate(identity, {
|
|
720
685
|
kind: "set",
|
|
721
686
|
binding: {
|
|
@@ -730,14 +695,14 @@ async function runBoundTurn(params) {
|
|
|
730
695
|
...agentLookup
|
|
731
696
|
}),
|
|
732
697
|
serviceTier: serviceTier ?? void 0,
|
|
733
|
-
networkProxyProfileName:
|
|
734
|
-
networkProxyConfigFingerprint:
|
|
698
|
+
networkProxyProfileName: runtime.networkProxy?.profileName,
|
|
699
|
+
networkProxyConfigFingerprint: runtime.networkProxy?.configFingerprint,
|
|
735
700
|
conversationStartId: binding.conversationStartId,
|
|
736
701
|
conversationSourceTransferComplete: binding.conversationSourceTransferComplete,
|
|
737
702
|
historyCoveredThrough: binding.historyCoveredThrough
|
|
738
703
|
}
|
|
739
704
|
})) throw new Error("Codex conversation binding changed while rotating its thread.");
|
|
740
|
-
useStickyNetworkProfile =
|
|
705
|
+
useStickyNetworkProfile = runtime.networkProxy !== void 0;
|
|
741
706
|
} else if (binding.clientId !== client.getInstanceId() || isCodexAppServerClientRuntimeLive(client) && !params.incognito && !liveThreadOwnership) {
|
|
742
707
|
if (binding.clientId === client.getInstanceId()) await assertResumeInputAllowed();
|
|
743
708
|
const response = await withLeasedCodexAppServerClientStartSelectionRetry({
|
|
@@ -771,7 +736,7 @@ async function runBoundTurn(params) {
|
|
|
771
736
|
if (!isSameCodexAppServerThreadOwner(binding, {
|
|
772
737
|
threadId,
|
|
773
738
|
clientId: client.getInstanceId()
|
|
774
|
-
})) await releaseCodexAppServerBindingSubscription(binding);
|
|
739
|
+
})) await releaseCodexAppServerBindingSubscription(binding, { retainedClientId: client.getInstanceId() });
|
|
775
740
|
if (!await params.bindingStore.mutate(identity, {
|
|
776
741
|
kind: "patch",
|
|
777
742
|
threadId: binding.threadId,
|
|
@@ -802,7 +767,7 @@ async function runBoundTurn(params) {
|
|
|
802
767
|
cwd: workspaceDir,
|
|
803
768
|
...sessionRoot ? { runtimeWorkspaceRoots: [sessionRoot] } : {},
|
|
804
769
|
approvalPolicy,
|
|
805
|
-
approvalsReviewer:
|
|
770
|
+
approvalsReviewer: runtime.approvalsReviewer,
|
|
806
771
|
...useStickyNetworkProfile ? {} : { sandboxPolicy: codexSandboxPolicyForTurn(sandbox, sessionRoot ?? workspaceDir) },
|
|
807
772
|
...modelSelection?.model ? { model: modelSelection.model } : {},
|
|
808
773
|
personality: CODEX_NATIVE_PERSONALITY_NONE,
|
|
@@ -811,6 +776,7 @@ async function runBoundTurn(params) {
|
|
|
811
776
|
activeTurnCleanup = trackCodexConversationActiveTurn({
|
|
812
777
|
identity,
|
|
813
778
|
client,
|
|
779
|
+
requestTimeoutMs: runtime.requestTimeoutMs,
|
|
814
780
|
threadId,
|
|
815
781
|
turnId: activeTurnId
|
|
816
782
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./
|
|
1
|
+
import { t as __exportAll } from "./session-binding-sidecars-jo6H8dFr.mjs";
|
|
2
2
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import process from "node:process";
|
|
@@ -42,9 +42,8 @@ function createCodexCliNodeConversationBindingData(params) {
|
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
function readCodexConversationBindingData(binding) {
|
|
45
|
-
const data = binding?.data;
|
|
46
|
-
|
|
47
|
-
return readCodexConversationBindingDataRecord(data);
|
|
45
|
+
const data = asOptionalRecord(binding?.data);
|
|
46
|
+
return data ? readCodexConversationBindingDataRecord(data) : void 0;
|
|
48
47
|
}
|
|
49
48
|
function readCodexConversationBindingDataRecord(data) {
|
|
50
49
|
if (data.kind === "codex-cli-node-session") {
|
|
@@ -54,8 +53,8 @@ function readCodexConversationBindingDataRecord(data) {
|
|
|
54
53
|
version: CLI_BINDING_DATA_VERSION,
|
|
55
54
|
nodeId: data.nodeId.trim(),
|
|
56
55
|
sessionId: data.sessionId.trim(),
|
|
57
|
-
agentId:
|
|
58
|
-
cwd:
|
|
56
|
+
agentId: normalizeOptionalString(data.agentId),
|
|
57
|
+
cwd: normalizeOptionalString(data.cwd)
|
|
59
58
|
};
|
|
60
59
|
}
|
|
61
60
|
if (data.kind !== "codex-app-server-session") return;
|
|
@@ -69,8 +68,8 @@ function readCodexConversationBindingDataRecord(data) {
|
|
|
69
68
|
version: APP_SERVER_BINDING_DATA_VERSION,
|
|
70
69
|
bindingId,
|
|
71
70
|
workspaceDir: typeof data.workspaceDir === "string" && data.workspaceDir.trim() ? data.workspaceDir : process.cwd(),
|
|
72
|
-
agentId:
|
|
73
|
-
agentDir:
|
|
71
|
+
agentId: normalizeOptionalString(data.agentId),
|
|
72
|
+
agentDir: normalizeOptionalString(data.agentDir),
|
|
74
73
|
...source ? { source } : {},
|
|
75
74
|
...start ? { start } : {},
|
|
76
75
|
...legacyBinding ? { legacyBinding: true } : {}
|
|
@@ -98,10 +97,7 @@ function resolveCodexDefaultWorkspaceDir(pluginConfig) {
|
|
|
98
97
|
return normalizeOptionalString(appServer?.defaultWorkspaceDir) ?? process.cwd();
|
|
99
98
|
}
|
|
100
99
|
function readConversationStart(value) {
|
|
101
|
-
const read = (key) =>
|
|
102
|
-
const candidate = value?.[key];
|
|
103
|
-
return typeof candidate === "string" && candidate.trim() ? candidate.trim() : void 0;
|
|
104
|
-
};
|
|
100
|
+
const read = (key) => normalizeOptionalString(value?.[key]);
|
|
105
101
|
const start = {
|
|
106
102
|
id: read("id"),
|
|
107
103
|
threadId: read("threadId"),
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { n as isCodexFastServiceTier } from "./config-utils-
|
|
2
|
-
import { r as bindingStoreKey } from "./session-binding-record-
|
|
3
|
-
import { o as formatCodexDisplayText } from "./command-formatters-
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import "./session-binding-_0W_fHRr.mjs";
|
|
1
|
+
import { n as isCodexFastServiceTier } from "./config-utils-D0CXecki.mjs";
|
|
2
|
+
import { r as bindingStoreKey } from "./session-binding-record-Oe9L-CNY.mjs";
|
|
3
|
+
import { o as formatCodexDisplayText } from "./command-formatters-R3ckE3Co.mjs";
|
|
4
|
+
import "./config-DKhXquav.mjs";
|
|
5
|
+
import { n as normalizeCodexAppServerBindingModelProvider, t as isCodexAppServerNativeAuthProfile } from "./auth-profile-B0okYl2D.mjs";
|
|
6
|
+
import { b as resolveCodexBindingModelProviderFallback, v as resolveCodexAppServerRequestModelSelection } from "./thread-requests-B_bRnMGN.mjs";
|
|
7
|
+
import "./thread-lifecycle-DPflntEJ.mjs";
|
|
8
|
+
import "./session-binding-DGCYAfvD.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) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as readCodexPluginConfig } from "./config-parsing-
|
|
1
|
+
import { d as readCodexPluginConfig } from "./config-parsing-b088LyhT.mjs";
|
|
2
2
|
import { t as attemptTerminal } from "./attempt-terminal-gZrxQ35N.mjs";
|
|
3
3
|
//#region extensions/codex/src/app-server/cyber-failover.ts
|
|
4
4
|
/**
|
package/dist/.setup/{cyber-failover-notice-e9G3J9-e.mjs → cyber-failover-notice-RNpGpTyP.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as emitCodexAppServerEvent } from "./run-attempt-lifecycle-
|
|
1
|
+
import { t as emitCodexAppServerEvent } from "./run-attempt-lifecycle-C-6O3Exn.mjs";
|
|
2
2
|
//#region extensions/codex/src/app-server/cyber-failover-notice.ts
|
|
3
3
|
async function emitCodexCyberNotice(params, notice) {
|
|
4
4
|
await emitCodexAppServerEvent(params, {
|