import { i as formatErrorMessage } from "../errors-D_oyTIw2.js";
import { p as resolveUserPath } from "../utils-CNnMhEDp.js";
import { n as VERSION } from "../version-QmPt05QD.js";
import { v as resolveSessionAgentIds } from "../agent-scope-Dx1S0aWX.js";
import { a as isSubagentSessionKey } from "../session-key-utils-Ce_xWkNq.js";
import { a as resolveAgentDir, s as resolveDefaultAgentDir } from "../agent-scope-config-CJUQxn7u.js";
import { n as resolveEmbeddedAgentRuntime } from "../runtime-drvlkfNh.js";
import { n as disposeRegisteredAgentHarnesses } from "../registry-Crj56k7x.js";
import { o as resolveContextEngineOwnerPluginId } from "../registry-BCmRCXCi.js";
import { d as resetAgentEventsForTest, i as emitAgentEvent, l as onAgentEvent } from "../agent-events-Cfj53GyA.js";
import { c as appendSessionTranscriptMessage } from "../transcript-CalMl_Y7.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-DvfEpka6.js";
import { m as setActiveEmbeddedRun, n as abortEmbeddedPiRun, p as resolveActiveEmbeddedRunSessionId, r as clearActiveEmbeddedRun } from "../runs-SleIj69Z.js";
import { o as normalizeUsage } from "../usage-DKNTRfvn.js";
import { r as assertContextEngineHostSupport, t as CODEX_APP_SERVER_CONTEXT_ENGINE_HOST } from "../host-compat-DMtVtGSr.js";
import { o as normalizeHeartbeatToolResponse, t as HEARTBEAT_RESPONSE_TOOL_NAME } from "../heartbeat-tool-response-BCz-9pPv.js";
import { _ as buildAgentHookContextChannelFields } from "../attempt.prompt-helpers-OGgVyJYC.js";
import { a as resolveBootstrapContextForRun } from "../bootstrap-files-CqPzStB_.js";
import { a as hasBeforeToolCallPolicy, c as isToolWrappedWithBeforeToolCallHook, d as setBeforeToolCallDiagnosticsEnabled, p as wrapToolWithBeforeToolCallHook, u as runBeforeToolCallHook } from "../pi-tools.before-tool-call-Cl9Ivz5u.js";
import { t as callGatewayTool } from "../gateway-Dyc7qEu3.js";
import { t as createDaoCoreCodingTools } from "../pi-tools--L-L_5qV.js";
import { d as resolveModelAuthMode } from "../model-auth-D1amzkLm.js";
import { O as supportsModelTools } from "../openai-transport-stream-ce_txTqP.js";
import { A as runAgentCleanupStep, D as normalizeAgentRuntimeTools, E as logAgentRuntimeToolDiagnostics, F as extractToolResultMediaArtifact, G as isMessagingToolSendAction, L as filterToolResultMediaUrls, W as isMessagingTool, a as shouldPreemptivelyCompactBeforePrompt, g as resolveCompactionTimeoutMs, i as formatPrePromptPrecheckLog, k as normalizeProviderToolSchemas, m as compactContextEngineWithSafetyTimeout, n as PREEMPTIVE_OVERFLOW_ERROR_TEXT, p as createAgentToolResultMiddlewareRunner, r as estimateRenderedLlmBoundaryTokenPressure, t as buildEmbeddedAttemptToolRunContext } from "../attempt.tool-run-context-lCJOOyoF.js";
import { N as formatToolAggregate } from "../channel-streaming-BBW2i40H.js";
import { t as log } from "../logger-DYJ7BvAc.js";
import { a as selectDefaultNodeFromList, i as resolveNodeIdFromList, t as listNodes } from "../nodes-utils-CIusEv3-.js";
import { c as hasSandboxBindReadonlyHostShadows, l as resolveWritableSandboxBindHostRoots, o as resolveSandboxContext, s as hasSandboxBindContainerPathAliases } from "../sandbox-BgrNfelZ.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-DuQ3Yn9Y.js";
import { r as resolveAttemptSpawnWorkspaceDir } from "../attempt.thread-helpers-CipHQSN7.js";
import { t as classifyEmbeddedPiRunResultForModelFallback } from "../result-fallback-classifier-zyED1xtr.js";
import { r as buildAgentRuntimePlan } from "../build-D-2nejZD.js";
import { a as runAgentHarnessLlmOutputHook, i as runAgentHarnessLlmInputHook, n as runAgentHarnessAgentEndHook, r as runAgentHarnessBeforeAgentFinalizeHook, t as awaitAgentHarnessAgentEndHook } from "../lifecycle-hook-helpers-DsCr5Yp0.js";
import { t as resolveDaoCoreAgentDir } from "../agent-dir-compat-X9XMR4LI.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-C8bm2G6W.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-D1fhxt1n.js";
export { CODEX_APP_SERVER_CONTEXT_ENGINE_HOST, VERSION as DAOCORE_VERSION, HEARTBEAT_RESPONSE_TOOL_NAME, PREEMPTIVE_OVERFLOW_ERROR_TEXT, TOOL_PROGRESS_OUTPUT_MAX_CHARS, abortEmbeddedPiRun as abortAgentHarnessRun, acquireSessionWriteLock, appendSessionTranscriptMessage, assembleHarnessContextEngine, assertContextEngineHostSupport, awaitAgentHarnessAgentEndHook, bootstrapHarnessContextEngine, buildAgentHookContextChannelFields, buildAgentRuntimePlan, buildEmbeddedAttemptToolRunContext, buildHarnessContextEngineRuntimeContext, buildHarnessContextEngineRuntimeContextFromUsage, buildNativeHookRelayCommand, callGatewayTool, classifyAgentHarnessTerminalOutcome, classifyEmbeddedPiRunResultForModelFallback, clearActiveEmbeddedRun, compactContextEngineWithSafetyTimeout, createAgentToolResultMiddlewareRunner, createCodexAppServerToolResultExtensionRunner, createDaoCoreCodingTools, disposeRegisteredAgentHarnesses, log as embeddedAgentLog, emitAgentEvent, emitSessionTranscriptUpdate, estimateRenderedLlmBoundaryTokenPressure, extractToolResultMediaArtifact, filterToolResultMediaUrls, finalizeHarnessContextEngineTurn, formatApprovalDisplayPath, formatErrorMessage, formatPrePromptPrecheckLog, 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, resolveDaoCoreAgentDir, resolveDefaultAgentDir, resolveEmbeddedAgentRuntime, resolveModelAuthMode, resolveNodeIdFromList, resolveSandboxContext, resolveSessionAgentIds, resolveSessionWriteLockAcquireTimeoutMs, resolveSessionWriteLockOptions, resolveUserPath, resolveWritableSandboxBindHostRoots, runAgentCleanupStep, runAgentHarnessAfterCompactionHook, runAgentHarnessAfterToolCallHook, runAgentHarnessAgentEndHook, runAgentHarnessBeforeAgentFinalizeHook, runAgentHarnessBeforeCompactionHook, runAgentHarnessBeforeMessageWriteHook, runAgentHarnessLlmInputHook, runAgentHarnessLlmOutputHook, runBeforeToolCallHook, runHarnessContextEngineMaintenance, selectDefaultNodeFromList, setActiveEmbeddedRun, setBeforeToolCallDiagnosticsEnabled, shouldPreemptivelyCompactBeforePrompt, supportsModelTools, wrapToolWithBeforeToolCallHook };
