import { Store } from './store.js';
import { ArchLayer } from '../types.js';
import './store-interface.js';
import './graph.js';

type ClusterSource = 'namespace' | 'directory' | 'community' | 'layer';
interface Cluster {
    name: string;
    label: string;
    source: ClusterSource;
    parentName: string | null;
    depth: number;
    fileCount: number;
    layer?: ArchLayer;
}
interface ClusterResult {
    clustersFound: number;
    namespaceClusters: number;
    directoryClusters: number;
    communityClusters: number;
    layerClusters: number;
    filesAssigned: number;
    durationMs: number;
}
declare class ClusterEngine {
    private store;
    constructor(store: Store);
    detect(repo: string): ClusterResult;
    private detectNamespaceClusters;
    private detectDirectoryClusters;
    private detectCommunityClusters;
    /**
     * Assign an architectural layer to a file based on its path and filename.
     *
     * The rules are applied in priority order; the first match wins.
     */
    static assignFileLayer(filePath: string): ArchLayer;
    /**
     * Layer labels surfaced in the UI (ordered from high-level entry points down
     * to foundational infrastructure).
     */
    private static readonly LAYER_LABELS;
    private detectLayerClusters;
}

export { type Cluster, ClusterEngine, type ClusterResult, type ClusterSource };
