Merge branch 'deai2'

Co-Authored-By: Claude Fable 5.1 <[email protected]>

# Conflicts:
#	apps/server/src/modules/acquisition-organize/services/organize.ts
#	apps/web/app/routes/console/sites.$siteId.tsx
This commit is contained in:
root committed 2026-09-29 21:26:16 +08:00
commit 12bc4664b6
247 files changed
+2658 -2148

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
// 多版本自动补全(docs/design/subscriptions.md §2.2):非主版本目标在主版本已满足的单元上补下其他版本。
// 多版本自动补全(docs/design/subscriptions.md §2.2):非主收录版本在主版本已满足的单元上补下其他版本。
// 开关按 订阅 → 规则组(链上后者优先)→ 系统缺省(开)取值;补全预算按订阅、按自然日计,超出记延后。
export type AutoFillModeValue = "inherit" | "on" | "off";
+2 -2
View File
@@ -76,7 +76,7 @@ export const NAMING_VARIABLES: readonly NamingVariableDef[] = [
ours: true,
},
{ name: "issue", group: "ours", label: "综艺期号", example: "12", ours: true },
{ name: "slotName", group: "ours", label: "版本目标名", example: "4K HDR", ours: true },
{ name: "slotName", group: "ours", label: "收录版本名", example: "4K HDR", ours: true },
{ name: "libraryRoot", group: "ours", label: "库根名", example: "电视剧-A", ours: true },
];
@@ -124,7 +124,7 @@ function sourceOf(p: Partial<ParsedRelease>): string | undefined {
}
/**
* 渲染上下文(MP 变量名):作品信息 + 发布解析 + 季集元数据 + 版本目标/库根。
* 渲染上下文(MP 变量名):作品信息 + 发布解析 + 季集元数据 + 收录版本/库根。
* 标题用本地作品名,不用发布标题。空值不放进上下文(同 MP 剔除 None)。
*/
export function buildNamingVars(
+2 -2
View File
@@ -376,14 +376,14 @@ export function currentPri(spec: SlotSpec, current: QualityFacts): number {
return effectiveLadder(spec, pseudo, {}, ruleChainOf(spec, pseudo, {})).pri;
}
/** 版本目标引用的规则组链求值;没有规则组时为 null */
/** 收录版本引用的规则组链求值;没有规则组时为 null */
export function ruleChainOf(spec: SlotSpec, r: ParsedRelease, ctx: EvaluationContext = {}): RuleChainResult | null {
if (!spec.rules?.groups.length) return null;
return evaluateRuleChain(spec.rules.groups, r, ctx, catalogOf(spec.rules.atoms));
}
/**
* 实际生效的阶梯:版本目标自身 soft.tiers 视为排在最前的匿名组,规则组链里有带层的组时 pri 取最后一个带层的组。
* 实际生效的阶梯:收录版本自身 soft.tiers 视为排在最前的匿名组,规则组链里有带层的组时 pri 取最后一个带层的组。
*/
export function effectiveLadder(
spec: SlotSpec,
+3 -3
View File
@@ -11,9 +11,9 @@ export interface SubscriptionGroupInput {
mode: "once" | "continuous";
/** 范围内各季总集数是否都已知(电影恒为 true) */
totalsKnown: boolean;
/** 任一版本目标有已入库或在途单元 */
/** 任一收录版本有已入库或在途单元 */
anyProgress: boolean;
/** 所有版本目标在范围内全覆盖(且总集数已知) */
/** 所有收录版本在范围内全覆盖(且总集数已知) */
allSlotsComplete: boolean;
}
@@ -86,7 +86,7 @@ export interface CoverageRowResult {
}
/**
* 一行(一个版本目标或"库内任一版本")的格状态:已入库 > 在途(含整季通配预留)> 范围外/未播出 > 缺失。
* 一行(一个收录版本或"库内任一版本")的格状态:已入库 > 在途(含整季通配预留)> 范围外/未播出 > 缺失。
* 在途按计划单元键与列键求交(unitsOverlap:s{季}* 通配与同季各集相交)。
*/
export function coverageRow(i: CoverageRowInput): CoverageRowResult {
+1 -1
View File
@@ -116,7 +116,7 @@ export interface SlotUpgradePolicy {
export type SlotCompletionSpec = { kind: "movie"; cuts?: (Cut | "default")[] } | { kind: "units" };
/** 版本目标引用的规则组链(已按 scope 过滤、按引用顺序排列)与自定义条件 */
/** 收录版本引用的规则组链(已按 scope 过滤、按引用顺序排列)与自定义条件 */
export interface SlotRuleChain {
groups: RuleGroupSpec[];
atoms?: CustomAtom[];