import type pino from "pino";
import type { ProjectRegistry, WorkspaceRegistry, PersistedProjectRecord, PersistedWorkspaceRecord } from "./workspace-registry.js";
import type { WorkspaceGitService } from "./workspace-git-service.js";
export type ReconciliationChange = {
    kind: "workspace_archived";
    workspaceId: string;
    directory: string;
    reason: string;
} | {
    kind: "project_archived";
    projectId: string;
    directory: string;
    reason: string;
} | {
    kind: "project_updated";
    projectId: string;
    directory: string;
    fields: Partial<Pick<PersistedProjectRecord, "kind" | "displayName" | "rootPath" | "customName">>;
} | {
    kind: "workspace_updated";
    workspaceId: string;
    directory: string;
    fields: Partial<Pick<PersistedWorkspaceRecord, "projectId" | "displayName" | "kind">>;
};
export interface ReconciliationResult {
    changesApplied: ReconciliationChange[];
    durationMs: number;
}
export interface WorkspaceReconciliationServiceOptions {
    projectRegistry: ProjectRegistry;
    workspaceRegistry: WorkspaceRegistry;
    logger: pino.Logger;
    intervalMs?: number;
    onChanges?: (changes: ReconciliationChange[]) => void;
    workspaceGitService?: Pick<WorkspaceGitService, "getWorkspaceGitMetadata">;
}
export declare class WorkspaceReconciliationService {
    private readonly projectRegistry;
    private readonly workspaceRegistry;
    private readonly logger;
    private readonly intervalMs;
    private readonly onChanges;
    private readonly workspaceGitService;
    private timer;
    private running;
    constructor(options: WorkspaceReconciliationServiceOptions);
    start(): void;
    stop(): void;
    runOnce(): Promise<ReconciliationResult>;
    private runSafe;
    private reconcile;
    private mergeDuplicateProjectsByRoot;
    private mergeDuplicateProjectCustomName;
    private reconcileProject;
    private readWorkspaceGitMetadata;
}
//# sourceMappingURL=workspace-reconciliation-service.d.ts.map