import { $ as AgentToolResultMiddlewareOptions, $a as getBeforeToolCallPolicyDiagnosticState, $c as resolveEmbeddedAgentRuntime, Aa as AgentHarnessCompactResult, Ba as EmbeddedRunAttemptResult, Bs as resolveFastModeForElapsed, Da as AgentHarnessAttemptResult, Ea as AgentHarnessAttemptParams, Fa as AgentHarnessSideQuestionResult, Fs as formatFastModeAutoProgressText, G as CodexAppServerExtensionFactory, Gr as resolveBootstrapFilesForRun, Ha as isReplaySafeToolCall, Ia as AgentHarnessSupport, J as CodexAppServerToolResultHandlerResult, Ja as DeferredPluginToolApproval, K as CodexAppServerExtensionRuntime, Ka as BeforeToolCallFailureDisposition, Kc as MessagingToolSend, La as AgentHarnessSupportContext, Ma as AgentHarnessResetParams, Ms as AgentHarnessRuntimeArtifactBinding, Na as AgentHarnessResultClassification, Oa as AgentHarnessAuthBindingFingerprintParams, Pa as AgentHarnessSideQuestionParams, Ps as FastModeAutoProgressState, Q as AgentToolResultMiddlewareHarness, Qa as getBeforeToolCallFailureDisposition, Qc as normalizeHeartbeatToolResponse, Ra as CompactEmbeddedAgentSessionParams, Ta as AgentHarness, Uc as EmbeddedAgentCompactResult, Ur as buildBootstrapContextForFiles, W as CodexAppServerExtensionContext, Wr as resolveBootstrapContextForRun, X as AgentToolResultMiddlewareContext, Xc as HEARTBEAT_RESPONSE_TOOL_NAME, Y as AgentToolResultMiddleware, Z as AgentToolResultMiddlewareEvent, Za as finalizeToolTerminalPresentation, Zc as HeartbeatToolResponse, ao as setBeforeToolCallDiagnosticsEnabled, at as resolveContextEngineOwnerPluginId, do as ContextEngine, eo as hasBeforeToolCallPolicy, et as AgentToolResultMiddlewareResult, fo as ContextEngineHostCapability, io as isToolWrappedWithBeforeToolCallHook, ja as AgentHarnessDeliveryDefaults, ka as AgentHarnessCompactParams, mo as ContextEngineProjection, no as runBeforeToolCallHook, nt as OpenClawAgentToolResult, oo as consumeAdjustedParamsForToolCall, po as ContextEngineOperation, q as CodexAppServerToolResultEvent, qa as BeforeToolCallPolicyDiagnosticState, qc as MessagingToolSourceReplyPayload, ro as wrapToolWithBeforeToolCallHook, so as consumePreExecutionBlockedToolCall, to as requestDeferredPluginToolApproval, tt as AgentToolResultMiddlewareRuntime } from "../types-CaqpvD9U.js";
import { t as FAST_MODE_AUTO_PROGRESS_KIND } from "../reply-payload-tSOFh1so.js";
import { s as AgentMessage } from "../types-CNUnmwpT.js";
import { F as emitAgentEvent, I as onAgentEvent, L as resetAgentEventsForTest, M as AgentApprovalEventData, N as AgentEventPayload } from "../types-Cp0u-08g.js";
import { c as ExecApprovalDecision } from "../exec-approvals-B59RubLo.js";
import { i as ExecAutoReviewer, r as ExecAutoReviewInput, t as ExecAutoReviewDecision } from "../exec-auto-review-D8kEqNZE.js";
import { t as EmbeddedContextFile } from "../types-CF0DHR3y.js";
import { n as NormalizedUsage, r as normalizeUsage } from "../usage-C8qkSpep.js";
import { n as AnyAgentTool } from "../common-D0LCF97L.js";
import { n as VERSION } from "../version-CR3y7QSr.js";
import { c as getModelProviderRequestTransport, s as attachModelProviderRequestTransport } from "../provider-request-config-DUvqPr5R.js";
import { i as resolveModelAuthMode } from "../model-auth-1Qv7hmLZ.js";
import { d as isSubagentSessionKey } from "../session-key-COxKqlXJ.js";
import { c as resolveAgentDir, r as resolveSessionAgentIds, u as resolveDefaultAgentDir } from "../agent-scope-BFtgCzf4.js";
import { r as formatErrorMessage } from "../errors-DFNEfRR0.js";
import { c as resolveUserPath } from "../home-dir-4pOw9r_P.js";
import { a as clearActiveEmbeddedRun, f as resolveActiveEmbeddedRunSessionId, i as abortEmbeddedAgentRun, o as setActiveEmbeddedRun, r as abortAndDrainEmbeddedAgentRun, t as AbortAndDrainEmbeddedAgentRunResult } from "../runs-Cw7IqM2T.js";
import { i as resolveSessionWriteLockOptions, n as acquireSessionWriteLock, r as resolveSessionWriteLockAcquireTimeoutMs, t as SessionWriteLockAcquireTimeoutConfig } from "../session-write-lock-CTGMQVOj.js";
import { a as formatPrePromptPrecheckLog, i as estimateRenderedLlmBoundaryTokenPressure, n as PREEMPTIVE_OVERFLOW_ERROR_TEXT, o as shouldPreemptivelyCompactBeforePrompt, r as PreemptiveCompactionDecision, t as LlmBoundaryTokenPressure } from "../preemptive-compaction-DrdZZ63r.js";
import { t as resolveOpenClawAgentDir } from "../agent-dir-compat-ochOeoeD.js";
import { r as assertContextEngineHostSupport, t as CODEX_APP_SERVER_CONTEXT_ENGINE_HOST } from "../host-compat-Bwxd6D4X.js";
import { n as SandboxContext, o as SandboxWorkspaceAccess } from "../types-tlCh8VEp.js";
import { $ as buildEmbeddedAttemptToolRunContext, $t as emptyAgentHarnessUserInputAnswers, A as finalizeHarnessContextEngineTurn, At as resolveAgentRunAbortLifecycleFields, B as resolveWritableSandboxBindHostRoots, Bt as registerNativeHookRelay, C as compactContextEngineWithSafetyTimeout, Ct as selectDefaultNodeFromList, D as bootstrapHarnessContextEngine, Dt as buildAgentRuntimePlan, E as assembleHarnessContextEngine, Et as classifyEmbeddedAgentRunResultForModelFallback, F as resolveAgentHarnessBeforePromptBuildResult, Ft as NativeHookRelayProvider, G as RuntimeToolInputSchemaProjection, Gt as claimPendingAgentQuestionAnswer, H as logAgentRuntimeToolDiagnostics, Ht as testing, I as runAgentHarnessAfterCompactionHook, It as NativeHookRelayRegistrationHandle, J as inspectRuntimeToolInputSchemas, Jt as AgentHarnessUserInputOption, K as RuntimeToolSchemaDiagnostic, Kt as runAgentHarnessGatewayQuestion, L as runAgentHarnessBeforeCompactionHook, Lt as buildNativeHookRelayCommand, M as runHarnessContextEngineMaintenance, Mt as buildAgentHookContextChannelFields, N as createAgentToolResultMiddlewareRunner, Nt as NativeHookRelayEvent, O as buildHarnessContextEngineRuntimeContext, Ot as log, P as createCodexAppServerToolResultExtensionRunner, Pt as NativeHookRelayProcessResponse, Qt as deliverAgentHarnessUserInputPrompt, R as hasSandboxBindContainerPathAliases, Rt as hasNativeHookRelayInvocation, S as runAgentHarnessBeforeMessageWriteHook, St as resolveNodeIdFromList, T as resolveCompactionTimeoutMs, Tt as callGatewayTool, U as normalizeAgentRuntimeTools, Ut as AgentHarnessQuestionGatewayCall, V as normalizeProviderToolSchemas, Vt as resolveNativeHookRelayDeferredToolApproval, W as RuntimeToolInputSchemaJson, Wt as cancelPendingAgentQuestionForSession, X as applyEmbeddedAttemptToolsAllow, Xt as AgentHarnessUserInputQuestion, Y as projectRuntimeToolInputSchema, Yt as AgentHarnessUserInputPromptOptions, Z as resolveEmbeddedAttemptToolConstructionPlan, Zt as buildAgentHarnessUserInputAnswers, _ as runAgentHarnessAgentEndHook, _t as resolveToolResultFailureKind, a as ToolProgressDetailMode, an as LoadCodexBundleMcpThreadConfigParams, at as isAgentToolReplaySafe, b as runAgentHarnessLlmOutputHook, bt as formatToolAggregate, c as formatToolProgressOutput, ct as extractMessagingToolSendResult, d as materializeRequesterScopedMcpToolsForHarnessRun, dt as filterToolResultMediaUrls, en as formatAgentHarnessUserInputPrompt, et as resolveAttemptSpawnWorkspaceDir, f as queueAgentHarnessMessage, ft as sanitizeToolResult, g as getAgentHarnessHookRunner, gt as resolveToolExecutionErrorKind, h as awaitAgentHarnessAgentEndHook, ht as isToolResultError, i as TOOL_PROGRESS_OUTPUT_MAX_CHARS, in as CodexBundleMcpThreadConfig, it as getChannelAgentToolMeta, j as isActiveHarnessContextEngine, jt as runAgentCleanupStep, k as buildHarnessContextEngineRuntimeContextFromUsage, kt as isHostScopedAgentToolActive, l as inferToolMetaFromArgs, lt as extractToolErrorMessage, m as runAgentEndSideEffects, mt as formatToolExecutionErrorMessage, n as AgentHarnessTerminalOutcomeInput, nn as isDeliveredMessageToolOnlySourceReplyResult, nt as SKILL_WORKSHOP_TOOL_NAME, o as classifyAgentHarnessTerminalOutcome, ot as supportsModelTools, p as awaitAgentEndSideEffects, pt as ToolResultFailureKind, q as filterProviderNormalizableTools, qt as AgentHarnessUserInputAnswers, r as EmbeddedRunAttemptParams, rn as isDeliveredMessagingToolResult, rt as buildSkillWorkshopPromptSection, s as detectAndLoadAgentHarnessPromptImages, st as extractMessagingToolSend, t as AgentHarnessTerminalOutcomeClassification, tn as normalizeAgentHarnessUserInputAnswer, tt as resolveAttemptFsWorkspaceOnly, u as loadCodexBundleMcpThreadConfig, ut as extractToolResultMediaArtifact, v as runAgentHarnessBeforeAgentFinalizeHook, vt as isMessagingTool, w as compactWithSafetyTimeout, wt as NodeListNode, x as runAgentHarnessAfterToolCallHook, xt as listNodes, y as runAgentHarnessLlmInputHook, yt as isMessagingToolSendAction, z as hasSandboxBindReadonlyHostShadows, zt as invokeNativeHookRelay } from "../agent-harness-runtime-CeDoOXzF.js";
import { r as fingerprintResolvedAuthProfileCredential } from "../execution-auth-binding-Dck7kGsC.js";
import { t as formatApprovalDisplayPath } from "../approval-display-paths-Hb4BQ_zR.js";
import { a as getPluginToolMeta } from "../tools-Czc1Ddb7.js";
import { t as disposeRegisteredAgentHarnesses } from "../registry-P-DKPrAR.js";
import { P as resolveSandboxContext } from "../sandbox-CGchpRRd.js";
export { type AbortAndDrainEmbeddedAgentRunResult as AbortAndDrainAgentHarnessRunResult, type AgentApprovalEventData, type AgentEventPayload, type AgentHarness, type AgentHarnessAttemptParams, type AgentHarnessAttemptResult, type AgentHarnessAuthBindingFingerprintParams, type AgentHarnessCompactParams, type AgentHarnessCompactResult, type AgentHarnessDeliveryDefaults, type AgentHarnessQuestionGatewayCall, type AgentHarnessResetParams, type AgentHarnessResultClassification, type AgentHarnessRuntimeArtifactBinding, type AgentHarnessSideQuestionParams, type AgentHarnessSideQuestionResult, type AgentHarnessSupport, type AgentHarnessSupportContext, AgentHarnessTerminalOutcomeClassification, AgentHarnessTerminalOutcomeInput, type AgentHarnessUserInputAnswers, type AgentHarnessUserInputOption, type AgentHarnessUserInputPromptOptions, type AgentHarnessUserInputQuestion, type AgentMessage, type AgentToolResultMiddleware, type AgentToolResultMiddlewareContext, type AgentToolResultMiddlewareEvent, type AgentToolResultMiddlewareHarness, type AgentToolResultMiddlewareOptions, type AgentToolResultMiddlewareResult, type AgentToolResultMiddlewareRuntime, type AnyAgentTool, type BeforeToolCallFailureDisposition, type BeforeToolCallPolicyDiagnosticState, CODEX_APP_SERVER_CONTEXT_ENGINE_HOST, type CodexAppServerExtensionContext, type CodexAppServerExtensionFactory, type CodexAppServerExtensionRuntime, type CodexAppServerToolResultEvent, type CodexAppServerToolResultHandlerResult, type CodexBundleMcpThreadConfig, type CompactEmbeddedAgentSessionParams, type CompactEmbeddedAgentSessionParams as CompactEmbeddedPiSessionParams, type ContextEngineHostCapability, type ContextEngineOperation, type ContextEngineProjection, type DeferredPluginToolApproval, type EmbeddedAgentCompactResult, type EmbeddedAgentCompactResult as EmbeddedPiCompactResult, type EmbeddedContextFile, EmbeddedRunAttemptParams, type EmbeddedRunAttemptResult, type ExecApprovalDecision, type ExecAutoReviewDecision, type ExecAutoReviewInput, type ExecAutoReviewer, FAST_MODE_AUTO_PROGRESS_KIND, type FastModeAutoProgressState, HEARTBEAT_RESPONSE_TOOL_NAME, type ContextEngine as HarnessContextEngine, type HeartbeatToolResponse, type LlmBoundaryTokenPressure, type LoadCodexBundleMcpThreadConfigParams, type MessagingToolSend, type MessagingToolSourceReplyPayload, type NativeHookRelayEvent, type NativeHookRelayProcessResponse, type NativeHookRelayProvider, type NativeHookRelayRegistrationHandle, type NodeListNode, type NormalizedUsage, VERSION as OPENCLAW_VERSION, type OpenClawAgentToolResult, PREEMPTIVE_OVERFLOW_ERROR_TEXT, type PreemptiveCompactionDecision, type RuntimeToolInputSchemaJson, type RuntimeToolInputSchemaProjection, type RuntimeToolSchemaDiagnostic, SKILL_WORKSHOP_TOOL_NAME, type SandboxContext, type SandboxWorkspaceAccess, type SessionWriteLockAcquireTimeoutConfig, TOOL_PROGRESS_OUTPUT_MAX_CHARS, ToolProgressDetailMode, type ToolResultFailureKind, abortEmbeddedAgentRun as abortAgentHarnessRun, abortAndDrainEmbeddedAgentRun as abortAndDrainAgentHarnessRun, acquireSessionWriteLock, applyEmbeddedAttemptToolsAllow, assembleHarnessContextEngine, assertContextEngineHostSupport, attachModelProviderRequestTransport, awaitAgentEndSideEffects, awaitAgentHarnessAgentEndHook, bootstrapHarnessContextEngine, buildAgentHarnessUserInputAnswers, buildAgentHookContextChannelFields, buildAgentRuntimePlan, buildBootstrapContextForFiles, buildEmbeddedAttemptToolRunContext, buildHarnessContextEngineRuntimeContext, buildHarnessContextEngineRuntimeContextFromUsage, buildNativeHookRelayCommand, buildSkillWorkshopPromptSection, callGatewayTool, cancelPendingAgentQuestionForSession, claimPendingAgentQuestionAnswer, classifyAgentHarnessTerminalOutcome, classifyEmbeddedAgentRunResultForModelFallback, classifyEmbeddedAgentRunResultForModelFallback as classifyEmbeddedPiRunResultForModelFallback, clearActiveEmbeddedRun, compactContextEngineWithSafetyTimeout, compactWithSafetyTimeout, consumeAdjustedParamsForToolCall, consumePreExecutionBlockedToolCall, createAgentToolResultMiddlewareRunner, createCodexAppServerToolResultExtensionRunner, deliverAgentHarnessUserInputPrompt, detectAndLoadAgentHarnessPromptImages, disposeRegisteredAgentHarnesses, log as embeddedAgentLog, emitAgentEvent, emptyAgentHarnessUserInputAnswers, estimateRenderedLlmBoundaryTokenPressure, extractMessagingToolSend, extractMessagingToolSendResult, extractToolErrorMessage, extractToolResultMediaArtifact, filterProviderNormalizableTools, filterToolResultMediaUrls, finalizeHarnessContextEngineTurn, finalizeToolTerminalPresentation, fingerprintResolvedAuthProfileCredential, formatAgentHarnessUserInputPrompt, formatApprovalDisplayPath, formatErrorMessage, formatFastModeAutoProgressText, formatPrePromptPrecheckLog, formatToolAggregate, formatToolExecutionErrorMessage, formatToolProgressOutput, getAgentHarnessHookRunner, getBeforeToolCallFailureDisposition, getBeforeToolCallPolicyDiagnosticState, getChannelAgentToolMeta, getModelProviderRequestTransport, getPluginToolMeta, hasBeforeToolCallPolicy, hasNativeHookRelayInvocation, hasSandboxBindContainerPathAliases, hasSandboxBindReadonlyHostShadows, inferToolMetaFromArgs, inspectRuntimeToolInputSchemas, invokeNativeHookRelay, isActiveHarnessContextEngine, isAgentToolReplaySafe, isDeliveredMessageToolOnlySourceReplyResult, isDeliveredMessagingToolResult, isHostScopedAgentToolActive, isMessagingTool, isMessagingToolSendAction, isReplaySafeToolCall, isSubagentSessionKey, isToolResultError, isToolWrappedWithBeforeToolCallHook, listNodes, loadCodexBundleMcpThreadConfig, logAgentRuntimeToolDiagnostics, materializeRequesterScopedMcpToolsForHarnessRun, testing as nativeHookRelayTesting, normalizeAgentHarnessUserInputAnswer, normalizeAgentRuntimeTools, normalizeHeartbeatToolResponse, normalizeProviderToolSchemas, normalizeUsage, onAgentEvent, projectRuntimeToolInputSchema, queueAgentHarnessMessage, registerNativeHookRelay, requestDeferredPluginToolApproval, resetAgentEventsForTest, resolveActiveEmbeddedRunSessionId, resolveAgentDir, resolveAgentHarnessBeforePromptBuildResult, resolveAgentRunAbortLifecycleFields, resolveAttemptFsWorkspaceOnly, resolveAttemptSpawnWorkspaceDir, resolveBootstrapContextForRun, resolveBootstrapFilesForRun, resolveCompactionTimeoutMs, resolveContextEngineOwnerPluginId, resolveDefaultAgentDir, resolveEmbeddedAgentRuntime, resolveEmbeddedAttemptToolConstructionPlan, resolveFastModeForElapsed, resolveModelAuthMode, resolveNativeHookRelayDeferredToolApproval, resolveNodeIdFromList, resolveOpenClawAgentDir, resolveSandboxContext, resolveSessionAgentIds, resolveSessionWriteLockAcquireTimeoutMs, resolveSessionWriteLockOptions, resolveToolExecutionErrorKind, resolveToolResultFailureKind, resolveUserPath, resolveWritableSandboxBindHostRoots, runAgentCleanupStep, runAgentEndSideEffects, runAgentHarnessAfterCompactionHook, runAgentHarnessAfterToolCallHook, runAgentHarnessAgentEndHook, runAgentHarnessBeforeAgentFinalizeHook, runAgentHarnessBeforeCompactionHook, runAgentHarnessBeforeMessageWriteHook, runAgentHarnessGatewayQuestion, runAgentHarnessLlmInputHook, runAgentHarnessLlmOutputHook, runBeforeToolCallHook, runHarnessContextEngineMaintenance, sanitizeToolResult, selectDefaultNodeFromList, setActiveEmbeddedRun, setBeforeToolCallDiagnosticsEnabled, shouldPreemptivelyCompactBeforePrompt, supportsModelTools, wrapToolWithBeforeToolCallHook };