import { i as formatErrorMessage } from "../errors-CSrrtEb1.js";
import { p as resolveUserPath } from "../utils-DvkbxKCZ.js";
import { n as VERSION } from "../version-BidqAEUl.js";
import { a as isSubagentSessionKey } from "../session-key-utils-B9qLc2A8.js";
import { m as resolveSessionAgentIds } from "../agent-scope-DYPLTPla.js";
import { p as disposeRegisteredAgentHarnesses } from "../loader-Fszuckvu.js";
import { d as resetAgentEventsForTest, i as emitAgentEvent, l as onAgentEvent } from "../agent-events-Buswj6xX.js";
import { n as acquireSessionWriteLock } from "../session-write-lock-Blw7nhtX.js";
import { l as emitSessionTranscriptUpdate } from "../transcript-G4NK1JY8.js";
import { t as resolveOpenClawAgentDir } from "../agent-paths-B_wzQ6Ed.js";
import { c as queueEmbeddedPiMessage, d as setActiveEmbeddedRun, n as abortEmbeddedPiRun, r as clearActiveEmbeddedRun } from "../runs-D1-pLNw-.js";
import { o as normalizeUsage } from "../usage-DHoo33i9.js";
import { r as resolveEmbeddedAgentRuntime } from "../runtime-cpelpx_v.js";
import { c as resolveModelAuthMode } from "../model-auth-D6SNDMAt.js";
import { a as normalizeProviderToolSchemas, o as supportsModelTools, t as createAgentToolResultMiddlewareRunner } from "../tool-result-middleware-CX_R6l5K.js";
import { t as log } from "../logger-D6_ckdlv.js";
import { S as formatToolAggregate, a as buildHarnessContextEngineRuntimeContextFromUsage, b as isMessagingTool, c as runHarnessContextEngineMaintenance, h as filterToolResultMediaUrls, i as buildHarnessContextEngineRuntimeContext, l as logAgentRuntimeToolDiagnostics, n as assembleHarnessContextEngine, o as finalizeHarnessContextEngineTurn, p as extractToolResultMediaArtifact, r as bootstrapHarnessContextEngine, s as isActiveHarnessContextEngine, t as buildEmbeddedAttemptToolRunContext, u as normalizeAgentRuntimeTools, x as isMessagingToolSendAction } from "../attempt.tool-run-context-62tovvR5.js";
import { c as wrapToolWithBeforeToolCallHook, o as isToolWrappedWithBeforeToolCallHook } from "../pi-tools.before-tool-call-CNqY7wT7.js";
import { t as callGatewayTool } from "../gateway-DHePlg6J.js";
import { a as selectDefaultNodeFromList, i as resolveNodeIdFromList, t as listNodes } from "../nodes-utils-UArSuwvE.js";
import { o as resolveSandboxContext } from "../sandbox-DsP1QxgJ.js";
import { r as resolveAttemptSpawnWorkspaceDir } from "../attempt.thread-helpers-0CqxcVYg.js";
import { r as buildAgentRuntimePlan } from "../build-CJrJAXDC.js";
import { t as classifyEmbeddedPiRunResultForModelFallback } from "../result-fallback-classifier-BfQx-pcn.js";
import { t as formatApprovalDisplayPath } from "../approval-display-paths-BbX1Nu0G.js";
import { i as runAgentHarnessLlmOutputHook, n as runAgentHarnessBeforeAgentFinalizeHook, r as runAgentHarnessLlmInputHook, t as runAgentHarnessAgentEndHook } from "../lifecycle-hook-helpers-DDaJOXHG.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-CcQQkW65.js";
import { i as registerNativeHookRelay, n as buildNativeHookRelayCommand, o as runAgentHarnessAfterToolCallHook, s as runAgentHarnessBeforeMessageWriteHook, t as __testing } from "../native-hook-relay-S5zXhRIG.js";
export { VERSION as OPENCLAW_VERSION, TOOL_PROGRESS_OUTPUT_MAX_CHARS, abortEmbeddedPiRun as abortAgentHarnessRun, acquireSessionWriteLock, assembleHarnessContextEngine, bootstrapHarnessContextEngine, buildAgentRuntimePlan, buildEmbeddedAttemptToolRunContext, buildHarnessContextEngineRuntimeContext, buildHarnessContextEngineRuntimeContextFromUsage, buildNativeHookRelayCommand, callGatewayTool, classifyAgentHarnessTerminalOutcome, classifyEmbeddedPiRunResultForModelFallback, clearActiveEmbeddedRun, createAgentToolResultMiddlewareRunner, createCodexAppServerToolResultExtensionRunner, 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, normalizeProviderToolSchemas, normalizeUsage, onAgentEvent, queueEmbeddedPiMessage as queueAgentHarnessMessage, registerNativeHookRelay, resetAgentEventsForTest, resolveAgentHarnessBeforePromptBuildResult, resolveAttemptSpawnWorkspaceDir, resolveEmbeddedAgentRuntime, resolveModelAuthMode, resolveNodeIdFromList, resolveOpenClawAgentDir, resolveSandboxContext, resolveSessionAgentIds, resolveUserPath, runAgentHarnessAfterCompactionHook, runAgentHarnessAfterToolCallHook, runAgentHarnessAgentEndHook, runAgentHarnessBeforeAgentFinalizeHook, runAgentHarnessBeforeCompactionHook, runAgentHarnessBeforeMessageWriteHook, runAgentHarnessLlmInputHook, runAgentHarnessLlmOutputHook, runHarnessContextEngineMaintenance, selectDefaultNodeFromList, setActiveEmbeddedRun, supportsModelTools, wrapToolWithBeforeToolCallHook };
