import type { ConfigManager } from '../config/manager.js'; import type { ProviderRegistry } from '../providers/registry.js'; import type { McpRegistry } from '../mcp/registry.js'; import type { ShellPathService } from './shell-paths.js'; export interface RuntimeSelectionState { model: string; provider: string; } export interface HostSystemMessageSink { low(message: string): void; high(message: string): void; } export interface BackgroundProviderDiscoveryOptions { configManager: ConfigManager; providerRegistry: ProviderRegistry; runtime: RuntimeSelectionState; requestRender: () => void; restoreRuntimeModel: (providerRegistry: ProviderRegistry, savedModel: string, runtime: RuntimeSelectionState) => void; systemMessageRouter: HostSystemMessageSink; shellPaths: Pick; surfaceRoot: string; } export interface BackgroundRuntimeTaskHandle { readonly stopped: boolean; stop(): void; } /** * Starts one asynchronous provider discovery pass and returns a handle that * prevents late scan results from mutating runtime state after the host stops. * * The underlying scanner does not currently expose cancellable I/O, so `stop()` * is intentionally a state guard rather than a hard abort. */ export declare function startBackgroundProviderDiscovery(options: BackgroundProviderDiscoveryOptions): BackgroundRuntimeTaskHandle; export interface BackgroundMcpDiscoveryOptions { mcpRegistry: McpRegistry; systemMessageRouter: HostSystemMessageSink; requestRender: () => void; shellPaths: Pick; surfaceRoot: string; } /** * Schedules MCP auto-discovery and returns a handle that cancels the delayed * scan and suppresses late async side effects after host shutdown. */ export declare function scheduleBackgroundMcpDiscovery(options: BackgroundMcpDiscoveryOptions): BackgroundRuntimeTaskHandle; //# sourceMappingURL=bootstrap-background.d.ts.map