/** * MCP handler: certify_public_surface (change: add-public-api-surface-contract). * * Two conclusion modes over a package/module's exported public surface: * - No base ref → return the PUBLIC SURFACE: the exported symbols and their signatures. * - A base ref → return the BREAKING-CHANGE VERDICT for the current diff: each changed * public symbol classified `breaking | non-breaking | potentially-breaking`, each * breaking one paired with the in-repo consumers it breaks, plus an overall summary. * * Deterministic, no LLM, no type checker, no build. Conservative by construction: a * change that cannot be proven compatible from the available signatures is * `potentially-breaking`, never silently `non-breaking`. Renamed exports are reported * as renames (not remove+add) via the symbol-identity continuity map (change: * add-symbol-identity-continuity). External/unindexed consumers are disclosed as a * known-unknowable boundary rather than implied to be absent. */ import { type SurfaceChange, type ChangeClass } from '../../analyzer/public-surface.js'; export interface CertifyPublicSurfaceInput { directory: string; /** Diff the working tree's public surface against this ref. Omit to return the surface itself. */ baseRef?: string; /** Cap the surface listing (surface mode). */ maxResults?: number; /** * Certification is fatal on an unresolvable base by default: a verdict computed * against a base the caller did not ask for is not a certificate. Set this to accept * the disclosed main → master → HEAD~1 fallback instead (fix-cli-conclusion-honesty). */ allowBaseFallback?: boolean; } interface Consumer { id: string; name: string; file: string; } interface EdgeStoreLike { getCallers(nodeId: string): Array<{ callerId: string; calleeName?: string; }>; } /** * The pure breaking-change core: classify the public-surface delta between two sets of * file contents. No git, no readCachedContext, no clock — git I/O and the * confidence-boundary live in `diffSurface`. Exposed so the classification can be * unit-tested in CI from in-memory contents with a stub edge store. Deterministic. */ export declare function assembleSurfaceDiff(baseFiles: Array<{ path: string; content: string; language: string; }>, headFiles: Array<{ path: string; content: string; language: string; }>, headPathOf: Map, edgeStore?: EdgeStoreLike): Promise<{ overall: ChangeClass; summary: { breaking: number; potentiallyBreaking: number; nonBreaking: number; }; changes: SurfaceChange[]; breaking: Array; soundness: { posture: string; languages: string; }; extraCrossings: Array<{ kind: 'unindexed-repo'; count: number; detail: string; }>; }>; export declare function computeCertifyPublicSurface(input: CertifyPublicSurfaceInput): Promise; export declare function handleCertifyPublicSurface(input: CertifyPublicSurfaceInput): Promise; export {}; //# sourceMappingURL=public-surface.d.ts.map