import { s as AgentMessage } from "./types-BoFHdU9q.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-CR2kVvQb.js";
import { r as VERSION } from "./version-C1kCd9e0.js";
import { l as emitSessionTranscriptUpdate } from "./sessions-DodOo2Fh.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, 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, Uc as resolveModelAuthMode, Va as NormalizedUsage, Wi as AgentToolResultMiddleware, Xa as getBeforeToolCallPolicyDiagnosticState, Xi as AgentToolResultMiddlewareRuntime, Ya as finalizeToolTerminalPresentation, Yi as AgentToolResultMiddlewareResult, Za as hasBeforeToolCallPolicy, Zi as OpenClawAgentToolResult, _u as HEARTBEAT_RESPONSE_TOOL_NAME, bo as ContextEngineProjection, eo as runBeforeToolCallHook, gu as MessagingToolSourceReplyPayload, ho as ContextEngineHostCapability, hu as MessagingToolSend, io as consumePreExecutionBlockedToolCall, ja as AgentHarnessResetParams, ka as AgentHarnessCompactResult, ki as CodexAppServerToolResultHandlerResult, mo as ContextEngine, no as wrapToolWithBeforeToolCallHook, oo as resolveEmbeddedAgentRuntime, pu as EmbeddedAgentCompactResult, qa as DeferredPluginToolApproval, qi as AgentToolResultMiddlewareHarness, ro as consumeAdjustedParamsForToolCall, to as setBeforeToolCallDiagnosticsEnabled, uo as resolveContextEngineOwnerPluginId, vu as HeartbeatToolResponse, yo as ContextEngineOperation, yu as normalizeHeartbeatToolResponse, za as EmbeddedRunAttemptResult } from "./types-CFcw8agJ.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-2FWaopcu.js";
import { S as resetAgentEventsForTest, _ as AgentApprovalEventData, b as emitAgentEvent, v as AgentEventPayload, x as onAgentEvent } from "./types-Q03WKdi-.js";
import { $ as normalizeAgentRuntimeTools, A as buildHarnessContextEngineRuntimeContext, At as selectDefaultNodeFromList, B as appendSessionTranscriptMessage, Bt as NativeHookRelayProvider, C as formatPrePromptPrecheckLog, Ct as sanitizeToolResult, D as resolveCompactionTimeoutMs, Dt as formatToolAggregate, E as compactWithSafetyTimeout, Et as isMessagingToolSendAction, F as createAgentToolResultMiddlewareRunner, Ft as log, G as buildBootstrapContextForFiles, Gt as registerNativeHookRelay, H as acquireSessionWriteLock, Ht as buildNativeHookRelayCommand, I as createCodexAppServerToolResultExtensionRunner, It as runAgentCleanupStep, J as hasSandboxBindContainerPathAliases, Jt as CodexBundleMcpThreadConfig, K as resolveBootstrapContextForRun, Kt as resolveNativeHookRelayDeferredToolApproval, L as resolveAgentHarnessBeforePromptBuildResult, Lt as buildAgentHookContextChannelFields, M as finalizeHarnessContextEngineTurn, Mt as callGatewayTool, N as isActiveHarnessContextEngine, Nt as classifyEmbeddedAgentRunResultForModelFallback, O as assembleHarnessContextEngine, Ot as listNodes, P as runHarnessContextEngineMaintenance, Pt as buildAgentRuntimePlan, Q as logAgentRuntimeToolDiagnostics, R as runAgentHarnessAfterCompactionHook, Rt as NativeHookRelayEvent, S as estimateRenderedLlmBoundaryTokenPressure, St as filterToolResultMediaUrls, T as compactContextEngineWithSafetyTimeout, Tt as isMessagingTool, U as resolveSessionWriteLockAcquireTimeoutMs, Ut as hasNativeHookRelayInvocation, V as SessionWriteLockAcquireTimeoutConfig, Vt as NativeHookRelayRegistrationHandle, W as resolveSessionWriteLockOptions, Wt as invokeNativeHookRelay, X as resolveWritableSandboxBindHostRoots, Y as hasSandboxBindReadonlyHostShadows, Yt as LoadCodexBundleMcpThreadConfigParams, Z as normalizeProviderToolSchemas, _ as runAgentHarnessAfterToolCallHook, _t as isAgentToolReplaySafe, a as classifyAgentHarnessTerminalOutcome, at as projectRuntimeToolInputSchema, b as PREEMPTIVE_OVERFLOW_ERROR_TEXT, bt as extractMessagingToolSendResult, c as inferToolMetaFromArgs, ct as resolveEmbeddedAttemptToolConstructionPlan, d as awaitAgentHarnessAgentEndHook, dt as buildEmbeddedAttemptToolRunContext, et as RuntimeToolSchemaDiagnostic, f as getAgentHarnessHookRunner, ft as resolveAttemptSpawnWorkspaceDir, g as runAgentHarnessLlmOutputHook, gt as getChannelAgentToolMeta, h as runAgentHarnessLlmInputHook, ht as buildSkillWorkshopPromptSection, i as ToolProgressDetailMode, it as RuntimeToolInputSchemaProjection, j as buildHarnessContextEngineRuntimeContextFromUsage, jt as NodeListNode, k as bootstrapHarnessContextEngine, kt as resolveNodeIdFromList, l as loadCodexBundleMcpThreadConfig, m as runAgentHarnessBeforeAgentFinalizeHook, mt as SKILL_WORKSHOP_TOOL_NAME, n as AgentHarnessTerminalOutcomeInput, nt as inspectRuntimeToolInputSchemas, o as detectAndLoadAgentHarnessPromptImages, ot as disposeRegisteredAgentHarnesses, p as runAgentHarnessAgentEndHook, pt as resolveAttemptFsWorkspaceOnly, q as resolveBootstrapFilesForRun, qt as testing, r as TOOL_PROGRESS_OUTPUT_MAX_CHARS, rt as RuntimeToolInputSchemaJson, s as formatToolProgressOutput, st as applyEmbeddedAttemptToolsAllow, t as AgentHarnessTerminalOutcomeClassification, tt as filterProviderNormalizableTools, u as queueAgentHarnessMessage, ut as getPluginToolMeta, v as runAgentHarnessBeforeMessageWriteHook, vt as supportsModelTools, w as shouldPreemptivelyCompactBeforePrompt, wt as isToolResultError, x as PreemptiveCompactionDecision, xt as extractToolResultMediaArtifact, y as LlmBoundaryTokenPressure, yt as extractMessagingToolSend, z as runAgentHarnessBeforeCompactionHook, zt as NativeHookRelayProcessResponse } from "./agent-harness-runtime-BFGBu9yU.js";
import { a as clearActiveEmbeddedRun, c as resolveActiveEmbeddedRunSessionId, i as abortEmbeddedAgentRun, o as setActiveEmbeddedRun, r as abortAndDrainEmbeddedAgentRun, t as AbortAndDrainEmbeddedAgentRunResult } from "./runs-z0Mph66s.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-C1oRqAYQ.js";
import { r as assertContextEngineHostSupport, t as CODEX_APP_SERVER_CONTEXT_ENGINE_HOST } from "./host-compat-CXjQPbLo.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 };