import type { CommandMessage } from "./interface.js";
/**
 * Persistent message queue backed by SQLite (node:sqlite built-in).
 * Incoming channel messages are enqueued here and dequeued by the agent loop.
 */
/**
 * The `meta.kind` value that external monitor scripts must include
 * in queue messages to be recognized as legitimate wake triggers.
 * Any monitor (WeChat, WhatsApp, Feishu, etc.) can use this protocol:
 *   1. Insert a queue row with `meta: { source: "<monitor-name>", kind: "external-wake" }`
 *   2. Send SIGUSR2 to the VisionClaw process
 * The SIGUSR2 handler verifies this marker before waking the loop.
 */
export declare const EXTERNAL_WAKE_KIND = "external-wake";
export declare class MessageQueue {
    private db;
    private stmtEnqueue;
    private stmtSelectFirst;
    private stmtDeleteById;
    private stmtCount;
    private stmtClear;
    private stmtHasExternalWake;
    private stmtSelectProcessed;
    private stmtMarkHandled;
    constructor(customDbPath?: string);
    acceptMessage(msg: CommandMessage): boolean;
    markHandled(msg: CommandMessage): void;
    enqueue(msg: CommandMessage): void;
    dequeue(): CommandMessage | null;
    peek(): CommandMessage | null;
    isEmpty(): boolean;
    size(): number;
    clear(): void;
    /**
     * Check whether the queue contains a recent external monitor wake message.
     * Used by the SIGUSR2 handler to verify the signal was triggered by a
     * legitimate monitor script (WeChat, WhatsApp, Feishu, etc.) rather than
     * an unrelated source. Any message with `meta.kind = "external-wake"`
     * created within the last 10 seconds qualifies.
     */
    hasExternalWakeMessage(): boolean;
    private closed;
    close(): void;
}
//# sourceMappingURL=queue.d.ts.map