/** * RefusalDetector — pure, synchronous, 0-LLM non-emergency content-policy refusal. * * Classifies prescription / specific-dosing / individualized-treatment-plan requests. * Conservative phrase matching: accept FALSE-NEGATIVES (fall through to 'none'), * NEVER false-positive into giving medical advice. Pattern set is versioned for audit. * * NO async. NO fs. NO network. NO LLM import. Identical input => identical output. */ /** Four mutually-exclusive categories; 'none' means no refusal pattern matched. */ export type RefusalCategory = "prescription" | "specific-dosing" | "individualized-treatment-plan" | "none"; /** Result of a single RefusalDetector.detect() call. */ export interface RefusalMatch { category: RefusalCategory; /** * Rule ID that fired (IDs only — never prompt text). * Undefined when category === 'none'. */ ruleId?: string; } /** Versioned pattern-set identifier recorded in the audit log. */ export declare const REFUSAL_PATTERNSET_VERSION = "refusal-2026.06.17"; /** * Fixed canned reason strings per refusal category. * Exported so callers can assert byte-equality (proving non-model-generation). */ export declare const REFUSAL_REASONS: Record, string>; /** * Detects non-emergency content-policy refusal phrases in a medical prompt. * * PURE + SYNCHRONOUS. No async, no fs, no network, no LLM import. * Identical input => identical RefusalMatch output. * * bober: conservative phrase matching; novel or indirect phrasing may return * 'none' and fall through to normal SOP handling (accepted risk; false-negative * is safer than false-positive into refused advice). */ export declare class RefusalDetector { readonly patternsetVersion = "refusal-2026.06.17"; /** * Returns the first matching RefusalMatch, or { category: 'none' } if no * rule fires. Evaluation order is prescription → specific-dosing → treatment-plan. */ detect(prompt: string): RefusalMatch; } //# sourceMappingURL=refusal.d.ts.map