import { ToolRegistry } from '../tools/registry.js';
import type { ConfigManager } from '../config/manager.js';
import type { ProviderRegistry } from '../providers/registry.js';
import { AgentMessageBus } from './message-bus.js';
import type { ChannelPluginRegistry } from '../channels/index.js';
import { FileStateCache } from '../state/file-cache.js';
import { ProjectIndex } from '../state/project-index.js';
import type { AgentRecord } from '../tools/agent/index.js';
import type { ToolLLM } from '../config/tool-llm.js';
import type { FeatureFlagManager } from '../runtime/feature-flags/manager.js';
import type { RuntimeEventBus } from '../runtime/events/index.js';
export { summarizeToolArgs } from './orchestrator-utils.js';
type AgentOrchestratorToolDeps = {
    readonly fileCache: FileStateCache;
    readonly projectIndex: ProjectIndex;
    readonly workingDirectory: string;
    readonly surfaceRoot: string;
    readonly fileUndoManager: import('../state/file-undo.js').FileUndoManager;
    readonly modeManager: import('../state/mode-manager.js').ModeManager;
    readonly processManager: import('../tools/shared/process-manager.js').ProcessManager;
    readonly agentMessageBus: AgentMessageBus;
    readonly webSearchService?: import('../web-search/index.js').WebSearchService | undefined;
    readonly channelRegistry?: import('../channels/index.js').ChannelPluginRegistry | null | undefined;
    readonly remoteRunnerRegistry?: import('../runtime/remote/index.js').RemoteRunnerRegistry | undefined;
    readonly knowledgeService?: import('../knowledge/index.js').KnowledgeService | undefined;
    readonly memoryRegistry?: import('../state/index.js').MemoryRegistry | undefined;
    readonly sessionOrchestration: import('../sessions/orchestration/index.js').CrossSessionTaskRegistry;
    readonly archetypeLoader?: import('./archetypes.js').ArchetypeLoader | undefined;
    readonly configManager?: ConfigManager | undefined;
    readonly providerRegistry?: ProviderRegistry | undefined;
    readonly providerOptimizer?: import('../providers/optimizer.js').ProviderOptimizer | undefined;
    readonly toolLLM?: ToolLLM | undefined;
    readonly serviceRegistry?: import('../config/service-registry.js').ServiceRegistry | undefined;
    readonly secretsManager?: Pick<import('../config/secrets.js').SecretsManager, 'get' | 'set' | 'getGlobalHome'> | null | undefined;
    readonly featureFlags?: Pick<FeatureFlagManager, 'isEnabled'> | null | undefined;
    readonly overflowHandler?: import('../tools/shared/overflow.js').OverflowHandler | undefined;
    readonly sandboxSessionRegistry: import('../runtime/sandbox/session-registry.js').SandboxSessionRegistry;
    readonly workflowServices: ReturnType<typeof import('../tools/workflow/index.js').createWorkflowServices>;
};
/**
 * AgentOrchestrator — runs AgentRecord tasks in-process.
 *
 * Each agent gets its own scoped ToolRegistry containing only the tools
 * listed in record.tools. The execution loop itself now lives in
 * `orchestrator-runner.ts`; this class owns shared registry/state wiring.
 */
export declare class AgentOrchestrator {
    private fullRegistry;
    private fullRegistryChannelVersion;
    private toolDeps;
    private featureFlagManager;
    private runtimeBus;
    private readonly channelRegistry;
    private readonly messageBus;
    constructor(config?: {
        channelRegistry?: ChannelPluginRegistry | null | undefined;
        messageBus: import('./message-bus.js').AgentMessageBus;
    });
    setRuntimeBus(runtimeBus: RuntimeEventBus | null): void;
    /** Set the FeatureFlagManager for context-window awareness gating. */
    setFeatureFlagManager(manager: FeatureFlagManager): void;
    private emitterContext;
    private emitAgentProgress;
    private emitOrchestrationProgress;
    private emitAgentStarted;
    private emitAgentCancelledEvent;
    private emitOrchestrationCancelled;
    private emitAgentFailedEvent;
    private emitOrchestrationFailed;
    private emitAgentCompletedEvent;
    private emitOrchestrationCompleted;
    private emitStreamDelta;
    /**
     * Inject shared file-cache and project-index so agent tools share state with main session.
     * Call once during application startup, before any agents are spawned.
     */
    setDependencies(toolDeps: AgentOrchestratorToolDeps): void;
    /**
     * Returns the fully-populated ToolRegistry for this orchestrator.
     * Used by companion chat to execute tool calls emitted by the LLM.
     * Delegates to the lazy-initialized internal registry.
     */
    getToolRegistry(): ToolRegistry;
    /** Lazily build and cache the full ToolRegistry. */
    private getFullRegistry;
    /**
     * Build a ToolRegistry containing only the tools whose names appear in
     * the allowedNames list. Filters the provided full registry into a fresh
     * scoped registry.
     */
    private buildScopedRegistry;
    private resolveProviderForRecord;
    private resolveOptimizedProviderRoute;
    private buildOptimizerRequestProfile;
    private resolveProviderRouting;
    private normalizeRequestedModelId;
    private assertProviderQualifiedModel;
    private resolveChatModelId;
    private resolveFallbackModelRoutes;
    private createRunContext;
    /** Run an agent task described by the given record. */
    runAgent(record: AgentRecord): Promise<void>;
}
//# sourceMappingURL=orchestrator.d.ts.map