@gobing-ai/knowledge-kit 0.0.32 → 0.0.34

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.
Files changed (72) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/index.js +43047 -24724
  3. package/package.json +4 -4
  4. package/plugins/generations/content-gen/dist/index.js +10 -9
  5. package/plugins/generations/core-facts-gen/dist/index.js +13 -12
  6. package/plugins/generations/daily-article-gen/dist/index.js +16 -21
  7. package/plugins/generations/daily-article-gen/src/index.ts +8 -12
  8. package/plugins/generations/dailynews-gen/dist/index.js +23 -21
  9. package/plugins/generations/dailynews-gen/src/script-builder.ts +25 -26
  10. package/plugins/generations/episode-plan-gen/dist/index.js +58 -15
  11. package/plugins/generations/episode-plan-gen/src/index.ts +76 -6
  12. package/plugins/generations/gemini-tts/README.md +11 -0
  13. package/plugins/generations/gemini-tts/dist/index.js +10 -9
  14. package/plugins/generations/image-gen/dist/index.js +171 -153
  15. package/plugins/generations/image-gen/presets/formats/xhs-card.yaml +16 -14
  16. package/plugins/generations/image-gen/presets/styles/xhs-knowledge.yaml +2 -2
  17. package/plugins/generations/image-gen/src/compose/card.ts +17 -2
  18. package/plugins/generations/image-gen/src/compose/chromium.ts +60 -42
  19. package/plugins/generations/news-report-gen/dist/index.js +13 -12
  20. package/plugins/generations/voice-gen/dist/index.js +10 -9
  21. package/plugins/ingestions/aihot-ingest/dist/index.js +13 -12
  22. package/plugins/ingestions/horizon-ingest/dist/index.js +13 -12
  23. package/plugins/ingestions/karakeep-local/dist/index.js +13 -13
  24. package/plugins/ingestions/last30days-ingest/dist/index.js +13 -12
  25. package/plugins/ingestions/web-search/dist/index.js +11 -10
  26. package/plugins/kk/README.md +38 -0
  27. package/plugins/kk/decisions/extract/ai-news.yaml +27 -0
  28. package/plugins/kk/decisions/kk-items.yaml +179 -0
  29. package/plugins/kk/plugin.json +1 -1
  30. package/plugins/kk/schedules/cron.tmpl +15 -0
  31. package/plugins/kk/schedules/launchd.plist.tmpl +77 -0
  32. package/plugins/kk/scripts/daily-stages.ts +2023 -0
  33. package/plugins/kk/scripts/daily-voice-style.zh.md +15 -10
  34. package/plugins/kk/scripts/kk-workflow-stages.ts +253 -1368
  35. package/plugins/kk/skills/content-safety/SKILL.md +39 -8
  36. package/plugins/kk/skills/content-safety/references/platforms/apple-podcasts.md +2 -2
  37. package/plugins/kk/skills/web-automation/SKILL.md +100 -0
  38. package/plugins/kk/skills/web-automation/references/browser-launch.md +86 -0
  39. package/plugins/kk/workflows/kk-collect.yaml +256 -0
  40. package/plugins/kk/workflows/kk-daily-ai-voice.yaml +9 -3
  41. package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +774 -0
  42. package/plugins/kk/workflows/kk-daily-safety.yaml +167 -0
  43. package/plugins/publishings/emdash-pub/dist/index.js +10 -9
  44. package/plugins/publishings/infoq-pub/dist/index.js +152 -59
  45. package/plugins/publishings/infoq-pub/plugin.json +1 -0
  46. package/plugins/publishings/infoq-pub/src/index.ts +167 -55
  47. package/plugins/publishings/infoq-pub/src/profile-check.ts +4 -2
  48. package/plugins/publishings/juejin-pub/dist/index.js +111 -30
  49. package/plugins/publishings/juejin-pub/plugin.json +1 -0
  50. package/plugins/publishings/juejin-pub/src/index.ts +49 -9
  51. package/plugins/publishings/medium-pub/dist/index.js +10 -9
  52. package/plugins/publishings/podcast-pub/dist/index.js +10 -9
  53. package/plugins/publishings/qiita-pub/dist/index.js +10 -9
  54. package/plugins/publishings/substack-pub/dist/index.js +105 -28
  55. package/plugins/publishings/substack-pub/plugin.json +1 -0
  56. package/plugins/publishings/substack-pub/src/index.ts +39 -8
  57. package/plugins/publishings/substack-pub/src/profile-check.ts +2 -0
  58. package/plugins/publishings/surfdash-pub/dist/index.js +10 -9
  59. package/plugins/publishings/wechatmp-pub/dist/index.js +115 -31
  60. package/plugins/publishings/wechatmp-pub/plugin.json +1 -0
  61. package/plugins/publishings/wechatmp-pub/src/index.ts +42 -9
  62. package/plugins/publishings/wechatmp-pub/src/profile-check.ts +84 -40
  63. package/plugins/publishings/x-pub/dist/index.js +114 -35
  64. package/plugins/publishings/x-pub/plugin.json +1 -0
  65. package/plugins/publishings/x-pub/src/index.ts +68 -14
  66. package/plugins/publishings/xhs-pub/dist/index.js +154 -59
  67. package/plugins/publishings/xhs-pub/plugin.json +1 -0
  68. package/plugins/publishings/xhs-pub/src/flow.ts +9 -3
  69. package/plugins/publishings/xhs-pub/src/index.ts +119 -9
  70. package/plugins/publishings/xhs-pub/src/page.ts +4 -17
  71. package/plugins/publishings/xhs-pub/src/profile-check.ts +28 -15
  72. package/plugins/publishings/zenn-pub/dist/index.js +10 -9
@@ -14671,7 +14671,7 @@ var init_zod = __esm(() => {
14671
14671
  init_external();
14672
14672
  });
14673
14673
 
14674
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/errors.js
14674
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/errors.js
14675
14675
  var ErrorCode;
14676
14676
  var init_errors3 = __esm(() => {
14677
14677
  ErrorCode = {
@@ -14682,7 +14682,7 @@ var init_errors3 = __esm(() => {
14682
14682
  };
14683
14683
  });
14684
14684
 
14685
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/api-response.js
14685
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/api-response.js
14686
14686
  var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
14687
14687
  var init_api_response = __esm(() => {
14688
14688
  init_errors3();
@@ -14705,10 +14705,10 @@ var init_api_response = __esm(() => {
14705
14705
  CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
14706
14706
  });
14707
14707
 
14708
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/cursor.js
14708
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/cursor.js
14709
14709
  var init_cursor = () => {};
14710
14710
 
14711
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/env.js
14711
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/env.js
14712
14712
  function getEnvVar(name, fallback) {
14713
14713
  const raw = process.env[name];
14714
14714
  return raw === undefined ? fallback : raw;
@@ -14717,10 +14717,10 @@ function getEnvVars() {
14717
14717
  return process.env;
14718
14718
  }
14719
14719
 
14720
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
14720
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
14721
14721
  var init_event_severity = () => {};
14722
14722
 
14723
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/object.js
14723
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/object.js
14724
14724
  function isPlainObject2(value) {
14725
14725
  return typeof value === "object" && value !== null && !Array.isArray(value);
14726
14726
  }
@@ -14738,7 +14738,7 @@ function deepMerge(target, source) {
14738
14738
  return result;
14739
14739
  }
14740
14740
 
14741
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/output.js
14741
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/output.js
14742
14742
  function processStream(name) {
14743
14743
  const proc = globalThis.process;
14744
14744
  const stream = proc?.[name];
@@ -14756,7 +14756,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
14756
14756
  }
14757
14757
  var defaultStderrTarget;
14758
14758
 
14759
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/index.js
14759
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/index.js
14760
14760
  var init_dist = __esm(() => {
14761
14761
  init_api_response();
14762
14762
  init_cursor();
@@ -21754,7 +21754,7 @@ var init_dist2 = __esm(() => {
21754
21754
  $visitAsync = visit.visitAsync;
21755
21755
  });
21756
21756
 
21757
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.15/node_modules/@gobing-ai/ts-runtime/dist/config.js
21757
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.21+44edd5c4d6372504/node_modules/@gobing-ai/ts-runtime/dist/config.js
21758
21758
  function getProcessEnv() {
21759
21759
  return getEnvVars();
21760
21760
  }
@@ -21832,7 +21832,7 @@ var init_config = __esm(() => {
21832
21832
  };
21833
21833
  });
21834
21834
 
21835
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.15/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
21835
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.21+44edd5c4d6372504/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
21836
21836
  import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
21837
21837
  import { dirname, resolve as resolvePath } from "path";
21838
21838
  function createNodeFileSystem(root, paths) {
@@ -21919,7 +21919,7 @@ function findProjectRoot(startDir) {
21919
21919
  }
21920
21920
  var init_file_system_node = () => {};
21921
21921
 
21922
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.15/node_modules/@gobing-ai/ts-runtime/dist/db-errors.js
21922
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.21+44edd5c4d6372504/node_modules/@gobing-ai/ts-runtime/dist/db-errors.js
21923
21923
  var DbModuleNotInstalledError;
21924
21924
  var init_db_errors = __esm(() => {
21925
21925
  DbModuleNotInstalledError = class DbModuleNotInstalledError extends Error {
@@ -29130,7 +29130,7 @@ var init_execa = __esm(() => {
29130
29130
  } = getIpcExport());
29131
29131
  });
29132
29132
 
29133
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.15/node_modules/@gobing-ai/ts-runtime/dist/process-group.js
29133
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.21+44edd5c4d6372504/node_modules/@gobing-ai/ts-runtime/dist/process-group.js
29134
29134
  function resolveDeadline(optionTimeout, defaultTimeout) {
29135
29135
  if (optionTimeout === null)
29136
29136
  return null;
@@ -29222,7 +29222,7 @@ function ownProcessGroupLifecycle(ownership) {
29222
29222
  }
29223
29223
  var MAX_TIMEOUT_MS = 2147483647, DEFAULT_KILL_GRACE_MS = 5000, GROUP_POLL_INTERVAL_MS = 25, GROUP_KILL_PATIENCE_MS = 2000;
29224
29224
 
29225
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.15/node_modules/@gobing-ai/ts-runtime/dist/process-executor.js
29225
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.21+44edd5c4d6372504/node_modules/@gobing-ai/ts-runtime/dist/process-executor.js
29226
29226
  import { isatty } from "tty";
29227
29227
  function processEventSeverity(reason, exitCode) {
29228
29228
  if (reason === "error")
@@ -29594,7 +29594,7 @@ var init_process_executor = __esm(() => {
29594
29594
  init_config();
29595
29595
  });
29596
29596
 
29597
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.15/node_modules/@gobing-ai/ts-runtime/dist/runtime-node-bun.js
29597
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.21+44edd5c4d6372504/node_modules/@gobing-ai/ts-runtime/dist/runtime-node-bun.js
29598
29598
  function getNodeFileSystem() {
29599
29599
  if (!_nodeFileSystem)
29600
29600
  _nodeFileSystem = createNodeFileSystem();
@@ -29741,15 +29741,16 @@ var PluginManifestSchema = exports_external.looseObject({
29741
29741
  name: exports_external.string().min(1),
29742
29742
  kind: PluginKindSchema,
29743
29743
  entry: exports_external.string().min(1),
29744
+ check: exports_external.string().min(1).optional(),
29744
29745
  version: exports_external.string().optional(),
29745
29746
  description: exports_external.string().optional(),
29746
29747
  operations: exports_external.record(exports_external.string(), PluginOperationSchema).optional()
29747
29748
  });
29748
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.15/node_modules/@gobing-ai/ts-runtime/dist/index.js
29749
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.21+44edd5c4d6372504/node_modules/@gobing-ai/ts-runtime/dist/index.js
29749
29750
  init_file_system_node();
29750
29751
  init_config();
29751
29752
 
29752
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.15/node_modules/@gobing-ai/ts-runtime/dist/path.js
29753
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.21+44edd5c4d6372504/node_modules/@gobing-ai/ts-runtime/dist/path.js
29753
29754
  function normalizeSeparators(path6) {
29754
29755
  return path6.replaceAll("\\", "/");
29755
29756
  }
@@ -29807,7 +29808,7 @@ function getProcessCwd() {
29807
29808
  return globalThis.process?.cwd?.() ?? "/";
29808
29809
  }
29809
29810
 
29810
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.15/node_modules/@gobing-ai/ts-runtime/dist/index.js
29811
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.21+44edd5c4d6372504/node_modules/@gobing-ai/ts-runtime/dist/index.js
29811
29812
  init_runtime_node_bun();
29812
29813
 
29813
29814
  // ../../packages/kk-core/src/render-md.ts
@@ -29920,7 +29921,10 @@ async function trySelectors(page, selectors, options = {}) {
29920
29921
  return { found: false, selector: null };
29921
29922
  }
29922
29923
 
29923
- // ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.15+e28deaf1f2c5a2b1/node_modules/@gobing-ai/ts-browser-automation/dist/errors.js
29924
+ // ../../packages/publish-harness/src/browser.ts
29925
+ import { resolve as resolve2 } from "path";
29926
+
29927
+ // ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.21+b6949ba92ac553f0/node_modules/@gobing-ai/ts-browser-automation/dist/errors.js
29924
29928
  class BrowserAutomationError extends Error {
29925
29929
  constructor(message, options) {
29926
29930
  super(message, options);
@@ -29969,10 +29973,10 @@ class OperationAbortedError extends BrowserAutomationError {
29969
29973
  this.name = "OperationAbortedError";
29970
29974
  }
29971
29975
  }
29972
- // ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.15+e28deaf1f2c5a2b1/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
29976
+ // ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.21+b6949ba92ac553f0/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
29973
29977
  import { mkdir } from "fs/promises";
29974
29978
 
29975
- // ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.15+e28deaf1f2c5a2b1/node_modules/@gobing-ai/ts-browser-automation/dist/profile-dir.js
29979
+ // ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.21+b6949ba92ac553f0/node_modules/@gobing-ai/ts-browser-automation/dist/profile-dir.js
29976
29980
  function resolveProfileDir(profileDir) {
29977
29981
  if (profileDir.trim() === "") {
29978
29982
  throw new InvalidProfileDirError;
@@ -29984,7 +29988,7 @@ function resolveProfileDir(profileDir) {
29984
29988
  return resolved;
29985
29989
  }
29986
29990
 
29987
- // ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.15+e28deaf1f2c5a2b1/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
29991
+ // ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.21+b6949ba92ac553f0/node_modules/@gobing-ai/ts-browser-automation/dist/launcher.js
29988
29992
  var PROFILE_DIR_MODE = 448;
29989
29993
  var BUSY_PROFILE_PATTERN = /singleton|already in use|in use by another/i;
29990
29994
  var CHROMIUM_MISSING_PATTERN = /playwright install|executable doesn't exist/i;
@@ -30035,7 +30039,7 @@ function createPersistentLauncher(options = {}) {
30035
30039
  };
30036
30040
  }
30037
30041
 
30038
- // ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.15+e28deaf1f2c5a2b1/node_modules/@gobing-ai/ts-browser-automation/dist/operations.js
30042
+ // ../../node_modules/.bun/@gobing-ai+ts-browser-automation@0.5.21+b6949ba92ac553f0/node_modules/@gobing-ai/ts-browser-automation/dist/operations.js
30039
30043
  var DEFAULT_TIMEOUT_MS = 30000;
30040
30044
  var POLL_INTERVAL_MS = 250;
30041
30045
  var defaultLauncher;
@@ -30114,11 +30118,67 @@ async function pollPredicate(page, predicate, timeoutMs, signal) {
30114
30118
  function sleep(ms) {
30115
30119
  return new Promise((resolve2) => setTimeout(resolve2, ms));
30116
30120
  }
30121
+ // ../../packages/publish-harness/src/profile-dir.ts
30122
+ import { mkdir as mkdir2, stat } from "fs/promises";
30123
+ async function ensureProfileDir2(profileDir, headless) {
30124
+ const existing = await stat(profileDir).catch(() => null);
30125
+ if (existing) {
30126
+ if (!existing.isDirectory())
30127
+ throw new InvalidProfileDirError(`profileDir is not a directory: "${profileDir}".`);
30128
+ return;
30129
+ }
30130
+ if (headless)
30131
+ throw new BrowserProfileMissingError(profileDir);
30132
+ await mkdir2(profileDir, { recursive: true, mode: 448 });
30133
+ }
30134
+
30117
30135
  // ../../packages/publish-harness/src/browser.ts
30118
30136
  var DEFAULT_CHECK_TIMEOUT_MS = 30000;
30119
30137
  var DEFAULT_STEP_TIMEOUT_MS = 30000;
30120
30138
  var DEFAULT_POLL_MS = 500;
30121
30139
  var ATTACH_POLL_MS = 100;
30140
+ function createKkBrowserLauncher(loadPlaywright = () => import("playwright")) {
30141
+ return {
30142
+ async launch(request) {
30143
+ if (request.profileDir.trim() === "")
30144
+ throw new InvalidProfileDirError;
30145
+ const profileDir = resolve2(request.profileDir);
30146
+ await ensureProfileDir2(profileDir, request.headless);
30147
+ let playwright;
30148
+ try {
30149
+ playwright = await loadPlaywright();
30150
+ } catch (error51) {
30151
+ throw new PlaywrightUnavailableError('The "playwright" dependency is not installed. Run `bunx playwright install chromium`.', { cause: error51 });
30152
+ }
30153
+ const channel = process.env.KK_BROWSER_CHANNEL?.trim() || "chromium";
30154
+ let context2;
30155
+ try {
30156
+ context2 = await playwright.chromium.launchPersistentContext(profileDir, {
30157
+ headless: request.headless,
30158
+ channel,
30159
+ args: ["--disable-blink-features=AutomationControlled"],
30160
+ ignoreDefaultArgs: ["--enable-automation"]
30161
+ });
30162
+ } catch (error51) {
30163
+ const message = errorMessage2(error51);
30164
+ if (/singleton|already in use|in use by another/i.test(message)) {
30165
+ throw new BrowserProfileBusyError(profileDir, error51);
30166
+ }
30167
+ if (/playwright install|executable doesn't exist/i.test(message)) {
30168
+ throw new PlaywrightUnavailableError(`Browser channel '${channel}' is not installed. Run \`bunx playwright install chromium\` (or install Google Chrome for KK_BROWSER_CHANNEL=chrome).`, { cause: error51 });
30169
+ }
30170
+ throw error51;
30171
+ }
30172
+ await context2.addInitScript(() => {
30173
+ Object.defineProperty(navigator, "webdriver", { get: () => {
30174
+ return;
30175
+ } });
30176
+ });
30177
+ return context2;
30178
+ }
30179
+ };
30180
+ }
30181
+ var kkBrowserLauncher = createKkBrowserLauncher();
30122
30182
  function resolveChannelProfileDir(channel, override) {
30123
30183
  const tiers = [override, process.env[`${channel.toUpperCase()}_PROFILE_DIR`], process.env.KK_BROWSER_PROFILE_DIR];
30124
30184
  const chosen = tiers.find((tier) => tier !== undefined && tier.trim().length > 0);
@@ -30126,7 +30186,7 @@ function resolveChannelProfileDir(channel, override) {
30126
30186
  }
30127
30187
  async function checkChannelSession(config3, opts) {
30128
30188
  const timeoutMs = opts.timeoutMs ?? DEFAULT_CHECK_TIMEOUT_MS;
30129
- const passes = opts.headedFallback === false ? [true] : [true, false];
30189
+ const passes = opts.headedOnly ? [false] : opts.headedFallback === false ? [true] : [true, false];
30130
30190
  let lastDetail = `${config3.channel} readiness was never probed`;
30131
30191
  for (const headless of passes) {
30132
30192
  try {
@@ -30136,12 +30196,12 @@ async function checkChannelSession(config3, opts) {
30136
30196
  url: config3.homeUrl,
30137
30197
  isAuthenticated: config3.isAuthenticated,
30138
30198
  timeoutMs,
30139
- launcher: opts.launcher
30199
+ launcher: opts.launcher ?? kkBrowserLauncher
30140
30200
  }, async () => true);
30141
30201
  return {
30142
30202
  status: "verified",
30143
30203
  profileDir: opts.profileDir,
30144
- detail: `authenticated ${config3.channel} session observed ${headless ? "headlessly" : "via headed fallback"} via profile ${opts.profileDir} (read-only)`
30204
+ detail: `authenticated ${config3.channel} session observed ${headless ? "headlessly" : "via a headed pass"} via profile ${opts.profileDir} (read-only)`
30145
30205
  };
30146
30206
  } catch (error51) {
30147
30207
  if (error51 instanceof BrowserProfileMissingError) {
@@ -30162,7 +30222,7 @@ async function waitUntil(predicate, timeoutMs, pollMs = DEFAULT_POLL_MS) {
30162
30222
  if (await predicate()) {
30163
30223
  return true;
30164
30224
  }
30165
- await new Promise((resolve2) => setTimeout(resolve2, pollMs));
30225
+ await new Promise((resolve3) => setTimeout(resolve3, pollMs));
30166
30226
  }
30167
30227
  return predicate();
30168
30228
  }
@@ -30289,6 +30349,7 @@ var SELECTORS = {
30289
30349
  };
30290
30350
  var STEP_TIMEOUT_MS = 30000;
30291
30351
  var LOGIN_TIMEOUT_MS = 180000;
30352
+ var CHECK_TIMEOUT_MS = 60000;
30292
30353
  var AUTOSAVE_TIMEOUT_MS = 5000;
30293
30354
  var SAVE_KEY = process.platform === "darwin" ? "Meta+s" : "Control+s";
30294
30355
  var LOGIN_INSTRUCTION = "bun plugins/publishings/juejin-pub/src/profile-check.ts login";
@@ -30302,7 +30363,8 @@ var CONFIG = {
30302
30363
  channel: CHANNEL,
30303
30364
  homeUrl: EDITOR_URL,
30304
30365
  isAuthenticated,
30305
- loginTimeoutMs: LOGIN_TIMEOUT_MS
30366
+ loginTimeoutMs: LOGIN_TIMEOUT_MS,
30367
+ checkHeadedOnly: true
30306
30368
  };
30307
30369
  function fail(error51) {
30308
30370
  return ResultSchema.parse({ ok: false, target: TARGET, error: error51 });
@@ -30328,21 +30390,38 @@ function liveInputs(content) {
30328
30390
  async function readToast(page, texts) {
30329
30391
  return readScopedSignal(page, texts);
30330
30392
  }
30393
+ var JUEJIN_OPERATIONS = ["draft"];
30394
+ function resolveOperation(options, content) {
30395
+ const raw = options?.operation ?? content?.metadata?.operation;
30396
+ if (raw === undefined)
30397
+ return { operation: "draft" };
30398
+ if (typeof raw !== "string" || !JUEJIN_OPERATIONS.includes(raw)) {
30399
+ return {
30400
+ error: `unsupported operation '${String(raw)}' for juejin: expected one of ${JUEJIN_OPERATIONS.join(", ")}`
30401
+ };
30402
+ }
30403
+ return { operation: raw };
30404
+ }
30331
30405
 
30332
30406
  class JuejinBrowserTransport {
30333
30407
  kind = "browser";
30334
30408
  driver;
30335
30409
  launcher;
30336
30410
  stepTimeoutMs;
30411
+ checkTimeoutMs;
30337
30412
  constructor(driver = "script", deps = {}) {
30338
30413
  this.driver = driver;
30339
- this.launcher = deps.launcher;
30414
+ this.launcher = deps.launcher ?? kkBrowserLauncher;
30340
30415
  this.stepTimeoutMs = deps.stepTimeoutMs ?? STEP_TIMEOUT_MS;
30416
+ this.checkTimeoutMs = deps.checkTimeoutMs ?? CHECK_TIMEOUT_MS;
30341
30417
  }
30342
30418
  async publish(payload) {
30343
30419
  if (this.driver !== "script") {
30344
30420
  return fail(`unsupported driver '${this.driver}' for ${TARGET}`);
30345
30421
  }
30422
+ const mode = resolveOperation(payload.options, payload.content);
30423
+ if (mode.error !== undefined)
30424
+ return fail(mode.error);
30346
30425
  const requested = payload.content.metadata?.publishStatus;
30347
30426
  if (requested !== undefined && requested !== "draft" && requested !== "public") {
30348
30427
  return fail(`unknown publishStatus '${String(requested)}' (expected absent, 'draft' or 'public')`);
@@ -30359,8 +30438,8 @@ class JuejinBrowserTransport {
30359
30438
  const session = await checkChannelSession(CONFIG, {
30360
30439
  profileDir,
30361
30440
  launcher: this.launcher,
30362
- headedFallback: false,
30363
- timeoutMs: this.stepTimeoutMs
30441
+ headedOnly: true,
30442
+ timeoutMs: this.checkTimeoutMs
30364
30443
  });
30365
30444
  if (session.status !== "verified") {
30366
30445
  return fail(`${CHANNEL} session preflight refused: ${session.detail} \u2014 run: ${LOGIN_INSTRUCTION}`);
@@ -30537,6 +30616,7 @@ if (import.meta.main) {
30537
30616
  process.exit(await main2());
30538
30617
  }
30539
30618
  export {
30619
+ resolveOperation,
30540
30620
  processPublishIO,
30541
30621
  main2 as main,
30542
30622
  isAuthenticated,
@@ -30544,6 +30624,7 @@ export {
30544
30624
  SELECTORS,
30545
30625
  LOGIN_URL_RE,
30546
30626
  JuejinBrowserTransport,
30627
+ JUEJIN_OPERATIONS,
30547
30628
  EDITOR_URL,
30548
30629
  CONFIG,
30549
30630
  CHANNEL
@@ -2,6 +2,7 @@
2
2
  "name": "juejin-pub",
3
3
  "kind": "publish",
4
4
  "entry": "./dist/index.js",
5
+ "check": "./src/profile-check.ts",
5
6
  "version": "1.0.0",
6
7
  "description": "Publish plugin for Juejin (juejin.cn): article drafts through the bytemd editor via script browser transport (ts-browser-automation)"
7
8
  }
@@ -13,6 +13,7 @@ import {
13
13
  checkChannelSession,
14
14
  expectOutcome,
15
15
  fillCodeMirror,
16
+ kkBrowserLauncher,
16
17
  readScopedSignal,
17
18
  resolveChannelProfileDir,
18
19
  resolveSelector,
@@ -53,6 +54,10 @@ export const SELECTORS = {
53
54
 
54
55
  const STEP_TIMEOUT_MS = 30_000;
55
56
  const LOGIN_TIMEOUT_MS = 180_000;
57
+ /** Preflight budget (0192): the headless editor pass is non-deterministic — it verified in 2.9 s
58
+ * for the CLI check but the identical readiness predicate burned 30 s in the publish preflight —
59
+ * so the preflight runs headed only with the measured hydration headroom (mirrors infoq 0191). */
60
+ const CHECK_TIMEOUT_MS = 60_000;
56
61
  /** Juejin autosaves the draft on input: the design's window before the one manual save key press. */
57
62
  const AUTOSAVE_TIMEOUT_MS = 5_000;
58
63
  const SAVE_KEY = process.platform === 'darwin' ? 'Meta+s' : 'Control+s';
@@ -78,6 +83,9 @@ export const CONFIG: ChannelBrowserConfig = {
78
83
  homeUrl: EDITOR_URL,
79
84
  isAuthenticated,
80
85
  loginTimeoutMs: LOGIN_TIMEOUT_MS,
86
+ // The headless editor readiness is flaky (verified 2.9 s once, burned 30 s the next pass), so
87
+ // the profile-check CLI checks headed only instead of betting on a headless editor load.
88
+ checkHeadedOnly: true,
81
89
  };
82
90
 
83
91
  /** Validated live-run inputs: the publish popup cannot confirm without both (R4). */
@@ -141,22 +149,51 @@ async function readToast(page: Page, texts: readonly string[]): Promise<string |
141
149
  return readScopedSignal(page, texts);
142
150
  }
143
151
 
152
+ /**
153
+ * Declared modes (ADR-029 dispatch; task 0205 R2): Juejin's console flow is the CodeMirror markdown draft; publish tiers come from `publishStatus`, not modes. An unknown operation is refused by
154
+ * name before a profile is resolved or a browser opens.
155
+ */
156
+ export const JUEJIN_OPERATIONS = ['draft'] as const;
157
+ export type JuejinOperation = (typeof JUEJIN_OPERATIONS)[number];
158
+
159
+ /** Exit-early resolution of the requested operation; a default Content without one resolves to `draft`. */
160
+ export function resolveOperation(
161
+ options?: Record<string, unknown>,
162
+ content?: Content,
163
+ ): { operation: JuejinOperation; error?: undefined } | { operation?: undefined; error: string } {
164
+ const raw = options?.operation ?? content?.metadata?.operation;
165
+ if (raw === undefined) return { operation: 'draft' };
166
+ if (typeof raw !== 'string' || !(JUEJIN_OPERATIONS as readonly string[]).includes(raw)) {
167
+ return {
168
+ error: `unsupported operation '${String(raw)}' for juejin: expected one of ${JUEJIN_OPERATIONS.join(', ')}`,
169
+ };
170
+ }
171
+ return { operation: raw as JuejinOperation };
172
+ }
173
+
144
174
  export class JuejinBrowserTransport implements PublishTransport {
145
175
  public readonly kind = 'browser';
146
176
  public readonly driver: BrowserDriver;
147
- private readonly launcher?: BrowserLauncher;
177
+ private readonly launcher: BrowserLauncher;
148
178
  private readonly stepTimeoutMs: number;
179
+ private readonly checkTimeoutMs: number;
149
180
 
150
- constructor(driver: BrowserDriver = 'script', deps: { launcher?: BrowserLauncher; stepTimeoutMs?: number } = {}) {
181
+ constructor(
182
+ driver: BrowserDriver = 'script',
183
+ deps: { launcher?: BrowserLauncher; stepTimeoutMs?: number; checkTimeoutMs?: number } = {},
184
+ ) {
151
185
  this.driver = driver;
152
- this.launcher = deps.launcher;
186
+ this.launcher = deps.launcher ?? kkBrowserLauncher;
153
187
  this.stepTimeoutMs = deps.stepTimeoutMs ?? STEP_TIMEOUT_MS;
188
+ this.checkTimeoutMs = deps.checkTimeoutMs ?? CHECK_TIMEOUT_MS;
154
189
  }
155
190
 
156
191
  public async publish(payload: PublishTransportPayload): Promise<Result> {
157
192
  if (this.driver !== 'script') {
158
193
  return fail(`unsupported driver '${this.driver}' for ${TARGET}`);
159
194
  }
195
+ const mode = resolveOperation(payload.options, payload.content);
196
+ if (mode.error !== undefined) return fail(mode.error);
160
197
  const requested = payload.content.metadata?.publishStatus;
161
198
  if (requested !== undefined && requested !== 'draft' && requested !== 'public') {
162
199
  return fail(`unknown publishStatus '${String(requested)}' (expected absent, 'draft' or 'public')`);
@@ -171,13 +208,16 @@ export class JuejinBrowserTransport implements PublishTransport {
171
208
  const override = typeof payload.options?.profileDir === 'string' ? payload.options.profileDir : undefined;
172
209
  const profileDir = resolveChannelProfileDir(CHANNEL, override);
173
210
 
174
- // ADR-025 preflight: an unauthenticated or absent profile must never produce a headed
175
- // visit, so the read-only headless check runs first and a refusal stays a fast refusal.
211
+ // ADR-025 preflight: an unauthenticated or absent profile must never reach the editor
212
+ // flow, so the session check runs first and a refusal stays a fast refusal. Juejin's
213
+ // headless editor readiness is non-deterministic (0192: CLI check verified in 2.9 s, the
214
+ // same predicate refused after 30 s in this preflight), so — like infoq (0191) — the
215
+ // check runs headed only; a missing/expired profile still refuses before any flow.
176
216
  const session = await checkChannelSession(CONFIG, {
177
217
  profileDir,
178
218
  launcher: this.launcher,
179
- headedFallback: false,
180
- timeoutMs: this.stepTimeoutMs,
219
+ headedOnly: true,
220
+ timeoutMs: this.checkTimeoutMs,
181
221
  });
182
222
  if (session.status !== 'verified') {
183
223
  return fail(`${CHANNEL} session preflight refused: ${session.detail} — run: ${LOGIN_INSTRUCTION}`);
@@ -191,8 +231,8 @@ export class JuejinBrowserTransport implements PublishTransport {
191
231
  profileDir,
192
232
  url: EDITOR_URL,
193
233
  isAuthenticated,
194
- // Headed by default (sites bot-wall headless loads); the headless preflight
195
- // above is the unattended pass, `options.headless === true` the opt-in.
234
+ // Headed by default (sites bot-wall headless loads; the preflight above is headed-only
235
+ // since 0192), `options.headless === true` the opt-in.
196
236
  headless: payload.options?.headless === true,
197
237
  launcher: this.launcher,
198
238
  // The session is already preflight-verified, so the post-goto confirmation is
@@ -14642,7 +14642,7 @@ var init_zod = __esm(() => {
14642
14642
  init_external();
14643
14643
  });
14644
14644
 
14645
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/errors.js
14645
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/errors.js
14646
14646
  var ErrorCode;
14647
14647
  var init_errors3 = __esm(() => {
14648
14648
  ErrorCode = {
@@ -14653,7 +14653,7 @@ var init_errors3 = __esm(() => {
14653
14653
  };
14654
14654
  });
14655
14655
 
14656
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/api-response.js
14656
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/api-response.js
14657
14657
  var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
14658
14658
  var init_api_response = __esm(() => {
14659
14659
  init_errors3();
@@ -14676,13 +14676,13 @@ var init_api_response = __esm(() => {
14676
14676
  CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
14677
14677
  });
14678
14678
 
14679
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/cursor.js
14679
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/cursor.js
14680
14680
  var init_cursor = () => {};
14681
14681
 
14682
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
14682
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
14683
14683
  var init_event_severity = () => {};
14684
14684
 
14685
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/output.js
14685
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/output.js
14686
14686
  function processStream(name) {
14687
14687
  const proc = globalThis.process;
14688
14688
  const stream = proc?.[name];
@@ -14700,7 +14700,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
14700
14700
  }
14701
14701
  var defaultStderrTarget;
14702
14702
 
14703
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/index.js
14703
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/index.js
14704
14704
  var init_dist = __esm(() => {
14705
14705
  init_api_response();
14706
14706
  init_cursor();
@@ -21698,7 +21698,7 @@ var init_dist2 = __esm(() => {
21698
21698
  $visitAsync = visit.visitAsync;
21699
21699
  });
21700
21700
 
21701
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.15/node_modules/@gobing-ai/ts-runtime/dist/config.js
21701
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.21+44edd5c4d6372504/node_modules/@gobing-ai/ts-runtime/dist/config.js
21702
21702
  var configSchema;
21703
21703
  var init_config = __esm(() => {
21704
21704
  init_dist2();
@@ -21722,7 +21722,7 @@ var init_config = __esm(() => {
21722
21722
  });
21723
21723
  });
21724
21724
 
21725
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.15/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
21725
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.21+44edd5c4d6372504/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
21726
21726
  import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
21727
21727
  import { dirname, resolve as resolvePath } from "path";
21728
21728
  function createNodeFileSystem(root, paths) {
@@ -21896,11 +21896,12 @@ var PluginManifestSchema = exports_external.looseObject({
21896
21896
  name: exports_external.string().min(1),
21897
21897
  kind: PluginKindSchema,
21898
21898
  entry: exports_external.string().min(1),
21899
+ check: exports_external.string().min(1).optional(),
21899
21900
  version: exports_external.string().optional(),
21900
21901
  description: exports_external.string().optional(),
21901
21902
  operations: exports_external.record(exports_external.string(), PluginOperationSchema).optional()
21902
21903
  });
21903
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.15/node_modules/@gobing-ai/ts-runtime/dist/index.js
21904
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.21+44edd5c4d6372504/node_modules/@gobing-ai/ts-runtime/dist/index.js
21904
21905
  init_file_system_node();
21905
21906
  init_config();
21906
21907
 
@@ -14642,7 +14642,7 @@ var init_zod = __esm(() => {
14642
14642
  init_external();
14643
14643
  });
14644
14644
 
14645
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/errors.js
14645
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/errors.js
14646
14646
  var ErrorCode;
14647
14647
  var init_errors3 = __esm(() => {
14648
14648
  ErrorCode = {
@@ -14653,7 +14653,7 @@ var init_errors3 = __esm(() => {
14653
14653
  };
14654
14654
  });
14655
14655
 
14656
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/api-response.js
14656
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/api-response.js
14657
14657
  var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
14658
14658
  var init_api_response = __esm(() => {
14659
14659
  init_errors3();
@@ -14676,13 +14676,13 @@ var init_api_response = __esm(() => {
14676
14676
  CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
14677
14677
  });
14678
14678
 
14679
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/cursor.js
14679
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/cursor.js
14680
14680
  var init_cursor = () => {};
14681
14681
 
14682
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
14682
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
14683
14683
  var init_event_severity = () => {};
14684
14684
 
14685
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/output.js
14685
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/output.js
14686
14686
  function processStream(name) {
14687
14687
  const proc = globalThis.process;
14688
14688
  const stream = proc?.[name];
@@ -14700,7 +14700,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
14700
14700
  }
14701
14701
  var defaultStderrTarget;
14702
14702
 
14703
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.15/node_modules/@gobing-ai/ts-utils/dist/index.js
14703
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.21/node_modules/@gobing-ai/ts-utils/dist/index.js
14704
14704
  var init_dist = __esm(() => {
14705
14705
  init_api_response();
14706
14706
  init_cursor();
@@ -21698,7 +21698,7 @@ var init_dist2 = __esm(() => {
21698
21698
  $visitAsync = visit.visitAsync;
21699
21699
  });
21700
21700
 
21701
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.15/node_modules/@gobing-ai/ts-runtime/dist/config.js
21701
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.21+44edd5c4d6372504/node_modules/@gobing-ai/ts-runtime/dist/config.js
21702
21702
  var configSchema;
21703
21703
  var init_config = __esm(() => {
21704
21704
  init_dist2();
@@ -21722,7 +21722,7 @@ var init_config = __esm(() => {
21722
21722
  });
21723
21723
  });
21724
21724
 
21725
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.15/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
21725
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.21+44edd5c4d6372504/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
21726
21726
  import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
21727
21727
  import { dirname, resolve as resolvePath } from "path";
21728
21728
  function createNodeFileSystem(root, paths) {
@@ -21898,11 +21898,12 @@ var PluginManifestSchema = exports_external.looseObject({
21898
21898
  name: exports_external.string().min(1),
21899
21899
  kind: PluginKindSchema,
21900
21900
  entry: exports_external.string().min(1),
21901
+ check: exports_external.string().min(1).optional(),
21901
21902
  version: exports_external.string().optional(),
21902
21903
  description: exports_external.string().optional(),
21903
21904
  operations: exports_external.record(exports_external.string(), PluginOperationSchema).optional()
21904
21905
  });
21905
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.15/node_modules/@gobing-ai/ts-runtime/dist/index.js
21906
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.21+44edd5c4d6372504/node_modules/@gobing-ai/ts-runtime/dist/index.js
21906
21907
  init_file_system_node();
21907
21908
  init_config();
21908
21909