@openclaw/codex 2026.10.1 → 2026.10.3
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-B7Vg4rmy.mjs → account-usage-runtime-BsPb0Y3w.mjs} +1 -1
- package/dist/.setup/{apply-BzlIkqSz.mjs → apply-CMLZMIVH.mjs} +4 -4
- package/dist/.setup/{attempt-client-cleanup-HXQxfMc1.mjs → attempt-client-cleanup-hUrW3fmJ.mjs} +4 -4
- package/dist/.setup/{attempt-workspace-context-BmCutoyg.mjs → attempt-workspace-context-BRvpkEo_.mjs} +1 -1
- package/dist/.setup/{auth-cache-key-BCCQHWdc.mjs → auth-cache-key-CeVZHm9H.mjs} +1 -1
- package/dist/.setup/{bounded-turn-Cv4uIEzz.mjs → bounded-turn-DVI5FRqE.mjs} +9 -9
- package/dist/.setup/{build-state-BwxNfFEB.mjs → build-state-DP9Coy_6.mjs} +1 -1
- package/dist/.setup/{client-BIRVBXXb.mjs → client-DIC12QQ_.mjs} +2 -2
- package/dist/.setup/{client-catalog-response-BNFDYAKh.mjs → client-catalog-response-Bhc23x3Q.mjs} +1 -1
- package/dist/.setup/{command-dispatch-D3_ypl-R.mjs → command-dispatch-Dc95dWpV.mjs} +1 -1
- package/dist/.setup/{command-handlers-KPit4G0p.mjs → command-handlers-K365hYqd.mjs} +11 -11
- package/dist/.setup/{command-rpc-CmQDOxY9.mjs → command-rpc-C207n84A.mjs} +6 -6
- package/dist/.setup/{compact-CLLteFIY.mjs → compact-DNLigO9M.mjs} +9 -9
- package/dist/.setup/{computer-use-BVxocZZc.mjs → computer-use-rt0M8Bom.mjs} +4 -4
- package/dist/.setup/{conversation-binding-DJ_288rC.mjs → conversation-binding-BQ5GWV_6.mjs} +10 -10
- package/dist/.setup/{conversation-control-CuiZ_pDL.mjs → conversation-control-DMDuo_D6.mjs} +2 -2
- package/dist/.setup/{dynamic-tool-build-DgWZMfAQ.mjs → dynamic-tool-build-CdUp03dV.mjs} +2 -2
- package/dist/.setup/{dynamic-tools-Ct6GKAFr.mjs → dynamic-tools-3hNi6oog.mjs} +15 -7
- package/dist/.setup/{effective-mcp-catalog-DmCSc8TS.mjs → effective-mcp-catalog-DHEOnIwA.mjs} +4 -4
- package/dist/.setup/{ephemeral-turn-_cBMKCFb.mjs → ephemeral-turn-BVauXzx9.mjs} +2 -2
- package/dist/.setup/{event-projector-assistant-message-C3Tpt370.mjs → event-projector-assistant-message-CRadIRA4.mjs} +1 -1
- package/dist/.setup/{isolated-completion-CjrQEeke.mjs → isolated-completion-Dab4vUwO.mjs} +4 -4
- package/dist/.setup/{mcp-app-session-preparation-D0yRoreX.mjs → mcp-app-session-preparation-8CGBwfHK.mjs} +5 -5
- package/dist/.setup/{model-catalog--G4arndd.mjs → model-catalog-CQXEzyxr.mjs} +26 -19
- package/dist/.setup/{models-BYbLQPnj.mjs → models-CR97NoEB.mjs} +3 -3
- package/dist/.setup/{native-mcp-app-5i5eRCwO.mjs → native-mcp-app-D4VcVFK7.mjs} +4 -4
- package/dist/.setup/{native-subagent-monitor-B2C8D_N0.mjs → native-subagent-monitor-CkpiZfm0.mjs} +6 -6
- package/dist/.setup/{plan-B5bDIEuQ.mjs → plan-LJsaUrXA.mjs} +2 -2
- package/dist/.setup/{plugin-approval-roundtrip-C_SGp5YW.mjs → plugin-approval-roundtrip-D7LyYiO6.mjs} +1 -1
- package/dist/.setup/{plugin-thread-config-deadline-CsScGgrk.mjs → plugin-thread-config-deadline-DZw8qiVC.mjs} +3 -3
- package/dist/.setup/{provider-BoIby-eX.mjs → provider-CGCiFHsg.mjs} +4 -4
- package/dist/.setup/{provider-capabilities-B4yq6UgQ.mjs → provider-capabilities-NZytgEzO.mjs} +1 -1
- package/dist/.setup/{request-DD3u22uv.mjs → request-Ddy7nOme.mjs} +1 -1
- package/dist/.setup/{run-attempt-DOVF5OON.mjs → run-attempt-BqC2g0aO.mjs} +24 -23
- package/dist/.setup/{session-catalog-events-DRaivXvC.mjs → session-catalog-events-Ce-JJuIv.mjs} +2 -2
- package/dist/.setup/{session-catalog-index-qwmgqC4t.mjs → session-catalog-index-BnHv8CX_.mjs} +3 -3
- package/dist/.setup/{session-catalog-native-projection-z9Q608QW.mjs → session-catalog-native-projection-Cpc9sZnx.mjs} +1 -1
- package/dist/.setup/{session-catalog-projection-Cl0Nc7c6.mjs → session-catalog-projection-D7YtgdS_.mjs} +1 -1
- package/dist/.setup/{session-retirement-Bt3b0fpe.mjs → session-retirement-D8akYv0Q.mjs} +5 -5
- package/dist/.setup/{settled-turn-finalizer-e_24O6HA.mjs → settled-turn-finalizer-CEyM5wo_.mjs} +5 -5
- package/dist/.setup/{shared-client-DeenOD8U.mjs → shared-client-D2ivOIey.mjs} +19 -8
- package/dist/.setup/{shell-dynamic-tools-BqGszXcq.mjs → shell-dynamic-tools-CkHxyESN.mjs} +1 -1
- package/dist/.setup/{side-question-BZHn_1Jm.mjs → side-question-DiQ2HCos.mjs} +10 -10
- package/dist/.setup/{source-0ClinBHI.mjs → source-3uDpVdu3.mjs} +1 -1
- package/dist/.setup/{thread-lifecycle-CoqYpbpk.mjs → thread-lifecycle-BSVWNPZt.mjs} +78 -50
- package/dist/.setup/{thread-ownership-CSDZ6mHd.mjs → thread-ownership-GlDZf8J7.mjs} +3 -3
- package/dist/.setup/{thread-policy-DCC9lQjC.mjs → thread-policy-Brc0nbdS.mjs} +3 -3
- package/dist/.setup/{thread-requests-Dwg2b4Xl.mjs → thread-requests-CKEQxo_5.mjs} +4 -4
- package/dist/.setup/{thread-resume--WOKWxZd.mjs → thread-resume-BfkvLUZY.mjs} +4 -4
- package/dist/.setup/{turn-router-BWhX_SBh.mjs → turn-router-CaGl9iS1.mjs} +1 -1
- package/dist/.setup/{upstream-session-fork-BQvofnk7.mjs → upstream-session-fork-BdvuVrvg.mjs} +9 -9
- package/dist/.setup/{usage-BEHcVwcZ.mjs → usage-Drw_79Hn.mjs} +1 -1
- package/dist/.setup/{usage-limit-error-D1p3nE6n.mjs → usage-limit-error-B26Xp5eo.mjs} +1 -1
- package/dist/.setup/{web-search-provider.runtime-CV9oiB-v.mjs → web-search-provider.runtime-94j6OiyW.mjs} +3 -3
- package/dist/catalog-page.worker.js +1 -1
- package/dist/harness.js +15 -15
- package/dist/index.js +24 -24
- package/dist/media-understanding-provider.js +2 -2
- package/dist/migration-provider-api.js +1 -1
- package/package.json +4 -4
|
@@ -4,7 +4,7 @@ import { m as sessionBindingIdentity, n as assertCodexBindingMayBeReplaced } fro
|
|
|
4
4
|
import { u as fingerprintCodexPolicy } from "./config-security-KAPScztc.mjs";
|
|
5
5
|
import { n as resolveCodexAppServerLocalHomeDir, t as resolveCodexAppServerHomeDir } from "./auth-start-options-BPIPeEX8.mjs";
|
|
6
6
|
import { d as readCodexEffectiveConfig, n as codexSandboxPolicyForTurn, s as assertCodexModelBackedReviewerEffectiveConfig, u as CODEX_SESSION_OVERRIDABLE_LAYER_TYPES } from "./config-options-HG_Rr3W_.mjs";
|
|
7
|
-
import { S as retainSharedCodexAppServerClientByInstanceId, d as getCurrentSharedClientEntry } from "./auth-cache-key-
|
|
7
|
+
import { S as retainSharedCodexAppServerClientByInstanceId, d as getCurrentSharedClientEntry } from "./auth-cache-key-CeVZHm9H.mjs";
|
|
8
8
|
import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-Dp24d7-F.mjs";
|
|
9
9
|
import { o as isCodexAppServerOverloadError, r as CodexAppServerRpcError, s as isCodexThreadReadMissingError } from "./rpc-error-hmWM21RB.mjs";
|
|
10
10
|
import { t as codexCatalogHomeId } from "./session-catalog-home-id-vlih0B_g.mjs";
|
|
@@ -17,16 +17,16 @@ import "./config-0Gxk3_eq.mjs";
|
|
|
17
17
|
import { r as invalidInlineImageText } from "./session-history-read-CNN8zwbD.mjs";
|
|
18
18
|
import { c as resolveCodexContextEngineProjectionMaxChars, o as neutralizeCodexExplicitMentionSigils } from "./context-engine-projection-CsgYSQhW.mjs";
|
|
19
19
|
import { n as normalizeCodexAppServerBindingModelProvider } from "./auth-profile-CgHQ8Vot.mjs";
|
|
20
|
-
import { A as bindCodexInferenceThread, B as isCodexAppServerClientRuntimeLive, C as CodexThreadBindingConflictError, F as consumeCodexAppServerLiveThread,
|
|
21
|
-
import { B as getCodexAppServerClientInstanceId, C as resolveCodexThreadRolloutPath, H as resolveCodexAppServerClientInstanceId, S as readSupervisionResponseThreadId, c as isCodexAppServerRequestTimeoutError, g as assertCodexThreadStartResponse, m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, v as assertExactSupervisionModelSelection } from "./client-
|
|
22
|
-
import { r as hasCodexAppServerSiblingRouteWork } from "./turn-router-
|
|
23
|
-
import { f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-
|
|
24
|
-
import { $ as legacyFingerprintUserMcpServersConfigPatch, B as hasCodexNativeToolCatalog, Ct as mergeCodexThreadConfigs, D as assertCodexNativeHookRelayAllowed, E as CodexManagedHooksOnlyError, Et as buildCodexAppApprovalOverrides, G as areCodexDynamicToolFingerprintsCompatible, I as attestCodexThreadToolSurface, J as codexLegacyDynamicToolsFingerprint, K as areUserMcpServersFingerprintsCompatible, L as checkCodexThreadAppAvailability, Q as fingerprintUserMcpServersConfigPatch, R as discardUnattestedCodexPluginThread, S as joinPresentSections, St as isCodexPluginThreadBindingStale, U as applyCodexNativeSkillIsolation, V as loadCodexNativeToolCatalog, W as resolveCodexNativeSkillIsolation, X as fingerprintEnvironmentSelection, Y as fingerprintCodexThreadConfig, Z as fingerprintJsonObject, _ as CODEX_NATIVE_PERSONALITY_NONE, at as shouldRotateCodexAppServerBindingForRuntime, b as resolveCodexAppServerThreadModelSelection, bt as buildPluginAppPolicyContext, c as codexThreadSandboxOrPermissions, d as readCodexManagedRequirementsFingerprint, dt as isSystemAgentOnlyCodexDynamicToolAllowlist, et as readActiveCodexTurnIdsFromResume, f as resolveCodexThreadApprovalsReviewer, g as buildDeveloperInstructions, h as mergeCodexNativeShellEnvironment, ht as buildCodexPluginAppsConfigPatchFromPolicyContext, i as buildCodexRuntimeThreadConfigForRun, it as shouldRecheckRecoverablePluginBinding, m as resolveCodexWebSearchPlan, n as buildCodexRingZeroThreadConfigPatch, o as buildThreadResumeParams, ot as shouldRotateCodexGpt56MultiAgentBinding, q as codexDynamicToolsFingerprint, rt as isTransientWebSearchRestriction, s as buildThreadStartParams, t as assertCodexManagedRequirementsDoNotOverrideToolPolicy, tt as shouldStartTransientNoToolThread, u as readCodexInheritedMcpServerNames, ut as isMessageOnlyCodexSourceReply, v as resolveCodexAppServerModelProvider, w as mergeCodexNativeProjectDocThreadConfig, xt as disableUnlistedCodexApps, y as resolveCodexAppServerRequestModelSelection, z as attestCodexRestrictedToolSurfaceMcpServersDisabled } from "./thread-requests-
|
|
20
|
+
import { $ as createCodexEphemeralThreadPolicy, A as bindCodexInferenceThread, B as isCodexAppServerClientRuntimeLive, C as CodexThreadBindingConflictError, F as consumeCodexAppServerLiveThread, H as isCodexAppServerLiveThreadProtected, K as releaseCodexAppServerLiveThread, M as getCodexInferenceThreadQualification, N as prepareCodexInferenceThreadConfig, S as CodexAdoptedThreadActiveError, T as CodexThreadStartRequestError, V as isCodexAppServerLiveThreadClaimed, Y as unsubscribeCodexAppServerLiveThread, j as getCodexInferenceThread, k as assertCodexInferenceRouteConfig, n as captureCodexAppServerClientLifetime, w as CodexThreadClientReplacementError, z as hasCodexAppServerSiblingThreadWork } from "./shared-client-D2ivOIey.mjs";
|
|
21
|
+
import { B as getCodexAppServerClientInstanceId, C as resolveCodexThreadRolloutPath, H as resolveCodexAppServerClientInstanceId, S as readSupervisionResponseThreadId, c as isCodexAppServerRequestTimeoutError, g as assertCodexThreadStartResponse, m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, v as assertExactSupervisionModelSelection } from "./client-DIC12QQ_.mjs";
|
|
22
|
+
import { r as hasCodexAppServerSiblingRouteWork } from "./turn-router-CaGl9iS1.mjs";
|
|
23
|
+
import { f as unsubscribeCodexThreadBestEffort, l as retireUnsafeCodexTurnClientBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-hUrW3fmJ.mjs";
|
|
24
|
+
import { $ as legacyFingerprintUserMcpServersConfigPatch, B as hasCodexNativeToolCatalog, Ct as mergeCodexThreadConfigs, D as assertCodexNativeHookRelayAllowed, E as CodexManagedHooksOnlyError, Et as buildCodexAppApprovalOverrides, G as areCodexDynamicToolFingerprintsCompatible, I as attestCodexThreadToolSurface, J as codexLegacyDynamicToolsFingerprint, K as areUserMcpServersFingerprintsCompatible, L as checkCodexThreadAppAvailability, Q as fingerprintUserMcpServersConfigPatch, R as discardUnattestedCodexPluginThread, S as joinPresentSections, St as isCodexPluginThreadBindingStale, U as applyCodexNativeSkillIsolation, V as loadCodexNativeToolCatalog, W as resolveCodexNativeSkillIsolation, X as fingerprintEnvironmentSelection, Y as fingerprintCodexThreadConfig, Z as fingerprintJsonObject, _ as CODEX_NATIVE_PERSONALITY_NONE, at as shouldRotateCodexAppServerBindingForRuntime, b as resolveCodexAppServerThreadModelSelection, bt as buildPluginAppPolicyContext, c as codexThreadSandboxOrPermissions, d as readCodexManagedRequirementsFingerprint, dt as isSystemAgentOnlyCodexDynamicToolAllowlist, et as readActiveCodexTurnIdsFromResume, f as resolveCodexThreadApprovalsReviewer, g as buildDeveloperInstructions, h as mergeCodexNativeShellEnvironment, ht as buildCodexPluginAppsConfigPatchFromPolicyContext, i as buildCodexRuntimeThreadConfigForRun, it as shouldRecheckRecoverablePluginBinding, m as resolveCodexWebSearchPlan, n as buildCodexRingZeroThreadConfigPatch, o as buildThreadResumeParams, ot as shouldRotateCodexGpt56MultiAgentBinding, q as codexDynamicToolsFingerprint, rt as isTransientWebSearchRestriction, s as buildThreadStartParams, t as assertCodexManagedRequirementsDoNotOverrideToolPolicy, tt as shouldStartTransientNoToolThread, u as readCodexInheritedMcpServerNames, ut as isMessageOnlyCodexSourceReply, v as resolveCodexAppServerModelProvider, w as mergeCodexNativeProjectDocThreadConfig, xt as disableUnlistedCodexApps, y as resolveCodexAppServerRequestModelSelection, z as attestCodexRestrictedToolSurfaceMcpServersDisabled } from "./thread-requests-CKEQxo_5.mjs";
|
|
25
25
|
import { a as hashCodexAppServerBindingFingerprint, r as resolveCodexSessionBinding } from "./session-binding-Ce7BqiPN.mjs";
|
|
26
26
|
import { r as readCodexMcpToolConnectorId } from "./mcp-tool-metadata-j10HhfTC.mjs";
|
|
27
|
-
import { a as refreshCodexThreadInstructions, i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy, r as assertAdoptedCodexThreadResumeAllowed, t as CodexIncognitoPolicyChangeError } from "./thread-policy-
|
|
28
|
-
import { t as resumeCodexAppServerThread } from "./thread-resume
|
|
29
|
-
import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-
|
|
27
|
+
import { a as refreshCodexThreadInstructions, i as assertCodexSupervisionThreadLineage, n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy, r as assertAdoptedCodexThreadResumeAllowed, t as CodexIncognitoPolicyChangeError } from "./thread-policy-Brc0nbdS.mjs";
|
|
28
|
+
import { t as resumeCodexAppServerThread } from "./thread-resume-BfkvLUZY.mjs";
|
|
29
|
+
import { c as withExclusiveCodexAppServerThread, r as retainCodexAppServerBindingSubscription, t as isSameCodexAppServerThreadOwner } from "./thread-ownership-GlDZf8J7.mjs";
|
|
30
30
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
31
31
|
import crypto from "node:crypto";
|
|
32
32
|
import { isDeepStrictEqual } from "node:util";
|
|
@@ -34,7 +34,7 @@ import { resolveSessionAgentIdsStrict } from "openclaw/plugin-sdk/agent-scope-ru
|
|
|
34
34
|
import path from "node:path";
|
|
35
35
|
import { isIncognitoSessionKey } from "openclaw/plugin-sdk/session-key-runtime";
|
|
36
36
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
37
|
-
import { createStageTimingTracker, formatStageTimings } from "openclaw/plugin-sdk/time-runtime";
|
|
37
|
+
import { createStageTimingTracker, formatStageTimings, racePromiseWithAbortSignal } from "openclaw/plugin-sdk/time-runtime";
|
|
38
38
|
import { AgentHarnessPreflightError, buildHarnessVisibleReplyGuidance, buildTemporalContextText, embeddedAgentLog, formatErrorMessage, isActiveHarnessContextEngine, isHostScopedAgentToolActive } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
39
39
|
import { resolveAgentDir as resolveAgentDir$2 } from "openclaw/plugin-sdk/agent-runtime";
|
|
40
40
|
import { sanitizeInlineImageDataUrl } from "openclaw/plugin-sdk/inline-image-data-url-runtime";
|
|
@@ -1094,12 +1094,14 @@ async function startFreshCodexThread(params, context) {
|
|
|
1094
1094
|
//#region extensions/codex/src/app-server/thread-lifecycle-warm.ts
|
|
1095
1095
|
/** Preserves the caller's abort reason across thread ownership transitions. */
|
|
1096
1096
|
function throwIfCodexThreadLifecycleAborted(signal) {
|
|
1097
|
-
if (
|
|
1097
|
+
if (signal?.aborted) throw codexThreadLifecycleAbortError(signal);
|
|
1098
|
+
}
|
|
1099
|
+
function codexThreadLifecycleAbortError(signal) {
|
|
1098
1100
|
const reason = signal.reason;
|
|
1099
|
-
if (reason instanceof Error)
|
|
1101
|
+
if (reason instanceof Error) return reason;
|
|
1100
1102
|
const error = new Error(typeof reason === "string" && reason.length > 0 ? reason : "codex app-server thread lifecycle aborted");
|
|
1101
1103
|
error.name = "AbortError";
|
|
1102
|
-
|
|
1104
|
+
return error;
|
|
1103
1105
|
}
|
|
1104
1106
|
/** Releases consumed subscription ownership or retires an unsafe client. */
|
|
1105
1107
|
async function releaseCodexConsumedLiveThread(options) {
|
|
@@ -1132,7 +1134,7 @@ async function releaseCodexBoundLiveThread(options) {
|
|
|
1132
1134
|
if (changedClient && !previous) return false;
|
|
1133
1135
|
const client = previous?.client ?? options.client;
|
|
1134
1136
|
try {
|
|
1135
|
-
if (isCodexAppServerLiveThreadClaimed(client, options.threadId)) throw new Error(`Codex thread ${options.threadId} is claimed by active work; stop it first.`);
|
|
1137
|
+
if (isCodexAppServerLiveThreadClaimed(client, options.threadId) || isCodexAppServerLiveThreadProtected(client, options.threadId)) throw new Error(`Codex thread ${options.threadId} is claimed by active work; stop it first.`);
|
|
1136
1138
|
return await releaseCodexRetainedLiveThread({
|
|
1137
1139
|
...options,
|
|
1138
1140
|
client,
|
|
@@ -1144,7 +1146,8 @@ async function releaseCodexBoundLiveThread(options) {
|
|
|
1144
1146
|
} : void 0
|
|
1145
1147
|
});
|
|
1146
1148
|
} finally {
|
|
1147
|
-
|
|
1149
|
+
const retiredExit = previous?.release(!isCodexAppServerLiveThreadClaimed(client, options.threadId) && !isCodexAppServerLiveThreadProtected(client, options.threadId));
|
|
1150
|
+
if (retiredExit) await racePromiseWithAbortSignal(retiredExit, options.signal, codexThreadLifecycleAbortError);
|
|
1148
1151
|
}
|
|
1149
1152
|
}
|
|
1150
1153
|
/** Reuses one safely owned, fully matching subscription on its original client. */
|
|
@@ -1187,6 +1190,33 @@ async function tryReuseCodexLiveThread(options) {
|
|
|
1187
1190
|
let ownershipTransferred = false;
|
|
1188
1191
|
let preserveSubscription = false;
|
|
1189
1192
|
let nativeThread;
|
|
1193
|
+
const cleanup = async (retainSubscription, ownership = retainedThread) => {
|
|
1194
|
+
let failure;
|
|
1195
|
+
try {
|
|
1196
|
+
let pendingRetention;
|
|
1197
|
+
if (retainSubscription) {
|
|
1198
|
+
const retain = () => {
|
|
1199
|
+
assertWarmOwner();
|
|
1200
|
+
if (isSameCodexAppServerThreadOwner(params.bindingStore.read(bindingIdentity), binding)) pendingRetention = retainCodexAppServerBindingSubscription(params.client, binding.threadId, ownership);
|
|
1201
|
+
};
|
|
1202
|
+
try {
|
|
1203
|
+
if (params.authority) await params.authority.withCurrent(retain);
|
|
1204
|
+
else retain();
|
|
1205
|
+
} catch {}
|
|
1206
|
+
}
|
|
1207
|
+
if (pendingRetention) {
|
|
1208
|
+
if (!await pendingRetention) failure = { cause: /* @__PURE__ */ new Error("Codex live thread ownership could not be returned to its session") };
|
|
1209
|
+
} else await retainedThread.release(binding.threadId);
|
|
1210
|
+
} catch (cause) {
|
|
1211
|
+
failure = { cause };
|
|
1212
|
+
}
|
|
1213
|
+
if (failure) await abandonCodexLiveThreadRelease({
|
|
1214
|
+
client: params.client,
|
|
1215
|
+
abandonClient: params.abandonClient,
|
|
1216
|
+
lifecycleTiming,
|
|
1217
|
+
threadId: binding.threadId
|
|
1218
|
+
}, failure.cause);
|
|
1219
|
+
};
|
|
1190
1220
|
try {
|
|
1191
1221
|
assertWarmOwner();
|
|
1192
1222
|
if (binding.preserveNativeModel || binding.connectionScope === "supervision") {
|
|
@@ -1205,7 +1235,10 @@ async function tryReuseCodexLiveThread(options) {
|
|
|
1205
1235
|
}
|
|
1206
1236
|
const pluginThreadConfig = await options.buildLoadedPluginThreadConfig(binding);
|
|
1207
1237
|
assertWarmOwner();
|
|
1208
|
-
if (pluginThreadConfig && pluginThreadConfig.fingerprint !== binding.pluginAppsFingerprint)
|
|
1238
|
+
if (pluginThreadConfig && pluginThreadConfig.fingerprint !== binding.pluginAppsFingerprint) {
|
|
1239
|
+
preserveSubscription = true;
|
|
1240
|
+
return { kind: "rotate" };
|
|
1241
|
+
}
|
|
1209
1242
|
const prebuiltFinalConfigPatch = await prepareCodexThreadFinalConfigPatch(params, options.nativeModelInputTools, binding);
|
|
1210
1243
|
const pluginAppsConfigPatch = pluginThreadConfig?.configPatch ?? (params.pluginThreadConfig?.enabled && binding.pluginAppPolicyContext ? buildCodexPluginAppsConfigPatchFromPolicyContext(binding.pluginAppPolicyContext) : void 0);
|
|
1211
1244
|
const resumeAuthProfileId = binding.connectionScope === "supervision" ? void 0 : params.params.authProfileId ?? binding.authProfileId;
|
|
@@ -1296,50 +1329,30 @@ async function tryReuseCodexLiveThread(options) {
|
|
|
1296
1329
|
threadId: binding.threadId,
|
|
1297
1330
|
action: "resumed"
|
|
1298
1331
|
});
|
|
1332
|
+
const liveThreadEphemeralPolicy = ephemeralPolicy && {
|
|
1333
|
+
...ephemeralPolicy,
|
|
1334
|
+
refreshableInstructions: params.refreshableInstructions
|
|
1335
|
+
};
|
|
1299
1336
|
ownershipTransferred = true;
|
|
1300
1337
|
return {
|
|
1301
1338
|
kind: "ready",
|
|
1339
|
+
cleanupOnFailure: () => cleanup(isCodexAppServerLiveThreadProtected(params.client, binding.threadId), {
|
|
1340
|
+
...retainedThread,
|
|
1341
|
+
configFingerprint: liveThreadConfigFingerprint,
|
|
1342
|
+
ephemeralPolicy: liveThreadEphemeralPolicy
|
|
1343
|
+
}),
|
|
1302
1344
|
binding: {
|
|
1303
1345
|
...binding,
|
|
1304
1346
|
...!incognito ? bindingPatch : {},
|
|
1305
1347
|
liveThreadConfigFingerprint,
|
|
1306
|
-
liveThreadEphemeralPolicy
|
|
1307
|
-
...ephemeralPolicy,
|
|
1308
|
-
refreshableInstructions: params.refreshableInstructions
|
|
1309
|
-
},
|
|
1348
|
+
liveThreadEphemeralPolicy,
|
|
1310
1349
|
liveThreadOwnership: retainedThread,
|
|
1311
1350
|
...!incognito && retainedThread.serviceTier && resumeParams.serviceTier === void 0 ? { clearInheritedServiceTier: true } : {},
|
|
1312
1351
|
lifecycle: { action: "resumed" }
|
|
1313
1352
|
}
|
|
1314
1353
|
};
|
|
1315
1354
|
} finally {
|
|
1316
|
-
if (!ownershipTransferred)
|
|
1317
|
-
let failure;
|
|
1318
|
-
try {
|
|
1319
|
-
let pendingRetention;
|
|
1320
|
-
if (preserveSubscription) {
|
|
1321
|
-
const retain = () => {
|
|
1322
|
-
assertWarmOwner();
|
|
1323
|
-
if (isSameCodexAppServerThreadOwner(params.bindingStore.read(bindingIdentity), binding)) pendingRetention = retainCodexAppServerBindingSubscription(params.client, binding.threadId, retainedThread);
|
|
1324
|
-
};
|
|
1325
|
-
try {
|
|
1326
|
-
if (params.authority) await params.authority.withCurrent(retain);
|
|
1327
|
-
else retain();
|
|
1328
|
-
} catch {}
|
|
1329
|
-
}
|
|
1330
|
-
if (pendingRetention) {
|
|
1331
|
-
if (!await pendingRetention) failure = { cause: /* @__PURE__ */ new Error("Codex live thread ownership could not be returned to its session") };
|
|
1332
|
-
} else await retainedThread.release(binding.threadId);
|
|
1333
|
-
} catch (cause) {
|
|
1334
|
-
failure = { cause };
|
|
1335
|
-
}
|
|
1336
|
-
if (failure) await abandonCodexLiveThreadRelease({
|
|
1337
|
-
client: params.client,
|
|
1338
|
-
abandonClient: params.abandonClient,
|
|
1339
|
-
lifecycleTiming,
|
|
1340
|
-
threadId: binding.threadId
|
|
1341
|
-
}, failure.cause);
|
|
1342
|
-
}
|
|
1355
|
+
if (!ownershipTransferred) await cleanup(preserveSubscription);
|
|
1343
1356
|
}
|
|
1344
1357
|
}
|
|
1345
1358
|
//#endregion
|
|
@@ -1834,7 +1847,8 @@ async function recoverPendingSupervisionArtifacts(params, pending) {
|
|
|
1834
1847
|
async function startOrResumeThread(input) {
|
|
1835
1848
|
const incognito = isIncognitoSessionKey(input.params.sessionKey);
|
|
1836
1849
|
const clientId = resolveCodexAppServerClientInstanceId(input.client);
|
|
1837
|
-
|
|
1850
|
+
let cleanupWarmBinding;
|
|
1851
|
+
const prep = withCodexThreadLifecycleBinding(input, async (bindingIdentity, saved, authority) => {
|
|
1838
1852
|
const assert = authority.assertCurrent;
|
|
1839
1853
|
const params = {
|
|
1840
1854
|
...input,
|
|
@@ -1887,7 +1901,8 @@ async function startOrResumeThread(input) {
|
|
|
1887
1901
|
lifecycleTiming,
|
|
1888
1902
|
threadId,
|
|
1889
1903
|
assertCurrent,
|
|
1890
|
-
withCurrent: authority.withCurrent
|
|
1904
|
+
withCurrent: authority.withCurrent,
|
|
1905
|
+
signal: params.signal
|
|
1891
1906
|
});
|
|
1892
1907
|
if (binding?.pendingSupervisionBranch) {
|
|
1893
1908
|
const requestContext = await prepareRequestContext();
|
|
@@ -2114,7 +2129,10 @@ async function startOrResumeThread(input) {
|
|
|
2114
2129
|
clientId,
|
|
2115
2130
|
buildLoadedPluginThreadConfig
|
|
2116
2131
|
});
|
|
2117
|
-
if (warmReuse.kind === "ready")
|
|
2132
|
+
if (warmReuse.kind === "ready") {
|
|
2133
|
+
cleanupWarmBinding = warmReuse.cleanupOnFailure;
|
|
2134
|
+
return publishCodexThreadInferenceBinding(params, warmReuse.binding, true);
|
|
2135
|
+
}
|
|
2118
2136
|
if (incognito || warmReuse.kind === "rotate") {
|
|
2119
2137
|
throwIfAborted();
|
|
2120
2138
|
stageBindingReplacement(incognito ? "rotating an unavailable ephemeral thread binding" : "rotating a stale plugin app binding");
|
|
@@ -2149,6 +2167,16 @@ async function startOrResumeThread(input) {
|
|
|
2149
2167
|
if (replacementPredecessor && !preserveExistingBinding && configuredMcpOwnershipChanged) await releaseRetainedThread(replacementPredecessor.threadId, replacementPredecessor.clientId);
|
|
2150
2168
|
return publishCodexThreadInferenceBinding(params, started);
|
|
2151
2169
|
});
|
|
2170
|
+
try {
|
|
2171
|
+
return await prep;
|
|
2172
|
+
} catch (error) {
|
|
2173
|
+
if (cleanupWarmBinding) try {
|
|
2174
|
+
await cleanupWarmBinding();
|
|
2175
|
+
} catch (releaseError) {
|
|
2176
|
+
throw new AggregateError([error, releaseError], "Codex warm thread preparation and subscription cleanup failed", { cause: releaseError });
|
|
2177
|
+
}
|
|
2178
|
+
throw error;
|
|
2179
|
+
}
|
|
2152
2180
|
}
|
|
2153
2181
|
//#endregion
|
|
2154
2182
|
//#region extensions/codex/src/app-server/user-input.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-
|
|
1
|
+
import { S as retainSharedCodexAppServerClientByInstanceId } from "./auth-cache-key-CeVZHm9H.mjs";
|
|
2
2
|
import { t as withCodexAppServerThreadMutation } from "./thread-ownership-queue-Dp24d7-F.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { f as unsubscribeCodexThreadBestEffort, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-
|
|
3
|
+
import { K as releaseCodexAppServerLiveThread, V as isCodexAppServerLiveThreadClaimed, q as retainCodexAppServerLiveThread } from "./shared-client-D2ivOIey.mjs";
|
|
4
|
+
import { f as unsubscribeCodexThreadBestEffort, o as closeCodexStartupClientBestEffort, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-hUrW3fmJ.mjs";
|
|
5
5
|
import { t as __exportAll } from "./session-binding-sidecars-BrdV95Fg.mjs";
|
|
6
6
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
|
7
7
|
import { runWithAsyncWorkResources } from "openclaw/plugin-sdk/agent-harness-tool-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as CodexAppServerScopedRequestRejectedError, o as isCodexAppServerOverloadError } from "./rpc-error-hmWM21RB.mjs";
|
|
2
|
-
import { n as requestCodexAppServerClientJson } from "./request-
|
|
3
|
-
import { S as CodexAdoptedThreadActiveError } from "./shared-client-
|
|
4
|
-
import { p as assertCodexThreadAcceptsDirectInput, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-
|
|
2
|
+
import { n as requestCodexAppServerClientJson } from "./request-Ddy7nOme.mjs";
|
|
3
|
+
import { S as CodexAdoptedThreadActiveError } from "./shared-client-D2ivOIey.mjs";
|
|
4
|
+
import { p as assertCodexThreadAcceptsDirectInput, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-DIC12QQ_.mjs";
|
|
5
5
|
import { AgentHarnessPreflightError, embeddedAgentLog, formatErrorMessage } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
6
6
|
//#region extensions/codex/src/app-server/thread-policy.ts
|
|
7
7
|
/** A refusal, not a failed native write: the ephemeral conversation must stay alive. */
|
|
@@ -7,13 +7,13 @@ import { a as defaultCodexAppInventoryCache, i as CodexAppInventoryCache, o as s
|
|
|
7
7
|
import { c as toCodexPluginOwnedAccountApp, o as readCodexPluginInventory } from "./plugin-inventory-Bf0_piTw.mjs";
|
|
8
8
|
import "./config-0Gxk3_eq.mjs";
|
|
9
9
|
import { t as isCodexAppServerNativeAuthProfile } from "./auth-profile-CgHQ8Vot.mjs";
|
|
10
|
-
import { D as nativeHookRelayUnregisterQueue,
|
|
10
|
+
import { D as nativeHookRelayUnregisterQueue, G as readCodexClientSessionMeta } from "./shared-client-D2ivOIey.mjs";
|
|
11
11
|
import { a as isCodexResponsesOAuthRun, i as isCodexResponsesOAuthCredential, t as CODEX_RESPONSES_OAUTH_PROVIDER } from "./responses-oauth-twnuTaAa.mjs";
|
|
12
|
-
import { P as resolveCodexToolAbortTerminalReason } from "./client-
|
|
13
|
-
import { f as unsubscribeCodexThreadBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS } from "./attempt-client-cleanup-
|
|
12
|
+
import { P as resolveCodexToolAbortTerminalReason } from "./client-DIC12QQ_.mjs";
|
|
13
|
+
import { f as unsubscribeCodexThreadBestEffort, n as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS } from "./attempt-client-cleanup-hUrW3fmJ.mjs";
|
|
14
14
|
import { t as ensureCodexPluginActivation } from "./plugin-activation-BcyBv8PG.mjs";
|
|
15
15
|
import { a as hashCodexAppServerBindingFingerprint } from "./session-binding-Ce7BqiPN.mjs";
|
|
16
|
-
import { t as codexNativeSubagentMonitorRuntime } from "./native-subagent-monitor-
|
|
16
|
+
import { t as codexNativeSubagentMonitorRuntime } from "./native-subagent-monitor-CkpiZfm0.mjs";
|
|
17
17
|
import { normalizeOptionalString, normalizeUniqueStringEntries, normalizeUniqueTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
18
18
|
import * as crypto$1 from "node:crypto";
|
|
19
19
|
import crypto, { createHash } from "node:crypto";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as CodexAppServerScopedRequestRejectedError, o as isCodexAppServerOverloadError, r as CodexAppServerRpcError } from "./rpc-error-hmWM21RB.mjs";
|
|
2
|
-
import { r as publishCodexCatalogResume } from "./session-catalog-events-
|
|
3
|
-
import { L as forgetCodexWorkspaceReferences,
|
|
4
|
-
import { h as assertCodexThreadResumeResponse, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-
|
|
5
|
-
import { f as unsubscribeCodexThreadBestEffort, i as assertCodexThreadResumeSubscription, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-
|
|
2
|
+
import { r as publishCodexCatalogResume } from "./session-catalog-events-Ce-JJuIv.mjs";
|
|
3
|
+
import { L as forgetCodexWorkspaceReferences, pt as isCodexAppServerStartupError, u as isCodexAppServerStartSelectionChangedError } from "./shared-client-D2ivOIey.mjs";
|
|
4
|
+
import { h as assertCodexThreadResumeResponse, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-DIC12QQ_.mjs";
|
|
5
|
+
import { f as unsubscribeCodexThreadBestEffort, i as assertCodexThreadResumeSubscription, r as CodexAppServerUnsafeSubscriptionError } from "./attempt-client-cleanup-hUrW3fmJ.mjs";
|
|
6
6
|
import { sanitizeTerminalText } from "openclaw/plugin-sdk/text-chunking";
|
|
7
7
|
//#region extensions/codex/src/app-server/thread-resume.ts
|
|
8
8
|
/** Owns Codex thread/resume subscription safety. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
2
|
import { n as waitForPromiseOrAbort, t as abortReason } from "./timeout-CXOfNoaX.mjs";
|
|
3
|
-
import { x as readCodexTurnCompletedNotification } from "./client-
|
|
3
|
+
import { x as readCodexTurnCompletedNotification } from "./client-DIC12QQ_.mjs";
|
|
4
4
|
import { normalizeOptionalString, readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { AsyncResource } from "node:async_hooks";
|
|
6
6
|
import { createDeferred } from "openclaw/plugin-sdk/extension-shared";
|
package/dist/.setup/{upstream-session-fork-BQvofnk7.mjs → upstream-session-fork-BdvuVrvg.mjs}
RENAMED
|
@@ -9,20 +9,20 @@ import { r as projectCodexUserItemText } from "./transcript-history-projection-B
|
|
|
9
9
|
import { n as codexUpstreamBaseline, t as codexLastTerminalTurnId } from "./session-upstream-marker-D15C9NHp.mjs";
|
|
10
10
|
import { r as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-BW8rd98k.mjs";
|
|
11
11
|
import { n as readCodexSessionMeta } from "./session-catalog-provenance-CmsOE5mh.mjs";
|
|
12
|
-
import "./request-
|
|
12
|
+
import "./request-Ddy7nOme.mjs";
|
|
13
13
|
import { r as resolveOpenClawExecPolicyForCodexAppServer } from "./config-0Gxk3_eq.mjs";
|
|
14
14
|
import { r as resolveCodexSupervisionAppServerRuntimeOptions } from "./config-runtime-cUYrqu_a.mjs";
|
|
15
15
|
import { a as fingerprintCodexMirrorSourceMessage, c as readCodexMirrorSourceFingerprint } from "./transcript-mirror-attestation-YSegaktH.mjs";
|
|
16
|
-
import { P as claimCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, f as readCodexAppServerClientDesktopGenerationFingerprint } from "./shared-client-
|
|
17
|
-
import { m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-
|
|
18
|
-
import { A as buildCodexNativeHookRelayId, Ct as mergeCodexThreadConfigs, D as assertCodexNativeHookRelayAllowed, H as parseCodexNativeToolCatalog, L as checkCodexThreadAppAvailability, N as resolveCodexNativeHookRelayEvents, O as buildCodexNativeHookRelayConfig, Q as fingerprintUserMcpServersConfigPatch, Tt as shouldBuildCodexPluginThreadConfig, U as applyCodexNativeSkillIsolation, W as resolveCodexNativeSkillIsolation, Z as fingerprintJsonObject, a as buildCodexThreadConfiguration, g as buildDeveloperInstructions, gt as buildCodexPluginThreadConfig, m as resolveCodexWebSearchPlan, q as codexDynamicToolsFingerprint } from "./thread-requests-
|
|
16
|
+
import { P as claimCodexAppServerLiveThread, R as hasCodexAppServerLiveThread, f as readCodexAppServerClientDesktopGenerationFingerprint } from "./shared-client-D2ivOIey.mjs";
|
|
17
|
+
import { m as assertCodexThreadForkResponse, p as assertCodexThreadAcceptsDirectInput, s as isCodexAppServerPrewriteRequestCancellationError } from "./client-DIC12QQ_.mjs";
|
|
18
|
+
import { A as buildCodexNativeHookRelayId, Ct as mergeCodexThreadConfigs, D as assertCodexNativeHookRelayAllowed, H as parseCodexNativeToolCatalog, L as checkCodexThreadAppAvailability, N as resolveCodexNativeHookRelayEvents, O as buildCodexNativeHookRelayConfig, Q as fingerprintUserMcpServersConfigPatch, Tt as shouldBuildCodexPluginThreadConfig, U as applyCodexNativeSkillIsolation, W as resolveCodexNativeSkillIsolation, Z as fingerprintJsonObject, a as buildCodexThreadConfiguration, g as buildDeveloperInstructions, gt as buildCodexPluginThreadConfig, m as resolveCodexWebSearchPlan, q as codexDynamicToolsFingerprint } from "./thread-requests-CKEQxo_5.mjs";
|
|
19
19
|
import "./session-binding-Ce7BqiPN.mjs";
|
|
20
|
-
import { n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy } from "./thread-policy-
|
|
21
|
-
import "./thread-ownership-
|
|
20
|
+
import { n as CodexThreadPolicyHandoffError, o as refreshCodexThreadPolicy } from "./thread-policy-Brc0nbdS.mjs";
|
|
21
|
+
import "./thread-ownership-GlDZf8J7.mjs";
|
|
22
22
|
import { n as resolveCodexNativeExecutionPolicy } from "./native-execution-policy-ClzpdG3D.mjs";
|
|
23
|
-
import { l as isCodexDynamicToolExcluded } from "./shell-dynamic-tools-
|
|
24
|
-
import { c as prepareCodexWorkspaceDeveloperInstructions } from "./attempt-workspace-context-
|
|
25
|
-
import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-
|
|
23
|
+
import { l as isCodexDynamicToolExcluded } from "./shell-dynamic-tools-CkHxyESN.mjs";
|
|
24
|
+
import { c as prepareCodexWorkspaceDeveloperInstructions } from "./attempt-workspace-context-BRvpkEo_.mjs";
|
|
25
|
+
import { n as resolveCodexProviderWebSearchSupportForClient } from "./provider-capabilities-NZytgEzO.mjs";
|
|
26
26
|
import { n as prepareCodexSessionInitialization } from "./session-initialization-D6dtFQkE.mjs";
|
|
27
27
|
import { createImportedCodexSession } from "./session-history-import-NWKPa4ZO.mjs";
|
|
28
28
|
import { isRecord, normalizeOptionalString, readNonBlankString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as buildCodexAppServerUsageSnapshot } from "./rate-limits-CMPy24F5.mjs";
|
|
2
|
-
import { t as readCodexAppServerUsage } from "./request-
|
|
2
|
+
import { t as readCodexAppServerUsage } from "./request-Ddy7nOme.mjs";
|
|
3
3
|
import "./config-0Gxk3_eq.mjs";
|
|
4
4
|
import { n as resolveCodexAppServerRuntimeOptions } from "./config-runtime-cUYrqu_a.mjs";
|
|
5
5
|
import { CODEX_APP_SERVER_AUTH_MARKER } from "openclaw/plugin-sdk/agent-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as isJsonObject } from "./protocol-CANUwXJ3.mjs";
|
|
2
2
|
import { a as shouldRefreshCodexRateLimitsForUsageLimitMessage, i as resolveCodexUsageLimitResetAtMs, n as formatCodexUsageLimitErrorMessage } from "./rate-limits-CMPy24F5.mjs";
|
|
3
3
|
import { t as CODEX_CONTROL_METHODS } from "./capabilities-kQntafj_.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { Q as rememberCodexRateLimitsRead, X as readCodexRateLimitsRevision, Z as readRecentCodexRateLimits } from "./shared-client-D2ivOIey.mjs";
|
|
5
5
|
import { readStringField } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { embeddedAgentLog, formatErrorMessage } from "openclaw/plugin-sdk/agent-harness-runtime";
|
|
7
7
|
import { markAuthProfileBlockedUntil } from "openclaw/plugin-sdk/agent-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as buildCodexNativeWebSearchThreadConfig } from "./thread-requests-
|
|
2
|
-
import { l as projectCodexWebSearchItem } from "./native-subagent-monitor-
|
|
3
|
-
import { runBoundedCodexAppServerTurn } from "./bounded-turn-
|
|
1
|
+
import { p as buildCodexNativeWebSearchThreadConfig } from "./thread-requests-CKEQxo_5.mjs";
|
|
2
|
+
import { l as projectCodexWebSearchItem } from "./native-subagent-monitor-CkpiZfm0.mjs";
|
|
3
|
+
import { runBoundedCodexAppServerTurn } from "./bounded-turn-DVI5FRqE.mjs";
|
|
4
4
|
import { readStringParam, resolveSearchTimeoutSeconds, wrapWebContent } from "openclaw/plugin-sdk/provider-web-search";
|
|
5
5
|
//#region extensions/codex/src/web-search-provider.runtime.ts
|
|
6
6
|
async function executeCodexWebSearchProviderTool(ctx, args, executionContext, options) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createCodexCatalogDecoder } from "./.setup/client-catalog-response-
|
|
1
|
+
import { t as createCodexCatalogDecoder } from "./.setup/client-catalog-response-Bhc23x3Q.mjs";
|
|
2
2
|
import { serveWorkerTasks } from "openclaw/plugin-sdk/worker-task-server";
|
|
3
3
|
//#region extensions/codex/catalog-page.worker.ts
|
|
4
4
|
const decode = createCodexCatalogDecoder();
|
package/dist/harness.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CODEX_NATIVE_TOOL_REQUIREMENTS } from "./native-tool-policy.js";
|
|
2
2
|
import { n as readCodexRuntimeModelId } from "./.setup/model-runtime-BdqzOMkU.mjs";
|
|
3
3
|
import { m as sessionBindingIdentity } from "./.setup/session-binding-record-BZB8RgcF.mjs";
|
|
4
|
-
import { t as codexBuildSymbol } from "./.setup/build-state-
|
|
4
|
+
import { t as codexBuildSymbol } from "./.setup/build-state-DP9Coy_6.mjs";
|
|
5
5
|
import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime";
|
|
6
6
|
import { asOptionalRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
//#region extensions/codex/harness.ts
|
|
@@ -111,7 +111,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
111
111
|
executionEnvironment: "host-only",
|
|
112
112
|
upstreamKinds: ["codex-app-server"],
|
|
113
113
|
fork: async (params) => {
|
|
114
|
-
const { forkCodexUpstreamSession } = await import("./.setup/upstream-session-fork-
|
|
114
|
+
const { forkCodexUpstreamSession } = await import("./.setup/upstream-session-fork-BdvuVrvg.mjs");
|
|
115
115
|
return await forkCodexUpstreamSession(params, {
|
|
116
116
|
bindingStore: options.bindingStore,
|
|
117
117
|
controlFactory: sessionCatalogControlFactory,
|
|
@@ -133,11 +133,11 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
133
133
|
return validateCodexAppServerRuntimeArtifact(binding, void 0, resolveCodexAppServerRuntimeOptions({ pluginConfig: resolveAttemptPluginConfig(options.resolveConfig?.()) }).start);
|
|
134
134
|
} },
|
|
135
135
|
fetchUsageSnapshot: async (ctx) => {
|
|
136
|
-
const { fetchCodexAppServerUsageSnapshot } = await import("./.setup/usage-
|
|
136
|
+
const { fetchCodexAppServerUsageSnapshot } = await import("./.setup/usage-Drw_79Hn.mjs");
|
|
137
137
|
return await fetchCodexAppServerUsageSnapshot(ctx, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
|
|
138
138
|
},
|
|
139
139
|
loadModelCatalog: async (params) => {
|
|
140
|
-
const { createCodexAppServerModelCatalog } = await import("./.setup/model-catalog
|
|
140
|
+
const { createCodexAppServerModelCatalog } = await import("./.setup/model-catalog-CQXEzyxr.mjs");
|
|
141
141
|
if (disposed) return { entries: [] };
|
|
142
142
|
modelCatalog ??= createCodexAppServerModelCatalog(harnessRuntimeId);
|
|
143
143
|
return { entries: await modelCatalog.load(params, resolveAttemptPluginConfig(params.config)) };
|
|
@@ -147,7 +147,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
147
147
|
return asOptionalRecord(asOptionalRecord(resolveAttemptPluginConfig(config))?.appServer)?.enableUltrafast === false ? serviceTiers.filter((tier) => tier !== "ultrafast") : serviceTiers;
|
|
148
148
|
},
|
|
149
149
|
acquireMcpAppRuntime: async (params) => {
|
|
150
|
-
const { acquireCodexMcpAppRuntime } = await import("./.setup/effective-mcp-catalog-
|
|
150
|
+
const { acquireCodexMcpAppRuntime } = await import("./.setup/effective-mcp-catalog-DHEOnIwA.mjs");
|
|
151
151
|
if (disposed) return;
|
|
152
152
|
params.assertCurrent();
|
|
153
153
|
return await acquireCodexMcpAppRuntime(params, {
|
|
@@ -156,7 +156,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
156
156
|
});
|
|
157
157
|
},
|
|
158
158
|
loadMcpToolCatalog: async (params) => {
|
|
159
|
-
const { loadCodexEffectiveMcpCatalog } = await import("./.setup/effective-mcp-catalog-
|
|
159
|
+
const { loadCodexEffectiveMcpCatalog } = await import("./.setup/effective-mcp-catalog-DHEOnIwA.mjs");
|
|
160
160
|
return await loadCodexEffectiveMcpCatalog(params, { bindingStore: options.bindingStore });
|
|
161
161
|
},
|
|
162
162
|
supports: (ctx) => {
|
|
@@ -199,7 +199,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
199
199
|
};
|
|
200
200
|
},
|
|
201
201
|
runAttempt: async (params) => {
|
|
202
|
-
const { runCodexAppServerAttempt } = await import("./.setup/run-attempt-
|
|
202
|
+
const { runCodexAppServerAttempt } = await import("./.setup/run-attempt-BqC2g0aO.mjs");
|
|
203
203
|
const { planCodexCyberEscalation, readCodexCyberAttemptVerdict, recordCodexCyberTargetUnavailable, reserveCodexCyberProbe, resolveCodexCyberFailoverConfig } = await import("./.setup/cyber-failover-Bb1J6hS1.mjs");
|
|
204
204
|
const { emitCodexCyberNotice } = await import("./.setup/cyber-failover-notice-XR03ef31.mjs");
|
|
205
205
|
const pluginConfig = resolveAttemptPluginConfig(params.config);
|
|
@@ -265,7 +265,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
265
265
|
const { runHostPreparedIsolatedCompletion } = await import("openclaw/plugin-sdk/simple-completion-runtime");
|
|
266
266
|
return runHostPreparedIsolatedCompletion(params);
|
|
267
267
|
}
|
|
268
|
-
const { runCodexIsolatedCompletion } = await import("./.setup/isolated-completion-
|
|
268
|
+
const { runCodexIsolatedCompletion } = await import("./.setup/isolated-completion-Dab4vUwO.mjs");
|
|
269
269
|
return runCodexIsolatedCompletion(params, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
|
|
270
270
|
},
|
|
271
271
|
runIsolatedCompletion: async (params) => {
|
|
@@ -281,11 +281,11 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
281
281
|
});
|
|
282
282
|
},
|
|
283
283
|
finalizeSettledTurn: async (params) => {
|
|
284
|
-
const { runCodexSettledTurnFinalization } = await import("./.setup/settled-turn-finalizer-
|
|
284
|
+
const { runCodexSettledTurnFinalization } = await import("./.setup/settled-turn-finalizer-CEyM5wo_.mjs");
|
|
285
285
|
return runCodexSettledTurnFinalization(params, { pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig });
|
|
286
286
|
},
|
|
287
287
|
runSideQuestion: async (params) => {
|
|
288
|
-
const { runCodexAppServerSideQuestion } = await import("./.setup/side-question-
|
|
288
|
+
const { runCodexAppServerSideQuestion } = await import("./.setup/side-question-DiQ2HCos.mjs");
|
|
289
289
|
return runCodexAppServerSideQuestion(params, {
|
|
290
290
|
bindingStore: options.bindingStore,
|
|
291
291
|
pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig,
|
|
@@ -296,25 +296,25 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
296
296
|
},
|
|
297
297
|
compact: async (params) => {
|
|
298
298
|
const admittedParams = requireCodexCompactionCapabilities(params);
|
|
299
|
-
const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-
|
|
299
|
+
const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-DNLigO9M.mjs");
|
|
300
300
|
return maybeCompactCodexAppServerSession(admittedParams, {
|
|
301
301
|
bindingStore: options.bindingStore,
|
|
302
302
|
pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig
|
|
303
303
|
});
|
|
304
304
|
},
|
|
305
305
|
withSessionDeletion: async (params, run) => {
|
|
306
|
-
const { withCodexAppServerSessionDeletion } = await import("./.setup/session-retirement-
|
|
306
|
+
const { withCodexAppServerSessionDeletion } = await import("./.setup/session-retirement-D8akYv0Q.mjs");
|
|
307
307
|
params.assertCurrent();
|
|
308
308
|
return withCodexAppServerSessionDeletion(options.bindingStore, params, run);
|
|
309
309
|
},
|
|
310
310
|
withSessionContextReset: async (params, run) => {
|
|
311
|
-
const { withCodexAppServerSessionContextReset } = await import("./.setup/session-retirement-
|
|
311
|
+
const { withCodexAppServerSessionContextReset } = await import("./.setup/session-retirement-D8akYv0Q.mjs");
|
|
312
312
|
params.assertCurrent();
|
|
313
313
|
return withCodexAppServerSessionContextReset(options.bindingStore, params, run);
|
|
314
314
|
},
|
|
315
315
|
reset: async (params) => {
|
|
316
316
|
if (params.sessionId && params.reason !== "deleted") {
|
|
317
|
-
const [{ reclaimCurrentCodexSessionGeneration }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./.setup/session-binding-Ce7BqiPN.mjs").then((n) => n.i), import("./.setup/session-retirement-
|
|
317
|
+
const [{ reclaimCurrentCodexSessionGeneration }, { retireCodexAppServerSessionGeneration }] = await Promise.all([import("./.setup/session-binding-Ce7BqiPN.mjs").then((n) => n.i), import("./.setup/session-retirement-D8akYv0Q.mjs")]);
|
|
318
318
|
const identity = sessionBindingIdentity({
|
|
319
319
|
agentId: params.agentId,
|
|
320
320
|
sessionId: params.sessionId,
|
|
@@ -347,7 +347,7 @@ function createCodexAppServerAgentHarness(options) {
|
|
|
347
347
|
function createCodexAppServerNativeCompaction(options) {
|
|
348
348
|
return async (params) => {
|
|
349
349
|
const admittedParams = requireCodexCompactionCapabilities(params);
|
|
350
|
-
const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-
|
|
350
|
+
const { maybeCompactCodexAppServerSession } = await import("./.setup/compact-DNLigO9M.mjs");
|
|
351
351
|
return maybeCompactCodexAppServerSession(admittedParams, {
|
|
352
352
|
bindingStore: options.bindingStore,
|
|
353
353
|
pluginConfig: options.resolvePluginConfig?.() ?? options.pluginConfig,
|