import type { EscalationSignal } from '../types/escalation.types.js'; import type { LLMCompletionOptions, LLMProvider } from '../types/llm.types.js'; /** * Minimal shape this service needs from EscalationDetectionService — kept narrow so * tests can pass a lightweight fake instead of constructing the real singleton. */ export interface EscalationSignalDetector { parseResponse(content: string): { signal: EscalationSignal | null; }; shouldTriggerEscalation(signal: EscalationSignal | null): boolean; } export interface SelfConsistencyResult { /** Fraction of successfully-parsed samples that agreed with the original's escalation verdict. */ agreementRatio: number; /** * True when the original's "no escalation needed" self-report should not be trusted — * either a majority of independent samples disagreed, or none could be parsed at all * (an inconclusive check fails closed rather than silently trusting the original). */ disagrees: boolean; } /** * Independently checks a borderline confidence report by re-asking the model the same * question additional times and seeing whether it reaches the same escalation verdict. * This is the one place in the escalation pipeline that verifies the model's self-report * against something other than the model's own words. */ export declare class SelfConsistencySamplerService { checkAgreement(provider: LLMProvider, completionOptions: LLMCompletionOptions, originalSignal: EscalationSignal, detectionService: EscalationSignalDetector, sampleCount: number): Promise; } export declare function getSelfConsistencySamplerService(): SelfConsistencySamplerService; export declare function resetSelfConsistencySamplerService(): void; //# sourceMappingURL=self-consistency-sampler.service.d.ts.map