export interface HallucinationInput { /** The assistant's final text for this iteration. */ text: string; /** Tool names declared in the loop's input.tools[]. When provided we * use them to tighten matching: a narrated call like "I will call * native_foo" only counts if `native_foo` is in our actual tool * surface. Empty array = skip the cross-check (treat any native_* * name as a candidate). */ toolNames?: ReadonlyArray; /** How many real tool calls the LLM emitted this iteration. We flag * only when 0 — if the model emitted even one real call we trust the * narration was framing a follow-up. */ emittedToolCallCount: number; } export interface HallucinationVerdict { /** True iff the text narrates a tool call but no real calls happened. */ hallucinated: boolean; /** The matched substring (≤120 chars, single-line) for audit / debug. */ evidence?: string; /** Which pattern fired — useful for tuning + analytics. */ pattern?: 'zh:invoke-narration' | 'zh:promise-no-action' | 'en:invoke-narration' | 'zh:direct-write-block'; } /** * Read the kill-switch env. Default ON. * Recognized OFF values: 'off' / '0' / 'false' / 'no' / 'disable'. */ export declare function isHallucinationDetectorOn(): boolean; /** * Decide whether the text narrates a tool call that never actually * happened. Pure function; no I/O. */ export declare function detectHallucinatedToolCall(input: HallucinationInput): HallucinationVerdict; //# sourceMappingURL=hallucination-detector.d.ts.map