feat(news-morning): add full-tier channels with cross-group dedupe

Expand daily briefing prefetch and template to cover Asia-Pacific, commodities, AI/chips, policy, community, science, culture, startup, crypto, geopolitics, cities and wire feeds, with URL/title deduplication across sections.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
John
2026-09-18 08:12:10 +08:00
parent e71e397302
commit af0282e963
5 changed files with 255 additions and 51 deletions
@@ -1,6 +1,6 @@
#!/usr/bin/env node
/**
* Enable global-source news morning template and trigger prod worker regenerate + push.
* Enable full-source news morning template and trigger prod worker regenerate + push.
*/
import process from 'node:process';
import mysql from 'mysql2/promise';
@@ -29,13 +29,12 @@ async function main() {
enabled: current.enabled !== false,
forceGenerateOnce: true,
taskSpecAppend: [
'【全球扩展栏目 · 必须生成】',
'除原有栏目外,必须新增并写满以下 4 个 section(quick-link + div.section):',
'1. id=google:「🔎 Google 热点 · Global Headlines」2~3 条,标题可英文,正文中文摘要,来源 Reuters/BBC/AP/Google News 等;',
'2. id=x:「𝕏 X 平台热点 · Trending」2~3 条,X/Twitter 热议或媒体转述,标题可中英混合;',
'3. id=universities:「🎓 全球高校 · Research & Campus」2~3 条,MIT/Stanford/Oxford 等科研或校园新闻,标题可英文;',
'4. id=global_markets:「📈 全球股市 · Markets」2~3 条,美股/欧股/日股/港股等,可含 Fed/Nasdaq/FTSE 等英文术语;',
'英文栏目标题可英文或中英并列,每条必须有中文摘要与来源 URL;禁止整段纯英文正文。',
'【全渠道扩展 · 必须生成且全页去重】',
'除原有栏目外,必须新增并写满以下 section(quick-link + div.section),每条 2 card(crypto 有则 1~2,无则可省略 section):',
'asia_pacific / commodities / ai_chips / policy / community / science / culture / startup / crypto / geopolitics / local_life / official_feeds,',
'以及 google / x / universities / global_markets。',
'全页去重:同一 URL 或同一核心事件只允许出现一次;主栏目优先,扩展栏目必须换角度或跳过。',
'英文栏目标题可英文,每条必须有中文摘要与来源 URL;禁止整段纯英文正文。',
].join('\n'),
};
const now = Date.now();
@@ -46,13 +45,13 @@ async function main() {
config_json = VALUES(config_json),
updated_by = VALUES(updated_by),
updated_at = VALUES(updated_at)`,
[CONFIG_KEY, JSON.stringify(next), 'global-source-regenerate', now],
[CONFIG_KEY, JSON.stringify(next), 'full-source-regenerate', now],
);
console.log(JSON.stringify({
ok: true,
forceGenerateOnce: true,
taskSpecAppendChars: next.taskSpecAppend.length,
templateNote: 'Worker on 143 must run code with taskSpecAppend + new search queries for full effect.',
templateNote: 'Worker must run code with full template + dedupe prefetch for best effect.',
}, null, 2));
await pool.end();
}