import { Bt as CompatPolicyHints, Mt as CompatSymbol, _t as ApiSurface, at as CompatProvenance, kt as CompatSnapshot, nt as CompatChangeSeverity, t as ApiSpec, tt as CompatChangeCategory, xt as LanguageHints, yt as DiffResult } from "./types-nM5Kp7UP.mjs"; //#region src/compat/classify.d.ts /** A single classified compatibility change. */ interface ClassifiedChange { /** Specific change category. */ category: CompatChangeCategory; /** Policy-aware severity (may differ from defaultSeverityForCategory). */ severity: CompatChangeSeverity; /** Fully-qualified symbol path. */ symbol: string; /** Deterministic ID for grouping related changes across languages. */ conceptualChangeId: string; /** Where the drift originated. */ provenance: CompatProvenance; /** Description of the old state. */ old: Record; /** Description of the new state. */ new: Record; /** Human-readable explanation. */ message: string; /** * Optional spec-level remediation hint. Set by post-classification rules * (see `detectForkedSchemas` in differ.ts) when a change has a recognized * upstream root cause that the spec author can fix. Surfaces in both the * machine-readable report and the human-readable summary. */ remediation?: string; } /** Result of classifying all changes between two snapshots. */ interface ClassificationResult { changes: ClassifiedChange[]; summary: { breaking: number; softRisk: number; additive: number; }; } /** * Classify changes between a baseline and candidate symbol. * Returns one or more classified changes for the diff. */ declare function classifySymbolChanges(baseline: CompatSymbol, candidate: CompatSymbol | undefined, policy: CompatPolicyHints): ClassifiedChange[]; /** * Classify a new symbol as additive. */ declare function classifyAddedSymbol(symbol: CompatSymbol): ClassifiedChange; /** Summarize a list of classified changes by severity. */ declare function summarizeChanges(changes: ClassifiedChange[]): ClassificationResult['summary']; //#endregion //#region src/compat/spec-filter.d.ts /** * Compute the set of symbol names that are derivable from the OpenAPI spec. * Only these names should be compared during compat verification — everything * else in the baseline is hand-written and out of scope for generation. */ declare function specDerivedNames(spec: ApiSpec, hints: LanguageHints): Set; /** * Compute a map of enum name → set of wire values that appear in the spec. * Used by filterSurface to exclude hand-added enum members that aren't in the spec. */ declare function specDerivedEnumValues(spec: ApiSpec): Map>; /** * Compute the set of field paths (e.g., "Organization.name") that are defined * in the OpenAPI spec's model schemas. Used by filterSurface to exclude * hand-added SDK fields that reference spec-derived types. */ declare function specDerivedFieldPaths(spec: ApiSpec, hints: LanguageHints): Set; /** * Compute the set of method paths (e.g., "Auth.authorize") that are defined * as operations in the OpenAPI spec's services. Used by filterSurface to * exclude hand-written SDK methods that don't correspond to spec operations. */ declare function specDerivedMethodPaths(spec: ApiSpec): Set; /** * Compute the set of HTTP operation keys (e.g., "GET /auth/authorize") that * exist in the spec. Used for overlay-based method matching. */ declare function specDerivedHttpKeys(spec: ApiSpec): Set; /** * Filter an ApiSurface to only include symbols whose names appear in the * allowed set. Symbols not in the set are dropped entirely — they won't * count toward the total or produce violations. * * For interfaces: when fieldPaths is provided, only keeps fields that appear * in the spec-derived field paths. This prevents false positives from hand-added * SDK fields that reference spec-derived types but aren't defined in the spec. * * For classes: when methodPaths is provided, only keeps methods whose names * appear in the spec-derived method paths. This prevents false positives from * hand-written SDK methods (e.g., Auth.authorization_url, Webhooks.construct_event) * that don't correspond to spec operations. Properties on service classes are * also filtered: only UPPER_CASE constants that are spec-derivable are kept. */ declare function filterSurface(surface: ApiSurface, allowedNames: Set, opts?: { fieldPaths?: Set; methodPaths?: Set; enumValues?: Map>; }): ApiSurface; //#endregion //#region src/compat/differ.d.ts /** Result of diffing two compat snapshots. */ interface CompatDiffResult { changes: ClassifiedChange[]; summary: ClassificationResult['summary']; } /** * Diff two compat snapshots, producing classified changes with * policy-aware severity. */ declare function diffSnapshots(baseline: CompatSnapshot, candidate: CompatSnapshot, policy?: CompatPolicyHints): CompatDiffResult; /** * Compare two ApiSurface objects and return a DiffResult. * * This preserves the existing diffing behavior used by the overlay retry loop, * compat check, and all existing tests. The internal implementation uses the * same algorithms as before to maintain full backward compatibility with * overlay patching and verification workflows. */ declare function diffSurfaces(baseline: ApiSurface, candidate: ApiSurface, hints: LanguageHints): DiffResult; //#endregion export { specDerivedEnumValues as a, specDerivedMethodPaths as c, ClassifiedChange as d, classifyAddedSymbol as f, filterSurface as i, specDerivedNames as l, summarizeChanges as m, diffSnapshots as n, specDerivedFieldPaths as o, classifySymbolChanges as p, diffSurfaces as r, specDerivedHttpKeys as s, CompatDiffResult as t, ClassificationResult as u }; //# sourceMappingURL=differ-DMmw0tbA.d.mts.map