@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
|
|
@@ -20256,7 +20256,7 @@ import { basename as basename2 } from "path";
|
|
|
20256
20256
|
// ../../packages/publish-harness/src/browser.ts
|
|
20257
20257
|
import { join as join5, resolve as resolve5 } from "path";
|
|
20258
20258
|
|
|
20259
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20259
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/errors.js
|
|
20260
20260
|
class BrowserAutomationError extends Error {
|
|
20261
20261
|
constructor(message, options) {
|
|
20262
20262
|
super(message, options);
|
|
@@ -20305,10 +20305,10 @@ class OperationAbortedError extends BrowserAutomationError {
|
|
|
20305
20305
|
this.name = "OperationAbortedError";
|
|
20306
20306
|
}
|
|
20307
20307
|
}
|
|
20308
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20308
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
20309
20309
|
import { mkdir } from "fs/promises";
|
|
20310
20310
|
|
|
20311
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20311
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/profile-dir.js
|
|
20312
20312
|
function resolveProfileDir(profileDir) {
|
|
20313
20313
|
if (profileDir.trim() === "") {
|
|
20314
20314
|
throw new InvalidProfileDirError;
|
|
@@ -20320,7 +20320,7 @@ function resolveProfileDir(profileDir) {
|
|
|
20320
20320
|
return resolved;
|
|
20321
20321
|
}
|
|
20322
20322
|
|
|
20323
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20323
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
20324
20324
|
var PROFILE_DIR_MODE = 448;
|
|
20325
20325
|
var BUSY_PROFILE_PATTERN = /singleton|already in use|in use by another/i;
|
|
20326
20326
|
var CHROMIUM_MISSING_PATTERN = /playwright install|executable doesn't exist/i;
|
|
@@ -20371,7 +20371,7 @@ function createPersistentLauncher(options = {}) {
|
|
|
20371
20371
|
};
|
|
20372
20372
|
}
|
|
20373
20373
|
|
|
20374
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20374
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/operations.js
|
|
20375
20375
|
var DEFAULT_TIMEOUT_MS = 30000;
|
|
20376
20376
|
var POLL_INTERVAL_MS = 250;
|
|
20377
20377
|
var defaultLauncher;
|
|
@@ -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();
|
|
@@ -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.5.
|
|
11662
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/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.5.
|
|
11740
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/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) {
|
|
@@ -11755,11 +11755,11 @@ function createNodeFileSystem(root, paths) {
|
|
|
11755
11755
|
const lines = buffer.split(/\r?\n/);
|
|
11756
11756
|
buffer = lines.pop() ?? "";
|
|
11757
11757
|
for (const line of lines) {
|
|
11758
|
-
yield line;
|
|
11758
|
+
yield { text: line, terminated: true };
|
|
11759
11759
|
}
|
|
11760
11760
|
}
|
|
11761
11761
|
if (buffer.length > 0)
|
|
11762
|
-
yield buffer;
|
|
11762
|
+
yield { text: buffer, terminated: false };
|
|
11763
11763
|
},
|
|
11764
11764
|
writeFile: (path, content) => {
|
|
11765
11765
|
ensureParentDir(path);
|
|
@@ -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.5.
|
|
11827
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/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.5.
|
|
19038
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/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.5.
|
|
19130
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/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.5.
|
|
19502
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/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.5.
|
|
19566
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/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.5.
|
|
19615
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/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.5.
|
|
19618
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/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.5.
|
|
19622
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/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.5.
|
|
19680
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/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.5.
|
|
19683
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/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.5.
|
|
19695
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/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.5.
|
|
19746
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/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;
|
|
@@ -20086,6 +20086,13 @@ function sha256Hex(value) {
|
|
|
20086
20086
|
|
|
20087
20087
|
// ../../packages/publish-harness/src/bot.ts
|
|
20088
20088
|
var DEFAULT_BOT_PROFILE_ROOT = join3(homedir3(), ".config", "kk", "browser-profiles");
|
|
20089
|
+
var MAX_IDENTITY_LENGTH = 128;
|
|
20090
|
+
function normalizeSessionIdentity(value) {
|
|
20091
|
+
if (typeof value !== "string")
|
|
20092
|
+
return;
|
|
20093
|
+
const cleaned = value.replace(/\p{Cc}/gu, "").trim().slice(0, MAX_IDENTITY_LENGTH);
|
|
20094
|
+
return cleaned.length === 0 ? undefined : cleaned;
|
|
20095
|
+
}
|
|
20089
20096
|
class BotError extends Error {
|
|
20090
20097
|
code;
|
|
20091
20098
|
constructor(code, message) {
|
|
@@ -20349,18 +20356,39 @@ async function runProfileCli(config, argv = process.argv.slice(2), deps = {}) {
|
|
|
20349
20356
|
return openChannelSession(config, { profileDir, url: url ?? "" }, deps, stdout);
|
|
20350
20357
|
}
|
|
20351
20358
|
if (command === "login") {
|
|
20359
|
+
const loginTimeoutMs = timeoutMs ?? config.loginTimeoutMs ?? DEFAULT_LOGIN_TIMEOUT_MS;
|
|
20360
|
+
const launcher = deps.launcher ?? kkBrowserLauncher;
|
|
20352
20361
|
try {
|
|
20353
|
-
|
|
20362
|
+
if (url === undefined) {
|
|
20363
|
+
await loginWithProfile({
|
|
20364
|
+
profileDir,
|
|
20365
|
+
url: config.homeUrl,
|
|
20366
|
+
isAuthenticated: config.isAuthenticated,
|
|
20367
|
+
timeoutMs: loginTimeoutMs,
|
|
20368
|
+
launcher
|
|
20369
|
+
});
|
|
20370
|
+
stdout(`${config.channel} profile login verified: ${profileDir}`);
|
|
20371
|
+
return 0;
|
|
20372
|
+
}
|
|
20373
|
+
const facts = await withProfilePage({
|
|
20354
20374
|
profileDir,
|
|
20355
|
-
|
|
20375
|
+
headless: false,
|
|
20376
|
+
url,
|
|
20356
20377
|
isAuthenticated: config.isAuthenticated,
|
|
20357
|
-
timeoutMs:
|
|
20358
|
-
launcher
|
|
20359
|
-
})
|
|
20378
|
+
timeoutMs: loginTimeoutMs,
|
|
20379
|
+
launcher
|
|
20380
|
+
}, async ({ context, page }) => ({
|
|
20381
|
+
...await captureSessionFacts(context, config.homeUrl),
|
|
20382
|
+
...config.readIdentity === undefined ? {} : { identity: await readIdentityOrUndefined(config.readIdentity, page) }
|
|
20383
|
+
}));
|
|
20360
20384
|
stdout(`${config.channel} profile login verified: ${profileDir}`);
|
|
20361
|
-
|
|
20362
|
-
|
|
20363
|
-
|
|
20385
|
+
stdout(JSON.stringify({
|
|
20386
|
+
status: "verified",
|
|
20387
|
+
profileDir,
|
|
20388
|
+
defaultUrl: config.homeUrl,
|
|
20389
|
+
...facts.expiresAt === undefined ? {} : { expiresAt: facts.expiresAt },
|
|
20390
|
+
...facts.identity === undefined ? {} : { identity: facts.identity }
|
|
20391
|
+
}));
|
|
20364
20392
|
return 0;
|
|
20365
20393
|
} catch (error) {
|
|
20366
20394
|
stdout(`${config.channel} profile login failed: ${errorMessage2(error)}`);
|
|
@@ -20376,6 +20404,29 @@ async function runProfileCli(config, argv = process.argv.slice(2), deps = {}) {
|
|
|
20376
20404
|
stdout(JSON.stringify(result));
|
|
20377
20405
|
return result.status === "verified" ? 0 : 1;
|
|
20378
20406
|
}
|
|
20407
|
+
async function captureSessionFacts(context, url) {
|
|
20408
|
+
let cookies;
|
|
20409
|
+
try {
|
|
20410
|
+
cookies = await context.cookies(url);
|
|
20411
|
+
} catch {
|
|
20412
|
+
return {};
|
|
20413
|
+
}
|
|
20414
|
+
let earliest;
|
|
20415
|
+
for (const cookie of cookies) {
|
|
20416
|
+
if (!cookie.httpOnly || cookie.expires <= 0)
|
|
20417
|
+
continue;
|
|
20418
|
+
if (earliest === undefined || cookie.expires < earliest)
|
|
20419
|
+
earliest = cookie.expires;
|
|
20420
|
+
}
|
|
20421
|
+
return earliest === undefined ? {} : { expiresAt: new Date(earliest * 1000).toISOString() };
|
|
20422
|
+
}
|
|
20423
|
+
async function readIdentityOrUndefined(readIdentity, page) {
|
|
20424
|
+
try {
|
|
20425
|
+
return normalizeSessionIdentity(await readIdentity(page));
|
|
20426
|
+
} catch {
|
|
20427
|
+
return;
|
|
20428
|
+
}
|
|
20429
|
+
}
|
|
20379
20430
|
function errorMessage2(error) {
|
|
20380
20431
|
return error instanceof Error ? error.message : String(error);
|
|
20381
20432
|
}
|
|
@@ -4813,7 +4813,7 @@ var init_zod = __esm(() => {
|
|
|
4813
4813
|
init_external();
|
|
4814
4814
|
});
|
|
4815
4815
|
|
|
4816
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4816
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/errors.js
|
|
4817
4817
|
var ErrorCode;
|
|
4818
4818
|
var init_errors3 = __esm(() => {
|
|
4819
4819
|
ErrorCode = {
|
|
@@ -4824,7 +4824,7 @@ var init_errors3 = __esm(() => {
|
|
|
4824
4824
|
};
|
|
4825
4825
|
});
|
|
4826
4826
|
|
|
4827
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4827
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/api-response.js
|
|
4828
4828
|
var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
|
|
4829
4829
|
var init_api_response = __esm(() => {
|
|
4830
4830
|
init_errors3();
|
|
@@ -4847,13 +4847,13 @@ var init_api_response = __esm(() => {
|
|
|
4847
4847
|
CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
|
|
4848
4848
|
});
|
|
4849
4849
|
|
|
4850
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4850
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/cursor.js
|
|
4851
4851
|
var init_cursor = () => {};
|
|
4852
4852
|
|
|
4853
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4853
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
|
|
4854
4854
|
var init_event_severity = () => {};
|
|
4855
4855
|
|
|
4856
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4856
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/output.js
|
|
4857
4857
|
function processStream(name) {
|
|
4858
4858
|
const proc = globalThis.process;
|
|
4859
4859
|
const stream = proc?.[name];
|
|
@@ -4871,7 +4871,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
|
|
|
4871
4871
|
}
|
|
4872
4872
|
var defaultStderrTarget;
|
|
4873
4873
|
|
|
4874
|
-
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.
|
|
4874
|
+
// ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/index.js
|
|
4875
4875
|
var init_dist = __esm(() => {
|
|
4876
4876
|
init_api_response();
|
|
4877
4877
|
init_cursor();
|
|
@@ -11869,7 +11869,7 @@ var init_dist2 = __esm(() => {
|
|
|
11869
11869
|
$visitAsync = visit.visitAsync;
|
|
11870
11870
|
});
|
|
11871
11871
|
|
|
11872
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
11872
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/config.js
|
|
11873
11873
|
var configSchema;
|
|
11874
11874
|
var init_config = __esm(() => {
|
|
11875
11875
|
init_dist2();
|
|
@@ -11893,7 +11893,7 @@ var init_config = __esm(() => {
|
|
|
11893
11893
|
});
|
|
11894
11894
|
});
|
|
11895
11895
|
|
|
11896
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
11896
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
|
|
11897
11897
|
import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
|
|
11898
11898
|
import { dirname, resolve as resolvePath } from "path";
|
|
11899
11899
|
function createNodeFileSystem(root, paths) {
|
|
@@ -11911,11 +11911,11 @@ function createNodeFileSystem(root, paths) {
|
|
|
11911
11911
|
const lines = buffer.split(/\r?\n/);
|
|
11912
11912
|
buffer = lines.pop() ?? "";
|
|
11913
11913
|
for (const line of lines) {
|
|
11914
|
-
yield line;
|
|
11914
|
+
yield { text: line, terminated: true };
|
|
11915
11915
|
}
|
|
11916
11916
|
}
|
|
11917
11917
|
if (buffer.length > 0)
|
|
11918
|
-
yield buffer;
|
|
11918
|
+
yield { text: buffer, terminated: false };
|
|
11919
11919
|
},
|
|
11920
11920
|
writeFile: (path, content) => {
|
|
11921
11921
|
ensureParentDir(path);
|
|
@@ -12249,7 +12249,7 @@ var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx)
|
|
|
12249
12249
|
});
|
|
12250
12250
|
}
|
|
12251
12251
|
});
|
|
12252
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
12252
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
12253
12253
|
init_file_system_node();
|
|
12254
12254
|
init_config();
|
|
12255
12255
|
|