import type { GitCompactSummary, GitDiffSummary, GitRepoStatus, GitWorkspaceUpdate, WorkspaceGitSubscriptionParams } from './git-types.js';
import type { GitDiffSummaryProvider, GitStatusProvider } from './git-snapshot-store.js';
export declare const DEFAULT_GIT_WORKSPACE_POLL_INTERVAL_MS = 5000;
export declare const MIN_GIT_WORKSPACE_POLL_INTERVAL_MS = 1000;
export interface NormalizeGitWorkspaceSubscriptionOptions {
    defaultIntervalMs?: number;
    minIntervalMs?: number;
}
export interface NormalizedWorkspaceGitSubscriptionParams extends Required<WorkspaceGitSubscriptionParams> {
}
export interface GitWorkspaceCacheEntry {
    key: string;
    workspace: string;
    status: GitRepoStatus;
    diffSummary?: GitDiffSummary;
    compactSummary: GitCompactSummary;
    seq: number;
    timestamp: number;
}
export type GitWorkspaceUpdateListener = (update: GitWorkspaceUpdate, cacheEntry: GitWorkspaceCacheEntry) => void;
export interface GitWorkspaceMonitorOptions {
    getStatus?: GitStatusProvider;
    getDiffSummary?: GitDiffSummaryProvider;
    now?: () => number;
    minIntervalMs?: number;
    defaultIntervalMs?: number;
    keyPrefix?: string;
}
export interface GitWorkspaceSubscription {
    params: NormalizedWorkspaceGitSubscriptionParams;
    refresh(): Promise<GitWorkspaceUpdate>;
    getCached(): GitWorkspaceCacheEntry | undefined;
    dispose(): void;
}
export declare function normalizeGitWorkspaceSubscriptionParams(params: WorkspaceGitSubscriptionParams, options?: NormalizeGitWorkspaceSubscriptionOptions): NormalizedWorkspaceGitSubscriptionParams;
export declare class GitWorkspaceMonitor {
    private readonly getStatusProvider;
    private readonly getDiffSummaryProvider;
    private readonly now;
    private readonly minIntervalMs;
    private readonly defaultIntervalMs;
    private readonly keyPrefix;
    private readonly cache;
    private readonly listeners;
    private seq;
    constructor(options?: GitWorkspaceMonitorOptions);
    refresh(params: string | WorkspaceGitSubscriptionParams): Promise<GitWorkspaceUpdate>;
    poll(params: string | WorkspaceGitSubscriptionParams): Promise<GitWorkspaceUpdate>;
    getCached(workspace: string): GitWorkspaceCacheEntry | undefined;
    getCompactSummary(workspace: string): GitCompactSummary | undefined;
    onUpdate(listener: GitWorkspaceUpdateListener): () => void;
    createSubscription(params: WorkspaceGitSubscriptionParams, listener?: GitWorkspaceUpdateListener): GitWorkspaceSubscription;
    normalize(params: WorkspaceGitSubscriptionParams): NormalizedWorkspaceGitSubscriptionParams;
    private keyForWorkspace;
    private emit;
}
export declare function createGitWorkspaceMonitor(options?: GitWorkspaceMonitorOptions): GitWorkspaceMonitor;
