import { a as formatErrorMessage } from "../errors-D58q7G6U.js";
import { p as resolveUserPath } from "../utils-Ba75iQOz.js";
import { n as VERSION } from "../version-fgT8krnQ.js";
import { o as isSubagentSessionKey } from "../session-key-utils-CU4nPSsL.js";
import { a as resolveAgentDir, s as resolveDefaultAgentDir } from "../agent-scope-config-DkpPMLgw.js";
import { m as resolveSessionAgentIds } from "../agent-scope-nQ3Sziuh.js";
import { S as disposeRegisteredAgentHarnesses } from "../loader-C1OkmYIf.js";
import { d as resetAgentEventsForTest, i as emitAgentEvent, l as onAgentEvent } from "../agent-events-BLPZ6oem.js";
import { t as emitSessionTranscriptUpdate } from "../transcript-events-3mybXoMG.js";
import { c as resolveSessionWriteLockAcquireTimeoutMs, r as acquireSessionWriteLock } from "../session-write-lock-DXiMQFTL.js";
import { s as appendSessionTranscriptMessage } from "../transcript-kHIlMAOi.js";
import { f as setActiveEmbeddedRun, l as queueEmbeddedPiMessage, n as abortEmbeddedPiRun, r as clearActiveEmbeddedRun } from "../runs-CZlxgr7Y.js";
import { n as resolveEmbeddedAgentRuntime } from "../runtime-B71Rkxy4.js";
import { a as resolveBootstrapContextForRun } from "../bootstrap-files-CceDdE6D.js";
import { u as resolveModelAuthMode } from "../model-auth-6PUeW4WJ.js";
import { a as normalizeProviderToolSchemas, o as supportsModelTools, t as createAgentToolResultMiddlewareRunner } from "../tool-result-middleware-Bk-uTahZ.js";
import { t as log } from "../logger-mRy_ehd-.js";
import { o as normalizeUsage } from "../usage-BYaWKS-q.js";
import { g as resolveOpenClawAgentDir } from "../provider-auth-xmozx9bh.js";
import { o as normalizeHeartbeatToolResponse, t as HEARTBEAT_RESPONSE_TOOL_NAME } from "../heartbeat-tool-response-vsgAKLmv.js";
import { S as isMessagingToolSendAction, a as buildHarnessContextEngineRuntimeContextFromUsage, c as runHarnessContextEngineMaintenance, d as runAgentCleanupStep, g as filterToolResultMediaUrls, i as buildHarnessContextEngineRuntimeContext, l as logAgentRuntimeToolDiagnostics, m as extractToolResultMediaArtifact, n as assembleHarnessContextEngine, o as finalizeHarnessContextEngineTurn, r as bootstrapHarnessContextEngine, s as isActiveHarnessContextEngine, t as buildEmbeddedAttemptToolRunContext, u as normalizeAgentRuntimeTools, x as isMessagingTool } from "../attempt.tool-run-context-BcWDgRyB.js";
import { t as formatToolAggregate } from "../tool-meta--1QNgYcm.js";
import { c as wrapToolWithBeforeToolCallHook, o as isToolWrappedWithBeforeToolCallHook } from "../pi-tools.before-tool-call-Cqn6djxJ.js";
import { t as callGatewayTool } from "../gateway-BMbSpGOX.js";
import { t as createOpenClawCodingTools } from "../pi-tools-DuNSS__d.js";
import { a as selectDefaultNodeFromList, i as resolveNodeIdFromList, t as listNodes } from "../nodes-utils-Cf0-IhPX.js";
import { o as resolveSandboxContext } from "../sandbox-BUunohTg.js";
import { r as resolveAttemptSpawnWorkspaceDir } from "../attempt.thread-helpers-DlHYkHI6.js";
import { r as buildAgentRuntimePlan } from "../build-6s8ZQ0NJ.js";
import { t as classifyEmbeddedPiRunResultForModelFallback } from "../result-fallback-classifier-BW_CTyEb.js";
import { t as formatApprovalDisplayPath } from "../approval-display-paths-BNBISa31.js";
import { i as runAgentHarnessLlmOutputHook, n as runAgentHarnessBeforeAgentFinalizeHook, r as runAgentHarnessLlmInputHook, t as runAgentHarnessAgentEndHook } from "../lifecycle-hook-helpers-6Q3Lc_GA.js";
import { a as createCodexAppServerToolResultExtensionRunner, c as runAgentHarnessBeforeCompactionHook, i as inferToolMetaFromArgs, n as classifyAgentHarnessTerminalOutcome, o as resolveAgentHarnessBeforePromptBuildResult, r as formatToolProgressOutput, s as runAgentHarnessAfterCompactionHook, t as TOOL_PROGRESS_OUTPUT_MAX_CHARS } from "../agent-harness-runtime-CJ7EA22K.js";
import { a as registerNativeHookRelay, c as runAgentHarnessBeforeMessageWriteHook, n as buildNativeHookRelayCommand, s as runAgentHarnessAfterToolCallHook, t as __testing } from "../native-hook-relay-COZWiVc5.js";
import "../agent-harness-Be4xOwH3.js";
export { HEARTBEAT_RESPONSE_TOOL_NAME, VERSION as OPENCLAW_VERSION, TOOL_PROGRESS_OUTPUT_MAX_CHARS, abortEmbeddedPiRun as abortAgentHarnessRun, acquireSessionWriteLock, appendSessionTranscriptMessage, assembleHarnessContextEngine, bootstrapHarnessContextEngine, buildAgentRuntimePlan, buildEmbeddedAttemptToolRunContext, buildHarnessContextEngineRuntimeContext, buildHarnessContextEngineRuntimeContextFromUsage, buildNativeHookRelayCommand, callGatewayTool, classifyAgentHarnessTerminalOutcome, classifyEmbeddedPiRunResultForModelFallback, clearActiveEmbeddedRun, createAgentToolResultMiddlewareRunner, createCodexAppServerToolResultExtensionRunner, createOpenClawCodingTools, disposeRegisteredAgentHarnesses, log as embeddedAgentLog, emitAgentEvent, emitSessionTranscriptUpdate, extractToolResultMediaArtifact, filterToolResultMediaUrls, finalizeHarnessContextEngineTurn, formatApprovalDisplayPath, formatErrorMessage, formatToolAggregate, formatToolProgressOutput, inferToolMetaFromArgs, isActiveHarnessContextEngine, isMessagingTool, isMessagingToolSendAction, isSubagentSessionKey, isToolWrappedWithBeforeToolCallHook, listNodes, logAgentRuntimeToolDiagnostics, __testing as nativeHookRelayTesting, normalizeAgentRuntimeTools, normalizeHeartbeatToolResponse, normalizeProviderToolSchemas, normalizeUsage, onAgentEvent, queueEmbeddedPiMessage as queueAgentHarnessMessage, registerNativeHookRelay, resetAgentEventsForTest, resolveAgentDir, resolveAgentHarnessBeforePromptBuildResult, resolveAttemptSpawnWorkspaceDir, resolveBootstrapContextForRun, resolveDefaultAgentDir, resolveEmbeddedAgentRuntime, resolveModelAuthMode, resolveNodeIdFromList, resolveOpenClawAgentDir, resolveSandboxContext, resolveSessionAgentIds, resolveSessionWriteLockAcquireTimeoutMs, resolveUserPath, runAgentCleanupStep, runAgentHarnessAfterCompactionHook, runAgentHarnessAfterToolCallHook, runAgentHarnessAgentEndHook, runAgentHarnessBeforeAgentFinalizeHook, runAgentHarnessBeforeCompactionHook, runAgentHarnessBeforeMessageWriteHook, runAgentHarnessLlmInputHook, runAgentHarnessLlmOutputHook, runHarnessContextEngineMaintenance, selectDefaultNodeFromList, setActiveEmbeddedRun, supportsModelTools, wrapToolWithBeforeToolCallHook };
