/** * `chant dev surface-diff ` command implementation. * * Regenerates a lexicon from its spec, validates the result, extracts the * public API surface, and diffs it against the committed baseline snapshot. * * Outputs a human-readable delta to stdout and optionally a machine-readable * JSON result to a file. Never auto-fixes: failures are captured and reported. * * The snapshot file is written to `/surface.snapshot.json`. * Pass `--update-snapshot` to commit the fresh snapshot after a successful run. * * An update run is exempt from the `surface-matches-snapshot` validate check * and from nothing else (#1825): that check fails on the stale baseline the * run exists to replace, and with an `"always"` gate (#1475) the documented * re-baseline flow would deadlock. Any other failing step still refuses the * write, so a broken generate cannot be baselined. */ import { type RegenResult } from "../../codegen/lexicon-regen.js"; export interface SurfaceDiffOptions { /** Resolved path to the lexicon directory. */ lexiconDir: string; /** Force re-fetch of upstream spec (bypass cache). */ force?: boolean; /** Print subprocess output while running. */ verbose?: boolean; /** Skip the bundle step. */ skipBundle?: boolean; /** Skip the build (tsc) step. */ skipBuild?: boolean; /** Skip chant lint on examples. */ skipLint?: boolean; /** Run the example build harness (opt-in; needs cloud creds). */ runExamples?: boolean; /** Path to a SHA-256 digest file pinning the spec. */ pinnedDigestPath?: string; /** After a successful regen, write the fresh snapshot as the new baseline. */ updateSnapshot?: boolean; /** * When re-baselining (`updateSnapshot`), also bump the lexicon's package.json * version by the drift severity so the accepted surface is publishable (#616). */ bump?: boolean; } /** * Run the surface-diff pipeline and return the result. * Logs human-readable output to stderr; machine-readable JSON goes to the caller. */ export declare function runSurfaceDiff(opts: SurfaceDiffOptions): Promise; /** * Print the surface-diff result as human-readable text to stdout. */ export declare function printSurfaceDiffResult(result: RegenResult, json: boolean): void; //# sourceMappingURL=lexicon-surface-diff.d.ts.map