import type { ConversationManager } from './conversation.js';
import type { ExecutionPlan } from '@pellux/goodvibes-sdk/platform/core/execution-plan';
import type { CacheHitTracker } from '@pellux/goodvibes-sdk/platform/providers/cache-strategy';
import type { ConfigManager } from '../config/manager.js';
import type { ProviderRegistry } from '../providers/registry.js';
import type { ToolRegistry } from '@pellux/goodvibes-sdk/platform/tools/registry';
import type { ToolCall, ToolResult } from '@pellux/goodvibes-sdk/platform/types/tools';
import type { ContentPart, LLMProvider } from '../providers/interface.js';
import type { HookEvent, HookResult } from '@pellux/goodvibes-sdk/platform/hooks/types';
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 '@pellux/goodvibes-sdk/platform/providers/favorites';
import type { AgentManager } from '../tools/agent/index.js';
import type { ExecutionPlanManager } from '@pellux/goodvibes-sdk/platform/core/execution-plan';
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, 'get' | 'getCurrentModel' | 'getForModel' | 'getTokenLimitsForModel'>;
    readonly favoritesStore?: Pick<FavoritesStore, 'recordUsage'>;
    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[];
    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