feat(14-02): add phase domain events
- PhaseQueuedEvent for tracking phases awaiting execution - PhaseStartedEvent for phase execution start - PhaseCompletedEvent for phase completion with success flag - PhaseBlockedEvent for blocked phases with reason
This commit is contained in:
@@ -240,6 +240,45 @@ export interface TaskBlockedEvent extends DomainEvent {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Phase Events
|
||||
*/
|
||||
|
||||
export interface PhaseQueuedEvent extends DomainEvent {
|
||||
type: 'phase:queued';
|
||||
payload: {
|
||||
phaseId: string;
|
||||
initiativeId: string;
|
||||
dependsOn: string[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface PhaseStartedEvent extends DomainEvent {
|
||||
type: 'phase:started';
|
||||
payload: {
|
||||
phaseId: string;
|
||||
initiativeId: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PhaseCompletedEvent extends DomainEvent {
|
||||
type: 'phase:completed';
|
||||
payload: {
|
||||
phaseId: string;
|
||||
initiativeId: string;
|
||||
success: boolean;
|
||||
message?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PhaseBlockedEvent extends DomainEvent {
|
||||
type: 'phase:blocked';
|
||||
payload: {
|
||||
phaseId: string;
|
||||
reason: string;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge Coordination Events
|
||||
*/
|
||||
@@ -308,6 +347,10 @@ export type DomainEventMap =
|
||||
| TaskDispatchedEvent
|
||||
| TaskCompletedEvent
|
||||
| TaskBlockedEvent
|
||||
| PhaseQueuedEvent
|
||||
| PhaseStartedEvent
|
||||
| PhaseCompletedEvent
|
||||
| PhaseBlockedEvent
|
||||
| MergeQueuedEvent
|
||||
| MergeStartedEvent
|
||||
| MergeCompletedEvent
|
||||
|
||||
Reference in New Issue
Block a user