import type { SubagentsWidgetState } from "../types.js"; export type SubagentsToolResultObserveOptions = { showSnapshot?: boolean; }; export type SubagentsWidgetControllerHost = { readonly cwd: string; hasActiveRuntime(): boolean; sessionFile(): string | undefined; isRunning(): boolean; render(): void; }; export declare class AppSubagentsWidgetController { private readonly host; private pollTimer; private pollInFlight; private currentRunDir; private currentRunDirs; private state; private readonly runFreshnessByRunDir; private readonly taskPreviewsByRunDir; private readonly snapshotByRunDir; private refreshGeneration; private fileWatcher; private fileRefreshTimer; constructor(host: SubagentsWidgetControllerHost); get widgetState(): SubagentsWidgetState | undefined; startPolling(): void; stopPolling(): void; reset(): void; observeToolResult(toolName: string, details: unknown, options?: SubagentsToolResultObserveOptions): void; observeLiveState(data: unknown): void; private startFileWatcher; private stopFileWatcher; private handleSubagentsFilesChanged; private schedulePoll; private poll; private refreshFromFiles; private findActiveRegistryRunDirsForCurrentSession; private registryRunDirsNewestFirst; private clearCachedRun; private buildStateFromRuns; private orderRuns; private orderRunDirs; private rememberRunFreshness; private runFreshness; private runFreshnessFromAgents; private parseRunTimestamp; private updateState; private isCurrentGeneration; private shouldContinuePolling; private eventMatchesCurrentSession; }