@openclaw/codex 2026.7.1-beta.4 → 2026.7.1-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{app-server-policy-BUk0GLMy.js → app-server-policy-C968Kgin.js} +1 -1
- package/dist/{command-handlers-UVniG5Hl.js → command-handlers-Dv-pzAmg.js} +6 -6
- package/dist/{command-rpc-BjgEPh19.js → command-rpc-eLM_mtC7.js} +4 -4
- package/dist/{compact-CZzbcygx.js → compact-4mVBriKT.js} +1 -1
- package/dist/{computer-use-DDeySrnb.js → computer-use-Bmaz333N.js} +1 -1
- package/dist/doctor-contract-api.js +201 -61
- package/dist/harness.js +5 -5
- package/dist/index.js +13 -13
- package/dist/{media-understanding-provider-DgqRvU2_.js → media-understanding-provider-BHOu9-Gg.js} +1 -1
- package/dist/media-understanding-provider.js +1 -1
- package/dist/{plugin-app-cache-key-o-AHbdaf.js → plugin-app-cache-key-BrhVdeEf.js} +1 -1
- package/dist/{provider-capabilities-gTCwjfmh.js → provider-capabilities-CDnHbmUZ.js} +3 -3
- package/dist/{provider-cc_62eQE.js → provider-zjPfx5Fs.js} +36 -9
- package/dist/provider.js +1 -1
- package/dist/{run-attempt-8SPLiDlT.js → run-attempt-FUyOjGCV.js} +86 -45
- package/dist/{session-binding-Dc03iwRF.js → session-binding-C1ZXdP-x.js} +41 -9
- package/dist/{side-question-DkjXvYv7.js → side-question-N4OaDer2.js} +5 -5
- package/dist/{thread-lifecycle-BskXnNP-.js → thread-lifecycle-qWE88Dn2.js} +64 -13
- package/dist/{web-search-provider.runtime-B5F42P7x.js → web-search-provider.runtime-BSlriav6.js} +2 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +4 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as isJsonObject } from "./protocol-2POPqAY4.js";
|
|
2
2
|
import { c as isTrustedCodexModelBackedOpenAIProvider, u as readCodexPluginConfig } from "./config-CYEDnLJ2.js";
|
|
3
3
|
import { c as readCodexTurn } from "./protocol-validators-dZQ-UTOa.js";
|
|
4
|
-
import { C as
|
|
5
|
-
import { c as formatCodexUsageLimitErrorMessage } from "./provider-
|
|
4
|
+
import { C as filterCodexDynamicTools, S as sanitizeInlineImageDataUrl, T as normalizeCodexDynamicToolName, b as invalidInlineImageText, v as resolveCodexWebSearchPlan, w as isForcedPrivateQaCodexRuntime, x as sanitizeCodexHistoryImagePayloads } from "./thread-lifecycle-qWE88Dn2.js";
|
|
5
|
+
import { c as formatCodexUsageLimitErrorMessage } from "./provider-zjPfx5Fs.js";
|
|
6
6
|
import { o as releaseLeasedSharedCodexAppServerClient } from "./shared-client-4ICy3U6d.js";
|
|
7
|
-
import { a as formatCodexDisplayText } from "./app-server-policy-
|
|
7
|
+
import { a as formatCodexDisplayText } from "./app-server-policy-C968Kgin.js";
|
|
8
8
|
import { i as resolveCodexNativeExecutionPolicy } from "./sandbox-guard-DA2TQfZW.js";
|
|
9
9
|
import { n as readCodexNotificationThreadId, r as readCodexNotificationTurnId } from "./notification-correlation-Bo7KB3ks.js";
|
|
10
10
|
import fs from "node:fs/promises";
|
|
@@ -412,12 +412,28 @@ const CODEX_DEFAULT_MODEL_REF = `${CODEX_PROVIDER_ID}/${FALLBACK_CODEX_MODELS[0]
|
|
|
412
412
|
const codexCatalogLog = createSubsystemLogger("codex/catalog");
|
|
413
413
|
const CODEX_REASONING_EFFORTS = [
|
|
414
414
|
"minimal",
|
|
415
|
+
"low",
|
|
416
|
+
"medium",
|
|
417
|
+
"high",
|
|
418
|
+
"xhigh",
|
|
419
|
+
"max",
|
|
420
|
+
"ultra"
|
|
421
|
+
];
|
|
422
|
+
const GPT_56_MAX_REASONING_EFFORTS = [
|
|
415
423
|
"low",
|
|
416
424
|
"medium",
|
|
417
425
|
"high",
|
|
418
426
|
"xhigh",
|
|
419
427
|
"max"
|
|
420
428
|
];
|
|
429
|
+
const GPT_56_ULTRA_REASONING_EFFORTS = [...GPT_56_MAX_REASONING_EFFORTS, "ultra"];
|
|
430
|
+
const GPT_56_ULTRA_MODEL_IDS = /* @__PURE__ */ new Set(["gpt-5.6-sol", "gpt-5.6-terra"]);
|
|
431
|
+
const GPT_56_MAX_MODEL_IDS = /* @__PURE__ */ new Set([...GPT_56_ULTRA_MODEL_IDS, "gpt-5.6-luna"]);
|
|
432
|
+
const GPT_56_DEFAULT_REASONING_EFFORTS = /* @__PURE__ */ new Map([
|
|
433
|
+
["gpt-5.6-sol", "low"],
|
|
434
|
+
["gpt-5.6-terra", "medium"],
|
|
435
|
+
["gpt-5.6-luna", "medium"]
|
|
436
|
+
]);
|
|
421
437
|
const GPT_5_PRO_REASONING_EFFORTS = [
|
|
422
438
|
"medium",
|
|
423
439
|
"high",
|
|
@@ -484,10 +500,17 @@ function buildCodexProvider(options = {}) {
|
|
|
484
500
|
startOptions: appServer.start
|
|
485
501
|
}));
|
|
486
502
|
},
|
|
487
|
-
resolveThinkingProfile: ({ modelId, compat }) =>
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
503
|
+
resolveThinkingProfile: ({ modelId, compat }) => {
|
|
504
|
+
const efforts = resolveCodexThinkingEfforts({
|
|
505
|
+
modelId,
|
|
506
|
+
supportedReasoningEfforts: readCodexSupportedReasoningEfforts(compat)
|
|
507
|
+
});
|
|
508
|
+
const defaultLevel = GPT_56_DEFAULT_REASONING_EFFORTS.get(modelId.trim().toLowerCase());
|
|
509
|
+
return {
|
|
510
|
+
levels: [{ id: "off" }, ...efforts.map((id) => ({ id }))],
|
|
511
|
+
...defaultLevel && efforts.includes(defaultLevel) ? { defaultLevel } : {}
|
|
512
|
+
};
|
|
513
|
+
},
|
|
491
514
|
resolveSystemPromptContribution: ({ config, modelId }) => resolveCodexSystemPromptContribution({
|
|
492
515
|
config,
|
|
493
516
|
modelId
|
|
@@ -587,7 +610,8 @@ function readCodexSupportedReasoningEfforts(compat) {
|
|
|
587
610
|
if (!compat || typeof compat !== "object" || Array.isArray(compat)) return;
|
|
588
611
|
const efforts = compat.supportedReasoningEfforts;
|
|
589
612
|
if (!Array.isArray(efforts)) return;
|
|
590
|
-
|
|
613
|
+
const strings = efforts.filter((effort) => typeof effort === "string");
|
|
614
|
+
return strings.some((effort) => effort.trim().toLowerCase() === "none") ? void 0 : strings;
|
|
591
615
|
}
|
|
592
616
|
function resolveCodexThinkingEfforts(params) {
|
|
593
617
|
if (params.supportedReasoningEfforts) return normalizeCodexReasoningEfforts(params.supportedReasoningEfforts);
|
|
@@ -606,23 +630,26 @@ function resolveCodexThinkingEfforts(params) {
|
|
|
606
630
|
function resolveCodexSupportedReasoningEffort(params) {
|
|
607
631
|
const supported = normalizeCodexReasoningEfforts(params.supportedReasoningEfforts);
|
|
608
632
|
if (supported.includes(params.requested)) return params.requested;
|
|
633
|
+
const fallbackEfforts = params.requested === "ultra" ? supported : supported.filter((effort) => effort !== "ultra");
|
|
609
634
|
const requestedRank = CODEX_REASONING_EFFORTS.indexOf(params.requested);
|
|
610
|
-
return
|
|
635
|
+
return fallbackEfforts.find((effort) => CODEX_REASONING_EFFORTS.indexOf(effort) >= requestedRank) ?? fallbackEfforts.at(-1);
|
|
611
636
|
}
|
|
612
637
|
/** Return the known effort contract when app-server model metadata is unavailable. */
|
|
613
638
|
function resolveCodexFallbackReasoningEfforts(modelId) {
|
|
614
639
|
const normalized = modelId.trim().toLowerCase();
|
|
615
|
-
|
|
640
|
+
if (GPT_56_ULTRA_MODEL_IDS.has(normalized)) return GPT_56_ULTRA_REASONING_EFFORTS;
|
|
641
|
+
if (normalized === "gpt-5.6-luna") return GPT_56_MAX_REASONING_EFFORTS;
|
|
642
|
+
if (normalized === "gpt-5.5-pro" || normalized === "gpt-5.4-pro") return GPT_5_PRO_REASONING_EFFORTS;
|
|
616
643
|
}
|
|
617
644
|
/** Return whether the model uses the modern Codex reasoning profile. */
|
|
618
645
|
function isModernCodexModel(modelId) {
|
|
619
646
|
const lower = modelId.trim().toLowerCase();
|
|
620
|
-
return
|
|
647
|
+
return GPT_56_MAX_MODEL_IDS.has(lower) || lower === "gpt-5.5" || lower === "gpt-5.5-pro" || lower === "gpt-5.4" || lower === "gpt-5.4-pro" || lower === "gpt-5.4-mini" || lower === "gpt-5.3-codex-spark";
|
|
621
648
|
}
|
|
622
649
|
/** Return whether Codex accepts the preview GPT-5.6 `max` reasoning effort. */
|
|
623
650
|
function isMaxReasoningCodexModel(modelId) {
|
|
624
651
|
const lower = modelId.trim().toLowerCase();
|
|
625
|
-
return
|
|
652
|
+
return GPT_56_MAX_MODEL_IDS.has(lower);
|
|
626
653
|
}
|
|
627
654
|
//#endregion
|
|
628
655
|
export { readCodexSupportedReasoningEfforts as a, formatCodexUsageLimitErrorMessage as c, shouldRefreshCodexRateLimitsForUsageLimitMessage as d, summarizeCodexAccountRateLimits as f, isModernCodexModel as i, hasCodexRateLimitSnapshots as l, summarizeCodexRateLimits as m, buildCodexProviderCatalog as n, resolveCodexFallbackReasoningEfforts as o, summarizeCodexAccountUsage as p, isMaxReasoningCodexModel as r, resolveCodexSupportedReasoningEffort as s, buildCodexProvider as t, resolveCodexUsageLimitResetAtMs as u };
|
package/dist/provider.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as readCodexSupportedReasoningEfforts, i as isModernCodexModel, n as buildCodexProviderCatalog, o as resolveCodexFallbackReasoningEfforts, r as isMaxReasoningCodexModel, s as resolveCodexSupportedReasoningEffort, t as buildCodexProvider } from "./provider-
|
|
1
|
+
import { a as readCodexSupportedReasoningEfforts, i as isModernCodexModel, n as buildCodexProviderCatalog, o as resolveCodexFallbackReasoningEfforts, r as isMaxReasoningCodexModel, s as resolveCodexSupportedReasoningEffort, t as buildCodexProvider } from "./provider-zjPfx5Fs.js";
|
|
2
2
|
export { buildCodexProvider, buildCodexProviderCatalog, isMaxReasoningCodexModel, isModernCodexModel, readCodexSupportedReasoningEfforts, resolveCodexFallbackReasoningEfforts, resolveCodexSupportedReasoningEffort };
|
|
@@ -2,15 +2,15 @@ import { n as flattenCodexDynamicToolFunctions, r as isJsonObject } from "./prot
|
|
|
2
2
|
import { S as updateActiveTurnItemIds, _ as readCodexNotificationItem, a as isCodexTurnAbortMarkerNotification, b as shouldDisarmAssistantCompletionIdleWatch, c as isPendingOpenClawDynamicToolCompletionNotification, d as isRawReasoningCompletionNotification, f as isRawToolOutputCompletionNotification, g as isTerminalTurnStatus, h as isRetryableErrorNotification, i as isAssistantCompletionReleaseNotification, l as isRawAssistantProgressNotification, m as isReasoningProgressNotification, n as describeNotificationActivity, o as isFileChangePatchUpdatedNotification, p as isReasoningItemCompletionNotification, r as isAssistantCommentaryCompletionNotification, s as isNativeToolProgressNotification, t as codexExecutionToolName, u as isRawFunctionToolOutputCompletionNotification, v as readNotificationItemId, x as updateActiveCompletionBlockerItemIds, y as readRawResponseToolCallId } from "./attempt-notifications-BGsEIIDI.js";
|
|
3
3
|
import { _ as shouldAutoApproveCodexAppServerApprovals, a as isCodexAppServerApprovalPolicyAllowedByRequirements, d as resolveCodexAppServerRuntimeOptions, g as resolveOpenClawExecPolicyForCodexAppServer, h as resolveCodexPluginsPolicy, m as resolveCodexModelBackedReviewerPolicyContext, p as resolveCodexComputerUseConfig, s as isCodexSandboxExecServerEnabled, u as readCodexPluginConfig, v as withMcpElicitationsApprovalPolicy } from "./config-CYEDnLJ2.js";
|
|
4
4
|
import { a as readCodexDynamicToolCallParams, i as assertCodexTurnStartResponse } from "./protocol-validators-dZQ-UTOa.js";
|
|
5
|
-
import { A as
|
|
6
|
-
import { c as formatCodexUsageLimitErrorMessage, d as shouldRefreshCodexRateLimitsForUsageLimitMessage, u as resolveCodexUsageLimitResetAtMs } from "./provider-
|
|
5
|
+
import { A as resolveCodexContextEngineProjectionMaxChars, B as buildCodexPluginThreadConfig, D as resolveCodexDynamicToolsLoadingForRuntime, F as closeCodexStartupClientBestEffort, H as mergeCodexThreadConfigs, I as interruptCodexTurnBestEffort, L as retireCodexAppServerClientAfterTimedOutTurn, M as CODEX_APP_SERVER_INTERRUPT_TIMEOUT_MS, N as CODEX_APP_SERVER_UNSUBSCRIBE_TIMEOUT_MS, O as fitCodexProjectedContextForTurnStart, P as CodexAppServerUnsafeSubscriptionError, R as unsubscribeCodexThreadBestEffort, U as shouldBuildCodexPluginThreadConfig, V as buildCodexPluginThreadConfigInputFingerprint, a as buildDeveloperInstructions, c as codexDynamicToolsFingerprint, g as startOrResumeThread, i as buildContextEngineBinding, j as resolveCodexContextEngineProjectionReserveTokens, k as projectContextEngineAssemblyForCodex, l as codexLegacyDynamicToolsFingerprint, n as areCodexDynamicToolFingerprintsCompatible, o as buildTurnCollaborationMode, p as resolveCodexAppServerThreadModelSelection, q as defaultCodexAppInventoryCache, s as buildTurnStartParams, u as isContextEngineBindingCompatible, v as resolveCodexWebSearchPlan, y as isCodexAppServerProfilerEnabled } from "./thread-lifecycle-qWE88Dn2.js";
|
|
6
|
+
import { c as formatCodexUsageLimitErrorMessage, d as shouldRefreshCodexRateLimitsForUsageLimitMessage, u as resolveCodexUsageLimitResetAtMs } from "./provider-zjPfx5Fs.js";
|
|
7
7
|
import { _ as resolveCodexAppServerAuthAccountCacheKey, a as getLeasedSharedCodexAppServerClient, b as resolveCodexAppServerFallbackApiKeyCacheKey, d as isCodexAppServerApprovalRequest, f as isCodexAppServerConnectionClosedError, g as rememberCodexRateLimitsRead, h as readRecentCodexRateLimits, m as readCodexRateLimitsRevision, o as releaseLeasedSharedCodexAppServerClient, p as ensureCodexAppServerClientRuntime, s as retireSharedCodexAppServerClientIfCurrent, t as clearSharedCodexAppServerClientIfCurrent, u as CodexAppServerRpcError, v as resolveCodexAppServerAuthProfileId, x as resolveCodexAppServerHomeDir, y as resolveCodexAppServerAuthProfileIdForAgent } from "./shared-client-4ICy3U6d.js";
|
|
8
|
-
import {
|
|
9
|
-
import { n as buildCodexPluginAppCacheKey, r as CODEX_CONTROL_METHODS, t as buildCodexAppServerRuntimeFingerprint } from "./plugin-app-cache-key-
|
|
10
|
-
import { a as formatCodexDisplayText, n as resolveCodexAppServerForOpenClawToolPolicy, t as resolveCodexAppServerForModelProvider } from "./app-server-policy-
|
|
8
|
+
import { i as isCodexAppServerNativeAuthProfile, s as sessionBindingIdentity } from "./session-binding-C1ZXdP-x.js";
|
|
9
|
+
import { n as buildCodexPluginAppCacheKey, r as CODEX_CONTROL_METHODS, t as buildCodexAppServerRuntimeFingerprint } from "./plugin-app-cache-key-BrhVdeEf.js";
|
|
10
|
+
import { a as formatCodexDisplayText, n as resolveCodexAppServerForOpenClawToolPolicy, t as resolveCodexAppServerForModelProvider } from "./app-server-policy-C968Kgin.js";
|
|
11
11
|
import { n as readCodexNotificationThreadId, r as readCodexNotificationTurnId, t as isCodexNotificationForTurn } from "./notification-correlation-Bo7KB3ks.js";
|
|
12
|
-
import { $ as isDynamicToolTerminalDiagnosticEvent, A as createCodexDynamicToolBuildStageTracker, B as shouldWarnCodexDynamicToolBuildStageSummary, C as resolveCodexLocalRuntimeAttribution, D as emitDynamicToolStartedDiagnostic, E as emitDynamicToolErrorDiagnostic, F as resolveCodexExternalSandboxPolicyForOpenClawSandbox, G as resolveCodexPostToolRawAssistantCompletionIdleTimeoutMs, H as readCodexMirroredSessionHistoryMessages, I as resolveCodexMessageToolProvider, J as resolveCodexTurnCompletionIdleTimeoutMs, K as resolveCodexStartupTimeoutMs, L as resolveCodexSandboxEnvironmentSelection, M as formatCodexDynamicToolBuildStageSummary, N as resolveCodexAppServerExecutionCwd, O as emitDynamicToolTerminalDiagnostic, P as resolveCodexAppServerHookChannelId, Q as hasPendingDynamicToolTerminalDiagnostic, R as shouldEnableCodexAppServerNativeToolSurface, S as scheduleCodexNativeHookRelayUnregister, T as createCodexDynamicToolBridge, U as handleCodexAppServerApprovalRequest, W as CODEX_POST_REASONING_REPLY_IDLE_TIMEOUT_MS, X as withCodexStartupTimeout, Y as resolveCodexTurnTerminalIdleTimeoutMs, Z as handleDynamicToolCallWithTimeout, _ as buildCodexNativeHookRelayDisabledConfig, a as shouldEmitTranscriptToolProgress, at as toCodexDynamicToolProgressResponse, b as resolveCodexNativeHookRelayEvents, c as mirrorPromptAtTurnStartBestEffort, d as resolveCodexToolProgressDetailMode, et as isMatchingDynamicToolTerminalDiagnostic, f as sanitizeCodexToolArguments, g as buildCodexNativeHookRelayConfig, h as CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS, it as shouldReleaseTurnAfterTerminalDynamicTool, j as disableCodexPluginThreadConfig, k as buildDynamicTools, l as mirrorTranscriptBestEffort, nt as resolveTerminalDynamicToolBatchAction, o as buildCodexUserPromptMessage, ot as toCodexDynamicToolProtocolResponse, p as sanitizeCodexToolResponse, q as resolveCodexTurnAssistantCompletionIdleTimeoutMs, r as CodexAppServerEventProjector, rt as shouldBlockTerminalReleaseForNonTerminalDynamicToolResult, s as createCodexAppServerUserMessagePersistenceNotifier, st as resolveCodexToolAbortTerminalReason, t as resolveCodexProviderWebSearchSupport, tt as resolveDynamicToolCallTimeoutMs, u as inferCodexDynamicToolMeta, v as createCodexNativeHookRelay, w as handleCodexAppServerElicitationRequest, x as resolveCodexNativeHookRelayTtlMs, y as emitCodexNativePreToolUseFailureDiagnostic, z as shouldRequireCodexSandboxExecServerEnvironment } from "./provider-capabilities-
|
|
13
|
-
import { t as ensureCodexComputerUse } from "./computer-use-
|
|
12
|
+
import { $ as isDynamicToolTerminalDiagnosticEvent, A as createCodexDynamicToolBuildStageTracker, B as shouldWarnCodexDynamicToolBuildStageSummary, C as resolveCodexLocalRuntimeAttribution, D as emitDynamicToolStartedDiagnostic, E as emitDynamicToolErrorDiagnostic, F as resolveCodexExternalSandboxPolicyForOpenClawSandbox, G as resolveCodexPostToolRawAssistantCompletionIdleTimeoutMs, H as readCodexMirroredSessionHistoryMessages, I as resolveCodexMessageToolProvider, J as resolveCodexTurnCompletionIdleTimeoutMs, K as resolveCodexStartupTimeoutMs, L as resolveCodexSandboxEnvironmentSelection, M as formatCodexDynamicToolBuildStageSummary, N as resolveCodexAppServerExecutionCwd, O as emitDynamicToolTerminalDiagnostic, P as resolveCodexAppServerHookChannelId, Q as hasPendingDynamicToolTerminalDiagnostic, R as shouldEnableCodexAppServerNativeToolSurface, S as scheduleCodexNativeHookRelayUnregister, T as createCodexDynamicToolBridge, U as handleCodexAppServerApprovalRequest, W as CODEX_POST_REASONING_REPLY_IDLE_TIMEOUT_MS, X as withCodexStartupTimeout, Y as resolveCodexTurnTerminalIdleTimeoutMs, Z as handleDynamicToolCallWithTimeout, _ as buildCodexNativeHookRelayDisabledConfig, a as shouldEmitTranscriptToolProgress, at as toCodexDynamicToolProgressResponse, b as resolveCodexNativeHookRelayEvents, c as mirrorPromptAtTurnStartBestEffort, d as resolveCodexToolProgressDetailMode, et as isMatchingDynamicToolTerminalDiagnostic, f as sanitizeCodexToolArguments, g as buildCodexNativeHookRelayConfig, h as CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS, it as shouldReleaseTurnAfterTerminalDynamicTool, j as disableCodexPluginThreadConfig, k as buildDynamicTools, l as mirrorTranscriptBestEffort, nt as resolveTerminalDynamicToolBatchAction, o as buildCodexUserPromptMessage, ot as toCodexDynamicToolProtocolResponse, p as sanitizeCodexToolResponse, q as resolveCodexTurnAssistantCompletionIdleTimeoutMs, r as CodexAppServerEventProjector, rt as shouldBlockTerminalReleaseForNonTerminalDynamicToolResult, s as createCodexAppServerUserMessagePersistenceNotifier, st as resolveCodexToolAbortTerminalReason, t as resolveCodexProviderWebSearchSupport, tt as resolveDynamicToolCallTimeoutMs, u as inferCodexDynamicToolMeta, v as createCodexNativeHookRelay, w as handleCodexAppServerElicitationRequest, x as resolveCodexNativeHookRelayTtlMs, y as emitCodexNativePreToolUseFailureDiagnostic, z as shouldRequireCodexSandboxExecServerEnvironment } from "./provider-capabilities-CDnHbmUZ.js";
|
|
13
|
+
import { t as ensureCodexComputerUse } from "./computer-use-Bmaz333N.js";
|
|
14
14
|
import fs from "node:fs/promises";
|
|
15
15
|
import path, { posix } from "node:path";
|
|
16
16
|
import { resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
|
|
@@ -93,7 +93,8 @@ function resolveContextEngineBootstrapProjectionDecision(params) {
|
|
|
93
93
|
};
|
|
94
94
|
if (!areCodexDynamicToolFingerprintsCompatible({
|
|
95
95
|
previous: params.startupBinding.dynamicToolsFingerprint,
|
|
96
|
-
next: params.dynamicToolsFingerprint
|
|
96
|
+
next: params.dynamicToolsFingerprint,
|
|
97
|
+
nextLegacy: params.legacyDynamicToolsFingerprint
|
|
97
98
|
})) return {
|
|
98
99
|
project: true,
|
|
99
100
|
reason: "dynamic-tools-mismatch"
|
|
@@ -3575,7 +3576,14 @@ var CodexNativeSubagentTaskMirror = class {
|
|
|
3575
3576
|
this.handleThreadStatusChanged(params);
|
|
3576
3577
|
return;
|
|
3577
3578
|
}
|
|
3578
|
-
if (notification.method === "item/started" || notification.method === "item/completed")
|
|
3579
|
+
if (notification.method === "item/started" || notification.method === "item/completed") {
|
|
3580
|
+
const item = isJsonObject(params.item) ? params.item : void 0;
|
|
3581
|
+
if (notification.method === "item/completed" && item && readString$3(item, "type") === "subAgentActivity") {
|
|
3582
|
+
this.handleSubagentActivityItem(params);
|
|
3583
|
+
return;
|
|
3584
|
+
}
|
|
3585
|
+
this.handleCollabAgentItem(params);
|
|
3586
|
+
}
|
|
3579
3587
|
}
|
|
3580
3588
|
handleThreadStarted(params) {
|
|
3581
3589
|
const notification = readThreadStartedNotification(params);
|
|
@@ -3584,30 +3592,16 @@ var CodexNativeSubagentTaskMirror = class {
|
|
|
3584
3592
|
const spawn = readSubagentThreadSpawnSource(thread.source, this.params.parentThreadId);
|
|
3585
3593
|
if (!spawn) return;
|
|
3586
3594
|
const threadId = thread.id.trim();
|
|
3587
|
-
if (!threadId || this.mirrorStateByThreadId.get(threadId) === "mirrored") return;
|
|
3588
|
-
this.mirrorStateByThreadId.set(threadId, "mirrored");
|
|
3589
|
-
const runId = codexNativeSubagentRunId(threadId);
|
|
3590
3595
|
const label = trimOptional(spawn.agent_nickname) ?? trimOptional(thread.agentNickname) ?? trimOptional(spawn.agent_role) ?? trimOptional(thread.agentRole) ?? "Codex subagent";
|
|
3591
3596
|
const task = trimOptional(thread.preview) ?? `Codex native subagent${label === "Codex subagent" ? "" : ` ${label}`}`;
|
|
3592
3597
|
const createdAt = secondsToMillis$1(thread.createdAt) ?? this.now();
|
|
3593
|
-
if (!this.
|
|
3594
|
-
|
|
3595
|
-
agentId: this.params.agentId,
|
|
3596
|
-
runId,
|
|
3598
|
+
if (!this.createRunningTask({
|
|
3599
|
+
threadId,
|
|
3597
3600
|
label,
|
|
3598
3601
|
task,
|
|
3599
|
-
notifyPolicy: "silent",
|
|
3600
|
-
deliveryStatus: "not_applicable",
|
|
3601
|
-
preferMetadata: true,
|
|
3602
3602
|
startedAt: createdAt,
|
|
3603
|
-
lastEventAt: this.now(),
|
|
3604
3603
|
progressSummary: "Codex native subagent started."
|
|
3605
|
-
}))
|
|
3606
|
-
this.mirrorStateByThreadId.set(threadId, "failed");
|
|
3607
|
-
return;
|
|
3608
|
-
}
|
|
3609
|
-
this.terminalRunIds.delete(runId);
|
|
3610
|
-
this.authoritativeRunIds.delete(runId);
|
|
3604
|
+
})) return;
|
|
3611
3605
|
this.applyStatus(threadId, thread.status);
|
|
3612
3606
|
}
|
|
3613
3607
|
handleThreadStatusChanged(params) {
|
|
@@ -3687,31 +3681,65 @@ var CodexNativeSubagentTaskMirror = class {
|
|
|
3687
3681
|
this.applyCollabAgentStatus(threadId, toolCallStatus, state?.message);
|
|
3688
3682
|
}
|
|
3689
3683
|
}
|
|
3684
|
+
handleSubagentActivityItem(params) {
|
|
3685
|
+
const item = isJsonObject(params.item) ? params.item : void 0;
|
|
3686
|
+
if (!item || readString$3(item, "type") !== "subAgentActivity" || readString$3(params, "threadId") !== this.params.parentThreadId) return;
|
|
3687
|
+
const threadId = trimOptional(readString$3(item, "agentThreadId"));
|
|
3688
|
+
const kind = normalizeSubagentActivityKind(readString$3(item, "kind"));
|
|
3689
|
+
if (!threadId || !kind) return;
|
|
3690
|
+
if (kind === "started") {
|
|
3691
|
+
this.createTaskFromSubagentActivity(threadId, trimOptional(readString$3(item, "agentPath")));
|
|
3692
|
+
return;
|
|
3693
|
+
}
|
|
3694
|
+
if (this.mirrorStateByThreadId.get(threadId) !== "mirrored") return;
|
|
3695
|
+
const message = kind === "interacted" ? "Codex native subagent received more input." : "Codex native subagent was interrupted.";
|
|
3696
|
+
this.applyCollabAgentStatus(threadId, kind === "interacted" ? "running" : "interrupted", message);
|
|
3697
|
+
}
|
|
3698
|
+
createTaskFromSubagentActivity(threadId, agentPath) {
|
|
3699
|
+
const eventAt = this.now();
|
|
3700
|
+
this.createRunningTask({
|
|
3701
|
+
threadId,
|
|
3702
|
+
label: "Codex subagent",
|
|
3703
|
+
task: agentPath ? `Codex native subagent ${agentPath}` : "Codex native subagent",
|
|
3704
|
+
startedAt: eventAt,
|
|
3705
|
+
progressSummary: "Codex native subagent started."
|
|
3706
|
+
});
|
|
3707
|
+
}
|
|
3690
3708
|
createTaskFromCollabSpawnItem(threadId, item) {
|
|
3691
|
-
const normalizedThreadId = threadId.trim();
|
|
3692
|
-
if (!normalizedThreadId || this.mirrorStateByThreadId.get(normalizedThreadId) === "mirrored") return;
|
|
3693
|
-
this.mirrorStateByThreadId.set(normalizedThreadId, "mirrored");
|
|
3694
3709
|
const prompt = trimOptional(readString$3(item, "prompt"));
|
|
3695
|
-
const runId = codexNativeSubagentRunId(normalizedThreadId);
|
|
3696
3710
|
const createdAt = this.now();
|
|
3711
|
+
this.createRunningTask({
|
|
3712
|
+
threadId,
|
|
3713
|
+
label: "Codex subagent",
|
|
3714
|
+
task: prompt ?? "Codex native subagent",
|
|
3715
|
+
startedAt: createdAt,
|
|
3716
|
+
progressSummary: "Codex native subagent spawned."
|
|
3717
|
+
});
|
|
3718
|
+
}
|
|
3719
|
+
createRunningTask(params) {
|
|
3720
|
+
const threadId = params.threadId.trim();
|
|
3721
|
+
if (!threadId || this.mirrorStateByThreadId.get(threadId) === "mirrored") return false;
|
|
3722
|
+
this.mirrorStateByThreadId.set(threadId, "mirrored");
|
|
3723
|
+
const runId = codexNativeSubagentRunId(threadId);
|
|
3697
3724
|
if (!this.runtime.tryCreateRunningTaskRun({
|
|
3698
3725
|
sourceId: runId,
|
|
3699
3726
|
agentId: this.params.agentId,
|
|
3700
3727
|
runId,
|
|
3701
|
-
label:
|
|
3702
|
-
task:
|
|
3728
|
+
label: params.label,
|
|
3729
|
+
task: params.task,
|
|
3703
3730
|
notifyPolicy: "silent",
|
|
3704
3731
|
deliveryStatus: "not_applicable",
|
|
3705
3732
|
preferMetadata: true,
|
|
3706
|
-
startedAt:
|
|
3707
|
-
lastEventAt:
|
|
3708
|
-
progressSummary:
|
|
3733
|
+
startedAt: params.startedAt,
|
|
3734
|
+
lastEventAt: this.now(),
|
|
3735
|
+
progressSummary: params.progressSummary
|
|
3709
3736
|
})) {
|
|
3710
|
-
this.mirrorStateByThreadId.set(
|
|
3711
|
-
return;
|
|
3737
|
+
this.mirrorStateByThreadId.set(threadId, "failed");
|
|
3738
|
+
return false;
|
|
3712
3739
|
}
|
|
3713
3740
|
this.terminalRunIds.delete(runId);
|
|
3714
3741
|
this.authoritativeRunIds.delete(runId);
|
|
3742
|
+
return true;
|
|
3715
3743
|
}
|
|
3716
3744
|
applyCollabAgentStatus(threadId, status, message) {
|
|
3717
3745
|
if (this.mirrorStateByThreadId.get(threadId) === "failed") return;
|
|
@@ -3831,6 +3859,10 @@ function readNullableString(value, key) {
|
|
|
3831
3859
|
function normalizeToolName$1(value) {
|
|
3832
3860
|
return value?.replace(/[^a-z0-9]/giu, "").toLowerCase();
|
|
3833
3861
|
}
|
|
3862
|
+
function normalizeSubagentActivityKind(value) {
|
|
3863
|
+
const key = value?.replace(/[^a-z]/giu, "").toLowerCase();
|
|
3864
|
+
return key === "started" || key === "interacted" || key === "interrupted" ? key : void 0;
|
|
3865
|
+
}
|
|
3834
3866
|
function normalizeCollabToolCallStatus(value) {
|
|
3835
3867
|
const key = value?.replace(/[^a-z0-9]/giu, "").toLowerCase();
|
|
3836
3868
|
if (key === "completed" || key === "succeeded" || key === "success") return "completed";
|
|
@@ -4042,6 +4074,11 @@ var CodexNativeSubagentMonitor = class {
|
|
|
4042
4074
|
const parentThreadId = item ? (readString$2(item, "senderThreadId") ?? readString$2(params, "threadId"))?.trim() : void 0;
|
|
4043
4075
|
const state = parentThreadId ? this.parentStates.get(parentThreadId) : void 0;
|
|
4044
4076
|
if (state && parentThreadId) {
|
|
4077
|
+
if (notification.method === "item/completed" && readString$2(item, "type") === "subAgentActivity") {
|
|
4078
|
+
const childThreadId = readString$2(item, "agentThreadId")?.trim();
|
|
4079
|
+
if (childThreadId) this.registerChildThread(parentThreadId, childThreadId, { agentPath: readString$2(item, "agentPath") });
|
|
4080
|
+
return state;
|
|
4081
|
+
}
|
|
4045
4082
|
const childThreadIds = normalizeToolName(readString$2(item, "tool")) === "spawnagent" ? /* @__PURE__ */ new Set([...readStringArray(item?.receiverThreadIds), ...readObjectStringKeys(item?.agentsStates)]) : new Set(readStringArray(item?.receiverThreadIds));
|
|
4046
4083
|
for (const childThreadId of childThreadIds) this.registerChildThread(parentThreadId, childThreadId);
|
|
4047
4084
|
}
|
|
@@ -6112,7 +6149,8 @@ async function runCodexAppServerAttempt(params, options) {
|
|
|
6112
6149
|
startupBinding: decisionStartupBinding,
|
|
6113
6150
|
expectedBinding: buildContextEngineBinding(buildActiveRunAttemptParams(), contextEngineProjection),
|
|
6114
6151
|
projection: contextEngineProjection,
|
|
6115
|
-
dynamicToolsFingerprint: codexDynamicToolsFingerprint(toolBridge.specs)
|
|
6152
|
+
dynamicToolsFingerprint: codexDynamicToolsFingerprint(toolBridge.specs),
|
|
6153
|
+
legacyDynamicToolsFingerprint: codexLegacyDynamicToolsFingerprint(toolBridge.specs)
|
|
6116
6154
|
}) : {
|
|
6117
6155
|
project: true,
|
|
6118
6156
|
reason: "per-turn-projection"
|
|
@@ -7342,6 +7380,16 @@ async function runCodexAppServerAttempt(params, options) {
|
|
|
7342
7380
|
latestStartupErrorNotification = void 0;
|
|
7343
7381
|
rateLimitsRevisionBeforeLastTurnStart = readCodexRateLimitsRevision(client);
|
|
7344
7382
|
activeTurnRoute.armTurn();
|
|
7383
|
+
emitCodexAppServerEvent(params, {
|
|
7384
|
+
stream: "codex_app_server.lifecycle",
|
|
7385
|
+
data: {
|
|
7386
|
+
phase: "turn_starting",
|
|
7387
|
+
threadId: thread.threadId,
|
|
7388
|
+
model: turnStartParams.model,
|
|
7389
|
+
effort: turnStartParams.effort,
|
|
7390
|
+
collaborationEffort: turnStartParams.collaborationMode?.settings.reasoning_effort
|
|
7391
|
+
}
|
|
7392
|
+
});
|
|
7345
7393
|
let acceptedTurnId;
|
|
7346
7394
|
try {
|
|
7347
7395
|
const startedTurn = assertCodexTurnStartResponse(await client.request("turn/start", turnStartParams, {
|
|
@@ -7383,13 +7431,6 @@ async function runCodexAppServerAttempt(params, options) {
|
|
|
7383
7431
|
ctx: hookContext,
|
|
7384
7432
|
hookRunner
|
|
7385
7433
|
});
|
|
7386
|
-
emitCodexAppServerEvent(params, {
|
|
7387
|
-
stream: "codex_app_server.lifecycle",
|
|
7388
|
-
data: {
|
|
7389
|
-
phase: "turn_starting",
|
|
7390
|
-
threadId: thread.threadId
|
|
7391
|
-
}
|
|
7392
|
-
});
|
|
7393
7434
|
turn = await startCodexTurn();
|
|
7394
7435
|
} catch (error) {
|
|
7395
7436
|
let turnStartError = error;
|
|
@@ -16,9 +16,12 @@ var session_binding_exports = /* @__PURE__ */ __exportAll({
|
|
|
16
16
|
bindingStoreKey: () => bindingStoreKey,
|
|
17
17
|
createCodexAppServerBindingStore: () => createCodexAppServerBindingStore,
|
|
18
18
|
createStoredCodexAppServerBinding: () => createStoredCodexAppServerBinding,
|
|
19
|
+
hashCodexAppServerBindingFingerprint: () => hashCodexAppServerBindingFingerprint,
|
|
19
20
|
isCodexAppServerNativeAuthProfile: () => isCodexAppServerNativeAuthProfile,
|
|
20
21
|
normalizeCodexAppServerBindingModelProvider: () => normalizeCodexAppServerBindingModelProvider,
|
|
22
|
+
normalizeStoredCodexAppServerBindingFingerprints: () => normalizeStoredCodexAppServerBindingFingerprints,
|
|
21
23
|
readCodexAppServerThreadBinding: () => readCodexAppServerThreadBinding,
|
|
24
|
+
readStoredCodexAppServerBinding: () => readStoredCodexAppServerBinding,
|
|
22
25
|
reclaimCurrentCodexSessionGeneration: () => reclaimCurrentCodexSessionGeneration,
|
|
23
26
|
resolveCodexAppServerBindingModelProvider: () => resolveCodexAppServerBindingModelProvider,
|
|
24
27
|
sessionBindingIdentity: () => sessionBindingIdentity
|
|
@@ -26,6 +29,7 @@ var session_binding_exports = /* @__PURE__ */ __exportAll({
|
|
|
26
29
|
const CODEX_APP_SERVER_NATIVE_AUTH_PROVIDER = "openai";
|
|
27
30
|
const PUBLIC_OPENAI_MODEL_PROVIDER = "openai";
|
|
28
31
|
const BINDING_LEASE_RETRY_INTERVAL_MS = 1e3;
|
|
32
|
+
const BOUNDED_BINDING_FINGERPRINT_PATTERN = /^sha256:[a-f0-9]{64}$/i;
|
|
29
33
|
const CODEX_APP_SERVER_BINDING_GUARDED_REQUEST_TIMEOUT_MS = 6e4;
|
|
30
34
|
const BINDING_LEASE_STALE_MS = 65e3;
|
|
31
35
|
const BINDING_LEASE_WAIT_MS = 7e4;
|
|
@@ -138,10 +142,38 @@ const storedBindingSchema = z.discriminatedUnion("state", [z.object({
|
|
|
138
142
|
lease: bindingLeaseSchema.optional().catch(void 0),
|
|
139
143
|
retired: z.literal(true).optional().catch(void 0)
|
|
140
144
|
})]);
|
|
145
|
+
function hashCodexAppServerBindingFingerprint(canonical) {
|
|
146
|
+
return `sha256:${createHash("sha256").update(canonical).digest("hex")}`;
|
|
147
|
+
}
|
|
148
|
+
function normalizeLegacyBindingFingerprint(value) {
|
|
149
|
+
if (typeof value !== "string" || value === "" || value === "[]" || BOUNDED_BINDING_FINGERPRINT_PATTERN.test(value)) return value;
|
|
150
|
+
return hashCodexAppServerBindingFingerprint(value);
|
|
151
|
+
}
|
|
152
|
+
function normalizeLegacyBindingFingerprints(record) {
|
|
153
|
+
let normalized = record;
|
|
154
|
+
for (const key of ["dynamicToolsFingerprint", "userMcpServersFingerprint"]) {
|
|
155
|
+
const value = record[key];
|
|
156
|
+
const next = normalizeLegacyBindingFingerprint(value);
|
|
157
|
+
if (next === value) continue;
|
|
158
|
+
if (normalized === record) normalized = { ...record };
|
|
159
|
+
normalized[key] = next;
|
|
160
|
+
}
|
|
161
|
+
return normalized;
|
|
162
|
+
}
|
|
163
|
+
function normalizeStoredCodexAppServerBindingFingerprints(value) {
|
|
164
|
+
const stored = readStoredCodexAppServerBinding(value);
|
|
165
|
+
if (!stored || stored.state !== "active") return stored;
|
|
166
|
+
const binding = normalizeLegacyBindingFingerprints(stored.binding);
|
|
167
|
+
return binding === stored.binding ? stored : readStoredCodexAppServerBinding({
|
|
168
|
+
...stored,
|
|
169
|
+
binding
|
|
170
|
+
});
|
|
171
|
+
}
|
|
141
172
|
/** Encodes a migrated sidecar binding as one canonical plugin-state row. */
|
|
142
173
|
function createStoredCodexAppServerBinding(value, options = {}) {
|
|
143
|
-
const
|
|
144
|
-
if (!
|
|
174
|
+
const rawRecord = asRecord(value);
|
|
175
|
+
if (!rawRecord) return;
|
|
176
|
+
const record = normalizeLegacyBindingFingerprints(rawRecord);
|
|
145
177
|
if (record.schemaVersion !== 1 && record.schemaVersion !== 2) return;
|
|
146
178
|
const pluginAppPolicyContext = readPluginAppPolicyContext(record.pluginAppPolicyContext, record.schemaVersion);
|
|
147
179
|
const historyCoveredThrough = readTimestamp(record.historyCoveredThrough) ?? readTimestamp(record.updatedAt) ?? readTimestamp(record.createdAt) ?? readTimestamp(options.now) ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -198,7 +230,7 @@ function createCodexAppServerBindingStore(state) {
|
|
|
198
230
|
try {
|
|
199
231
|
let renewed = false;
|
|
200
232
|
const stored = update(key, (raw) => {
|
|
201
|
-
const current =
|
|
233
|
+
const current = readStoredCodexAppServerBinding(raw);
|
|
202
234
|
if (raw !== void 0 && !current) throw new Error(`Invalid Codex app-server binding row: ${key}`);
|
|
203
235
|
const lease = current?.lease;
|
|
204
236
|
const now = Date.now();
|
|
@@ -227,7 +259,7 @@ function createCodexAppServerBindingStore(state) {
|
|
|
227
259
|
if (ownedLease?.failure) throw ownedLease.failure;
|
|
228
260
|
const ownedToken = ownedLease?.token;
|
|
229
261
|
update(key, (raw) => {
|
|
230
|
-
const current =
|
|
262
|
+
const current = readStoredCodexAppServerBinding(raw);
|
|
231
263
|
if (raw !== void 0 && !current) throw new Error(`Invalid Codex app-server binding row: ${key}`);
|
|
232
264
|
const activeLease = current?.lease;
|
|
233
265
|
const now = Date.now();
|
|
@@ -257,14 +289,14 @@ function createCodexAppServerBindingStore(state) {
|
|
|
257
289
|
async read(identity) {
|
|
258
290
|
const key = bindingStoreKey(identity);
|
|
259
291
|
const raw = state.lookup(key);
|
|
260
|
-
const stored =
|
|
292
|
+
const stored = readStoredCodexAppServerBinding(raw);
|
|
261
293
|
if (raw !== void 0 && !stored) throw new Error(`Invalid Codex app-server binding row: ${key}`);
|
|
262
294
|
return stored?.state === "active" && ownsStoredSessionGeneration(identity, stored) ? stored.binding : void 0;
|
|
263
295
|
},
|
|
264
296
|
async prepareSessionGenerationReclaim(identity) {
|
|
265
297
|
const key = bindingStoreKey(identity);
|
|
266
298
|
const raw = state.lookup(key);
|
|
267
|
-
const current =
|
|
299
|
+
const current = readStoredCodexAppServerBinding(raw);
|
|
268
300
|
if (raw !== void 0 && !current) throw new Error(`Invalid Codex app-server binding row: ${key}`);
|
|
269
301
|
if (!current) return {
|
|
270
302
|
kind: "resolved",
|
|
@@ -427,7 +459,7 @@ function createCodexAppServerBindingStore(state) {
|
|
|
427
459
|
clearInterval(heartbeat);
|
|
428
460
|
try {
|
|
429
461
|
const removeOwnedLease = (raw, matches) => {
|
|
430
|
-
const current =
|
|
462
|
+
const current = readStoredCodexAppServerBinding(raw);
|
|
431
463
|
if (!current || !matches(current) || current.lease?.token !== token) return;
|
|
432
464
|
const { lease: _lease, ...released } = current;
|
|
433
465
|
return released;
|
|
@@ -461,7 +493,7 @@ function bindingStoreKey(identity) {
|
|
|
461
493
|
if (!bindingId) throw new Error("Codex app-server conversation binding requires a binding id");
|
|
462
494
|
return `conversation:${bindingId}`;
|
|
463
495
|
}
|
|
464
|
-
function
|
|
496
|
+
function readStoredCodexAppServerBinding(value) {
|
|
465
497
|
const result = storedBindingSchema.safeParse(value);
|
|
466
498
|
return result.success ? stripUndefinedValue(result.data) : void 0;
|
|
467
499
|
}
|
|
@@ -592,4 +624,4 @@ function resolveCodexAppServerBindingModelProvider(params) {
|
|
|
592
624
|
return params.modelProvider?.trim() || (isCodexAppServerNativeAuthProfile(params) ? PUBLIC_OPENAI_MODEL_PROVIDER : void 0);
|
|
593
625
|
}
|
|
594
626
|
//#endregion
|
|
595
|
-
export {
|
|
627
|
+
export { normalizeCodexAppServerBindingModelProvider as a, session_binding_exports as c, isCodexAppServerNativeAuthProfile as i, bindingStoreKey as n, reclaimCurrentCodexSessionGeneration as o, hashCodexAppServerBindingFingerprint as r, sessionBindingIdentity as s, CODEX_APP_SERVER_BINDING_GUARDED_REQUEST_TIMEOUT_MS as t };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { r as isJsonObject } from "./protocol-2POPqAY4.js";
|
|
2
2
|
import { _ as shouldAutoApproveCodexAppServerApprovals, d as resolveCodexAppServerRuntimeOptions, g as resolveOpenClawExecPolicyForCodexAppServer, m as resolveCodexModelBackedReviewerPolicyContext, n as canUseCodexModelBackedApprovalsReviewerForModel, u as readCodexPluginConfig } from "./config-CYEDnLJ2.js";
|
|
3
3
|
import { a as readCodexDynamicToolCallParams, c as readCodexTurn, i as assertCodexTurnStartResponse, t as assertCodexThreadForkResponse } from "./protocol-validators-dZQ-UTOa.js";
|
|
4
|
-
import {
|
|
5
|
-
import { a as readCodexSupportedReasoningEfforts, c as formatCodexUsageLimitErrorMessage } from "./provider-
|
|
4
|
+
import { C as filterCodexDynamicTools, E as resolveCodexDynamicToolsLoading, H as mergeCodexThreadConfigs, d as resolveCodexAppServerModelProvider, f as resolveCodexAppServerRequestModelSelection, h as resolveReasoningEffort, m as resolveCodexBindingModelProviderFallback, r as buildCodexRuntimeThreadConfig, t as CODEX_NATIVE_PERSONALITY_NONE, v as resolveCodexWebSearchPlan, z as buildCodexPluginAppsConfigPatchFromPolicyContext } from "./thread-lifecycle-qWE88Dn2.js";
|
|
5
|
+
import { a as readCodexSupportedReasoningEfforts, c as formatCodexUsageLimitErrorMessage } from "./provider-zjPfx5Fs.js";
|
|
6
6
|
import { a as getLeasedSharedCodexAppServerClient, d as isCodexAppServerApprovalRequest, h as readRecentCodexRateLimits, o as releaseLeasedSharedCodexAppServerClient, p as ensureCodexAppServerClientRuntime } from "./shared-client-4ICy3U6d.js";
|
|
7
|
-
import {
|
|
8
|
-
import { t as resolveCodexAppServerForModelProvider } from "./app-server-policy-
|
|
7
|
+
import { i as isCodexAppServerNativeAuthProfile, s as sessionBindingIdentity } from "./session-binding-C1ZXdP-x.js";
|
|
8
|
+
import { t as resolveCodexAppServerForModelProvider } from "./app-server-policy-C968Kgin.js";
|
|
9
9
|
import { n as resolveCodexNativeExecutionBlock } from "./sandbox-guard-DA2TQfZW.js";
|
|
10
10
|
import { n as readCodexNotificationThreadId, r as readCodexNotificationTurnId } from "./notification-correlation-Bo7KB3ks.js";
|
|
11
|
-
import { D as emitDynamicToolStartedDiagnostic, E as emitDynamicToolErrorDiagnostic, I as resolveCodexMessageToolProvider, O as emitDynamicToolTerminalDiagnostic, R as shouldEnableCodexAppServerNativeToolSurface, T as createCodexDynamicToolBridge, U as handleCodexAppServerApprovalRequest, V as filterToolsForVisionInputs, Z as handleDynamicToolCallWithTimeout, _ as buildCodexNativeHookRelayDisabledConfig, g as buildCodexNativeHookRelayConfig, i as CodexNativeToolLifecycleProjector, m as CODEX_NATIVE_HOOK_RELAY_EVENTS, n as resolveCodexProviderWebSearchSupportForClient, st as resolveCodexToolAbortTerminalReason, tt as resolveDynamicToolCallTimeoutMs, w as handleCodexAppServerElicitationRequest, y as emitCodexNativePreToolUseFailureDiagnostic } from "./provider-capabilities-
|
|
11
|
+
import { D as emitDynamicToolStartedDiagnostic, E as emitDynamicToolErrorDiagnostic, I as resolveCodexMessageToolProvider, O as emitDynamicToolTerminalDiagnostic, R as shouldEnableCodexAppServerNativeToolSurface, T as createCodexDynamicToolBridge, U as handleCodexAppServerApprovalRequest, V as filterToolsForVisionInputs, Z as handleDynamicToolCallWithTimeout, _ as buildCodexNativeHookRelayDisabledConfig, g as buildCodexNativeHookRelayConfig, i as CodexNativeToolLifecycleProjector, m as CODEX_NATIVE_HOOK_RELAY_EVENTS, n as resolveCodexProviderWebSearchSupportForClient, st as resolveCodexToolAbortTerminalReason, tt as resolveDynamicToolCallTimeoutMs, w as handleCodexAppServerElicitationRequest, y as emitCodexNativePreToolUseFailureDiagnostic } from "./provider-capabilities-CDnHbmUZ.js";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
13
13
|
import { loadExecApprovals } from "openclaw/plugin-sdk/exec-approvals-runtime";
|
|
14
14
|
import { buildAgentHookContextChannelFields, embeddedAgentLog, formatErrorMessage, registerNativeHookRelay, resolveAgentDir, resolveAttemptSpawnWorkspaceDir, resolveModelAuthMode, resolveSandboxContext, resolveSessionAgentIds, supportsModelTools } from "openclaw/plugin-sdk/agent-harness-runtime";
|