import type { LanguageModel, ModelMessage } from 'ai'; import type { AgentConfig } from '../types/agentConfig.js'; import type { Flow } from '../types/flow.js'; import type { RunState } from './durable/types.js'; import { availableHostFlows } from './hostControlTools.js'; import type { StreamPart } from '../types/stream.js'; import type { RunStore } from './durable/RunStore.js'; export type HostSelection = { kind: 'enterFlow'; flow: Flow; } | { kind: 'route'; agentId: string; reason?: string; } | { kind: 'keep'; }; export interface HostGuardVerdict { action: 'keep' | 'enterFlow' | 'transfer'; flowName?: string; targetAgentId?: string; reason?: string; confidence?: number; } export declare const DEFAULT_CLASSIFIER_CONTEXT_MESSAGES = 6; export interface ClassifyHostOptions { agent: AgentConfig; run: RunState; model: LanguageModel; allowKeep: boolean; excludeFlowNames?: string[]; /** How many recent messages to include in the classifier prompt. Default: 6. */ contextMessageLimit?: number; emit?: (part: StreamPart) => void; abortSignal?: AbortSignal; runStore?: RunStore; } export declare function classifyHostTarget(options: ClassifyHostOptions): Promise; /** @deprecated Use classifyHostTarget — kept as alias for test injection. */ export declare function selectHostTarget(options: Omit & { alwaysRoute?: boolean; }): Promise; export declare function verdictToSelection(verdict: HostGuardVerdict, agent: AgentConfig): HostSelection | undefined; export declare function formatRecentConversation(messages: ModelMessage[], limit?: number): string; export { availableHostFlows };