import type { PluginRuntime } from "openclaw/plugin-sdk/core"; export type EmailPluginRuntime = { channel: { email: { sendMessage: (to: string, text: string, options?: { accountId?: string; subject?: string; inReplyTo?: string; references?: string[]; attachments?: Array<{ filename: string; content: Buffer; }>; }) => Promise<{ messageId?: string; ok: boolean; error?: string; }>; }; }; }; /** * Sets the global Email runtime (called from plugin register). */ export declare function setEmailRuntime(runtime: PluginRuntime): void; /** * Gets the global Email runtime (throws if not initialized). */ export declare function getEmailRuntime(): PluginRuntime; /** * Waits for the Email runtime to be initialized (async polling). */ export declare function waitForEmailRuntime(timeoutMs?: number): Promise; /** * Resolves `PluginRuntime["channel"]` for the email monitor. * * Prefer the gateway-injected `channelRuntime` on `ChannelGatewayContext` when present (avoids * races with the module-global from `register()`). Fall back to the global set by `setEmailRuntime()`, * then to a short wait for legacy hosts. */ export declare function resolveEmailChannelRuntime(params: { channelRuntime?: PluginRuntime["channel"]; waitTimeoutMs?: number; }): Promise;