@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
|
@@ -20950,6 +20950,9 @@ function rename(from, to) {
|
|
|
20950
20950
|
function chmod(path, mode) {
|
|
20951
20951
|
chmodSync(path, mode);
|
|
20952
20952
|
}
|
|
20953
|
+
function createExclusiveFile(path) {
|
|
20954
|
+
closeSync(openSync(path, "wx", 384));
|
|
20955
|
+
}
|
|
20953
20956
|
|
|
20954
20957
|
// ../../packages/publish-harness/src/bot-transaction.ts
|
|
20955
20958
|
import { homedir } from "os";
|
|
@@ -21197,8 +21200,18 @@ function sha256Hex(value) {
|
|
|
21197
21200
|
}
|
|
21198
21201
|
|
|
21199
21202
|
// ../../packages/publish-harness/src/bot.ts
|
|
21203
|
+
var BOT_SCHEMA_VERSION = 1;
|
|
21204
|
+
var BOT_METADATA_FILE = "bot.json";
|
|
21200
21205
|
var DEFAULT_BOT_PROFILE_ROOT = join3(homedir3(), ".config", "kk", "browser-profiles");
|
|
21206
|
+
var ISO_DATE_TIME = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})$/;
|
|
21201
21207
|
var MAX_IDENTITY_LENGTH = 128;
|
|
21208
|
+
var CONTROL_CHARACTERS = /\p{Cc}/u;
|
|
21209
|
+
function isSessionFactDate(value) {
|
|
21210
|
+
return typeof value === "string" && ISO_DATE_TIME.test(value) && Number.isFinite(Date.parse(value));
|
|
21211
|
+
}
|
|
21212
|
+
function isSessionFactIdentity(value) {
|
|
21213
|
+
return typeof value === "string" && value.length > 0 && value.length <= MAX_IDENTITY_LENGTH && !CONTROL_CHARACTERS.test(value);
|
|
21214
|
+
}
|
|
21202
21215
|
function normalizeSessionIdentity(value) {
|
|
21203
21216
|
if (typeof value !== "string")
|
|
21204
21217
|
return;
|
|
@@ -21215,6 +21228,124 @@ class BotError extends Error {
|
|
|
21215
21228
|
this.details = details;
|
|
21216
21229
|
}
|
|
21217
21230
|
}
|
|
21231
|
+
function isStoredDefaultUrl(value, allowQuery) {
|
|
21232
|
+
let url;
|
|
21233
|
+
try {
|
|
21234
|
+
url = new URL(value);
|
|
21235
|
+
} catch {
|
|
21236
|
+
return false;
|
|
21237
|
+
}
|
|
21238
|
+
if (url.protocol !== "http:" && url.protocol !== "https:")
|
|
21239
|
+
return false;
|
|
21240
|
+
if (url.username !== "" || url.password !== "")
|
|
21241
|
+
return false;
|
|
21242
|
+
if (url.hash !== "")
|
|
21243
|
+
return false;
|
|
21244
|
+
if (!allowQuery && url.search !== "")
|
|
21245
|
+
return false;
|
|
21246
|
+
const stored = `${url.origin}${url.pathname}${allowQuery ? url.search : ""}`;
|
|
21247
|
+
return stored === value;
|
|
21248
|
+
}
|
|
21249
|
+
function parseBotMetadata(raw, source = "bot metadata") {
|
|
21250
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
21251
|
+
throw new BotError("persistence", `${source}: expected a JSON object`);
|
|
21252
|
+
}
|
|
21253
|
+
const record = raw;
|
|
21254
|
+
if (record.schemaVersion !== BOT_SCHEMA_VERSION) {
|
|
21255
|
+
throw new BotError("persistence", `${source}: unsupported schemaVersion ${JSON.stringify(record.schemaVersion)}`);
|
|
21256
|
+
}
|
|
21257
|
+
const evidence = record.authenticationEvidence;
|
|
21258
|
+
if (evidence !== "operator-confirmed" && evidence !== "site-verified") {
|
|
21259
|
+
throw new BotError("persistence", `${source}: authenticationEvidence must be operator-confirmed|site-verified`);
|
|
21260
|
+
}
|
|
21261
|
+
let pluginName;
|
|
21262
|
+
if (record.pluginName !== undefined) {
|
|
21263
|
+
if (typeof record.pluginName !== "string" || record.pluginName.length === 0) {
|
|
21264
|
+
throw new BotError("persistence", `${source}: pluginName must be a non-empty string`);
|
|
21265
|
+
}
|
|
21266
|
+
pluginName = record.pluginName;
|
|
21267
|
+
}
|
|
21268
|
+
const allowQuery = pluginName !== undefined;
|
|
21269
|
+
if (typeof record.defaultUrl !== "string" || !isStoredDefaultUrl(record.defaultUrl, allowQuery)) {
|
|
21270
|
+
throw new BotError("persistence", `${source}: defaultUrl must be an http(s) origin+pathname` + (allowQuery ? " with at most a plugin-fixed query" : ""));
|
|
21271
|
+
}
|
|
21272
|
+
const metadata = {
|
|
21273
|
+
schemaVersion: BOT_SCHEMA_VERSION,
|
|
21274
|
+
defaultUrl: record.defaultUrl,
|
|
21275
|
+
authenticationEvidence: evidence
|
|
21276
|
+
};
|
|
21277
|
+
if (pluginName !== undefined) {
|
|
21278
|
+
metadata.pluginName = pluginName;
|
|
21279
|
+
}
|
|
21280
|
+
if (record.lastLoginAt !== undefined) {
|
|
21281
|
+
if (!isSessionFactDate(record.lastLoginAt)) {
|
|
21282
|
+
throw new BotError("persistence", `${source}: lastLoginAt must be an ISO 8601 date-time`);
|
|
21283
|
+
}
|
|
21284
|
+
metadata.lastLoginAt = record.lastLoginAt;
|
|
21285
|
+
}
|
|
21286
|
+
if (record.lastRefreshedAt !== undefined) {
|
|
21287
|
+
if (!isSessionFactDate(record.lastRefreshedAt)) {
|
|
21288
|
+
throw new BotError("persistence", `${source}: lastRefreshedAt must be an ISO 8601 date-time`);
|
|
21289
|
+
}
|
|
21290
|
+
metadata.lastRefreshedAt = record.lastRefreshedAt;
|
|
21291
|
+
}
|
|
21292
|
+
if (record.expiresAt !== undefined) {
|
|
21293
|
+
if (!isSessionFactDate(record.expiresAt)) {
|
|
21294
|
+
throw new BotError("persistence", `${source}: expiresAt must be an ISO 8601 date-time`);
|
|
21295
|
+
}
|
|
21296
|
+
metadata.expiresAt = record.expiresAt;
|
|
21297
|
+
}
|
|
21298
|
+
if (record.identity !== undefined) {
|
|
21299
|
+
if (!isSessionFactIdentity(record.identity)) {
|
|
21300
|
+
throw new BotError("persistence", `${source}: identity must be a non-empty string of at most 128 characters without control characters`);
|
|
21301
|
+
}
|
|
21302
|
+
metadata.identity = record.identity;
|
|
21303
|
+
}
|
|
21304
|
+
return metadata;
|
|
21305
|
+
}
|
|
21306
|
+
async function readBotMetadata(fileSystem, metadataPath) {
|
|
21307
|
+
if (!await fileSystem.exists(metadataPath))
|
|
21308
|
+
return null;
|
|
21309
|
+
let text;
|
|
21310
|
+
try {
|
|
21311
|
+
text = await fileSystem.readFile(metadataPath);
|
|
21312
|
+
} catch (error) {
|
|
21313
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
21314
|
+
throw new BotError("persistence", `${metadataPath}: cannot read bot metadata: ${detail}`);
|
|
21315
|
+
}
|
|
21316
|
+
let raw;
|
|
21317
|
+
try {
|
|
21318
|
+
raw = JSON.parse(text);
|
|
21319
|
+
} catch {
|
|
21320
|
+
throw new BotError("persistence", `${metadataPath}: corrupt bot metadata (not valid JSON)`);
|
|
21321
|
+
}
|
|
21322
|
+
return parseBotMetadata(raw, metadataPath);
|
|
21323
|
+
}
|
|
21324
|
+
|
|
21325
|
+
// ../../packages/publish-harness/src/session-state.ts
|
|
21326
|
+
import { randomUUID } from "crypto";
|
|
21327
|
+
function channelStorageStatePath(profileDir) {
|
|
21328
|
+
return `${profileDir}/storage-state.json`;
|
|
21329
|
+
}
|
|
21330
|
+
async function persistChannelSessionState(context, profileDir) {
|
|
21331
|
+
const target = channelStorageStatePath(profileDir);
|
|
21332
|
+
const temporary = `${target}.${process.pid}.${randomUUID()}.tmp`;
|
|
21333
|
+
const fs = createNodeFileSystem();
|
|
21334
|
+
let reserved = false;
|
|
21335
|
+
try {
|
|
21336
|
+
createExclusiveFile(temporary);
|
|
21337
|
+
reserved = true;
|
|
21338
|
+
await context.storageState({ path: temporary });
|
|
21339
|
+
chmod(temporary, 384);
|
|
21340
|
+
await fs.rename(temporary, target);
|
|
21341
|
+
} finally {
|
|
21342
|
+
if (reserved) {
|
|
21343
|
+
await Promise.resolve().then(() => fs.deleteFile(temporary)).catch(() => {
|
|
21344
|
+
return;
|
|
21345
|
+
});
|
|
21346
|
+
}
|
|
21347
|
+
}
|
|
21348
|
+
}
|
|
21218
21349
|
// ../../packages/publish-harness/src/index.ts
|
|
21219
21350
|
import { homedir as homedir4 } from "os";
|
|
21220
21351
|
import { join as join4, resolve as resolve4 } from "path";
|
|
@@ -21274,6 +21405,7 @@ var VERDICT_PRINT_MARGIN_MS = 2000;
|
|
|
21274
21405
|
var MIN_PASS_BUDGET_MS = 5000;
|
|
21275
21406
|
var PASS_LAUNCH_RESERVE_MS = 20000;
|
|
21276
21407
|
var DEFAULT_POLL_MS = 500;
|
|
21408
|
+
var OPEN_SESSION_SAVE_DEBOUNCE_MS = 1500;
|
|
21277
21409
|
function isInstantBrowserDeath(message) {
|
|
21278
21410
|
return /target page, context or browser has been closed|browser has been closed|target closed/i.test(message);
|
|
21279
21411
|
}
|
|
@@ -21461,9 +21593,17 @@ async function openChannelSession(config, request, deps = {}, stdout = echo) {
|
|
|
21461
21593
|
} catch (error) {
|
|
21462
21594
|
stdout(`${config.channel} profile open navigation failed: ${errorMessage2(error)}`);
|
|
21463
21595
|
}
|
|
21596
|
+
const capture = createOpenSessionCapture({
|
|
21597
|
+
context,
|
|
21598
|
+
profileDir: request.profileDir,
|
|
21599
|
+
fileSystem: createNodeFileSystem(),
|
|
21600
|
+
persistStorageState: true
|
|
21601
|
+
});
|
|
21602
|
+
capture.attach(page);
|
|
21464
21603
|
await new Promise((resolveClose) => {
|
|
21465
21604
|
context.once("close", () => resolveClose());
|
|
21466
21605
|
});
|
|
21606
|
+
await capture.flush();
|
|
21467
21607
|
stdout(`${config.channel} profile open closed: ${request.profileDir}`);
|
|
21468
21608
|
return 0;
|
|
21469
21609
|
}
|
|
@@ -21624,6 +21764,68 @@ async function readIdentityOrUndefined(readIdentity, page) {
|
|
|
21624
21764
|
return;
|
|
21625
21765
|
}
|
|
21626
21766
|
}
|
|
21767
|
+
function createOpenSessionCapture(options) {
|
|
21768
|
+
const metadataPath = join5(options.profileDir, BOT_METADATA_FILE);
|
|
21769
|
+
let closing = false;
|
|
21770
|
+
let timer;
|
|
21771
|
+
let chain = Promise.resolve();
|
|
21772
|
+
options.context.once("close", () => {
|
|
21773
|
+
closing = true;
|
|
21774
|
+
});
|
|
21775
|
+
const snapshot = async () => {
|
|
21776
|
+
if (closing)
|
|
21777
|
+
return;
|
|
21778
|
+
try {
|
|
21779
|
+
if (options.persistStorageState) {
|
|
21780
|
+
await persistChannelSessionState(options.context, options.profileDir);
|
|
21781
|
+
}
|
|
21782
|
+
if (lstat(metadataPath) === null)
|
|
21783
|
+
return;
|
|
21784
|
+
const metadata = await readBotMetadata(options.fileSystem, metadataPath);
|
|
21785
|
+
if (metadata === null)
|
|
21786
|
+
return;
|
|
21787
|
+
const facts = await captureSessionFacts(options.context, metadata.defaultUrl);
|
|
21788
|
+
await writeBotMetadata(options.fileSystem, metadataPath, {
|
|
21789
|
+
...metadata,
|
|
21790
|
+
lastRefreshedAt: new Date().toISOString(),
|
|
21791
|
+
...facts.expiresAt === undefined ? {} : { expiresAt: facts.expiresAt }
|
|
21792
|
+
});
|
|
21793
|
+
} catch {}
|
|
21794
|
+
};
|
|
21795
|
+
const schedule = () => {
|
|
21796
|
+
if (closing)
|
|
21797
|
+
return;
|
|
21798
|
+
if (timer !== undefined)
|
|
21799
|
+
clearTimeout(timer);
|
|
21800
|
+
timer = setTimeout(() => {
|
|
21801
|
+
timer = undefined;
|
|
21802
|
+
chain = chain.then(snapshot);
|
|
21803
|
+
}, OPEN_SESSION_SAVE_DEBOUNCE_MS);
|
|
21804
|
+
timer.unref?.();
|
|
21805
|
+
};
|
|
21806
|
+
const attachPage = (target) => {
|
|
21807
|
+
target.on?.("load", schedule);
|
|
21808
|
+
};
|
|
21809
|
+
return {
|
|
21810
|
+
attach: (page) => {
|
|
21811
|
+
attachPage(page);
|
|
21812
|
+
options.context.on?.("page", attachPage);
|
|
21813
|
+
},
|
|
21814
|
+
flush: async () => {
|
|
21815
|
+
if (timer !== undefined) {
|
|
21816
|
+
clearTimeout(timer);
|
|
21817
|
+
timer = undefined;
|
|
21818
|
+
}
|
|
21819
|
+
closing = true;
|
|
21820
|
+
await chain;
|
|
21821
|
+
}
|
|
21822
|
+
};
|
|
21823
|
+
}
|
|
21824
|
+
async function writeBotMetadata(fileSystem, path, metadata) {
|
|
21825
|
+
await fileSystem.writeFile(path, `${JSON.stringify(metadata, null, 2)}
|
|
21826
|
+
`);
|
|
21827
|
+
chmod(path, 384);
|
|
21828
|
+
}
|
|
21627
21829
|
function errorMessage2(error) {
|
|
21628
21830
|
return error instanceof Error ? error.message : String(error);
|
|
21629
21831
|
}
|
|
@@ -26329,7 +26531,19 @@ var omniVoiceGenContentSchema = ContentSchema.extend({
|
|
|
26329
26531
|
})
|
|
26330
26532
|
});
|
|
26331
26533
|
var VideoVisualModeSchema = _enum2(["editorial", "avatar", "hybrid-pip"]);
|
|
26332
|
-
var VideoRenderProviderSchema = _enum2([
|
|
26534
|
+
var VideoRenderProviderSchema = _enum2([
|
|
26535
|
+
"local-ken-burns",
|
|
26536
|
+
"wan21-i2v",
|
|
26537
|
+
"comfyui-minimax-h3",
|
|
26538
|
+
"musetalk",
|
|
26539
|
+
"echomimic-v2"
|
|
26540
|
+
]);
|
|
26541
|
+
var RenderProvenanceSchema = object3({
|
|
26542
|
+
cache: _enum2(["drive", "local"]),
|
|
26543
|
+
comfyuiCommit: string4().min(1).optional(),
|
|
26544
|
+
comfyuiRuntimeCommit: string4().min(1).nullable().optional(),
|
|
26545
|
+
modelCache: object3({ verified: boolean4(), restored: number4().int().nonnegative() }).optional()
|
|
26546
|
+
});
|
|
26333
26547
|
var videoGenContentSchema = ContentSchema.extend({
|
|
26334
26548
|
format: literal("video"),
|
|
26335
26549
|
metadata: looseObject({
|
|
@@ -26342,6 +26556,7 @@ var videoGenContentSchema = ContentSchema.extend({
|
|
|
26342
26556
|
durationSec: number4().positive(),
|
|
26343
26557
|
visualMode: VideoVisualModeSchema,
|
|
26344
26558
|
renderProvider: VideoRenderProviderSchema,
|
|
26559
|
+
renderProvenance: RenderProvenanceSchema.optional(),
|
|
26345
26560
|
fallbackUsed: boolean4().optional(),
|
|
26346
26561
|
warnings: array2(string4()).optional(),
|
|
26347
26562
|
ccuEstimated: number4().nonnegative().optional(),
|
|
@@ -12743,7 +12743,7 @@ var init_file_system_node = () => {};
|
|
|
12743
12743
|
import { createHash } from "crypto";
|
|
12744
12744
|
import { readFileSync as readFileSync3, writeFileSync as writeFileSync2 } from "fs";
|
|
12745
12745
|
import { readFile } from "fs/promises";
|
|
12746
|
-
import { basename, dirname as
|
|
12746
|
+
import { basename as basename2, dirname as dirname4, extname as extname2, join as join5 } from "path";
|
|
12747
12747
|
import { parseArgs } from "util";
|
|
12748
12748
|
|
|
12749
12749
|
// ../../packages/kk-core/src/content-limits.ts
|
|
@@ -17444,7 +17444,19 @@ var omniVoiceGenContentSchema = ContentSchema.extend({
|
|
|
17444
17444
|
})
|
|
17445
17445
|
});
|
|
17446
17446
|
var VideoVisualModeSchema = _enum(["editorial", "avatar", "hybrid-pip"]);
|
|
17447
|
-
var VideoRenderProviderSchema = _enum([
|
|
17447
|
+
var VideoRenderProviderSchema = _enum([
|
|
17448
|
+
"local-ken-burns",
|
|
17449
|
+
"wan21-i2v",
|
|
17450
|
+
"comfyui-minimax-h3",
|
|
17451
|
+
"musetalk",
|
|
17452
|
+
"echomimic-v2"
|
|
17453
|
+
]);
|
|
17454
|
+
var RenderProvenanceSchema = object({
|
|
17455
|
+
cache: _enum(["drive", "local"]),
|
|
17456
|
+
comfyuiCommit: string2().min(1).optional(),
|
|
17457
|
+
comfyuiRuntimeCommit: string2().min(1).nullable().optional(),
|
|
17458
|
+
modelCache: object({ verified: boolean2(), restored: number2().int().nonnegative() }).optional()
|
|
17459
|
+
});
|
|
17448
17460
|
var videoGenContentSchema = ContentSchema.extend({
|
|
17449
17461
|
format: literal("video"),
|
|
17450
17462
|
metadata: looseObject({
|
|
@@ -17457,6 +17469,7 @@ var videoGenContentSchema = ContentSchema.extend({
|
|
|
17457
17469
|
durationSec: number2().positive(),
|
|
17458
17470
|
visualMode: VideoVisualModeSchema,
|
|
17459
17471
|
renderProvider: VideoRenderProviderSchema,
|
|
17472
|
+
renderProvenance: RenderProvenanceSchema.optional(),
|
|
17460
17473
|
fallbackUsed: boolean2().optional(),
|
|
17461
17474
|
warnings: array(string2()).optional(),
|
|
17462
17475
|
ccuEstimated: number2().nonnegative().optional(),
|
|
@@ -17739,6 +17752,23 @@ function splitSentences(text, options = {}) {
|
|
|
17739
17752
|
}
|
|
17740
17753
|
return results;
|
|
17741
17754
|
}
|
|
17755
|
+
// ../../packages/publish-harness/src/bot.ts
|
|
17756
|
+
import { homedir as homedir3 } from "os";
|
|
17757
|
+
import { isAbsolute, join as join3, relative, resolve as resolve3, sep } from "path";
|
|
17758
|
+
|
|
17759
|
+
// ../../packages/publish-harness/src/bot-transaction.ts
|
|
17760
|
+
import { homedir } from "os";
|
|
17761
|
+
import { dirname as dirname2, join, resolve } from "path";
|
|
17762
|
+
var DEFAULT_BOT_TRANSACTION_ROOT = join(homedir(), ".config", "kk", "browser-transactions");
|
|
17763
|
+
|
|
17764
|
+
// ../../packages/publish-harness/src/profile-lease.ts
|
|
17765
|
+
import { homedir as homedir2, hostname } from "os";
|
|
17766
|
+
import { basename, dirname as dirname3, join as join2, resolve as resolve2 } from "path";
|
|
17767
|
+
var DEFAULT_BOT_LEASE_ROOT = join2(homedir2(), ".config", "kk", "browser-leases");
|
|
17768
|
+
|
|
17769
|
+
// ../../packages/publish-harness/src/bot.ts
|
|
17770
|
+
var DEFAULT_BOT_PROFILE_ROOT = join3(homedir3(), ".config", "kk", "browser-profiles");
|
|
17771
|
+
|
|
17742
17772
|
// ../../packages/publish-harness/src/index.ts
|
|
17743
17773
|
class FakeTransportCore {
|
|
17744
17774
|
callLogs = [];
|
|
@@ -19139,7 +19169,7 @@ async function runBackfill(client, options, config) {
|
|
|
19139
19169
|
}
|
|
19140
19170
|
|
|
19141
19171
|
// ../../plugins/publishings/podcast-pub/src/corrections.ts
|
|
19142
|
-
import { join } from "path";
|
|
19172
|
+
import { join as join4 } from "path";
|
|
19143
19173
|
var EMPTY = [];
|
|
19144
19174
|
var NO_DELIVERIES = [];
|
|
19145
19175
|
function asRecord3(value) {
|
|
@@ -19347,7 +19377,7 @@ function emptyDeliveryLedger(runDate) {
|
|
|
19347
19377
|
return { schemaVersion: 1, runDate, deliveries: [] };
|
|
19348
19378
|
}
|
|
19349
19379
|
function correctionDeliveryPath(workDir, runDate) {
|
|
19350
|
-
return
|
|
19380
|
+
return join4(workDir, "31-publish", `${runDate}_16_corrections-delivery.json`);
|
|
19351
19381
|
}
|
|
19352
19382
|
async function readCorrectionDeliveries(path, runDate = null) {
|
|
19353
19383
|
try {
|
|
@@ -20342,7 +20372,7 @@ function prepareTranscript(metadata, warnings, emit = (message) => warn(message,
|
|
|
20342
20372
|
emit("transcript skipped: no local mp3Path/audioPath/audioFile to anchor the .vtt artifact next to");
|
|
20343
20373
|
return;
|
|
20344
20374
|
}
|
|
20345
|
-
const vttPath = `${
|
|
20375
|
+
const vttPath = `${join5(dirname4(source), basename2(source).replace(/\.[^.]+$/, ""))}.vtt`;
|
|
20346
20376
|
try {
|
|
20347
20377
|
writeFileSync2(vttPath, renderWebVtt(cues), "utf-8");
|
|
20348
20378
|
} catch (error) {
|
|
@@ -20443,7 +20473,7 @@ async function resolveSocialImage(client, fields, warnings) {
|
|
|
20443
20473
|
const bytes = new Uint8Array(await readFile(fields.socialLocalPath));
|
|
20444
20474
|
const prepared = await client.prepareUpload({
|
|
20445
20475
|
category: "image",
|
|
20446
|
-
full_local_file_path:
|
|
20476
|
+
full_local_file_path: basename2(fields.socialLocalPath),
|
|
20447
20477
|
size: bytes.byteLength,
|
|
20448
20478
|
type: fields.socialMime
|
|
20449
20479
|
});
|
|
@@ -20602,7 +20632,7 @@ async function hydrateShowNotesCards(client, content, warnings) {
|
|
|
20602
20632
|
const bytes = new Uint8Array(await readFile(card.imagePath));
|
|
20603
20633
|
const prepared = await client.prepareUpload({
|
|
20604
20634
|
category: "image",
|
|
20605
|
-
full_local_file_path:
|
|
20635
|
+
full_local_file_path: basename2(card.imagePath),
|
|
20606
20636
|
size: bytes.byteLength,
|
|
20607
20637
|
type: mime
|
|
20608
20638
|
});
|
|
@@ -20771,7 +20801,7 @@ async function publishEpisode(client, payload, options) {
|
|
|
20771
20801
|
const imageBytes = new Uint8Array(await readFile(episode.imagePath));
|
|
20772
20802
|
const imagePrepared = await client.prepareUpload({
|
|
20773
20803
|
category: "image",
|
|
20774
|
-
full_local_file_path:
|
|
20804
|
+
full_local_file_path: basename2(episode.imagePath),
|
|
20775
20805
|
size: imageBytes.byteLength,
|
|
20776
20806
|
type: imageMime
|
|
20777
20807
|
});
|
|
@@ -20918,7 +20948,7 @@ function getPublishTransport() {
|
|
|
20918
20948
|
return new PodcastPubTransport;
|
|
20919
20949
|
}
|
|
20920
20950
|
async function writePublishResult(outputPath, result) {
|
|
20921
|
-
const outDir =
|
|
20951
|
+
const outDir = dirname4(outputPath);
|
|
20922
20952
|
if (outDir && outDir !== ".") {
|
|
20923
20953
|
await createNodeFileSystem().ensureDir(outDir);
|
|
20924
20954
|
}
|
|
@@ -12737,7 +12737,7 @@ function findProjectRoot(startDir) {
|
|
|
12737
12737
|
var init_file_system_node = () => {};
|
|
12738
12738
|
|
|
12739
12739
|
// ../../plugins/publishings/qiita-pub/src/index.ts
|
|
12740
|
-
import { dirname as
|
|
12740
|
+
import { dirname as dirname4 } from "path";
|
|
12741
12741
|
import { parseArgs } from "util";
|
|
12742
12742
|
|
|
12743
12743
|
// ../../packages/kk-core/src/content-limits.ts
|
|
@@ -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(),
|
|
@@ -17583,6 +17596,23 @@ if (false) {}
|
|
|
17583
17596
|
var CJK_TERMINATORS = new Set(["\u3002", "\uFF01", "\uFF1F"]);
|
|
17584
17597
|
var LATIN_TERMINATORS = new Set([".", "!", "?"]);
|
|
17585
17598
|
var ATTACHED_CLOSERS = new Set(["\u201D", "\u2019", "\u300D", "\u300F", "\uFF09", ")", '"', "'"]);
|
|
17599
|
+
// ../../packages/publish-harness/src/bot.ts
|
|
17600
|
+
import { homedir as homedir3 } from "os";
|
|
17601
|
+
import { isAbsolute, join as join3, relative, resolve as resolve3, sep } from "path";
|
|
17602
|
+
|
|
17603
|
+
// ../../packages/publish-harness/src/bot-transaction.ts
|
|
17604
|
+
import { homedir } from "os";
|
|
17605
|
+
import { dirname as dirname2, join, resolve } from "path";
|
|
17606
|
+
var DEFAULT_BOT_TRANSACTION_ROOT = join(homedir(), ".config", "kk", "browser-transactions");
|
|
17607
|
+
|
|
17608
|
+
// ../../packages/publish-harness/src/profile-lease.ts
|
|
17609
|
+
import { homedir as homedir2, hostname } from "os";
|
|
17610
|
+
import { basename, dirname as dirname3, join as join2, resolve as resolve2 } from "path";
|
|
17611
|
+
var DEFAULT_BOT_LEASE_ROOT = join2(homedir2(), ".config", "kk", "browser-leases");
|
|
17612
|
+
|
|
17613
|
+
// ../../packages/publish-harness/src/bot.ts
|
|
17614
|
+
var DEFAULT_BOT_PROFILE_ROOT = join3(homedir3(), ".config", "kk", "browser-profiles");
|
|
17615
|
+
|
|
17586
17616
|
// ../../packages/publish-harness/src/index.ts
|
|
17587
17617
|
class FakeTransportCore {
|
|
17588
17618
|
callLogs = [];
|
|
@@ -17745,7 +17775,7 @@ function getPublishTransport() {
|
|
|
17745
17775
|
return new QiitaApiTransport;
|
|
17746
17776
|
}
|
|
17747
17777
|
async function writePublishResult(outputPath, result) {
|
|
17748
|
-
const outDir =
|
|
17778
|
+
const outDir = dirname4(outputPath);
|
|
17749
17779
|
if (outDir && outDir !== ".") {
|
|
17750
17780
|
await createNodeFileSystem().ensureDir(outDir);
|
|
17751
17781
|
}
|