feat(identity): web metadata enrichment for titles missing on TMDB (META-1)
- metadata.enrich (propose, low, replay safe): normalized-title cache (kv_cache
region enrich, 7 days) -> daily budget -> web.search (title + 短剧 / 电视剧 平台,
second query limited to whitelist via site:) -> web.fetch of up to 3 relevant
whitelisted pages (registered site domains never read, redirects out of the
whitelist dropped) -> upstream model extraction with rule fallback -> server-side
evidence check (rule_confirmed / multi_evidence / needs_review). Suggestion only.
- POST /identity-pool/{id}/enrich (suggest) and /enrich/apply (console session):
provisional entity or same-title merge, season/episode units, field-level
metadata with source web/agent + evidence, aliases, release assignment.
Poster proxy GET /img/enrich/{id} (og:image from whitelisted pages only).
- Auto-enrich once per pool entry when subscription/rule lookups find nothing on
TMDB (identity.autoEnrich, off by default); identity.enrichDailyBudget,
identity.enrichDomains settings; web.fetch now returns og:image.
- Pool sheet "元数据补全" section; entity detail shows evidence links.
- Migration 0049_enrichment (metadata_enrichment, metadata_field.evidence, source
web). Requires image rebuild / api + worker restart to take effect.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
18a5cf1de7
commit
f4666a4671
36 files changed
+2514
-25
No files matched your search
@@ -89,6 +89,7 @@ export const CAPABILITY_IDS = [
|
||||
"agent.propose_options",
|
||||
"web.search",
|
||||
"web.fetch",
|
||||
"metadata.enrich",
|
||||
] as const;
|
||||
export const KnownCapabilityId = z.enum(CAPABILITY_IDS);
|
||||
export type KnownCapabilityId = z.infer<typeof KnownCapabilityId>;
|
||||
@@ -563,6 +564,19 @@ export const CAPABILITY_CATALOG: Record<KnownCapabilityId, CapabilityDescriptor>
|
||||
true,
|
||||
false,
|
||||
),
|
||||
// META-1:只产出建议(存补全记录,不写作品表);消耗网页搜索次数,受每日预算约束。应用建议走控制台 /identity-pool/{id}/enrich/apply
|
||||
"metadata.enrich": d(
|
||||
"metadata.enrich",
|
||||
"补全元数据",
|
||||
"TMDB 查不到的作品(短剧、平台独播剧)按标题查网页:搜索后只读白名单网站(平台、百科),抽取标题、别名、年份、平台、集数、简介、海报、类型,每个字段带出处和证据等级。只给建议,不改作品;同一标题 7 天内直接返回上次结果",
|
||||
"propose",
|
||||
"MetadataEnrich",
|
||||
"organize.execute",
|
||||
"low",
|
||||
true,
|
||||
false,
|
||||
"safe",
|
||||
),
|
||||
};
|
||||
|
||||
function d(
|
||||
|
||||
Reference in new issue
Block a user