import type { Workspace } from '../../pm/index.ts';
import type { RuleLevel } from '../package/index.ts';
/**
 * Score bands from the AEI × CRS combination matrix (section 10).
 * Does not include install-strategy outcomes (`peer-with-default`).
 */
export type AeiScoreBand = 'dependency' | 'probably-dependency' | 'review' | 'probably-peer' | 'peer';
/**
 * Final classification for a dependency relationship.
 * Score bands are ordered from "keep in dependencies" to "must be a peer";
 * `peer-with-default` is an install-strategy refinement of definitive `peer`
 * (section 12), only produced when peer-with-default mode is enabled
 * (`classifier: 'aei-next'` or `commands.apiExposure.peerWithDefault`).
 */
export type AeiRecommendation = AeiScoreBand | 'peer-with-default';
/**
 * How a peer-leaning dependency should be installed when peer-with-default
 * mode is enabled (section 12).
 * - `none` — optional / feature-gated peer
 * - `dev` — peer + dev companion (library default)
 * - `default` — peer + dependencies (`peer-with-default`)
 */
export type AeiInstallStrategy = 'none' | 'dev' | 'default';
/** Ordered band scale used by the scoring combination matrix (section 10). */
export declare const AEI_SCORE_BAND_ORDER: readonly AeiScoreBand[];
/**
 * Full recommendation order for reporters / fail-on (includes install strategy).
 * `peer-with-default` ranks above `peer` (same contract, plus default install).
 */
export declare const AEI_BAND_ORDER: readonly AeiRecommendation[];
/** Coupling Risk Score band; shifts the AEI band by at most one step. */
export type CrsBand = 'low' | 'moderate' | 'high';
/**
 * Which score a rule contributes to:
 * - `exposure` and `modifier` rules feed the API Exposure Index (AEI)
 * - `coupling` and `dep-signal` rules feed the Coupling Risk Score (CRS)
 */
export type AeiRuleKind = 'exposure' | 'coupling' | 'dep-signal' | 'modifier';
/** A rule weight: a finite additive weight, or conclusive (`infinite` ⇒ peer). */
export type AeiWeight = number | 'infinite';
/** A rule as defined in the registry (`rules.ts`), mirroring API-EXPOSURE-INDEX.md. */
export interface AeiRuleDefinition {
    /** Whether the rule is active without explicit configuration. @default true */
    defaultEnabled?: boolean;
    defaultWeight: AeiWeight;
    description: string;
    id: string;
    kind: AeiRuleKind;
}
/** A rule after config normalization: effective enabled state and weight. */
export interface ResolvedAeiRule extends AeiRuleDefinition {
    enabled: boolean;
    level: RuleLevel;
    weight: AeiWeight;
}
/**
 * A finding as produced by the analysis walkers, before configuration is
 * applied. Walkers are config-free; `resolveFindings()` turns raw findings
 * into weighted `AeiFinding`s (dropping findings for disabled rules).
 */
export interface RawAeiFinding {
    dependency: string;
    evidence: string;
    file: string;
    line?: number;
    ruleId: string;
}
/** One piece of evidence contributing to a dependency's score. */
export interface AeiFinding {
    dependency: string;
    /** Human-readable evidence line, e.g. "exported runtime value `UserSchema`". */
    evidence: string;
    /** Workspace-relative file path, or `(dependency)` for dep-signal findings. */
    file: string;
    /** True when the effective weight is `infinite` — conclusive peer evidence. */
    infinite: boolean;
    level: RuleLevel;
    line?: number;
    ruleId: string;
    /** Effective finite weight after config; 0 when `infinite` is true. */
    weight: number;
}
export type AeiDependencySection = 'dependencies' | 'devDependencies' | 'peerDependencies' | 'dependencies+peerDependencies' | 'unlisted';
/**
 * Why the recommendation was produced. `override`/`terminal`/
 * `workspace-internal`/`types-package` bypass scoring entirely; `provided`
 * caps an unlisted-but-exposed dependency at `review` because a declared
 * dependency provides and version-manages it.
 */
export type AeiRecommendationSource = 'score' | 'override' | 'terminal' | 'workspace-internal' | 'types-package' | 'provided';
/** The scored assessment of a single dependency relationship. */
export interface DependencyAssessment {
    aei: number;
    /** True when conclusive evidence belongs to the API-exposure axis. */
    aeiInfinite: boolean;
    crs: number;
    /** True when conclusive evidence belongs to the coupling/contract axis. */
    crsInfinite: boolean;
    currentSection: AeiDependencySection;
    dependency: string;
    findings: AeiFinding[];
    /**
     * Install strategy for peer-leaning recommendations when peer-with-default
     * mode is enabled. Undefined when the mode is off or the base band is not
     * peer-leaning.
     */
    installStrategy?: AeiInstallStrategy;
    /**
     * Whether this package owns an actionable manifest placement for the
     * relationship. False means the score comes only from types/symbols reached
     * through another package's public surface; that provider owns the runtime
     * dependency contract, so standalone API Exposure must not report a local
     * placement mismatch that deplint cannot enforce. Undefined is treated as
     * actionable for backward compatibility with older assessment producers.
     */
    placementActionable?: boolean;
    recommendation: AeiRecommendation;
    recommendationSource: AeiRecommendationSource;
    /** Additive AEI contribution from `aei.modifier.tree-shaking` (0 when not applied). */
    treeShakingModifier: number;
}
/** Result of analyzing one workspace package. */
export interface WorkspaceApiExposureResult {
    assessments: DependencyAssessment[];
    workspace: Workspace;
}
//# sourceMappingURL=types.d.ts.map