import { On as CompatPolicyHints, an as ApiSurface, dn as OverlayLookup, fn as Violation, n as OperationNaming, p as ApiSpec, r as OperationResolution, t as OperationHint } from "../operation-hints-DzxFffcr.mjs"; import { t as CompatDiffResult } from "../differ-BXEduOoB.mjs"; //#region src/verify/types.d.ts interface VerifyDiagnostics { compatCheck?: { totalBaselineSymbols: number; preservedSymbols: number; preservationScore: number; violationsByCategory: Record; violationsBySeverity: Record; additions: number; scopedToSpec: boolean; scopedSymbolCount?: number; }; stalenessCheck?: { staleSymbolCount: number; staleSymbols: string[]; }; smokeCheck?: { passed: boolean; findingsCount?: number; compileErrors?: boolean; }; retryLoop?: { attempts: number; converged: boolean; finalScore: number; patchedPerIteration: number[]; }; } interface CompatCheckResult { passed: boolean; diff: CompatDiffResult; scopedToSpec: boolean; scopedSymbolCount?: number; } interface OverlayRetryResult { status: 'passed' | 'max-retries' | 'no-patchable' | 'stalled'; attempts: number; patchedPerIteration: number[]; compatResult: CompatCheckResult; } interface SmokeCheckResult { passed: boolean; findingsCount?: number; compileErrors?: boolean; baselinePath: string; generatedBaseline: boolean; } interface StalenessCheckResult { violations: Violation[]; } //#endregion //#region src/verify/run-compat-check.d.ts /** * Extract the generated SDK in `outputDir` and diff it against `baseline`. * * With a `spec`, the baseline is scoped to the symbols the spec derives * (`specDerivedNames`, `specDerivedMethodPaths`, `filterSurface`), read as * `generate` writes them under the `resolution`'s `mountRules`, * `operationHints` and `operationNaming` — the settings `generate` resolved * the SDK's operations with. Under `mountRules: { Pets: 'Animals' }` the * `Animals` class is in scope with the methods its operations resolve to, so * a method the SDK lost from it is reported removed; read from the IR as * parsed, `Animals` was no name the spec derived and the loss passed. With * the `overlay` `generate --api-surface` writes with (see * {@link manifestOverlay}; the retry loop passes the one it patches), a * baseline method the overlay maps to one of the spec's operations stays in * scope under its own name, so an SDK that renamed `Animals.fetchAll` is * reported and the retry can restore it. */ export declare function runCompatCheck(baseline: ApiSurface, outputDir: string, lang: string, spec?: ApiSpec, policyOverrides?: Partial, resolution?: OperationResolution, overlay?: Pick): Promise; //#endregion //#region src/verify/run-overlay-retry-loop.d.ts export declare function runOverlayRetryLoop(opts: { baseline: ApiSurface; parsedSpec: ApiSpec; outputDir: string; lang: string; maxRetries: number; namespace?: string; operationHints?: Record; mountRules?: Record; operationNaming?: OperationNaming; modelHints?: Record; emitterOptions?: Record; onRetry?: (attemptNumber: number, maxRetries: number, patchableCount: number) => void; }): Promise; //#endregion //#region src/verify/run-staleness-check.d.ts /** * Find the symbols of `baseline` the old spec derived and the new spec no * longer does (`detectStaleSymbols`), both read as `generate` writes them * under the `resolution`'s `mountRules`, `operationHints` and * `operationNaming`, so a remounted service and its methods are found stale * on the class `generate` wrote them to, and under the `overlay` `generate * --api-surface` wrote with (see `manifestOverlay`), so a baseline method the * manifest maps to a dropped operation is found stale under its own name. */ export declare function runStalenessCheck(baseline: ApiSurface, oldSpec: ApiSpec, newSpec: ApiSpec, lang: string, resolution?: OperationResolution, overlay?: Pick): StalenessCheckResult; //#endregion //#region src/verify/run-smoke-check.d.ts /** * Run the smoke step: the spec-only baseline when no raw baseline exists, * then the runner (and its diff) against the baseline. * * The smoke scripts run as subprocesses and take `--spec`, which a script * parses bare — without the config's settings, which cannot cross a process * boundary. `parsedSpec` is what `--spec` parses to with those settings, as * `generate` parses it; it is written to a file for the scripts' lifetime * and handed to both as `--ir ` beside `--spec`, so the baseline lists * the operations `generate` reads (`Pets.list` under an `operationIdTransform` * that strips `PetsController_`, no `Pets.get` under a `transformSpec` that * drops `/pets/{id}`) and a runner that reads the file plans the same ones * (#567). Without `parsedSpec`, each script parses `--spec` as before. */ export declare function runSmokeCheck(opts: { spec?: string; /** What `--spec` parses to with the config's settings (see above). */ parsedSpec?: ApiSpec; lang: string; output: string; rawResults?: string; smokeConfig?: string; smokeRunner?: string; }): SmokeCheckResult; //#endregion export type { VerifyDiagnostics }; //# sourceMappingURL=index.d.mts.map