import type { ChannelAdapter, IncomingMessage, OutgoingMessage } from "./types.js";
export declare class IMessageChannel implements ChannelAdapter {
    readonly name = "imessage";
    private timer?;
    private lastRowId;
    private handler?;
    private polling;
    private intervalMs;
    constructor(opts?: {
        intervalMs?: number;
    });
    start(handler: (msg: IncomingMessage) => Promise<void>): Promise<void>;
    private tick;
    send(msg: OutgoingMessage): Promise<void>;
    stop(): Promise<void>;
    private maxRowId;
    private fetchSince;
    private runSqlite;
}
/**
 * Build the osascript argv for sending an iMessage WITHOUT interpolating
 * user/LLM text into the AppleScript source.
 *
 * The old approach (`send "${text}"`) only escaped double-quotes, so a
 * message containing a newline — or a crafted `" & (do shell script "...")`
 * payload — could break out of the string literal and inject AppleScript.
 * Inbound iMessage text is untrusted (anyone who can text the user), so this
 * was a real injection vector.
 *
 * Instead the script is a STATIC `on run argv` program; recipient and text
 * arrive as positional argv items (`item 1`/`item 2 of argv`) that AppleScript
 * never parses as source. No escaping needed; newlines/quotes/backslashes
 * survive verbatim.
 */
export declare function buildOsascriptArgs(recipient: string, text: string): string[];
//# sourceMappingURL=imessage.d.ts.map