/** What the platform does with a term, per the vendor's own documentation. */ export type TermStatus = "available" | "withheld" | "conditional"; /** One word of a harness's vocabulary, with what the platform does with it. */ export interface VocabularyTerm { readonly name: string; readonly status: TermStatus; /** * The vendor's stated condition, near-verbatim. REQUIRED when `status` is * `"conditional"` — a condition we cannot quote is a condition we cannot * report, and reporting it is the whole point of the status. */ readonly condition?: string; /** * The current name this term is a still-working deprecated alias of (e.g. * `Task` → `Agent`, renamed in Claude Code 2.1.63). An alias is NOT a defect: * the platform keeps honouring it. */ readonly aliasOf?: string; } /** A named set of platform terms, tagged with where and when it was captured. */ export interface HarnessVocabulary { /** Which vocabulary this is — used in messages, so it must read as English. */ readonly kind: string; /** * The exact vendor artifact + version this catalog was read from, e.g. * `"code.claude.com/docs/en/hooks § Hook events (claude-code 2.1.233)"`. * Printed with every `unrecognised` advisory, so our staleness is visible to * the person who hit it rather than only to us. */ readonly capturedFrom: string; readonly terms: readonly VocabularyTerm[]; } /** * What the catalog says about one name. Total — there is no absent answer, and * deliberately no near-match on the `unrecognised` branch (see the module note: * a distance in scope at the decision point is what produced the bugs). */ export type TermVerdict = { readonly kind: "available"; readonly term: VocabularyTerm; } | { readonly kind: "withheld"; readonly term: VocabularyTerm; } | { readonly kind: "conditional"; readonly term: VocabularyTerm; } | { readonly kind: "unrecognised"; readonly name: string; }; /** How much weight a finding carries — the ONLY input to whether it is scored. */ export type IssueSeverity = /** A defect in the audited repo. Enters the grade. */ "scored" /** True but not actionable, or a statement about vigiles. Never scored. */ | "advisory"; /** Look the name up. Total: always one of the four verdicts, never null. */ export declare function classify(vocab: HarnessVocabulary, name: string): TermVerdict; /** * Closest catalog name within edit distance 2, else null — a MESSAGE decoration * only. Never call this to decide whether to report something; the verdict has * already decided that. The ≤2 bound stays tight for the reason it always was: * a loose bound mis-suggests (`TaskGet → Task?` is a different real tool, not a * typo). Only `available` terms are offered — suggesting a name the platform * withholds would trade one dead reference for another. */ export declare function suggest(vocab: HarnessVocabulary, name: string): string | null; /** A vocabulary finding: the message to show and whether it counts. */ export interface TermIssue { /** Which verdict produced this — the input to every downstream policy. */ readonly verdict: TermVerdict["kind"]; readonly severity: IssueSeverity; readonly message: string; /** Near-match for the message only; null unless the term is unrecognised. */ readonly suggestion: string | null; /** * The vendor condition, present only for a `conditional` verdict. Carried so a * report can GROUP the tools that share one condition instead of repeating the * same sentence per tool — a delegating subagent legitimately declares eight of * them, and eight identical paragraphs is noise from a tool that sells itself * on not crying wolf. */ readonly condition?: string; } /** * Turn a verdict into the finding to report, or null when there is nothing to * say. The severity is decided HERE, once, from the verdict — callers never * invent their own policy, which is what let `scan` and `lint` drift apart from * `compileAgent` before. * * `noun` names the thing in the message ("hook event" / "tool"); `subject` * describes what listing it does, e.g. "a hook here never fires". */ export declare function termIssue(vocab: HarnessVocabulary, verdict: TermVerdict, noun: string, deadConsequence: string): TermIssue | null; /** * The issues that count toward a grade. Replaces the per-check * `confidentToolIssues` / `confidentHookEventIssues` helpers, which asked "is * there a near match?" — a question about spelling, answered by a helper each * caller had to remember to apply and which `compileAgent` did not, so `scan`, * `lint` and authoring could disagree about which issues were real. Severity now * travels ON the issue, decided once in {@link termIssue}, so the split is the * same wherever it is taken. */ export declare function scoredIssues(issues: readonly T[]): T[]; /** * The issues that are surfaced but never scored — `conditional` tools and any * name newer than our capture. Kept out of the grade on purpose: vigiles's own * staleness must not cost someone a letter. */ export declare function advisoryIssues(issues: readonly T[]): T[]; /** * The issues an AUTHORING path treats as errors — everything except * `conditional`. Authoring is a CLOSED world: you are writing this spec now, * against the vigiles you have, so an unrecognised name is a typo worth stopping * for. Auditing is an OPEN world: someone else wrote the file, possibly against * a newer platform, so there the same verdict is only an advisory. * * `conditional` is an error in NEITHER. The tool is real and declaring it is * correct; erroring on it is exactly what told delegating subagents to drop * `Agent`, and what made `tools: Agent, Read, Bash` — a worked example in the * vendor's own docs — fail to compile. */ export declare function authoringIssues(issues: readonly T[]): T[]; /** * Build a vocabulary from a dialect that predates this module — `available` from * its built-in catalog, `withheld` from its never-available list. A dialect on * the legacy shape keeps working and its unknowns become `unrecognised` * ADVISORIES rather than silence, which is the honest reading: a catalog with no * recorded capture cannot claim a name is invalid. */ export declare function vocabularyFromLists(kind: string, capturedFrom: string, available: readonly string[], withheld?: readonly string[]): HarnessVocabulary; //# sourceMappingURL=vocabulary.d.ts.map