import { buildSourceHealth } from '../source-sync/source-health.js';
export async function buildBootstrapHealthSummary(deps, options) {
    const sourceHealth = await buildSourceHealth(deps.store, { project: options.project, limit: 100_000 });
    const conflicts = await deps.store.listAtomImportConflicts({
        project: options.project,
        status: 'open',
        limit: 1000,
    });
    const gaps = await deps.store.listKnowledgeGaps({ project: options.project, limit: 1000 });
    let maintenanceItems = 0;
    if (deps.maintenance) {
        const batch = await deps.maintenance.propose({ project: options.project });
        maintenanceItems = batch.items.length;
    }
    return {
        sourceCounts: sourceHealth.counts,
        tombstones: sourceHealth.tombstones.length,
        openImportConflicts: conflicts.length,
        maintenanceItems,
        gaps: gaps.length,
    };
}
