import { $t as ApiEnum, An as mergePolicy, Bt as AdditiveChangeCategory, Cn as CompatVisibility, Dn as ALL_LANGUAGE_IDS, En as apiSurfaceToSnapshot, Gt as CompatConfig, Ht as CompatApproval, Jt as SoftRiskChangeCategory, Kt as CompatFailLevel, On as CompatPolicyHints, Qt as ApiClass, Sn as CompatTypeRef, Tn as ParameterSensitivity, Ut as CompatChangeCategory, Vt as BreakingChangeCategory, Wt as CompatChangeSeverity, Xt as severityMeetsThreshold, Yt as defaultSeverityForCategory, Zt as Addition, _n as CompatSnapshot, an as ApiSurface, bn as CompatSymbol, cn as Extractor, dn as OverlayLookup, en as ApiField, fn as Violation, gn as CompatPassingStyle, hn as CompatParameter, in as ApiProperty, kn as getDefaultPolicy, ln as LanguageHints, mn as ViolationSeverity, nn as ApiMethod, on as ApiTypeAlias, p as ApiSpec, pn as ViolationCategory, qt as CompatProvenance, r as OperationResolution, rn as ApiParam, sn as DiffResult, tn as ApiInterface, un as MethodOverlay, vn as CompatSourceKind, wn as LanguageId, xn as CompatSymbolKind, yn as CompatStability } from "../operation-hints-DzxFffcr.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-BXEduOoB.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. * * A service class is named as `generate` writes it: by the mount target * (`ResolvedOperation.mountOn`) each operation resolves to under the * `resolution`'s `mountRules`, `operationHints` and `operationNaming` — the * settings `generate` resolves with — not by the IR's `Service.name`. Under * `mountRules: { Pets: 'Animals' }` the names hold `Animals`, never `Pets`, * which `generate` does not write; an operation a `mountOn` hint moves to * another service names that service. With no `resolution`, the operations * resolve as `generate` does with no config, so every service keeps its own * name. Models, enums and the types the operations reach are collected from * the IR as before. */ export declare function specDerivedNames(spec: ApiSpec, hints: LanguageHints, resolution?: OperationResolution): 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., "Animals.list_all") the OpenAPI * spec's operations resolve to. Used by filterSurface to exclude hand-written * SDK methods that don't correspond to spec operations, and by the staleness * check to find methods the spec no longer names. * * Each operation is keyed as `generate` writes it, under the `resolution`'s * `operationHints`, `mountRules` and `operationNaming` (with none, as * `generate` resolves with no config): the mount target and the resolved * method name (`Animals.list_all` under `mountRules: { Pets: 'Animals' }` and * `operationHints: { 'GET /pets': { name: 'list_all' } }`; `Pets.get_pet` * for `GET /pets/{id}` with no settings), each split wrapper's name on that * target (`Pets.create_cat` for a `split` hint on `POST /pets`), and the IR's * operation name on that target (`Animals.list`, `Pets.get`) — the key the * scope read before, kept so an SDK whose methods carry the operationIds under * path naming stays in scope. The method part is spelled as the resolution * spells it (snake_case) and matched with underscores stripped and case folded * (see {@link normalizeMemberName}), so a Node `getPet`, a Ruby `get_pet` and a * .NET `GetPet` all read `Pets.get_pet`. * * With an `overlay` — the one `generate --api-surface` writes with, built by * `buildOverlayLookup` from the baseline and the `.oagen-manifest.json` in the * output directory — the paths also hold every baseline method the overlay * maps to one of the spec's operations (`methodByOperation`: `GET /pets` → * `Animals.fetchAll`), spelled as the baseline spells it: `generate` writes * that name rather than the resolved one, so without it `filterSurface` * dropped the method and an SDK that renamed it passed. A mapped method whose * route the spec does not declare (`GET /legacy` → `Animals.legacy`) is not * added; the spec derives nothing for it. */ export declare function specDerivedMethodPaths(spec: ApiSpec, resolution?: OperationResolution, overlay?: Pick): 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. A method path's member is matched * with underscores stripped and case folded (see {@link normalizeMemberName}), * so the snake_case names `specDerivedMethodPaths` resolves read a method in * any language's casing: `Animals.list_all` keeps a Node `listAll`, a Ruby * `list_all` and a .NET `ListAll`. 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