feat(#176): Integrate M4.2 infrastructure with M4.1 coordinator
Add CoordinatorIntegrationModule providing REST API endpoints for the Python coordinator to communicate with the NestJS API infrastructure: - POST /coordinator/jobs - Create job from coordinator webhook events - PATCH /coordinator/jobs/:id/status - Update job status (PENDING -> RUNNING) - PATCH /coordinator/jobs/:id/progress - Update job progress percentage - POST /coordinator/jobs/:id/complete - Mark job complete with results - POST /coordinator/jobs/:id/fail - Mark job failed with gate results - GET /coordinator/jobs/:id - Get job details with events and steps - GET /coordinator/health - Integration health check Integration features: - Job creation dispatches to BullMQ queues - Status updates emit JobEvents for audit logging - Completion/failure events broadcast via Herald to Discord - Status transition validation (PENDING -> QUEUED -> RUNNING -> COMPLETED/FAILED) - Health check includes BullMQ connection status and queue counts Also adds JOB_PROGRESS event type to event-types.ts for progress tracking. Fixes #176 Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* Result of job creation from coordinator
|
||||
*/
|
||||
export interface CoordinatorJobResult {
|
||||
jobId: string;
|
||||
status: string;
|
||||
queueName: string;
|
||||
estimatedStartTime?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Health status for coordinator integration
|
||||
*/
|
||||
export interface CoordinatorHealthStatus {
|
||||
api: boolean;
|
||||
bullmq: {
|
||||
connected: boolean;
|
||||
queues: Record<string, number>;
|
||||
};
|
||||
timestamp: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Quality gate result from coordinator
|
||||
*/
|
||||
export interface QualityGateResult {
|
||||
lint?: boolean;
|
||||
typecheck?: boolean;
|
||||
test?: boolean;
|
||||
coverage?: boolean;
|
||||
build?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Agent assignment info from coordinator
|
||||
*/
|
||||
export interface AgentAssignment {
|
||||
agentType: string; // 'sonnet', 'opus', 'haiku', 'glm'
|
||||
agentId: string;
|
||||
estimatedContext: number;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./coordinator-job.interface";
|
||||
Reference in New Issue
Block a user