/** * HITL (Human-in-the-Loop) Gate * * Determines when to pause tool execution for user confirmation * based on threat severity. Only CRITICAL threats trigger elicitation. * Extended for worm risks >0.8 (v0.18.0). * * Design: * - HIGH/MEDIUM/LOW threats → silent sanitization (business as usual) * - CRITICAL threats or worm_risk >0.8 → pause execution, user confirmation required * * Security model: Sanitization is the security gate. HITL is UX. * Content is ALWAYS sanitized before reaching the LLM, whether or not * the user accepts the elicitation prompt. */ import type { ThreatReport } from './threat-reporter.js'; /** * Determines whether to trigger HITL elicitation * * Returns true ONLY when: * - threatReport is not null and has CRITICAL severity, OR * - wormRisk > 0.8 * * @param threatReport The threat report from sanitization * @param wormRisk Worm detection risk score (default 0) * @returns true if elicitation should be triggered */ export declare function shouldElicit(threatReport: ThreatReport | null, wormRisk?: number): boolean; /** * Builds a user-facing elicitation message for CRITICAL threats or high worm risks * * Format enhanced for worm risks. * * @param threatReport The threat report with CRITICAL severity * @param url The source URL * @param wormRisk Worm risk score * @returns A clear, concise message under 300 characters */ export declare function buildElicitMessage(threatReport: ThreatReport, url: string, wormRisk?: number): string; /** * Elicitation schema for user confirmation * * CRITICAL: Must be flat primitive properties only (no nested objects, no arrays) * per MCP elicitation specification. */ export declare const ElicitSchema: { readonly type: "object"; readonly properties: { readonly proceed: { readonly type: "boolean"; readonly title: "Proceed with sanitized content"; readonly description: "Content has been cleaned. View sanitized version?"; }; readonly view_report: { readonly type: "boolean"; readonly title: "Include threat report in response"; readonly description: "Attach the full NIST/OWASP/MITRE threat report?"; }; }; readonly required: readonly ["proceed"]; }; //# sourceMappingURL=hitl-gate.d.ts.map