import { i as formatErrorMessage } from "../errors-Cq_Pdh35.js";
import { p as resolveUserPath } from "../utils-FLBGJBzj.js";
import { n as VERSION } from "../version-DzRkiGSk.js";
import { v as resolveSessionAgentIds } from "../agent-scope-CZ-IyS6E.js";
import { a as isSubagentSessionKey } from "../session-key-utils-CdfsDYvz.js";
import { a as resolveAgentDir, s as resolveDefaultAgentDir } from "../agent-scope-config-CT5O0iC8.js";
import { o as resolveEmbeddedAgentRuntime } from "../agent-runtime-id-iSZ_VYTS.js";
import { n as disposeRegisteredAgentHarnesses } from "../registry-BczqawT0.js";
import { s as resolveContextEngineOwnerPluginId } from "../registry-_Qr5DGni.js";
import { d as resetAgentEventsForTest, i as emitAgentEvent, l as onAgentEvent } from "../agent-events-e1bpdQ82.js";
import { s as appendSessionTranscriptMessage } from "../transcript-DHVget1f.js";
import { t as emitSessionTranscriptUpdate } from "../transcript-events-Bdc3eBNy.js";
import { d as resolveSessionWriteLockOptions, i as acquireSessionWriteLock, l as resolveSessionWriteLockAcquireTimeoutMs } from "../session-write-lock-_GKNo_Xi.js";
import { d as resolveModelAuthMode } from "../model-auth-CkoQeB6P.js";
import { g as resolveActiveEmbeddedRunSessionId, n as abortEmbeddedAgentRun, r as clearActiveEmbeddedRun, v as setActiveEmbeddedRun } from "../runs-BGPZMyl7.js";
import { o as normalizeUsage } from "../usage-Cwue1pNo.js";
import { r as assertContextEngineHostSupport, t as CODEX_APP_SERVER_CONTEXT_ENGINE_HOST } from "../host-compat-lOYMBfQa.js";
import { o as normalizeHeartbeatToolResponse, t as HEARTBEAT_RESPONSE_TOOL_NAME } from "../heartbeat-tool-response-DtifjIpN.js";
import { h as supportsModelTools } from "../openai-transport-stream-C2CiYRC-.js";
import { t as log } from "../logger-BXbMtoV0.js";
import { o as resolveAttemptFsWorkspaceOnly, v as buildAgentHookContextChannelFields } from "../attempt.prompt-helpers-CM6E0UE1.js";
import { i as getPluginToolMeta } from "../tools-Cyfie2t2.js";
import { _ as wrapToolWithBeforeToolCallHook, f as requestDeferredPluginToolApproval, h as setBeforeToolCallDiagnosticsEnabled, m as runBeforeToolCallHook, o as getBeforeToolCallPolicyDiagnosticState, s as hasBeforeToolCallPolicy, u as isToolWrappedWithBeforeToolCallHook } from "../agent-tools.before-tool-call-CISgec2q.js";
import { t as callGatewayTool } from "../gateway-CDtW7bxv.js";
import { P as formatToolAggregate } from "../streaming-C7YTmc9-.js";
import { a as selectDefaultNodeFromList, i as resolveNodeIdFromList, t as listNodes } from "../nodes-utils-BfUuGmIj.js";
import { c as hasSandboxBindReadonlyHostShadows, l as resolveWritableSandboxBindHostRoots, o as resolveSandboxContext, s as hasSandboxBindContainerPathAliases } from "../sandbox-BZl8tJ4A.js";
import { a as resolveBootstrapContextForRun, n as buildBootstrapContextForFiles, o as resolveBootstrapFilesForRun } from "../bootstrap-files-xQedw6uC.js";
import { a as extractToolResultMediaArtifact, h as isMessagingToolSendAction, m as isMessagingTool, s as filterToolResultMediaUrls } from "../embedded-agent-subscribe.tools-g5GouU14.js";
import { a as runAgentHarnessLlmInputHook, i as runAgentHarnessBeforeAgentFinalizeHook, n as getAgentHarnessHookRunner, o as runAgentHarnessLlmOutputHook, r as runAgentHarnessAgentEndHook, t as awaitAgentHarnessAgentEndHook } from "../lifecycle-hook-helpers-Dl4KSBJ4.js";
import { a as formatPrePromptPrecheckLog, f as compactContextEngineWithSafetyTimeout, i as estimateRenderedLlmBoundaryTokenPressure, m as resolveCompactionTimeoutMs, n as PREEMPTIVE_OVERFLOW_ERROR_TEXT, o as shouldPreemptivelyCompactBeforePrompt, s as createAgentToolResultMiddlewareRunner, t as buildEmbeddedAttemptToolRunContext, v as runAgentCleanupStep } from "../attempt.tool-run-context-BcQ6hmAA.js";
import { a as normalizeAgentRuntimeTools, i as logAgentRuntimeToolDiagnostics, n as inspectRuntimeToolInputSchemas, r as projectRuntimeToolInputSchema, s as normalizeProviderToolSchemas } from "../tool-schema-projection-CsvPwf80.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-DkCJqyov.js";
import { r as resolveEmbeddedAttemptToolConstructionPlan, t as applyEmbeddedAttemptToolsAllow } from "../attempt-tool-construction-plan-DhT4U13A.js";
import { r as resolveAttemptSpawnWorkspaceDir } from "../attempt.thread-helpers-B2y9zQyX.js";
import { t as classifyEmbeddedAgentRunResultForModelFallback } from "../result-fallback-classifier-TCN4l4ZJ.js";
import { r as buildAgentRuntimePlan } from "../build-DhDDpUAy.js";
import { t as resolveNodmixAgentDir } from "../agent-dir-compat-DmSYtUQ6.js";
import { t as formatApprovalDisplayPath } from "../approval-display-paths-BqRczx-P.js";
import { n as runAgentHarnessBeforeMessageWriteHook, t as runAgentHarnessAfterToolCallHook } from "../hook-helpers-BOHmGn4o.js";
import { a as inferToolMetaFromArgs, c as createCodexAppServerToolResultExtensionRunner, d as runAgentHarnessBeforeCompactionHook, i as formatToolProgressOutput, l as resolveAgentHarnessBeforePromptBuildResult, n as classifyAgentHarnessTerminalOutcome, o as loadCodexBundleMcpThreadConfig, r as detectAndLoadAgentHarnessPromptImages, s as queueAgentHarnessMessage, t as TOOL_PROGRESS_OUTPUT_MAX_CHARS, u as runAgentHarnessAfterCompactionHook } from "../agent-harness-runtime-CmkMv4uF.js";
import { c as resolveNativeHookRelayDeferredToolApproval, l as testing, n as hasNativeHookRelayInvocation, o as registerNativeHookRelay, r as invokeNativeHookRelay, t as buildNativeHookRelayCommand } from "../native-hook-relay-CKLER864.js";
export { CODEX_APP_SERVER_CONTEXT_ENGINE_HOST, HEARTBEAT_RESPONSE_TOOL_NAME, VERSION as NODMIX_VERSION, PREEMPTIVE_OVERFLOW_ERROR_TEXT, TOOL_PROGRESS_OUTPUT_MAX_CHARS, abortEmbeddedAgentRun as abortAgentHarnessRun, acquireSessionWriteLock, appendSessionTranscriptMessage, applyEmbeddedAttemptToolsAllow, assembleHarnessContextEngine, assertContextEngineHostSupport, awaitAgentHarnessAgentEndHook, bootstrapHarnessContextEngine, buildAgentHookContextChannelFields, buildAgentRuntimePlan, buildBootstrapContextForFiles, buildEmbeddedAttemptToolRunContext, buildHarnessContextEngineRuntimeContext, buildHarnessContextEngineRuntimeContextFromUsage, buildNativeHookRelayCommand, callGatewayTool, classifyAgentHarnessTerminalOutcome, classifyEmbeddedAgentRunResultForModelFallback, classifyEmbeddedAgentRunResultForModelFallback as classifyEmbeddedPiRunResultForModelFallback, clearActiveEmbeddedRun, compactContextEngineWithSafetyTimeout, createAgentToolResultMiddlewareRunner, createCodexAppServerToolResultExtensionRunner, detectAndLoadAgentHarnessPromptImages, disposeRegisteredAgentHarnesses, log as embeddedAgentLog, emitAgentEvent, emitSessionTranscriptUpdate, estimateRenderedLlmBoundaryTokenPressure, extractToolResultMediaArtifact, filterToolResultMediaUrls, finalizeHarnessContextEngineTurn, formatApprovalDisplayPath, formatErrorMessage, formatPrePromptPrecheckLog, formatToolAggregate, formatToolProgressOutput, getAgentHarnessHookRunner, getBeforeToolCallPolicyDiagnosticState, getPluginToolMeta, hasBeforeToolCallPolicy, hasNativeHookRelayInvocation, hasSandboxBindContainerPathAliases, hasSandboxBindReadonlyHostShadows, inferToolMetaFromArgs, inspectRuntimeToolInputSchemas, invokeNativeHookRelay, isActiveHarnessContextEngine, isMessagingTool, isMessagingToolSendAction, isSubagentSessionKey, isToolWrappedWithBeforeToolCallHook, listNodes, loadCodexBundleMcpThreadConfig, logAgentRuntimeToolDiagnostics, testing as nativeHookRelayTesting, normalizeAgentRuntimeTools, normalizeHeartbeatToolResponse, normalizeProviderToolSchemas, normalizeUsage, onAgentEvent, projectRuntimeToolInputSchema, queueAgentHarnessMessage, registerNativeHookRelay, requestDeferredPluginToolApproval, resetAgentEventsForTest, resolveActiveEmbeddedRunSessionId, resolveAgentDir, resolveAgentHarnessBeforePromptBuildResult, resolveAttemptFsWorkspaceOnly, resolveAttemptSpawnWorkspaceDir, resolveBootstrapContextForRun, resolveBootstrapFilesForRun, resolveCompactionTimeoutMs, resolveContextEngineOwnerPluginId, resolveDefaultAgentDir, resolveEmbeddedAgentRuntime, resolveEmbeddedAttemptToolConstructionPlan, resolveModelAuthMode, resolveNativeHookRelayDeferredToolApproval, resolveNodeIdFromList, resolveNodmixAgentDir, resolveSandboxContext, resolveSessionAgentIds, resolveSessionWriteLockAcquireTimeoutMs, resolveSessionWriteLockOptions, resolveUserPath, resolveWritableSandboxBindHostRoots, runAgentCleanupStep, runAgentHarnessAfterCompactionHook, runAgentHarnessAfterToolCallHook, runAgentHarnessAgentEndHook, runAgentHarnessBeforeAgentFinalizeHook, runAgentHarnessBeforeCompactionHook, runAgentHarnessBeforeMessageWriteHook, runAgentHarnessLlmInputHook, runAgentHarnessLlmOutputHook, runBeforeToolCallHook, runHarnessContextEngineMaintenance, selectDefaultNodeFromList, setActiveEmbeddedRun, setBeforeToolCallDiagnosticsEnabled, shouldPreemptivelyCompactBeforePrompt, supportsModelTools, wrapToolWithBeforeToolCallHook };
