/** One declaration of an external npm dep inside one workspace's package.json. */
export interface DepDeclaration {
    /** Workspace package name (e.g. `@gjsify/cli`). */
    workspace: string;
    /** Absolute path to the workspace's `package.json`. */
    workspaceLocation: string;
    /** Dependency name (e.g. `rolldown`). */
    name: string;
    /** Which manifest field this declaration lives in. */
    field: 'dependencies' | 'devDependencies' | 'optionalDependencies' | 'peerDependencies';
    /** The original range string (e.g. `^1.0.4`). */
    currentRange: string;
    /** The parsed version (max-satisfying numeric) inside the range, or `null`. */
    currentVersion: string | null;
    /** Range prefix preserved on write-back (`^`, `~`, `>=`, …; `""` for literal). */
    prefix: string;
}
/** Aggregated view of one external dep across all workspaces that declare it. */
export interface DependencyGroup {
    /** Dependency name. */
    name: string;
    /** Every declaration of this dep across the workspace. */
    occurrences: DepDeclaration[];
    /** Set of all unique declared ranges (size > 1 → inconsistency). */
    declaredRanges: Set<string>;
    /** Range string declared by the most workspaces (the de-facto consensus). */
    dominantRange: string;
    /** When ranges disagree, the highest declared semver version across them. */
    highestVersion: string | null;
}
/**
 * Group a flat list of `DepDeclaration`s by dep name. Each group has the full
 * occurrence list plus pre-computed aggregates (consensus range, highest
 * declared version) so callers don't have to re-scan.
 */
export declare function groupByDependency(decls: readonly DepDeclaration[]): DependencyGroup[];
/** `true` when the group's workspaces declare the dep at >1 distinct range. */
export declare function isInconsistent(group: DependencyGroup): boolean;
/**
 * Filter to just the inconsistent groups (>1 distinct range across workspaces).
 * Convenience wrapper for `--align` and `--check` modes.
 */
export declare function findInconsistencies(groups: readonly DependencyGroup[]): DependencyGroup[];
