import type { ConversationManager } from './conversation.js';
import type { ExecutionPlan } from './execution-plan.js';
import type { CacheHitTracker } from '../providers/cache-strategy.js';
import type { ConfigManager } from '../config/manager.js';
import type { ProviderRegistry } from '../providers/registry.js';
import type { ToolRegistry } from '../tools/registry.js';
import type { ToolCall, ToolResult } from '../types/tools.js';
import type { ContentPart, LLMProvider } from '../providers/interface.js';
import type { HookEvent, HookResult } from '../hooks/types.js';
import type { RuntimeEventBus } from '../runtime/events/index.js';
import { HelperModel } from '../config/helper-model.js';
import type { ModelDefinition } from '../providers/registry.js';
import type { FavoritesStore } from '../providers/favorites.js';
import type { AgentManager } from '../tools/agent/index.js';
import type { ExecutionPlanManager } from './execution-plan.js';
interface HookDispatcherLike {
    fire(event: HookEvent): Promise<HookResult>;
}
type EmitterContext = import('../runtime/emitters/index.js').EmitterContext;
export interface OrchestratorTurnLoopContext {
    readonly conversation: ConversationManager;
    readonly toolRegistry: ToolRegistry;
    readonly getSystemPrompt: () => string;
    readonly getAbortSignal: () => AbortSignal | undefined;
    readonly hookDispatcher: HookDispatcherLike | null;
    readonly requestRender: () => void;
    readonly runtimeBus: RuntimeEventBus | null;
    readonly agentManager: Pick<AgentManager, 'list' | 'spawn'>;
    readonly configManager: Pick<ConfigManager, 'get'>;
    readonly providerRegistry: Pick<ProviderRegistry, 'require' | 'getCurrentModel' | 'getForModel' | 'getTokenLimitsForModel'>;
    readonly favoritesStore?: Pick<FavoritesStore, 'recordUsage'> | undefined;
    readonly cacheHitTracker: Pick<CacheHitTracker, 'getMetrics'>;
    readonly helperModel: HelperModel;
    readonly sessionId: string;
    readonly preTurnPlan: ExecutionPlan | null;
    readonly planManager: Pick<ExecutionPlanManager, 'getActive' | 'getSummary' | 'getNextItems' | 'toMarkdown' | 'create' | 'save' | 'parseFromMarkdown' | 'replaceItems' | 'load' | 'updateItem'> | null;
    readonly text: string;
    readonly content?: ContentPart[] | undefined;
    readonly turnId: string;
    readonly emitterContext: (turnId: string) => EmitterContext;
    readonly executeToolCalls: (turnId: string, calls: ToolCall[]) => Promise<ToolResult[]>;
    readonly checkContextWindowPreflight: (turnId: string, model: ModelDefinition) => Promise<'ok' | 'compacted' | 'error'>;
    readonly normalizeUsage: (usage: Awaited<ReturnType<LLMProvider['chat']>>['usage']) => Awaited<ReturnType<LLMProvider['chat']>>['usage'];
    readonly estimateFreshTurnInputTokens: (currentEstimatedTokens: number, text: string, content?: ContentPart[]) => number;
    readonly getMessageQueueLength: () => number;
    readonly isReconciliationEnabled: () => boolean;
    readonly setPendingToolCalls: (calls: ToolCall[]) => void;
    readonly setAutoSpawnTimeout: (timeout: ReturnType<typeof setTimeout> | null) => void;
    readonly setStreamingActive: (value: boolean) => void;
    readonly setStreamingInputTokens: (value: number) => void;
    readonly addStreamingOutputTokens: (value: number) => void;
    readonly setLastRequestInputTokens: (value: number) => void;
    readonly setLastInputTokens: (value: number) => void;
    readonly markTurnFailed: () => void;
    readonly usage: {
        input: number;
        output: number;
        cacheRead: number;
        cacheWrite: number;
    };
}
export declare function executeOrchestratorTurnLoop(context: OrchestratorTurnLoopContext): Promise<void>;
export {};
//# sourceMappingURL=orchestrator-turn-loop.d.ts.map