import { Dr as AgentMessage } from "./proxy-B8R20kws.js";
import { s as appendSessionTranscriptMessage } from "./types-B6Uw2c5z.js";
import { o as ExecApprovalDecision } from "./exec-approvals-BMVAZXjT.js";
import { f as isSubagentSessionKey } from "./session-key-fJM_U9Lv.js";
import { p as resolveUserPath } from "./utils-CRegZsWE.js";
import { r as VERSION } from "./version-C1kCd9e0.js";
import { $i as setBeforeToolCallDiagnosticsEnabled, Ai as AgentHarnessDeliveryDefaults, Ar as CodexAppServerToolResultEvent, Di as AgentHarnessAttemptResult, Dr as CodexAppServerExtensionContext, Ds as resolveModelAuthMode, Ei as AgentHarnessAttemptParams, Eo as emitSessionTranscriptUpdate, Fi as AgentHarnessSupport, Gi as BeforeToolCallPolicyDiagnosticState, Gr as AgentToolResultMiddlewareContext, Hi as normalizeUsage, Ii as AgentHarnessSupportContext, Ji as getBeforeToolCallPolicyDiagnosticState, Jr as AgentToolResultMiddlewareOptions, Ki as DeferredPluginToolApproval, Kr as AgentToolResultMiddlewareEvent, Li as CompactEmbeddedAgentSessionParams, Mi as AgentHarnessResultClassification, Ni as AgentHarnessSideQuestionParams, Oi as AgentHarnessCompactParams, Or as CodexAppServerExtensionFactory, Pi as AgentHarnessSideQuestionResult, Qc as EmbeddedAgentCompactResult, Qi as runBeforeToolCallHook, Ri as EmbeddedRunAttemptParams, Ti as AgentHarness, Vi as NormalizedUsage, Wr as AgentToolResultMiddleware, Xi as isToolWrappedWithBeforeToolCallHook, Xr as AgentToolResultMiddlewareRuntime, Yi as hasBeforeToolCallPolicy, Yr as AgentToolResultMiddlewareResult, Zi as requestDeferredPluginToolApproval, Zr as OpenClawAgentToolResult, da as ContextEngineHostCapability, ea as wrapToolWithBeforeToolCallHook, el as MessagingToolSend, ga as ContextEngineProjection, ha as ContextEngineOperation, il as normalizeHeartbeatToolResponse, ji as AgentHarnessResetParams, jr as CodexAppServerToolResultHandlerResult, ki as AgentHarnessCompactResult, kr as CodexAppServerExtensionRuntime, na as resolveEmbeddedAgentRuntime, nl as HEARTBEAT_RESPONSE_TOOL_NAME, oa as resolveContextEngineOwnerPluginId, qr as AgentToolResultMiddlewareHarness, rl as HeartbeatToolResponse, tl as MessagingToolSourceReplyPayload, ua as ContextEngine, zi as EmbeddedRunAttemptResult } from "./types-B26yIFhw.js";
import { t as EmbeddedContextFile } from "./types-7Vl6d1IJ.js";
import { r as AnyAgentTool } from "./common-BEiq2hZg.js";
import { C as resolveSessionAgentIds, F as resolveDefaultAgentDir, N as resolveAgentDir } from "./agent-scope-B78mtkMa.js";
import { S as resetAgentEventsForTest, _ as AgentApprovalEventData, b as emitAgentEvent, v as AgentEventPayload, x as onAgentEvent } from "./types-CO8ac8z4.js";
import { $ as RuntimeToolInputSchemaJson, A as buildHarnessContextEngineRuntimeContext, At as buildAgentHookContextChannelFields, B as SessionWriteLockAcquireTimeoutConfig, Bt as testing, C as formatPrePromptPrecheckLog, Ct as selectDefaultNodeFromList, D as resolveCompactionTimeoutMs, Dt as buildAgentRuntimePlan, E as compactWithSafetyTimeout, Et as classifyEmbeddedAgentRunResultForModelFallback, F as createAgentToolResultMiddlewareRunner, Ft as buildNativeHookRelayCommand, G as resolveBootstrapContextForRun, H as resolveSessionWriteLockAcquireTimeoutMs, Ht as LoadCodexBundleMcpThreadConfigParams, I as createCodexAppServerToolResultExtensionRunner, It as hasNativeHookRelayInvocation, J as hasSandboxBindReadonlyHostShadows, K as resolveBootstrapFilesForRun, L as resolveAgentHarnessBeforePromptBuildResult, Lt as invokeNativeHookRelay, M as finalizeHarnessContextEngineTurn, Mt as NativeHookRelayProcessResponse, N as isActiveHarnessContextEngine, Nt as NativeHookRelayProvider, O as assembleHarnessContextEngine, Ot as log, P as runHarnessContextEngineMaintenance, Pt as NativeHookRelayRegistrationHandle, Q as normalizeAgentRuntimeTools, R as runAgentHarnessAfterCompactionHook, Rt as registerNativeHookRelay, S as estimateRenderedLlmBoundaryTokenPressure, St as resolveNodeIdFromList, T as compactContextEngineWithSafetyTimeout, Tt as callGatewayTool, U as resolveSessionWriteLockOptions, V as acquireSessionWriteLock, Vt as CodexBundleMcpThreadConfig, W as buildBootstrapContextForFiles, X as normalizeProviderToolSchemas, Y as resolveWritableSandboxBindHostRoots, Z as logAgentRuntimeToolDiagnostics, _ as runAgentHarnessAfterToolCallHook, _t as filterToolResultMediaUrls, a as classifyAgentHarnessTerminalOutcome, at as disposeRegisteredAgentHarnesses, b as PREEMPTIVE_OVERFLOW_ERROR_TEXT, bt as formatToolAggregate, c as inferToolMetaFromArgs, ct as createOpenClawCodingTools, d as awaitAgentHarnessAgentEndHook, dt as resolveAttemptSpawnWorkspaceDir, et as RuntimeToolInputSchemaProjection, f as getAgentHarnessHookRunner, ft as resolveAttemptFsWorkspaceOnly, g as runAgentHarnessLlmOutputHook, gt as extractToolResultMediaArtifact, h as runAgentHarnessLlmInputHook, ht as supportsModelTools, i as ToolProgressDetailMode, it as projectRuntimeToolInputSchema, j as buildHarnessContextEngineRuntimeContextFromUsage, jt as NativeHookRelayEvent, k as bootstrapHarnessContextEngine, kt as runAgentCleanupStep, l as loadCodexBundleMcpThreadConfig, lt as getPluginToolMeta, m as runAgentHarnessBeforeAgentFinalizeHook, mt as buildSkillWorkshopPromptSection, n as AgentHarnessTerminalOutcomeInput, nt as filterProviderNormalizableTools, o as detectAndLoadAgentHarnessPromptImages, ot as applyEmbeddedAttemptToolsAllow, p as runAgentHarnessAgentEndHook, pt as SKILL_WORKSHOP_TOOL_NAME, q as hasSandboxBindContainerPathAliases, r as TOOL_PROGRESS_OUTPUT_MAX_CHARS, rt as inspectRuntimeToolInputSchemas, s as formatToolProgressOutput, st as resolveEmbeddedAttemptToolConstructionPlan, t as AgentHarnessTerminalOutcomeClassification, tt as RuntimeToolSchemaDiagnostic, u as queueAgentHarnessMessage, ut as buildEmbeddedAttemptToolRunContext, v as runAgentHarnessBeforeMessageWriteHook, vt as isMessagingTool, w as shouldPreemptivelyCompactBeforePrompt, wt as NodeListNode, x as PreemptiveCompactionDecision, xt as listNodes, y as LlmBoundaryTokenPressure, yt as isMessagingToolSendAction, z as runAgentHarnessBeforeCompactionHook, zt as resolveNativeHookRelayDeferredToolApproval } from "./agent-harness-runtime-f18LDCMJ.js";
import { a as clearActiveEmbeddedRun, i as abortEmbeddedAgentRun, o as resolveActiveEmbeddedRunSessionId, r as abortAndDrainEmbeddedAgentRun, s as setActiveEmbeddedRun, t as AbortAndDrainEmbeddedAgentRunResult } from "./runs-BDJc878Q.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 { M as SandboxContext, P as SandboxWorkspaceAccess, j as resolveSandboxContext } from "./sandbox-CAxfGjqT.js";
import { n as assertContextEngineHostSupport, t as CODEX_APP_SERVER_CONTEXT_ENGINE_HOST } from "./host-compat-BrBdYn4U.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, 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, createAgentToolResultMiddlewareRunner, createCodexAppServerToolResultExtensionRunner, createOpenClawCodingTools, detectAndLoadAgentHarnessPromptImages, disposeRegisteredAgentHarnesses, log as embeddedAgentLog, emitAgentEvent, emitSessionTranscriptUpdate, estimateRenderedLlmBoundaryTokenPressure, extractToolResultMediaArtifact, filterProviderNormalizableTools, filterToolResultMediaUrls, finalizeHarnessContextEngineTurn, formatApprovalDisplayPath, formatErrorMessage, formatPrePromptPrecheckLog, formatToolAggregate, formatToolProgressOutput, getAgentHarnessHookRunner, getBeforeToolCallPolicyDiagnosticState, getPluginToolMeta, hasBeforeToolCallPolicy, hasNativeHookRelayInvocation, hasSandboxBindContainerPathAliases, hasSandboxBindReadonlyHostShadows, inferToolMetaFromArgs, inspectRuntimeToolInputSchemas, invokeNativeHookRelay, isActiveHarnessContextEngine, isMessagingTool, isMessagingToolSendAction, isSubagentSessionKey, 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, selectDefaultNodeFromList, setActiveEmbeddedRun, setBeforeToolCallDiagnosticsEnabled, shouldPreemptivelyCompactBeforePrompt, supportsModelTools, wrapToolWithBeforeToolCallHook };