@openclaw/codex 2026.6.10-beta.1 → 2026.6.10

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.
@@ -1,5 +1,5 @@
1
1
  import { n as isJsonObject } from "./protocol-dh-ETiNd.js";
2
- import { B as isCodexNotificationForTurn } from "./thread-lifecycle-CJdHuthD.js";
2
+ import { B as isCodexNotificationForTurn } from "./thread-lifecycle-DtT3-ehU.js";
3
3
  import { asBoolean } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  //#region extensions/codex/src/app-server/attempt-notifications.ts
5
5
  /**
@@ -93,7 +93,16 @@ function isPendingOpenClawDynamicToolCompletionNotification(notification, pendin
93
93
  function isRawToolOutputCompletionNotification(notification) {
94
94
  if (notification.method !== "rawResponseItem/completed" || !isJsonObject(notification.params)) return false;
95
95
  const item = isJsonObject(notification.params.item) ? notification.params.item : void 0;
96
- return item ? readString(item, "type") === "custom_tool_call_output" : false;
96
+ switch (item ? readString(item, "type") : void 0) {
97
+ case "custom_tool_call_output":
98
+ case "function_call_output": return true;
99
+ default: return false;
100
+ }
101
+ }
102
+ function isRawFunctionToolOutputCompletionNotification(notification) {
103
+ if (notification.method !== "rawResponseItem/completed" || !isJsonObject(notification.params)) return false;
104
+ const item = isJsonObject(notification.params.item) ? notification.params.item : void 0;
105
+ return item ? readString(item, "type") === "function_call_output" : false;
97
106
  }
98
107
  /** Returns true for progress on Codex-native tool item types. */
99
108
  function isNativeToolProgressNotification(notification) {
@@ -246,4 +255,4 @@ function isNonEmptyString(value) {
246
255
  return typeof value === "string" && value.length > 0;
247
256
  }
248
257
  //#endregion
249
- export { readNotificationItemId as C, updateActiveTurnItemIds as E, readCodexNotificationItem as S, shouldDisarmAssistantCompletionIdleWatch as T, isReasoningItemCompletionNotification as _, isCodexNotificationOutsideActiveRun as a, isTerminalTurnStatus as b, isCurrentThreadOptionalTurnRequestParams as c, isNativeResponseStreamDeltaNotification as d, isNativeToolProgressNotification as f, isRawToolOutputCompletionNotification as g, isRawReasoningCompletionNotification as h, isAssistantCompletionReleaseNotification as i, isCurrentThreadTurnRequestParams as l, isRawAssistantProgressNotification as m, describeNotificationActivity as n, isCodexTurnAbortMarkerNotification as o, isPendingOpenClawDynamicToolCompletionNotification as p, isAssistantCommentaryCompletionNotification as r, isCurrentApprovalTurnRequestParams as s, codexExecutionToolName as t, isFileChangePatchUpdatedNotification as u, isReasoningProgressNotification as v, readRawResponseToolCallId as w, isTurnNotification as x, isRetryableErrorNotification as y };
258
+ export { readCodexNotificationItem as C, updateActiveTurnItemIds as D, shouldDisarmAssistantCompletionIdleWatch as E, isTurnNotification as S, readRawResponseToolCallId as T, isRawToolOutputCompletionNotification as _, isCodexNotificationOutsideActiveRun as a, isRetryableErrorNotification as b, isCurrentThreadOptionalTurnRequestParams as c, isNativeResponseStreamDeltaNotification as d, isNativeToolProgressNotification as f, isRawReasoningCompletionNotification as g, isRawFunctionToolOutputCompletionNotification as h, isAssistantCompletionReleaseNotification as i, isCurrentThreadTurnRequestParams as l, isRawAssistantProgressNotification as m, describeNotificationActivity as n, isCodexTurnAbortMarkerNotification as o, isPendingOpenClawDynamicToolCompletionNotification as p, isAssistantCommentaryCompletionNotification as r, isCurrentApprovalTurnRequestParams as s, codexExecutionToolName as t, isFileChangePatchUpdatedNotification as u, isReasoningItemCompletionNotification as v, readNotificationItemId as w, isTerminalTurnStatus as x, isReasoningProgressNotification as y };
@@ -3,12 +3,12 @@ import { d as resolveCodexAppServerRuntimeOptions, o as isCodexFastServiceTier }
3
3
  import { n as listCodexAppServerModels, t as listAllCodexAppServerModels } from "./models-CAmfBWRl.js";
4
4
  import { l as summarizeCodexAccountUsage } from "./provider-B-OHpbD3.js";
5
5
  import { l as writeCodexAppServerBinding, n as clearCodexAppServerBinding, o as readCodexAppServerBinding } from "./session-binding-HOuPt-E0.js";
6
- import { i as describeControlFailure, r as CODEX_CONTROL_METHODS } from "./plugin-app-cache-key-DX14mGOE.js";
6
+ import { i as describeControlFailure, r as CODEX_CONTROL_METHODS } from "./plugin-app-cache-key-C9ILt7bl.js";
7
7
  import { a as formatCodexDisplayText, c as formatList, d as formatThreads, f as readString$1, i as formatAccount, l as formatModels, o as formatCodexStatus, r as buildHelp, s as formatComputerUseStatus, u as formatSkills } from "./app-server-policy-BPTiVNsW.js";
8
8
  import { n as resolveCodexNativeExecutionBlock, r as resolveCodexNativeSandboxBlock } from "./sandbox-guard-3tnjhjFb.js";
9
- import { _ as steerCodexConversationTurn, b as readCodexConversationBindingData, d as parseCodexFastModeArg, f as parseCodexPermissionsModeArg, g as setCodexConversationPermissions, h as setCodexConversationModel, m as setCodexConversationFastMode, o as formatCodexCliSessions, p as readCodexConversationActiveTurn, r as startCodexConversationThread, u as formatPermissionsMode, v as stopCodexConversationTurn, x as resolveCodexDefaultWorkspaceDir, y as createCodexCliNodeConversationBindingData } from "./conversation-binding-CndXa45M.js";
9
+ import { _ as steerCodexConversationTurn, b as readCodexConversationBindingData, d as parseCodexFastModeArg, f as parseCodexPermissionsModeArg, g as setCodexConversationPermissions, h as setCodexConversationModel, m as setCodexConversationFastMode, o as formatCodexCliSessions, p as readCodexConversationActiveTurn, r as startCodexConversationThread, u as formatPermissionsMode, v as stopCodexConversationTurn, x as resolveCodexDefaultWorkspaceDir, y as createCodexCliNodeConversationBindingData } from "./conversation-binding-t0XMLz-j.js";
10
10
  import { t as requestCodexAppServerJson } from "./request-Dcd452Nk.js";
11
- import { n as installCodexComputerUse, r as readCodexComputerUseStatus } from "./computer-use-BViK8fu1.js";
11
+ import { n as installCodexComputerUse, r as readCodexComputerUseStatus } from "./computer-use-ClrJwoFp.js";
12
12
  import { n as rememberCodexRateLimits } from "./rate-limit-cache-C7qmZ0Jh.js";
13
13
  import { parseStrictPositiveInteger } from "openclaw/plugin-sdk/number-runtime";
14
14
  import { normalizeOptionalString, normalizeUniqueStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -1,5 +1,5 @@
1
1
  import { d as resolveCodexAppServerRuntimeOptions, f as resolveCodexComputerUseConfig } from "./config-CszD0vP3.js";
2
- import { i as describeControlFailure } from "./plugin-app-cache-key-DX14mGOE.js";
2
+ import { i as describeControlFailure } from "./plugin-app-cache-key-C9ILt7bl.js";
3
3
  import { t as requestCodexAppServerJson } from "./request-Dcd452Nk.js";
4
4
  import { existsSync } from "node:fs";
5
5
  //#region extensions/codex/src/app-server/computer-use.ts
@@ -1,9 +1,9 @@
1
1
  import { n as isJsonObject } from "./protocol-dh-ETiNd.js";
2
- import { H as readCodexNotificationTurnId, V as readCodexNotificationThreadId, d as resolveCodexAppServerRequestModelSelection, p as resolveCodexBindingModelProviderFallback, t as CODEX_NATIVE_PERSONALITY_NONE } from "./thread-lifecycle-CJdHuthD.js";
2
+ import { H as readCodexNotificationTurnId, V as readCodexNotificationThreadId, d as resolveCodexAppServerRequestModelSelection, p as resolveCodexBindingModelProviderFallback, t as CODEX_NATIVE_PERSONALITY_NONE } from "./thread-lifecycle-DtT3-ehU.js";
3
3
  import { d as resolveCodexAppServerRuntimeOptions, h as resolveOpenClawExecPolicyForCodexAppServer, i as codexSandboxPolicyForTurn, n as canUseCodexModelBackedApprovalsReviewerForModel, o as isCodexFastServiceTier, p as resolveCodexModelBackedReviewerPolicyContext } from "./config-CszD0vP3.js";
4
4
  import { r as assertCodexThreadStartResponse } from "./protocol-validators-B19q5BIX.js";
5
5
  import { a as normalizeCodexAppServerBindingModelProvider, i as isCodexAppServerNativeAuthProfile, l as writeCodexAppServerBinding, n as clearCodexAppServerBinding, o as readCodexAppServerBinding } from "./session-binding-HOuPt-E0.js";
6
- import { r as CODEX_CONTROL_METHODS } from "./plugin-app-cache-key-DX14mGOE.js";
6
+ import { r as CODEX_CONTROL_METHODS } from "./plugin-app-cache-key-C9ILt7bl.js";
7
7
  import { a as formatCodexDisplayText, t as resolveCodexAppServerForModelProvider } from "./app-server-policy-BPTiVNsW.js";
8
8
  import { a as getLeasedSharedCodexAppServerClient, o as releaseLeasedSharedCodexAppServerClient, p as resolveCodexAppServerAuthProfileIdForAgent } from "./shared-client-Dtx5i7Ez.js";
9
9
  import { n as resolveCodexNativeExecutionBlock, r as resolveCodexNativeSandboxBlock } from "./sandbox-guard-3tnjhjFb.js";
@@ -212,7 +212,7 @@ async function setCodexConversationModel(params) {
212
212
  modelProvider: response.modelProvider ?? modelSelection.modelProvider,
213
213
  approvalPolicy: binding.approvalPolicy,
214
214
  sandbox: binding.sandbox,
215
- serviceTier: binding.serviceTier ?? runtime.serviceTier
215
+ serviceTier: binding.serviceTier ?? runtime.serviceTier ?? void 0
216
216
  }, lookup);
217
217
  return `Codex model set to ${formatCodexDisplayText(response.model ?? model)}.`;
218
218
  }
@@ -1227,7 +1227,7 @@ async function writeThreadBindingFromResponse(params, resolved, response) {
1227
1227
  }),
1228
1228
  approvalPolicy: resolved.execPolicy?.touched ? runtimeApprovalPolicy : params.approvalPolicy ?? runtimeApprovalPolicy,
1229
1229
  sandbox: resolved.execPolicy?.touched ? resolved.runtime.sandbox : params.sandbox ?? resolved.runtime.sandbox,
1230
- serviceTier: params.serviceTier ?? resolved.runtime.serviceTier,
1230
+ serviceTier: params.serviceTier ?? resolved.runtime.serviceTier ?? void 0,
1231
1231
  networkProxyProfileName: resolved.runtime.networkProxy?.profileName,
1232
1232
  networkProxyConfigFingerprint: resolved.runtime.networkProxy?.configFingerprint
1233
1233
  }, { ...resolved.agentLookup });
@@ -1350,7 +1350,7 @@ async function runBoundTurn(params) {
1350
1350
  }),
1351
1351
  approvalPolicy: typeof approvalPolicy === "string" ? approvalPolicy : void 0,
1352
1352
  sandbox,
1353
- serviceTier,
1353
+ serviceTier: serviceTier ?? void 0,
1354
1354
  networkProxyProfileName: modelScopedRuntime.networkProxy?.profileName,
1355
1355
  networkProxyConfigFingerprint: modelScopedRuntime.networkProxy?.configFingerprint
1356
1356
  }, agentLookup);
package/dist/harness.js CHANGED
@@ -32,14 +32,14 @@ function createCodexAppServerAgentHarness(options) {
32
32
  };
33
33
  },
34
34
  runAttempt: async (params) => {
35
- const { runCodexAppServerAttempt } = await import("./run-attempt-4z6t1PlH.js");
35
+ const { runCodexAppServerAttempt } = await import("./run-attempt-DafK4VP9.js");
36
36
  return runCodexAppServerAttempt(params, {
37
37
  pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig,
38
38
  nativeHookRelay: { enabled: true }
39
39
  });
40
40
  },
41
41
  runSideQuestion: async (params) => {
42
- const { runCodexAppServerSideQuestion } = await import("./side-question-BO7GbMFO.js");
42
+ const { runCodexAppServerSideQuestion } = await import("./side-question-Di5YsbLx.js");
43
43
  return runCodexAppServerSideQuestion(params, {
44
44
  pluginConfig: options?.resolvePluginConfig?.() ?? options?.pluginConfig,
45
45
  nativeHookRelay: { enabled: true }
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { createCodexAppServerAgentHarness } from "./harness.js";
2
- import { F as ensureCodexPluginActivation, I as pluginReadParams, R as defaultCodexAppInventoryCache } from "./thread-lifecycle-CJdHuthD.js";
2
+ import { F as ensureCodexPluginActivation, I as pluginReadParams, R as defaultCodexAppInventoryCache } from "./thread-lifecycle-DtT3-ehU.js";
3
3
  import { d as resolveCodexAppServerRuntimeOptions, t as CODEX_PLUGINS_MARKETPLACE_NAME, u as readCodexPluginConfig } from "./config-CszD0vP3.js";
4
4
  import { t as buildCodexProvider } from "./provider-B-OHpbD3.js";
5
- import { t as buildCodexMediaUnderstandingProvider } from "./media-understanding-provider-DSQ2ry-4.js";
6
- import { i as describeControlFailure, n as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-DX14mGOE.js";
5
+ import { t as buildCodexMediaUnderstandingProvider } from "./media-understanding-provider-ZUQHN7gT.js";
6
+ import { i as describeControlFailure, n as buildCodexPluginAppCacheKey } from "./plugin-app-cache-key-C9ILt7bl.js";
7
7
  import { a as formatCodexDisplayText } from "./app-server-policy-BPTiVNsW.js";
8
8
  import { a as getLeasedSharedCodexAppServerClient, d as resolveCodexAppServerAuthAccountCacheKey, m as resolveCodexAppServerFallbackApiKeyCacheKey, o as releaseLeasedSharedCodexAppServerClient, p as resolveCodexAppServerAuthProfileIdForAgent, r as clearSharedCodexAppServerClientIfCurrentAndWait } from "./shared-client-Dtx5i7Ez.js";
9
- import { a as createCodexCliSessionNodeInvokePolicies, c as resolveCodexCliSessionForBindingOnNode, i as createCodexCliSessionNodeHostCommands, l as resumeCodexCliSessionOnNode, n as handleCodexConversationInboundClaim, s as listCodexCliSessionsOnNode, t as handleCodexConversationBindingResolved } from "./conversation-binding-CndXa45M.js";
9
+ import { a as createCodexCliSessionNodeInvokePolicies, c as resolveCodexCliSessionForBindingOnNode, i as createCodexCliSessionNodeHostCommands, l as resumeCodexCliSessionOnNode, n as handleCodexConversationInboundClaim, s as listCodexCliSessionsOnNode, t as handleCodexConversationBindingResolved } from "./conversation-binding-t0XMLz-j.js";
10
10
  import { t as requestCodexAppServerJson } from "./request-Dcd452Nk.js";
11
11
  import { t as createCodexWebSearchProviderBase } from "./web-search-provider.shared-BrZmlqyR.js";
12
12
  import { mutateConfigFile } from "openclaw/plugin-sdk/config-mutation";
@@ -52,7 +52,7 @@ async function handleCodexCommand(ctx, options = {}) {
52
52
  }
53
53
  }
54
54
  async function loadDefaultCodexSubcommandHandler() {
55
- const { handleCodexSubcommand } = await import("./command-handlers-CLJjbqL9.js");
55
+ const { handleCodexSubcommand } = await import("./command-handlers-DEPTJYk0.js");
56
56
  return handleCodexSubcommand;
57
57
  }
58
58
  //#endregion
@@ -1542,7 +1542,7 @@ function buildCodexMigrationProvider(params = {}) {
1542
1542
  //#region extensions/codex/src/web-search-provider.ts
1543
1543
  let codexWebSearchRuntimePromise;
1544
1544
  function loadCodexWebSearchRuntime() {
1545
- codexWebSearchRuntimePromise ??= import("./web-search-provider.runtime-CMEYazjn.js");
1545
+ codexWebSearchRuntimePromise ??= import("./web-search-provider.runtime-CkwxrXQj.js");
1546
1546
  return codexWebSearchRuntimePromise;
1547
1547
  }
1548
1548
  const CodexWebSearchSchema = {
@@ -1,7 +1,7 @@
1
1
  import { CODEX_PROVIDER_ID, FALLBACK_CODEX_MODELS } from "./provider-catalog.js";
2
2
  import { n as isJsonObject } from "./protocol-dh-ETiNd.js";
3
- import { N as mergeCodexThreadConfigs, r as buildCodexRuntimeThreadConfig } from "./thread-lifecycle-CJdHuthD.js";
4
- import { S as readCodexNotificationItem } from "./attempt-notifications-C3zROmkk.js";
3
+ import { N as mergeCodexThreadConfigs, r as buildCodexRuntimeThreadConfig } from "./thread-lifecycle-DtT3-ehU.js";
4
+ import { C as readCodexNotificationItem } from "./attempt-notifications-BYnndyFl.js";
5
5
  import { d as resolveCodexAppServerRuntimeOptions } from "./config-CszD0vP3.js";
6
6
  import { i as assertCodexTurnStartResponse, l as readCodexTurnCompletedNotification, o as readCodexErrorNotification, r as assertCodexThreadStartResponse } from "./protocol-validators-B19q5BIX.js";
7
7
  import { i as readModelListResult } from "./models-CAmfBWRl.js";
@@ -1,2 +1,2 @@
1
- import { t as buildCodexMediaUnderstandingProvider } from "./media-understanding-provider-DSQ2ry-4.js";
1
+ import { t as buildCodexMediaUnderstandingProvider } from "./media-understanding-provider-ZUQHN7gT.js";
2
2
  export { buildCodexMediaUnderstandingProvider };
@@ -1,4 +1,4 @@
1
- import { L as buildCodexAppInventoryCacheKey } from "./thread-lifecycle-CJdHuthD.js";
1
+ import { L as buildCodexAppInventoryCacheKey } from "./thread-lifecycle-DtT3-ehU.js";
2
2
  import { n as CodexAppServerRpcError } from "./client-CLrtWgrD.js";
3
3
  import { h as resolveCodexAppServerHomeDir } from "./shared-client-Dtx5i7Ez.js";
4
4
  import { createHash } from "node:crypto";
@@ -1,5 +1,5 @@
1
1
  import { n as isJsonObject } from "./protocol-dh-ETiNd.js";
2
- import { C as isForcedPrivateQaCodexRuntime, S as filterCodexDynamicTools, _ as resolveCodexWebSearchPlan, w as normalizeCodexDynamicToolName, x as sanitizeInlineImageDataUrl, y as invalidInlineImageText } from "./thread-lifecycle-CJdHuthD.js";
2
+ import { C as isForcedPrivateQaCodexRuntime, S as filterCodexDynamicTools, _ as resolveCodexWebSearchPlan, w as normalizeCodexDynamicToolName, x as sanitizeInlineImageDataUrl, y as invalidInlineImageText } from "./thread-lifecycle-DtT3-ehU.js";
3
3
  import { c as isTrustedCodexModelBackedOpenAIProvider, u as readCodexPluginConfig } from "./config-CszD0vP3.js";
4
4
  import { a as formatCodexDisplayText } from "./app-server-policy-BPTiVNsW.js";
5
5
  import { o as releaseLeasedSharedCodexAppServerClient } from "./shared-client-Dtx5i7Ez.js";
@@ -1,17 +1,17 @@
1
1
  import { n as isJsonObject, t as flattenCodexDynamicToolFunctions } from "./protocol-dh-ETiNd.js";
2
- import { A as resolveCodexContextEngineProjectionReserveTokens, D as fitCodexProjectedContextForTurnStart, E as resolveCodexDynamicToolsLoadingForRuntime, H as readCodexNotificationTurnId, M as buildCodexPluginThreadConfigInputFingerprint, N as mergeCodexThreadConfigs, O as projectContextEngineAssemblyForCodex, P as shouldBuildCodexPluginThreadConfig, R as defaultCodexAppInventoryCache, V as readCodexNotificationThreadId, _ as resolveCodexWebSearchPlan, a as buildDeveloperInstructions, b as sanitizeCodexHistoryImagePayloads, c as codexDynamicToolsFingerprint, f as resolveCodexAppServerThreadModelSelection, h as startOrResumeThread, i as buildContextEngineBinding, j as buildCodexPluginThreadConfig, k as resolveCodexContextEngineProjectionMaxChars, l as isContextEngineBindingCompatible, n as areCodexDynamicToolFingerprintsCompatible, o as buildTurnCollaborationMode, s as buildTurnStartParams, v as isCodexAppServerProfilerEnabled, z as describeCodexNotificationCorrelation } from "./thread-lifecycle-CJdHuthD.js";
3
- import { C as readNotificationItemId, E as updateActiveTurnItemIds, S as readCodexNotificationItem, T as shouldDisarmAssistantCompletionIdleWatch, _ as isReasoningItemCompletionNotification, a as isCodexNotificationOutsideActiveRun, b as isTerminalTurnStatus, c as isCurrentThreadOptionalTurnRequestParams, d as isNativeResponseStreamDeltaNotification, f as isNativeToolProgressNotification, g as isRawToolOutputCompletionNotification, h as isRawReasoningCompletionNotification, i as isAssistantCompletionReleaseNotification, l as isCurrentThreadTurnRequestParams, m as isRawAssistantProgressNotification, n as describeNotificationActivity, o as isCodexTurnAbortMarkerNotification, p as isPendingOpenClawDynamicToolCompletionNotification, r as isAssistantCommentaryCompletionNotification, s as isCurrentApprovalTurnRequestParams, t as codexExecutionToolName, u as isFileChangePatchUpdatedNotification, v as isReasoningProgressNotification, w as readRawResponseToolCallId, x as isTurnNotification, y as isRetryableErrorNotification } from "./attempt-notifications-C3zROmkk.js";
2
+ import { A as resolveCodexContextEngineProjectionReserveTokens, D as fitCodexProjectedContextForTurnStart, E as resolveCodexDynamicToolsLoadingForRuntime, H as readCodexNotificationTurnId, M as buildCodexPluginThreadConfigInputFingerprint, N as mergeCodexThreadConfigs, O as projectContextEngineAssemblyForCodex, P as shouldBuildCodexPluginThreadConfig, R as defaultCodexAppInventoryCache, V as readCodexNotificationThreadId, _ as resolveCodexWebSearchPlan, a as buildDeveloperInstructions, b as sanitizeCodexHistoryImagePayloads, c as codexDynamicToolsFingerprint, f as resolveCodexAppServerThreadModelSelection, h as startOrResumeThread, i as buildContextEngineBinding, j as buildCodexPluginThreadConfig, k as resolveCodexContextEngineProjectionMaxChars, l as isContextEngineBindingCompatible, n as areCodexDynamicToolFingerprintsCompatible, o as buildTurnCollaborationMode, s as buildTurnStartParams, v as isCodexAppServerProfilerEnabled, z as describeCodexNotificationCorrelation } from "./thread-lifecycle-DtT3-ehU.js";
3
+ import { C as readCodexNotificationItem, D as updateActiveTurnItemIds, E as shouldDisarmAssistantCompletionIdleWatch, S as isTurnNotification, T as readRawResponseToolCallId, _ as isRawToolOutputCompletionNotification, a as isCodexNotificationOutsideActiveRun, b as isRetryableErrorNotification, c as isCurrentThreadOptionalTurnRequestParams, d as isNativeResponseStreamDeltaNotification, f as isNativeToolProgressNotification, g as isRawReasoningCompletionNotification, h as isRawFunctionToolOutputCompletionNotification, i as isAssistantCompletionReleaseNotification, l as isCurrentThreadTurnRequestParams, m as isRawAssistantProgressNotification, n as describeNotificationActivity, o as isCodexTurnAbortMarkerNotification, p as isPendingOpenClawDynamicToolCompletionNotification, r as isAssistantCommentaryCompletionNotification, s as isCurrentApprovalTurnRequestParams, t as codexExecutionToolName, u as isFileChangePatchUpdatedNotification, v as isReasoningItemCompletionNotification, w as readNotificationItemId, x as isTerminalTurnStatus, y as isReasoningProgressNotification } from "./attempt-notifications-BYnndyFl.js";
4
4
  import { _ as withMcpElicitationsApprovalPolicy, a as isCodexAppServerApprovalPolicyAllowedByRequirements, d as resolveCodexAppServerRuntimeOptions, f as resolveCodexComputerUseConfig, g as shouldAutoApproveCodexAppServerApprovals, h as resolveOpenClawExecPolicyForCodexAppServer, m as resolveCodexPluginsPolicy, p as resolveCodexModelBackedReviewerPolicyContext, s as isCodexSandboxExecServerEnabled, u as readCodexPluginConfig } from "./config-CszD0vP3.js";
5
5
  import { a as readCodexDynamicToolCallParams, c as readCodexTurn, i as assertCodexTurnStartResponse } from "./protocol-validators-B19q5BIX.js";
6
6
  import { i as formatCodexUsageLimitErrorMessage, o as resolveCodexUsageLimitResetAtMs, s as shouldRefreshCodexRateLimitsForUsageLimitMessage } from "./provider-B-OHpbD3.js";
7
7
  import { a as isCodexAppServerConnectionClosedError, i as isCodexAppServerApprovalRequest, n as CodexAppServerRpcError, r as compareCodexAppServerVersions, s as MIN_CODEX_SANDBOX_EXEC_SERVER_APP_SERVER_VERSION } from "./client-CLrtWgrD.js";
8
8
  import { i as isCodexAppServerNativeAuthProfile, l as writeCodexAppServerBinding, n as clearCodexAppServerBinding, o as readCodexAppServerBinding, r as clearCodexAppServerBindingForThread } from "./session-binding-HOuPt-E0.js";
9
- import { n as buildCodexPluginAppCacheKey, r as CODEX_CONTROL_METHODS, t as buildCodexAppServerRuntimeFingerprint } from "./plugin-app-cache-key-DX14mGOE.js";
9
+ import { n as buildCodexPluginAppCacheKey, r as CODEX_CONTROL_METHODS, t as buildCodexAppServerRuntimeFingerprint } from "./plugin-app-cache-key-C9ILt7bl.js";
10
10
  import { a as formatCodexDisplayText, n as resolveCodexAppServerForOpenClawToolPolicy, t as resolveCodexAppServerForModelProvider } from "./app-server-policy-BPTiVNsW.js";
11
11
  import { d as resolveCodexAppServerAuthAccountCacheKey, f as resolveCodexAppServerAuthProfileId, h as resolveCodexAppServerHomeDir, m as resolveCodexAppServerFallbackApiKeyCacheKey, n as clearSharedCodexAppServerClientIfCurrentAndUnclaimed, o as releaseLeasedSharedCodexAppServerClient, p as resolveCodexAppServerAuthProfileIdForAgent, s as retireSharedCodexAppServerClientIfCurrent, t as clearSharedCodexAppServerClientIfCurrent, u as refreshCodexAppServerAuthTokens } from "./shared-client-Dtx5i7Ez.js";
12
12
  import { t as defaultLeasedCodexAppServerClientFactory } from "./client-factory-Bm6HsGob.js";
13
- import { A as CODEX_POST_REASONING_REPLY_IDLE_TIMEOUT_MS, C as resolveCodexMessageToolProvider, D as shouldWarnCodexDynamicToolBuildStageSummary, E as shouldRequireCodexSandboxExecServerEnvironment, F as resolveCodexTurnTerminalIdleTimeoutMs, I as withCodexStartupTimeout, M as resolveCodexStartupTimeoutMs, N as resolveCodexTurnAssistantCompletionIdleTimeoutMs, P as resolveCodexTurnCompletionIdleTimeoutMs, S as resolveCodexExternalSandboxPolicyForOpenClawSandbox, T as shouldEnableCodexAppServerNativeToolSurface, _ as createCodexDynamicToolBuildStageTracker, a as buildCodexNativeHookRelayConfig, b as resolveCodexAppServerExecutionCwd, c as resolveCodexNativeHookRelayEvents, d as handleCodexAppServerElicitationRequest, f as createCodexDynamicToolBridge, g as buildDynamicTools, h as emitDynamicToolTerminalDiagnostic, i as CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS, j as resolveCodexPostToolRawAssistantCompletionIdleTimeoutMs, k as handleCodexAppServerApprovalRequest, l as resolveCodexNativeHookRelayTtlMs, m as emitDynamicToolStartedDiagnostic, o as buildCodexNativeHookRelayDisabledConfig, p as emitDynamicToolErrorDiagnostic, s as createCodexNativeHookRelay, t as resolveCodexProviderWebSearchSupport, u as scheduleCodexNativeHookRelayUnregister, v as disableCodexPluginThreadConfig, w as resolveCodexSandboxEnvironmentSelection, x as resolveCodexAppServerHookChannelId, y as formatCodexDynamicToolBuildStageSummary } from "./provider-capabilities-D2Ee9YEI.js";
14
- import { t as ensureCodexComputerUse } from "./computer-use-BViK8fu1.js";
13
+ import { A as CODEX_POST_REASONING_REPLY_IDLE_TIMEOUT_MS, C as resolveCodexMessageToolProvider, D as shouldWarnCodexDynamicToolBuildStageSummary, E as shouldRequireCodexSandboxExecServerEnvironment, F as resolveCodexTurnTerminalIdleTimeoutMs, I as withCodexStartupTimeout, M as resolveCodexStartupTimeoutMs, N as resolveCodexTurnAssistantCompletionIdleTimeoutMs, P as resolveCodexTurnCompletionIdleTimeoutMs, S as resolveCodexExternalSandboxPolicyForOpenClawSandbox, T as shouldEnableCodexAppServerNativeToolSurface, _ as createCodexDynamicToolBuildStageTracker, a as buildCodexNativeHookRelayConfig, b as resolveCodexAppServerExecutionCwd, c as resolveCodexNativeHookRelayEvents, d as handleCodexAppServerElicitationRequest, f as createCodexDynamicToolBridge, g as buildDynamicTools, h as emitDynamicToolTerminalDiagnostic, i as CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS, j as resolveCodexPostToolRawAssistantCompletionIdleTimeoutMs, k as handleCodexAppServerApprovalRequest, l as resolveCodexNativeHookRelayTtlMs, m as emitDynamicToolStartedDiagnostic, o as buildCodexNativeHookRelayDisabledConfig, p as emitDynamicToolErrorDiagnostic, s as createCodexNativeHookRelay, t as resolveCodexProviderWebSearchSupport, u as scheduleCodexNativeHookRelayUnregister, v as disableCodexPluginThreadConfig, w as resolveCodexSandboxEnvironmentSelection, x as resolveCodexAppServerHookChannelId, y as formatCodexDynamicToolBuildStageSummary } from "./provider-capabilities-D-8g7Lb2.js";
14
+ import { t as ensureCodexComputerUse } from "./computer-use-ClrJwoFp.js";
15
15
  import { n as rememberCodexRateLimits, t as readRecentCodexRateLimits } from "./rate-limit-cache-C7qmZ0Jh.js";
16
16
  import fs from "node:fs/promises";
17
17
  import path, { posix } from "node:path";
@@ -21,7 +21,7 @@ import { createHash, randomUUID } from "node:crypto";
21
21
  import fsSync from "node:fs";
22
22
  import { markAuthProfileBlockedUntil, resolveAgentDir, resolveAgentWorkspaceDir } from "openclaw/plugin-sdk/agent-runtime";
23
23
  import { loadExecApprovals } from "openclaw/plugin-sdk/exec-approvals-runtime";
24
- import { CODEX_APP_SERVER_CONTEXT_ENGINE_HOST, TOOL_PROGRESS_OUTPUT_MAX_CHARS, acquireSessionWriteLock, appendSessionTranscriptMessage, assembleHarnessContextEngine, assertContextEngineHostSupport, awaitAgentEndSideEffects, bootstrapHarnessContextEngine, buildBootstrapContextForFiles, buildHarnessContextEngineRuntimeContext, buildHarnessContextEngineRuntimeContextFromUsage, classifyAgentHarnessTerminalOutcome, clearActiveEmbeddedRun, embeddedAgentLog, emitAgentEvent, emitSessionTranscriptUpdate, finalizeHarnessContextEngineTurn, formatErrorMessage, formatToolAggregate, formatToolProgressOutput, getAgentHarnessHookRunner, getBeforeToolCallPolicyDiagnosticState, inferToolMetaFromArgs, isActiveHarnessContextEngine, loadCodexBundleMcpThreadConfig, normalizeUsage, resolveAgentHarnessBeforePromptBuildResult, resolveBootstrapFilesForRun, resolveContextEngineOwnerPluginId, resolveSandboxContext, resolveSessionAgentIds as resolveSessionAgentIds$1, resolveSessionWriteLockOptions, resolveUserPath, runAgentCleanupStep, runAgentEndSideEffects, runAgentHarnessAfterCompactionHook, runAgentHarnessAfterToolCallHook, runAgentHarnessBeforeCompactionHook, runAgentHarnessBeforeMessageWriteHook, runAgentHarnessLlmInputHook, runAgentHarnessLlmOutputHook, runHarnessContextEngineMaintenance, setActiveEmbeddedRun, supportsModelTools } from "openclaw/plugin-sdk/agent-harness-runtime";
24
+ import { CODEX_APP_SERVER_CONTEXT_ENGINE_HOST, FAST_MODE_AUTO_PROGRESS_KIND, TOOL_PROGRESS_OUTPUT_MAX_CHARS, acquireSessionWriteLock, appendSessionTranscriptMessage, assembleHarnessContextEngine, assertContextEngineHostSupport, awaitAgentEndSideEffects, bootstrapHarnessContextEngine, buildBootstrapContextForFiles, buildHarnessContextEngineRuntimeContext, buildHarnessContextEngineRuntimeContextFromUsage, classifyAgentHarnessTerminalOutcome, clearActiveEmbeddedRun, embeddedAgentLog, emitAgentEvent, emitSessionTranscriptUpdate, finalizeHarnessContextEngineTurn, formatErrorMessage, formatFastModeAutoProgressText, formatToolAggregate, formatToolProgressOutput, getAgentHarnessHookRunner, getBeforeToolCallPolicyDiagnosticState, inferToolMetaFromArgs, isActiveHarnessContextEngine, loadCodexBundleMcpThreadConfig, normalizeUsage, resolveAgentHarnessBeforePromptBuildResult, resolveBootstrapFilesForRun, resolveContextEngineOwnerPluginId, resolveFastModeForElapsed, resolveSandboxContext, resolveSessionAgentIds as resolveSessionAgentIds$1, resolveSessionWriteLockOptions, resolveUserPath, runAgentCleanupStep, runAgentEndSideEffects, runAgentHarnessAfterCompactionHook, runAgentHarnessAfterToolCallHook, runAgentHarnessBeforeCompactionHook, runAgentHarnessBeforeMessageWriteHook, runAgentHarnessLlmInputHook, runAgentHarnessLlmOutputHook, runHarnessContextEngineMaintenance, setActiveEmbeddedRun, supportsModelTools } from "openclaw/plugin-sdk/agent-harness-runtime";
25
25
  import { buildMemorySystemPromptAddition } from "openclaw/plugin-sdk/core";
26
26
  import { spawn } from "node:child_process";
27
27
  import { once } from "node:events";
@@ -4140,7 +4140,7 @@ var CodexAppServerEventProjector = class {
4140
4140
  phase: "start",
4141
4141
  item
4142
4142
  });
4143
- this.emitNormalizedToolItemEvent({
4143
+ await this.emitNormalizedToolItemEvent({
4144
4144
  phase: "start",
4145
4145
  item
4146
4146
  });
@@ -4219,7 +4219,7 @@ var CodexAppServerEventProjector = class {
4219
4219
  phase: "end",
4220
4220
  item
4221
4221
  });
4222
- this.emitNormalizedToolItemEvent({
4222
+ await this.emitNormalizedToolItemEvent({
4223
4223
  phase: "result",
4224
4224
  item
4225
4225
  });
@@ -4326,7 +4326,7 @@ var CodexAppServerEventProjector = class {
4326
4326
  });
4327
4327
  }
4328
4328
  this.recordToolMeta(item);
4329
- this.emitSnapshotOnlyNativeToolProgress(item);
4329
+ await this.emitSnapshotOnlyNativeToolProgress(item);
4330
4330
  this.recordNativeToolTranscriptCall(item);
4331
4331
  this.recordNativeToolTranscriptResult(item);
4332
4332
  this.emitAfterToolCallObservation(item);
@@ -4336,14 +4336,14 @@ var CodexAppServerEventProjector = class {
4336
4336
  this.activeCompactionItemIds.clear();
4337
4337
  await this.maybeEndReasoning();
4338
4338
  }
4339
- emitSnapshotOnlyNativeToolProgress(item) {
4339
+ async emitSnapshotOnlyNativeToolProgress(item) {
4340
4340
  if (!shouldSynthesizeToolProgressForItem(item) || !this.isCurrentTurnSnapshotItem(item) || this.completedItemIds.has(item.id) || itemStatus(item) === "running") return;
4341
4341
  if (!this.activeItemIds.has(item.id)) {
4342
4342
  this.emitStandardItemEvent({
4343
4343
  phase: "start",
4344
4344
  item
4345
4345
  });
4346
- this.emitNormalizedToolItemEvent({
4346
+ await this.emitNormalizedToolItemEvent({
4347
4347
  phase: "start",
4348
4348
  item
4349
4349
  });
@@ -4353,7 +4353,7 @@ var CodexAppServerEventProjector = class {
4353
4353
  phase: "end",
4354
4354
  item
4355
4355
  });
4356
- this.emitNormalizedToolItemEvent({
4356
+ await this.emitNormalizedToolItemEvent({
4357
4357
  phase: "result",
4358
4358
  item
4359
4359
  });
@@ -4545,7 +4545,7 @@ var CodexAppServerEventProjector = class {
4545
4545
  }
4546
4546
  });
4547
4547
  }
4548
- emitNormalizedToolItemEvent(params) {
4548
+ async emitNormalizedToolItemEvent(params) {
4549
4549
  const { item } = params;
4550
4550
  if (!item || !shouldSynthesizeToolProgressForItem(item)) return;
4551
4551
  const name = itemName(item);
@@ -4573,7 +4573,10 @@ var CodexAppServerEventProjector = class {
4573
4573
  status
4574
4574
  });
4575
4575
  if (!shouldEmitTranscriptToolProgress(name, args)) {
4576
- if (params.phase === "result") this.emitAfterToolCallObservation(item);
4576
+ if (params.phase === "result") {
4577
+ this.emitAfterToolCallObservation(item);
4578
+ await this.options.onNativeToolResultRecorded?.();
4579
+ }
4577
4580
  return;
4578
4581
  }
4579
4582
  this.emitAgentEvent({
@@ -4592,7 +4595,10 @@ var CodexAppServerEventProjector = class {
4592
4595
  } : {}
4593
4596
  }
4594
4597
  });
4595
- if (params.phase === "result") this.emitAfterToolCallObservation(item);
4598
+ if (params.phase === "result") {
4599
+ this.emitAfterToolCallObservation(item);
4600
+ await this.options.onNativeToolResultRecorded?.();
4601
+ }
4596
4602
  }
4597
4603
  clearTerminalPresentationForNativeItem(item) {
4598
4604
  if (!item || this.terminalPresentationClearedItemIds.has(item.id) || !shouldClearTerminalPresentationForNativeItem(item)) return;
@@ -7592,6 +7598,19 @@ const CODEX_NATIVE_HOOK_RELAY_RENEW_INTERVAL_MS = 6e4;
7592
7598
  const CODEX_APP_SERVER_PROJECTED_CHARS_PER_TOKEN = 4;
7593
7599
  const CODEX_APP_SERVER_ACTIVE_NATIVE_TURN_WAIT_TIMEOUT_MS = 3e4;
7594
7600
  const ensuredCodexWorkspaceDirs = /* @__PURE__ */ new Set();
7601
+ function withCodexAppServerFastModeServiceTier(appServer, params) {
7602
+ const fastMode = typeof params.fastMode === "function" ? params.fastMode() : params.fastMode;
7603
+ const serviceTier = fastMode === void 0 ? appServer.serviceTier : fastMode ? "priority" : void 0;
7604
+ if (serviceTier === appServer.serviceTier) return appServer;
7605
+ if (serviceTier) return {
7606
+ ...appServer,
7607
+ serviceTier
7608
+ };
7609
+ return {
7610
+ ...appServer,
7611
+ serviceTier: null
7612
+ };
7613
+ }
7595
7614
  function estimateCodexAppServerProjectedTurnTokens(params) {
7596
7615
  const inputChars = params.prompt.length + (params.developerInstructions?.length ?? 0);
7597
7616
  return Math.max(1, Math.ceil(inputChars / CODEX_APP_SERVER_PROJECTED_CHARS_PER_TOKEN));
@@ -7609,7 +7628,7 @@ async function ensureCodexWorkspaceDirOnce(workspaceDir) {
7609
7628
  await fs.mkdir(normalized, { recursive: true });
7610
7629
  ensuredCodexWorkspaceDirs.add(normalized);
7611
7630
  }
7612
- function emitCodexAppServerEvent(params, event) {
7631
+ async function emitCodexAppServerEvent(params, event) {
7613
7632
  try {
7614
7633
  emitAgentEvent({
7615
7634
  runId: params.runId,
@@ -7621,10 +7640,7 @@ function emitCodexAppServerEvent(params, event) {
7621
7640
  embeddedAgentLog.debug("codex app-server global agent event emit failed", { error });
7622
7641
  }
7623
7642
  try {
7624
- const maybePromise = params.onAgentEvent?.(event);
7625
- Promise.resolve(maybePromise).catch((error) => {
7626
- embeddedAgentLog.debug("codex app-server agent event handler rejected", { error });
7627
- });
7643
+ await params.onAgentEvent?.(event);
7628
7644
  } catch (error) {
7629
7645
  embeddedAgentLog.debug("codex app-server agent event handler threw", { error });
7630
7646
  }
@@ -7689,6 +7705,11 @@ async function runCodexAppServerAttempt(params, options = {}) {
7689
7705
  const codexModelCallTrace = freezeDiagnosticTraceContext(createDiagnosticTraceContextFromActiveScope());
7690
7706
  const codexModelContentCapture = resolveDiagnosticModelContentCapturePolicy(params.config);
7691
7707
  const codexModelCallId = `${params.runId}:codex-model:1`;
7708
+ const fastModeAutoStartedAtMs = typeof params.fastModeStartedAtMs === "number" && Number.isFinite(params.fastModeStartedAtMs) ? params.fastModeStartedAtMs : void 0;
7709
+ const fastModeAutoProgressState = params.fastModeAutoProgressState ?? {
7710
+ offAnnounced: false,
7711
+ resetAnnounced: false
7712
+ };
7692
7713
  const preDynamicStartupStages = createCodexDynamicToolBuildStageTracker({ enabled: profilerEnabled });
7693
7714
  const attemptClientFactory = options.clientFactory ?? defaultLeasedCodexAppServerClientFactory;
7694
7715
  const pluginConfig = readCodexPluginConfig(options.pluginConfig);
@@ -7964,7 +7985,9 @@ async function runCodexAppServerAttempt(params, options = {}) {
7964
7985
  onYieldDetected: () => {
7965
7986
  yieldDetected = true;
7966
7987
  },
7967
- onCodexAppServerEvent: (event) => emitCodexAppServerEvent(params, event),
7988
+ onCodexAppServerEvent: (event) => {
7989
+ emitCodexAppServerEvent(params, event);
7990
+ },
7968
7991
  onPersistentWebSearchPolicyResolved: (allowed) => {
7969
7992
  persistentWebSearchAllowed = allowed;
7970
7993
  },
@@ -7993,7 +8016,9 @@ async function runCodexAppServerAttempt(params, options = {}) {
7993
8016
  onYieldDetected: () => {
7994
8017
  yieldDetected = true;
7995
8018
  },
7996
- onCodexAppServerEvent: (event) => emitCodexAppServerEvent(params, event)
8019
+ onCodexAppServerEvent: (event) => {
8020
+ emitCodexAppServerEvent(params, event);
8021
+ }
7997
8022
  }),
7998
8023
  signal: runAbortController.signal,
7999
8024
  loading: resolveCodexDynamicToolsLoadingForRuntime(pluginConfig, params.modelId, { connectionClass: appServer.connectionClass }),
@@ -8432,9 +8457,11 @@ async function runCodexAppServerAttempt(params, options = {}) {
8432
8457
  stream: "codex_app_server.lifecycle",
8433
8458
  data: { phase: "startup" }
8434
8459
  });
8460
+ const attemptAppServer = withCodexAppServerFastModeServiceTier(appServer, params);
8461
+ pluginAppServer = attemptAppServer;
8435
8462
  const startupResult = await startCodexAttemptThread({
8436
8463
  attemptClientFactory,
8437
- appServer,
8464
+ appServer: attemptAppServer,
8438
8465
  pluginConfig,
8439
8466
  computerUseConfig,
8440
8467
  startupAuthProfileId,
@@ -8702,6 +8729,53 @@ async function runCodexAppServerAttempt(params, options = {}) {
8702
8729
  emitExecutionPhaseOnce
8703
8730
  });
8704
8731
  };
8732
+ const emitFastModeAutoProgress = async (payload) => {
8733
+ const summary = formatFastModeAutoProgressText(payload);
8734
+ await emitCodexAppServerEvent(params, {
8735
+ stream: "item",
8736
+ data: {
8737
+ kind: "status",
8738
+ title: "Fast",
8739
+ phase: "update",
8740
+ summary
8741
+ }
8742
+ });
8743
+ try {
8744
+ await params.onToolResult?.({
8745
+ text: summary,
8746
+ channelData: { openclawProgressKind: FAST_MODE_AUTO_PROGRESS_KIND }
8747
+ });
8748
+ } catch (error) {
8749
+ embeddedAgentLog.debug("codex app-server fast mode auto progress delivery failed", { error });
8750
+ }
8751
+ };
8752
+ const maybeAnnounceFastModeAutoOff = async () => {
8753
+ if (params.fastModeAuto !== true || fastModeAutoStartedAtMs === void 0 || fastModeAutoProgressState.offAnnounced) return;
8754
+ const next = resolveFastModeForElapsed({
8755
+ mode: "auto",
8756
+ startedAtMs: fastModeAutoStartedAtMs,
8757
+ fastAutoOnSeconds: params.fastModeAutoOnSeconds
8758
+ });
8759
+ if (next.enabled) return;
8760
+ fastModeAutoProgressState.offAnnounced = true;
8761
+ await emitFastModeAutoProgress(next);
8762
+ };
8763
+ const maybeEmitFastModeAutoReset = async () => {
8764
+ if (params.fastModeAuto !== true || !fastModeAutoProgressState.offAnnounced || fastModeAutoProgressState.resetAnnounced) return;
8765
+ fastModeAutoProgressState.resetAnnounced = true;
8766
+ await emitFastModeAutoProgress({
8767
+ enabled: true,
8768
+ elapsedSeconds: 0,
8769
+ fastAutoOnSeconds: params.fastModeAutoOnSeconds
8770
+ });
8771
+ };
8772
+ const maybeEmitFastModeAutoResetBestEffort = async () => {
8773
+ try {
8774
+ await maybeEmitFastModeAutoReset();
8775
+ } catch (error) {
8776
+ embeddedAgentLog.warn(`codex app-server fast mode auto reset progress failed: ${formatErrorMessage(error)}`);
8777
+ }
8778
+ };
8705
8779
  const isTerminalTurnNotificationForTurn = (notification, notificationTurnId) => isTerminalCodexTurnNotificationForTurn({
8706
8780
  notification,
8707
8781
  threadId: thread.threadId,
@@ -8737,6 +8811,7 @@ async function runCodexAppServerAttempt(params, options = {}) {
8737
8811
  try {
8738
8812
  await waitForCodexNotificationDispatchTurn();
8739
8813
  await projector.handleNotification(notification);
8814
+ if (notificationState.isCurrentTurnNotification && activeTurnItemIds.size === 0 && isRawFunctionToolOutputCompletionNotification(notification)) await maybeAnnounceFastModeAutoOff();
8740
8815
  } catch (error) {
8741
8816
  embeddedAgentLog.debug("codex app-server projector notification threw", {
8742
8817
  method: notification.method,
@@ -9124,10 +9199,12 @@ async function runCodexAppServerAttempt(params, options = {}) {
9124
9199
  throw error;
9125
9200
  };
9126
9201
  const startCodexTurn = async () => {
9202
+ const turnAppServer = withCodexAppServerFastModeServiceTier(pluginAppServer, params);
9203
+ pluginAppServer = turnAppServer;
9127
9204
  const turnStartParams = buildTurnStartParams(params, {
9128
9205
  threadId: thread.threadId,
9129
9206
  cwd: codexExecutionCwd,
9130
- appServer: pluginAppServer,
9207
+ appServer: turnAppServer,
9131
9208
  promptText: codexTurnPromptText,
9132
9209
  sandboxPolicy: codexSandboxPolicy,
9133
9210
  environmentSelection: codexEnvironmentSelection,
@@ -9375,7 +9452,8 @@ async function runCodexAppServerAttempt(params, options = {}) {
9375
9452
  });
9376
9453
  projectorRef.current = new CodexAppServerEventProjector(dynamicToolParams, thread.threadId, activeTurnId, {
9377
9454
  nativePostToolUseRelayEnabled: nativeHookRelay?.allowedEvents.includes("post_tool_use") === true && nativeHookRelay.shouldRelayEvent("post_tool_use"),
9378
- trajectoryRecorder
9455
+ trajectoryRecorder,
9456
+ onNativeToolResultRecorded: maybeAnnounceFastModeAutoOff
9379
9457
  });
9380
9458
  if (isTerminalTurnStatus(turn.turn.status) || pendingNotifications.some((notification) => isTerminalTurnNotificationForTurn(notification, activeTurnId))) terminalTurnNotificationQueued = true;
9381
9459
  const closeCleanup = client.addCloseHandler?.(() => {
@@ -9654,6 +9732,7 @@ async function runCodexAppServerAttempt(params, options = {}) {
9654
9732
  systemPromptReport
9655
9733
  };
9656
9734
  } finally {
9735
+ if (params.isFinalFallbackAttempt !== false) await maybeEmitFastModeAutoResetBestEffort();
9657
9736
  codexModelCallDiagnostics.emitError("codex app-server run completed without model-call terminal event");
9658
9737
  emitLifecycleTerminal({
9659
9738
  phase: "error",
@@ -1,5 +1,5 @@
1
1
  import { n as isJsonObject } from "./protocol-dh-ETiNd.js";
2
- import { H as readCodexNotificationTurnId, N as mergeCodexThreadConfigs, S as filterCodexDynamicTools, T as resolveCodexDynamicToolsLoading, V as readCodexNotificationThreadId, _ as resolveCodexWebSearchPlan, d as resolveCodexAppServerRequestModelSelection, m as resolveReasoningEffort, p as resolveCodexBindingModelProviderFallback, r as buildCodexRuntimeThreadConfig, t as CODEX_NATIVE_PERSONALITY_NONE, u as resolveCodexAppServerModelProvider } from "./thread-lifecycle-CJdHuthD.js";
2
+ import { H as readCodexNotificationTurnId, N as mergeCodexThreadConfigs, S as filterCodexDynamicTools, T as resolveCodexDynamicToolsLoading, V as readCodexNotificationThreadId, _ as resolveCodexWebSearchPlan, d as resolveCodexAppServerRequestModelSelection, m as resolveReasoningEffort, p as resolveCodexBindingModelProviderFallback, r as buildCodexRuntimeThreadConfig, t as CODEX_NATIVE_PERSONALITY_NONE, u as resolveCodexAppServerModelProvider } from "./thread-lifecycle-DtT3-ehU.js";
3
3
  import { d as resolveCodexAppServerRuntimeOptions, g as shouldAutoApproveCodexAppServerApprovals, h as resolveOpenClawExecPolicyForCodexAppServer, n as canUseCodexModelBackedApprovalsReviewerForModel, p as resolveCodexModelBackedReviewerPolicyContext, u as readCodexPluginConfig } from "./config-CszD0vP3.js";
4
4
  import { a as readCodexDynamicToolCallParams, c as readCodexTurn, i as assertCodexTurnStartResponse, t as assertCodexThreadForkResponse } from "./protocol-validators-B19q5BIX.js";
5
5
  import { i as formatCodexUsageLimitErrorMessage } from "./provider-B-OHpbD3.js";
@@ -8,7 +8,7 @@ import { i as isCodexAppServerNativeAuthProfile, o as readCodexAppServerBinding
8
8
  import { t as resolveCodexAppServerForModelProvider } from "./app-server-policy-BPTiVNsW.js";
9
9
  import { a as getLeasedSharedCodexAppServerClient, o as releaseLeasedSharedCodexAppServerClient, u as refreshCodexAppServerAuthTokens } from "./shared-client-Dtx5i7Ez.js";
10
10
  import { n as resolveCodexNativeExecutionBlock } from "./sandbox-guard-3tnjhjFb.js";
11
- import { C as resolveCodexMessageToolProvider, O as filterToolsForVisionInputs, T as shouldEnableCodexAppServerNativeToolSurface, a as buildCodexNativeHookRelayConfig, d as handleCodexAppServerElicitationRequest, f as createCodexDynamicToolBridge, h as emitDynamicToolTerminalDiagnostic, k as handleCodexAppServerApprovalRequest, m as emitDynamicToolStartedDiagnostic, n as resolveCodexProviderWebSearchSupportForClient, o as buildCodexNativeHookRelayDisabledConfig, p as emitDynamicToolErrorDiagnostic, r as CODEX_NATIVE_HOOK_RELAY_EVENTS } from "./provider-capabilities-D2Ee9YEI.js";
11
+ import { C as resolveCodexMessageToolProvider, O as filterToolsForVisionInputs, T as shouldEnableCodexAppServerNativeToolSurface, a as buildCodexNativeHookRelayConfig, d as handleCodexAppServerElicitationRequest, f as createCodexDynamicToolBridge, h as emitDynamicToolTerminalDiagnostic, k as handleCodexAppServerApprovalRequest, m as emitDynamicToolStartedDiagnostic, n as resolveCodexProviderWebSearchSupportForClient, o as buildCodexNativeHookRelayDisabledConfig, p as emitDynamicToolErrorDiagnostic, r as CODEX_NATIVE_HOOK_RELAY_EVENTS } from "./provider-capabilities-D-8g7Lb2.js";
12
12
  import { n as rememberCodexRateLimits, t as readRecentCodexRateLimits } from "./rate-limit-cache-C7qmZ0Jh.js";
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";
@@ -1909,7 +1909,7 @@ function buildThreadStartParams(params, options) {
1909
1909
  approvalPolicy: options.appServer.approvalPolicy,
1910
1910
  approvalsReviewer: options.appServer.approvalsReviewer,
1911
1911
  ...codexThreadSandboxOrPermissions(options.appServer),
1912
- ...options.appServer.serviceTier ? { serviceTier: options.appServer.serviceTier } : {},
1912
+ ...options.appServer.serviceTier !== void 0 ? { serviceTier: options.appServer.serviceTier } : {},
1913
1913
  personality: CODEX_NATIVE_PERSONALITY_NONE,
1914
1914
  serviceName: "OpenClaw",
1915
1915
  config: buildCodexRuntimeThreadConfigForRun(params, options.config, {
@@ -1959,7 +1959,7 @@ function buildThreadResumeParams(params, options) {
1959
1959
  approvalPolicy: options.appServer.approvalPolicy,
1960
1960
  approvalsReviewer: options.appServer.approvalsReviewer,
1961
1961
  ...codexThreadSandboxOrPermissions(options.appServer),
1962
- ...options.appServer.serviceTier ? { serviceTier: options.appServer.serviceTier } : {},
1962
+ ...options.appServer.serviceTier !== void 0 ? { serviceTier: options.appServer.serviceTier } : {},
1963
1963
  personality: CODEX_NATIVE_PERSONALITY_NONE,
1964
1964
  config: buildCodexRuntimeThreadConfigForRun(params, options.config, {
1965
1965
  nativeCodeModeEnabled: options.nativeCodeModeEnabled,
@@ -2081,7 +2081,7 @@ function buildTurnStartParams(params, options) {
2081
2081
  ...useThreadPermissionProfile ? {} : { sandboxPolicy: options.sandboxPolicy ?? codexSandboxPolicyForTurn(options.appServer.sandbox, options.cwd) },
2082
2082
  model: modelSelection.model,
2083
2083
  personality: CODEX_NATIVE_PERSONALITY_NONE,
2084
- ...options.appServer.serviceTier ? { serviceTier: options.appServer.serviceTier } : {},
2084
+ ...options.appServer.serviceTier !== void 0 ? { serviceTier: options.appServer.serviceTier } : {},
2085
2085
  effort: resolveReasoningEffort(params.thinkLevel, modelSelection.model),
2086
2086
  ...options.environmentSelection ? { environments: options.environmentSelection } : {},
2087
2087
  collaborationMode: buildTurnCollaborationMode(params, {
@@ -1,6 +1,6 @@
1
1
  import { n as isJsonObject } from "./protocol-dh-ETiNd.js";
2
- import { g as buildCodexNativeWebSearchThreadConfig } from "./thread-lifecycle-CJdHuthD.js";
3
- import { n as runBoundedCodexAppServerTurn } from "./media-understanding-provider-DSQ2ry-4.js";
2
+ import { g as buildCodexNativeWebSearchThreadConfig } from "./thread-lifecycle-DtT3-ehU.js";
3
+ import { n as runBoundedCodexAppServerTurn } from "./media-understanding-provider-ZUQHN7gT.js";
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,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/codex",
3
- "version": "2026.6.10-beta.1",
3
+ "version": "2026.6.10",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/codex",
9
- "version": "2026.6.10-beta.1",
9
+ "version": "2026.6.10",
10
10
  "dependencies": {
11
11
  "@openai/codex": "0.139.0",
12
12
  "typebox": "1.1.39",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/codex",
3
- "version": "2026.6.10-beta.1",
3
+ "version": "2026.6.10",
4
4
  "description": "OpenClaw Codex app-server harness and model provider plugin with a Codex-managed GPT catalog.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,10 +34,10 @@
34
34
  ]
35
35
  },
36
36
  "compat": {
37
- "pluginApi": ">=2026.6.10-beta.1"
37
+ "pluginApi": ">=2026.6.10"
38
38
  },
39
39
  "build": {
40
- "openclawVersion": "2026.6.10-beta.1"
40
+ "openclawVersion": "2026.6.10"
41
41
  },
42
42
  "release": {
43
43
  "publishToClawHub": true,
@@ -55,7 +55,7 @@
55
55
  "README.md"
56
56
  ],
57
57
  "peerDependencies": {
58
- "openclaw": ">=2026.6.10-beta.1"
58
+ "openclaw": ">=2026.6.10"
59
59
  },
60
60
  "peerDependenciesMeta": {
61
61
  "openclaw": {