import type { ImplementationFact } from "../adapters/types.js"; import type { ModelGraph } from "../loader/model-graph.js"; import { type ReadRepoFile } from "./delegation.js"; import type { Violation } from "./types.js"; /** * "This loop says it is driven by a timer — is there still a timer where it * points?" * * THE GAP THIS CLOSES. File-existence and name-presence both pass on the * classic god-file split: the entry point stays, the `setInterval` moves to a * new service, the model keeps pointing at a one-line wrapper. Nothing in the * anchor tiers can see that, because nothing about the anchor changed — what * changed is that the behaviour left. The only evidence available is the * adapter's extracted facts, so this check lives with them (reconcile), not in * T0. * * OPT-IN, AND THAT IS THE DESIGN, NOT A COMPROMISE. `mechanism` is absent on * every existing node in every existing model, and an absent declaration is * checked against nothing. A model adopts this one batch at a time, on loops * whose anchors someone has actually looked at. Turning it on globally would * mean grading 39 paper loops against facts they never claimed to have, and a * check that opens with dozens of warnings is a check nobody reads again. * * NO SUPPRESSION FLAG. There is deliberately no `delegated: true` / * `skip: true` escape hatch: an opt-out that turns a warning green on request * rebuilds the exact false-green this whole change is about. If a warning here * is wrong, the fix is a better anchor (or one fewer mechanism claim), not a * mute button. */ /** Mechanism vocabulary a Loop may declare. Matched against adapter fact kinds by word. */ export declare const MECHANISMS: readonly ["poller", "queue"]; export type Mechanism = (typeof MECHANISMS)[number]; export interface MechanismCheckOptions { /** Reads a repo-relative file; used to follow one delegation hop. */ readFile: ReadRepoFile; /** Follow one hop through a delegating wrapper. Default true. */ followDelegation?: boolean | undefined; } /** * Advisory warnings for loops whose declared mechanism is not backed by any * fact in the files they anchor (after following at most one delegation hop). */ export declare function checkLoopMechanism(graph: ModelGraph, facts: readonly ImplementationFact[], options: MechanismCheckOptions): Violation[]; //# sourceMappingURL=mechanism.d.ts.map