@gobing-ai/knowledge-kit 0.1.10 → 0.1.12
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/index.js +2478 -1737
- package/package.json +1 -1
- package/plugins/generations/image-gen/README.md +108 -0
- package/plugins/generations/image-gen/assets/sample/cover__clean-webapp-ui.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/cover__cute.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/cover__daily-news.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/cover__editorial.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/cover__fresh.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/cover__minimalist.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/cover__photorealistic.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/cover__sketch.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/cover__technical-diagram.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/cover__vibrant.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/cover__warm.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/cover__xhs-knowledge.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-cover__clean-webapp-ui.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-cover__cute.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-cover__daily-news.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-cover__editorial.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-cover__fresh.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-cover__minimalist.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-cover__photorealistic.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-cover__sketch.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-cover__technical-diagram.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-cover__vibrant.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-cover__warm.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-cover__xhs-knowledge.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/free__clean-webapp-ui.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/free__cute.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/free__daily-news.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/free__editorial.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/free__fresh.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/free__minimalist.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/free__photorealistic.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/free__sketch.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/free__technical-diagram.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/free__vibrant.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/free__warm.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/free__xhs-knowledge.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/illustration__clean-webapp-ui.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/illustration__cute.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/illustration__daily-news.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/illustration__editorial.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/illustration__fresh.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/illustration__minimalist.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/illustration__photorealistic.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/illustration__sketch.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/illustration__technical-diagram.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/illustration__vibrant.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/illustration__warm.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/illustration__xhs-knowledge.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/xhs-card__clean-webapp-ui.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/xhs-card__cute.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/xhs-card__daily-news.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/xhs-card__editorial.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/xhs-card__fresh.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/xhs-card__minimalist.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/xhs-card__photorealistic.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/xhs-card__sketch.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/xhs-card__technical-diagram.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/xhs-card__vibrant.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/xhs-card__warm.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/xhs-card__xhs-knowledge.jpg +0 -0
- package/plugins/generations/image-gen/dist/index.js +102 -58
- package/plugins/generations/image-gen/scripts/compose-e2e-artifact.ts +5 -21
- package/plugins/generations/image-gen/scripts/gen-samples.ts +208 -0
- package/plugins/generations/image-gen/src/compose/chromium.ts +2 -3
- package/plugins/generations/image-gen/src/presets.ts +6 -3
- package/plugins/generations/image-gen/src/providers/errors.ts +16 -1
- package/plugins/generations/image-gen/src/providers/minimax.ts +46 -17
- package/plugins/ingestions/web-search/src/index.ts +1 -1
- package/plugins/kk/README.md +18 -0
- package/plugins/kk/commands/image-extract.md +1 -0
- package/plugins/kk/commands/image-generate.md +1 -0
- package/plugins/kk/commands/tell-me.md +1 -0
- package/plugins/kk/commands/workflow-run.md +7 -1
- package/plugins/kk/decisions/extract/it-topics.yaml +24 -0
- package/plugins/kk/decisions/kk-itc.yaml +6 -4
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/publish-presets/daily-ai-voice-migration.json +146 -0
- package/plugins/kk/publish-presets/daily-ai-voice.json +11 -3
- package/plugins/kk/schedules/kk-collect.grok-bot.md.tmpl +69 -0
- package/plugins/kk/schedules/kk-daily-ai-voice3.cron.tmpl +18 -0
- package/plugins/kk/schedules/kk-daily-publish3-cn-peak.cron.tmpl +15 -5
- package/plugins/kk/schedules/kk-daily-publish3-overseas.cron.tmpl +9 -4
- package/plugins/kk/scripts/daily-scheduled-run.ts +298 -0
- package/plugins/kk/scripts/daily-stages.ts +1403 -156
- package/plugins/kk/scripts/kk-workflow-stages.ts +266 -10
- package/plugins/kk/scripts/safety-artifact-check.ts +277 -0
- package/plugins/kk/scripts/voice3-publish-window.ts +202 -0
- package/plugins/kk/skills/article-adapt/SKILL.md +1 -0
- package/plugins/kk/skills/audio-authoring/SKILL.md +1 -0
- package/plugins/kk/skills/content-judge/SKILL.md +1 -0
- package/plugins/kk/skills/content-safety/SKILL.md +1 -0
- package/plugins/kk/skills/explain-things/SKILL.md +1 -0
- package/plugins/kk/skills/image-authoring/SKILL.md +1 -0
- package/plugins/kk/skills/itc-generating/SKILL.md +1 -0
- package/plugins/kk/skills/publish/SKILL.md +1 -0
- package/plugins/kk/skills/smart-seo/SKILL.md +1 -0
- package/plugins/kk/skills/storm-research/SKILL.md +1 -0
- package/plugins/kk/skills/taste-unslop/SKILL.md +1 -0
- package/plugins/kk/skills/topic/SKILL.md +1 -0
- package/plugins/kk/skills/web-automation/SKILL.md +1 -0
- package/plugins/kk/skills/xhs-images/SKILL.md +1 -0
- package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +177 -128
- package/plugins/kk/workflows/kk-daily-ai-voice3.yaml +161 -61
- package/plugins/kk/workflows/kk-daily-publish3.yaml +82 -26
- package/plugins/kk/workflows/kk-daily-safety.yaml +156 -69
- package/plugins/kk/workflows/kk-itc-author.yaml +75 -0
- package/plugins/kk/workflows/kk-itc-publish-tail.yaml +25 -3
- package/plugins/kk/workflows/kk-itc.yaml +36 -4
- package/plugins/publishings/bilibili-pub/dist/index.js +2 -1
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +2 -1
- package/plugins/publishings/cnblogs-pub/dist/index.js +2 -1
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +2 -1
- package/plugins/publishings/csdn-pub/dist/index.js +2 -1
- package/plugins/publishings/csdn-pub/dist/profile-check.js +2 -1
- package/plugins/publishings/infoq-pub/dist/index.js +2 -1
- package/plugins/publishings/infoq-pub/dist/profile-check.js +2 -1
- package/plugins/publishings/jike-pub/dist/index.js +2 -1
- package/plugins/publishings/jike-pub/dist/profile-check.js +2 -1
- package/plugins/publishings/juejin-pub/dist/index.js +2 -1
- package/plugins/publishings/juejin-pub/dist/profile-check.js +2 -1
- package/plugins/publishings/linkedin-pub/dist/index.js +21333 -0
- package/plugins/publishings/linkedin-pub/dist/profile-check.js +21005 -0
- package/plugins/publishings/linkedin-pub/package.json +19 -0
- package/plugins/publishings/linkedin-pub/plugin.json +12 -0
- package/plugins/publishings/linkedin-pub/src/index.ts +705 -0
- package/plugins/publishings/linkedin-pub/src/profile-check.ts +17 -0
- package/plugins/publishings/linkedin-pub/tsconfig.json +4 -0
- package/plugins/publishings/podcast-pub/dist/index.js +46 -8
- package/plugins/publishings/podcast-pub/src/index.ts +62 -5
- package/plugins/publishings/shipinhao-pub/dist/index.js +2 -1
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +2 -1
- package/plugins/publishings/sspai-pub/dist/index.js +2 -1
- package/plugins/publishings/sspai-pub/dist/profile-check.js +2 -1
- package/plugins/publishings/substack-pub/dist/index.js +2 -1
- package/plugins/publishings/substack-pub/dist/profile-check.js +2 -1
- package/plugins/publishings/surfdash-pub/dist/index.js +461 -53
- package/plugins/publishings/surfdash-pub/src/digest-check.ts +85 -19
- package/plugins/publishings/surfdash-pub/src/index.ts +592 -65
- package/plugins/publishings/threads-pub/dist/index.js +7 -0
- package/plugins/publishings/threads-pub/src/index.ts +12 -0
- package/plugins/publishings/wechatmp-pub/dist/index.js +936 -98
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +60 -3
- package/plugins/publishings/wechatmp-pub/src/flow.ts +1134 -86
- package/plugins/publishings/wechatmp-pub/src/index.ts +112 -30
- package/plugins/publishings/wechatmp-pub/src/page.ts +105 -0
- package/plugins/publishings/weibo-pub/dist/index.js +2 -1
- package/plugins/publishings/weibo-pub/dist/profile-check.js +2 -1
- package/plugins/publishings/x-pub/dist/index.js +9 -1
- package/plugins/publishings/x-pub/dist/profile-check.js +2 -1
- package/plugins/publishings/x-pub/src/index.ts +11 -0
- package/plugins/publishings/xhs-pub/dist/index.js +2 -1
- package/plugins/publishings/xhs-pub/dist/profile-check.js +2 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +2 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +2 -1
|
@@ -20026,9 +20026,11 @@ import { isAbsolute, join as join3, relative, resolve as resolve3, sep } from "p
|
|
|
20026
20026
|
// ../../packages/publish-harness/src/bot-fs.ts
|
|
20027
20027
|
import {
|
|
20028
20028
|
chmodSync,
|
|
20029
|
+
closeSync,
|
|
20029
20030
|
copyFileSync,
|
|
20030
20031
|
lstatSync,
|
|
20031
20032
|
mkdirSync as mkdirSync2,
|
|
20033
|
+
openSync,
|
|
20032
20034
|
readdirSync as readdirSync2,
|
|
20033
20035
|
realpathSync as realpathSync2,
|
|
20034
20036
|
rmdirSync
|
|
@@ -20069,6 +20071,9 @@ function rmdir(path) {
|
|
|
20069
20071
|
function chmod(path, mode) {
|
|
20070
20072
|
chmodSync(path, mode);
|
|
20071
20073
|
}
|
|
20074
|
+
function createExclusiveFile(path) {
|
|
20075
|
+
closeSync(openSync(path, "wx", 384));
|
|
20076
|
+
}
|
|
20072
20077
|
|
|
20073
20078
|
// ../../packages/publish-harness/src/bot-transaction.ts
|
|
20074
20079
|
import { homedir } from "os";
|
|
@@ -20273,7 +20278,6 @@ class BotError extends Error {
|
|
|
20273
20278
|
this.code = code;
|
|
20274
20279
|
}
|
|
20275
20280
|
}
|
|
20276
|
-
|
|
20277
20281
|
// ../../packages/publish-harness/src/index.ts
|
|
20278
20282
|
import { homedir as homedir4 } from "os";
|
|
20279
20283
|
import { join as join4, resolve as resolve4 } from "path";
|
|
@@ -20409,6 +20413,12 @@ async function waitUntil(predicate, timeoutMs, pollMs = DEFAULT_POLL_MS) {
|
|
|
20409
20413
|
}
|
|
20410
20414
|
return predicate();
|
|
20411
20415
|
}
|
|
20416
|
+
var DEFAULT_SIGNAL_CONTAINERS = [
|
|
20417
|
+
'[class*="toast" i]',
|
|
20418
|
+
'[class*="notification" i]',
|
|
20419
|
+
'[role="alert"]',
|
|
20420
|
+
'[class*="message" i]'
|
|
20421
|
+
];
|
|
20412
20422
|
function errorMessage2(error) {
|
|
20413
20423
|
return error instanceof Error ? error.message : String(error);
|
|
20414
20424
|
}
|
|
@@ -20416,6 +20426,9 @@ function errorMessage2(error) {
|
|
|
20416
20426
|
// ../../plugins/publishings/wechatmp-pub/src/profile-check.ts
|
|
20417
20427
|
init_dist();
|
|
20418
20428
|
|
|
20429
|
+
// ../../plugins/publishings/wechatmp-pub/src/index.ts
|
|
20430
|
+
import { randomUUID } from "crypto";
|
|
20431
|
+
|
|
20419
20432
|
// ../../packages/kk-core/src/content-limits.ts
|
|
20420
20433
|
var PLATFORM_CONTENT_LIMITS = Object.freeze({
|
|
20421
20434
|
schemaVersion: 5,
|
|
@@ -20686,6 +20699,9 @@ if (false) {}
|
|
|
20686
20699
|
var CJK_TERMINATORS = new Set(["\u3002", "\uFF01", "\uFF1F"]);
|
|
20687
20700
|
var LATIN_TERMINATORS = new Set([".", "!", "?"]);
|
|
20688
20701
|
var ATTACHED_CLOSERS = new Set(["\u201D", "\u2019", "\u300D", "\u300F", "\uFF09", ")", '"', "'"]);
|
|
20702
|
+
// ../../plugins/publishings/wechatmp-pub/src/index.ts
|
|
20703
|
+
init_dist();
|
|
20704
|
+
|
|
20689
20705
|
// ../../plugins/publishings/wechatmp-pub/src/cgi.ts
|
|
20690
20706
|
var MP_ORIGIN = "https://mp.weixin.qq.com";
|
|
20691
20707
|
var FILETRANSFER_URL = `${MP_ORIGIN}/cgi-bin/filetransfer`;
|
|
@@ -20747,6 +20763,13 @@ var URL_CANCEL = `${URL_POPOVER} a.jsPopoverBt:text-is("\u53D6\u6D88")`;
|
|
|
20747
20763
|
var ORIGINAL_DECLARATION = `${DIALOG} label:has(.js_original_type_radio):has-text("\u6587\u5B57\u539F\u521B")`;
|
|
20748
20764
|
var ORIGINAL_AGREEMENT = `${DIALOG} label.original_agreement:has(input[type="checkbox"]:not(:checked))`;
|
|
20749
20765
|
|
|
20766
|
+
// ../../plugins/publishings/wechatmp-pub/src/flow.ts
|
|
20767
|
+
var PUBLIC_SAVE_REFUSAL_CONTAINERS = [
|
|
20768
|
+
...DEFAULT_SIGNAL_CONTAINERS,
|
|
20769
|
+
"div.version_fail_dialog:visible",
|
|
20770
|
+
"div.weui-desktop-dialog:visible"
|
|
20771
|
+
];
|
|
20772
|
+
|
|
20750
20773
|
// ../../plugins/publishings/wechatmp-pub/src/index.ts
|
|
20751
20774
|
var CHANNEL = TARGET;
|
|
20752
20775
|
var CONSOLE_READY_TIMEOUT_MS = 30000;
|
|
@@ -20756,6 +20779,25 @@ function isConsoleReady(page) {
|
|
|
20756
20779
|
function storageStatePath(profileDir) {
|
|
20757
20780
|
return `${profileDir}/storage-state.json`;
|
|
20758
20781
|
}
|
|
20782
|
+
async function persistWechatSessionState(context, profileDir) {
|
|
20783
|
+
const target = storageStatePath(profileDir);
|
|
20784
|
+
const temporary = `${target}.${process.pid}.${randomUUID()}.tmp`;
|
|
20785
|
+
const fs = createNodeFileSystem();
|
|
20786
|
+
let reserved = false;
|
|
20787
|
+
try {
|
|
20788
|
+
createExclusiveFile(temporary);
|
|
20789
|
+
reserved = true;
|
|
20790
|
+
await context.storageState({ path: temporary });
|
|
20791
|
+
chmod(temporary, 384);
|
|
20792
|
+
await fs.rename(temporary, target);
|
|
20793
|
+
} finally {
|
|
20794
|
+
if (reserved) {
|
|
20795
|
+
await Promise.resolve().then(() => fs.deleteFile(temporary)).catch(() => {
|
|
20796
|
+
return;
|
|
20797
|
+
});
|
|
20798
|
+
}
|
|
20799
|
+
}
|
|
20800
|
+
}
|
|
20759
20801
|
async function checkWechatSession(profileDir, opts = {}) {
|
|
20760
20802
|
const { page, context } = await openWithState(profileDir, opts.headless ?? true);
|
|
20761
20803
|
try {
|
|
@@ -20778,6 +20820,8 @@ async function openWechatLogin(opts) {
|
|
|
20778
20820
|
headless: false,
|
|
20779
20821
|
launcher: kkBrowserLauncher
|
|
20780
20822
|
});
|
|
20823
|
+
let failed = false;
|
|
20824
|
+
let failure;
|
|
20781
20825
|
try {
|
|
20782
20826
|
const page = context.pages()[0] ?? await context.newPage();
|
|
20783
20827
|
await page.goto(CONSOLE_URL);
|
|
@@ -20785,10 +20829,23 @@ async function openWechatLogin(opts) {
|
|
|
20785
20829
|
if (!ready)
|
|
20786
20830
|
throw new Error(`QR scan not completed within ${timeoutMs / 1000}s`);
|
|
20787
20831
|
await page.waitForTimeout(1e4);
|
|
20788
|
-
|
|
20789
|
-
|
|
20832
|
+
try {
|
|
20833
|
+
await persistWechatSessionState(context, opts.profileDir);
|
|
20834
|
+
} catch {
|
|
20835
|
+
throw new Error("wechatmp authenticated session snapshot failed");
|
|
20836
|
+
}
|
|
20837
|
+
} catch (error) {
|
|
20838
|
+
failed = true;
|
|
20839
|
+
failure = error;
|
|
20840
|
+
}
|
|
20841
|
+
try {
|
|
20790
20842
|
await context.close();
|
|
20843
|
+
} catch {
|
|
20844
|
+
if (!failed)
|
|
20845
|
+
echoError("wechatmp browser context close failed after authenticated session snapshot; saved state preserved");
|
|
20791
20846
|
}
|
|
20847
|
+
if (failed)
|
|
20848
|
+
throw failure;
|
|
20792
20849
|
}
|
|
20793
20850
|
async function openWechatSession(profileDir, opts = {}) {
|
|
20794
20851
|
const { context } = await openWithState(profileDir, opts.headless ?? false, opts.url ?? CONSOLE_URL);
|