@gobing-ai/knowledge-kit 0.1.24 → 0.1.25
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 +302 -59
- package/package.json +1 -1
- package/plugins/generations/episode-plan-gen/dist/index.js +47 -6
- package/plugins/generations/episode-plan-gen/src/index.ts +71 -7
- package/plugins/generations/music-gen/dist/index.js +17 -13
- package/plugins/generations/music-gen/src/audio/measure.ts +25 -20
- package/plugins/kk/decisions/extract/ai-news.yaml +8 -1
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/publish-presets/daily-ai-voice.json +4 -4
- package/plugins/kk/publish-presets/itc-main.json +39 -23
- package/plugins/kk/scripts/daily-stages.ts +500 -33
- package/plugins/kk/scripts/kk-workflow-stages.ts +5 -0
- package/plugins/kk/skills/content-safety/references/platforms/apple-podcasts.md +12 -5
- package/plugins/kk/skills/content-safety/references/platforms/wechatmp.md +8 -0
- package/plugins/kk/skills/content-safety/references/platforms/xiaoyuzhou.md +5 -0
- package/plugins/kk/skills/daily-news-cover/SKILL.md +96 -0
- package/plugins/kk/skills/daily-news-illustrations/SKILL.md +123 -0
- package/plugins/kk/skills/news-editorial/SKILL.md +5 -3
- package/plugins/kk/skills/news-editorial/references/daily-visual-composition.md +150 -0
- package/plugins/kk/skills/news-editorial/references/style-contract.zh.md +1 -1
- package/plugins/kk/workflows/kk-article-generate.yaml +13 -1
- package/plugins/kk/workflows/kk-daily-ai-voice.yaml +6 -3
- package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +6 -4
- package/plugins/kk/workflows/kk-news-generate.yaml +71 -1
- package/plugins/publishings/bilibili-pub/dist/index.js +3 -2
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +3 -2
- package/plugins/publishings/cnblogs-pub/dist/index.js +3 -2
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +3 -2
- package/plugins/publishings/csdn-pub/dist/index.js +3 -2
- package/plugins/publishings/csdn-pub/dist/profile-check.js +3 -2
- package/plugins/publishings/infoq-pub/dist/index.js +3 -2
- package/plugins/publishings/infoq-pub/dist/profile-check.js +3 -2
- package/plugins/publishings/jike-pub/dist/index.js +3 -2
- package/plugins/publishings/jike-pub/dist/profile-check.js +3 -2
- package/plugins/publishings/juejin-pub/dist/index.js +3 -2
- package/plugins/publishings/juejin-pub/dist/profile-check.js +3 -2
- package/plugins/publishings/linkedin-pub/dist/index.js +3 -2
- package/plugins/publishings/linkedin-pub/dist/profile-check.js +3 -2
- package/plugins/publishings/medium-pub/dist/index.js +9198 -279
- package/plugins/publishings/medium-pub/dist/profile-check.js +21174 -0
- package/plugins/publishings/medium-pub/package.json +3 -1
- package/plugins/publishings/medium-pub/plugin.json +6 -1
- package/plugins/publishings/medium-pub/src/browser-rail.ts +280 -0
- package/plugins/publishings/medium-pub/src/index.ts +17 -1
- package/plugins/publishings/medium-pub/src/profile-check.ts +27 -0
- package/plugins/publishings/shipinhao-pub/dist/index.js +6 -3
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +5 -3
- package/plugins/publishings/shipinhao-pub/src/flow.ts +5 -0
- package/plugins/publishings/shipinhao-pub/src/selectors.ts +11 -4
- package/plugins/publishings/sspai-pub/dist/index.js +3 -2
- package/plugins/publishings/sspai-pub/dist/profile-check.js +3 -2
- package/plugins/publishings/substack-pub/dist/index.js +3 -2
- package/plugins/publishings/substack-pub/dist/profile-check.js +3 -2
- package/plugins/publishings/threads-pub/dist/index.js +3 -2
- package/plugins/publishings/threads-pub/dist/profile-check.js +3 -2
- package/plugins/publishings/wechatmp-pub/dist/index.js +262 -42
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +3 -2
- package/plugins/publishings/wechatmp-pub/src/flow.ts +447 -53
- package/plugins/publishings/wechatmp-pub/src/index.ts +4 -1
- package/plugins/publishings/wechatmp-pub/src/page.ts +8 -0
- package/plugins/publishings/weibo-pub/dist/index.js +3 -2
- package/plugins/publishings/weibo-pub/dist/profile-check.js +3 -2
- package/plugins/publishings/x-pub/dist/index.js +3 -2
- package/plugins/publishings/x-pub/dist/profile-check.js +3 -2
- package/plugins/publishings/xhs-pub/dist/index.js +3 -2
- package/plugins/publishings/xhs-pub/dist/profile-check.js +3 -2
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +3 -2
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +3 -2
|
@@ -298,7 +298,10 @@ export const wechatSessionConfig: ChannelBrowserConfig = {
|
|
|
298
298
|
* trying.
|
|
299
299
|
*/
|
|
300
300
|
async function defaultOpenConsole(profileDir: string): Promise<OpenedConsole> {
|
|
301
|
-
|
|
301
|
+
// Headless is the unattended default (ADR-026). `WECHATMP_HEADLESS=false` is the operator repro
|
|
302
|
+
// switch: the 音频 upload dialog's progress text is rendered by the console, and a headed pass is
|
|
303
|
+
// the only way to see what it actually shows when the upload never reads 100% (2026-11-23).
|
|
304
|
+
const { page, context } = await openWithState(profileDir, process.env.WECHATMP_HEADLESS !== 'false');
|
|
302
305
|
return {
|
|
303
306
|
...wrapPlaywrightContext(context, page),
|
|
304
307
|
persistSession: () => persistWechatSessionState(context, profileDir),
|
|
@@ -55,6 +55,11 @@ export interface WechatPage {
|
|
|
55
55
|
press?(key: string): Promise<void>;
|
|
56
56
|
/** The page's frames, for naming what a failed read actually contained. */
|
|
57
57
|
frames?(): WechatFrame[];
|
|
58
|
+
/**
|
|
59
|
+
* Save a PNG of the page. Diagnostics only: a console dialog that fails to reach a state the
|
|
60
|
+
* text probes can read is otherwise unobservable (the 2026-11-23 音频 upload stall).
|
|
61
|
+
*/
|
|
62
|
+
screenshot?(path: string): Promise<void>;
|
|
58
63
|
}
|
|
59
64
|
|
|
60
65
|
/** One frame of the console page: enough to name it and count a signal inside it. */
|
|
@@ -353,6 +358,9 @@ export function wrapPlaywrightPage(raw: unknown): WechatPage {
|
|
|
353
358
|
},
|
|
354
359
|
}),
|
|
355
360
|
setInputFiles: (selector, paths) => pw.setInputFiles(selector, paths),
|
|
361
|
+
screenshot: async (path) => {
|
|
362
|
+
await (raw as Page).screenshot({ path });
|
|
363
|
+
},
|
|
356
364
|
url: () => pw.url(),
|
|
357
365
|
evaluate: (expression) => pw.evaluate(expression),
|
|
358
366
|
waitForTimeout: (ms) => pw.waitForTimeout(ms),
|
|
@@ -20674,7 +20674,8 @@ async function busyGuidance(fileSystem, leaseDir) {
|
|
|
20674
20674
|
}
|
|
20675
20675
|
return `browser lease ${leaseDir} already exists with no owner record \u2014 a previous run may have crashed mid-acquire; confirm no kk browser still uses this profile, then remove ${leaseDir} manually`;
|
|
20676
20676
|
}
|
|
20677
|
-
|
|
20677
|
+
const suffix = isProcessAlive(owner.pid) ? "confirm that process and any browser for this profile have stopped; stale ownership is never auto-removed" : `pid ${owner.pid} is no longer running \u2014 confirm no browser for this profile is open, then remove the stale lease with: rm -rf ${leaseDir}`;
|
|
20678
|
+
return `browser lease ${leaseDir} is held by pid ${owner.pid} (logical ${owner.logicalPath}) \u2014 ${suffix}`;
|
|
20678
20679
|
}
|
|
20679
20680
|
async function holderResidue(fileSystem, leaseDir) {
|
|
20680
20681
|
try {
|
|
@@ -20900,7 +20901,7 @@ function resolveChannelProfileDir(channel, override) {
|
|
|
20900
20901
|
return resolveBrowserProfileDir(channel, chosen);
|
|
20901
20902
|
}
|
|
20902
20903
|
async function checkChannelSession(config, opts) {
|
|
20903
|
-
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20904
|
+
const timeoutMs = opts.timeoutMs ?? config.checkTimeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20904
20905
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20905
20906
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20906
20907
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -20335,7 +20335,8 @@ async function busyGuidance(fileSystem, leaseDir) {
|
|
|
20335
20335
|
}
|
|
20336
20336
|
return `browser lease ${leaseDir} already exists with no owner record \u2014 a previous run may have crashed mid-acquire; confirm no kk browser still uses this profile, then remove ${leaseDir} manually`;
|
|
20337
20337
|
}
|
|
20338
|
-
|
|
20338
|
+
const suffix = isProcessAlive(owner.pid) ? "confirm that process and any browser for this profile have stopped; stale ownership is never auto-removed" : `pid ${owner.pid} is no longer running \u2014 confirm no browser for this profile is open, then remove the stale lease with: rm -rf ${leaseDir}`;
|
|
20339
|
+
return `browser lease ${leaseDir} is held by pid ${owner.pid} (logical ${owner.logicalPath}) \u2014 ${suffix}`;
|
|
20339
20340
|
}
|
|
20340
20341
|
async function holderResidue(fileSystem, leaseDir) {
|
|
20341
20342
|
try {
|
|
@@ -20604,7 +20605,7 @@ function resolveChannelProfileDir(channel, override) {
|
|
|
20604
20605
|
return resolveBrowserProfileDir(channel, chosen);
|
|
20605
20606
|
}
|
|
20606
20607
|
async function checkChannelSession(config, opts) {
|
|
20607
|
-
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20608
|
+
const timeoutMs = opts.timeoutMs ?? config.checkTimeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20608
20609
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20609
20610
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20610
20611
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -20699,7 +20699,8 @@ async function busyGuidance(fileSystem, leaseDir) {
|
|
|
20699
20699
|
}
|
|
20700
20700
|
return `browser lease ${leaseDir} already exists with no owner record \u2014 a previous run may have crashed mid-acquire; confirm no kk browser still uses this profile, then remove ${leaseDir} manually`;
|
|
20701
20701
|
}
|
|
20702
|
-
|
|
20702
|
+
const suffix = isProcessAlive(owner.pid) ? "confirm that process and any browser for this profile have stopped; stale ownership is never auto-removed" : `pid ${owner.pid} is no longer running \u2014 confirm no browser for this profile is open, then remove the stale lease with: rm -rf ${leaseDir}`;
|
|
20703
|
+
return `browser lease ${leaseDir} is held by pid ${owner.pid} (logical ${owner.logicalPath}) \u2014 ${suffix}`;
|
|
20703
20704
|
}
|
|
20704
20705
|
async function holderResidue(fileSystem, leaseDir) {
|
|
20705
20706
|
try {
|
|
@@ -20925,7 +20926,7 @@ function resolveChannelProfileDir(channel, override) {
|
|
|
20925
20926
|
return resolveBrowserProfileDir(channel, chosen);
|
|
20926
20927
|
}
|
|
20927
20928
|
async function checkChannelSession(config, opts) {
|
|
20928
|
-
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20929
|
+
const timeoutMs = opts.timeoutMs ?? config.checkTimeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20929
20930
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20930
20931
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20931
20932
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -20335,7 +20335,8 @@ async function busyGuidance(fileSystem, leaseDir) {
|
|
|
20335
20335
|
}
|
|
20336
20336
|
return `browser lease ${leaseDir} already exists with no owner record \u2014 a previous run may have crashed mid-acquire; confirm no kk browser still uses this profile, then remove ${leaseDir} manually`;
|
|
20337
20337
|
}
|
|
20338
|
-
|
|
20338
|
+
const suffix = isProcessAlive(owner.pid) ? "confirm that process and any browser for this profile have stopped; stale ownership is never auto-removed" : `pid ${owner.pid} is no longer running \u2014 confirm no browser for this profile is open, then remove the stale lease with: rm -rf ${leaseDir}`;
|
|
20339
|
+
return `browser lease ${leaseDir} is held by pid ${owner.pid} (logical ${owner.logicalPath}) \u2014 ${suffix}`;
|
|
20339
20340
|
}
|
|
20340
20341
|
async function holderResidue(fileSystem, leaseDir) {
|
|
20341
20342
|
try {
|
|
@@ -20604,7 +20605,7 @@ function resolveChannelProfileDir(channel, override) {
|
|
|
20604
20605
|
return resolveBrowserProfileDir(channel, chosen);
|
|
20605
20606
|
}
|
|
20606
20607
|
async function checkChannelSession(config, opts) {
|
|
20607
|
-
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20608
|
+
const timeoutMs = opts.timeoutMs ?? config.checkTimeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20608
20609
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20609
20610
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20610
20611
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -20674,7 +20674,8 @@ async function busyGuidance(fileSystem, leaseDir) {
|
|
|
20674
20674
|
}
|
|
20675
20675
|
return `browser lease ${leaseDir} already exists with no owner record \u2014 a previous run may have crashed mid-acquire; confirm no kk browser still uses this profile, then remove ${leaseDir} manually`;
|
|
20676
20676
|
}
|
|
20677
|
-
|
|
20677
|
+
const suffix = isProcessAlive(owner.pid) ? "confirm that process and any browser for this profile have stopped; stale ownership is never auto-removed" : `pid ${owner.pid} is no longer running \u2014 confirm no browser for this profile is open, then remove the stale lease with: rm -rf ${leaseDir}`;
|
|
20678
|
+
return `browser lease ${leaseDir} is held by pid ${owner.pid} (logical ${owner.logicalPath}) \u2014 ${suffix}`;
|
|
20678
20679
|
}
|
|
20679
20680
|
async function holderResidue(fileSystem, leaseDir) {
|
|
20680
20681
|
try {
|
|
@@ -20900,7 +20901,7 @@ function resolveChannelProfileDir(channel, override) {
|
|
|
20900
20901
|
return resolveBrowserProfileDir(channel, chosen);
|
|
20901
20902
|
}
|
|
20902
20903
|
async function checkChannelSession(config, opts) {
|
|
20903
|
-
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20904
|
+
const timeoutMs = opts.timeoutMs ?? config.checkTimeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20904
20905
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20905
20906
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20906
20907
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -20339,7 +20339,8 @@ async function busyGuidance(fileSystem, leaseDir) {
|
|
|
20339
20339
|
}
|
|
20340
20340
|
return `browser lease ${leaseDir} already exists with no owner record \u2014 a previous run may have crashed mid-acquire; confirm no kk browser still uses this profile, then remove ${leaseDir} manually`;
|
|
20341
20341
|
}
|
|
20342
|
-
|
|
20342
|
+
const suffix = isProcessAlive(owner.pid) ? "confirm that process and any browser for this profile have stopped; stale ownership is never auto-removed" : `pid ${owner.pid} is no longer running \u2014 confirm no browser for this profile is open, then remove the stale lease with: rm -rf ${leaseDir}`;
|
|
20343
|
+
return `browser lease ${leaseDir} is held by pid ${owner.pid} (logical ${owner.logicalPath}) \u2014 ${suffix}`;
|
|
20343
20344
|
}
|
|
20344
20345
|
async function holderResidue(fileSystem, leaseDir) {
|
|
20345
20346
|
try {
|
|
@@ -20705,7 +20706,7 @@ function resolveChannelProfileDir(channel, override) {
|
|
|
20705
20706
|
return resolveBrowserProfileDir(channel, chosen);
|
|
20706
20707
|
}
|
|
20707
20708
|
async function checkChannelSession(config, opts) {
|
|
20708
|
-
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20709
|
+
const timeoutMs = opts.timeoutMs ?? config.checkTimeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20709
20710
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20710
20711
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20711
20712
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -20680,7 +20680,8 @@ async function busyGuidance(fileSystem, leaseDir) {
|
|
|
20680
20680
|
}
|
|
20681
20681
|
return `browser lease ${leaseDir} already exists with no owner record \u2014 a previous run may have crashed mid-acquire; confirm no kk browser still uses this profile, then remove ${leaseDir} manually`;
|
|
20682
20682
|
}
|
|
20683
|
-
|
|
20683
|
+
const suffix = isProcessAlive(owner.pid) ? "confirm that process and any browser for this profile have stopped; stale ownership is never auto-removed" : `pid ${owner.pid} is no longer running \u2014 confirm no browser for this profile is open, then remove the stale lease with: rm -rf ${leaseDir}`;
|
|
20684
|
+
return `browser lease ${leaseDir} is held by pid ${owner.pid} (logical ${owner.logicalPath}) \u2014 ${suffix}`;
|
|
20684
20685
|
}
|
|
20685
20686
|
async function holderResidue(fileSystem, leaseDir) {
|
|
20686
20687
|
try {
|
|
@@ -20906,7 +20907,7 @@ function resolveChannelProfileDir(channel, override) {
|
|
|
20906
20907
|
return resolveBrowserProfileDir(channel, chosen);
|
|
20907
20908
|
}
|
|
20908
20909
|
async function checkChannelSession(config, opts) {
|
|
20909
|
-
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20910
|
+
const timeoutMs = opts.timeoutMs ?? config.checkTimeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20910
20911
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20911
20912
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20912
20913
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -20063,7 +20063,8 @@ async function busyGuidance(fileSystem, leaseDir) {
|
|
|
20063
20063
|
}
|
|
20064
20064
|
return `browser lease ${leaseDir} already exists with no owner record \u2014 a previous run may have crashed mid-acquire; confirm no kk browser still uses this profile, then remove ${leaseDir} manually`;
|
|
20065
20065
|
}
|
|
20066
|
-
|
|
20066
|
+
const suffix = isProcessAlive(owner.pid) ? "confirm that process and any browser for this profile have stopped; stale ownership is never auto-removed" : `pid ${owner.pid} is no longer running \u2014 confirm no browser for this profile is open, then remove the stale lease with: rm -rf ${leaseDir}`;
|
|
20067
|
+
return `browser lease ${leaseDir} is held by pid ${owner.pid} (logical ${owner.logicalPath}) \u2014 ${suffix}`;
|
|
20067
20068
|
}
|
|
20068
20069
|
async function holderResidue(fileSystem, leaseDir) {
|
|
20069
20070
|
try {
|
|
@@ -20332,7 +20333,7 @@ function resolveChannelProfileDir(channel, override) {
|
|
|
20332
20333
|
return resolveBrowserProfileDir(channel, chosen);
|
|
20333
20334
|
}
|
|
20334
20335
|
async function checkChannelSession(config, opts) {
|
|
20335
|
-
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20336
|
+
const timeoutMs = opts.timeoutMs ?? config.checkTimeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20336
20337
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20337
20338
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20338
20339
|
const deadline = Date.now() + timeoutMs;
|