feat: 封面生成流水线、执黑先行二号风格扩展、账号配置更新

- 新增 gen-covers 系列脚本(kling/gpt/t2i/batch/direct/final等方案)
- 执黑先行二号添加9种风格提示词目录(梦核/剪纸/水墨/毛毡/硬核线条等)
- 执黑先行添加封面提示词、执黑先行二号更新图片提示词
- product_viral_factory 账号配置扩充并添加 cover_template 参考图
- capcut_assemble/kling-video-generator/oss-upload/poll-utils 细节修复
- CLAUDE.md 更新流程文档

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
lc
2026-06-06 16:44:47 +08:00
parent 1e110219ff
commit 9cbdabda31
71 changed files with 2444 additions and 119 deletions

View File

@@ -12,7 +12,8 @@ const fs = require('fs')
const https = require('https')
const http = require('http')
const TRANSIENT_RE = /timeout|ECONNRESET|ETIMEDOUT|network|socket|超时|processing|pending/i
// "fetch failed" = Node fetch threw before receiving a response (network error, NOT a Kling task failure)
const TRANSIENT_RE = /timeout|ECONNRESET|ETIMEDOUT|network|socket|超时|processing|pending|fetch failed/i
const TASK_FAILED_RE = /\bfailed\b|失败/i
@@ -104,8 +105,11 @@ function makePollWithRetry({ Api, suffix, duration, maxRetries = 3, optimizeProm
}
} catch (err) {
lastError = err.message
lastErrorWasTaskFailure = isTaskFailed(err)
if (isTransientError(err) && pollAttempt < POLL_RETRIES) {
// Network errors (transient) must never be treated as task failures.
// isTaskFailed("fetch failed") would be true without this guard because "failed" matches TASK_FAILED_RE.
const transient = isTransientError(err)
lastErrorWasTaskFailure = !transient && isTaskFailed(err)
if (transient && pollAttempt < POLL_RETRIES) {
const tag = isTaskFailed(err) ? '失败' : '超时/瞬断'
console.log(` ⚠ 轮询${tag} (${pollAttempt + 1}/${POLL_RETRIES}): ${err.message.slice(0, 60)}`)
await new Promise(r => setTimeout(r, POLL_RETRY_DELAY))