@gobing-ai/knowledge-kit 0.1.1 → 0.1.3
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/collect/index.css +178 -0
- package/dist/board/collect/index.js +1164 -345
- package/dist/board/daily-voice/index.css +178 -0
- package/dist/board/daily-voice/index.js +32 -8
- package/dist/board/itc/index.css +178 -0
- package/dist/board/itc/index.js +32 -8
- package/dist/index.js +3991 -3032
- package/package.json +4 -4
- package/plugins/generations/content-gen/dist/index.js +11 -11
- package/plugins/generations/core-facts-gen/dist/index.js +14 -14
- package/plugins/generations/daily-article-gen/dist/index.js +14 -14
- package/plugins/generations/dailynews-gen/dist/index.js +11 -11
- package/plugins/generations/episode-plan-gen/dist/index.js +14 -14
- package/plugins/generations/gemini-tts/dist/index.js +11 -11
- package/plugins/generations/image-gen/dist/index.js +11 -11
- package/plugins/generations/news-report-gen/dist/index.js +59 -15
- package/plugins/generations/news-report-gen/src/index.ts +78 -1
- package/plugins/generations/voice-gen/dist/index.js +11 -11
- package/plugins/generations/voxcpm-tts/dist/index.js +11 -11
- package/plugins/ingestions/aihot-ingest/dist/index.js +14 -14
- package/plugins/ingestions/horizon-ingest/dist/index.js +14 -14
- package/plugins/ingestions/karakeep-local/dist/index.js +15 -15
- package/plugins/ingestions/last30days-ingest/dist/index.js +14 -14
- package/plugins/ingestions/web-search/dist/index.js +12 -12
- package/plugins/kk/commands/workflow-run.md +8 -4
- package/plugins/kk/decisions/extract/ai-news.yaml +7 -1
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/scripts/kk-workflow-stages.ts +12 -3
- package/plugins/kk/workflows/feature-verification.yaml +1 -9
- package/plugins/kk/workflows/kk-itc-author.yaml +12 -9
- package/plugins/kk/workflows/kk-itc-publish-tail.yaml +90 -0
- package/plugins/kk/workflows/kk-solo-podcast.yaml +6 -0
- package/plugins/publishings/bilibili-pub/dist/index.js +24 -24
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/cnblogs-pub/dist/index.js +24 -24
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/csdn-pub/dist/index.js +24 -24
- package/plugins/publishings/csdn-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/emdash-pub/dist/index.js +11 -11
- package/plugins/publishings/infoq-pub/dist/index.js +24 -24
- package/plugins/publishings/infoq-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/jike-pub/dist/index.js +24 -24
- package/plugins/publishings/jike-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/juejin-pub/dist/index.js +24 -24
- package/plugins/publishings/juejin-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/medium-pub/dist/index.js +11 -11
- package/plugins/publishings/podcast-pub/dist/index.js +11 -11
- package/plugins/publishings/qiita-pub/dist/index.js +11 -11
- package/plugins/publishings/shipinhao-pub/dist/index.js +24 -24
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/sspai-pub/dist/index.js +24 -24
- package/plugins/publishings/sspai-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/substack-pub/dist/index.js +24 -24
- package/plugins/publishings/substack-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/surfdash-pub/dist/index.js +11 -11
- package/plugins/publishings/threads-pub/dist/index.js +11 -11
- package/plugins/publishings/wechatmp-pub/dist/index.js +29 -25
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +30 -25
- package/plugins/publishings/wechatmp-pub/src/modes.ts +11 -1
- package/plugins/publishings/wechatmp-pub/src/profile-check.ts +15 -1
- package/plugins/publishings/weibo-pub/dist/index.js +24 -24
- package/plugins/publishings/weibo-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/x-pub/dist/index.js +24 -24
- package/plugins/publishings/x-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/x-pub/plugin.json +18 -0
- package/plugins/publishings/xhs-pub/dist/index.js +38 -25
- package/plugins/publishings/xhs-pub/dist/profile-check.js +38 -25
- package/plugins/publishings/xhs-pub/src/page.ts +25 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +24 -24
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +83 -32
- package/plugins/publishings/zenn-pub/dist/index.js +11 -11
|
@@ -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.5.
|
|
4848
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/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.5.
|
|
4859
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/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.5.
|
|
4882
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/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.5.
|
|
4885
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/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.5.
|
|
4894
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/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.5.
|
|
4897
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/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.5.
|
|
4915
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/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.5.
|
|
4933
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/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.5.
|
|
11931
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/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.5.
|
|
12009
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/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) {
|
|
@@ -12024,11 +12024,11 @@ function createNodeFileSystem(root, paths) {
|
|
|
12024
12024
|
const lines = buffer.split(/\r?\n/);
|
|
12025
12025
|
buffer = lines.pop() ?? "";
|
|
12026
12026
|
for (const line of lines) {
|
|
12027
|
-
yield line;
|
|
12027
|
+
yield { text: line, terminated: true };
|
|
12028
12028
|
}
|
|
12029
12029
|
}
|
|
12030
12030
|
if (buffer.length > 0)
|
|
12031
|
-
yield buffer;
|
|
12031
|
+
yield { text: buffer, terminated: false };
|
|
12032
12032
|
},
|
|
12033
12033
|
writeFile: (path, content) => {
|
|
12034
12034
|
ensureParentDir(path);
|
|
@@ -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.5.
|
|
12096
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/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.5.
|
|
19307
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/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.5.
|
|
19399
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/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.5.
|
|
19771
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/runtime-node-bun.js
|
|
19772
19772
|
function getNodeFileSystem() {
|
|
19773
19773
|
if (!_nodeFileSystem)
|
|
19774
19774
|
_nodeFileSystem = createNodeFileSystem();
|
|
@@ -20095,11 +20095,11 @@ var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx)
|
|
|
20095
20095
|
});
|
|
20096
20096
|
}
|
|
20097
20097
|
});
|
|
20098
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
20098
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
20099
20099
|
init_file_system_node();
|
|
20100
20100
|
init_config();
|
|
20101
20101
|
|
|
20102
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
20102
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/path.js
|
|
20103
20103
|
function normalizeSeparators(path) {
|
|
20104
20104
|
return path.replaceAll("\\", "/");
|
|
20105
20105
|
}
|
|
@@ -20157,7 +20157,7 @@ function getProcessCwd() {
|
|
|
20157
20157
|
return globalThis.process?.cwd?.() ?? "/";
|
|
20158
20158
|
}
|
|
20159
20159
|
|
|
20160
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
20160
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
20161
20161
|
init_runtime_node_bun();
|
|
20162
20162
|
|
|
20163
20163
|
// ../../packages/kk-core/src/render-md.ts
|
|
@@ -20245,7 +20245,7 @@ async function trySelectors(page, selectors, options = {}) {
|
|
|
20245
20245
|
// ../../packages/publish-harness/src/browser.ts
|
|
20246
20246
|
import { join as join5, resolve as resolve5 } from "path";
|
|
20247
20247
|
|
|
20248
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20248
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/errors.js
|
|
20249
20249
|
class BrowserAutomationError extends Error {
|
|
20250
20250
|
constructor(message, options) {
|
|
20251
20251
|
super(message, options);
|
|
@@ -20280,10 +20280,10 @@ class PlaywrightUnavailableError extends BrowserAutomationError {
|
|
|
20280
20280
|
this.name = "PlaywrightUnavailableError";
|
|
20281
20281
|
}
|
|
20282
20282
|
}
|
|
20283
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20283
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
20284
20284
|
import { mkdir } from "fs/promises";
|
|
20285
20285
|
|
|
20286
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20286
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/profile-dir.js
|
|
20287
20287
|
function resolveProfileDir(profileDir) {
|
|
20288
20288
|
if (profileDir.trim() === "") {
|
|
20289
20289
|
throw new InvalidProfileDirError;
|
|
@@ -20295,7 +20295,7 @@ function resolveProfileDir(profileDir) {
|
|
|
20295
20295
|
return resolved;
|
|
20296
20296
|
}
|
|
20297
20297
|
|
|
20298
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20298
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
20299
20299
|
var PROFILE_DIR_MODE = 448;
|
|
20300
20300
|
var BUSY_PROFILE_PATTERN = /singleton|already in use|in use by another/i;
|
|
20301
20301
|
var CHROMIUM_MISSING_PATTERN = /playwright install|executable doesn't exist/i;
|
|
@@ -20346,7 +20346,7 @@ function createPersistentLauncher(options = {}) {
|
|
|
20346
20346
|
};
|
|
20347
20347
|
}
|
|
20348
20348
|
|
|
20349
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20349
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/operations.js
|
|
20350
20350
|
var defaultLauncher;
|
|
20351
20351
|
function getDefaultLauncher() {
|
|
20352
20352
|
if (defaultLauncher === undefined)
|
|
@@ -21271,6 +21271,10 @@ async function resolveBodyImages(content) {
|
|
|
21271
21271
|
const candidates = [];
|
|
21272
21272
|
if (typeof cover === "string" && cover.length > 0)
|
|
21273
21273
|
candidates.push({ path: cover, what: "metadata.wechatmp.coverPath" });
|
|
21274
|
+
const genericCover = content.metadata?.coverImage;
|
|
21275
|
+
const genericCoverPath = typeof genericCover === "string" ? genericCover : typeof genericCover?.path === "string" ? genericCover.path : undefined;
|
|
21276
|
+
if (genericCoverPath !== undefined && genericCoverPath.length > 0)
|
|
21277
|
+
candidates.push({ path: genericCoverPath, what: "metadata.coverImage" });
|
|
21274
21278
|
for (const [index, image] of descriptors.entries()) {
|
|
21275
21279
|
const path = typeof image === "string" ? image : image?.path;
|
|
21276
21280
|
if (typeof path !== "string" || path.length === 0) {
|
|
@@ -21373,7 +21377,7 @@ async function validateModeInput(operation, content) {
|
|
|
21373
21377
|
return { error: images.error };
|
|
21374
21378
|
if ((images.paths ?? []).length === 0) {
|
|
21375
21379
|
return {
|
|
21376
|
-
error: "cover validation: \u6587\u7AE0 takes its cover from a body image (\u9ED8\u8BA4\u9996\u56FE\u4E3A\u5C01\u9762) but none was supplied \u2014 set metadata.wechatmp.coverPath or metadata.images[]"
|
|
21380
|
+
error: "cover validation: \u6587\u7AE0 takes its cover from a body image (\u9ED8\u8BA4\u9996\u56FE\u4E3A\u5C01\u9762) but none was supplied \u2014 set metadata.wechatmp.coverPath, metadata.coverImage or metadata.images[]"
|
|
21377
21381
|
};
|
|
21378
21382
|
}
|
|
21379
21383
|
return {
|
|
@@ -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.5.
|
|
48
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/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.5.
|
|
59
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/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.5.
|
|
82
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/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.5.
|
|
85
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/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.5.
|
|
94
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/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.5.
|
|
97
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/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.5.
|
|
115
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/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.5.
|
|
136
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/index.js
|
|
137
137
|
var init_dist = __esm(() => {
|
|
138
138
|
init_api_response();
|
|
139
139
|
init_cursor();
|
|
@@ -11931,7 +11931,7 @@ var init_zod = __esm(() => {
|
|
|
11931
11931
|
init_external();
|
|
11932
11932
|
});
|
|
11933
11933
|
|
|
11934
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
11934
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/config.js
|
|
11935
11935
|
function getProcessEnv() {
|
|
11936
11936
|
return getEnvVars();
|
|
11937
11937
|
}
|
|
@@ -12009,7 +12009,7 @@ var init_config = __esm(() => {
|
|
|
12009
12009
|
};
|
|
12010
12010
|
});
|
|
12011
12011
|
|
|
12012
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
12012
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
|
|
12013
12013
|
import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
|
|
12014
12014
|
import { dirname, resolve as resolvePath } from "path";
|
|
12015
12015
|
function createNodeFileSystem(root, paths) {
|
|
@@ -12027,11 +12027,11 @@ function createNodeFileSystem(root, paths) {
|
|
|
12027
12027
|
const lines = buffer.split(/\r?\n/);
|
|
12028
12028
|
buffer = lines.pop() ?? "";
|
|
12029
12029
|
for (const line of lines) {
|
|
12030
|
-
yield line;
|
|
12030
|
+
yield { text: line, terminated: true };
|
|
12031
12031
|
}
|
|
12032
12032
|
}
|
|
12033
12033
|
if (buffer.length > 0)
|
|
12034
|
-
yield buffer;
|
|
12034
|
+
yield { text: buffer, terminated: false };
|
|
12035
12035
|
},
|
|
12036
12036
|
writeFile: (path, content) => {
|
|
12037
12037
|
ensureParentDir(path);
|
|
@@ -12096,7 +12096,7 @@ function findProjectRoot(startDir) {
|
|
|
12096
12096
|
}
|
|
12097
12097
|
var init_file_system_node = () => {};
|
|
12098
12098
|
|
|
12099
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
12099
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/db-errors.js
|
|
12100
12100
|
var DbModuleNotInstalledError;
|
|
12101
12101
|
var init_db_errors = __esm(() => {
|
|
12102
12102
|
DbModuleNotInstalledError = class DbModuleNotInstalledError extends Error {
|
|
@@ -19307,7 +19307,7 @@ var init_execa = __esm(() => {
|
|
|
19307
19307
|
} = getIpcExport());
|
|
19308
19308
|
});
|
|
19309
19309
|
|
|
19310
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
19310
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/process-group.js
|
|
19311
19311
|
function resolveDeadline(optionTimeout, defaultTimeout) {
|
|
19312
19312
|
if (optionTimeout === null)
|
|
19313
19313
|
return null;
|
|
@@ -19399,7 +19399,7 @@ function ownProcessGroupLifecycle(ownership) {
|
|
|
19399
19399
|
}
|
|
19400
19400
|
var MAX_TIMEOUT_MS = 2147483647, DEFAULT_KILL_GRACE_MS = 5000, GROUP_POLL_INTERVAL_MS = 25, GROUP_KILL_PATIENCE_MS = 2000;
|
|
19401
19401
|
|
|
19402
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
19402
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/process-executor.js
|
|
19403
19403
|
import { isatty } from "tty";
|
|
19404
19404
|
function processEventSeverity(reason, exitCode) {
|
|
19405
19405
|
if (reason === "error")
|
|
@@ -19771,7 +19771,7 @@ var init_process_executor = __esm(() => {
|
|
|
19771
19771
|
init_config();
|
|
19772
19772
|
});
|
|
19773
19773
|
|
|
19774
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
19774
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/runtime-node-bun.js
|
|
19775
19775
|
function getNodeFileSystem() {
|
|
19776
19776
|
if (!_nodeFileSystem)
|
|
19777
19777
|
_nodeFileSystem = createNodeFileSystem();
|
|
@@ -19837,7 +19837,7 @@ import { parseArgs } from "util";
|
|
|
19837
19837
|
// ../../packages/publish-harness/src/browser.ts
|
|
19838
19838
|
import { join as join5, resolve as resolve5 } from "path";
|
|
19839
19839
|
|
|
19840
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
19840
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/errors.js
|
|
19841
19841
|
class BrowserAutomationError extends Error {
|
|
19842
19842
|
constructor(message, options) {
|
|
19843
19843
|
super(message, options);
|
|
@@ -19872,14 +19872,14 @@ class PlaywrightUnavailableError extends BrowserAutomationError {
|
|
|
19872
19872
|
this.name = "PlaywrightUnavailableError";
|
|
19873
19873
|
}
|
|
19874
19874
|
}
|
|
19875
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
19875
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
19876
19876
|
import { mkdir } from "fs/promises";
|
|
19877
19877
|
|
|
19878
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
19878
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
19879
19879
|
init_file_system_node();
|
|
19880
19880
|
init_config();
|
|
19881
19881
|
|
|
19882
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
19882
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/path.js
|
|
19883
19883
|
function normalizeSeparators(path) {
|
|
19884
19884
|
return path.replaceAll("\\", "/");
|
|
19885
19885
|
}
|
|
@@ -19937,10 +19937,10 @@ function getProcessCwd() {
|
|
|
19937
19937
|
return globalThis.process?.cwd?.() ?? "/";
|
|
19938
19938
|
}
|
|
19939
19939
|
|
|
19940
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
19940
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
19941
19941
|
init_runtime_node_bun();
|
|
19942
19942
|
|
|
19943
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
19943
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/profile-dir.js
|
|
19944
19944
|
function resolveProfileDir(profileDir) {
|
|
19945
19945
|
if (profileDir.trim() === "") {
|
|
19946
19946
|
throw new InvalidProfileDirError;
|
|
@@ -19952,7 +19952,7 @@ function resolveProfileDir(profileDir) {
|
|
|
19952
19952
|
return resolved;
|
|
19953
19953
|
}
|
|
19954
19954
|
|
|
19955
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
19955
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
19956
19956
|
var PROFILE_DIR_MODE = 448;
|
|
19957
19957
|
var BUSY_PROFILE_PATTERN = /singleton|already in use|in use by another/i;
|
|
19958
19958
|
var CHROMIUM_MISSING_PATTERN = /playwright install|executable doesn't exist/i;
|
|
@@ -20003,7 +20003,7 @@ function createPersistentLauncher(options = {}) {
|
|
|
20003
20003
|
};
|
|
20004
20004
|
}
|
|
20005
20005
|
|
|
20006
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20006
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/operations.js
|
|
20007
20007
|
var defaultLauncher;
|
|
20008
20008
|
function getDefaultLauncher() {
|
|
20009
20009
|
if (defaultLauncher === undefined)
|
|
@@ -20828,6 +20828,8 @@ if (false) {}
|
|
|
20828
20828
|
// ../../plugins/publishings/wechatmp-pub/src/profile-check.ts
|
|
20829
20829
|
var USAGE = "usage: wechatmp profile-check [login|check|open] [--profile <dir>] [--url <url>] [--timeout <ms>] [--headed]";
|
|
20830
20830
|
var LOGIN_TIMEOUT_MS = 180000;
|
|
20831
|
+
var PROFILE_OVERHEAD_MS = 8000;
|
|
20832
|
+
var MIN_READINESS_MS = 1000;
|
|
20831
20833
|
async function main2(argv = process.argv.slice(2)) {
|
|
20832
20834
|
let command;
|
|
20833
20835
|
let profileDir;
|
|
@@ -20898,7 +20900,10 @@ async function main2(argv = process.argv.slice(2)) {
|
|
|
20898
20900
|
}
|
|
20899
20901
|
let verdict;
|
|
20900
20902
|
try {
|
|
20901
|
-
await checkWechatSession(profileDir, {
|
|
20903
|
+
await checkWechatSession(profileDir, {
|
|
20904
|
+
headless: !headed,
|
|
20905
|
+
timeoutMs: timeoutMs === undefined ? undefined : Math.max(MIN_READINESS_MS, timeoutMs - PROFILE_OVERHEAD_MS)
|
|
20906
|
+
});
|
|
20902
20907
|
verdict = {
|
|
20903
20908
|
status: "verified",
|
|
20904
20909
|
profileDir,
|
|
@@ -228,6 +228,16 @@ async function resolveBodyImages(content: Content): Promise<{ paths?: string[];
|
|
|
228
228
|
const candidates: Array<{ path: string; what: string }> = [];
|
|
229
229
|
if (typeof cover === 'string' && cover.length > 0)
|
|
230
230
|
candidates.push({ path: cover, what: 'metadata.wechatmp.coverPath' });
|
|
231
|
+
// Repo-wide single-cover convention (itc pipeline writes this; surfdash/xhs read it too).
|
|
232
|
+
const genericCover = content.metadata?.coverImage;
|
|
233
|
+
const genericCoverPath =
|
|
234
|
+
typeof genericCover === 'string'
|
|
235
|
+
? genericCover
|
|
236
|
+
: typeof (genericCover as { path?: unknown } | undefined)?.path === 'string'
|
|
237
|
+
? (genericCover as { path: string }).path
|
|
238
|
+
: undefined;
|
|
239
|
+
if (genericCoverPath !== undefined && genericCoverPath.length > 0)
|
|
240
|
+
candidates.push({ path: genericCoverPath, what: 'metadata.coverImage' });
|
|
231
241
|
for (const [index, image] of descriptors.entries()) {
|
|
232
242
|
const path = typeof image === 'string' ? image : (image as { path?: unknown })?.path;
|
|
233
243
|
if (typeof path !== 'string' || path.length === 0) {
|
|
@@ -351,7 +361,7 @@ export async function validateModeInput(operation: WechatmpOperation, content: C
|
|
|
351
361
|
if (images.error) return { error: images.error };
|
|
352
362
|
if ((images.paths ?? []).length === 0) {
|
|
353
363
|
return {
|
|
354
|
-
error: 'cover validation: 文章 takes its cover from a body image (默认首图为封面) but none was supplied — set metadata.wechatmp.coverPath or metadata.images[]',
|
|
364
|
+
error: 'cover validation: 文章 takes its cover from a body image (默认首图为封面) but none was supplied — set metadata.wechatmp.coverPath, metadata.coverImage or metadata.images[]',
|
|
355
365
|
};
|
|
356
366
|
}
|
|
357
367
|
return {
|
|
@@ -19,6 +19,16 @@ import { CHANNEL, CONSOLE_URL, checkWechatSession, openWechatLogin, openWechatSe
|
|
|
19
19
|
const USAGE =
|
|
20
20
|
'usage: wechatmp profile-check [login|check|open] [--profile <dir>] [--url <url>] [--timeout <ms>] [--headed]';
|
|
21
21
|
const LOGIN_TIMEOUT_MS = 180_000;
|
|
22
|
+
/**
|
|
23
|
+
* The one browser open, console navigation and context close a `check` performs around its readiness
|
|
24
|
+
* poll (headless ~3-4s, headed ~5-8s). `--timeout` is the WHOLE probe budget — kk SIGKILLs the process
|
|
25
|
+
* at that instant — so the poll must not spend all of it: a dead session then dies mid-report and
|
|
26
|
+
* surfaces as `probe exit 1 (malformed probe output)` instead of `refused` (observed 2026-10-16, where
|
|
27
|
+
* the 30s poll plus overhead overran `kk plugin check`'s 30s default).
|
|
28
|
+
*/
|
|
29
|
+
const PROFILE_OVERHEAD_MS = 8_000;
|
|
30
|
+
/** Floor for the readiness poll, so a tiny `--timeout` still probes the console instead of refusing blind. */
|
|
31
|
+
const MIN_READINESS_MS = 1_000;
|
|
22
32
|
|
|
23
33
|
interface WechatVerdict {
|
|
24
34
|
status: 'verified' | 'refused';
|
|
@@ -106,7 +116,11 @@ export async function main(argv: string[] = process.argv.slice(2)): Promise<numb
|
|
|
106
116
|
|
|
107
117
|
let verdict: WechatVerdict;
|
|
108
118
|
try {
|
|
109
|
-
await checkWechatSession(profileDir, {
|
|
119
|
+
await checkWechatSession(profileDir, {
|
|
120
|
+
headless: !headed,
|
|
121
|
+
timeoutMs:
|
|
122
|
+
timeoutMs === undefined ? undefined : Math.max(MIN_READINESS_MS, timeoutMs - PROFILE_OVERHEAD_MS),
|
|
123
|
+
});
|
|
110
124
|
verdict = {
|
|
111
125
|
status: 'verified',
|
|
112
126
|
profileDir,
|