import { i as formatErrorMessage } from "../errors-D4jx1Axd.js";
import { p as resolveUserPath } from "../utils-Ba75iQOz.js";
import { n as VERSION } from "../version-D7iSANdM.js";
import { a as isSubagentSessionKey } from "../session-key-utils-BiZnc9ns.js";
import { a as resolveAgentDir, s as resolveDefaultAgentDir } from "../agent-scope-config-Dqva2IWz.js";
import { m as resolveSessionAgentIds } from "../agent-scope-DcilFo3V.js";
import { S as disposeRegisteredAgentHarnesses } from "../loader-95XLRFif.js";
import { d as resetAgentEventsForTest, i as emitAgentEvent, l as onAgentEvent } from "../agent-events-CERvepLo.js";
import { t as emitSessionTranscriptUpdate } from "../transcript-events-CJO62qFH.js";
import { c as resolveSessionWriteLockAcquireTimeoutMs, r as acquireSessionWriteLock } from "../session-write-lock-DnZSK4dJ.js";
import { s as appendSessionTranscriptMessage } from "../transcript-BSPRVIYr.js";
import { f as setActiveEmbeddedRun, l as queueEmbeddedPiMessage, n as abortEmbeddedPiRun, r as clearActiveEmbeddedRun } from "../runs-DLt_p-y_.js";
import { n as resolveEmbeddedAgentRuntime } from "../runtime-DvtDFZFw.js";
import { a as resolveBootstrapContextForRun } from "../bootstrap-files-QNoChq3D.js";
import { u as resolveModelAuthMode } from "../model-auth-RldWEugw.js";
import { a as normalizeProviderToolSchemas, o as supportsModelTools, t as createAgentToolResultMiddlewareRunner } from "../tool-result-middleware-CiKIKhcg.js";
import { t as log } from "../logger-CdbMdBny.js";
import { o as normalizeUsage } from "../usage-BccQeT-k.js";
import { g as resolveOpenClawAgentDir } from "../provider-auth-q2VdKMeT.js";
import { o as normalizeHeartbeatToolResponse, t as HEARTBEAT_RESPONSE_TOOL_NAME } from "../heartbeat-tool-response-COYxc-tY.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-BBc1FACD.js";
import { t as formatToolAggregate } from "../tool-meta-BvQnwu7z.js";
import { c as wrapToolWithBeforeToolCallHook, o as isToolWrappedWithBeforeToolCallHook } from "../pi-tools.before-tool-call-CLLuf-Dl.js";
import { t as callGatewayTool } from "../gateway-ClWfGhri.js";
import { t as createOpenClawCodingTools } from "../pi-tools-jxi5I_tj.js";
import { a as selectDefaultNodeFromList, i as resolveNodeIdFromList, t as listNodes } from "../nodes-utils-DGXgJZt3.js";
import { o as resolveSandboxContext } from "../sandbox-rtGjgyvw.js";
import { r as resolveAttemptSpawnWorkspaceDir } from "../attempt.thread-helpers-DaeWfWYe.js";
import { r as buildAgentRuntimePlan } from "../build-BwWkoA_C.js";
import { t as classifyEmbeddedPiRunResultForModelFallback } from "../result-fallback-classifier-D5Hxx3rb.js";
import { t as formatApprovalDisplayPath } from "../approval-display-paths-DpWVlVdU.js";
import { i as runAgentHarnessLlmOutputHook, n as runAgentHarnessBeforeAgentFinalizeHook, r as runAgentHarnessLlmInputHook, t as runAgentHarnessAgentEndHook } from "../lifecycle-hook-helpers-DGnCiV9i.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-h4TENp6i.js";
import { a as registerNativeHookRelay, c as runAgentHarnessBeforeMessageWriteHook, n as buildNativeHookRelayCommand, s as runAgentHarnessAfterToolCallHook, t as __testing } from "../native-hook-relay-BZBbf0am.js";
import "../agent-harness-CXKn8gAq.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 };
