/** Which extraction pass produced an atom — see * `src/distill/prompts/extract.ts`'s `SourcedAtom`/`AtomExtractionSource` * for where this tag is assigned (never part of the LLM's own JSON * contract). */ export type AtomExtractionSource = 'passA' | 'passB'; /** Distinguishes the two ways a passB atom can fail this gate — never * silent, always one of these two structured reasons (AC-1). */ export type EvidenceGateDropReason = 'no-evidence-field' | 'evidence-not-found'; export interface EvidenceGateCheckResult { admitted: boolean; reason: EvidenceGateDropReason | null; /** * FEAT-552 sub-scope C (AC-C2): which tier admitted a passB atom's quote * — `'exact'` (whitespace-normalized substring, unchanged FEAT-551 * behavior) or `'fuzzy'` (token-window >=90% overlap fallback, new this * FEAT). `null` for every non-admitted-via-quote case: pass-A atoms / * untagged atoms (the bypass never even checks a quote), and any dropped * atom (`no-evidence-field` | `evidence-not-found`). */ matchTier: 'exact' | 'fuzzy' | null; } /** * Decide whether one atom may reach stage-8's `insertWithCreateEvent`. * * - Pass-A atoms (or any atom with no `extractionSource` tag — e.g. a * single-pass run) are ALWAYS admitted here (AC-2). Callers still gate the * call itself on `evidenceGateEnabled` (see module doc comment) so the * bypass is total, not just "this function happens to always say yes." * - A passB atom with no non-empty `evidence` field is dropped — * `no-evidence-field`. * - A passB atom whose `evidence` field does not verify (whitespace- * normalized) against `transcriptText` is dropped — `evidence-not-found`. * A missing/empty `transcriptText` is treated the same as "not found" — * there is nothing to verify against, so the atom cannot be trusted. */ export declare function checkEvidenceGate(atom: { evidence?: string | null; extractionSource?: AtomExtractionSource; }, transcriptText: string | null | undefined): EvidenceGateCheckResult;