import { IObservable } from '@vscode/observables'; import { DaemonApiType } from '@vscode/component-explorer-cli/daemon-types'; import { DaemonConfig } from './DaemonConfig.js'; /** Screenshot result from the daemon */ export type DaemonScreenshotResult = DaemonApiType['screenshots']['take']['TResult']; /** Comparison result from the daemon */ export type DaemonCompareResult = DaemonApiType['screenshots']['compare']['TResult']; /** Fixture info from the daemon */ export type DaemonFixtureInfo = DaemonApiType['fixtures']['list']['TResult'][number]; export interface DaemonSession { readonly name: string; readonly serverUrl: string; readonly sourceKind: 'current' | 'worktree'; } /** * Client-side model for interacting with the daemon. * Manages source tree IDs, screenshot caching, and the event stream. */ export declare class DaemonModel { readonly config: DaemonConfig; private readonly _sourceTreeIds; private readonly _sessions; private readonly _screenshotCache; private readonly _client; private _eventStreamAbort; readonly sessionName: string; /** Observable map of sessionName → current sourceTreeId */ readonly sourceTreeIds: IObservable>; /** Observable list of sessions from the daemon */ readonly sessions: IObservable; constructor(config: DaemonConfig); /** * Initializes the model: fetches initial session info and starts listening to events. * Call this once after construction. */ initialize(): Promise; /** * Get a screenshot for a fixture in a session, using cache when available. * Cache is keyed on sessionName + fixtureId and invalidated when sourceTreeId changes. */ getScreenshot(sessionName: string, fixtureId: string): Promise; /** * Compare a fixture across two sessions. Returns match status and hashes (no images). */ compare(fixtureId: string, baselineSessionName: string, currentSessionName: string): Promise; /** * List fixtures from a session. */ listFixtures(sessionName: string): Promise; /** * Get the explorer URL for a different session (for session switching via full navigation). */ getSessionExplorerUrl(sessionName: string): string | undefined; dispose(): void; private _fetchSessionInfos; private _startEventStream; private _handleEvent; private _validateProtocolVersions; } //# sourceMappingURL=DaemonModel.d.ts.map