/** * P5a — Release-sync loop (website/docs kept at release level). * * The ask: *"whenever a new publish happens you ensure the website is * updated, kept at the same level, you compare release versions, fix the * gaps"* (plan row 23). After a successful `publish`, this module diffs the * published version against the release-marker strings in the website and * docs — version strings drift from package.json after releases (observed: * `website/index.html` carries a "Current release vX.Y.Z" marker + a * `vX.Y.Z · N tests` badge, `docs/COMMANDS.md` carries a `buff vX.Y.x` * header), and NO post-publish diff existed. * * Deterministic and pure at the core (`findReleaseDrift` — fixture-testable): * each release-marker pattern is matched and compared against the CURRENT * version; a marker that still names an older version is a gap. Historical * "Since v1.60.x" notes are deliberately NOT markers — only the three * release-marker patterns below are checked, so nothing false-positives. * * Best-effort by construction: a missing/unreadable sync target, or an * emission failure, never throws — a sync check failure must never mark the * publish failed (the brief's hard rule). */ import type { ToolContext } from './registry.js'; /** One stale release marker found in a sync target. */ export interface ReleaseDriftGap { /** The file the stale marker lives in (e.g. website/index.html). */ file: string; /** 1-based line number. */ line: number; /** The stale version string found (e.g. v1.73.0). */ found: string; /** What it should be (the published version, e.g. v1.74.0). */ expected: string; /** Which marker pattern flagged it. */ kind: 'current-release' | 'test-count-badge' | 'cli-version-header'; } /** The sync targets scanned after a publish (relative to the workspace root). */ export declare const SYNC_TARGETS: string[]; /** * Pure drift detector — the testable core. Scans one file's text for the * release-marker patterns and returns every marker whose version does NOT * match the current (published) version. Never throws. * * Markers (deliberately narrow — historical notes are not markers): * 1. `Current release vX.Y.Z` → exact version * 2. `vX.Y.Z · N tests` (the arch-tier badge) → exact version * 3. `buff vX.Y.x` (COMMANDS.md header) → major.minor only */ export declare function findReleaseDrift(text: string, file: string, currentVersion: string): ReleaseDriftGap[]; /** * Run the post-publish sync check: scan every sync target under the * workspace root for stale release markers vs the published version. Emits a * structured `release:sync` event (best-effort) so a future GUI card can * render the gaps with an offer-to-fix. Returns a model-feedable summary — * never throws. */ export declare function runReleaseSync(currentVersion: string, ctx: ToolContext): string; //# sourceMappingURL=release-sync.d.ts.map