feat(ql3): establish 3.0 incubation baseline

This commit is contained in:
whyour
2026-08-12 00:25:26 +08:00
parent 4bf92dcfeb
commit c699c32461
2817 changed files with 779642 additions and 653 deletions
@@ -0,0 +1,54 @@
import type { ExecutionOrigin } from '../domain/run';
export interface LegacyExecutionAcceptedFact {
origin: ExecutionOrigin;
projectId: string;
taskId: string;
taskRevision: string;
taskName?: string;
legacyCronId?: number;
triggerType: string;
triggeredBy?: string;
requestId?: string;
scheduledForMs?: number;
acceptedAtMs: number;
}
export interface LegacyExecutionSpawnedFact {
atMs: number;
pid?: number;
executorHandle?: string;
logArtifactId?: string;
}
export interface LegacyExecutionRunningFact {
atMs: number;
}
export interface LegacyExecutionStartFailedFact {
atMs: number;
errorCode: string;
}
export interface LegacyExecutionExitedFact {
atMs: number;
exitCode: number | null;
signal?: NodeJS.Signals;
}
export interface LegacyExecutionCancelledFact {
atMs: number;
reason: 'user' | 'policy' | 'shutdown' | 'reconcile';
}
export interface LegacyExecutionObservation {
spawned(fact: LegacyExecutionSpawnedFact): void;
running(fact: LegacyExecutionRunningFact): void;
startFailed(fact: LegacyExecutionStartFailedFact): void;
exited(fact: LegacyExecutionExitedFact): void;
cancelled(fact: LegacyExecutionCancelledFact): void;
}
export interface LegacyExecutionObserver {
begin(fact: LegacyExecutionAcceptedFact): LegacyExecutionObservation;
}