import { Rule } from './rule.js'; export declare function hasHiddenUnicode(text: string): boolean; export declare function findHiddenInSource(content: string): { char: string; line: number; } | undefined; /** All hidden-character hits, one per line, in document order. */ export declare function findHiddenHitsInSource(content: string): { char: string; line: number; }[]; /** * Security tooling documents bidi/hidden-unicode attacks by embedding the very * character in a comment that discusses it ("`examp\u202emoc.elp` (RLO + reversed) …"). * The character sits on a comment line and nearby prose names the attack class. */ export declare function isDefensiveUnicodeComment(content: string, line: number): boolean; /** * Detection tooling also embeds the characters it hunts for in non-comment * pattern declarations: a regex character class listing the bidi range * (`re.compile(r"[\u202a-\u202e]")`, a YAML `patterns:` entry) or a rule-test * fixture string exercising the detector. Both shapes require nearby prose that * names the attack class; the fixture shape additionally requires detection * vocabulary (rule/canary/signature/verdict/detect) in the window, so a hidden * character smuggled into ordinary code stays loud. */ export declare function isDefensiveDetectionPattern(content: string, line: number, file?: string): boolean; /** Bidi overrides/isolates and Unicode tag characters are Trojan-Source-grade concealment. */ export declare function isTrojanHidden(char: string): boolean; /** * Localization and language-corpus JSON (locale message catalogs, subtitle * datasets) legitimately embeds bidi formatting characters inside its string * values to render mixed-direction text. When a file parses as JSON and every * hidden character sits inside a string token, the characters cannot reorder * code — they only affect how that data string displays. Agent-facing config * surfaces (MCP configs, settings, plugin/marketplace manifests, hooks) stay * loud because a disguised string may itself be the attack there. */ export declare function isJsonStringData(file: string, content: string): boolean; /** A zero-width character wedged inside a word splits keywords to dodge pattern matching. */ export declare function hidesInWord(content: string): boolean; export declare const INJECTION_PATTERNS: { re: RegExp; label: string; }[]; export declare const toolPoisoningRule: Rule;