升级外部生成为正式任务列表

将 external_generation_job 扩展为含价格、确认时间、退款流水和事件审计的正式生成任务事实源

新增外部生成任务列表与确认 BFF,并让平台入口按后端任务补弹完成或失败提示

保护画布生成队列超时、快照回写和自动保存覆盖场景

将 worker 计费退款流水写入 externalGenerationJobId,并补充冷备份后 worker/controller 恢复守护
This commit is contained in:
2026-06-24 15:17:12 +08:00
parent ed6b17442a
commit 73a17193d4
66 changed files with 2416 additions and 122 deletions
@@ -7,6 +7,7 @@ export type ExternalGenerationJobStatus =
export interface ExternalGenerationQueueOverview {
pendingCount: number;
runningCount: number;
unacknowledgedTerminalCount: number;
updatedAtMicros: number;
}
@@ -27,3 +28,37 @@ export interface ExternalGenerationJobStatusRecord {
export interface ExternalGenerationJobStatusResponse {
job: ExternalGenerationJobStatusRecord;
}
export interface ExternalGenerationTaskRecord {
jobId: string;
jobKind: string;
sourceModule: string;
sourceEntityId: string;
requestLabel: string;
status: ExternalGenerationJobStatus;
phaseLabel: string;
phaseDetail: string;
progress: number;
error?: string | null;
priceMudPoints: number;
refundLedgerId?: string | null;
notificationAcknowledgedAt?: string | null;
createdAt: string;
startedAt?: string | null;
completedAt?: string | null;
updatedAt: string;
updatedAtMicros: number;
}
export interface ExternalGenerationTaskListResponse {
tasks: ExternalGenerationTaskRecord[];
overview: ExternalGenerationQueueOverview;
}
export interface ExternalGenerationTaskAcknowledgeRequest {
jobIds: string[];
}
export interface ExternalGenerationTaskAcknowledgeResponse {
acknowledgedTasks: ExternalGenerationTaskRecord[];
}