merge: fix/b-download

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-10-03 21:23:04 +08:00
commit 15d7f2ec2f
10 files changed
+566 -18

No files matched your search

+5
View File
@@ -223,6 +223,11 @@ export const DownloadTask = EntityBase.extend({
removedAt: Timestamp.nullable(),
fileList: z.array(z.object({ path: z.string(), size: NonNegInt, progress: z.number().optional() })).nullable(),
lastError: JsonObject.nullable(),
/** 下载器里连续查不到的起点与轮数:达到阈值才判 removed,中途出现即清零 */
missingSince: Timestamp.nullable().optional(),
missingCount: NonNegInt.optional(),
/** removed 行被再次提交 / 接管复活的次数(完成事件幂等键随之换代) */
generation: NonNegInt.optional(),
});
export type DownloadTask = z.infer<typeof DownloadTask>;
export const DownloadTaskCreate = DownloadTask.pick({