feat(task): add task labels and push-based task events

This commit is contained in:
2026-01-26 00:39:30 +00:00
parent 9a3a3e3eab
commit 6030fb2805
9 changed files with 360 additions and 9 deletions

View File

@@ -17,6 +17,7 @@ export interface ITaskMetadata {
timeout?: number;
lastError?: string;
errorCount?: number;
labels?: Record<string, string>;
}
export interface ITaskExecutionReport {
@@ -38,4 +39,14 @@ export interface IScheduledTaskInfo {
lastRun?: Date;
steps?: ITaskStep[];
metadata?: ITaskMetadata;
}
export type TTaskEventType = 'started' | 'step' | 'completed' | 'failed';
export interface ITaskEvent {
type: TTaskEventType;
task: ITaskMetadata;
timestamp: number;
stepName?: string; // present when type === 'step'
error?: string; // present when type === 'failed'
}