feat(server,contracts,web): dashboard library counts and engine runs triggeredBy/multi-status filters

- GET /dashboard: automation.library {entities, movies, series, seasons,
  episodes, assets} and automation.slotSatisfiedRate; home media overview
  shows the counts instead of placeholders.
- GET /engine/runs: `status` accepts comma-separated values; new
  `triggeredBy` filter (comma-separated) evaluated server-side by scanning
  batches and paging with the last inspected row's cursor (scan cap 2000).
- Task stream: source filter and the "active" tab (running,pending) are now
  one paginated server query.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-28 16:49:11 +08:00
1 parent 615917bb45
commit 363f85b1a1
13 files changed
+165 -250

No files matched your search

+11
View File
@@ -469,6 +469,17 @@ export const Dashboard = z.object({
}),
activeSubscriptions: NonNegInt,
slotCounts: SlotStatusCounts,
/** 版本目标满足率 = satisfied / 全部版本目标(0–1);没有版本目标时为 null */
slotSatisfiedRate: z.number().min(0).max(1).nullable(),
/** 本地账本计数:作品不含已合并;季 = content_unit.kind=season(不含 retired);资产 = active 的视频 / 原盘目录 */
library: z.object({
entities: NonNegInt,
movies: NonNegInt,
series: NonNegInt,
seasons: NonNegInt,
episodes: NonNegInt,
assets: NonNegInt,
}),
}),
currentWork: z.object({
downloading: NonNegInt,