import { Dr as AgentMessage } from "./proxy-ClmuQf_m.js";
import { s as appendSessionTranscriptMessage } from "./types-CW8UBWe1.js";
import { o as ExecApprovalDecision } from "./exec-approvals-SqmRBcMF.js";
import { f as isSubagentSessionKey } from "./session-key-fJM_U9Lv.js";
import { p as resolveUserPath } from "./utils-CR2kVvQb.js";
import { r as VERSION } from "./version-C1kCd9e0.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, Ha as normalizeUsage, Ia as AgentHarnessSupportContext, Ji as AgentToolResultMiddlewareOptions, Ka as BeforeToolCallPolicyDiagnosticState, Ki as AgentToolResultMiddlewareEvent, La as CompactEmbeddedAgentSessionParams, Lc as resolveModelAuthMode, Ma as AgentHarnessResultClassification, Na as AgentHarnessSideQuestionParams, Oa as AgentHarnessCompactParams, Oi as CodexAppServerToolResultEvent, Pa as AgentHarnessSideQuestionResult, Qa as isToolWrappedWithBeforeToolCallHook, Ra as EmbeddedRunAttemptParams, Ta as AgentHarness, Ti as CodexAppServerExtensionContext, Ua as isReplaySafeToolCall, Va as NormalizedUsage, Wi as AgentToolResultMiddleware, Xa as getBeforeToolCallPolicyDiagnosticState, Xi as AgentToolResultMiddlewareRuntime, Ya as finalizeToolTerminalPresentation, Yi as AgentToolResultMiddlewareResult, Za as hasBeforeToolCallPolicy, Zi as OpenClawAgentToolResult, bo as ContextEngineProjection, du as HEARTBEAT_RESPONSE_TOOL_NAME, eo as runBeforeToolCallHook, fu as HeartbeatToolResponse, ho as ContextEngineHostCapability, io as consumePreExecutionBlockedToolCall, ja as AgentHarnessResetParams, ka as AgentHarnessCompactResult, ki as CodexAppServerToolResultHandlerResult, lu as MessagingToolSend, mo as ContextEngine, no as wrapToolWithBeforeToolCallHook, oo as resolveEmbeddedAgentRuntime, pu as normalizeHeartbeatToolResponse, qa as DeferredPluginToolApproval, qi as AgentToolResultMiddlewareHarness, ro as consumeAdjustedParamsForToolCall, su as EmbeddedAgentCompactResult, to as setBeforeToolCallDiagnosticsEnabled, uo as resolveContextEngineOwnerPluginId, uu as MessagingToolSourceReplyPayload, yo as ContextEngineOperation, za as EmbeddedRunAttemptResult } from "./types-CJ7Fizdo.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-CUdWNBYA.js";
import { C as resolveSessionAgentIds, F as resolveDefaultAgentDir, N as resolveAgentDir } from "./agent-scope-AhhUYUOT.js";
import { i as emitSessionTranscriptUpdate } from "./session-accessor-evmivSTO.js";
import { S as resetAgentEventsForTest, _ as AgentApprovalEventData, b as emitAgentEvent, v as AgentEventPayload, x as onAgentEvent } from "./types-Dy9QeL1X.js";
import { $ as RuntimeToolSchemaDiagnostic, A as buildHarnessContextEngineRuntimeContext, At as NodeListNode, B as SessionWriteLockAcquireTimeoutConfig, Bt as NativeHookRelayRegistrationHandle, C as formatPrePromptPrecheckLog, Ct as isToolResultError, D as resolveCompactionTimeoutMs, Dt as listNodes, E as compactWithSafetyTimeout, Et as formatToolAggregate, F as createAgentToolResultMiddlewareRunner, Ft as runAgentCleanupStep, G as resolveBootstrapContextForRun, Gt as resolveNativeHookRelayDeferredToolApproval, H as resolveSessionWriteLockAcquireTimeoutMs, Ht as hasNativeHookRelayInvocation, I as createCodexAppServerToolResultExtensionRunner, It as buildAgentHookContextChannelFields, J as hasSandboxBindReadonlyHostShadows, Jt as LoadCodexBundleMcpThreadConfigParams, K as resolveBootstrapFilesForRun, Kt as testing, L as resolveAgentHarnessBeforePromptBuildResult, Lt as NativeHookRelayEvent, M as finalizeHarnessContextEngineTurn, Mt as classifyEmbeddedAgentRunResultForModelFallback, N as isActiveHarnessContextEngine, Nt as buildAgentRuntimePlan, O as assembleHarnessContextEngine, Ot as resolveNodeIdFromList, P as runHarnessContextEngineMaintenance, Pt as log, Q as normalizeAgentRuntimeTools, R as runAgentHarnessAfterCompactionHook, Rt as NativeHookRelayProcessResponse, S as estimateRenderedLlmBoundaryTokenPressure, St as sanitizeToolResult, T as compactContextEngineWithSafetyTimeout, Tt as isMessagingToolSendAction, U as resolveSessionWriteLockOptions, Ut as invokeNativeHookRelay, V as acquireSessionWriteLock, Vt as buildNativeHookRelayCommand, W as buildBootstrapContextForFiles, Wt as registerNativeHookRelay, X as normalizeProviderToolSchemas, Y as resolveWritableSandboxBindHostRoots, Z as logAgentRuntimeToolDiagnostics, _ as runAgentHarnessAfterToolCallHook, _t as supportsModelTools, a as classifyAgentHarnessTerminalOutcome, at as disposeRegisteredAgentHarnesses, b as PREEMPTIVE_OVERFLOW_ERROR_TEXT, bt as extractToolResultMediaArtifact, c as inferToolMetaFromArgs, d as awaitAgentHarnessAgentEndHook, dt as resolveAttemptSpawnWorkspaceDir, et as filterProviderNormalizableTools, f as getAgentHarnessHookRunner, ft as resolveAttemptFsWorkspaceOnly, g as runAgentHarnessLlmOutputHook, gt as isAgentToolReplaySafe, h as runAgentHarnessLlmInputHook, ht as getChannelAgentToolMeta, i as ToolProgressDetailMode, it as projectRuntimeToolInputSchema, j as buildHarnessContextEngineRuntimeContextFromUsage, jt as callGatewayTool, k as bootstrapHarnessContextEngine, kt as selectDefaultNodeFromList, l as loadCodexBundleMcpThreadConfig, lt as getPluginToolMeta, m as runAgentHarnessBeforeAgentFinalizeHook, mt as buildSkillWorkshopPromptSection, n as AgentHarnessTerminalOutcomeInput, nt as RuntimeToolInputSchemaJson, o as detectAndLoadAgentHarnessPromptImages, ot as applyEmbeddedAttemptToolsAllow, p as runAgentHarnessAgentEndHook, pt as SKILL_WORKSHOP_TOOL_NAME, q as hasSandboxBindContainerPathAliases, qt as CodexBundleMcpThreadConfig, r as TOOL_PROGRESS_OUTPUT_MAX_CHARS, rt as RuntimeToolInputSchemaProjection, s as formatToolProgressOutput, st as resolveEmbeddedAttemptToolConstructionPlan, t as AgentHarnessTerminalOutcomeClassification, tt as inspectRuntimeToolInputSchemas, u as queueAgentHarnessMessage, ut as buildEmbeddedAttemptToolRunContext, v as runAgentHarnessBeforeMessageWriteHook, vt as extractMessagingToolSend, w as shouldPreemptivelyCompactBeforePrompt, wt as isMessagingTool, x as PreemptiveCompactionDecision, xt as filterToolResultMediaUrls, y as LlmBoundaryTokenPressure, yt as extractMessagingToolSendResult, z as runAgentHarnessBeforeCompactionHook, zt as NativeHookRelayProvider } from "./agent-harness-runtime-jI03bXZ_.js";
import { a as clearActiveEmbeddedRun, c as resolveActiveEmbeddedRunSessionId, i as abortEmbeddedAgentRun, o as setActiveEmbeddedRun, r as abortAndDrainEmbeddedAgentRun, t as AbortAndDrainEmbeddedAgentRunResult } from "./runs-D74iDdE0.js";
import { a as formatErrorMessage } from "./errors-BICDLNaN.js";
import { t as formatApprovalDisplayPath } from "./approval-display-paths-Hb4BQ_zR.js";
import { t as resolveOpenClawAgentDir } from "./agent-dir-compat-ochOeoeD.js";
import { L as SandboxWorkspaceAccess, N as resolveSandboxContext, P as SandboxContext } from "./sandbox-Db9YV-OM.js";
import { n as assertContextEngineHostSupport, t as CODEX_APP_SERVER_CONTEXT_ENGINE_HOST } from "./host-compat-BX3o7uFP.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 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, 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, awaitAgentHarnessAgentEndHook, bootstrapHarnessContextEngine, buildAgentHookContextChannelFields, buildAgentRuntimePlan, buildBootstrapContextForFiles, buildEmbeddedAttemptToolRunContext, buildHarnessContextEngineRuntimeContext, buildHarnessContextEngineRuntimeContextFromUsage, buildNativeHookRelayCommand, buildSkillWorkshopPromptSection, callGatewayTool, classifyAgentHarnessTerminalOutcome, classifyEmbeddedAgentRunResultForModelFallback, classifyEmbeddedAgentRunResultForModelFallback as classifyEmbeddedPiRunResultForModelFallback, clearActiveEmbeddedRun, compactContextEngineWithSafetyTimeout, compactWithSafetyTimeout, consumeAdjustedParamsForToolCall, consumePreExecutionBlockedToolCall, createAgentToolResultMiddlewareRunner, createCodexAppServerToolResultExtensionRunner, detectAndLoadAgentHarnessPromptImages, disposeRegisteredAgentHarnesses, log as embeddedAgentLog, emitAgentEvent, emitSessionTranscriptUpdate, estimateRenderedLlmBoundaryTokenPressure, extractMessagingToolSend, extractMessagingToolSendResult, extractToolResultMediaArtifact, filterProviderNormalizableTools, filterToolResultMediaUrls, finalizeHarnessContextEngineTurn, finalizeToolTerminalPresentation, formatApprovalDisplayPath, formatErrorMessage, formatPrePromptPrecheckLog, formatToolAggregate, formatToolProgressOutput, getAgentHarnessHookRunner, getBeforeToolCallPolicyDiagnosticState, getChannelAgentToolMeta, getPluginToolMeta, hasBeforeToolCallPolicy, hasNativeHookRelayInvocation, hasSandboxBindContainerPathAliases, hasSandboxBindReadonlyHostShadows, inferToolMetaFromArgs, inspectRuntimeToolInputSchemas, invokeNativeHookRelay, isActiveHarnessContextEngine, isAgentToolReplaySafe, isMessagingTool, isMessagingToolSendAction, isReplaySafeToolCall, isSubagentSessionKey, isToolResultError, isToolWrappedWithBeforeToolCallHook, listNodes, loadCodexBundleMcpThreadConfig, logAgentRuntimeToolDiagnostics, testing as nativeHookRelayTesting, normalizeAgentRuntimeTools, normalizeHeartbeatToolResponse, normalizeProviderToolSchemas, normalizeUsage, onAgentEvent, projectRuntimeToolInputSchema, queueAgentHarnessMessage, registerNativeHookRelay, requestDeferredPluginToolApproval, resetAgentEventsForTest, resolveActiveEmbeddedRunSessionId, resolveAgentDir, resolveAgentHarnessBeforePromptBuildResult, resolveAttemptFsWorkspaceOnly, resolveAttemptSpawnWorkspaceDir, resolveBootstrapContextForRun, resolveBootstrapFilesForRun, resolveCompactionTimeoutMs, resolveContextEngineOwnerPluginId, resolveDefaultAgentDir, resolveEmbeddedAgentRuntime, resolveEmbeddedAttemptToolConstructionPlan, resolveModelAuthMode, resolveNativeHookRelayDeferredToolApproval, resolveNodeIdFromList, resolveOpenClawAgentDir, resolveSandboxContext, resolveSessionAgentIds, resolveSessionWriteLockAcquireTimeoutMs, resolveSessionWriteLockOptions, resolveUserPath, resolveWritableSandboxBindHostRoots, runAgentCleanupStep, runAgentHarnessAfterCompactionHook, runAgentHarnessAfterToolCallHook, runAgentHarnessAgentEndHook, runAgentHarnessBeforeAgentFinalizeHook, runAgentHarnessBeforeCompactionHook, runAgentHarnessBeforeMessageWriteHook, runAgentHarnessLlmInputHook, runAgentHarnessLlmOutputHook, runBeforeToolCallHook, runHarnessContextEngineMaintenance, sanitizeToolResult, selectDefaultNodeFromList, setActiveEmbeddedRun, setBeforeToolCallDiagnosticsEnabled, shouldPreemptivelyCompactBeforePrompt, supportsModelTools, wrapToolWithBeforeToolCallHook };