import { i as formatErrorMessage } from "../errors-D3K0qXmL.js";
import { p as resolveUserPath } from "../utils-1MPEp2CT.js";
import { n as VERSION } from "../version-CQfgAE7_.js";
import { v as resolveSessionAgentIds } from "../agent-scope-cDU1X4Nx.js";
import { a as isSubagentSessionKey } from "../session-key-utils-Ce_xWkNq.js";
import { a as resolveAgentDir, s as resolveDefaultAgentDir } from "../agent-scope-config-jq9Xbh_R.js";
import { n as resolveEmbeddedAgentRuntime } from "../runtime-fVbSwiLb.js";
import { n as disposeRegisteredAgentHarnesses } from "../registry-Bubwky2Y.js";
import { a as resolveContextEngineOwnerPluginId } from "../registry-B-mVXdYO.js";
import { d as resetAgentEventsForTest, i as emitAgentEvent, l as onAgentEvent } from "../agent-events-BuYtWSh4.js";
import { c as appendSessionTranscriptMessage } from "../transcript-COsaBiq4.js";
import { t as emitSessionTranscriptUpdate } from "../transcript-events-ClYG_P1o.js";
import { d as resolveSessionWriteLockOptions, i as acquireSessionWriteLock, l as resolveSessionWriteLockAcquireTimeoutMs } from "../session-write-lock-DSJ9Py-M.js";
import { m as setActiveEmbeddedRun, n as abortEmbeddedPiRun, p as resolveActiveEmbeddedRunSessionId, r as clearActiveEmbeddedRun } from "../runs-BusOd4y8.js";
import { o as normalizeUsage } from "../usage-HiJpzhay.js";
import { o as normalizeHeartbeatToolResponse, t as HEARTBEAT_RESPONSE_TOOL_NAME } from "../heartbeat-tool-response-DC3K-Jl6.js";
import { p as buildAgentHookContextChannelFields } from "../attempt.prompt-helpers-e-O1i8_c.js";
import { a as resolveBootstrapContextForRun } from "../bootstrap-files-C7GTd8nX.js";
import { a as hasBeforeToolCallPolicy, c as isToolWrappedWithBeforeToolCallHook, f as wrapToolWithBeforeToolCallHook, l as runBeforeToolCallHook, u as setBeforeToolCallDiagnosticsEnabled } from "../pi-tools.before-tool-call-B6zah7dw.js";
import { t as callGatewayTool } from "../gateway-BQ6GcHQN.js";
import { t as createOpenClawCodingTools } from "../pi-tools-Cmpkx4Cr.js";
import { u as resolveModelAuthMode } from "../model-auth-9QAtHxzW.js";
import { C as isMessagingTool, T as supportsModelTools, a as logAgentRuntimeToolDiagnostics, c as normalizeProviderToolSchemas, g as filterToolResultMediaUrls, l as runAgentCleanupStep, m as extractToolResultMediaArtifact, n as createAgentToolResultMiddlewareRunner, o as normalizeAgentRuntimeTools, t as buildEmbeddedAttemptToolRunContext, w as isMessagingToolSendAction } from "../attempt.tool-run-context-BdHyzj28.js";
import { N as formatToolAggregate } from "../channel-streaming-B_JkLEH1.js";
import { t as log } from "../logger-CkOxLaWL.js";
import { a as selectDefaultNodeFromList, i as resolveNodeIdFromList, t as listNodes } from "../nodes-utils-Dz04TmYp.js";
import { c as hasSandboxBindReadonlyHostShadows, l as resolveWritableSandboxBindHostRoots, o as resolveSandboxContext, s as hasSandboxBindContainerPathAliases } from "../sandbox-CzpKTR-q.js";
import { r as resolveCompactionTimeoutMs, t as compactContextEngineWithSafetyTimeout } from "../compaction-safety-timeout-DZX3bbpS.js";
import { a as finalizeHarnessContextEngineTurn, i as buildHarnessContextEngineRuntimeContextFromUsage, n as bootstrapHarnessContextEngine, o as isActiveHarnessContextEngine, r as buildHarnessContextEngineRuntimeContext, s as runHarnessContextEngineMaintenance, t as assembleHarnessContextEngine } from "../context-engine-lifecycle-Pp_PWHuR.js";
import { r as resolveAttemptSpawnWorkspaceDir } from "../attempt.thread-helpers-Jvc8TxOX.js";
import { t as classifyEmbeddedPiRunResultForModelFallback } from "../result-fallback-classifier-DUBN1m4c.js";
import { r as buildAgentRuntimePlan } from "../build-D2F-Txtn.js";
import { i as runAgentHarnessLlmOutputHook, n as runAgentHarnessBeforeAgentFinalizeHook, r as runAgentHarnessLlmInputHook, t as runAgentHarnessAgentEndHook } from "../lifecycle-hook-helpers-CyaUxQYn.js";
import { t as resolveOpenClawAgentDir } from "../agent-dir-compat-DJ5JrSzs.js";
import { t as formatApprovalDisplayPath } from "../approval-display-paths-BqRczx-P.js";
import { a as loadCodexBundleMcpThreadConfig, c as resolveAgentHarnessBeforePromptBuildResult, i as inferToolMetaFromArgs, l as runAgentHarnessAfterCompactionHook, n as classifyAgentHarnessTerminalOutcome, o as queueAgentHarnessMessage, r as formatToolProgressOutput, s as createCodexAppServerToolResultExtensionRunner, t as TOOL_PROGRESS_OUTPUT_MAX_CHARS, u as runAgentHarnessBeforeCompactionHook } from "../agent-harness-runtime-CCHVXaZN.js";
import { a as registerNativeHookRelay, c as runAgentHarnessAfterToolCallHook, l as runAgentHarnessBeforeMessageWriteHook, n as hasNativeHookRelayInvocation, r as invokeNativeHookRelay, s as testing, t as buildNativeHookRelayCommand } from "../native-hook-relay-BZ-uQFMj.js";
export { HEARTBEAT_RESPONSE_TOOL_NAME, VERSION as OPENCLAW_VERSION, TOOL_PROGRESS_OUTPUT_MAX_CHARS, abortEmbeddedPiRun as abortAgentHarnessRun, acquireSessionWriteLock, appendSessionTranscriptMessage, assembleHarnessContextEngine, bootstrapHarnessContextEngine, buildAgentHookContextChannelFields, buildAgentRuntimePlan, buildEmbeddedAttemptToolRunContext, buildHarnessContextEngineRuntimeContext, buildHarnessContextEngineRuntimeContextFromUsage, buildNativeHookRelayCommand, callGatewayTool, classifyAgentHarnessTerminalOutcome, classifyEmbeddedPiRunResultForModelFallback, clearActiveEmbeddedRun, compactContextEngineWithSafetyTimeout, createAgentToolResultMiddlewareRunner, createCodexAppServerToolResultExtensionRunner, createOpenClawCodingTools, disposeRegisteredAgentHarnesses, log as embeddedAgentLog, emitAgentEvent, emitSessionTranscriptUpdate, extractToolResultMediaArtifact, filterToolResultMediaUrls, finalizeHarnessContextEngineTurn, formatApprovalDisplayPath, formatErrorMessage, formatToolAggregate, formatToolProgressOutput, hasBeforeToolCallPolicy, hasNativeHookRelayInvocation, hasSandboxBindContainerPathAliases, hasSandboxBindReadonlyHostShadows, inferToolMetaFromArgs, invokeNativeHookRelay, isActiveHarnessContextEngine, isMessagingTool, isMessagingToolSendAction, isSubagentSessionKey, isToolWrappedWithBeforeToolCallHook, listNodes, loadCodexBundleMcpThreadConfig, logAgentRuntimeToolDiagnostics, testing as nativeHookRelayTesting, normalizeAgentRuntimeTools, normalizeHeartbeatToolResponse, normalizeProviderToolSchemas, normalizeUsage, onAgentEvent, queueAgentHarnessMessage, registerNativeHookRelay, resetAgentEventsForTest, resolveActiveEmbeddedRunSessionId, resolveAgentDir, resolveAgentHarnessBeforePromptBuildResult, resolveAttemptSpawnWorkspaceDir, resolveBootstrapContextForRun, resolveCompactionTimeoutMs, resolveContextEngineOwnerPluginId, resolveDefaultAgentDir, resolveEmbeddedAgentRuntime, resolveModelAuthMode, resolveNodeIdFromList, resolveOpenClawAgentDir, resolveSandboxContext, resolveSessionAgentIds, resolveSessionWriteLockAcquireTimeoutMs, resolveSessionWriteLockOptions, resolveUserPath, resolveWritableSandboxBindHostRoots, runAgentCleanupStep, runAgentHarnessAfterCompactionHook, runAgentHarnessAfterToolCallHook, runAgentHarnessAgentEndHook, runAgentHarnessBeforeAgentFinalizeHook, runAgentHarnessBeforeCompactionHook, runAgentHarnessBeforeMessageWriteHook, runAgentHarnessLlmInputHook, runAgentHarnessLlmOutputHook, runBeforeToolCallHook, runHarnessContextEngineMaintenance, selectDefaultNodeFromList, setActiveEmbeddedRun, setBeforeToolCallDiagnosticsEnabled, supportsModelTools, wrapToolWithBeforeToolCallHook };
