import type { Event } from '../events/schema'; import type { StateStore } from '../state/store'; import type { QueueRecord, RunEventSummary, WorktreeRecord } from './types'; export type RunSnapshot = { runId: string; repoId?: string; repoLabel?: string; path: string; updatedAt: string; data: Record; eventSummary?: RunEventSummary; }; export type RunSnapshotCursor = { offset: number; listKey?: string; }; export type RunSnapshotPage = { runs: RunSnapshot[]; total: number; nextCursor?: RunSnapshotCursor; }; export type DashboardScope = 'all' | 'current'; export type RunSnapshotCache = { snapshots: Map; auditSummaries: Map; runFiles?: CachedRunFiles; repoLabels: Map; }; type CachedSnapshot = { mtimeMs: number; snapshot: RunSnapshot; }; type CachedAuditSummary = { mtimeMs: number; summary: RunEventSummary; }; type CachedRunFiles = { key: string; rootsKey: string; files: RunFileEntry[]; }; type RunFileEntry = { runId: string; path: string; auditPath: string; mtimeMs: number; repoId?: string; repoLabel?: string; }; export declare function createRunSnapshotCache(): RunSnapshotCache; export declare function loadRunSnapshots(state: StateStore, options?: { limit?: number; cursor?: RunSnapshotCursor; cache?: RunSnapshotCache; includeAudit?: boolean; scope?: DashboardScope; }): Promise; export declare function loadRunEvents(options: { state: StateStore; runId: string; repoId?: string; limit?: number; since?: string; }): Promise; export declare function loadQueueRequests(state: StateStore, options?: { cache?: RunSnapshotCache; scope?: DashboardScope; }): Promise; export declare function loadWorktrees(state: StateStore, options?: { cache?: RunSnapshotCache; scope?: DashboardScope; includeStatus?: boolean; }): Promise; export {};