@gobing-ai/knowledge-kit 0.1.23 → 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 +418 -114
- package/package.json +5 -5
- package/plugins/generations/content-gen/dist/index.js +9 -9
- package/plugins/generations/core-facts-gen/dist/index.js +12 -12
- package/plugins/generations/daily-article-gen/dist/index.js +12 -12
- package/plugins/generations/dailynews-gen/dist/index.js +11 -11
- package/plugins/generations/dailynews-gen/src/script-plan.ts +2 -2
- package/plugins/generations/episode-plan-gen/dist/index.js +59 -18
- package/plugins/generations/episode-plan-gen/src/index.ts +71 -7
- package/plugins/generations/gemini-tts/dist/index.js +9 -9
- package/plugins/generations/image-gen/dist/index.js +9 -9
- package/plugins/generations/music-gen/dist/index.js +33 -29
- package/plugins/generations/music-gen/src/audio/measure.ts +25 -20
- package/plugins/generations/news-report-gen/dist/index.js +12 -12
- package/plugins/generations/vibe-voice-tts/dist/index.js +9 -9
- package/plugins/generations/voice-gen/dist/index.js +9 -9
- package/plugins/generations/voxcpm-tts/dist/index.js +9 -9
- package/plugins/ingestions/aihot-ingest/dist/index.js +12 -12
- package/plugins/ingestions/horizon-ingest/dist/index.js +12 -12
- package/plugins/ingestions/karakeep-local/dist/index.js +13 -13
- package/plugins/ingestions/last30days-ingest/dist/index.js +12 -12
- package/plugins/ingestions/web-search/dist/index.js +10 -10
- 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 +20 -20
- package/plugins/kk/publish-presets/itc-main.json +39 -23
- package/plugins/kk/scripts/cover-compositor.ts +104 -26
- package/plugins/kk/scripts/daily-stages.ts +704 -53
- package/plugins/kk/scripts/kk-workflow-stages.ts +149 -6
- package/plugins/kk/scripts/series-names.ts +16 -3
- 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 +3 -3
- 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 +74 -1
- package/plugins/publishings/bilibili-pub/dist/index.js +25 -24
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +25 -24
- package/plugins/publishings/cnblogs-pub/dist/index.js +25 -24
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +25 -24
- package/plugins/publishings/csdn-pub/dist/index.js +25 -24
- package/plugins/publishings/csdn-pub/dist/profile-check.js +25 -24
- package/plugins/publishings/emdash-pub/dist/index.js +9 -9
- package/plugins/publishings/infoq-pub/dist/index.js +25 -24
- package/plugins/publishings/infoq-pub/dist/profile-check.js +25 -24
- package/plugins/publishings/jike-pub/dist/index.js +25 -24
- package/plugins/publishings/jike-pub/dist/profile-check.js +25 -24
- package/plugins/publishings/juejin-pub/dist/index.js +25 -24
- package/plugins/publishings/juejin-pub/dist/profile-check.js +25 -24
- package/plugins/publishings/linkedin-pub/dist/index.js +85 -26
- package/plugins/publishings/linkedin-pub/dist/profile-check.js +25 -24
- package/plugins/publishings/linkedin-pub/src/index.ts +93 -6
- package/plugins/publishings/medium-pub/dist/index.js +9206 -287
- 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/podcast-pub/dist/index.js +240 -37
- package/plugins/publishings/podcast-pub/src/index.ts +154 -3
- package/plugins/publishings/podcast-pub/src/seo.ts +25 -8
- package/plugins/publishings/podcast-pub/src/show-notes-brief.ts +93 -23
- package/plugins/publishings/podcast-pub/src/show-notes.ts +26 -6
- package/plugins/publishings/qiita-pub/dist/index.js +9 -9
- package/plugins/publishings/shipinhao-pub/dist/index.js +29 -26
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +28 -26
- package/plugins/publishings/shipinhao-pub/src/flow.ts +5 -0
- package/plugins/publishings/shipinhao-pub/src/selectors.ts +13 -5
- package/plugins/publishings/sspai-pub/dist/index.js +25 -24
- package/plugins/publishings/sspai-pub/dist/profile-check.js +25 -24
- package/plugins/publishings/substack-pub/dist/index.js +25 -24
- package/plugins/publishings/substack-pub/dist/profile-check.js +25 -24
- package/plugins/publishings/surfdash-pub/dist/index.js +200 -92
- package/plugins/publishings/surfdash-pub/src/digest-check.ts +30 -1
- package/plugins/publishings/surfdash-pub/src/index.ts +94 -75
- package/plugins/publishings/surfdash-pub/src/media-upload.ts +83 -0
- package/plugins/publishings/surfdash-pub/src/patch.ts +28 -23
- package/plugins/publishings/surfdash-pub/src/topic-claims.ts +12 -4
- package/plugins/publishings/threads-pub/dist/index.js +39 -24
- package/plugins/publishings/threads-pub/dist/profile-check.js +30 -24
- package/plugins/publishings/threads-pub/src/post-rail.ts +20 -0
- package/plugins/publishings/wechatmp-pub/dist/index.js +438 -102
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +30 -25
- package/plugins/publishings/wechatmp-pub/src/enrich.ts +56 -10
- package/plugins/publishings/wechatmp-pub/src/flow.ts +589 -83
- package/plugins/publishings/wechatmp-pub/src/index.ts +4 -1
- package/plugins/publishings/wechatmp-pub/src/modes.ts +30 -12
- package/plugins/publishings/wechatmp-pub/src/page.ts +8 -0
- package/plugins/publishings/weibo-pub/dist/index.js +25 -24
- package/plugins/publishings/weibo-pub/dist/profile-check.js +25 -24
- package/plugins/publishings/x-pub/dist/index.js +54 -47
- package/plugins/publishings/x-pub/dist/profile-check.js +25 -24
- package/plugins/publishings/x-pub/src/post-rail.ts +40 -47
- package/plugins/publishings/xhs-pub/dist/index.js +25 -24
- package/plugins/publishings/xhs-pub/dist/profile-check.js +25 -24
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +25 -24
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +25 -24
- package/plugins/publishings/zenn-pub/dist/index.js +9 -9
|
@@ -45,7 +45,7 @@ var __esm = (fn, res, err) => () => {
|
|
|
45
45
|
};
|
|
46
46
|
var __require = import.meta.require;
|
|
47
47
|
|
|
48
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
48
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/errors.js
|
|
49
49
|
var ErrorCode;
|
|
50
50
|
var init_errors = __esm(() => {
|
|
51
51
|
ErrorCode = {
|
|
@@ -56,7 +56,7 @@ var init_errors = __esm(() => {
|
|
|
56
56
|
};
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
59
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/api-response.js
|
|
60
60
|
var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
|
|
61
61
|
var init_api_response = __esm(() => {
|
|
62
62
|
init_errors();
|
|
@@ -79,10 +79,10 @@ var init_api_response = __esm(() => {
|
|
|
79
79
|
CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
82
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/cursor.js
|
|
83
83
|
var init_cursor = () => {};
|
|
84
84
|
|
|
85
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
85
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/env.js
|
|
86
86
|
function getEnvVar(name, fallback) {
|
|
87
87
|
const raw = process.env[name];
|
|
88
88
|
return raw === undefined ? fallback : raw;
|
|
@@ -91,10 +91,10 @@ function getEnvVars() {
|
|
|
91
91
|
return process.env;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
94
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
|
|
95
95
|
var init_event_severity = () => {};
|
|
96
96
|
|
|
97
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
97
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/object.js
|
|
98
98
|
function isPlainObject(value) {
|
|
99
99
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
100
100
|
}
|
|
@@ -112,7 +112,7 @@ function deepMerge(target, source) {
|
|
|
112
112
|
return result;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
115
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/output.js
|
|
116
116
|
function processStream(name) {
|
|
117
117
|
const proc = globalThis.process;
|
|
118
118
|
const stream = proc?.[name];
|
|
@@ -133,7 +133,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
|
|
|
133
133
|
}
|
|
134
134
|
var defaultStdoutTarget, defaultStderrTarget;
|
|
135
135
|
|
|
136
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
136
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/index.js
|
|
137
137
|
var init_dist = __esm(() => {
|
|
138
138
|
init_api_response();
|
|
139
139
|
init_cursor();
|
|
@@ -11659,7 +11659,7 @@ var init_zod = __esm(() => {
|
|
|
11659
11659
|
init_external();
|
|
11660
11660
|
});
|
|
11661
11661
|
|
|
11662
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
11662
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/config.js
|
|
11663
11663
|
function getProcessEnv() {
|
|
11664
11664
|
return getEnvVars();
|
|
11665
11665
|
}
|
|
@@ -11737,7 +11737,7 @@ var init_config = __esm(() => {
|
|
|
11737
11737
|
};
|
|
11738
11738
|
});
|
|
11739
11739
|
|
|
11740
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
11740
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
|
|
11741
11741
|
import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
|
|
11742
11742
|
import { dirname, resolve as resolvePath } from "path";
|
|
11743
11743
|
function createNodeFileSystem(root, paths) {
|
|
@@ -11824,7 +11824,7 @@ function findProjectRoot(startDir) {
|
|
|
11824
11824
|
}
|
|
11825
11825
|
var init_file_system_node = () => {};
|
|
11826
11826
|
|
|
11827
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
11827
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/db-errors.js
|
|
11828
11828
|
var DbModuleNotInstalledError;
|
|
11829
11829
|
var init_db_errors = __esm(() => {
|
|
11830
11830
|
DbModuleNotInstalledError = class DbModuleNotInstalledError extends Error {
|
|
@@ -19035,7 +19035,7 @@ var init_execa = __esm(() => {
|
|
|
19035
19035
|
} = getIpcExport());
|
|
19036
19036
|
});
|
|
19037
19037
|
|
|
19038
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
19038
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/process-group.js
|
|
19039
19039
|
function resolveDeadline(optionTimeout, defaultTimeout) {
|
|
19040
19040
|
if (optionTimeout === null)
|
|
19041
19041
|
return null;
|
|
@@ -19127,7 +19127,7 @@ function ownProcessGroupLifecycle(ownership) {
|
|
|
19127
19127
|
}
|
|
19128
19128
|
var MAX_TIMEOUT_MS = 2147483647, DEFAULT_KILL_GRACE_MS = 5000, GROUP_POLL_INTERVAL_MS = 25, GROUP_KILL_PATIENCE_MS = 2000;
|
|
19129
19129
|
|
|
19130
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
19130
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/process-executor.js
|
|
19131
19131
|
import { isatty } from "tty";
|
|
19132
19132
|
function processEventSeverity(reason, exitCode) {
|
|
19133
19133
|
if (reason === "error")
|
|
@@ -19499,7 +19499,7 @@ var init_process_executor = __esm(() => {
|
|
|
19499
19499
|
init_config();
|
|
19500
19500
|
});
|
|
19501
19501
|
|
|
19502
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
19502
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/runtime-node-bun.js
|
|
19503
19503
|
function getNodeFileSystem() {
|
|
19504
19504
|
if (!_nodeFileSystem)
|
|
19505
19505
|
_nodeFileSystem = createNodeFileSystem();
|
|
@@ -19563,7 +19563,7 @@ var init_runtime_node_bun = __esm(() => {
|
|
|
19563
19563
|
import { join as join5, resolve as resolve5 } from "path";
|
|
19564
19564
|
import { parseArgs } from "util";
|
|
19565
19565
|
|
|
19566
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.
|
|
19566
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.8.4+7a0bf9ce62a9b753/node_modules/@gobing-ai/ts-browser-automation/dist/errors.js
|
|
19567
19567
|
class BrowserAutomationError extends Error {
|
|
19568
19568
|
constructor(message, options) {
|
|
19569
19569
|
super(message, options);
|
|
@@ -19612,14 +19612,14 @@ class OperationAbortedError extends BrowserAutomationError {
|
|
|
19612
19612
|
this.name = "OperationAbortedError";
|
|
19613
19613
|
}
|
|
19614
19614
|
}
|
|
19615
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.
|
|
19615
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.8.4+7a0bf9ce62a9b753/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
19616
19616
|
import { mkdir } from "fs/promises";
|
|
19617
19617
|
|
|
19618
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
19618
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
19619
19619
|
init_file_system_node();
|
|
19620
19620
|
init_config();
|
|
19621
19621
|
|
|
19622
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
19622
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/path.js
|
|
19623
19623
|
function normalizeSeparators(path) {
|
|
19624
19624
|
return path.replaceAll("\\", "/");
|
|
19625
19625
|
}
|
|
@@ -19677,10 +19677,10 @@ function getProcessCwd() {
|
|
|
19677
19677
|
return globalThis.process?.cwd?.() ?? "/";
|
|
19678
19678
|
}
|
|
19679
19679
|
|
|
19680
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
19680
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
19681
19681
|
init_runtime_node_bun();
|
|
19682
19682
|
|
|
19683
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.
|
|
19683
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.8.4+7a0bf9ce62a9b753/node_modules/@gobing-ai/ts-browser-automation/dist/profile-dir.js
|
|
19684
19684
|
function resolveProfileDir(profileDir) {
|
|
19685
19685
|
if (profileDir.trim() === "") {
|
|
19686
19686
|
throw new InvalidProfileDirError;
|
|
@@ -19692,7 +19692,7 @@ function resolveProfileDir(profileDir) {
|
|
|
19692
19692
|
return resolved;
|
|
19693
19693
|
}
|
|
19694
19694
|
|
|
19695
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.
|
|
19695
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.8.4+7a0bf9ce62a9b753/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
19696
19696
|
var PROFILE_DIR_MODE = 448;
|
|
19697
19697
|
var BUSY_PROFILE_PATTERN = /singleton|already in use|in use by another/i;
|
|
19698
19698
|
var CHROMIUM_MISSING_PATTERN = /playwright install|executable doesn't exist/i;
|
|
@@ -19743,7 +19743,7 @@ function createPersistentLauncher(options = {}) {
|
|
|
19743
19743
|
};
|
|
19744
19744
|
}
|
|
19745
19745
|
|
|
19746
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.
|
|
19746
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.8.4+7a0bf9ce62a9b753/node_modules/@gobing-ai/ts-browser-automation/dist/operations.js
|
|
19747
19747
|
var DEFAULT_TIMEOUT_MS = 30000;
|
|
19748
19748
|
var POLL_INTERVAL_MS = 250;
|
|
19749
19749
|
var defaultLauncher;
|
|
@@ -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 {
|
|
@@ -20311,7 +20312,7 @@ function resolveChannelProfileDir(channel, override) {
|
|
|
20311
20312
|
return resolveBrowserProfileDir(channel, chosen);
|
|
20312
20313
|
}
|
|
20313
20314
|
async function checkChannelSession(config, opts) {
|
|
20314
|
-
const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20315
|
+
const timeoutMs = opts.timeoutMs ?? config.checkTimeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
|
|
20315
20316
|
const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
|
|
20316
20317
|
let lastDetail = `${config.channel} readiness was never probed`;
|
|
20317
20318
|
const deadline = Date.now() + timeoutMs;
|
|
@@ -20551,7 +20552,7 @@ function errorMessage2(error) {
|
|
|
20551
20552
|
var SHP_TARGET = "shipinhao";
|
|
20552
20553
|
var SHP_HOME_URL = "https://channels.weixin.qq.com/platform";
|
|
20553
20554
|
var SHP_CREATE_ENTRY_SELECTORS = ['button:text-is("\u53D1\u8868\u89C6\u9891")'];
|
|
20554
|
-
var SHP_LOGIN_URL_RE = /(open\.weixin\.qq\.com|channels\.weixin\.qq\.com\/platform\/(login|scan))/;
|
|
20555
|
+
var SHP_LOGIN_URL_RE = /(open\.weixin\.qq\.com|channels\.weixin\.qq\.com\/(?:platform\/(?:login|scan)|login(?:\.html)?)(?:[/?#]|$))/;
|
|
20555
20556
|
var ROOT_SNAPSHOT_SCRIPT = `(() => { // kk-shp-root-snapshot
|
|
20556
20557
|
const wujieApp = document.querySelector('wujie-app');
|
|
20557
20558
|
const shadow = wujieApp === null || wujieApp === undefined ? null : (wujieApp.shadowRoot ?? null);
|
|
@@ -20648,7 +20649,8 @@ var SHP_CONFIG = {
|
|
|
20648
20649
|
homeUrl: SHP_HOME_URL,
|
|
20649
20650
|
isAuthenticated: isShipinhaoAuthenticated,
|
|
20650
20651
|
loginTimeoutMs: SHP_LOGIN_TIMEOUT_MS,
|
|
20651
|
-
checkHeadedOnly:
|
|
20652
|
+
checkHeadedOnly: true,
|
|
20653
|
+
checkTimeoutMs: 180000
|
|
20652
20654
|
};
|
|
20653
20655
|
|
|
20654
20656
|
// ../../plugins/publishings/shipinhao-pub/src/profile-check.ts
|
|
@@ -1023,6 +1023,11 @@ export class ShipinhaoBrowserTransport implements PublishTransport {
|
|
|
1023
1023
|
const session = await checkChannelSession(SHP_CONFIG, {
|
|
1024
1024
|
profileDir,
|
|
1025
1025
|
launcher: this.launcher,
|
|
1026
|
+
// The channel's own posture decides the pass order: `SHP_CONFIG.checkHeadedOnly` is the
|
|
1027
|
+
// operator's measured setting (the console refuses the headless probe even on a live
|
|
1028
|
+
// session), and only `runProfileCli` read it before — so `check` verified what `publish`
|
|
1029
|
+
// kept refusing (2026-11-23).
|
|
1030
|
+
headedOnly: SHP_CONFIG.checkHeadedOnly === true,
|
|
1026
1031
|
// Headless first, then one read-only headed pass (same rail as xhs-pub): shipinhao's
|
|
1027
1032
|
// dashboard regularly paints past a 30-90s headless poll on a healthy session, and the
|
|
1028
1033
|
// shipped probe (`profile-check check`) has always used this fallback — the publish
|
|
@@ -87,7 +87,8 @@ export const SHP_HOME_URL_BY_OPERATION: Record<ShipinhaoOperationName, string> =
|
|
|
87
87
|
* carries the real gate: an unauthenticated visit is rejected by the missing creator form, not by
|
|
88
88
|
* this regex alone.
|
|
89
89
|
*/
|
|
90
|
-
export const SHP_LOGIN_URL_RE =
|
|
90
|
+
export const SHP_LOGIN_URL_RE =
|
|
91
|
+
/(open\.weixin\.qq\.com|channels\.weixin\.qq\.com\/(?:platform\/(?:login|scan)|login(?:\.html)?)(?:[/?#]|$))/;
|
|
91
92
|
|
|
92
93
|
/**
|
|
93
94
|
* Root-readiness snapshot evaluated on the live page (vendor `rootReadinessSnapshot`,
|
|
@@ -339,14 +340,21 @@ export const isShipinhaoAuthenticated: IsAuthenticatedPredicate = async (page) =
|
|
|
339
340
|
|
|
340
341
|
/**
|
|
341
342
|
* Site-owned config for the shared session check and operator CLI (ADR-032). The check opens the
|
|
342
|
-
* publishing home (`SHP_HOME_URL`); the manifest `browserSession.homeUrl` is the same entry.
|
|
343
|
-
*
|
|
344
|
-
*
|
|
343
|
+
* publishing home (`SHP_HOME_URL`); the manifest `browserSession.homeUrl` is the same entry.
|
|
344
|
+
*
|
|
345
|
+
* `checkHeadedOnly` is ON (operator decision 2026-11-23): the Channels console attaches its creator
|
|
346
|
+
* form only after a heavy hydrate, and the headless pass is genuinely unstable — with one live
|
|
347
|
+
* profile it verified twice and refused three times inside an hour, while a headed pass verified
|
|
348
|
+
* every time. The preflight is read-only either way, and this channel's send opens a headed window
|
|
349
|
+
* regardless, so the ADR-025 rail ("a refusal must never escalate to a headed window on its own")
|
|
350
|
+
* still holds: nothing escalates, the probe is headed by design.
|
|
345
351
|
*/
|
|
346
352
|
export const SHP_CONFIG: ChannelBrowserConfig = {
|
|
347
353
|
channel: SHP_TARGET,
|
|
348
354
|
homeUrl: SHP_HOME_URL,
|
|
349
355
|
isAuthenticated: isShipinhaoAuthenticated,
|
|
350
356
|
loginTimeoutMs: SHP_LOGIN_TIMEOUT_MS,
|
|
351
|
-
checkHeadedOnly:
|
|
357
|
+
checkHeadedOnly: true,
|
|
358
|
+
// Headed-only still needs headroom for the hydrate; 180s leaves ~150s for the pass.
|
|
359
|
+
checkTimeoutMs: 180_000,
|
|
352
360
|
};
|
|
@@ -4845,7 +4845,7 @@ var init_zod = __esm(() => {
|
|
|
4845
4845
|
init_external();
|
|
4846
4846
|
});
|
|
4847
4847
|
|
|
4848
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4848
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/errors.js
|
|
4849
4849
|
var ErrorCode;
|
|
4850
4850
|
var init_errors3 = __esm(() => {
|
|
4851
4851
|
ErrorCode = {
|
|
@@ -4856,7 +4856,7 @@ var init_errors3 = __esm(() => {
|
|
|
4856
4856
|
};
|
|
4857
4857
|
});
|
|
4858
4858
|
|
|
4859
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4859
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/api-response.js
|
|
4860
4860
|
var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
|
|
4861
4861
|
var init_api_response = __esm(() => {
|
|
4862
4862
|
init_errors3();
|
|
@@ -4879,10 +4879,10 @@ var init_api_response = __esm(() => {
|
|
|
4879
4879
|
CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
|
|
4880
4880
|
});
|
|
4881
4881
|
|
|
4882
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4882
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/cursor.js
|
|
4883
4883
|
var init_cursor = () => {};
|
|
4884
4884
|
|
|
4885
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4885
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/env.js
|
|
4886
4886
|
function getEnvVar(name, fallback) {
|
|
4887
4887
|
const raw = process.env[name];
|
|
4888
4888
|
return raw === undefined ? fallback : raw;
|
|
@@ -4891,10 +4891,10 @@ function getEnvVars() {
|
|
|
4891
4891
|
return process.env;
|
|
4892
4892
|
}
|
|
4893
4893
|
|
|
4894
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4894
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
|
|
4895
4895
|
var init_event_severity = () => {};
|
|
4896
4896
|
|
|
4897
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4897
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/object.js
|
|
4898
4898
|
function isPlainObject2(value) {
|
|
4899
4899
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4900
4900
|
}
|
|
@@ -4912,7 +4912,7 @@ function deepMerge(target, source) {
|
|
|
4912
4912
|
return result;
|
|
4913
4913
|
}
|
|
4914
4914
|
|
|
4915
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4915
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/output.js
|
|
4916
4916
|
function processStream(name) {
|
|
4917
4917
|
const proc = globalThis.process;
|
|
4918
4918
|
const stream = proc?.[name];
|
|
@@ -4930,7 +4930,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
|
|
|
4930
4930
|
}
|
|
4931
4931
|
var defaultStderrTarget;
|
|
4932
4932
|
|
|
4933
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.
|
|
4933
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/index.js
|
|
4934
4934
|
var init_dist = __esm(() => {
|
|
4935
4935
|
init_api_response();
|
|
4936
4936
|
init_cursor();
|
|
@@ -11928,7 +11928,7 @@ var init_dist2 = __esm(() => {
|
|
|
11928
11928
|
$visitAsync = visit.visitAsync;
|
|
11929
11929
|
});
|
|
11930
11930
|
|
|
11931
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
11931
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/config.js
|
|
11932
11932
|
function getProcessEnv() {
|
|
11933
11933
|
return getEnvVars();
|
|
11934
11934
|
}
|
|
@@ -12006,7 +12006,7 @@ var init_config = __esm(() => {
|
|
|
12006
12006
|
};
|
|
12007
12007
|
});
|
|
12008
12008
|
|
|
12009
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
12009
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
|
|
12010
12010
|
import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
|
|
12011
12011
|
import { dirname, resolve as resolvePath } from "path";
|
|
12012
12012
|
function createNodeFileSystem(root, paths) {
|
|
@@ -12093,7 +12093,7 @@ function findProjectRoot(startDir) {
|
|
|
12093
12093
|
}
|
|
12094
12094
|
var init_file_system_node = () => {};
|
|
12095
12095
|
|
|
12096
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
12096
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/db-errors.js
|
|
12097
12097
|
var DbModuleNotInstalledError;
|
|
12098
12098
|
var init_db_errors = __esm(() => {
|
|
12099
12099
|
DbModuleNotInstalledError = class DbModuleNotInstalledError extends Error {
|
|
@@ -19304,7 +19304,7 @@ var init_execa = __esm(() => {
|
|
|
19304
19304
|
} = getIpcExport());
|
|
19305
19305
|
});
|
|
19306
19306
|
|
|
19307
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
19307
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/process-group.js
|
|
19308
19308
|
function resolveDeadline(optionTimeout, defaultTimeout) {
|
|
19309
19309
|
if (optionTimeout === null)
|
|
19310
19310
|
return null;
|
|
@@ -19396,7 +19396,7 @@ function ownProcessGroupLifecycle(ownership) {
|
|
|
19396
19396
|
}
|
|
19397
19397
|
var MAX_TIMEOUT_MS = 2147483647, DEFAULT_KILL_GRACE_MS = 5000, GROUP_POLL_INTERVAL_MS = 25, GROUP_KILL_PATIENCE_MS = 2000;
|
|
19398
19398
|
|
|
19399
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
19399
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/process-executor.js
|
|
19400
19400
|
import { isatty } from "tty";
|
|
19401
19401
|
function processEventSeverity(reason, exitCode) {
|
|
19402
19402
|
if (reason === "error")
|
|
@@ -19768,7 +19768,7 @@ var init_process_executor = __esm(() => {
|
|
|
19768
19768
|
init_config();
|
|
19769
19769
|
});
|
|
19770
19770
|
|
|
19771
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
19771
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/runtime-node-bun.js
|
|
19772
19772
|
function getNodeFileSystem() {
|
|
19773
19773
|
if (!_nodeFileSystem)
|
|
19774
19774
|
_nodeFileSystem = createNodeFileSystem();
|
|
@@ -20096,11 +20096,11 @@ var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx)
|
|
|
20096
20096
|
});
|
|
20097
20097
|
}
|
|
20098
20098
|
});
|
|
20099
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
20099
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
20100
20100
|
init_file_system_node();
|
|
20101
20101
|
init_config();
|
|
20102
20102
|
|
|
20103
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
20103
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/path.js
|
|
20104
20104
|
function normalizeSeparators(path) {
|
|
20105
20105
|
return path.replaceAll("\\", "/");
|
|
20106
20106
|
}
|
|
@@ -20158,7 +20158,7 @@ function getProcessCwd() {
|
|
|
20158
20158
|
return globalThis.process?.cwd?.() ?? "/";
|
|
20159
20159
|
}
|
|
20160
20160
|
|
|
20161
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.
|
|
20161
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
20162
20162
|
init_runtime_node_bun();
|
|
20163
20163
|
|
|
20164
20164
|
// ../../packages/kk-core/src/render-md.ts
|
|
@@ -20260,7 +20260,7 @@ import { basename as basename2 } from "path";
|
|
|
20260
20260
|
// ../../packages/publish-harness/src/browser.ts
|
|
20261
20261
|
import { join as join5, resolve as resolve5 } from "path";
|
|
20262
20262
|
|
|
20263
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.
|
|
20263
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.8.4+7a0bf9ce62a9b753/node_modules/@gobing-ai/ts-browser-automation/dist/errors.js
|
|
20264
20264
|
class BrowserAutomationError extends Error {
|
|
20265
20265
|
constructor(message, options) {
|
|
20266
20266
|
super(message, options);
|
|
@@ -20309,10 +20309,10 @@ class OperationAbortedError extends BrowserAutomationError {
|
|
|
20309
20309
|
this.name = "OperationAbortedError";
|
|
20310
20310
|
}
|
|
20311
20311
|
}
|
|
20312
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.
|
|
20312
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.8.4+7a0bf9ce62a9b753/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
20313
20313
|
import { mkdir } from "fs/promises";
|
|
20314
20314
|
|
|
20315
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.
|
|
20315
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.8.4+7a0bf9ce62a9b753/node_modules/@gobing-ai/ts-browser-automation/dist/profile-dir.js
|
|
20316
20316
|
function resolveProfileDir(profileDir) {
|
|
20317
20317
|
if (profileDir.trim() === "") {
|
|
20318
20318
|
throw new InvalidProfileDirError;
|
|
@@ -20324,7 +20324,7 @@ function resolveProfileDir(profileDir) {
|
|
|
20324
20324
|
return resolved;
|
|
20325
20325
|
}
|
|
20326
20326
|
|
|
20327
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.
|
|
20327
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.8.4+7a0bf9ce62a9b753/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
20328
20328
|
var PROFILE_DIR_MODE = 448;
|
|
20329
20329
|
var BUSY_PROFILE_PATTERN = /singleton|already in use|in use by another/i;
|
|
20330
20330
|
var CHROMIUM_MISSING_PATTERN = /playwright install|executable doesn't exist/i;
|
|
@@ -20375,7 +20375,7 @@ function createPersistentLauncher(options = {}) {
|
|
|
20375
20375
|
};
|
|
20376
20376
|
}
|
|
20377
20377
|
|
|
20378
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.
|
|
20378
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.8.4+7a0bf9ce62a9b753/node_modules/@gobing-ai/ts-browser-automation/dist/operations.js
|
|
20379
20379
|
var DEFAULT_TIMEOUT_MS = 30000;
|
|
20380
20380
|
var POLL_INTERVAL_MS = 250;
|
|
20381
20381
|
var defaultLauncher;
|
|
@@ -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;
|