@openclaw/codex 2026.6.11-beta.2 → 2026.6.33

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.
Files changed (27) hide show
  1. package/dist/{app-server-policy-BPTiVNsW.js → app-server-policy-BaB2492Z.js} +2 -2
  2. package/dist/{attempt-notifications-BYnndyFl.js → attempt-notifications-Dl3RWAT-.js} +1 -1
  3. package/dist/{client-CLrtWgrD.js → client-DsqoRGhJ.js} +1 -1
  4. package/dist/{client-factory-Bm6HsGob.js → client-factory-E-67xUhS.js} +1 -1
  5. package/dist/{command-handlers-DEPTJYk0.js → command-handlers-bbSxpNAI.js} +9 -9
  6. package/dist/{compact-aQJ0ZKhe.js → compact-C-fHdAIB.js} +4 -4
  7. package/dist/{computer-use-ClrJwoFp.js → computer-use-B_iZKrBI.js} +3 -3
  8. package/dist/{config-CszD0vP3.js → config-DfV7hMHu.js} +23 -12
  9. package/dist/{conversation-binding-t0XMLz-j.js → conversation-binding-Ba3nVSYu.js} +6 -6
  10. package/dist/harness.js +6 -6
  11. package/dist/index.js +11 -11
  12. package/dist/{media-understanding-provider-ZUQHN7gT.js → media-understanding-provider-S-u-JwTs.js} +5 -5
  13. package/dist/media-understanding-provider.js +1 -1
  14. package/dist/{models-CAmfBWRl.js → models-CrrooS6N.js} +1 -1
  15. package/dist/{plugin-app-cache-key-C9ILt7bl.js → plugin-app-cache-key-BwzTPSGU.js} +3 -3
  16. package/dist/{provider-B-OHpbD3.js → provider-J2nTGL8Q.js} +3 -3
  17. package/dist/{provider-capabilities-D7hnTO76.js → provider-capabilities-B3pUz-8b.js} +326 -172
  18. package/dist/provider.js +1 -1
  19. package/dist/{request-Dcd452Nk.js → request-RiBbqNPj.js} +1 -1
  20. package/dist/{run-attempt-CXxtFC9d.js → run-attempt-CDCK3aeX.js} +80 -307
  21. package/dist/{session-binding-HOuPt-E0.js → session-binding-CP5b8iN1.js} +1 -1
  22. package/dist/{shared-client-Dtx5i7Ez.js → shared-client-Ll9fWpy9.js} +2 -2
  23. package/dist/{side-question-C-DhgJOd.js → side-question-DJ4g2wVk.js} +10 -92
  24. package/dist/{thread-lifecycle-DtT3-ehU.js → thread-lifecycle-DXrm-WWA.js} +4 -4
  25. package/dist/{web-search-provider.runtime-CkwxrXQj.js → web-search-provider.runtime-3WDe3iwG.js} +2 -2
  26. package/npm-shrinkwrap.json +2 -2
  27. package/package.json +4 -4
@@ -1,18 +1,17 @@
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-DtT3-ehU.js";
3
- import { c as isTrustedCodexModelBackedOpenAIProvider, u as readCodexPluginConfig } from "./config-CszD0vP3.js";
4
- import { a as formatCodexDisplayText } from "./app-server-policy-BPTiVNsW.js";
5
- import { o as releaseLeasedSharedCodexAppServerClient } from "./shared-client-Dtx5i7Ez.js";
2
+ import { C as isForcedPrivateQaCodexRuntime, S as filterCodexDynamicTools, _ as resolveCodexWebSearchPlan, w as normalizeCodexDynamicToolName, x as sanitizeInlineImageDataUrl, y as invalidInlineImageText } from "./thread-lifecycle-DXrm-WWA.js";
3
+ import { l as readCodexPluginConfig } from "./config-DfV7hMHu.js";
4
+ import { a as formatCodexDisplayText } from "./app-server-policy-BaB2492Z.js";
5
+ import { o as releaseLeasedSharedCodexAppServerClient } from "./shared-client-Ll9fWpy9.js";
6
6
  import { i as resolveCodexNativeExecutionPolicy } from "./sandbox-guard-3tnjhjFb.js";
7
- import { addTimerTimeoutGraceMs, finiteSecondsToTimerSafeMilliseconds, resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
7
+ import { addTimerTimeoutGraceMs, finiteSecondsToTimerSafeMilliseconds, parseStrictNonNegativeInteger, resolveTimerTimeoutMs } from "openclaw/plugin-sdk/number-runtime";
8
8
  import { asOptionalRecord, isRecord, normalizeTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
9
9
  import { createHash } from "node:crypto";
10
10
  import { resolveAgentDir } from "openclaw/plugin-sdk/agent-runtime";
11
11
  import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
12
12
  import { HEARTBEAT_RESPONSE_TOOL_NAME, buildAgentHookContextChannelFields, buildEmbeddedAttemptToolRunContext, callGatewayTool, consumeAdjustedParamsForToolCall, consumePreExecutionBlockedToolCall, createAgentToolResultMiddlewareRunner, createCodexAppServerToolResultExtensionRunner, embeddedAgentLog, extractMessagingToolSend, extractMessagingToolSendResult, extractToolResultMediaArtifact, filterProviderNormalizableTools, filterToolResultMediaUrls, finalizeToolTerminalPresentation, formatApprovalDisplayPath, getChannelAgentToolMeta, getPluginToolMeta, hasNativeHookRelayInvocation, invokeNativeHookRelay, isMessagingTool, isMessagingToolSendAction, isReplaySafeToolCall, isSubagentSessionKey, isToolResultError, isToolWrappedWithBeforeToolCallHook, normalizeAgentRuntimeTools, normalizeHeartbeatToolResponse, projectRuntimeToolInputSchema, registerNativeHookRelay, resolveAttemptSpawnWorkspaceDir, resolveModelAuthMode, resolveNativeHookRelayDeferredToolApproval, runAgentHarnessAfterToolCallHook, runBeforeToolCallHook, sanitizeToolResult, setBeforeToolCallDiagnosticsEnabled, supportsModelTools, wrapToolWithBeforeToolCallHook } from "openclaw/plugin-sdk/agent-harness-runtime";
13
- import { emitTrustedDiagnosticEvent } from "openclaw/plugin-sdk/diagnostic-runtime";
13
+ import { emitTrustedDiagnosticEvent, hasPendingInternalDiagnosticEvent } from "openclaw/plugin-sdk/diagnostic-runtime";
14
14
  import { isToolAllowed } from "openclaw/plugin-sdk/sandbox";
15
- import { buildExecAutoReviewInputForShellCommand, reviewExecRequestWithConfiguredModel } from "openclaw/plugin-sdk/agent-harness-exec-review-runtime";
16
15
  /** Default idle timeout while waiting for app-server turn completion. */
17
16
  const CODEX_TURN_COMPLETION_IDLE_TIMEOUT_MS = 6e4;
18
17
  /** Short guard after apparent assistant completion. */
@@ -82,8 +81,9 @@ function resolveCodexPostToolRawAssistantCompletionIdleTimeoutMs(value, fallback
82
81
  return resolvePositiveIntegerTimeoutMs(value, Math.max(resolvePositiveIntegerTimeoutMs(void 0, fallbackMs), CODEX_POST_TOOL_RAW_ASSISTANT_COMPLETION_IDLE_TIMEOUT_MS));
83
82
  }
84
83
  /** Resolves the long terminal turn idle timeout. */
85
- function resolveCodexTurnTerminalIdleTimeoutMs(value) {
86
- return resolvePositiveIntegerTimeoutMs(value, CODEX_TURN_TERMINAL_IDLE_TIMEOUT_MS);
84
+ function resolveCodexTurnTerminalIdleTimeoutMs(value, runTimeoutOverrideMs) {
85
+ const explicitRunBudgetMs = resolvePositiveIntegerTimeoutMs(runTimeoutOverrideMs, CODEX_TURN_TERMINAL_IDLE_TIMEOUT_MS);
86
+ return resolvePositiveIntegerTimeoutMs(value, Math.max(CODEX_TURN_TERMINAL_IDLE_TIMEOUT_MS, explicitRunBudgetMs));
87
87
  }
88
88
  /** Adds gateway grace time to a caller timeout without overflowing invalid values. */
89
89
  function resolveCodexGatewayTimeoutWithGraceMs(timeoutMs, graceMs = 1e4) {
@@ -118,7 +118,13 @@ async function requestPluginApproval(params) {
118
118
  timeoutMs,
119
119
  twoPhase: true,
120
120
  ...params.allowedDecisions ? { allowedDecisions: params.allowedDecisions } : {}
121
- }, { expectFinal: false });
121
+ }, params.finalResponse ? {
122
+ expectFinal: true,
123
+ onAccepted: (payload) => {
124
+ if (payload && typeof payload === "object" && !Array.isArray(payload)) params.finalResponse?.onAccepted?.(payload);
125
+ },
126
+ signal: params.finalResponse.signal
127
+ } : { expectFinal: false });
122
128
  }
123
129
  /** Detects the gateway's explicit null-decision marker for unavailable approvals. */
124
130
  function approvalRequestExplicitlyUnavailable(result) {
@@ -131,6 +137,19 @@ function approvalRequestExplicitlyUnavailable(result) {
131
137
  }
132
138
  return descriptor !== void 0 && "value" in descriptor && descriptor.value === null;
133
139
  }
140
+ /** Reads a decision only from a final response, never from the accepted-phase payload. */
141
+ function readFinalApprovalDecision(result) {
142
+ if (!result || typeof result !== "object" || Array.isArray(result)) return;
143
+ try {
144
+ const status = Object.getOwnPropertyDescriptor(result, "status");
145
+ if (status && "value" in status && status.value === "accepted") return;
146
+ const decision = Object.getOwnPropertyDescriptor(result, "decision");
147
+ if (!decision || !("value" in decision)) return;
148
+ return decision.value === null || decision.value === "allow-once" || decision.value === "allow-always" || decision.value === "deny" ? decision.value : void 0;
149
+ } catch {
150
+ return;
151
+ }
152
+ }
134
153
  /** Waits for the gateway's final approval decision, respecting turn aborts. */
135
154
  async function waitForPluginApprovalDecision(params) {
136
155
  const waitPromise = callGatewayTool("plugin.approval.waitDecision", { timeoutMs: resolveCodexGatewayTimeoutWithGraceMs(DEFAULT_CODEX_APPROVAL_TIMEOUT_MS) }, { id: params.approvalId });
@@ -242,34 +261,34 @@ async function handleCodexAppServerApprovalRequest(params) {
242
261
  });
243
262
  return buildApprovalResponse(params.method, context.requestParams, "approved-session");
244
263
  }
245
- const autoReviewOutcome = await runInternalExecAutoReviewForApprovalRequest({
246
- enabled: params.internalExecAutoReview === true && params.execPolicy?.mode === "auto",
247
- method: params.method,
248
- requestParams,
249
- paramsForRun: params.paramsForRun,
250
- context,
251
- agentId: params.execReviewerAgentId,
252
- signal: params.signal
253
- });
254
- if (autoReviewOutcome?.outcome === "approved-once") {
264
+ let emittedApprovalRequestId;
265
+ const emitRequestedApproval = (approvalId) => {
266
+ if (emittedApprovalRequestId === approvalId) return;
267
+ emittedApprovalRequestId = approvalId;
255
268
  emitApprovalEvent(params.paramsForRun, {
256
- phase: "resolved",
269
+ phase: "requested",
257
270
  kind: context.kind,
258
- status: "approved",
271
+ status: "pending",
259
272
  title: context.title,
273
+ approvalId,
274
+ approvalSlug: approvalId,
260
275
  ...context.eventDetails,
261
- ...approvalEventScope(params.method, autoReviewOutcome.outcome),
262
- message: autoReviewOutcome.reason
276
+ message: "Codex app-server approval requested."
263
277
  });
264
- return buildApprovalResponse(params.method, context.requestParams, autoReviewOutcome.outcome);
265
- }
278
+ };
266
279
  const requestResult = await requestPluginApproval({
267
280
  paramsForRun: params.paramsForRun,
268
281
  title: context.title,
269
282
  description: context.description,
270
283
  severity: context.severity,
271
284
  toolName: context.toolName,
272
- toolCallId: context.itemId
285
+ toolCallId: context.approvalId,
286
+ finalResponse: {
287
+ signal: params.signal,
288
+ onAccepted: (accepted) => {
289
+ if (accepted.id) emitRequestedApproval(accepted.id);
290
+ }
291
+ }
273
292
  });
274
293
  const approvalId = requestResult?.id;
275
294
  if (!approvalId) {
@@ -284,17 +303,9 @@ async function handleCodexAppServerApprovalRequest(params) {
284
303
  });
285
304
  return buildApprovalResponse(params.method, context.requestParams, "denied");
286
305
  }
287
- emitApprovalEvent(params.paramsForRun, {
288
- phase: "requested",
289
- kind: context.kind,
290
- status: "pending",
291
- title: context.title,
292
- approvalId,
293
- approvalSlug: approvalId,
294
- ...context.eventDetails,
295
- message: "Codex app-server approval requested."
296
- });
297
- const outcome = mapExecDecisionToOutcome(approvalRequestExplicitlyUnavailable(requestResult) ? null : await waitForPluginApprovalDecision({
306
+ emitRequestedApproval(approvalId);
307
+ const finalDecision = readFinalApprovalDecision(requestResult);
308
+ const outcome = mapExecDecisionToOutcome(approvalRequestExplicitlyUnavailable(requestResult) ? null : finalDecision ?? await waitForPluginApprovalDecision({
298
309
  approvalId,
299
310
  signal: params.signal
300
311
  }));
@@ -348,6 +359,7 @@ function matchesCurrentTurn(requestParams, threadId, turnId) {
348
359
  }
349
360
  function buildApprovalContext(params) {
350
361
  const itemId = readString$1(params.requestParams, "itemId") ?? readString$1(params.requestParams, "callId") ?? readString$1(params.requestParams, "approvalId");
362
+ const approvalId = readString$1(params.requestParams, "approvalId") ?? itemId;
351
363
  const commandDetailLines = params.method === "item/commandExecution/requestApproval" ? describeCommandApprovalDetails(params.requestParams) : [];
352
364
  const commandPreview = sanitizeApprovalPreview(readDisplayCommandPreview(params.requestParams), commandDetailLines.length > 0 ? COMMAND_PREVIEW_WITH_DETAILS_MAX_LENGTH : 180);
353
365
  const reasonPreview = sanitizeApprovalPreview(readStringPreview(params.requestParams, "reason"), 180);
@@ -368,6 +380,7 @@ function buildApprovalContext(params) {
368
380
  severity: kind === "exec" ? "warning" : "info",
369
381
  toolName: kind === "exec" ? "codex_command_approval" : params.method === "item/permissions/requestApproval" ? "codex_permission_approval" : "codex_file_approval",
370
382
  itemId,
383
+ approvalId,
371
384
  requestParams: params.requestParams,
372
385
  eventDetails: {
373
386
  ...itemId ? { itemId } : {},
@@ -378,132 +391,6 @@ function buildApprovalContext(params) {
378
391
  }
379
392
  };
380
393
  }
381
- async function runInternalExecAutoReviewForApprovalRequest(params) {
382
- if (!params.enabled || params.method !== "item/commandExecution/requestApproval") return;
383
- if (hasCommandApprovalCapabilityAmendments(params.requestParams)) return;
384
- const input = await buildAppServerExecAutoReviewInput({
385
- requestParams: params.requestParams,
386
- paramsForRun: params.paramsForRun
387
- });
388
- if (!input) return;
389
- const reviewerConfig = resolveExecReviewerConfig(params.paramsForRun, params.agentId);
390
- if (!canUseInternalExecAutoReviewReviewer(reviewerConfig, params.paramsForRun.config, process.env, params.paramsForRun.agentDir)) return;
391
- const decision = await waitForInternalExecAutoReviewDecision({
392
- signal: params.signal,
393
- promise: reviewExecRequestWithConfiguredModel({
394
- cfg: params.paramsForRun.config,
395
- agentId: params.agentId ?? params.paramsForRun.agentId,
396
- reviewer: reviewerConfig,
397
- input
398
- })
399
- });
400
- if (decision.decision !== "allow-once") return;
401
- return {
402
- outcome: "approved-once",
403
- reason: `Codex app-server command approval granted by OpenClaw exec auto-reviewer: ${formatCodexDisplayText(decision.rationale)}`
404
- };
405
- }
406
- async function waitForInternalExecAutoReviewDecision(params) {
407
- if (!params.signal) return params.promise;
408
- if (params.signal.aborted) throw toCodexAppServerApprovalCancellationError(params.signal.reason);
409
- let onAbort;
410
- const abortPromise = new Promise((_, reject) => {
411
- onAbort = () => reject(toCodexAppServerApprovalCancellationError(params.signal?.reason));
412
- params.signal?.addEventListener("abort", onAbort, { once: true });
413
- });
414
- try {
415
- return await Promise.race([params.promise, abortPromise]);
416
- } finally {
417
- if (onAbort) params.signal.removeEventListener("abort", onAbort);
418
- }
419
- }
420
- function toCodexAppServerApprovalCancellationError(reason) {
421
- if (reason instanceof Error) return reason;
422
- return new Error(typeof reason === "string" && reason.trim() ? reason : "Codex app-server approval cancelled.");
423
- }
424
- async function buildAppServerExecAutoReviewInput(params) {
425
- const command = readString$1(params.requestParams, "command");
426
- if (!command) return;
427
- return buildExecAutoReviewInputForShellCommand({
428
- command,
429
- cwd: readString$1(params.requestParams, "cwd") ?? params.paramsForRun.workspaceDir ?? null,
430
- host: "codex-app-server",
431
- agent: {
432
- id: params.paramsForRun.agentId ?? null,
433
- sessionKey: params.paramsForRun.sessionKey ?? null
434
- }
435
- });
436
- }
437
- function hasCommandApprovalCapabilityAmendments(requestParams) {
438
- return hasNonEmptyJsonObject(requestParams?.additionalPermissions) || hasNonEmptyJsonObject(requestParams?.networkApprovalContext) || hasNonEmptyJsonObject(requestParams?.proposedExecpolicyAmendment) || hasNonEmptyArray(requestParams?.proposedExecpolicyAmendment) || hasNonEmptyArray(requestParams?.proposedNetworkPolicyAmendments) || findAvailableCommandAmendmentDecision(requestParams) !== void 0 || commandAcceptDecisionUnavailable(requestParams);
439
- }
440
- function commandAcceptDecisionUnavailable(requestParams) {
441
- const available = requestParams?.availableDecisions;
442
- return Array.isArray(available) && !available.includes("accept");
443
- }
444
- function hasNonEmptyJsonObject(value) {
445
- return isJsonObject(value) && Object.keys(value).length > 0;
446
- }
447
- function hasNonEmptyArray(value) {
448
- return Array.isArray(value) && value.length > 0;
449
- }
450
- function resolveExecReviewerConfig(params, agentId) {
451
- const configRoot = readUnknownRecord(params.config);
452
- const globalExec = readUnknownRecord(readUnknownRecord(configRoot?.tools)?.exec);
453
- return readUnknownRecord(resolveAgentExecConfig(configRoot, agentId ?? params.agentId)?.reviewer) ?? readUnknownRecord(globalExec?.reviewer);
454
- }
455
- function canUseInternalExecAutoReviewReviewer(reviewerConfig, config, env, agentDir) {
456
- const model = readExecReviewerModelRef(reviewerConfig);
457
- const slashIndex = model?.indexOf("/") ?? -1;
458
- if (!model || slashIndex <= 0) return false;
459
- if (configuredAgentModelAliasMatches(config, model)) return false;
460
- if (model.slice(0, slashIndex).trim().toLowerCase() !== "openai") return false;
461
- return isTrustedCodexModelBackedOpenAIProvider({
462
- config,
463
- env,
464
- agentDir,
465
- model: model.slice(slashIndex + 1).trim()
466
- });
467
- }
468
- function readExecReviewerModelRef(reviewerConfig) {
469
- const model = reviewerConfig?.model;
470
- if (typeof model === "string") return model.trim() || void 0;
471
- const primary = readUnknownRecord(model)?.primary;
472
- return typeof primary === "string" && primary.trim() ? primary.trim() : void 0;
473
- }
474
- function configuredAgentModelAliasMatches(config, modelRef) {
475
- const normalizedModelRef = normalizeExecReviewerAliasRef(modelRef);
476
- return agentModelAliasMatches(readUnknownRecord(readUnknownRecord(readUnknownRecord(config)?.agents)?.defaults), normalizedModelRef);
477
- }
478
- function agentModelAliasMatches(agentConfig, normalizedModelRef) {
479
- const models = readUnknownRecord(agentConfig?.models);
480
- if (!models) return false;
481
- for (const entry of Object.values(models)) {
482
- const alias = readUnknownRecord(entry)?.alias;
483
- if (typeof alias === "string" && normalizeExecReviewerAliasRef(alias) === normalizedModelRef) return true;
484
- }
485
- return false;
486
- }
487
- function normalizeExecReviewerAliasRef(modelRef) {
488
- const trimmed = modelRef.trim().toLowerCase();
489
- const slashIndex = trimmed.indexOf("/");
490
- const authProfileIndex = trimmed.indexOf("@", slashIndex + 1);
491
- return authProfileIndex > 0 ? trimmed.slice(0, authProfileIndex) : trimmed;
492
- }
493
- function resolveAgentExecConfig(configRoot, agentId) {
494
- const normalizedAgentId = agentId ? normalizeAgentId(agentId) : void 0;
495
- if (!normalizedAgentId) return;
496
- const agentList = readUnknownRecord(configRoot?.agents)?.list;
497
- if (!Array.isArray(agentList)) return;
498
- for (const entry of agentList) {
499
- const record = readUnknownRecord(entry);
500
- if (typeof record?.id !== "string" || normalizeAgentId(record.id) !== normalizedAgentId) continue;
501
- return readUnknownRecord(readUnknownRecord(record.tools)?.exec);
502
- }
503
- }
504
- function readUnknownRecord(value) {
505
- return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
506
- }
507
394
  async function runOpenClawToolPolicyForApprovalRequest(params) {
508
395
  const policyRequest = buildOpenClawToolPolicyRequest(params.method, params.requestParams);
509
396
  if (!policyRequest) return;
@@ -533,7 +420,7 @@ async function runOpenClawToolPolicyForApprovalRequest(params) {
533
420
  const outcome = await runBeforeToolCallHook({
534
421
  toolName: policyRequest.toolName,
535
422
  params: policyRequest.params,
536
- ...params.context.itemId ? { toolCallId: params.context.itemId } : {},
423
+ ...params.context.approvalId ? { toolCallId: params.context.approvalId } : {},
537
424
  approvalMode: "request",
538
425
  signal: params.signal,
539
426
  ctx: {
@@ -568,11 +455,11 @@ async function runNativeRelayToolPolicyForApprovalRequest(params) {
568
455
  if (hasNativeHookRelayInvocation({
569
456
  relayId: params.nativeHookRelay.relayId,
570
457
  event: "pre_tool_use",
571
- toolUseId: params.context.itemId
458
+ toolUseId: params.context.approvalId
572
459
  })) {
573
460
  const approvalOutcome = await resolveNativeHookRelayDeferredToolApproval({
574
461
  relayId: params.nativeHookRelay.relayId,
575
- toolUseId: params.context.itemId,
462
+ toolUseId: params.context.approvalId,
576
463
  signal: params.signal
577
464
  });
578
465
  if (approvalOutcome?.outcome === "denied") return {
@@ -602,7 +489,7 @@ async function runNativeRelayToolPolicyForApprovalRequest(params) {
602
489
  };
603
490
  const approvalOutcome = await resolveNativeHookRelayDeferredToolApproval({
604
491
  relayId: params.nativeHookRelay.relayId,
605
- toolUseId: params.context.itemId,
492
+ toolUseId: params.context.approvalId,
606
493
  signal: params.signal
607
494
  });
608
495
  if (approvalOutcome?.outcome === "denied") return {
@@ -631,7 +518,7 @@ function buildNativeRelayPreToolUsePayload(params) {
631
518
  hook_event_name: "PreToolUse",
632
519
  openclaw_approval_mode: "report",
633
520
  tool_name: "exec_command",
634
- ...params.context.itemId ? { tool_use_id: params.context.itemId } : {},
521
+ ...params.context.approvalId ? { tool_use_id: params.context.approvalId } : {},
635
522
  ...params.cwd ? { cwd: params.cwd } : {},
636
523
  ...turnId ? { turn_id: turnId } : {},
637
524
  tool_input: {
@@ -1661,6 +1548,272 @@ function emitDynamicToolTerminalDiagnostic(params) {
1661
1548
  }
1662
1549
  emitDynamicToolErrorDiagnostic(params);
1663
1550
  }
1551
+ /** Hard cap for per-call Codex dynamic tool timeout overrides. */
1552
+ const CODEX_DYNAMIC_TOOL_MAX_TIMEOUT_MS = 6e5;
1553
+ const CODEX_DYNAMIC_TOOL_TIMEOUT_SECONDS_GRACE_MS = 3e4;
1554
+ const CODEX_DYNAMIC_IMAGE_GENERATION_TOOL_TIMEOUT_MS = 12e4;
1555
+ /** Timeout for message-delivery dynamic tool calls. */
1556
+ const CODEX_DYNAMIC_MESSAGE_TOOL_TIMEOUT_MS = CODEX_DYNAMIC_TOOL_MAX_TIMEOUT_MS;
1557
+ const LOG_FIELD_MAX_LENGTH = 160;
1558
+ function normalizeLogField(value) {
1559
+ if (typeof value !== "string") return;
1560
+ const normalized = value.replaceAll(String.fromCharCode(27), " ").replaceAll("\r", " ").replaceAll("\n", " ").replaceAll(" ", " ").trim();
1561
+ if (!normalized) return;
1562
+ return normalized.length > LOG_FIELD_MAX_LENGTH ? `${normalized.slice(0, LOG_FIELD_MAX_LENGTH - 3)}...` : normalized;
1563
+ }
1564
+ function readNumericTimeoutMs(value) {
1565
+ if (typeof value === "number" && Number.isFinite(value)) return Math.max(0, Math.floor(value));
1566
+ if (typeof value === "string") {
1567
+ const parsed = parseStrictNonNegativeInteger(value);
1568
+ if (parsed !== void 0) return Math.max(0, Math.floor(parsed));
1569
+ }
1570
+ }
1571
+ function formatDynamicToolTimeoutDetails(params) {
1572
+ const tool = normalizeLogField(params.call.tool) ?? "unknown";
1573
+ const baseMeta = {
1574
+ tool: params.call.tool,
1575
+ toolCallId: params.call.callId,
1576
+ threadId: params.call.threadId,
1577
+ turnId: params.call.turnId,
1578
+ timeoutMs: params.timeoutMs,
1579
+ timeoutKind: "codex_dynamic_tool_rpc"
1580
+ };
1581
+ if (tool !== "process" || !isJsonObject(params.call.arguments)) return {
1582
+ responseMessage: `OpenClaw dynamic tool call timed out after ${params.timeoutMs}ms while running tool ${tool}.`,
1583
+ consoleMessage: `codex dynamic tool timeout: tool=${tool} toolTimeoutMs=${params.timeoutMs}; per-tool-call watchdog, not session idle`,
1584
+ meta: baseMeta
1585
+ };
1586
+ const action = normalizeLogField(params.call.arguments.action);
1587
+ const sessionId = normalizeLogField(params.call.arguments.sessionId);
1588
+ const requestedTimeoutMs = readNumericTimeoutMs(params.call.arguments.timeout);
1589
+ const actionPart = action ? ` action=${action}` : "";
1590
+ const sessionPart = sessionId ? ` sessionId=${sessionId}` : "";
1591
+ const requestedPart = requestedTimeoutMs === void 0 ? "" : ` requestedWaitMs=${requestedTimeoutMs}`;
1592
+ const retryHint = action === "poll" ? "; repeated lines usually mean process-poll retry churn, not model progress" : "";
1593
+ const responseTarget = action || sessionId ? ` while waiting for process${actionPart}${sessionPart}` : " while waiting for the process tool";
1594
+ return {
1595
+ responseMessage: `OpenClaw dynamic tool call timed out after ${params.timeoutMs}ms${responseTarget}. This is a tool RPC timeout, not a session idle timeout.`,
1596
+ consoleMessage: `codex process tool timeout:${actionPart}${sessionPart} toolTimeoutMs=${params.timeoutMs}${requestedPart}; per-tool-call watchdog, not session idle${retryHint}`,
1597
+ meta: {
1598
+ ...baseMeta,
1599
+ processAction: action,
1600
+ processSessionId: sessionId,
1601
+ processRequestedTimeoutMs: requestedTimeoutMs
1602
+ }
1603
+ };
1604
+ }
1605
+ /**
1606
+ * Runs a dynamic tool call with run-abort and per-call timeout handling,
1607
+ * returning a Codex protocol response instead of throwing.
1608
+ */
1609
+ async function handleDynamicToolCallWithTimeout(params) {
1610
+ let didNotifyAgentToolResult = false;
1611
+ const notifyAgentToolResult = (event) => {
1612
+ if (didNotifyAgentToolResult) return;
1613
+ didNotifyAgentToolResult = true;
1614
+ try {
1615
+ params.onAgentToolResult?.(event);
1616
+ } catch (error) {
1617
+ embeddedAgentLog.warn(`onAgentToolResult handler failed: tool=${params.call.tool} error=${String(error)}`);
1618
+ }
1619
+ };
1620
+ const notifyFailedToolResult = (message) => {
1621
+ notifyAgentToolResult({
1622
+ toolName: params.call.tool,
1623
+ result: {
1624
+ content: [{
1625
+ type: "text",
1626
+ text: message
1627
+ }],
1628
+ details: {
1629
+ status: "failed",
1630
+ error: message
1631
+ }
1632
+ },
1633
+ isError: true
1634
+ });
1635
+ };
1636
+ if (params.signal.aborted) {
1637
+ const message = "OpenClaw dynamic tool call aborted before execution.";
1638
+ params.onFallbackSelected?.();
1639
+ notifyFailedToolResult(message);
1640
+ return failedDynamicToolResponse(message);
1641
+ }
1642
+ const controller = new AbortController();
1643
+ let timeout;
1644
+ let timedOut = false;
1645
+ let resolveAbort;
1646
+ const abortFromRun = () => {
1647
+ const message = "OpenClaw dynamic tool call aborted.";
1648
+ params.onFallbackSelected?.();
1649
+ controller.abort(params.signal.reason ?? /* @__PURE__ */ new Error(message));
1650
+ notifyFailedToolResult(message);
1651
+ resolveAbort?.(failedDynamicToolResponse(message, { sideEffectEvidence: true }));
1652
+ };
1653
+ const abortPromise = new Promise((resolve) => {
1654
+ resolveAbort = resolve;
1655
+ });
1656
+ const timeoutPromise = new Promise((resolve) => {
1657
+ const timeoutMs = clampDynamicToolTimeoutMs(params.timeoutMs);
1658
+ timeout = setTimeout(() => {
1659
+ timedOut = true;
1660
+ const timeoutDetails = formatDynamicToolTimeoutDetails({
1661
+ call: params.call,
1662
+ timeoutMs
1663
+ });
1664
+ params.onFallbackSelected?.();
1665
+ controller.abort(new Error(timeoutDetails.responseMessage));
1666
+ params.onTimeout?.();
1667
+ embeddedAgentLog.warn("codex dynamic tool call timed out", {
1668
+ ...timeoutDetails.meta,
1669
+ consoleMessage: timeoutDetails.consoleMessage
1670
+ });
1671
+ notifyFailedToolResult(timeoutDetails.responseMessage);
1672
+ resolve(failedDynamicToolResponse(timeoutDetails.responseMessage, { sideEffectEvidence: true }));
1673
+ }, timeoutMs);
1674
+ timeout.unref?.();
1675
+ });
1676
+ try {
1677
+ params.signal.addEventListener("abort", abortFromRun, { once: true });
1678
+ if (params.signal.aborted) abortFromRun();
1679
+ const response = await Promise.race([
1680
+ params.toolBridge.handleToolCall(params.call, {
1681
+ signal: controller.signal,
1682
+ onAgentToolResult: notifyAgentToolResult,
1683
+ toolCallOrdinal: params.toolCallOrdinal
1684
+ }),
1685
+ abortPromise,
1686
+ timeoutPromise
1687
+ ]);
1688
+ if (!response.success && !didNotifyAgentToolResult) notifyFailedToolResult(readDynamicToolResponseText(response));
1689
+ return response;
1690
+ } catch (error) {
1691
+ const message = error instanceof Error ? error.message : String(error);
1692
+ notifyFailedToolResult(message);
1693
+ return failedDynamicToolResponse(message, { sideEffectEvidence: true });
1694
+ } finally {
1695
+ if (timeout) clearTimeout(timeout);
1696
+ params.signal.removeEventListener("abort", abortFromRun);
1697
+ resolveAbort = void 0;
1698
+ if (!timedOut && !controller.signal.aborted) controller.abort(/* @__PURE__ */ new Error("OpenClaw dynamic tool call finished."));
1699
+ }
1700
+ }
1701
+ function readDynamicToolResponseText(response) {
1702
+ return response.contentItems.flatMap((item) => item.type === "inputText" && typeof item.text === "string" ? [item.text] : []).join("\n").trim() || "OpenClaw dynamic tool call failed.";
1703
+ }
1704
+ function failedDynamicToolResponse(message, options) {
1705
+ const response = {
1706
+ contentItems: [{
1707
+ type: "inputText",
1708
+ text: message
1709
+ }],
1710
+ success: false
1711
+ };
1712
+ Object.defineProperty(response, "diagnosticTerminalType", {
1713
+ configurable: true,
1714
+ enumerable: false,
1715
+ value: "error"
1716
+ });
1717
+ if (options?.sideEffectEvidence === true) Object.defineProperty(response, "sideEffectEvidence", {
1718
+ configurable: true,
1719
+ enumerable: false,
1720
+ value: true
1721
+ });
1722
+ return response;
1723
+ }
1724
+ /** Strips OpenClaw-only metadata before sending a dynamic tool response to Codex. */
1725
+ function toCodexDynamicToolProtocolResponse(response) {
1726
+ return {
1727
+ contentItems: response.contentItems,
1728
+ success: response.success
1729
+ };
1730
+ }
1731
+ /** Adds async-started progress details when a tool result continues out of band. */
1732
+ function toCodexDynamicToolProgressResponse(response, protocolResponse) {
1733
+ if (response.asyncStarted !== true) return protocolResponse;
1734
+ return {
1735
+ ...protocolResponse,
1736
+ details: {
1737
+ async: true,
1738
+ status: "started"
1739
+ }
1740
+ };
1741
+ }
1742
+ /** Decides whether a terminal dynamic tool response can release the Codex turn. */
1743
+ function shouldReleaseTurnAfterTerminalDynamicTool(state) {
1744
+ return !state.completed && !state.aborted && state.responseSuccess && !state.currentTurnHadNonTerminalDynamicToolResult && state.activeAppServerTurnRequests === 0 && state.activeTurnItemIdsCount === 0 && state.pendingOpenClawDynamicToolCompletionIdsCount === 0;
1745
+ }
1746
+ /** Returns true when a non-async result should block terminal-release shortcuts. */
1747
+ function shouldBlockTerminalReleaseForNonTerminalDynamicToolResult(response) {
1748
+ return response.asyncStarted !== true;
1749
+ }
1750
+ /** Resolves whether terminal diagnostic state should release, wait, or stay idle. */
1751
+ function resolveTerminalDynamicToolBatchAction(state) {
1752
+ if (state.activeAppServerTurnRequests > 0 || state.activeTurnItemIdsCount > 0 || state.pendingOpenClawDynamicToolCompletionIdsCount > 0) return "wait";
1753
+ if (state.currentTurnHadNonTerminalDynamicToolResult) return "clear-nonterminal-batch";
1754
+ if (state.hasPendingTerminalDynamicToolRelease) return "release-pending-terminal";
1755
+ return "idle";
1756
+ }
1757
+ /** Returns true for diagnostic events that terminate a dynamic tool call. */
1758
+ function isDynamicToolTerminalDiagnosticEvent(event) {
1759
+ return event.type === "tool.execution.completed" || event.type === "tool.execution.error" || event.type === "tool.execution.blocked";
1760
+ }
1761
+ /** Matches terminal diagnostics to a specific dynamic tool call id/name. */
1762
+ function isMatchingDynamicToolTerminalDiagnostic(params) {
1763
+ if (params.event.toolCallId !== params.call.callId || params.event.toolName !== params.call.tool) return false;
1764
+ if (params.runId !== void 0) return params.event.runId === params.runId;
1765
+ if (params.sessionId !== void 0) return params.event.sessionId === params.sessionId;
1766
+ if (params.sessionKey !== void 0) return params.event.sessionKey === params.sessionKey;
1767
+ return params.event.runId === void 0 && params.event.sessionId === void 0 && params.event.sessionKey === void 0;
1768
+ }
1769
+ /** Checks pending diagnostics for a terminal event matching a tool call. */
1770
+ function hasPendingDynamicToolTerminalDiagnostic(params) {
1771
+ return hasPendingInternalDiagnosticEvent((event) => {
1772
+ if (!isDynamicToolTerminalDiagnosticEvent(event)) return false;
1773
+ return isMatchingDynamicToolTerminalDiagnostic({
1774
+ event,
1775
+ call: params.call,
1776
+ runId: params.runId,
1777
+ sessionId: params.sessionId,
1778
+ sessionKey: params.sessionKey
1779
+ });
1780
+ });
1781
+ }
1782
+ /** Resolves per-tool timeout, applying media/message defaults and hard caps. */
1783
+ function resolveDynamicToolCallTimeoutMs(params) {
1784
+ if (params.call.tool === "message") return CODEX_DYNAMIC_MESSAGE_TOOL_TIMEOUT_MS;
1785
+ return clampDynamicToolTimeoutMs(readDynamicToolCallTimeoutMs(params.call.arguments) ?? readConfiguredDynamicToolTimeoutMs(params.call.tool, params.config) ?? 9e4);
1786
+ }
1787
+ function readDynamicToolCallTimeoutMs(value) {
1788
+ if (!isJsonObject(value)) return;
1789
+ const timeoutMs = readPositiveFiniteTimeoutMs(value.timeoutMs);
1790
+ if (timeoutMs !== void 0) return timeoutMs;
1791
+ const timeoutSecondsMs = readDynamicToolTimeoutSecondsAsMs(value.timeoutSeconds);
1792
+ return timeoutSecondsMs === void 0 ? void 0 : addTimerTimeoutGraceMs(timeoutSecondsMs, CODEX_DYNAMIC_TOOL_TIMEOUT_SECONDS_GRACE_MS);
1793
+ }
1794
+ function readConfiguredDynamicToolTimeoutMs(toolName, config) {
1795
+ if (toolName === "image_generate") {
1796
+ const imageGenerationModel = config?.agents?.defaults?.imageGenerationModel;
1797
+ if (!imageGenerationModel || typeof imageGenerationModel !== "object") return CODEX_DYNAMIC_IMAGE_GENERATION_TOOL_TIMEOUT_MS;
1798
+ return readPositiveFiniteTimeoutMs(imageGenerationModel.timeoutMs) ?? CODEX_DYNAMIC_IMAGE_GENERATION_TOOL_TIMEOUT_MS;
1799
+ }
1800
+ if (toolName === "image") return readTimeoutSecondsAsMs(config?.tools?.media?.image?.timeoutSeconds) ?? 6e4;
1801
+ if (toolName === "message") return CODEX_DYNAMIC_MESSAGE_TOOL_TIMEOUT_MS;
1802
+ }
1803
+ function readTimeoutSecondsAsMs(value) {
1804
+ const seconds = readPositiveFiniteTimeoutMs(value);
1805
+ return seconds === void 0 ? void 0 : seconds * 1e3;
1806
+ }
1807
+ function readDynamicToolTimeoutSecondsAsMs(value) {
1808
+ if (typeof value !== "number" || !Number.isFinite(value) || !Number.isInteger(value) || value <= 0) return;
1809
+ return value * 1e3;
1810
+ }
1811
+ function readPositiveFiniteTimeoutMs(value) {
1812
+ return typeof value === "number" && Number.isFinite(value) && value > 0 ? Math.floor(value) : void 0;
1813
+ }
1814
+ function clampDynamicToolTimeoutMs(timeoutMs) {
1815
+ return Math.max(1, Math.min(CODEX_DYNAMIC_TOOL_MAX_TIMEOUT_MS, Math.floor(timeoutMs)));
1816
+ }
1664
1817
  //#endregion
1665
1818
  //#region extensions/codex/src/app-server/dynamic-tools.ts
1666
1819
  function applyCurrentMessageProvider(toolName, args, currentProvider) {
@@ -2995,6 +3148,7 @@ const CODEX_NATIVE_HOOK_RELAY_MIN_TTL_MS = 30 * 6e4;
2995
3148
  const CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS = 5 * 6e4;
2996
3149
  const CODEX_NATIVE_HOOK_RELAY_COMMAND_MIN_PARENT_MARGIN_MS = 250;
2997
3150
  const CODEX_NATIVE_HOOK_RELAY_COMMAND_MAX_PARENT_MARGIN_MS = 1e3;
3151
+ const CODEX_NATIVE_HOOK_RELAY_DEFAULT_TIMEOUT_SEC = 10;
2998
3152
  const CODEX_NATIVE_HOOK_RELAY_UNREGISTER_GRACE_MS = 1e4;
2999
3153
  const CODEX_NATIVE_HOOK_RELAY_UNREGISTER_EXTRA_GRACE_MS = 5e3;
3000
3154
  const pendingCodexNativeHookRelayUnregisters = /* @__PURE__ */ new Set();
@@ -3018,7 +3172,7 @@ function scheduleCodexNativeHookRelayUnregister(params) {
3018
3172
  }
3019
3173
  /** Computes the delayed unregister window from Codex's hook timeout. */
3020
3174
  function resolveCodexNativeHookRelayUnregisterGraceMs(hookTimeoutSec) {
3021
- const hookTimeoutMs = typeof hookTimeoutSec === "number" && Number.isFinite(hookTimeoutSec) && hookTimeoutSec > 0 ? finiteSecondsToTimerSafeMilliseconds(Math.ceil(hookTimeoutSec)) ?? 0 : 0;
3175
+ const hookTimeoutMs = finiteSecondsToTimerSafeMilliseconds(normalizeHookTimeoutSec(hookTimeoutSec)) ?? 0;
3022
3176
  return Math.max(CODEX_NATIVE_HOOK_RELAY_UNREGISTER_GRACE_MS, addTimerTimeoutGraceMs(hookTimeoutMs, CODEX_NATIVE_HOOK_RELAY_UNREGISTER_EXTRA_GRACE_MS) ?? 0);
3023
3177
  }
3024
3178
  /** Registers an OpenClaw native hook relay for a Codex app-server turn. */
@@ -3136,7 +3290,7 @@ function buildCodexNativeHookRelayDisabledConfig() {
3136
3290
  };
3137
3291
  }
3138
3292
  function normalizeHookTimeoutSec(value) {
3139
- return typeof value === "number" && Number.isFinite(value) && value > 0 ? Math.ceil(value) : 5;
3293
+ return typeof value === "number" && Number.isFinite(value) && value > 0 ? Math.ceil(value) : CODEX_NATIVE_HOOK_RELAY_DEFAULT_TIMEOUT_SEC;
3140
3294
  }
3141
3295
  function resolveCodexNativeHookRelayCommandTimeoutMs(hookTimeoutSec) {
3142
3296
  const parentTimeoutMs = finiteSecondsToTimerSafeMilliseconds(normalizeHookTimeoutSec(hookTimeoutSec)) ?? 5e3;
@@ -3198,4 +3352,4 @@ async function resolveCodexProviderWebSearchSupport(params) {
3198
3352
  }
3199
3353
  }
3200
3354
  //#endregion
3201
- export { CODEX_POST_REASONING_REPLY_IDLE_TIMEOUT_MS as A, resolveCodexMessageToolProvider as C, shouldWarnCodexDynamicToolBuildStageSummary as D, shouldRequireCodexSandboxExecServerEnvironment as E, resolveCodexTurnTerminalIdleTimeoutMs as F, withCodexStartupTimeout as I, resolveCodexStartupTimeoutMs as M, resolveCodexTurnAssistantCompletionIdleTimeoutMs as N, filterToolsForVisionInputs as O, resolveCodexTurnCompletionIdleTimeoutMs as P, resolveCodexExternalSandboxPolicyForOpenClawSandbox as S, shouldEnableCodexAppServerNativeToolSurface as T, createCodexDynamicToolBuildStageTracker as _, buildCodexNativeHookRelayConfig as a, resolveCodexAppServerExecutionCwd as b, resolveCodexNativeHookRelayEvents as c, handleCodexAppServerElicitationRequest as d, createCodexDynamicToolBridge as f, buildDynamicTools as g, emitDynamicToolTerminalDiagnostic as h, CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS as i, resolveCodexPostToolRawAssistantCompletionIdleTimeoutMs as j, handleCodexAppServerApprovalRequest as k, resolveCodexNativeHookRelayTtlMs as l, emitDynamicToolStartedDiagnostic as m, resolveCodexProviderWebSearchSupportForClient as n, buildCodexNativeHookRelayDisabledConfig as o, emitDynamicToolErrorDiagnostic as p, CODEX_NATIVE_HOOK_RELAY_EVENTS as r, createCodexNativeHookRelay as s, resolveCodexProviderWebSearchSupport as t, scheduleCodexNativeHookRelayUnregister as u, disableCodexPluginThreadConfig as v, resolveCodexSandboxEnvironmentSelection as w, resolveCodexAppServerHookChannelId as x, formatCodexDynamicToolBuildStageSummary as y };
3355
+ export { resolveCodexAppServerExecutionCwd as A, CODEX_POST_REASONING_REPLY_IDLE_TIMEOUT_MS as B, emitDynamicToolErrorDiagnostic as C, createCodexDynamicToolBuildStageTracker as D, buildDynamicTools as E, shouldEnableCodexAppServerNativeToolSurface as F, resolveCodexTurnTerminalIdleTimeoutMs as G, resolveCodexStartupTimeoutMs as H, shouldRequireCodexSandboxExecServerEnvironment as I, withCodexStartupTimeout as K, shouldWarnCodexDynamicToolBuildStageSummary as L, resolveCodexExternalSandboxPolicyForOpenClawSandbox as M, resolveCodexMessageToolProvider as N, disableCodexPluginThreadConfig as O, resolveCodexSandboxEnvironmentSelection as P, filterToolsForVisionInputs as R, toCodexDynamicToolProtocolResponse as S, emitDynamicToolTerminalDiagnostic as T, resolveCodexTurnAssistantCompletionIdleTimeoutMs as U, resolveCodexPostToolRawAssistantCompletionIdleTimeoutMs as V, resolveCodexTurnCompletionIdleTimeoutMs as W, resolveDynamicToolCallTimeoutMs as _, buildCodexNativeHookRelayConfig as a, shouldReleaseTurnAfterTerminalDynamicTool as b, resolveCodexNativeHookRelayEvents as c, handleCodexAppServerElicitationRequest as d, createCodexDynamicToolBridge as f, isMatchingDynamicToolTerminalDiagnostic as g, isDynamicToolTerminalDiagnosticEvent as h, CODEX_NATIVE_HOOK_RELAY_TTL_GRACE_MS as i, resolveCodexAppServerHookChannelId as j, formatCodexDynamicToolBuildStageSummary as k, resolveCodexNativeHookRelayTtlMs as l, hasPendingDynamicToolTerminalDiagnostic as m, resolveCodexProviderWebSearchSupportForClient as n, buildCodexNativeHookRelayDisabledConfig as o, handleDynamicToolCallWithTimeout as p, CODEX_NATIVE_HOOK_RELAY_EVENTS as r, createCodexNativeHookRelay as s, resolveCodexProviderWebSearchSupport as t, scheduleCodexNativeHookRelayUnregister as u, resolveTerminalDynamicToolBatchAction as v, emitDynamicToolStartedDiagnostic as w, toCodexDynamicToolProgressResponse as x, shouldBlockTerminalReleaseForNonTerminalDynamicToolResult as y, handleCodexAppServerApprovalRequest as z };
package/dist/provider.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as buildCodexProviderCatalog, r as isModernCodexModel, t as buildCodexProvider } from "./provider-B-OHpbD3.js";
1
+ import { n as buildCodexProviderCatalog, r as isModernCodexModel, t as buildCodexProvider } from "./provider-J2nTGL8Q.js";
2
2
  export { buildCodexProvider, buildCodexProviderCatalog, isModernCodexModel };
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { a as getLeasedSharedCodexAppServerClient, i as createIsolatedCodexAppServerClient, l as withTimeout, o as releaseLeasedSharedCodexAppServerClient } from "./shared-client-Dtx5i7Ez.js";
2
+ import { a as getLeasedSharedCodexAppServerClient, i as createIsolatedCodexAppServerClient, l as withTimeout, o as releaseLeasedSharedCodexAppServerClient } from "./shared-client-Ll9fWpy9.js";
3
3
  import { t as resolveCodexAppServerDirectSandboxBypassBlock } from "./sandbox-guard-3tnjhjFb.js";
4
4
  //#region extensions/codex/src/app-server/request.ts
5
5
  var request_exports = /* @__PURE__ */ __exportAll({ requestCodexAppServerJson: () => requestCodexAppServerJson });