/** * A behaviour hint that its own tool's description contradicts. * * A pin, a lock or a fingerprint answers "did the server change its story since it was approved?". None of them can * answer "was the story true on the day it was approved?". Code and calls answer that; one part of it is visible in * the definition itself: a tool that says `readOnlyHint: true` while its description says it deletes, or * `destructiveHint: false` while its description says it replaces the current set. A reader on dev.to pointed at two * real cases (2026-11-20): GitHub's MCP server `update_issue_labels` (destructiveHint false; description: "This * replaces the current labels with the provided list") and the Kubernetes server's `pods_run` (destructiveHint false; * the code force-applies a Service). This module catches the first kind only: when the code, not the text, is what * contradicts the hint, nothing here sees it. * * It reads English descriptions, sentence by sentence, and only where the tool is the subject of the verb: a sentence * that starts with the verb ("Deletes the file.", "Delete a file") or says "this tool deletes …". "List deleted * files" or "Does not delete" do not match. It marks; it never approves, refuses or rewrites a hint: the finding is * advisory, and an operator's own label (flow policy `labels`) is the way to act on it. * * On HISTOR's 2026-11-16 snapshot (468,359 tools with an explicit claim on 26,808 servers) it marks 307 tools that say * readOnlyHint true (204 servers) and 960 that say destructiveHint false (593 servers); in a hand-labelled sample of 50 * each, 40 and 45 were real contradictions. Recall was not measured. */ import type { ToolDef, WardenFinding } from "./types.js"; export type HintClaim = "readOnlyHint=true" | "destructiveHint=false"; export interface HintContradiction { tool: string; claim: HintClaim; /** What the description says the tool does, as matched: "deletes", "replaces the current …", "cannot be undone". */ says: string; /** The sentence it was read in, shortened to 160 characters for the message. */ quote: string; /** The words that matched, in lower case: "deletes", "replaces the current", "cannot be undone". */ phrase: string; /** The whole sentence they were read in (control characters escaped; cut only past 1,000 characters). */ sentence: string; } /** Every contradiction between a tool's hints and its own description. Empty when the tool makes no such claim. */ export declare function hintContradictions(tool: Pick): HintContradiction[]; /** Scan findings: advisory, so they never block and never cost a tool at any `blockAtSeverity`. */ export declare function hintContradictionFindings(tools: readonly ToolDef[]): WardenFinding[]; //# sourceMappingURL=hint-claims.d.ts.map