@gobing-ai/knowledge-kit 0.1.23 → 0.1.25

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 (106) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/index.js +418 -114
  3. package/package.json +5 -5
  4. package/plugins/generations/content-gen/dist/index.js +9 -9
  5. package/plugins/generations/core-facts-gen/dist/index.js +12 -12
  6. package/plugins/generations/daily-article-gen/dist/index.js +12 -12
  7. package/plugins/generations/dailynews-gen/dist/index.js +11 -11
  8. package/plugins/generations/dailynews-gen/src/script-plan.ts +2 -2
  9. package/plugins/generations/episode-plan-gen/dist/index.js +59 -18
  10. package/plugins/generations/episode-plan-gen/src/index.ts +71 -7
  11. package/plugins/generations/gemini-tts/dist/index.js +9 -9
  12. package/plugins/generations/image-gen/dist/index.js +9 -9
  13. package/plugins/generations/music-gen/dist/index.js +33 -29
  14. package/plugins/generations/music-gen/src/audio/measure.ts +25 -20
  15. package/plugins/generations/news-report-gen/dist/index.js +12 -12
  16. package/plugins/generations/vibe-voice-tts/dist/index.js +9 -9
  17. package/plugins/generations/voice-gen/dist/index.js +9 -9
  18. package/plugins/generations/voxcpm-tts/dist/index.js +9 -9
  19. package/plugins/ingestions/aihot-ingest/dist/index.js +12 -12
  20. package/plugins/ingestions/horizon-ingest/dist/index.js +12 -12
  21. package/plugins/ingestions/karakeep-local/dist/index.js +13 -13
  22. package/plugins/ingestions/last30days-ingest/dist/index.js +12 -12
  23. package/plugins/ingestions/web-search/dist/index.js +10 -10
  24. package/plugins/kk/decisions/extract/ai-news.yaml +8 -1
  25. package/plugins/kk/plugin.json +1 -1
  26. package/plugins/kk/publish-presets/daily-ai-voice.json +20 -20
  27. package/plugins/kk/publish-presets/itc-main.json +39 -23
  28. package/plugins/kk/scripts/cover-compositor.ts +104 -26
  29. package/plugins/kk/scripts/daily-stages.ts +704 -53
  30. package/plugins/kk/scripts/kk-workflow-stages.ts +149 -6
  31. package/plugins/kk/scripts/series-names.ts +16 -3
  32. package/plugins/kk/skills/content-safety/references/platforms/apple-podcasts.md +12 -5
  33. package/plugins/kk/skills/content-safety/references/platforms/wechatmp.md +8 -0
  34. package/plugins/kk/skills/content-safety/references/platforms/xiaoyuzhou.md +5 -0
  35. package/plugins/kk/skills/daily-news-cover/SKILL.md +96 -0
  36. package/plugins/kk/skills/daily-news-illustrations/SKILL.md +123 -0
  37. package/plugins/kk/skills/news-editorial/SKILL.md +5 -3
  38. package/plugins/kk/skills/news-editorial/references/daily-visual-composition.md +150 -0
  39. package/plugins/kk/skills/news-editorial/references/style-contract.zh.md +3 -3
  40. package/plugins/kk/workflows/kk-article-generate.yaml +13 -1
  41. package/plugins/kk/workflows/kk-daily-ai-voice.yaml +6 -3
  42. package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +6 -4
  43. package/plugins/kk/workflows/kk-news-generate.yaml +74 -1
  44. package/plugins/publishings/bilibili-pub/dist/index.js +25 -24
  45. package/plugins/publishings/bilibili-pub/dist/profile-check.js +25 -24
  46. package/plugins/publishings/cnblogs-pub/dist/index.js +25 -24
  47. package/plugins/publishings/cnblogs-pub/dist/profile-check.js +25 -24
  48. package/plugins/publishings/csdn-pub/dist/index.js +25 -24
  49. package/plugins/publishings/csdn-pub/dist/profile-check.js +25 -24
  50. package/plugins/publishings/emdash-pub/dist/index.js +9 -9
  51. package/plugins/publishings/infoq-pub/dist/index.js +25 -24
  52. package/plugins/publishings/infoq-pub/dist/profile-check.js +25 -24
  53. package/plugins/publishings/jike-pub/dist/index.js +25 -24
  54. package/plugins/publishings/jike-pub/dist/profile-check.js +25 -24
  55. package/plugins/publishings/juejin-pub/dist/index.js +25 -24
  56. package/plugins/publishings/juejin-pub/dist/profile-check.js +25 -24
  57. package/plugins/publishings/linkedin-pub/dist/index.js +85 -26
  58. package/plugins/publishings/linkedin-pub/dist/profile-check.js +25 -24
  59. package/plugins/publishings/linkedin-pub/src/index.ts +93 -6
  60. package/plugins/publishings/medium-pub/dist/index.js +9206 -287
  61. package/plugins/publishings/medium-pub/dist/profile-check.js +21174 -0
  62. package/plugins/publishings/medium-pub/package.json +3 -1
  63. package/plugins/publishings/medium-pub/plugin.json +6 -1
  64. package/plugins/publishings/medium-pub/src/browser-rail.ts +280 -0
  65. package/plugins/publishings/medium-pub/src/index.ts +17 -1
  66. package/plugins/publishings/medium-pub/src/profile-check.ts +27 -0
  67. package/plugins/publishings/podcast-pub/dist/index.js +240 -37
  68. package/plugins/publishings/podcast-pub/src/index.ts +154 -3
  69. package/plugins/publishings/podcast-pub/src/seo.ts +25 -8
  70. package/plugins/publishings/podcast-pub/src/show-notes-brief.ts +93 -23
  71. package/plugins/publishings/podcast-pub/src/show-notes.ts +26 -6
  72. package/plugins/publishings/qiita-pub/dist/index.js +9 -9
  73. package/plugins/publishings/shipinhao-pub/dist/index.js +29 -26
  74. package/plugins/publishings/shipinhao-pub/dist/profile-check.js +28 -26
  75. package/plugins/publishings/shipinhao-pub/src/flow.ts +5 -0
  76. package/plugins/publishings/shipinhao-pub/src/selectors.ts +13 -5
  77. package/plugins/publishings/sspai-pub/dist/index.js +25 -24
  78. package/plugins/publishings/sspai-pub/dist/profile-check.js +25 -24
  79. package/plugins/publishings/substack-pub/dist/index.js +25 -24
  80. package/plugins/publishings/substack-pub/dist/profile-check.js +25 -24
  81. package/plugins/publishings/surfdash-pub/dist/index.js +200 -92
  82. package/plugins/publishings/surfdash-pub/src/digest-check.ts +30 -1
  83. package/plugins/publishings/surfdash-pub/src/index.ts +94 -75
  84. package/plugins/publishings/surfdash-pub/src/media-upload.ts +83 -0
  85. package/plugins/publishings/surfdash-pub/src/patch.ts +28 -23
  86. package/plugins/publishings/surfdash-pub/src/topic-claims.ts +12 -4
  87. package/plugins/publishings/threads-pub/dist/index.js +39 -24
  88. package/plugins/publishings/threads-pub/dist/profile-check.js +30 -24
  89. package/plugins/publishings/threads-pub/src/post-rail.ts +20 -0
  90. package/plugins/publishings/wechatmp-pub/dist/index.js +438 -102
  91. package/plugins/publishings/wechatmp-pub/dist/profile-check.js +30 -25
  92. package/plugins/publishings/wechatmp-pub/src/enrich.ts +56 -10
  93. package/plugins/publishings/wechatmp-pub/src/flow.ts +589 -83
  94. package/plugins/publishings/wechatmp-pub/src/index.ts +4 -1
  95. package/plugins/publishings/wechatmp-pub/src/modes.ts +30 -12
  96. package/plugins/publishings/wechatmp-pub/src/page.ts +8 -0
  97. package/plugins/publishings/weibo-pub/dist/index.js +25 -24
  98. package/plugins/publishings/weibo-pub/dist/profile-check.js +25 -24
  99. package/plugins/publishings/x-pub/dist/index.js +54 -47
  100. package/plugins/publishings/x-pub/dist/profile-check.js +25 -24
  101. package/plugins/publishings/x-pub/src/post-rail.ts +40 -47
  102. package/plugins/publishings/xhs-pub/dist/index.js +25 -24
  103. package/plugins/publishings/xhs-pub/dist/profile-check.js +25 -24
  104. package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +25 -24
  105. package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +25 -24
  106. package/plugins/publishings/zenn-pub/dist/index.js +9 -9
@@ -187,6 +187,8 @@ const DEFAULT_IMPORTANCE = 2;
187
187
  export interface PlanOptions {
188
188
  maxItems: number;
189
189
  date?: string; // episode date (YYYY-MM-DD); freshness is judged against it, default today
190
+ /** Per-source slot cap (default PER_SOURCE_CAP = 5). */
191
+ perSourceCap?: number;
190
192
  /** Out-collector: when provided, receives one audit row per input doc (input order via rowsOf). */
191
193
  audit?: PlanAuditRow[];
192
194
  }
@@ -281,7 +283,26 @@ export function cleanBody(body: string): string {
281
283
  .trim();
282
284
  }
283
285
 
284
- /** Canonical URL key: drop query, fragment, trailing slash, `www.`/`amp.` prefixes. */
286
+ /**
287
+ * Campaign/click parameters that never carry content identity. Mirrors the store's
288
+ * `canonicalUrl` rule (`packages/kk-store/src/canonical-url.ts`) so a Doc dedups the same way
289
+ * before and after ingest.
290
+ */
291
+ const TRACKING_PARAMS = new Set(['ref', 'ref_src', 'fbclid', 'gclid']);
292
+
293
+ function isTrackingParam(name: string): boolean {
294
+ const lower = name.toLowerCase();
295
+ return lower.startsWith('utm_') || TRACKING_PARAMS.has(lower);
296
+ }
297
+
298
+ /**
299
+ * Canonical URL key: drop the fragment, tracking params, trailing slash and `www.`/`amp.` prefixes.
300
+ *
301
+ * The query is KEPT (minus tracking) because for a large share of sources it IS the identity:
302
+ * `youtube.com/watch?v=<id>` and `news.ycombinator.com/item?id=<id>` carry no path at all. Dropping
303
+ * it collapsed 60 distinct videos and every hackernews post into one key, so `planEpisode`'s URL
304
+ * dedup merged them away — 2026-11-23: a 40-doc pool reached the plan as 15 docs, 25 `url-merge`.
305
+ */
285
306
  export function normalizeUrl(raw: string | undefined): string | null {
286
307
  if (!raw) return null;
287
308
  let url: URL;
@@ -292,7 +313,11 @@ export function normalizeUrl(raw: string | undefined): string | null {
292
313
  }
293
314
  const host = url.hostname.replace(/^(www|amp)\./, '');
294
315
  const path = url.pathname.replace(/\/+$/, '');
295
- return `${url.protocol}//${host}${path}`;
316
+ const kept = [...url.searchParams.entries()]
317
+ .filter(([name]) => !isTrackingParam(name))
318
+ .sort(([aName, aValue], [bName, bValue]) => aName.localeCompare(bName) || aValue.localeCompare(bValue));
319
+ const search = kept.length === 0 ? '' : `?${new URLSearchParams(kept).toString()}`;
320
+ return `${url.protocol}//${host}${path}${search}`;
296
321
  }
297
322
 
298
323
  /** ASCII ratio of a string; > 0.5 on the title marks an English item. */
@@ -572,13 +597,14 @@ export function planEpisode(docs: Doc[], options: PlanOptions): Doc[] {
572
597
  }
573
598
 
574
599
  const candidates = scored.filter((r) => !absorbed.has(r)).sort((a, b) => b.score - a.score);
575
- // Per-source cap, applied in score order: one feed's flood stops at PER_SOURCE_CAP.
600
+ // Per-source cap, applied in score order: one feed's flood stops at perSourceCap.
601
+ const perSourceCap = Math.max(1, options.perSourceCap ?? PER_SOURCE_CAP);
576
602
  const perSource = new Map<string, number>();
577
603
  const selected: ScoredDoc[] = [];
578
604
  for (const record of candidates) {
579
605
  const source = sourceOf(record.doc);
580
606
  const count = perSource.get(source) ?? 0;
581
- if (count >= PER_SOURCE_CAP) {
607
+ if (count >= perSourceCap) {
582
608
  const row = rows?.get(record.doc);
583
609
  if (row) row.disposition = 'cap';
584
610
  continue;
@@ -637,7 +663,12 @@ export function renderPlanMarkdown(docs: Doc[], date: string): string {
637
663
 
638
664
  /** Build the plan Content; `metadata.docs` is the contract with the workflow. */
639
665
  export function docsToContent(docs: Doc[], date: string, audit?: PlanAuditRow[]): Content {
640
- const planned = planEpisode(docs, { maxItems: maxItemsFromEnv(), date, audit });
666
+ const planned = planEpisode(docs, {
667
+ maxItems: maxItemsFromEnv(),
668
+ perSourceCap: perSourceCapFromEnv(),
669
+ date,
670
+ audit,
671
+ });
641
672
  return planContent(planned, date);
642
673
  }
643
674
 
@@ -663,6 +694,13 @@ function maxItemsFromEnv(): number {
663
694
  return Number.isFinite(n) && n > 0 ? n : 20;
664
695
  }
665
696
 
697
+ function perSourceCapFromEnv(): number {
698
+ const raw = process.env.EPISODE_PLAN_PER_SOURCE_CAP;
699
+ if (raw === undefined || raw.trim() === '') return PER_SOURCE_CAP;
700
+ const n = Number.parseInt(raw, 10);
701
+ return Number.isFinite(n) && n > 0 ? n : PER_SOURCE_CAP;
702
+ }
703
+
666
704
  /** Plan date shared by both modes: `EPISODE_PLAN_DATE` (YYYYMMDD or ISO) else today UTC. */
667
705
  function resolvePlanDate(): string {
668
706
  const raw = process.env.EPISODE_PLAN_DATE ?? new Date().toISOString().slice(0, 10);
@@ -694,6 +732,8 @@ export interface FilterConfig {
694
732
  minImpact: number;
695
733
  /** Episode floor: when fewer docs survive, importance-only rejects backfill up to this count. */
696
734
  minEpisodeItems: number;
735
+ /** Optional spoken-duration character floor: backfill importance-only rejects until kept chars reach this. */
736
+ minChars?: number;
697
737
  }
698
738
 
699
739
  /** A doc the filter dropped, with every failed check (`category:not-in-allowlist`, `quality:2<3`, …). */
@@ -779,9 +819,18 @@ export function filterConfigFromEnv(env: Record<string, string | undefined> = pr
779
819
  'QC_MIN_EPISODE_ITEMS',
780
820
  DEFAULT_FILTER_CONFIG.minEpisodeItems,
781
821
  ),
822
+ ...(env.QC_MIN_CHARS !== undefined && env.QC_MIN_CHARS.trim() !== ''
823
+ ? { minChars: parseOptionalNonNegativeInt(env.QC_MIN_CHARS, 'QC_MIN_CHARS') }
824
+ : {}),
782
825
  };
783
826
  }
784
827
 
828
+ function parseOptionalNonNegativeInt(raw: string, name: string): number {
829
+ const value = raw.trim();
830
+ if (!/^\d+$/.test(value)) throw new Error(`${name}='${raw}' is not a non-negative integer`);
831
+ return Number.parseInt(value, 10);
832
+ }
833
+
785
834
  /** Read 0093's annotations off a filter input doc; fail loud naming the doc id — never silently pass unannotated docs. */
786
835
  function requireAnnotation(doc: Doc): { category: Category; scores: Record<QCDimension, number> } {
787
836
  const meta = asRecord(doc.metadata);
@@ -849,12 +898,20 @@ function planScoreOf(doc: Doc): number {
849
898
  * plan order. Admitted docs are stamped `metadata.backfilled: true` and leave the rejected
850
899
  * audit (they are spoken, not dropped). Pure: input docs are never mutated.
851
900
  */
901
+ function docChars(doc: Doc): number {
902
+ return (doc.title ?? '').length + (doc.body ?? '').length;
903
+ }
904
+
852
905
  export function backfillToFloor(
853
906
  kept: Doc[],
854
907
  rejected: RejectedDoc[],
855
908
  config: FilterConfig,
856
909
  ): { kept: Doc[]; rejected: RejectedDoc[]; admitted: Doc[] } {
857
- if (kept.length >= config.minEpisodeItems) return { kept, rejected, admitted: [] };
910
+ const minChars = config.minChars ?? 0;
911
+ let currentChars = kept.reduce((sum, doc) => sum + docChars(doc), 0);
912
+ if (kept.length >= config.minEpisodeItems && (minChars <= 0 || currentChars >= minChars)) {
913
+ return { kept, rejected, admitted: [] };
914
+ }
858
915
  const eligible = rejected
859
916
  .map((entry, index) => ({ entry, index }))
860
917
  .filter(({ entry }) => entry.reasons.length > 0 && entry.reasons.every((r) => r.startsWith('importance:')));
@@ -865,7 +922,14 @@ export function backfillToFloor(
865
922
  if (byPlanScore !== 0) return byPlanScore;
866
923
  return a.index - b.index;
867
924
  });
868
- const taken = eligible.slice(0, config.minEpisodeItems - kept.length);
925
+ const taken: Array<{ entry: RejectedDoc; index: number }> = [];
926
+ for (const item of eligible) {
927
+ const countMet = kept.length + taken.length >= config.minEpisodeItems;
928
+ const charsMet = minChars <= 0 || currentChars >= minChars;
929
+ if (countMet && charsMet) break;
930
+ taken.push(item);
931
+ currentChars += docChars(item.entry.doc);
932
+ }
869
933
  const takenIds = new Set(taken.map(({ entry }) => entry.doc.id));
870
934
  const admitted = taken.map(({ entry }) => ({
871
935
  ...entry.doc,
@@ -13,7 +13,7 @@ var __esm = (fn, res, err) => () => {
13
13
  };
14
14
  var __require = import.meta.require;
15
15
 
16
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/errors.js
16
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/errors.js
17
17
  var ErrorCode;
18
18
  var init_errors = __esm(() => {
19
19
  ErrorCode = {
@@ -24,7 +24,7 @@ var init_errors = __esm(() => {
24
24
  };
25
25
  });
26
26
 
27
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/api-response.js
27
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/api-response.js
28
28
  var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
29
29
  var init_api_response = __esm(() => {
30
30
  init_errors();
@@ -47,13 +47,13 @@ var init_api_response = __esm(() => {
47
47
  CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
48
48
  });
49
49
 
50
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/cursor.js
50
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/cursor.js
51
51
  var init_cursor = () => {};
52
52
 
53
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
53
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
54
54
  var init_event_severity = () => {};
55
55
 
56
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/output.js
56
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/output.js
57
57
  function processStream(name) {
58
58
  const proc = globalThis.process;
59
59
  const stream = proc?.[name];
@@ -71,7 +71,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
71
71
  }
72
72
  var defaultStderrTarget;
73
73
 
74
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/index.js
74
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/index.js
75
75
  var init_dist = __esm(() => {
76
76
  init_api_response();
77
77
  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.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/config.js
11872
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/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.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
11896
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/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) {
@@ -12251,7 +12251,7 @@ var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx)
12251
12251
  });
12252
12252
  }
12253
12253
  });
12254
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/index.js
12254
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/index.js
12255
12255
  init_file_system_node();
12256
12256
  init_config();
12257
12257
 
@@ -4821,7 +4821,7 @@ var init_zod = __esm(() => {
4821
4821
  init_external();
4822
4822
  });
4823
4823
 
4824
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/errors.js
4824
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/errors.js
4825
4825
  var ErrorCode;
4826
4826
  var init_errors3 = __esm(() => {
4827
4827
  ErrorCode = {
@@ -4832,7 +4832,7 @@ var init_errors3 = __esm(() => {
4832
4832
  };
4833
4833
  });
4834
4834
 
4835
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/api-response.js
4835
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/api-response.js
4836
4836
  var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
4837
4837
  var init_api_response = __esm(() => {
4838
4838
  init_errors3();
@@ -4855,13 +4855,13 @@ var init_api_response = __esm(() => {
4855
4855
  CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
4856
4856
  });
4857
4857
 
4858
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/cursor.js
4858
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/cursor.js
4859
4859
  var init_cursor = () => {};
4860
4860
 
4861
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
4861
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
4862
4862
  var init_event_severity = () => {};
4863
4863
 
4864
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/output.js
4864
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/output.js
4865
4865
  function processStream(name) {
4866
4866
  const proc = globalThis.process;
4867
4867
  const stream = proc?.[name];
@@ -4879,7 +4879,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
4879
4879
  }
4880
4880
  var defaultStderrTarget;
4881
4881
 
4882
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/index.js
4882
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/index.js
4883
4883
  var init_dist = __esm(() => {
4884
4884
  init_api_response();
4885
4885
  init_cursor();
@@ -11877,7 +11877,7 @@ var init_dist2 = __esm(() => {
11877
11877
  $visitAsync = visit.visitAsync;
11878
11878
  });
11879
11879
 
11880
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/config.js
11880
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/config.js
11881
11881
  var configSchema;
11882
11882
  var init_config = __esm(() => {
11883
11883
  init_dist2();
@@ -11901,7 +11901,7 @@ var init_config = __esm(() => {
11901
11901
  });
11902
11902
  });
11903
11903
 
11904
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
11904
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
11905
11905
  import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
11906
11906
  import { dirname, resolve as resolvePath } from "path";
11907
11907
  function createNodeFileSystem(root, paths) {
@@ -12589,7 +12589,7 @@ var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx)
12589
12589
  });
12590
12590
  }
12591
12591
  });
12592
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/index.js
12592
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/index.js
12593
12593
  init_file_system_node();
12594
12594
  init_config();
12595
12595
 
@@ -885,7 +885,7 @@ var init_artifact = __esm(() => {
885
885
  };
886
886
  });
887
887
 
888
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/errors.js
888
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/errors.js
889
889
  var ErrorCode;
890
890
  var init_errors = __esm(() => {
891
891
  ErrorCode = {
@@ -896,7 +896,7 @@ var init_errors = __esm(() => {
896
896
  };
897
897
  });
898
898
 
899
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/api-response.js
899
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/api-response.js
900
900
  var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
901
901
  var init_api_response = __esm(() => {
902
902
  init_errors();
@@ -919,18 +919,18 @@ var init_api_response = __esm(() => {
919
919
  CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
920
920
  });
921
921
 
922
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/cursor.js
922
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/cursor.js
923
923
  var init_cursor = () => {};
924
924
 
925
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/env.js
925
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/env.js
926
926
  function getEnvVars() {
927
927
  return process.env;
928
928
  }
929
929
 
930
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
930
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
931
931
  var init_event_severity = () => {};
932
932
 
933
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/output.js
933
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/output.js
934
934
  function processStream(name) {
935
935
  const proc = globalThis.process;
936
936
  const stream = proc?.[name];
@@ -951,7 +951,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
951
951
  }
952
952
  var defaultStdoutTarget, defaultStderrTarget;
953
953
 
954
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.32/node_modules/@gobing-ai/ts-utils/dist/index.js
954
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/node_modules/@gobing-ai/ts-utils/dist/index.js
955
955
  var init_dist = __esm(() => {
956
956
  init_api_response();
957
957
  init_cursor();
@@ -12757,7 +12757,7 @@ var init_zod = __esm(() => {
12757
12757
  init_external();
12758
12758
  });
12759
12759
 
12760
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/config.js
12760
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/config.js
12761
12761
  function getProcessEnv() {
12762
12762
  return getEnvVars();
12763
12763
  }
@@ -12785,7 +12785,7 @@ var init_config = __esm(() => {
12785
12785
  });
12786
12786
  });
12787
12787
 
12788
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
12788
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
12789
12789
  import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
12790
12790
  import { dirname, resolve as resolvePath } from "path";
12791
12791
  function createNodeFileSystem(root, paths) {
@@ -20072,7 +20072,7 @@ var init_execa = __esm(() => {
20072
20072
  } = getIpcExport());
20073
20073
  });
20074
20074
 
20075
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/process-group.js
20075
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/process-group.js
20076
20076
  function resolveDeadline(optionTimeout, defaultTimeout) {
20077
20077
  if (optionTimeout === null)
20078
20078
  return null;
@@ -20164,7 +20164,7 @@ function ownProcessGroupLifecycle(ownership) {
20164
20164
  }
20165
20165
  var MAX_TIMEOUT_MS = 2147483647, DEFAULT_KILL_GRACE_MS = 5000, GROUP_POLL_INTERVAL_MS = 25, GROUP_KILL_PATIENCE_MS = 2000;
20166
20166
 
20167
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/process-executor.js
20167
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/process-executor.js
20168
20168
  import { isatty } from "tty";
20169
20169
  function processEventSeverity(reason, exitCode) {
20170
20170
  if (reason === "error")
@@ -20536,26 +20536,26 @@ var init_process_executor = __esm(() => {
20536
20536
  init_config();
20537
20537
  });
20538
20538
 
20539
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/context.js
20539
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/context.js
20540
20540
  var init_context = () => {};
20541
20541
 
20542
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/path.js
20542
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/path.js
20543
20543
  var SEP;
20544
20544
  var init_path = __esm(() => {
20545
20545
  SEP = globalThis.process?.platform === "win32" ? "\\" : "/";
20546
20546
  });
20547
20547
 
20548
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/schema-validation.js
20548
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/schema-validation.js
20549
20549
  var REMOTE_SCHEMA_MAX_BYTES;
20550
20550
  var init_schema_validation = __esm(() => {
20551
20551
  init_dist2();
20552
20552
  REMOTE_SCHEMA_MAX_BYTES = 5 * 1024 * 1024;
20553
20553
  });
20554
20554
 
20555
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/types.js
20555
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/types.js
20556
20556
  var init_types = () => {};
20557
20557
 
20558
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/index.js
20558
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/index.js
20559
20559
  var init_dist3 = __esm(() => {
20560
20560
  init_file_system_node();
20561
20561
  init_process_executor();
@@ -22607,19 +22607,22 @@ var SILENCE_EDGE_TOLERANCE_SECONDS = 0.05;
22607
22607
  var DEFAULT_SILENCE_NOISE_DB = -50;
22608
22608
  var DEFAULT_SILENCE_MIN_SECONDS = 0.5;
22609
22609
  var processExecutor = new NodeProcessExecutor;
22610
- var spawnRunner = async (argv) => {
22611
- const [bin, ...args] = argv;
22612
- if (bin === undefined) {
22613
- throw new AudioToolError("ffmpeg", "spawn", "no binary was given to the audio runner", "");
22614
- }
22615
- const result = await processExecutor.run({ command: bin, args, label: `audio ${bin}` });
22616
- if (result.exitCode === null) {
22617
- const detail = result.stderr.trim();
22618
- const killed = result.signal === undefined ? "" : ` (killed by ${result.signal})`;
22619
- throw new AudioToolError(bin, "spawn", `could not be executed${detail === "" ? "" : ` (${detail})`}${killed} \u2014 install ffmpeg or point ffmpegBin/ffprobeBin at it`, "");
22620
- }
22621
- return { exitCode: result.exitCode, stdout: result.stdout, stderr: result.stderr };
22622
- };
22610
+ function createSpawnRunner(executor = processExecutor) {
22611
+ return async (argv) => {
22612
+ const [bin, ...args] = argv;
22613
+ if (bin === undefined) {
22614
+ throw new AudioToolError("ffmpeg", "spawn", "no binary was given to the audio runner", "");
22615
+ }
22616
+ const result = await executor.run({ command: bin, args, label: `audio ${bin}` });
22617
+ if (result.exitCode === null) {
22618
+ const detail = result.stderr.trim();
22619
+ const killed = result.signal === undefined ? "" : ` (killed by ${result.signal})`;
22620
+ throw new AudioToolError(bin, "spawn", `could not be executed${detail === "" ? "" : ` (${detail})`}${killed} \u2014 install ffmpeg or point ffmpegBin/ffprobeBin at it`, "");
22621
+ }
22622
+ return { exitCode: result.exitCode, stdout: result.stdout, stderr: result.stderr };
22623
+ };
22624
+ }
22625
+ var spawnRunner = createSpawnRunner();
22623
22626
  function ffprobeArgs(path, bin = DEFAULT_FFPROBE_BIN) {
22624
22627
  return [bin, "-v", "error", "-print_format", "json", "-show_format", "-show_streams", path];
22625
22628
  }
@@ -23495,6 +23498,7 @@ export {
23495
23498
  createInstanceClient,
23496
23499
  createMusicInstance,
23497
23500
  createOfflineInstance,
23501
+ createSpawnRunner,
23498
23502
  definedDeliveryProfiles,
23499
23503
  detectAudioFormat,
23500
23504
  digestInput,
@@ -19,7 +19,7 @@
19
19
  * "measurement clean".
20
20
  */
21
21
 
22
- import { NodeProcessExecutor } from '@gobing-ai/ts-runtime';
22
+ import { NodeProcessExecutor, type ProcessExecutor } from '@gobing-ai/ts-runtime';
23
23
 
24
24
  /** One tool invocation's captured result. */
25
25
  export interface ToolOutput {
@@ -93,7 +93,7 @@ export const DEFAULT_SILENCE_MIN_SECONDS = 0.5;
93
93
  const processExecutor = new NodeProcessExecutor();
94
94
 
95
95
  /**
96
- * The default runner: the ts-runtime {@link ProcessExecutor} seam, buffered.
96
+ * Build an {@link AudioToolRunner} over any ts-runtime {@link ProcessExecutor}.
97
97
  *
98
98
  * `ProcessResult` reports `exitCode: number | null` and does not throw for a tool
99
99
  * it could not start, so this adapter keeps the {@link ToolOutput} shape the
@@ -101,24 +101,29 @@ const processExecutor = new NodeProcessExecutor();
101
101
  * a signal kill, both surfaced as {@link AudioToolError} kind `spawn` with the
102
102
  * install hint) and every real exit code passes through untouched.
103
103
  */
104
- export const spawnRunner: AudioToolRunner = async (argv) => {
105
- const [bin, ...args] = argv;
106
- if (bin === undefined) {
107
- throw new AudioToolError('ffmpeg', 'spawn', 'no binary was given to the audio runner', '');
108
- }
109
- const result = await processExecutor.run({ command: bin, args, label: `audio ${bin}` });
110
- if (result.exitCode === null) {
111
- const detail = result.stderr.trim();
112
- const killed = result.signal === undefined ? '' : ` (killed by ${result.signal})`;
113
- throw new AudioToolError(
114
- bin,
115
- 'spawn',
116
- `could not be executed${detail === '' ? '' : ` (${detail})`}${killed} — install ffmpeg or point ffmpegBin/ffprobeBin at it`,
117
- '',
118
- );
119
- }
120
- return { exitCode: result.exitCode, stdout: result.stdout, stderr: result.stderr };
121
- };
104
+ export function createSpawnRunner(executor: ProcessExecutor = processExecutor): AudioToolRunner {
105
+ return async (argv) => {
106
+ const [bin, ...args] = argv;
107
+ if (bin === undefined) {
108
+ throw new AudioToolError('ffmpeg', 'spawn', 'no binary was given to the audio runner', '');
109
+ }
110
+ const result = await executor.run({ command: bin, args, label: `audio ${bin}` });
111
+ if (result.exitCode === null) {
112
+ const detail = result.stderr.trim();
113
+ const killed = result.signal === undefined ? '' : ` (killed by ${result.signal})`;
114
+ throw new AudioToolError(
115
+ bin,
116
+ 'spawn',
117
+ `could not be executed${detail === '' ? '' : ` (${detail})`}${killed} — install ffmpeg or point ffmpegBin/ffprobeBin at it`,
118
+ '',
119
+ );
120
+ }
121
+ return { exitCode: result.exitCode, stdout: result.stdout, stderr: result.stderr };
122
+ };
123
+ }
124
+
125
+ /** The default runner: the ts-runtime {@link ProcessExecutor} seam, buffered. */
126
+ export const spawnRunner: AudioToolRunner = createSpawnRunner();
122
127
 
123
128
  /** Where the measurement comes from: binary names plus the injected runner. */
124
129
  export interface MeasureOptions {
@@ -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.32/node_modules/@gobing-ai/ts-utils/dist/errors.js
4816
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/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.32/node_modules/@gobing-ai/ts-utils/dist/api-response.js
4827
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/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.32/node_modules/@gobing-ai/ts-utils/dist/cursor.js
4850
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/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.32/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
4853
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/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.32/node_modules/@gobing-ai/ts-utils/dist/output.js
4856
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/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.32/node_modules/@gobing-ai/ts-utils/dist/index.js
4874
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.8.4/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.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/config.js
11872
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/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.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
11896
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/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) {
@@ -12248,14 +12248,14 @@ var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx)
12248
12248
  });
12249
12249
  }
12250
12250
  });
12251
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/index.js
12251
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/index.js
12252
12252
  init_file_system_node();
12253
12253
  init_config();
12254
12254
 
12255
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/fs.js
12255
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/fs.js
12256
12256
  init_file_system_node();
12257
12257
 
12258
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/path.js
12258
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/path.js
12259
12259
  function normalizeSeparators(path) {
12260
12260
  return path.replaceAll("\\", "/");
12261
12261
  }
@@ -12289,7 +12289,7 @@ function dirnamePath(path) {
12289
12289
  return normalized.slice(0, index);
12290
12290
  }
12291
12291
 
12292
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/fs.js
12292
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/fs.js
12293
12293
  async function ensureDirForFile(path, fs = createNodeFileSystem()) {
12294
12294
  await fs.ensureDir(dirnamePath(path));
12295
12295
  }