@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;
|
|
@@ -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();
|
|
@@ -19835,7 +19835,7 @@ var init_runtime_node_bun = __esm(() => {
|
|
|
19835
19835
|
import { join as join5, resolve as resolve5 } from "path";
|
|
19836
19836
|
import { parseArgs } from "util";
|
|
19837
19837
|
|
|
19838
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
19838
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/errors.js
|
|
19839
19839
|
class BrowserAutomationError extends Error {
|
|
19840
19840
|
constructor(message, options) {
|
|
19841
19841
|
super(message, options);
|
|
@@ -19884,14 +19884,14 @@ class OperationAbortedError extends BrowserAutomationError {
|
|
|
19884
19884
|
this.name = "OperationAbortedError";
|
|
19885
19885
|
}
|
|
19886
19886
|
}
|
|
19887
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
19887
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
19888
19888
|
import { mkdir } from "fs/promises";
|
|
19889
19889
|
|
|
19890
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
19890
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
19891
19891
|
init_file_system_node();
|
|
19892
19892
|
init_config();
|
|
19893
19893
|
|
|
19894
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
19894
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/path.js
|
|
19895
19895
|
function normalizeSeparators(path) {
|
|
19896
19896
|
return path.replaceAll("\\", "/");
|
|
19897
19897
|
}
|
|
@@ -19949,10 +19949,10 @@ function getProcessCwd() {
|
|
|
19949
19949
|
return globalThis.process?.cwd?.() ?? "/";
|
|
19950
19950
|
}
|
|
19951
19951
|
|
|
19952
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
19952
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
19953
19953
|
init_runtime_node_bun();
|
|
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/profile-dir.js
|
|
19956
19956
|
function resolveProfileDir(profileDir) {
|
|
19957
19957
|
if (profileDir.trim() === "") {
|
|
19958
19958
|
throw new InvalidProfileDirError;
|
|
@@ -19964,7 +19964,7 @@ function resolveProfileDir(profileDir) {
|
|
|
19964
19964
|
return resolved;
|
|
19965
19965
|
}
|
|
19966
19966
|
|
|
19967
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
19967
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
|
|
19968
19968
|
var PROFILE_DIR_MODE = 448;
|
|
19969
19969
|
var BUSY_PROFILE_PATTERN = /singleton|already in use|in use by another/i;
|
|
19970
19970
|
var CHROMIUM_MISSING_PATTERN = /playwright install|executable doesn't exist/i;
|
|
@@ -20015,7 +20015,7 @@ function createPersistentLauncher(options = {}) {
|
|
|
20015
20015
|
};
|
|
20016
20016
|
}
|
|
20017
20017
|
|
|
20018
|
-
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.
|
|
20018
|
+
// ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.30+6d005366f784ddaf/node_modules/@gobing-ai/ts-browser-automation/dist/operations.js
|
|
20019
20019
|
var DEFAULT_TIMEOUT_MS = 30000;
|
|
20020
20020
|
var POLL_INTERVAL_MS = 250;
|
|
20021
20021
|
var defaultLauncher;
|
|
@@ -20358,6 +20358,13 @@ function sha256Hex(value) {
|
|
|
20358
20358
|
|
|
20359
20359
|
// ../../packages/publish-harness/src/bot.ts
|
|
20360
20360
|
var DEFAULT_BOT_PROFILE_ROOT = join3(homedir3(), ".config", "kk", "browser-profiles");
|
|
20361
|
+
var MAX_IDENTITY_LENGTH = 128;
|
|
20362
|
+
function normalizeSessionIdentity(value) {
|
|
20363
|
+
if (typeof value !== "string")
|
|
20364
|
+
return;
|
|
20365
|
+
const cleaned = value.replace(/\p{Cc}/gu, "").trim().slice(0, MAX_IDENTITY_LENGTH);
|
|
20366
|
+
return cleaned.length === 0 ? undefined : cleaned;
|
|
20367
|
+
}
|
|
20361
20368
|
class BotError extends Error {
|
|
20362
20369
|
code;
|
|
20363
20370
|
constructor(code, message) {
|
|
@@ -20621,18 +20628,39 @@ async function runProfileCli(config, argv = process.argv.slice(2), deps = {}) {
|
|
|
20621
20628
|
return openChannelSession(config, { profileDir, url: url ?? "" }, deps, stdout);
|
|
20622
20629
|
}
|
|
20623
20630
|
if (command === "login") {
|
|
20631
|
+
const loginTimeoutMs = timeoutMs ?? config.loginTimeoutMs ?? DEFAULT_LOGIN_TIMEOUT_MS;
|
|
20632
|
+
const launcher = deps.launcher ?? kkBrowserLauncher;
|
|
20624
20633
|
try {
|
|
20625
|
-
|
|
20634
|
+
if (url === undefined) {
|
|
20635
|
+
await loginWithProfile({
|
|
20636
|
+
profileDir,
|
|
20637
|
+
url: config.homeUrl,
|
|
20638
|
+
isAuthenticated: config.isAuthenticated,
|
|
20639
|
+
timeoutMs: loginTimeoutMs,
|
|
20640
|
+
launcher
|
|
20641
|
+
});
|
|
20642
|
+
stdout(`${config.channel} profile login verified: ${profileDir}`);
|
|
20643
|
+
return 0;
|
|
20644
|
+
}
|
|
20645
|
+
const facts = await withProfilePage({
|
|
20626
20646
|
profileDir,
|
|
20627
|
-
|
|
20647
|
+
headless: false,
|
|
20648
|
+
url,
|
|
20628
20649
|
isAuthenticated: config.isAuthenticated,
|
|
20629
|
-
timeoutMs:
|
|
20630
|
-
launcher
|
|
20631
|
-
})
|
|
20650
|
+
timeoutMs: loginTimeoutMs,
|
|
20651
|
+
launcher
|
|
20652
|
+
}, async ({ context, page }) => ({
|
|
20653
|
+
...await captureSessionFacts(context, config.homeUrl),
|
|
20654
|
+
...config.readIdentity === undefined ? {} : { identity: await readIdentityOrUndefined(config.readIdentity, page) }
|
|
20655
|
+
}));
|
|
20632
20656
|
stdout(`${config.channel} profile login verified: ${profileDir}`);
|
|
20633
|
-
|
|
20634
|
-
|
|
20635
|
-
|
|
20657
|
+
stdout(JSON.stringify({
|
|
20658
|
+
status: "verified",
|
|
20659
|
+
profileDir,
|
|
20660
|
+
defaultUrl: config.homeUrl,
|
|
20661
|
+
...facts.expiresAt === undefined ? {} : { expiresAt: facts.expiresAt },
|
|
20662
|
+
...facts.identity === undefined ? {} : { identity: facts.identity }
|
|
20663
|
+
}));
|
|
20636
20664
|
return 0;
|
|
20637
20665
|
} catch (error) {
|
|
20638
20666
|
stdout(`${config.channel} profile login failed: ${errorMessage2(error)}`);
|
|
@@ -20648,6 +20676,29 @@ async function runProfileCli(config, argv = process.argv.slice(2), deps = {}) {
|
|
|
20648
20676
|
stdout(JSON.stringify(result));
|
|
20649
20677
|
return result.status === "verified" ? 0 : 1;
|
|
20650
20678
|
}
|
|
20679
|
+
async function captureSessionFacts(context, url) {
|
|
20680
|
+
let cookies;
|
|
20681
|
+
try {
|
|
20682
|
+
cookies = await context.cookies(url);
|
|
20683
|
+
} catch {
|
|
20684
|
+
return {};
|
|
20685
|
+
}
|
|
20686
|
+
let earliest;
|
|
20687
|
+
for (const cookie of cookies) {
|
|
20688
|
+
if (!cookie.httpOnly || cookie.expires <= 0)
|
|
20689
|
+
continue;
|
|
20690
|
+
if (earliest === undefined || cookie.expires < earliest)
|
|
20691
|
+
earliest = cookie.expires;
|
|
20692
|
+
}
|
|
20693
|
+
return earliest === undefined ? {} : { expiresAt: new Date(earliest * 1000).toISOString() };
|
|
20694
|
+
}
|
|
20695
|
+
async function readIdentityOrUndefined(readIdentity, page) {
|
|
20696
|
+
try {
|
|
20697
|
+
return normalizeSessionIdentity(await readIdentity(page));
|
|
20698
|
+
} catch {
|
|
20699
|
+
return;
|
|
20700
|
+
}
|
|
20701
|
+
}
|
|
20651
20702
|
function errorMessage2(error) {
|
|
20652
20703
|
return error instanceof Error ? error.message : String(error);
|
|
20653
20704
|
}
|
|
@@ -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);
|
|
@@ -12248,7 +12248,7 @@ var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx)
|
|
|
12248
12248
|
});
|
|
12249
12249
|
}
|
|
12250
12250
|
});
|
|
12251
|
-
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.
|
|
12251
|
+
// ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
|
|
12252
12252
|
init_file_system_node();
|
|
12253
12253
|
init_config();
|
|
12254
12254
|
|