import { $t as ViolationSeverity, At as CompatConfig, Bt as ApiInterface, Dt as CompatApproval, Et as BreakingChangeCategory, Ft as severityMeetsThreshold, Gt as ApiTypeAlias, Ht as ApiParam, It as Addition, Jt as LanguageHints, Kt as DiffResult, Lt as ApiClass, Mt as CompatProvenance, Nt as SoftRiskChangeCategory, Ot as CompatChangeCategory, Pt as defaultSeverityForCategory, Qt as ViolationCategory, Rt as ApiEnum, Tt as AdditiveChangeCategory, Ut as ApiProperty, Vt as ApiMethod, Wt as ApiSurface, Xt as OverlayLookup, Yt as MethodOverlay, Zt as Violation, an as CompatSymbol, cn as CompatVisibility, dn as apiSurfaceToSnapshot, en as CompatParameter, fn as ALL_LANGUAGE_IDS, hn as mergePolicy, in as CompatStability, jt as CompatFailLevel, kt as CompatChangeSeverity, ln as LanguageId, mn as getDefaultPolicy, nn as CompatSnapshot, on as CompatSymbolKind, pn as CompatPolicyHints, qt as Extractor, rn as CompatSourceKind, sn as CompatTypeRef, t as ApiSpec, tn as CompatPassingStyle, un as ParameterSensitivity, zt as ApiField } from "../types-Csp5WtkF.mjs"; import { a as ClassifiedChange, c as summarizeChanges, i as ClassificationResult, n as diffSnapshots, o as classifyAddedSymbol, r as diffSurfaces, s as classifySymbolChanges, t as CompatDiffResult } from "../differ-ADNrVFli.mjs"; //#region src/compat/schema.d.ts /** Current schema version for compatibility snapshots. */ export declare const COMPAT_SCHEMA_VERSION = "1"; /** Validate that a parsed snapshot has a compatible schema version. */ export declare function isCompatibleSchemaVersion(snapshot: { schemaVersion?: string; }): boolean; /** Validate the basic structure of a parsed compat snapshot. */ export declare function validateSnapshot(data: unknown): data is CompatSnapshot; //#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. */ export 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. */ export 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. */ export 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. */ export 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. */ export 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. */ export declare function filterSurface(surface: ApiSurface, allowedNames: Set, opts?: { fieldPaths?: Set; methodPaths?: Set; enumValues?: Map>; }): ApiSurface; //#endregion //#region src/compat/concepts.d.ts /** A conceptual change with per-language severity. */ interface ConceptualChange { /** Deterministic ID from symbol + category + match details. */ id: string; /** IR-level symbol path (language-neutral). */ symbol: string; /** The kind of change. */ category: CompatChangeCategory; /** Per-language severity mapping. */ impact: Partial>; /** Human-readable description (from first language that reported it). */ message: string; /** Old state details. */ old: Record; /** New state details. */ new: Record; } /** Cross-language conceptual rollup. */ interface ConceptualRollup { conceptualChanges: ConceptualChange[]; } /** * Group classified changes from multiple languages into conceptual changes. * * Changes are grouped by their `conceptualChangeId` — a deterministic ID * derived from the symbol, category, and match details. Changes with the * same ID across different languages represent the same conceptual change. */ export declare function buildConceptualRollup(perLanguageResults: Array<{ diff: CompatDiffResult; language: LanguageId; }>): ConceptualRollup; /** Get the highest severity across all languages for a conceptual change. */ export declare function highestSeverity(change: ConceptualChange): CompatChangeSeverity; /** Count conceptual changes by highest severity. */ export declare function summarizeConceptualChanges(rollup: ConceptualRollup): { breaking: number; softRisk: number; additive: number; }; //#endregion //#region src/compat/report.d.ts /** Machine-readable compat report for a single language. */ interface CompatReport { schemaVersion: string; language: string; summary: { breaking: number; softRisk: number; additive: number; }; changes: CompatReportChange[]; } /** A single change entry in the machine-readable report. */ interface CompatReportChange { severity: CompatChangeSeverity; category: CompatChangeCategory; symbol: string; conceptualChangeId: string; provenance: CompatProvenance; old: Record; new: Record; message?: string; /** Spec-level remediation hint when a recognized upstream pattern was detected. */ remediation?: string; } /** Generate a machine-readable compat report from a diff result. */ export declare function generateReport(diff: CompatDiffResult, language?: string): CompatReport; /** Generate a human-readable summary string for terminal output. */ export declare function formatHumanSummary(diff: CompatDiffResult, opts?: { explain?: boolean; language?: string; }): string; /** Conceptual cross-language report. */ interface ConceptualReport { conceptualChanges: { id: string; symbol: string; category: CompatChangeCategory; impact: Partial>; }[]; } /** Generate a conceptual cross-language report from multiple per-language results. */ export declare function generateConceptualReport(perLanguageResults: Array<{ diff: CompatDiffResult; language: LanguageId; }>): ConceptualReport; /** Format a conceptual cross-language summary for terminal output. */ export declare function formatConceptualSummary(perLanguageResults: Array<{ diff: CompatDiffResult; language: LanguageId; }>): string; //#endregion //#region src/compat/approvals.d.ts /** Result of matching a change against approvals. */ interface ApprovalMatch { /** The change that was matched. */ change: ClassifiedChange; /** The approval that matched. null if no approval covers this change. */ approval: CompatApproval | null; /** Whether the change is covered by an approval. */ approved: boolean; } /** Result of validating an approval for broadness. */ interface ApprovalValidation { valid: boolean; errors: string[]; } /** Validate that an approval is narrow enough to be accepted. */ export declare function validateApproval(approval: CompatApproval): ApprovalValidation; /** Validate all approvals in a config. Returns errors keyed by index. */ export declare function validateApprovals(approvals: CompatApproval[]): Map; /** * Match a classified change against a list of approvals. * Returns the first matching approval, or null if none match. */ export declare function matchApproval(change: ClassifiedChange, approvals: CompatApproval[], language: LanguageId): CompatApproval | null; /** * Apply approvals to a list of changes. * Returns matches for every change (approved or not). */ export declare function applyApprovals(changes: ClassifiedChange[], approvals: CompatApproval[], language: LanguageId): ApprovalMatch[]; /** * Filter changes to only those NOT covered by approvals. * These are the remaining unapproved changes that may cause failure. */ export declare function unapprovedChanges(changes: ClassifiedChange[], approvals: CompatApproval[], language: LanguageId): ClassifiedChange[]; //#endregion //#region src/compat/extractor-registry.d.ts export declare function registerExtractor(extractor: Extractor): void; export declare function getExtractor(language: string): Extractor; //#endregion //#region src/compat/overlay.d.ts interface ManifestEntry { operationId: string; sdkResourceProperty: string; sdkMethodName: string; httpMethod: string; path: string; pathParams: string[]; bodyFields: string[]; queryFields: string[]; } export declare function buildOverlayLookup(surface: ApiSurface, manifest?: ManifestEntry[], spec?: ApiSpec, hints?: LanguageHints, options?: { strictModelMatch?: boolean; }): OverlayLookup; /** Check if a classified change is patchable by the overlay loop. */ export declare function isPatchableChange(change: ClassifiedChange): boolean; /** * Patch overlay with classified changes from a failed verification. * Adds explicit name mappings for symbols that were generated with wrong names. * Returns a new OverlayLookup (immutable). */ export declare function patchOverlay(overlay: OverlayLookup, changes: ClassifiedChange[], baseline: ApiSurface): OverlayLookup; //#endregion //#region src/compat/extractors/node.d.ts export declare const nodeExtractor: Extractor; //#endregion //#region src/compat/extractors/php.d.ts /** Default PHP extractor with generic language hints (no SDK-specific bases). */ export declare const phpExtractor: Extractor; //#endregion //#region src/compat/extractors/python.d.ts /** Default Python extractor with generic language hints (no SDK-specific bases). */ export declare const pythonExtractor: Extractor; //#endregion //#region src/compat/extractors/ruby.d.ts export declare const rubyExtractor: Extractor; //#endregion //#region src/compat/extractors/go.d.ts export declare const goExtractor: Extractor; //#endregion //#region src/compat/extractors/rust.d.ts export declare const rustExtractor: Extractor; //#endregion //#region src/compat/extractors/kotlin.d.ts export declare const kotlinExtractor: Extractor; //#endregion //#region src/compat/extractors/dotnet.d.ts /** Default DotNet extractor with generic language hints. */ export declare const dotnetExtractor: Extractor; //#endregion //#region src/compat/extractors/elixir.d.ts export declare const elixirExtractor: Extractor; //#endregion //#region src/compat/extractors/ios.d.ts export declare const iosExtractor: Extractor; //#endregion //#region src/compat/language-hints.d.ts /** * Node/TypeScript language hints — reference implementation. * Extracted from the hardcoded logic previously in differ.ts and overlay.ts. */ export declare const nodeHints: LanguageHints; /** * Merge partial language hint overrides over nodeHints defaults. * Any hint not provided falls back to the Node/TypeScript implementation. */ export declare function resolveHints(overrides: Partial): LanguageHints; //#endregion export { ALL_LANGUAGE_IDS, type Addition, type AdditiveChangeCategory, type ApiClass, type ApiEnum, type ApiField, type ApiInterface, type ApiMethod, type ApiParam, type ApiProperty, type ApiSurface, type ApiTypeAlias, type ApprovalMatch, type ApprovalValidation, type BreakingChangeCategory, type ClassificationResult, type ClassifiedChange, type CompatApproval, type CompatChangeCategory, type CompatChangeSeverity, type CompatConfig, type CompatDiffResult, type CompatFailLevel, type CompatParameter, type CompatPassingStyle, type CompatPolicyHints, type CompatProvenance, type CompatReport, type CompatReportChange, type CompatSnapshot, type CompatSourceKind, type CompatStability, type CompatSymbol, type CompatSymbolKind, type CompatTypeRef, type CompatVisibility, type ConceptualChange, type ConceptualReport, type ConceptualRollup, type DiffResult, type Extractor, type LanguageHints, type LanguageId, type MethodOverlay, type OverlayLookup, type ParameterSensitivity, type SoftRiskChangeCategory, type Violation, type ViolationCategory, type ViolationSeverity, apiSurfaceToSnapshot, classifyAddedSymbol, classifySymbolChanges, defaultSeverityForCategory, diffSnapshots, diffSurfaces, getDefaultPolicy, mergePolicy, severityMeetsThreshold, summarizeChanges }; //# sourceMappingURL=index.d.mts.map