/** Run-scoped real-email receiving. Resource authority and message content stay on the host. */ import { type CommsRecoveryEntry } from "./comms-lease-store.js"; import { type CommsReceivingEvidence, type ParticipantEmail, type ReceivingAdapter, type ReceivingSurface, type RenderedReceivingInbox } from "./comms-receiving-types.js"; export type { CommsRecoveryEntry } from "./comms-lease-store.js"; export declare class CommsReceivingError extends Error { readonly code: string; constructor(code: string); } type RenderInput = { address: string; messages: ParticipantEmail[]; allowedOrigins: string[]; originMap?: Array<[string, string]>; }; export interface StartCommsReceivingOptions { cwd: string; runId: string; connectionName: string; apiKeyEnv: string; adapter: ReceivingAdapter; participants: string[]; writeEvidence: (evidence: CommsReceivingEvidence) => Promise; registerSecrets: (secrets: string[]) => void; render: (input: RenderInput) => RenderedReceivingInbox; signal?: AbortSignal; stateDir?: string; } export interface CommsReceivingRun { address(participantId: string): string; attach(participantId: string, options: { surface: ReceivingSurface; allowedOrigins: string[]; originMap?: Array<[string, string]>; }): Promise; finishParticipant(participantId: string): Promise; finish(): Promise; snapshot(): CommsReceivingEvidence; } export declare function startCommsReceiving(options: StartCommsReceivingOptions): Promise; /** Side-effect-free local inspection: does not authenticate, enumerate provider resources or replay creation. */ export declare function inspectCommsRecovery(options: { cwd: string; stateDir?: string; }): Promise; /** Explicit mutation: may replay an uncertain original create, then immediately dispose that exact resource. */ export declare function recoverCommsReceiving(options: { cwd: string; runId: string; connectionName: string; apiKeyEnv: string; adapter: ReceivingAdapter; stateDir?: string; }): Promise<{ ok: boolean; recovered: number; unresolved: number; message: string; }>;