"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InMemoryEventAdapter = void 0;
/**
 * In-memory event adapter for testing.
 *
 * Captures all published events in an array that tests can inspect.
 *
 * Usage:
 * ```typescript
 * const adapter = new InMemoryEventAdapter();
 * eventRegistry.register(adapter);
 * await eventRegistry.connect();
 *
 * // ... run workflow ...
 *
 * expect(adapter.events).toContainEqual(
 *   expect.objectContaining({ type: 'milestone', workflowName: 'reviewContent' })
 * );
 * ```
 */
class InMemoryEventAdapter {
    constructor() {
        this.events = [];
    }
    async connect() {
        // no-op
    }
    async publish(event) {
        this.events.push(event);
    }
    async disconnect() {
        // no-op
    }
    /** Clear captured events */
    clear() {
        this.events = [];
    }
}
exports.InMemoryEventAdapter = InMemoryEventAdapter;
