/** * Pipeline Event Ledger — simple append-only event log. * * Records stage lifecycle events (start, complete, fail, gate results) * for audit and debugging. Distinct from LedgerEngine (which records * pipeline-level delivery outcomes); this is the per-pipeline event trail. * * (arc42 §5.2, internal sub-module of PipelineEngine) */ import type { NotificationAdapter } from '../notification/notification-adapter.js'; export interface LedgerEvent { timestamp: string; pipelineId: string; type: 'pipeline_created' | 'pipeline_running' | 'pipeline_completed' | 'pipeline_failed' | 'pipeline_blocked' | 'pipeline_paused' | 'pipeline_resumed' | 'pipeline_cancelled' | 'stage_started' | 'stage_completed' | 'stage_failed' | 'stage_blocked' | 'gate_passed' | 'gate_rejected' | 'artifact_passed'; stageId?: string; detail?: Record; } /** * In-memory event ledger with append-only semantics. * Each pipeline gets its own event stream, keyed by pipelineId. */ export declare class EventLedger { private readonly events; private notificationAdapter; /** Attach a notification adapter. Events will be forwarded to it. */ setNotificationAdapter(adapter: NotificationAdapter): void; /** Append an event for a pipeline. */ append(pipelineId: string, event: Omit): LedgerEvent; /** Get the full event history for a pipeline. Returns empty array if unknown. */ getHistory(pipelineId: string): readonly LedgerEvent[]; /** Get events across all pipelines (most recent first). */ getAllEvents(): readonly LedgerEvent[]; /** Clear all events (useful for testing). */ clear(): void; } //# sourceMappingURL=ledger.d.ts.map