/** * Tier 2 — offline drift check (§2.2). * * The adapters had drifted in fifteen places across two vendors and nothing * noticed. The defect was never a missing doc-fetcher; it was a missing * *signal*. This module is that signal: diff what the vendors document against * what {@link declaredVocabulary} says we understand, and report the gap. * * Two properties are non-negotiable, both inherited from Tier 0: * * - **Nothing here runs at runtime.** The fetch happens in a CI job (see * `scripts/plugin-drift-check.ts`). The network informs a human's decision to * edit an adapter; it never informs a parse. That is the same rule * `AGENTS.md` sets for `models.generated.ts`. * - **A failed fetch is not a clean report.** Offline must be distinguishable * from "no drift", or the check quietly stops checking the day the docs move * behind a redirect. * * The extraction is deliberately conservative. Manifest keys come from JSON code * fences — actual manifest examples, not prose — because a regex over English * finds every word that happens to be backticked. Paths come from backticked * path-shaped tokens, which is noisier, so path findings are leads for a human * to confirm rather than assertions. A drift report nobody trusts gets muted, * and a muted report is worse than none. */ export interface DriftSource { label: string; url: string; /** Page text, or undefined when it could not be fetched. */ text?: string; error?: string; } export interface DriftFinding { kind: "manifest-key" | "path"; value: string; /** Which reference page it was seen in. */ source: string; } export interface DriftReport { /** True only when every source was fetched *and* nothing new was found. */ clean: boolean; /** Sources that could not be fetched. Non-empty means the report is incomplete. */ unreachable: Array<{ label: string; error: string; }>; findings: DriftFinding[]; checkedSources: string[]; } /** Top-level keys of every JSON object in a fenced ```json block. */ export declare function manifestKeysIn(markdown: string): Set; /** * Backticked tokens that look like a **plugin-relative** file or directory path. * * Tight on purpose. The first cut of this accepted anything path-shaped and * produced twenty findings against the live Claude reference, of which none were * real drift: MCP method names (`roots/list`), repo slugs * (`anthropics/claude-plugins-community`), workspace paths (`.claude/settings.json`), * bare extensions (`.zip`), and example scripts. A drift report with that * signal-to-noise ratio gets muted, and a muted report is worse than none — so * the filter errs toward missing a real surface rather than crying wolf, and the * manifest-key half (which reads parsed JSON, not prose) carries the precision. */ export declare function pathsIn(markdown: string): Set; /** * Diff the fetched references against the declared vocabulary. * * Everything already declared — modelled, read, or knowingly unsupported — is * filtered out, so what remains answers one question: *is the vendor documenting * something we have never heard of?* */ export declare function analyzeDrift(sources: readonly DriftSource[]): DriftReport; /** Render a report for a CI log or a human-opened issue. */ export declare function formatDriftReport(report: DriftReport): string; //# sourceMappingURL=drift.d.ts.map