/** change: add-retrieval-match-evidence */ export declare const LEXICAL_MATCH_FIELDS: readonly ["symbol", "path", "signature", "doc", "body"]; export type LexicalMatchField = (typeof LEXICAL_MATCH_FIELDS)[number]; export type MatchField = LexicalMatchField | 'vector'; export type RetrievalTier = 1 | 2 | 3; export interface MatchEvidence { field: MatchField; terms: string[]; tier: RetrievalTier; } export type SearchableFields = Partial>; export type FieldTermFrequencies = Partial>>; export declare function vectorMatchEvidence(tier: 2 | 3): MatchEvidence; /** Fail closed if a retriever violates the additive evidence contract. */ export declare function requireMatchEvidence(evidence: MatchEvidence | undefined): MatchEvidence; /** * How well the retrieval covers the question asked. * * `covered` — at least one result matched the caller's own terms, or matched on a * field that names the thing. * `weak` — results exist, but every one rests on incidental evidence: body text, a * vocabulary expansion the caller never typed, or vector proximity alone. * `uncovered` — nothing matched at all. */ export type CoverageVerdict = 'covered' | 'weak' | 'uncovered'; /** * Fold the evidence already attached to each result into a coverage verdict. * * Derived, not tuned: no relevance threshold, no score, no configuration. Two runs * over the same index cannot disagree, and no repository needs calibrating. A * ranked list of incidental matches is shaped exactly like an answer, which is how * an agent acts on three confidently-ranked symbols that have nothing to do with * the question (spec `mcp-quality` NoFalseCoverage). */ export declare function coverageVerdict(evidence: readonly MatchEvidence[]): CoverageVerdict; /** * The kinds of question the substrate can be asked. Closed on purpose: a caller * told "not covered" needs to know WHICH question went unanswered, and an * open-ended label would drift into free-text intent guessing. */ export declare const QUESTION_KINDS: readonly ["where-is", "who-calls", "what-gates", "what-order", "is-it-tested", "why-decided"]; export type QuestionKind = (typeof QUESTION_KINDS)[number]; /** * The tool that answers each kind, or `null` where the product does not answer it * yet. `what-gates` is deliberately null: a caller asking what makes a piece of * interface appear is told the question is not served, instead of being handed a * ranked list of components (see change `add-render-guard-index`). */ export declare const QUESTION_KIND_TOOL: Readonly>; export declare function isQuestionKind(value: unknown): value is QuestionKind; /** The disclosure a `weak` or `uncovered` conclusion carries. */ export interface CoverageDisclosure { verdict: CoverageVerdict; questionKind: QuestionKind; /** The tool that answers this kind, when one exists. */ answeredBy?: string; /** Why the caller is seeing this, in one sentence. */ reason: string; } /** * Build the disclosure for a non-`covered` verdict. The wording never implies a * substitute: when no tool answers the kind, it says so. */ export declare function coverageDisclosure(verdict: CoverageVerdict, kind: QuestionKind): CoverageDisclosure; //# sourceMappingURL=retrieval-evidence.d.ts.map