@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();
|
|
@@ -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.5.
|
|
20099
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/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.5.
|
|
20103
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/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.5.
|
|
20161
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/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
|
|
@@ -20250,7 +20250,7 @@ async function trySelectors(page, selectors, options = {}) {
|
|
|
20250
20250
|
// ../../packages/publish-harness/src/browser.ts
|
|
20251
20251
|
import { join as join5, resolve as resolve5 } from "path";
|
|
20252
20252
|
|
|
20253
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20253
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/errors.js
|
|
20254
20254
|
class BrowserAutomationError extends Error {
|
|
20255
20255
|
constructor(message, options) {
|
|
20256
20256
|
super(message, options);
|
|
@@ -20299,10 +20299,10 @@ class OperationAbortedError extends BrowserAutomationError {
|
|
|
20299
20299
|
this.name = "OperationAbortedError";
|
|
20300
20300
|
}
|
|
20301
20301
|
}
|
|
20302
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20302
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
20303
20303
|
import { mkdir } from "fs/promises";
|
|
20304
20304
|
|
|
20305
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20305
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/profile-dir.js
|
|
20306
20306
|
function resolveProfileDir(profileDir) {
|
|
20307
20307
|
if (profileDir.trim() === "") {
|
|
20308
20308
|
throw new InvalidProfileDirError;
|
|
@@ -20314,7 +20314,7 @@ function resolveProfileDir(profileDir) {
|
|
|
20314
20314
|
return resolved;
|
|
20315
20315
|
}
|
|
20316
20316
|
|
|
20317
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20317
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
20318
20318
|
var PROFILE_DIR_MODE = 448;
|
|
20319
20319
|
var BUSY_PROFILE_PATTERN = /singleton|already in use|in use by another/i;
|
|
20320
20320
|
var CHROMIUM_MISSING_PATTERN = /playwright install|executable doesn't exist/i;
|
|
@@ -20365,7 +20365,7 @@ function createPersistentLauncher(options = {}) {
|
|
|
20365
20365
|
};
|
|
20366
20366
|
}
|
|
20367
20367
|
|
|
20368
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20368
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/operations.js
|
|
20369
20369
|
var DEFAULT_TIMEOUT_MS = 30000;
|
|
20370
20370
|
var POLL_INTERVAL_MS = 250;
|
|
20371
20371
|
var defaultLauncher;
|
|
@@ -21269,6 +21269,10 @@ async function validateModeInput(operation, content) {
|
|
|
21269
21269
|
}
|
|
21270
21270
|
|
|
21271
21271
|
// ../../plugins/publishings/xhs-pub/src/page.ts
|
|
21272
|
+
var TRANSIENT_NAVIGATION = /net::ERR_(?:TIMED_OUT|CONNECTION_(?:RESET|CLOSED|TIMED_OUT|ABORTED|REFUSED|FAILED)|NETWORK_(?:CHANGED|IO_SUSPENDED)|EMPTY_RESPONSE|ADDRESS_UNREACHABLE|NAME_NOT_RESOLVED)/;
|
|
21273
|
+
function isTransientNavigationError(error) {
|
|
21274
|
+
return TRANSIENT_NAVIGATION.test(error instanceof Error ? error.message : String(error));
|
|
21275
|
+
}
|
|
21272
21276
|
var POLL_MS = 500;
|
|
21273
21277
|
var STEP_TIMEOUT_MS = 30000;
|
|
21274
21278
|
var CREATOR_TAB_BAR = "div.creator-tab";
|
|
@@ -21314,7 +21318,16 @@ function wrapPlaywrightPage(raw, shadow) {
|
|
|
21314
21318
|
return found;
|
|
21315
21319
|
};
|
|
21316
21320
|
return {
|
|
21317
|
-
goto: (url, options) =>
|
|
21321
|
+
goto: async (url, options) => {
|
|
21322
|
+
const navigate = () => pw.goto(url, { waitUntil: "domcontentloaded", ...options });
|
|
21323
|
+
try {
|
|
21324
|
+
await navigate();
|
|
21325
|
+
} catch (error) {
|
|
21326
|
+
if (!isTransientNavigationError(error))
|
|
21327
|
+
throw error;
|
|
21328
|
+
await navigate();
|
|
21329
|
+
}
|
|
21330
|
+
},
|
|
21318
21331
|
locator: (selector) => ({
|
|
21319
21332
|
count: () => pw.locator(selector).count(),
|
|
21320
21333
|
first: () => {
|
|
@@ -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);
|
|
@@ -19886,14 +19886,14 @@ class OperationAbortedError extends BrowserAutomationError {
|
|
|
19886
19886
|
this.name = "OperationAbortedError";
|
|
19887
19887
|
}
|
|
19888
19888
|
}
|
|
19889
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
19889
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
19890
19890
|
import { mkdir } from "fs/promises";
|
|
19891
19891
|
|
|
19892
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
19892
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
19893
19893
|
init_file_system_node();
|
|
19894
19894
|
init_config();
|
|
19895
19895
|
|
|
19896
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
19896
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/path.js
|
|
19897
19897
|
function normalizeSeparators(path) {
|
|
19898
19898
|
return path.replaceAll("\\", "/");
|
|
19899
19899
|
}
|
|
@@ -19951,10 +19951,10 @@ function getProcessCwd() {
|
|
|
19951
19951
|
return globalThis.process?.cwd?.() ?? "/";
|
|
19952
19952
|
}
|
|
19953
19953
|
|
|
19954
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
19954
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
19955
19955
|
init_runtime_node_bun();
|
|
19956
19956
|
|
|
19957
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
19957
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/profile-dir.js
|
|
19958
19958
|
function resolveProfileDir(profileDir) {
|
|
19959
19959
|
if (profileDir.trim() === "") {
|
|
19960
19960
|
throw new InvalidProfileDirError;
|
|
@@ -19966,7 +19966,7 @@ function resolveProfileDir(profileDir) {
|
|
|
19966
19966
|
return resolved;
|
|
19967
19967
|
}
|
|
19968
19968
|
|
|
19969
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
19969
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
19970
19970
|
var PROFILE_DIR_MODE = 448;
|
|
19971
19971
|
var BUSY_PROFILE_PATTERN = /singleton|already in use|in use by another/i;
|
|
19972
19972
|
var CHROMIUM_MISSING_PATTERN = /playwright install|executable doesn't exist/i;
|
|
@@ -20017,7 +20017,7 @@ function createPersistentLauncher(options = {}) {
|
|
|
20017
20017
|
};
|
|
20018
20018
|
}
|
|
20019
20019
|
|
|
20020
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20020
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/operations.js
|
|
20021
20021
|
var DEFAULT_TIMEOUT_MS = 30000;
|
|
20022
20022
|
var POLL_INTERVAL_MS = 250;
|
|
20023
20023
|
var defaultLauncher;
|
|
@@ -20947,6 +20947,10 @@ if (false) {}
|
|
|
20947
20947
|
var PUBLISH_URL = "https://creator.xiaohongshu.com/publish/publish";
|
|
20948
20948
|
|
|
20949
20949
|
// ../../plugins/publishings/xhs-pub/src/page.ts
|
|
20950
|
+
var TRANSIENT_NAVIGATION = /net::ERR_(?:TIMED_OUT|CONNECTION_(?:RESET|CLOSED|TIMED_OUT|ABORTED|REFUSED|FAILED)|NETWORK_(?:CHANGED|IO_SUSPENDED)|EMPTY_RESPONSE|ADDRESS_UNREACHABLE|NAME_NOT_RESOLVED)/;
|
|
20951
|
+
function isTransientNavigationError(error) {
|
|
20952
|
+
return TRANSIENT_NAVIGATION.test(error instanceof Error ? error.message : String(error));
|
|
20953
|
+
}
|
|
20950
20954
|
function wrapPlaywrightPage(raw, shadow) {
|
|
20951
20955
|
const pw = raw;
|
|
20952
20956
|
const onScreen = async (selector) => {
|
|
@@ -20968,7 +20972,16 @@ function wrapPlaywrightPage(raw, shadow) {
|
|
|
20968
20972
|
return found;
|
|
20969
20973
|
};
|
|
20970
20974
|
return {
|
|
20971
|
-
goto: (url, options) =>
|
|
20975
|
+
goto: async (url, options) => {
|
|
20976
|
+
const navigate = () => pw.goto(url, { waitUntil: "domcontentloaded", ...options });
|
|
20977
|
+
try {
|
|
20978
|
+
await navigate();
|
|
20979
|
+
} catch (error) {
|
|
20980
|
+
if (!isTransientNavigationError(error))
|
|
20981
|
+
throw error;
|
|
20982
|
+
await navigate();
|
|
20983
|
+
}
|
|
20984
|
+
},
|
|
20972
20985
|
locator: (selector) => ({
|
|
20973
20986
|
count: () => pw.locator(selector).count(),
|
|
20974
20987
|
first: () => {
|
|
@@ -10,6 +10,19 @@ import { waitUntil } from '@gobing-ai/publish-harness/browser';
|
|
|
10
10
|
* Playwright page is part of this seam, never reached around it.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Connect faults this origin produces intermittently (2026-10-16: `net::ERR_TIMED_OUT` at the
|
|
15
|
+
* publish page; 2026-10-13: the preflight's `Timeout 30000ms exceeded — waiting until "load"`).
|
|
16
|
+
* One retry absorbs the flake; a second failure is reported as it is, so a real outage still fails.
|
|
17
|
+
*/
|
|
18
|
+
const TRANSIENT_NAVIGATION =
|
|
19
|
+
/net::ERR_(?:TIMED_OUT|CONNECTION_(?:RESET|CLOSED|TIMED_OUT|ABORTED|REFUSED|FAILED)|NETWORK_(?:CHANGED|IO_SUSPENDED)|EMPTY_RESPONSE|ADDRESS_UNREACHABLE|NAME_NOT_RESOLVED)/;
|
|
20
|
+
|
|
21
|
+
/** Whether a navigation failed for a reason a single retry can plausibly clear. */
|
|
22
|
+
function isTransientNavigationError(error: unknown): boolean {
|
|
23
|
+
return TRANSIENT_NAVIGATION.test(error instanceof Error ? error.message : String(error));
|
|
24
|
+
}
|
|
25
|
+
|
|
13
26
|
export const POLL_MS = 500;
|
|
14
27
|
|
|
15
28
|
// The shared poll (0184 R2); re-exported so flow/index keep importing it from here.
|
|
@@ -169,7 +182,18 @@ export function wrapPlaywrightPage(raw: unknown, shadow?: ShadowProbe): XhsPage
|
|
|
169
182
|
};
|
|
170
183
|
|
|
171
184
|
return {
|
|
172
|
-
|
|
185
|
+
// `domcontentloaded`, never Playwright's `load` default: the console keeps long-lived
|
|
186
|
+
// subresources open, so a `load` wait turns a healthy visit into a timeout (2026-10-13
|
|
187
|
+
// preflight). Pinned here once, the way wechatmp-pub/src/page.ts already pins it.
|
|
188
|
+
goto: async (url, options) => {
|
|
189
|
+
const navigate = (): Promise<unknown> => pw.goto(url, { waitUntil: 'domcontentloaded', ...options });
|
|
190
|
+
try {
|
|
191
|
+
await navigate();
|
|
192
|
+
} catch (error) {
|
|
193
|
+
if (!isTransientNavigationError(error)) throw error;
|
|
194
|
+
await navigate();
|
|
195
|
+
}
|
|
196
|
+
},
|
|
173
197
|
locator: (selector) => ({
|
|
174
198
|
count: () => pw.locator(selector).count(),
|
|
175
199
|
first: () => {
|