/** * Orchestrator Events — typed event definitions using EventEmitter pattern. * (arc42 §5, spec §FR-01/FR-02) */ import { EventEmitter } from 'node:events'; import type { GateVerdict, StageId } from '../types/index.js'; export interface PipelineStartedEvent { runId: string; initialStage: StageId; timestamp: string; } export interface StageEnteredEvent { runId: string; stage: StageId; timestamp: string; } export interface GateEvaluatedEvent { runId: string; stage: StageId; verdict: GateVerdict; timestamp: string; } export interface StageAdvancedEvent { runId: string; fromStage: StageId; toStage: StageId; timestamp: string; } export interface PipelineCompletedEvent { runId: string; finalStage: StageId; timestamp: string; } export interface PipelineFailedEvent { runId: string; stage: StageId; reason: string; timestamp: string; } export interface ClarificationOpenedEvent { runId: string; stage: StageId; clarificationId: string; blocking: boolean; timestamp: string; } export interface ClarificationSettledEvent { runId: string; stage: StageId; clarificationId: string; resumed: boolean; timestamp: string; } export interface OrchestratorEventMap { 'pipeline:started': PipelineStartedEvent; 'pipeline:completed': PipelineCompletedEvent; 'pipeline:failed': PipelineFailedEvent; 'stage:entered': StageEnteredEvent; 'stage:advanced': StageAdvancedEvent; 'gate:evaluated': GateEvaluatedEvent; 'clarification:opened': ClarificationOpenedEvent; 'clarification:settled': ClarificationSettledEvent; } export declare class OrchestratorEmitter extends EventEmitter { emit(event: K, payload: OrchestratorEventMap[K]): boolean; on(event: K, listener: (payload: OrchestratorEventMap[K]) => void): this; once(event: K, listener: (payload: OrchestratorEventMap[K]) => void): this; } //# sourceMappingURL=orchestrator-events.d.ts.map