import type { OrchestrationAuthority } from './OrchestrationAuthority.js'; import type { AuthoritySessionHandle, ToolExecutionOutcome, OpenSessionParams, OrchestrationAuthorityConfig } from './types.js'; import type { RealtimeSessionConfig } from '../realtime/RealtimeAudioClient.js'; import type { ToolExecutor } from '../foundation/ToolExecutor.js'; import type { ConversationState } from '../foundation/ConversationState.js'; import type { ConversationEventLog } from '../foundation/ConversationEventLog.js'; import type { AgentStateController } from '../foundation/AgentStateController.js'; import { HookRunner } from '../hooks/HookRunner.js'; /** * Default implementation of the OrchestrationAuthority port. * * Composes Foundation services, HookRunner, CapabilityHost, LivePromptAssembler, * ExtractionEngine, and MemoryService into the transport-agnostic orchestration * sequence defined in RFC-REALTIME-RUNTIME-AUTHORITY.md. * * This is the "single brain" that both text Runtime and RealtimeRuntime * delegate to for conversational semantics. */ export declare class DefaultOrchestrationAuthority implements OrchestrationAuthority { private readonly agents; private readonly defaultAgentId; private readonly hookRunner; private readonly toolExecutor; private readonly conversationState; private readonly eventLog; private readonly agentState; private readonly extractionEngine; private readonly promptAssembler; private readonly memoryService; private readonly memoryIngestion; private readonly maxPersistRetries; private readonly realtimeExtractionRunner?; private readonly autoRetrieveProvider; private readonly defaultModel; private readonly triageAgentId; private readonly retriagePolicy; private readonly voiceMode; private readonly autoCompaction; private readonly compactionHarnessContext; constructor(config: OrchestrationAuthorityConfig); openSession(params: OpenSessionParams): Promise; recordUserInput(handle: AuthoritySessionHandle, text: string): Promise; consumePendingRealtimeReconfigure(handle: AuthoritySessionHandle): Promise; recordAssistantOutput(handle: AuthoritySessionHandle, text: string): Promise; prepareRealtimeConfig(handle: AuthoritySessionHandle): Promise; private buildRealtimeConfigSnapshot; private languageModelToRealtimeId; private finalizeFlowToolNodesForSession; private runFlowToolNodeLoop; private resolveExecutableToolForFlow; executeToolCall(handle: AuthoritySessionHandle, call: { id: string; name: string; args: unknown; }): Promise; completeTurn(handle: AuthoritySessionHandle): Promise; closeSession(handle: AuthoritySessionHandle, result?: { success: boolean; error?: Error; }): Promise; failSession(handle: AuthoritySessionHandle, error: Error): Promise; /** Expose foundation services for facades that need direct access. */ get foundation(): { toolExecutor: ToolExecutor; conversationState: ConversationState; eventLog: ConversationEventLog; agentState: AgentStateController; }; /** Expose hook runner for facades that need to fire transport-specific hooks. */ get hooks(): HookRunner; /** * Build a CapabilityHost from agent config. * Mirrors the logic in CapabilityCallWorker.buildHost() and * AgentExecuteStage's host construction, unified into one place. */ private buildCapabilityHost; private buildOutcome; private runExtraction; private runRealtimeKnowledgeRefresh; private runRealtimeExtractionRefinement; private runMemoryIngestion; private persistWithRetry; private buildSessionEndMetadata; private getInternals; private readPersistedFlowState; private syncFlowStateToSession; private resolveToolArgs; private verifyExtractionSubmission; private buildExtractionTranscript; private getMessageText; private toRecord; private getRequiredExtractionFields; private filterExtractionArgsAgainstTranscript; private buildToolCallRecord; /** * Determine whether a tool is a capability tool (flow transition, extraction) * or a regular agent tool. Capability tools have self-contained execute() * and bypass ToolExecutor enforcement. */ private isCapabilityTool; private getLastUserInput; }