@gobing-ai/knowledge-kit 0.1.29 → 0.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/dist/board/api.js +8724 -3861
- package/dist/board/collect/index.js +69 -1
- package/dist/board/daily-voice/index.js +474 -265
- package/dist/board/itc/index.js +69 -1
- package/dist/board/wiki/index.css +1305 -0
- package/dist/board/wiki/index.js +1621 -0
- package/dist/index.js +34689 -28532
- package/package.json +1 -1
- package/plugins/generations/content-gen/dist/index.js +14 -1
- package/plugins/generations/core-facts-gen/dist/index.js +14 -1
- package/plugins/generations/daily-article-gen/dist/index.js +14 -1
- package/plugins/generations/dailynews-gen/dist/index.js +14 -1
- package/plugins/generations/episode-plan-gen/dist/index.js +32 -2
- package/plugins/generations/episode-plan-gen/src/index.ts +19 -1
- package/plugins/generations/gemini-tts/dist/index.js +14 -1
- package/plugins/generations/image-gen/dist/index.js +14 -1
- package/plugins/generations/music-gen/dist/index.js +15 -2
- package/plugins/generations/news-report-gen/dist/index.js +14 -1
- package/plugins/generations/vibe-voice-tts/dist/index.js +14 -1
- package/plugins/generations/video-gen/README.md +245 -8
- package/plugins/generations/video-gen/dist/index.js +22447 -4763
- package/plugins/generations/video-gen/package.json +1 -0
- package/plugins/generations/video-gen/presets/formats/avatar.yaml +5 -0
- package/plugins/generations/video-gen/presets/formats/editorial.yaml +6 -0
- package/plugins/generations/video-gen/presets/formats/hybrid-pip.yaml +5 -0
- package/plugins/generations/video-gen/presets/styles/daily-ai.yaml +5 -0
- package/plugins/generations/video-gen/presets/styles/neutral.yaml +3 -0
- package/plugins/generations/video-gen/python/colab_comfyui_h3.py +322 -0
- package/plugins/generations/video-gen/python/comfyui-h3-i2v-api.json +47 -0
- package/plugins/generations/video-gen/python/comfyui-h3-models.json +32 -0
- package/plugins/generations/video-gen/python/comfyui_model_cache.py +388 -0
- package/plugins/generations/video-gen/python/drive_client.py +187 -0
- package/plugins/generations/video-gen/src/brief-cli.ts +65 -0
- package/plugins/generations/video-gen/src/brief.ts +464 -0
- package/plugins/generations/video-gen/src/ccu-ledger.ts +206 -3
- package/plugins/generations/video-gen/src/colab-runner.ts +346 -35
- package/plugins/generations/video-gen/src/index.ts +141 -109
- package/plugins/generations/video-gen/src/inputs.ts +162 -4
- package/plugins/generations/video-gen/src/layout.ts +33 -0
- package/plugins/generations/video-gen/src/props.ts +27 -3
- package/plugins/generations/video-gen/src/remotion/AvatarReel.tsx +17 -1
- package/plugins/generations/video-gen/src/remotion/EditorialReel.tsx +17 -1
- package/plugins/generations/video-gen/src/remotion/Root.tsx +2 -0
- package/plugins/generations/video-gen/src/remotion/engine.ts +3 -7
- package/plugins/generations/video-gen/src/render.ts +25 -0
- package/plugins/generations/video-gen/src/request.ts +150 -20
- package/plugins/generations/video-gen/src/visual-provider.ts +116 -3
- package/plugins/generations/voice-gen/dist/index.js +14 -1
- package/plugins/generations/voxcpm-tts/dist/index.js +14 -1
- package/plugins/ingestions/aihot-ingest/dist/index.js +14 -1
- package/plugins/ingestions/horizon-ingest/dist/index.js +14 -1
- package/plugins/ingestions/last30days-ingest/dist/index.js +14 -1
- package/plugins/ingestions/web-search/dist/index.js +14 -1
- package/plugins/kk/config.example.yaml +1 -1
- package/plugins/kk/mcp-tools.yaml +47 -0
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/publish-presets/itc-surfdash-locales.json +42 -0
- package/plugins/kk/scripts/daily-stages.ts +87 -6
- package/plugins/kk/scripts/kk-workflow-stages.ts +64 -9
- package/plugins/kk/scripts/video-stages.ts +332 -0
- package/plugins/kk/scripts/wiki-normalize-audio.ts +354 -0
- package/plugins/kk/scripts/wiki-normalize-document.ts +495 -0
- package/plugins/kk/scripts/wiki-normalize-stages.ts +96 -0
- package/plugins/kk/scripts/wiki-stage-runtime.ts +39 -0
- package/plugins/kk/skills/news-editorial/SKILL.md +2 -1
- package/plugins/kk/workflows/kk-collect.yaml +10 -0
- package/plugins/kk/workflows/kk-news-generate.yaml +70 -8
- package/plugins/kk/workflows/kk-smart-seo.yaml +8 -0
- package/plugins/kk/workflows/kk-storm-research.yaml +10 -0
- package/plugins/kk/workflows/kk-video-generate.yaml +169 -0
- package/plugins/kk/workflows/kk-wiki-digest.yaml +49 -0
- package/plugins/publishings/bilibili-pub/dist/index.js +281 -268
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +202 -0
- package/plugins/publishings/cnblogs-pub/dist/index.js +281 -268
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +202 -0
- package/plugins/publishings/csdn-pub/dist/index.js +281 -268
- package/plugins/publishings/csdn-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/emdash-pub/dist/index.js +33 -3
- package/plugins/publishings/infoq-pub/dist/index.js +281 -268
- package/plugins/publishings/infoq-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/jike-pub/dist/index.js +281 -268
- package/plugins/publishings/jike-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/juejin-pub/dist/index.js +281 -268
- package/plugins/publishings/juejin-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/linkedin-pub/dist/index.js +281 -268
- package/plugins/publishings/linkedin-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/medium-pub/dist/index.js +281 -268
- package/plugins/publishings/medium-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/podcast-pub/dist/index.js +39 -9
- package/plugins/publishings/qiita-pub/dist/index.js +33 -3
- package/plugins/publishings/shipinhao-pub/dist/index.js +281 -268
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +175 -0
- package/plugins/publishings/sspai-pub/dist/index.js +281 -268
- package/plugins/publishings/sspai-pub/dist/profile-check.js +202 -0
- package/plugins/publishings/substack-pub/dist/index.js +281 -268
- package/plugins/publishings/substack-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/surfdash-pub/dist/index.js +99 -39
- package/plugins/publishings/surfdash-pub/plugin.json +54 -0
- package/plugins/publishings/surfdash-pub/src/index.ts +36 -5
- package/plugins/publishings/threads-pub/dist/index.js +281 -268
- package/plugins/publishings/threads-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/wechatmp-pub/dist/index.js +665 -451
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +215 -3
- package/plugins/publishings/weibo-pub/dist/index.js +281 -268
- package/plugins/publishings/weibo-pub/dist/profile-check.js +189 -1
- package/plugins/publishings/x-pub/dist/index.js +281 -268
- package/plugins/publishings/x-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/xhs-pub/dist/index.js +281 -268
- package/plugins/publishings/xhs-pub/dist/profile-check.js +119 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +281 -268
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +202 -0
- package/plugins/publishings/youtube-pub/dist/index.js +14 -1
- package/plugins/publishings/zenn-pub/dist/index.js +37 -7
package/package.json
CHANGED
|
@@ -17437,7 +17437,19 @@ var omniVoiceGenContentSchema = ContentSchema.extend({
|
|
|
17437
17437
|
})
|
|
17438
17438
|
});
|
|
17439
17439
|
var VideoVisualModeSchema = _enum(["editorial", "avatar", "hybrid-pip"]);
|
|
17440
|
-
var VideoRenderProviderSchema = _enum([
|
|
17440
|
+
var VideoRenderProviderSchema = _enum([
|
|
17441
|
+
"local-ken-burns",
|
|
17442
|
+
"wan21-i2v",
|
|
17443
|
+
"comfyui-minimax-h3",
|
|
17444
|
+
"musetalk",
|
|
17445
|
+
"echomimic-v2"
|
|
17446
|
+
]);
|
|
17447
|
+
var RenderProvenanceSchema = object({
|
|
17448
|
+
cache: _enum(["drive", "local"]),
|
|
17449
|
+
comfyuiCommit: string2().min(1).optional(),
|
|
17450
|
+
comfyuiRuntimeCommit: string2().min(1).nullable().optional(),
|
|
17451
|
+
modelCache: object({ verified: boolean2(), restored: number2().int().nonnegative() }).optional()
|
|
17452
|
+
});
|
|
17441
17453
|
var videoGenContentSchema = ContentSchema.extend({
|
|
17442
17454
|
format: literal("video"),
|
|
17443
17455
|
metadata: looseObject({
|
|
@@ -17450,6 +17462,7 @@ var videoGenContentSchema = ContentSchema.extend({
|
|
|
17450
17462
|
durationSec: number2().positive(),
|
|
17451
17463
|
visualMode: VideoVisualModeSchema,
|
|
17452
17464
|
renderProvider: VideoRenderProviderSchema,
|
|
17465
|
+
renderProvenance: RenderProvenanceSchema.optional(),
|
|
17453
17466
|
fallbackUsed: boolean2().optional(),
|
|
17454
17467
|
warnings: array(string2()).optional(),
|
|
17455
17468
|
ccuEstimated: number2().nonnegative().optional(),
|
|
@@ -17438,7 +17438,19 @@ var omniVoiceGenContentSchema = ContentSchema.extend({
|
|
|
17438
17438
|
})
|
|
17439
17439
|
});
|
|
17440
17440
|
var VideoVisualModeSchema = _enum(["editorial", "avatar", "hybrid-pip"]);
|
|
17441
|
-
var VideoRenderProviderSchema = _enum([
|
|
17441
|
+
var VideoRenderProviderSchema = _enum([
|
|
17442
|
+
"local-ken-burns",
|
|
17443
|
+
"wan21-i2v",
|
|
17444
|
+
"comfyui-minimax-h3",
|
|
17445
|
+
"musetalk",
|
|
17446
|
+
"echomimic-v2"
|
|
17447
|
+
]);
|
|
17448
|
+
var RenderProvenanceSchema = object({
|
|
17449
|
+
cache: _enum(["drive", "local"]),
|
|
17450
|
+
comfyuiCommit: string2().min(1).optional(),
|
|
17451
|
+
comfyuiRuntimeCommit: string2().min(1).nullable().optional(),
|
|
17452
|
+
modelCache: object({ verified: boolean2(), restored: number2().int().nonnegative() }).optional()
|
|
17453
|
+
});
|
|
17442
17454
|
var videoGenContentSchema = ContentSchema.extend({
|
|
17443
17455
|
format: literal("video"),
|
|
17444
17456
|
metadata: looseObject({
|
|
@@ -17451,6 +17463,7 @@ var videoGenContentSchema = ContentSchema.extend({
|
|
|
17451
17463
|
durationSec: number2().positive(),
|
|
17452
17464
|
visualMode: VideoVisualModeSchema,
|
|
17453
17465
|
renderProvider: VideoRenderProviderSchema,
|
|
17466
|
+
renderProvenance: RenderProvenanceSchema.optional(),
|
|
17454
17467
|
fallbackUsed: boolean2().optional(),
|
|
17455
17468
|
warnings: array(string2()).optional(),
|
|
17456
17469
|
ccuEstimated: number2().nonnegative().optional(),
|
|
@@ -17438,7 +17438,19 @@ var omniVoiceGenContentSchema = ContentSchema.extend({
|
|
|
17438
17438
|
})
|
|
17439
17439
|
});
|
|
17440
17440
|
var VideoVisualModeSchema = _enum(["editorial", "avatar", "hybrid-pip"]);
|
|
17441
|
-
var VideoRenderProviderSchema = _enum([
|
|
17441
|
+
var VideoRenderProviderSchema = _enum([
|
|
17442
|
+
"local-ken-burns",
|
|
17443
|
+
"wan21-i2v",
|
|
17444
|
+
"comfyui-minimax-h3",
|
|
17445
|
+
"musetalk",
|
|
17446
|
+
"echomimic-v2"
|
|
17447
|
+
]);
|
|
17448
|
+
var RenderProvenanceSchema = object({
|
|
17449
|
+
cache: _enum(["drive", "local"]),
|
|
17450
|
+
comfyuiCommit: string2().min(1).optional(),
|
|
17451
|
+
comfyuiRuntimeCommit: string2().min(1).nullable().optional(),
|
|
17452
|
+
modelCache: object({ verified: boolean2(), restored: number2().int().nonnegative() }).optional()
|
|
17453
|
+
});
|
|
17442
17454
|
var videoGenContentSchema = ContentSchema.extend({
|
|
17443
17455
|
format: literal("video"),
|
|
17444
17456
|
metadata: looseObject({
|
|
@@ -17451,6 +17463,7 @@ var videoGenContentSchema = ContentSchema.extend({
|
|
|
17451
17463
|
durationSec: number2().positive(),
|
|
17452
17464
|
visualMode: VideoVisualModeSchema,
|
|
17453
17465
|
renderProvider: VideoRenderProviderSchema,
|
|
17466
|
+
renderProvenance: RenderProvenanceSchema.optional(),
|
|
17454
17467
|
fallbackUsed: boolean2().optional(),
|
|
17455
17468
|
warnings: array(string2()).optional(),
|
|
17456
17469
|
ccuEstimated: number2().nonnegative().optional(),
|
|
@@ -17438,7 +17438,19 @@ var omniVoiceGenContentSchema = ContentSchema.extend({
|
|
|
17438
17438
|
})
|
|
17439
17439
|
});
|
|
17440
17440
|
var VideoVisualModeSchema = _enum(["editorial", "avatar", "hybrid-pip"]);
|
|
17441
|
-
var VideoRenderProviderSchema = _enum([
|
|
17441
|
+
var VideoRenderProviderSchema = _enum([
|
|
17442
|
+
"local-ken-burns",
|
|
17443
|
+
"wan21-i2v",
|
|
17444
|
+
"comfyui-minimax-h3",
|
|
17445
|
+
"musetalk",
|
|
17446
|
+
"echomimic-v2"
|
|
17447
|
+
]);
|
|
17448
|
+
var RenderProvenanceSchema = object({
|
|
17449
|
+
cache: _enum(["drive", "local"]),
|
|
17450
|
+
comfyuiCommit: string2().min(1).optional(),
|
|
17451
|
+
comfyuiRuntimeCommit: string2().min(1).nullable().optional(),
|
|
17452
|
+
modelCache: object({ verified: boolean2(), restored: number2().int().nonnegative() }).optional()
|
|
17453
|
+
});
|
|
17442
17454
|
var videoGenContentSchema = ContentSchema.extend({
|
|
17443
17455
|
format: literal("video"),
|
|
17444
17456
|
metadata: looseObject({
|
|
@@ -17451,6 +17463,7 @@ var videoGenContentSchema = ContentSchema.extend({
|
|
|
17451
17463
|
durationSec: number2().positive(),
|
|
17452
17464
|
visualMode: VideoVisualModeSchema,
|
|
17453
17465
|
renderProvider: VideoRenderProviderSchema,
|
|
17466
|
+
renderProvenance: RenderProvenanceSchema.optional(),
|
|
17454
17467
|
fallbackUsed: boolean2().optional(),
|
|
17455
17468
|
warnings: array(string2()).optional(),
|
|
17456
17469
|
ccuEstimated: number2().nonnegative().optional(),
|
|
@@ -17438,7 +17438,19 @@ var omniVoiceGenContentSchema = ContentSchema.extend({
|
|
|
17438
17438
|
})
|
|
17439
17439
|
});
|
|
17440
17440
|
var VideoVisualModeSchema = _enum(["editorial", "avatar", "hybrid-pip"]);
|
|
17441
|
-
var VideoRenderProviderSchema = _enum([
|
|
17441
|
+
var VideoRenderProviderSchema = _enum([
|
|
17442
|
+
"local-ken-burns",
|
|
17443
|
+
"wan21-i2v",
|
|
17444
|
+
"comfyui-minimax-h3",
|
|
17445
|
+
"musetalk",
|
|
17446
|
+
"echomimic-v2"
|
|
17447
|
+
]);
|
|
17448
|
+
var RenderProvenanceSchema = object({
|
|
17449
|
+
cache: _enum(["drive", "local"]),
|
|
17450
|
+
comfyuiCommit: string2().min(1).optional(),
|
|
17451
|
+
comfyuiRuntimeCommit: string2().min(1).nullable().optional(),
|
|
17452
|
+
modelCache: object({ verified: boolean2(), restored: number2().int().nonnegative() }).optional()
|
|
17453
|
+
});
|
|
17442
17454
|
var videoGenContentSchema = ContentSchema.extend({
|
|
17443
17455
|
format: literal("video"),
|
|
17444
17456
|
metadata: looseObject({
|
|
@@ -17451,6 +17463,7 @@ var videoGenContentSchema = ContentSchema.extend({
|
|
|
17451
17463
|
durationSec: number2().positive(),
|
|
17452
17464
|
visualMode: VideoVisualModeSchema,
|
|
17453
17465
|
renderProvider: VideoRenderProviderSchema,
|
|
17466
|
+
renderProvenance: RenderProvenanceSchema.optional(),
|
|
17454
17467
|
fallbackUsed: boolean2().optional(),
|
|
17455
17468
|
warnings: array(string2()).optional(),
|
|
17456
17469
|
ccuEstimated: number2().nonnegative().optional(),
|
|
@@ -18141,12 +18154,15 @@ function planEpisode(docs, options) {
|
|
|
18141
18154
|
}
|
|
18142
18155
|
const candidates = scored.filter((r) => !absorbed.has(r)).sort((a, b) => b.score - a.score);
|
|
18143
18156
|
const perSourceCap = Math.max(1, options.perSourceCap ?? PER_SOURCE_CAP);
|
|
18157
|
+
const maxItems = Math.max(1, options.maxItems);
|
|
18144
18158
|
const perSource = new Map;
|
|
18145
18159
|
const selected = [];
|
|
18160
|
+
const capped = [];
|
|
18146
18161
|
for (const record of candidates) {
|
|
18147
18162
|
const source = sourceOf(record.doc);
|
|
18148
18163
|
const count = perSource.get(source) ?? 0;
|
|
18149
18164
|
if (count >= perSourceCap) {
|
|
18165
|
+
capped.push(record);
|
|
18150
18166
|
const row = rows?.get(record.doc);
|
|
18151
18167
|
if (row)
|
|
18152
18168
|
row.disposition = "cap";
|
|
@@ -18157,9 +18173,19 @@ function planEpisode(docs, options) {
|
|
|
18157
18173
|
const row = rows?.get(record.doc);
|
|
18158
18174
|
if (row)
|
|
18159
18175
|
row.disposition = "selected";
|
|
18160
|
-
if (selected.length >=
|
|
18176
|
+
if (selected.length >= maxItems)
|
|
18161
18177
|
break;
|
|
18162
18178
|
}
|
|
18179
|
+
if (options.backfillCapped === true && selected.length < maxItems) {
|
|
18180
|
+
for (const record of capped) {
|
|
18181
|
+
selected.push(record);
|
|
18182
|
+
const row = rows?.get(record.doc);
|
|
18183
|
+
if (row)
|
|
18184
|
+
row.disposition = "selected";
|
|
18185
|
+
if (selected.length >= maxItems)
|
|
18186
|
+
break;
|
|
18187
|
+
}
|
|
18188
|
+
}
|
|
18163
18189
|
if (rows)
|
|
18164
18190
|
options.audit?.push(...rows.values());
|
|
18165
18191
|
return selected.map((r) => {
|
|
@@ -18209,6 +18235,7 @@ function docsToContent(docs, date, audit) {
|
|
|
18209
18235
|
const planned = planEpisode(docs, {
|
|
18210
18236
|
maxItems: maxItemsFromEnv(),
|
|
18211
18237
|
perSourceCap: perSourceCapFromEnv(),
|
|
18238
|
+
backfillCapped: backfillCappedFromEnv(),
|
|
18212
18239
|
date,
|
|
18213
18240
|
audit
|
|
18214
18241
|
});
|
|
@@ -18241,6 +18268,9 @@ function perSourceCapFromEnv() {
|
|
|
18241
18268
|
const n = Number.parseInt(raw, 10);
|
|
18242
18269
|
return Number.isFinite(n) && n > 0 ? n : PER_SOURCE_CAP;
|
|
18243
18270
|
}
|
|
18271
|
+
function backfillCappedFromEnv() {
|
|
18272
|
+
return process.env.EPISODE_PLAN_BACKFILL_CAPPED === "true";
|
|
18273
|
+
}
|
|
18244
18274
|
function resolvePlanDate() {
|
|
18245
18275
|
const raw = process.env.EPISODE_PLAN_DATE ?? new Date().toISOString().slice(0, 10);
|
|
18246
18276
|
return raw.length === 8 ? `${raw.slice(0, 4)}-${raw.slice(4, 6)}-${raw.slice(6, 8)}` : raw;
|
|
@@ -189,6 +189,8 @@ export interface PlanOptions {
|
|
|
189
189
|
date?: string; // episode date (YYYY-MM-DD); freshness is judged against it, default today
|
|
190
190
|
/** Per-source slot cap (default PER_SOURCE_CAP = 5). */
|
|
191
191
|
perSourceCap?: number;
|
|
192
|
+
/** When true, backfill unused `maxItems` slots from `cap`-ped items in score order if other sources cannot fill the plan. */
|
|
193
|
+
backfillCapped?: boolean;
|
|
192
194
|
/** Out-collector: when provided, receives one audit row per input doc (input order via rowsOf). */
|
|
193
195
|
audit?: PlanAuditRow[];
|
|
194
196
|
}
|
|
@@ -599,12 +601,15 @@ export function planEpisode(docs: Doc[], options: PlanOptions): Doc[] {
|
|
|
599
601
|
const candidates = scored.filter((r) => !absorbed.has(r)).sort((a, b) => b.score - a.score);
|
|
600
602
|
// Per-source cap, applied in score order: one feed's flood stops at perSourceCap.
|
|
601
603
|
const perSourceCap = Math.max(1, options.perSourceCap ?? PER_SOURCE_CAP);
|
|
604
|
+
const maxItems = Math.max(1, options.maxItems);
|
|
602
605
|
const perSource = new Map<string, number>();
|
|
603
606
|
const selected: ScoredDoc[] = [];
|
|
607
|
+
const capped: ScoredDoc[] = [];
|
|
604
608
|
for (const record of candidates) {
|
|
605
609
|
const source = sourceOf(record.doc);
|
|
606
610
|
const count = perSource.get(source) ?? 0;
|
|
607
611
|
if (count >= perSourceCap) {
|
|
612
|
+
capped.push(record);
|
|
608
613
|
const row = rows?.get(record.doc);
|
|
609
614
|
if (row) row.disposition = 'cap';
|
|
610
615
|
continue;
|
|
@@ -613,7 +618,15 @@ export function planEpisode(docs: Doc[], options: PlanOptions): Doc[] {
|
|
|
613
618
|
selected.push(record);
|
|
614
619
|
const row = rows?.get(record.doc);
|
|
615
620
|
if (row) row.disposition = 'selected';
|
|
616
|
-
if (selected.length >=
|
|
621
|
+
if (selected.length >= maxItems) break;
|
|
622
|
+
}
|
|
623
|
+
if (options.backfillCapped === true && selected.length < maxItems) {
|
|
624
|
+
for (const record of capped) {
|
|
625
|
+
selected.push(record);
|
|
626
|
+
const row = rows?.get(record.doc);
|
|
627
|
+
if (row) row.disposition = 'selected';
|
|
628
|
+
if (selected.length >= maxItems) break;
|
|
629
|
+
}
|
|
617
630
|
}
|
|
618
631
|
|
|
619
632
|
if (rows) options.audit?.push(...rows.values());
|
|
@@ -666,6 +679,7 @@ export function docsToContent(docs: Doc[], date: string, audit?: PlanAuditRow[])
|
|
|
666
679
|
const planned = planEpisode(docs, {
|
|
667
680
|
maxItems: maxItemsFromEnv(),
|
|
668
681
|
perSourceCap: perSourceCapFromEnv(),
|
|
682
|
+
backfillCapped: backfillCappedFromEnv(),
|
|
669
683
|
date,
|
|
670
684
|
audit,
|
|
671
685
|
});
|
|
@@ -701,6 +715,10 @@ function perSourceCapFromEnv(): number {
|
|
|
701
715
|
return Number.isFinite(n) && n > 0 ? n : PER_SOURCE_CAP;
|
|
702
716
|
}
|
|
703
717
|
|
|
718
|
+
function backfillCappedFromEnv(): boolean {
|
|
719
|
+
return process.env.EPISODE_PLAN_BACKFILL_CAPPED === 'true';
|
|
720
|
+
}
|
|
721
|
+
|
|
704
722
|
/** Plan date shared by both modes: `EPISODE_PLAN_DATE` (YYYYMMDD or ISO) else today UTC. */
|
|
705
723
|
function resolvePlanDate(): string {
|
|
706
724
|
const raw = process.env.EPISODE_PLAN_DATE ?? new Date().toISOString().slice(0, 10);
|
|
@@ -17441,7 +17441,19 @@ var omniVoiceGenContentSchema = ContentSchema.extend({
|
|
|
17441
17441
|
})
|
|
17442
17442
|
});
|
|
17443
17443
|
var VideoVisualModeSchema = _enum(["editorial", "avatar", "hybrid-pip"]);
|
|
17444
|
-
var VideoRenderProviderSchema = _enum([
|
|
17444
|
+
var VideoRenderProviderSchema = _enum([
|
|
17445
|
+
"local-ken-burns",
|
|
17446
|
+
"wan21-i2v",
|
|
17447
|
+
"comfyui-minimax-h3",
|
|
17448
|
+
"musetalk",
|
|
17449
|
+
"echomimic-v2"
|
|
17450
|
+
]);
|
|
17451
|
+
var RenderProvenanceSchema = object2({
|
|
17452
|
+
cache: _enum(["drive", "local"]),
|
|
17453
|
+
comfyuiCommit: string2().min(1).optional(),
|
|
17454
|
+
comfyuiRuntimeCommit: string2().min(1).nullable().optional(),
|
|
17455
|
+
modelCache: object2({ verified: boolean2(), restored: number2().int().nonnegative() }).optional()
|
|
17456
|
+
});
|
|
17445
17457
|
var videoGenContentSchema = ContentSchema.extend({
|
|
17446
17458
|
format: literal("video"),
|
|
17447
17459
|
metadata: looseObject({
|
|
@@ -17454,6 +17466,7 @@ var videoGenContentSchema = ContentSchema.extend({
|
|
|
17454
17466
|
durationSec: number2().positive(),
|
|
17455
17467
|
visualMode: VideoVisualModeSchema,
|
|
17456
17468
|
renderProvider: VideoRenderProviderSchema,
|
|
17469
|
+
renderProvenance: RenderProvenanceSchema.optional(),
|
|
17457
17470
|
fallbackUsed: boolean2().optional(),
|
|
17458
17471
|
warnings: array(string2()).optional(),
|
|
17459
17472
|
ccuEstimated: number2().nonnegative().optional(),
|
|
@@ -17779,7 +17779,19 @@ var omniVoiceGenContentSchema = ContentSchema.extend({
|
|
|
17779
17779
|
})
|
|
17780
17780
|
});
|
|
17781
17781
|
var VideoVisualModeSchema = _enum(["editorial", "avatar", "hybrid-pip"]);
|
|
17782
|
-
var VideoRenderProviderSchema = _enum([
|
|
17782
|
+
var VideoRenderProviderSchema = _enum([
|
|
17783
|
+
"local-ken-burns",
|
|
17784
|
+
"wan21-i2v",
|
|
17785
|
+
"comfyui-minimax-h3",
|
|
17786
|
+
"musetalk",
|
|
17787
|
+
"echomimic-v2"
|
|
17788
|
+
]);
|
|
17789
|
+
var RenderProvenanceSchema = object({
|
|
17790
|
+
cache: _enum(["drive", "local"]),
|
|
17791
|
+
comfyuiCommit: string2().min(1).optional(),
|
|
17792
|
+
comfyuiRuntimeCommit: string2().min(1).nullable().optional(),
|
|
17793
|
+
modelCache: object({ verified: boolean2(), restored: number2().int().nonnegative() }).optional()
|
|
17794
|
+
});
|
|
17783
17795
|
var videoGenContentSchema = ContentSchema.extend({
|
|
17784
17796
|
format: literal("video"),
|
|
17785
17797
|
metadata: looseObject({
|
|
@@ -17792,6 +17804,7 @@ var videoGenContentSchema = ContentSchema.extend({
|
|
|
17792
17804
|
durationSec: number2().positive(),
|
|
17793
17805
|
visualMode: VideoVisualModeSchema,
|
|
17794
17806
|
renderProvider: VideoRenderProviderSchema,
|
|
17807
|
+
renderProvenance: RenderProvenanceSchema.optional(),
|
|
17795
17808
|
fallbackUsed: boolean2().optional(),
|
|
17796
17809
|
warnings: array(string2()).optional(),
|
|
17797
17810
|
ccuEstimated: number2().nonnegative().optional(),
|
|
@@ -27615,7 +27615,7 @@ var init_content_limits = __esm(() => {
|
|
|
27615
27615
|
});
|
|
27616
27616
|
|
|
27617
27617
|
// ../../packages/kk-core/src/schemas.ts
|
|
27618
|
-
var DocSchema, ContentSchema, ResultSchema, TargetOutcomeSchema, AggregateResultSchema, DocListSchema, omniVoiceGenContentSchema, VideoVisualModeSchema, VideoRenderProviderSchema, videoGenContentSchema;
|
|
27618
|
+
var DocSchema, ContentSchema, ResultSchema, TargetOutcomeSchema, AggregateResultSchema, DocListSchema, omniVoiceGenContentSchema, VideoVisualModeSchema, VideoRenderProviderSchema, RenderProvenanceSchema, videoGenContentSchema;
|
|
27619
27619
|
var init_schemas5 = __esm(() => {
|
|
27620
27620
|
init_zod2();
|
|
27621
27621
|
DocSchema = object3({
|
|
@@ -27685,7 +27685,19 @@ var init_schemas5 = __esm(() => {
|
|
|
27685
27685
|
})
|
|
27686
27686
|
});
|
|
27687
27687
|
VideoVisualModeSchema = _enum2(["editorial", "avatar", "hybrid-pip"]);
|
|
27688
|
-
VideoRenderProviderSchema = _enum2([
|
|
27688
|
+
VideoRenderProviderSchema = _enum2([
|
|
27689
|
+
"local-ken-burns",
|
|
27690
|
+
"wan21-i2v",
|
|
27691
|
+
"comfyui-minimax-h3",
|
|
27692
|
+
"musetalk",
|
|
27693
|
+
"echomimic-v2"
|
|
27694
|
+
]);
|
|
27695
|
+
RenderProvenanceSchema = object3({
|
|
27696
|
+
cache: _enum2(["drive", "local"]),
|
|
27697
|
+
comfyuiCommit: string4().min(1).optional(),
|
|
27698
|
+
comfyuiRuntimeCommit: string4().min(1).nullable().optional(),
|
|
27699
|
+
modelCache: object3({ verified: boolean4(), restored: number4().int().nonnegative() }).optional()
|
|
27700
|
+
});
|
|
27689
27701
|
videoGenContentSchema = ContentSchema.extend({
|
|
27690
27702
|
format: literal("video"),
|
|
27691
27703
|
metadata: looseObject({
|
|
@@ -27698,6 +27710,7 @@ var init_schemas5 = __esm(() => {
|
|
|
27698
27710
|
durationSec: number4().positive(),
|
|
27699
27711
|
visualMode: VideoVisualModeSchema,
|
|
27700
27712
|
renderProvider: VideoRenderProviderSchema,
|
|
27713
|
+
renderProvenance: RenderProvenanceSchema.optional(),
|
|
27701
27714
|
fallbackUsed: boolean4().optional(),
|
|
27702
27715
|
warnings: array2(string4()).optional(),
|
|
27703
27716
|
ccuEstimated: number4().nonnegative().optional(),
|
|
@@ -17438,7 +17438,19 @@ var omniVoiceGenContentSchema = ContentSchema.extend({
|
|
|
17438
17438
|
})
|
|
17439
17439
|
});
|
|
17440
17440
|
var VideoVisualModeSchema = _enum(["editorial", "avatar", "hybrid-pip"]);
|
|
17441
|
-
var VideoRenderProviderSchema = _enum([
|
|
17441
|
+
var VideoRenderProviderSchema = _enum([
|
|
17442
|
+
"local-ken-burns",
|
|
17443
|
+
"wan21-i2v",
|
|
17444
|
+
"comfyui-minimax-h3",
|
|
17445
|
+
"musetalk",
|
|
17446
|
+
"echomimic-v2"
|
|
17447
|
+
]);
|
|
17448
|
+
var RenderProvenanceSchema = object({
|
|
17449
|
+
cache: _enum(["drive", "local"]),
|
|
17450
|
+
comfyuiCommit: string2().min(1).optional(),
|
|
17451
|
+
comfyuiRuntimeCommit: string2().min(1).nullable().optional(),
|
|
17452
|
+
modelCache: object({ verified: boolean2(), restored: number2().int().nonnegative() }).optional()
|
|
17453
|
+
});
|
|
17442
17454
|
var videoGenContentSchema = ContentSchema.extend({
|
|
17443
17455
|
format: literal("video"),
|
|
17444
17456
|
metadata: looseObject({
|
|
@@ -17451,6 +17463,7 @@ var videoGenContentSchema = ContentSchema.extend({
|
|
|
17451
17463
|
durationSec: number2().positive(),
|
|
17452
17464
|
visualMode: VideoVisualModeSchema,
|
|
17453
17465
|
renderProvider: VideoRenderProviderSchema,
|
|
17466
|
+
renderProvenance: RenderProvenanceSchema.optional(),
|
|
17454
17467
|
fallbackUsed: boolean2().optional(),
|
|
17455
17468
|
warnings: array(string2()).optional(),
|
|
17456
17469
|
ccuEstimated: number2().nonnegative().optional(),
|
|
@@ -17441,7 +17441,19 @@ var omniVoiceGenContentSchema = ContentSchema.extend({
|
|
|
17441
17441
|
})
|
|
17442
17442
|
});
|
|
17443
17443
|
var VideoVisualModeSchema = _enum(["editorial", "avatar", "hybrid-pip"]);
|
|
17444
|
-
var VideoRenderProviderSchema = _enum([
|
|
17444
|
+
var VideoRenderProviderSchema = _enum([
|
|
17445
|
+
"local-ken-burns",
|
|
17446
|
+
"wan21-i2v",
|
|
17447
|
+
"comfyui-minimax-h3",
|
|
17448
|
+
"musetalk",
|
|
17449
|
+
"echomimic-v2"
|
|
17450
|
+
]);
|
|
17451
|
+
var RenderProvenanceSchema = object2({
|
|
17452
|
+
cache: _enum(["drive", "local"]),
|
|
17453
|
+
comfyuiCommit: string2().min(1).optional(),
|
|
17454
|
+
comfyuiRuntimeCommit: string2().min(1).nullable().optional(),
|
|
17455
|
+
modelCache: object2({ verified: boolean2(), restored: number2().int().nonnegative() }).optional()
|
|
17456
|
+
});
|
|
17445
17457
|
var videoGenContentSchema = ContentSchema.extend({
|
|
17446
17458
|
format: literal("video"),
|
|
17447
17459
|
metadata: looseObject({
|
|
@@ -17454,6 +17466,7 @@ var videoGenContentSchema = ContentSchema.extend({
|
|
|
17454
17466
|
durationSec: number2().positive(),
|
|
17455
17467
|
visualMode: VideoVisualModeSchema,
|
|
17456
17468
|
renderProvider: VideoRenderProviderSchema,
|
|
17469
|
+
renderProvenance: RenderProvenanceSchema.optional(),
|
|
17457
17470
|
fallbackUsed: boolean2().optional(),
|
|
17458
17471
|
warnings: array(string2()).optional(),
|
|
17459
17472
|
ccuEstimated: number2().nonnegative().optional(),
|