import { i as formatErrorMessage } from "../errors-BaENkGSr.js";
import { p as resolveUserPath } from "../utils-Cmj-lA5K.js";
import { n as VERSION } from "../version-JFBtO9BW.js";
import { v as resolveSessionAgentIds } from "../agent-scope-DA13vsW2.js";
import { a as isSubagentSessionKey } from "../session-key-utils-D-p8GIuc.js";
import { a as resolveAgentDir, s as resolveDefaultAgentDir } from "../agent-scope-config-C5gIPxFB.js";
import { n as resolveEmbeddedAgentRuntime } from "../runtime-DuDoho3o.js";
import { n as disposeRegisteredAgentHarnesses } from "../registry-choKLx8d.js";
import { a as resolveContextEngineOwnerPluginId } from "../registry-DjtR-3rB.js";
import { d as resetAgentEventsForTest, i as emitAgentEvent, l as onAgentEvent } from "../agent-events-DPRxU6W4.js";
import { c as appendSessionTranscriptMessage } from "../transcript-BJrOLqPb.js";
import { t as emitSessionTranscriptUpdate } from "../transcript-events-EzoID25A.js";
import { d as resolveSessionWriteLockOptions, i as acquireSessionWriteLock, l as resolveSessionWriteLockAcquireTimeoutMs } from "../session-write-lock-COIKY8gT.js";
import { m as setActiveEmbeddedRun, n as abortEmbeddedPiRun, p as resolveActiveEmbeddedRunSessionId, r as clearActiveEmbeddedRun } from "../runs-BuTiKGI_.js";
import { o as normalizeUsage } from "../usage-Dutc336Z.js";
import { p as buildAgentHookContextChannelFields } from "../attempt.prompt-helpers-C4X7kpXU.js";
import { a as resolveBootstrapContextForRun } from "../bootstrap-files-C8Rs7Fe3.js";
import { a as hasBeforeToolCallPolicy, c as isToolWrappedWithBeforeToolCallHook, f as wrapToolWithBeforeToolCallHook, l as runBeforeToolCallHook, u as setBeforeToolCallDiagnosticsEnabled } from "../pi-tools.before-tool-call-zYDHMIjc.js";
import { t as callGatewayTool } from "../gateway-DO2RXFDJ.js";
import { t as createKlawCodingTools } from "../pi-tools-TpcYDuV-.js";
import { u as resolveModelAuthMode } from "../model-auth-C_B1ltVk.js";
import { S as supportsModelTools, a as logAgentRuntimeToolDiagnostics, b as isMessagingTool, c as normalizeProviderToolSchemas, f as extractToolResultMediaArtifact, l as runAgentCleanupStep, m as filterToolResultMediaUrls, n as createAgentToolResultMiddlewareRunner, o as normalizeAgentRuntimeTools, t as buildEmbeddedAttemptToolRunContext, x as isMessagingToolSendAction } from "../attempt.tool-run-context-CMt86SIS.js";
import { o as normalizeHeartbeatToolResponse, t as HEARTBEAT_RESPONSE_TOOL_NAME } from "../heartbeat-tool-response-E7CxQwVh.js";
import { N as formatToolAggregate } from "../channel-streaming-CPWlMPXZ.js";
import { t as log } from "../logger-64IDYXNy.js";
import { a as selectDefaultNodeFromList, i as resolveNodeIdFromList, t as listNodes } from "../nodes-utils-Du2fBrGD.js";
import { c as hasSandboxBindReadonlyHostShadows, l as resolveWritableSandboxBindHostRoots, o as resolveSandboxContext, s as hasSandboxBindContainerPathAliases } from "../sandbox-jXhg-yNP.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-BVp7tOvs.js";
import { r as resolveAttemptSpawnWorkspaceDir } from "../attempt.thread-helpers-CtEjc7Pa.js";
import { t as classifyEmbeddedPiRunResultForModelFallback } from "../result-fallback-classifier-CkQRJKhW.js";
import { r as buildAgentRuntimePlan } from "../build-BZ-dE41I.js";
import { i as runAgentHarnessLlmOutputHook, n as runAgentHarnessBeforeAgentFinalizeHook, r as runAgentHarnessLlmInputHook, t as runAgentHarnessAgentEndHook } from "../lifecycle-hook-helpers-CB0gQgfo.js";
import { t as resolveKlawAgentDir } from "../agent-dir-compat-BZv9ojni.js";
import { t as formatApprovalDisplayPath } from "../approval-display-paths-D3iuZwaN.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-ta-eBGs-.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-0gxyEjzg.js";
export { HEARTBEAT_RESPONSE_TOOL_NAME, VERSION as KLAW_VERSION, TOOL_PROGRESS_OUTPUT_MAX_CHARS, abortEmbeddedPiRun as abortAgentHarnessRun, acquireSessionWriteLock, appendSessionTranscriptMessage, assembleHarnessContextEngine, bootstrapHarnessContextEngine, buildAgentHookContextChannelFields, buildAgentRuntimePlan, buildEmbeddedAttemptToolRunContext, buildHarnessContextEngineRuntimeContext, buildHarnessContextEngineRuntimeContextFromUsage, buildNativeHookRelayCommand, callGatewayTool, classifyAgentHarnessTerminalOutcome, classifyEmbeddedPiRunResultForModelFallback, clearActiveEmbeddedRun, createAgentToolResultMiddlewareRunner, createCodexAppServerToolResultExtensionRunner, createKlawCodingTools, 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, resolveContextEngineOwnerPluginId, resolveDefaultAgentDir, resolveEmbeddedAgentRuntime, resolveKlawAgentDir, resolveModelAuthMode, resolveNodeIdFromList, resolveSandboxContext, resolveSessionAgentIds, resolveSessionWriteLockAcquireTimeoutMs, resolveSessionWriteLockOptions, resolveUserPath, resolveWritableSandboxBindHostRoots, runAgentCleanupStep, runAgentHarnessAfterCompactionHook, runAgentHarnessAfterToolCallHook, runAgentHarnessAgentEndHook, runAgentHarnessBeforeAgentFinalizeHook, runAgentHarnessBeforeCompactionHook, runAgentHarnessBeforeMessageWriteHook, runAgentHarnessLlmInputHook, runAgentHarnessLlmOutputHook, runBeforeToolCallHook, runHarnessContextEngineMaintenance, selectDefaultNodeFromList, setActiveEmbeddedRun, setBeforeToolCallDiagnosticsEnabled, supportsModelTools, wrapToolWithBeforeToolCallHook };
