// src/engine/mailbox/index.ts

/**
 * Actor Mailbox Module
 *
 * Provides exclusive message queues for actor-style message passing.
 *
 * Key exports:
 * - IMailbox: Interface for mailbox operations
 * - Mailbox: Implementation with serialized delivery
 * - MailboxFactory: Creates and tracks mailboxes
 * - IActorMessage: Message structure for all actor communication
 *
 * Usage:
 * ```typescript
 * import { MailboxFactory, type IActorMessage } from './engine/mailbox';
 *
 * const factory = new MailboxFactory(transport);
 * const mailbox = factory.create('actor.$inbox');
 * mailbox.claim();
 *
 * // Send
 * mailbox.send({ command: 'greet', payload: { name: 'World' }, meta: { ts: Date.now() } });
 *
 * // Receive (serialized - one at a time)
 * for await (const msg of mailbox) {
 *   console.log(`Received: ${msg.command}`, msg.payload);
 * }
 * ```
 */

// Types
export type {
  IMailbox,
  IActorMessage,
  IBackpressurePolicy,
  IMailboxOptions,
  IExitSignal,
  IDownSignal,
  IMonitorRef,
} from './IMailbox';

// Classes
export { Mailbox } from './Mailbox';
export { MailboxFactory, type IMailboxFactoryOptions } from './MailboxFactory';
