/** * Worm Detector for Morris II-style self-replicating prompts * * Detects replication commands, role hijacks, and obfuscations in post-sanitized content. * Scoring: 0-1 risk; >0.8 triggers HITL/block. */ import { ThreatAnnotation } from '../../security/threats.js'; export interface WormScanResult { score: number; patterns: string[]; modifiedContent: string; threats: ThreatAnnotation[]; } declare const WORM_PATTERNS: readonly [{ readonly name: "replicator_direct"; readonly regex: RegExp; readonly weight: 0.4; }, { readonly name: "replicator_end"; readonly regex: RegExp; readonly weight: 0.3; }, { readonly name: "hijack_ignore"; readonly regex: RegExp; readonly weight: 0.4; }, { readonly name: "hijack_role"; readonly regex: RegExp; readonly weight: 0.3; }, { readonly name: "chain_save"; readonly regex: RegExp; readonly weight: 0.2; }, { readonly name: "obfusc_base64"; readonly regex: RegExp; readonly weight: 0.3; }, { readonly name: "obfusc_unicode"; readonly regex: RegExp; readonly weight: 0.2; }, { readonly name: "exfil_embed"; readonly regex: RegExp; readonly weight: 0.25; }, { readonly name: "urgency_priming"; readonly regex: RegExp; readonly weight: 0.15; }, { readonly name: "markdown_inject"; readonly regex: RegExp; readonly weight: 0.2; }, { readonly name: "replicator_share"; readonly regex: RegExp; readonly weight: 0.2; }, { readonly name: "hijack_pretend"; readonly regex: RegExp; readonly weight: 0.3; }, { readonly name: "obfusc_html_entity"; readonly regex: RegExp; readonly weight: 0.15; }, { readonly name: "chain_append"; readonly regex: RegExp; readonly weight: 0.25; }, { readonly name: "exfil_data"; readonly regex: RegExp; readonly weight: 0.35; }]; export declare function wormScan(content: string): WormScanResult; export { WORM_PATTERNS }; //# sourceMappingURL=worm-detector.d.ts.map