import { EventEmitter } from "node:events";
import type { VisionClawConfig } from "../config/types.js";
import type { ChannelAdapter, MessageAttachment, ReplyContext } from "./interface.js";
/**
 * Gmail channel adapter.
 * Uses the agent's dedicated Gmail account to receive and send emails.
 *
 * On startup, scans for recent unread INBOX emails to catch messages
 * received during downtime, then captures the current historyId and
 * polls forward using the Gmail History API.
 */
export declare class GmailAdapter extends EventEmitter implements ChannelAdapter {
    readonly name = "gmail";
    private config;
    private gmail;
    private pollInterval;
    private lastHistoryId;
    private processedMessageIds;
    private initialized;
    constructor(config: VisionClawConfig);
    start(): Promise<void>;
    stop(): Promise<void>;
    sendMessage(to: string, message: string, attachments?: MessageAttachment[], replyTo?: ReplyContext): Promise<void>;
    /**
     * One-time scan for unread INBOX messages on startup.
     * Catches emails received while the agent was offline —
     * since we mark processed emails as read, anything still
     * UNREAD must have been missed during downtime.
     */
    private processUnreadOnStartup;
    /**
     * Poll for new messages using the Gmail History API.
     * Only fetches messages added since the last known historyId,
     * so old unread emails are never processed.
     */
    private pollForMessages;
}
//# sourceMappingURL=gmail.d.ts.map