/**
 * Threat classification returned by the Shamash scanner.
 */
export type ThreatType = "Benign" | "PromptInjection" | "Jailbreak" | "DataExfiltration" | "EncodingAttack" | "SocialEngineering" | "ContextManipulation" | "ToolManipulation";
/**
 * Structured result of a Shamash scan invocation.
 */
export interface ScanResult {
    safe: boolean;
    threat_type: ThreatType;
    confidence: number;
    latency_ms: number;
    tier_reached: 1 | 2;
    signals: string[];
    posterior_prob?: number;
    effective_lr?: number;
    disposition?: string;
    severity?: string;
    warning_message?: string;
    normalization?: Record<string, unknown>;
    evidence?: Array<Record<string, unknown>>;
}
export declare class ScanTimeoutError extends Error {
    readonly timeoutMs: number;
    constructor(timeoutMs: number);
}
/**
 * Search order for locating the shamash binary:
 *   1. Explicit custom path from plugin config
 *   2. Bundled binary inside the package's bin/ directory
 *   3. System PATH (which, execFileSync --version)
 *   4. Common installation directories
 *
 * Returns the absolute path to the binary, or null if not found.
 */
export declare function findBinary(customPath?: string): string | null;
/**
 * Manages a Shamash scanner instance.
 *
 * - Async scan (all gates): uses a persistent daemon process if
 *   the binary supports `--stdin` mode, otherwise spawns per request.
 * - scanWithTimeout: bounded async scan with AbortController cancellation.
 */
export declare class ShamashScanner {
    private readonly binary;
    private readonly patternsPath;
    private daemon;
    private daemonTested;
    private daemonSupported;
    private responseBuffer;
    private pendingRequests;
    private nextId;
    constructor(binary: string, patternsPath?: string);
    /**
     * Async scan for use in async hook contexts.
     * Tries daemon mode first, falls back to exec-per-scan.
     */
    scan(text: string, mode?: "input" | "output", signal?: AbortSignal): Promise<ScanResult>;
    /**
     * Bounded async scan used by hook paths with strict latency budgets.
     */
    scanWithTimeout(text: string, mode: "input" | "output" | undefined, timeoutMs: number): Promise<ScanResult>;
    /**
     * Synchronous scan for use in synchronous hook contexts
     * (e.g., tool_result_persist). Uses execFileSync — blocks the event loop
     * but matches OpenClaw's synchronous hook contract.
     */
    scanSync(text: string, mode?: "input" | "output"): ScanResult;
    /**
     * Shut down the daemon process if running.
     */
    shutdown(): void;
    /** True if the daemon process is alive and accepting requests. */
    get isDaemonActive(): boolean;
    private probeAndStartDaemon;
    private scanViaDaemon;
    private scanViaExec;
    private handleDaemonOutput;
    private rejectAllPending;
}
