1+ export enum AutopilotOperator {
2+ // System operators for internal autopilot operations
3+ SYSTEM = 'system' ,
4+ SYSTEM_SCHEDULER = 'system-scheduler' ,
5+ SYSTEM_NEW_CHALLENGE = 'system-new-challenge' ,
6+ SYSTEM_RECOVERY = 'system-recovery' ,
7+ SYSTEM_SYNC = 'system-sync' ,
8+ SYSTEM_PHASE_CHAIN = 'system-phase-chain' ,
9+
10+ // Administrative operators
11+ ADMIN = 'admin' ,
12+
13+ // User operators (when operator comes from external sources)
14+ USER = 'user' ,
15+ }
16+
117export interface BaseMessage {
218 topic : string ;
319 originator : string ;
@@ -10,7 +26,7 @@ export interface PhaseTransitionPayload {
1026 phaseId : string ; // Changed from number to string to support UUIDs from the API
1127 phaseTypeName : string ;
1228 state : 'START' | 'END' ;
13- operator : string ;
29+ operator : AutopilotOperator | string ; // Allow both enum and string for flexibility
1430 projectStatus : string ;
1531 date ?: string ;
1632 challengeId : string ; // Changed to string to support UUIDs
@@ -20,7 +36,7 @@ export interface ChallengeUpdatePayload {
2036 projectId : number ;
2137 challengeId : string ; // Changed to string to support UUIDs
2238 status : string ;
23- operator : string ;
39+ operator : AutopilotOperator | string ; // Allow both enum and string for flexibility
2440 date ?: string ;
2541 // This nested structure may be present in Kafka messages from the API
2642 phases ?: {
@@ -31,7 +47,7 @@ export interface ChallengeUpdatePayload {
3147
3248export interface CommandPayload {
3349 command : string ;
34- operator : string ;
50+ operator : AutopilotOperator | string ; // Allow both enum and string for flexibility
3551 projectId ?: number ;
3652 challengeId ?: string ; // Added challengeId for new command handling
3753 date ?: string ;
0 commit comments