import { s as AgentMessage } from "./types-BoFHdU9q.js";
import { l as FAST_MODE_AUTO_PROGRESS_KIND } from "./types-CrpV1nYK.js";
import { c as ExecApprovalDecision } from "./exec-approvals-bouecjdj.js";
import { f as isSubagentSessionKey } from "./session-key-fJM_U9Lv.js";
import { p as resolveUserPath } from "./utils-CSF_huAn.js";
import { r as VERSION } from "./version-C1kCd9e0.js";
import { c as getModelProviderRequestTransport, s as attachModelProviderRequestTransport } from "./provider-request-config-bm5duAkM.js";
import { d as emitSessionTranscriptUpdate } from "./transcript-BMVqF608.js";
import { $a as requestDeferredPluginToolApproval, Aa as AgentHarnessDeliveryDefaults, Da as AgentHarnessAttemptResult, Di as CodexAppServerExtensionRuntime, Ea as AgentHarnessAttemptParams, Ei as CodexAppServerExtensionFactory, Fa as AgentHarnessSupport, Gi as AgentToolResultMiddlewareContext, Gs as resolveContextEngineOwnerPluginId, Ha as normalizeUsage, Ia as AgentHarnessSupportContext, Ji as AgentToolResultMiddlewareOptions, Ka as BeforeToolCallPolicyDiagnosticState, Ki as AgentToolResultMiddlewareEvent, La as CompactEmbeddedAgentSessionParams, Ma as AgentHarnessResultClassification, Na as AgentHarnessSideQuestionParams, Nu as resolveModelAuthMode, Oa as AgentHarnessCompactParams, Oi as CodexAppServerToolResultEvent, Pa as AgentHarnessSideQuestionResult, Qa as hasBeforeToolCallPolicy, Ra as EmbeddedRunAttemptParams, Ta as AgentHarness, Ti as CodexAppServerExtensionContext, Ua as isReplaySafeToolCall, Va as NormalizedUsage, Wi as AgentToolResultMiddleware, Xa as finalizeToolTerminalPresentation, Xi as AgentToolResultMiddlewareRuntime, Xl as FastModeAutoProgressState, Xs as ContextEngineHostCapability, Yi as AgentToolResultMiddlewareResult, Ys as ContextEngine, Za as getBeforeToolCallPolicyDiagnosticState, Zi as OpenClawAgentToolResult, Zl as formatFastModeAutoProgressText, af as MessagingToolSend, ao as consumePreExecutionBlockedToolCall, cf as HeartbeatToolResponse, ec as ContextEngineOperation, eo as runBeforeToolCallHook, io as consumeAdjustedParamsForToolCall, ja as AgentHarnessResetParams, ka as AgentHarnessCompactResult, ki as CodexAppServerToolResultHandlerResult, lf as normalizeHeartbeatToolResponse, no as isToolWrappedWithBeforeToolCallHook, nu as resolveFastModeForElapsed, of as MessagingToolSourceReplyPayload, qa as DeferredPluginToolApproval, qi as AgentToolResultMiddlewareHarness, rf as EmbeddedAgentCompactResult, ro as setBeforeToolCallDiagnosticsEnabled, sf as HEARTBEAT_RESPONSE_TOOL_NAME, so as resolveEmbeddedAgentRuntime, tc as ContextEngineProjection, to as wrapToolWithBeforeToolCallHook, za as EmbeddedRunAttemptResult } from "./types-CHL-WW5j.js";
import { i as ExecAutoReviewer, r as ExecAutoReviewInput, t as ExecAutoReviewDecision } from "./exec-auto-review-CYFxs7ho.js";
import { t as EmbeddedContextFile } from "./types-CMKgUJ7Q.js";
import { r as AnyAgentTool } from "./common-DDc8qh0a.js";
import { C as resolveSessionAgentIds, F as resolveDefaultAgentDir, N as resolveAgentDir } from "./agent-scope-BRVWlWca.js";
import { S as resetAgentEventsForTest, _ as AgentApprovalEventData, b as emitAgentEvent, v as AgentEventPayload, x as onAgentEvent } from "./types-BQq-7ZZ9.js";
import { a as formatErrorMessage } from "./errors-BICDLNaN.js";
import { $ as normalizeProviderToolSchemas, $t as AgentHarnessUserInputQuestion, A as assembleHarnessContextEngine, At as listNodes, B as runAgentHarnessAfterCompactionHook, Bt as NativeHookRelayEvent, C as PreemptiveCompactionDecision, Ct as extractToolResultMediaArtifact, D as compactContextEngineWithSafetyTimeout, Dt as isMessagingTool, E as shouldPreemptivelyCompactBeforePrompt, Et as isToolResultError, F as isActiveHarnessContextEngine, Ft as classifyEmbeddedAgentRunResultForModelFallback, G as resolveSessionWriteLockAcquireTimeoutMs, Gt as hasNativeHookRelayInvocation, H as appendSessionTranscriptMessage, Ht as NativeHookRelayProvider, I as runHarnessContextEngineMaintenance, It as buildAgentRuntimePlan, J as resolveBootstrapContextForRun, Jt as resolveNativeHookRelayDeferredToolApproval, K as resolveSessionWriteLockOptions, Kt as invokeNativeHookRelay, L as createAgentToolResultMiddlewareRunner, Lt as log, M as buildHarnessContextEngineRuntimeContext, Mt as selectDefaultNodeFromList, N as buildHarnessContextEngineRuntimeContextFromUsage, Nt as NodeListNode, O as compactWithSafetyTimeout, Ot as isMessagingToolSendAction, P as finalizeHarnessContextEngineTurn, Pt as callGatewayTool, Q as resolveWritableSandboxBindHostRoots, Qt as AgentHarnessUserInputPromptOptions, R as createCodexAppServerToolResultExtensionRunner, Rt as runAgentCleanupStep, S as PREEMPTIVE_OVERFLOW_ERROR_TEXT, St as extractToolErrorMessage, T as formatPrePromptPrecheckLog, Tt as sanitizeToolResult, U as SessionWriteLockAcquireTimeoutConfig, Ut as NativeHookRelayRegistrationHandle, V as runAgentHarnessBeforeCompactionHook, Vt as NativeHookRelayProcessResponse, W as acquireSessionWriteLock, Wt as buildNativeHookRelayCommand, X as hasSandboxBindContainerPathAliases, Xt as AgentHarnessUserInputAnswers, Y as resolveBootstrapFilesForRun, Yt as testing, Z as hasSandboxBindReadonlyHostShadows, Zt as AgentHarnessUserInputOption, _ as runAgentHarnessLlmInputHook, _t as getChannelAgentToolMeta, a as classifyAgentHarnessTerminalOutcome, an as isDeliveredMessageToolOnlySourceReplyResult, at as RuntimeToolInputSchemaJson, b as runAgentHarnessBeforeMessageWriteHook, bt as extractMessagingToolSend, c as inferToolMetaFromArgs, cn as LoadCodexBundleMcpThreadConfigParams, ct as disposeRegisteredAgentHarnesses, d as awaitAgentEndSideEffects, dt as createOpenClawCodingTools, en as buildAgentHarnessUserInputAnswers, et as logAgentRuntimeToolDiagnostics, f as runAgentEndSideEffects, ft as buildEmbeddedAttemptToolRunContext, g as runAgentHarnessBeforeAgentFinalizeHook, gt as buildSkillWorkshopPromptSection, h as runAgentHarnessAgentEndHook, ht as SKILL_WORKSHOP_TOOL_NAME, i as ToolProgressDetailMode, in as normalizeAgentHarnessUserInputAnswer, it as inspectRuntimeToolInputSchemas, j as bootstrapHarnessContextEngine, jt as resolveNodeIdFromList, k as resolveCompactionTimeoutMs, kt as formatToolAggregate, l as loadCodexBundleMcpThreadConfig, lt as applyEmbeddedAttemptToolsAllow, m as getAgentHarnessHookRunner, mt as resolveAttemptFsWorkspaceOnly, n as AgentHarnessTerminalOutcomeInput, nn as emptyAgentHarnessUserInputAnswers, nt as RuntimeToolSchemaDiagnostic, o as detectAndLoadAgentHarnessPromptImages, on as isDeliveredMessagingToolResult, ot as RuntimeToolInputSchemaProjection, p as awaitAgentHarnessAgentEndHook, pt as resolveAttemptSpawnWorkspaceDir, q as buildBootstrapContextForFiles, qt as registerNativeHookRelay, r as TOOL_PROGRESS_OUTPUT_MAX_CHARS, rn as formatAgentHarnessUserInputPrompt, rt as filterProviderNormalizableTools, s as formatToolProgressOutput, sn as CodexBundleMcpThreadConfig, st as projectRuntimeToolInputSchema, t as AgentHarnessTerminalOutcomeClassification, tn as deliverAgentHarnessUserInputPrompt, tt as normalizeAgentRuntimeTools, u as queueAgentHarnessMessage, ut as resolveEmbeddedAttemptToolConstructionPlan, v as runAgentHarnessLlmOutputHook, vt as isAgentToolReplaySafe, w as estimateRenderedLlmBoundaryTokenPressure, wt as filterToolResultMediaUrls, x as LlmBoundaryTokenPressure, xt as extractMessagingToolSendResult, y as runAgentHarnessAfterToolCallHook, yt as supportsModelTools, z as resolveAgentHarnessBeforePromptBuildResult, zt as buildAgentHookContextChannelFields } from "./agent-harness-runtime-CMqjOHbc.js";
import { a as clearActiveEmbeddedRun, c as resolveActiveEmbeddedRunSessionId, i as abortEmbeddedAgentRun, o as setActiveEmbeddedRun, r as abortAndDrainEmbeddedAgentRun, t as AbortAndDrainEmbeddedAgentRunResult } from "./runs-izznrl_e.js";
import { t as formatApprovalDisplayPath } from "./approval-display-paths-Hb4BQ_zR.js";
import { t as resolveOpenClawAgentDir } from "./agent-dir-compat-ochOeoeD.js";
import { F as SandboxContext, P as resolveSandboxContext, R as SandboxWorkspaceAccess } from "./sandbox-BDSeZot6.js";
import { r as getPluginToolMeta } from "./tool-search-BJNcaQPS.js";
import { r as assertContextEngineHostSupport, t as CODEX_APP_SERVER_CONTEXT_ENGINE_HOST } from "./host-compat-DHokr2aL.js";
import { t as resolveWebSearchToolPolicy } from "./web-search-tool-policy-DqveQLGB.js";
export { type AbortAndDrainEmbeddedAgentRunResult as AbortAndDrainAgentHarnessRunResult, type AgentApprovalEventData, type AgentEventPayload, type AgentHarness, type AgentHarnessAttemptParams, type AgentHarnessAttemptResult, type AgentHarnessCompactParams, type AgentHarnessCompactResult, type AgentHarnessDeliveryDefaults, type AgentHarnessResetParams, type AgentHarnessResultClassification, 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 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, type 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, abortEmbeddedAgentRun as abortAgentHarnessRun, abortAndDrainEmbeddedAgentRun as abortAndDrainAgentHarnessRun, acquireSessionWriteLock, appendSessionTranscriptMessage, applyEmbeddedAttemptToolsAllow, assembleHarnessContextEngine, assertContextEngineHostSupport, attachModelProviderRequestTransport, awaitAgentEndSideEffects, awaitAgentHarnessAgentEndHook, bootstrapHarnessContextEngine, buildAgentHarnessUserInputAnswers, buildAgentHookContextChannelFields, buildAgentRuntimePlan, buildBootstrapContextForFiles, buildEmbeddedAttemptToolRunContext, buildHarnessContextEngineRuntimeContext, buildHarnessContextEngineRuntimeContextFromUsage, buildNativeHookRelayCommand, buildSkillWorkshopPromptSection, callGatewayTool, classifyAgentHarnessTerminalOutcome, classifyEmbeddedAgentRunResultForModelFallback, classifyEmbeddedAgentRunResultForModelFallback as classifyEmbeddedPiRunResultForModelFallback, clearActiveEmbeddedRun, compactContextEngineWithSafetyTimeout, compactWithSafetyTimeout, consumeAdjustedParamsForToolCall, consumePreExecutionBlockedToolCall, createAgentToolResultMiddlewareRunner, createCodexAppServerToolResultExtensionRunner, createOpenClawCodingTools, deliverAgentHarnessUserInputPrompt, detectAndLoadAgentHarnessPromptImages, disposeRegisteredAgentHarnesses, log as embeddedAgentLog, emitAgentEvent, emitSessionTranscriptUpdate, emptyAgentHarnessUserInputAnswers, estimateRenderedLlmBoundaryTokenPressure, extractMessagingToolSend, extractMessagingToolSendResult, extractToolErrorMessage, extractToolResultMediaArtifact, filterProviderNormalizableTools, filterToolResultMediaUrls, finalizeHarnessContextEngineTurn, finalizeToolTerminalPresentation, formatAgentHarnessUserInputPrompt, formatApprovalDisplayPath, formatErrorMessage, formatFastModeAutoProgressText, formatPrePromptPrecheckLog, formatToolAggregate, formatToolProgressOutput, getAgentHarnessHookRunner, getBeforeToolCallPolicyDiagnosticState, getChannelAgentToolMeta, getModelProviderRequestTransport, getPluginToolMeta, hasBeforeToolCallPolicy, hasNativeHookRelayInvocation, hasSandboxBindContainerPathAliases, hasSandboxBindReadonlyHostShadows, inferToolMetaFromArgs, inspectRuntimeToolInputSchemas, invokeNativeHookRelay, isActiveHarnessContextEngine, isAgentToolReplaySafe, isDeliveredMessageToolOnlySourceReplyResult, isDeliveredMessagingToolResult, isMessagingTool, isMessagingToolSendAction, isReplaySafeToolCall, isSubagentSessionKey, isToolResultError, isToolWrappedWithBeforeToolCallHook, listNodes, loadCodexBundleMcpThreadConfig, logAgentRuntimeToolDiagnostics, testing as nativeHookRelayTesting, normalizeAgentHarnessUserInputAnswer, normalizeAgentRuntimeTools, normalizeHeartbeatToolResponse, normalizeProviderToolSchemas, normalizeUsage, onAgentEvent, projectRuntimeToolInputSchema, queueAgentHarnessMessage, registerNativeHookRelay, requestDeferredPluginToolApproval, resetAgentEventsForTest, resolveActiveEmbeddedRunSessionId, resolveAgentDir, resolveAgentHarnessBeforePromptBuildResult, resolveAttemptFsWorkspaceOnly, resolveAttemptSpawnWorkspaceDir, resolveBootstrapContextForRun, resolveBootstrapFilesForRun, resolveCompactionTimeoutMs, resolveContextEngineOwnerPluginId, resolveDefaultAgentDir, resolveEmbeddedAgentRuntime, resolveEmbeddedAttemptToolConstructionPlan, resolveFastModeForElapsed, resolveModelAuthMode, resolveNativeHookRelayDeferredToolApproval, resolveNodeIdFromList, resolveOpenClawAgentDir, resolveSandboxContext, resolveSessionAgentIds, resolveSessionWriteLockAcquireTimeoutMs, resolveSessionWriteLockOptions, resolveUserPath, resolveWebSearchToolPolicy, resolveWritableSandboxBindHostRoots, runAgentCleanupStep, runAgentEndSideEffects, runAgentHarnessAfterCompactionHook, runAgentHarnessAfterToolCallHook, runAgentHarnessAgentEndHook, runAgentHarnessBeforeAgentFinalizeHook, runAgentHarnessBeforeCompactionHook, runAgentHarnessBeforeMessageWriteHook, runAgentHarnessLlmInputHook, runAgentHarnessLlmOutputHook, runBeforeToolCallHook, runHarnessContextEngineMaintenance, sanitizeToolResult, selectDefaultNodeFromList, setActiveEmbeddedRun, setBeforeToolCallDiagnosticsEnabled, shouldPreemptivelyCompactBeforePrompt, supportsModelTools, wrapToolWithBeforeToolCallHook };