@gobing-ai/knowledge-kit 0.1.22 → 0.1.24

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 (117) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/index.js +282 -147
  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 +12 -12
  10. package/plugins/generations/gemini-tts/dist/index.js +56 -16
  11. package/plugins/generations/gemini-tts/src/gemini-client.ts +34 -6
  12. package/plugins/generations/image-gen/dist/index.js +9 -9
  13. package/plugins/generations/music-gen/README.md +2 -2
  14. package/plugins/generations/music-gen/dist/index.js +62 -26
  15. package/plugins/generations/music-gen/presets/formats/song.yaml +6 -1
  16. package/plugins/generations/music-gen/presets/themes/synthwave.yaml +6 -1
  17. package/plugins/generations/music-gen/src/adapter/instance.ts +34 -11
  18. package/plugins/generations/music-gen/src/presets.ts +36 -3
  19. package/plugins/generations/news-report-gen/dist/index.js +12 -12
  20. package/plugins/generations/omni-voice-gen/uv.toml +5 -0
  21. package/plugins/generations/vibe-voice-tts/README.md +64 -0
  22. package/plugins/generations/vibe-voice-tts/dist/index.js +14259 -0
  23. package/plugins/generations/vibe-voice-tts/package.json +16 -0
  24. package/plugins/generations/vibe-voice-tts/plugin.json +6 -0
  25. package/plugins/generations/vibe-voice-tts/profiles.json +10 -0
  26. package/plugins/generations/vibe-voice-tts/pyproject.toml +9 -0
  27. package/plugins/generations/vibe-voice-tts/python/worker.py +566 -0
  28. package/plugins/generations/vibe-voice-tts/src/index.ts +88 -0
  29. package/plugins/generations/vibe-voice-tts/src/vibevoice-client.ts +828 -0
  30. package/plugins/generations/vibe-voice-tts/tsconfig.json +8 -0
  31. package/plugins/generations/vibe-voice-tts/uv.lock +1767 -0
  32. package/plugins/generations/vibe-voice-tts/uv.toml +4 -0
  33. package/plugins/generations/voice-gen/dist/index.js +40 -10
  34. package/plugins/generations/voice-gen/src/voicebox-client.ts +50 -1
  35. package/plugins/generations/voxcpm-tts/dist/index.js +90 -18
  36. package/plugins/generations/voxcpm-tts/python/worker.py +9 -0
  37. package/plugins/generations/voxcpm-tts/src/index.ts +41 -0
  38. package/plugins/generations/voxcpm-tts/src/voxcpm-client.ts +32 -11
  39. package/plugins/generations/voxcpm-tts/uv.toml +5 -0
  40. package/plugins/ingestions/aihot-ingest/dist/index.js +12 -12
  41. package/plugins/ingestions/horizon-ingest/dist/index.js +12 -12
  42. package/plugins/ingestions/karakeep-local/dist/index.js +13 -13
  43. package/plugins/ingestions/last30days-ingest/dist/index.js +12 -12
  44. package/plugins/ingestions/web-search/dist/index.js +10 -10
  45. package/plugins/kk/README.md +21 -0
  46. package/plugins/kk/decisions/kk-safety.yaml +5 -2
  47. package/plugins/kk/plugin.json +1 -1
  48. package/plugins/kk/publish-presets/daily-ai-voice.json +16 -16
  49. package/plugins/kk/schedules/kk-serve.launchd.plist.tmpl +12 -1
  50. package/plugins/kk/scripts/cover-compositor.ts +104 -26
  51. package/plugins/kk/scripts/daily-stages.ts +481 -63
  52. package/plugins/kk/scripts/kk-workflow-stages.ts +218 -17
  53. package/plugins/kk/scripts/safety-artifact-check.ts +28 -5
  54. package/plugins/kk/scripts/series-names.ts +16 -3
  55. package/plugins/kk/skills/news-editorial/SKILL.md +1 -1
  56. package/plugins/kk/skills/news-editorial/references/style-contract.zh.md +3 -3
  57. package/plugins/kk/workflows/kk-daily-ai-voice.yaml +4 -3
  58. package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +6 -5
  59. package/plugins/kk/workflows/kk-daily-safety.yaml +12 -10
  60. package/plugins/kk/workflows/kk-music.yaml +20 -16
  61. package/plugins/kk/workflows/kk-news-generate.yaml +26 -3
  62. package/plugins/kk/workflows/kk-publish.yaml +4 -1
  63. package/plugins/publishings/bilibili-pub/dist/index.js +22 -22
  64. package/plugins/publishings/bilibili-pub/dist/profile-check.js +22 -22
  65. package/plugins/publishings/cnblogs-pub/dist/index.js +22 -22
  66. package/plugins/publishings/cnblogs-pub/dist/profile-check.js +22 -22
  67. package/plugins/publishings/csdn-pub/dist/index.js +22 -22
  68. package/plugins/publishings/csdn-pub/dist/profile-check.js +22 -22
  69. package/plugins/publishings/emdash-pub/dist/index.js +9 -9
  70. package/plugins/publishings/infoq-pub/dist/index.js +22 -22
  71. package/plugins/publishings/infoq-pub/dist/profile-check.js +22 -22
  72. package/plugins/publishings/jike-pub/dist/index.js +22 -22
  73. package/plugins/publishings/jike-pub/dist/profile-check.js +22 -22
  74. package/plugins/publishings/juejin-pub/dist/index.js +22 -22
  75. package/plugins/publishings/juejin-pub/dist/profile-check.js +22 -22
  76. package/plugins/publishings/linkedin-pub/dist/index.js +133 -33
  77. package/plugins/publishings/linkedin-pub/dist/profile-check.js +27 -22
  78. package/plugins/publishings/linkedin-pub/src/index.ts +192 -18
  79. package/plugins/publishings/medium-pub/dist/index.js +9 -9
  80. package/plugins/publishings/podcast-pub/dist/index.js +240 -37
  81. package/plugins/publishings/podcast-pub/src/index.ts +154 -3
  82. package/plugins/publishings/podcast-pub/src/seo.ts +25 -8
  83. package/plugins/publishings/podcast-pub/src/show-notes-brief.ts +93 -23
  84. package/plugins/publishings/podcast-pub/src/show-notes.ts +26 -6
  85. package/plugins/publishings/qiita-pub/dist/index.js +9 -9
  86. package/plugins/publishings/shipinhao-pub/dist/index.js +23 -23
  87. package/plugins/publishings/shipinhao-pub/dist/profile-check.js +23 -23
  88. package/plugins/publishings/shipinhao-pub/src/selectors.ts +2 -1
  89. package/plugins/publishings/sspai-pub/dist/index.js +22 -22
  90. package/plugins/publishings/sspai-pub/dist/profile-check.js +22 -22
  91. package/plugins/publishings/substack-pub/dist/index.js +22 -22
  92. package/plugins/publishings/substack-pub/dist/profile-check.js +22 -22
  93. package/plugins/publishings/surfdash-pub/dist/index.js +207 -95
  94. package/plugins/publishings/surfdash-pub/src/digest-check.ts +30 -1
  95. package/plugins/publishings/surfdash-pub/src/index.ts +101 -76
  96. package/plugins/publishings/surfdash-pub/src/media-upload.ts +83 -0
  97. package/plugins/publishings/surfdash-pub/src/patch.ts +49 -26
  98. package/plugins/publishings/surfdash-pub/src/topic-claims.ts +12 -4
  99. package/plugins/publishings/threads-pub/dist/index.js +83 -27
  100. package/plugins/publishings/threads-pub/dist/profile-check.js +34 -23
  101. package/plugins/publishings/threads-pub/src/post-rail.ts +121 -4
  102. package/plugins/publishings/wechatmp-pub/dist/index.js +274 -98
  103. package/plugins/publishings/wechatmp-pub/dist/profile-check.js +27 -23
  104. package/plugins/publishings/wechatmp-pub/src/cgi-draft.ts +87 -53
  105. package/plugins/publishings/wechatmp-pub/src/enrich.ts +117 -13
  106. package/plugins/publishings/wechatmp-pub/src/flow.ts +183 -43
  107. package/plugins/publishings/wechatmp-pub/src/modes.ts +30 -12
  108. package/plugins/publishings/weibo-pub/dist/index.js +22 -22
  109. package/plugins/publishings/weibo-pub/dist/profile-check.js +22 -22
  110. package/plugins/publishings/x-pub/dist/index.js +113 -32
  111. package/plugins/publishings/x-pub/dist/profile-check.js +22 -22
  112. package/plugins/publishings/x-pub/src/post-rail.ts +155 -20
  113. package/plugins/publishings/xhs-pub/dist/index.js +22 -22
  114. package/plugins/publishings/xhs-pub/dist/profile-check.js +22 -22
  115. package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +22 -22
  116. package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +22 -22
  117. package/plugins/publishings/zenn-pub/dist/index.js +9 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobing-ai/knowledge-kit",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "description": "An ingest → create → publish content pipeline CLI (Bun).",
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,10 +46,10 @@
46
46
  "typecheck": "tsc --noEmit"
47
47
  },
48
48
  "dependencies": {
49
- "@gobing-ai/ts-ai-decision": "^0.5.32",
50
- "@gobing-ai/ts-infra": "^0.5.32",
51
- "@gobing-ai/ts-runtime": "^0.5.32",
52
- "@gobing-ai/ts-utils": "^0.5.32",
49
+ "@gobing-ai/ts-ai-decision": "^0.8.4",
50
+ "@gobing-ai/ts-infra": "^0.8.4",
51
+ "@gobing-ai/ts-runtime": "^0.8.4",
52
+ "@gobing-ai/ts-utils": "^0.8.4",
53
53
  "commander": "15.0.0",
54
54
  "playwright": "1.55.0",
55
55
  "zod": "4.4.3"
@@ -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) {
@@ -12247,7 +12247,7 @@ var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx)
12247
12247
  });
12248
12248
  }
12249
12249
  });
12250
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.32+180a6e424da77181/node_modules/@gobing-ai/ts-runtime/dist/index.js
12250
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.8.4+b85a65bb895e3074/node_modules/@gobing-ai/ts-runtime/dist/index.js
12251
12251
  init_file_system_node();
12252
12252
  init_config();
12253
12253
 
@@ -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
  }
@@ -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
  }
@@ -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,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.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
 
@@ -13056,10 +13056,10 @@ function validateScriptPlan(plan, docs, style, preExcludedIds) {
13056
13056
  errors.push({ itemId: "episode", rule: "cap:cardTitle" });
13057
13057
  }
13058
13058
  if (valid.social !== undefined) {
13059
- if (valid.social.short.length > (style.caps.socialShort ?? 140)) {
13059
+ if (valid.social.short.length > (style.caps.socialShort ?? 100)) {
13060
13060
  errors.push({ itemId: "episode", rule: "cap:socialShort" });
13061
13061
  }
13062
- if (valid.social.long.length > (style.caps.socialLong ?? 500)) {
13062
+ if (valid.social.long.length > (style.caps.socialLong ?? 300)) {
13063
13063
  errors.push({ itemId: "episode", rule: "cap:socialLong" });
13064
13064
  }
13065
13065
  }
@@ -270,10 +270,10 @@ export function validateScriptPlan(
270
270
  errors.push({ itemId: 'episode', rule: 'cap:cardTitle' });
271
271
  }
272
272
  if (valid.social !== undefined) {
273
- if (valid.social.short.length > (style.caps.socialShort ?? 140)) {
273
+ if (valid.social.short.length > (style.caps.socialShort ?? 100)) {
274
274
  errors.push({ itemId: 'episode', rule: 'cap:socialShort' });
275
275
  }
276
- if (valid.social.long.length > (style.caps.socialLong ?? 500)) {
276
+ if (valid.social.long.length > (style.caps.socialLong ?? 300)) {
277
277
  errors.push({ itemId: 'episode', rule: 'cap:socialLong' });
278
278
  }
279
279
  }
@@ -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
  }
@@ -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
 
@@ -12672,6 +12672,19 @@ async function auditVoiceSegments(script, segmentWavs, segmentMetadata, client)
12672
12672
  }
12673
12673
 
12674
12674
  // ../../plugins/generations/voice-gen/src/voicebox-client.ts
12675
+ init_dist();
12676
+ var GPU_BACKENDS = new Set(["gpu", "mps", "metal", "cuda"]);
12677
+ function detectCpuFallback(payload) {
12678
+ if (payload.gpu_available !== true)
12679
+ return;
12680
+ const variant = (payload.backend_variant ?? "").toLowerCase();
12681
+ if (!variant || GPU_BACKENDS.has(variant))
12682
+ return;
12683
+ return payload;
12684
+ }
12685
+ function requireGpu(env) {
12686
+ return ["1", "true", "yes"].includes((env.VOICEBOX_REQUIRE_GPU ?? "").toLowerCase());
12687
+ }
12675
12688
  function resolveVoiceboxTimeoutMs() {
12676
12689
  const raw = process.env.VOICEBOX_TIMEOUT_MS;
12677
12690
  const parsed = raw ? Number.parseInt(raw, 10) : Number.NaN;
@@ -12686,8 +12699,9 @@ function createVoiceboxClient(options = {}) {
12686
12699
  return {
12687
12700
  url,
12688
12701
  async health() {
12702
+ let res;
12689
12703
  try {
12690
- const res = await customFetch(`${url}/health`, { signal: AbortSignal.timeout(requestTimeoutMs) });
12704
+ res = await customFetch(`${url}/health`, { signal: AbortSignal.timeout(requestTimeoutMs) });
12691
12705
  if (!res.ok) {
12692
12706
  throw new Error(`HTTP ${res.status} ${res.statusText}`);
12693
12707
  }
@@ -12695,6 +12709,21 @@ function createVoiceboxClient(options = {}) {
12695
12709
  const reason = err instanceof Error ? err.message : String(err);
12696
12710
  throw new Error(`Voicebox health check failed at ${url}: ${reason} \u2014 is Voicebox.app running with its REST server enabled? (restart the app or fix VOICEBOX_URL)`);
12697
12711
  }
12712
+ let payload;
12713
+ try {
12714
+ payload = await res.json();
12715
+ } catch {
12716
+ payload = undefined;
12717
+ }
12718
+ const fallback = payload && detectCpuFallback(payload);
12719
+ if (fallback) {
12720
+ const detail = `backend_variant: "${fallback.backend_variant}", gpu_available: true, gpu_type: "${fallback.gpu_type ?? "unknown"}"`;
12721
+ const message = `Voicebox at ${url} is rendering on CPU (${detail}) \u2014 expect ~5.6x realtime degradation. Restart Voicebox.app while Metal is free, or set VOICEBOX_REQUIRE_GPU=0 to accept it.`;
12722
+ if (requireGpu(process.env)) {
12723
+ throw new Error(`voice-gen: ${message}`);
12724
+ }
12725
+ echoError(`voice-gen: warning: ${message}`);
12726
+ }
12698
12727
  },
12699
12728
  async resolveProfile(nameOrId) {
12700
12729
  let res;
@@ -13514,6 +13543,7 @@ var DEFAULT_BASE_URL = "https://generativelanguage.googleapis.com";
13514
13543
  var DEFAULT_PROFILES_PATH = new URL("../profiles.json", import.meta.url).pathname;
13515
13544
  var TRANSCRIBE_PROMPT = "Transcribe this audio verbatim. Output only the transcript, no commentary.";
13516
13545
  var RETRY_AFTER_CAP_SEC = 120;
13546
+ var TERMINAL_STATUSES = new Set([400, 401, 402, 403, 404]);
13517
13547
  var PLACEHOLDER_VOICE = "voice_REPLACE_ME";
13518
13548
  function findOutput(json, type) {
13519
13549
  for (const step of json.steps ?? []) {
@@ -13548,29 +13578,36 @@ function createGeminiVoiceClient(options = {}) {
13548
13578
  const styleOverride = env.GEMINI_TTS_STYLE;
13549
13579
  const maxAttempts = positiveInt(env.GEMINI_TTS_MAX_ATTEMPTS, 4);
13550
13580
  const timeoutMs = positiveInt(env.GEMINI_TTS_TIMEOUT_MS, 120000);
13581
+ const segmentTimeoutMs = positiveInt(env.GEMINI_TTS_SEGMENT_TIMEOUT_MS, 180000);
13551
13582
  const buffered = new Map;
13552
13583
  let profiles;
13553
13584
  let seq = 0;
13554
13585
  async function post(body, label) {
13555
13586
  const apiKey = env.GEMINI_API_KEY ?? "";
13587
+ const deadline = Date.now() + segmentTimeoutMs;
13556
13588
  for (let attempt = 1;; attempt++) {
13589
+ const remaining = deadline - Date.now();
13590
+ if (remaining <= 0) {
13591
+ throw new Error(`${label}: segment budget ${segmentTimeoutMs}ms exhausted after ${attempt - 1} attempt(s)`);
13592
+ }
13593
+ const attemptMs = Math.min(timeoutMs, remaining);
13557
13594
  let res;
13558
13595
  try {
13559
13596
  res = await withDeadline(doFetch(`${baseUrl}/v1beta/interactions`, {
13560
13597
  method: "POST",
13561
13598
  headers: { "content-type": "application/json", "x-goog-api-key": apiKey },
13562
13599
  body: JSON.stringify(body),
13563
- signal: AbortSignal.timeout(timeoutMs)
13564
- }), timeoutMs);
13600
+ signal: AbortSignal.timeout(attemptMs)
13601
+ }), attemptMs);
13565
13602
  } catch (err) {
13566
13603
  const msg = err instanceof Error ? err.message : String(err);
13567
- if (attempt >= maxAttempts)
13568
- throw new Error(`${label}: request failed after ${attempt} attempts: ${msg}`);
13569
- await sleep(2000 * 2 ** (attempt - 1));
13604
+ if (attempt >= maxAttempts || Date.now() >= deadline)
13605
+ throw new Error(`${label}: request failed after ${attempt} attempt(s) within ${segmentTimeoutMs}ms: ${msg}`);
13606
+ await sleep(Math.min(2000 * 2 ** (attempt - 1), Math.max(0, deadline - Date.now())));
13570
13607
  continue;
13571
13608
  }
13572
13609
  if (res.ok)
13573
- return withDeadline(res.json(), timeoutMs);
13610
+ return withDeadline(res.json(), Math.min(timeoutMs, Math.max(1, deadline - Date.now())));
13574
13611
  const raw = await withDeadline(res.text(), timeoutMs);
13575
13612
  let apiMessage = raw.slice(0, 300);
13576
13613
  try {
@@ -13580,6 +13617,9 @@ function createGeminiVoiceClient(options = {}) {
13580
13617
  if (retryAfter > RETRY_AFTER_CAP_SEC) {
13581
13618
  throw new Error(`${label}: HTTP ${res.status} quota/reset horizon too far out (retry-after ${retryAfter}s \u2248 ${(retryAfter / 3600).toFixed(1)}h): ${apiMessage}`);
13582
13619
  }
13620
+ if (TERMINAL_STATUSES.has(res.status)) {
13621
+ throw new Error(`${label}: HTTP ${res.status} is not retryable (auth/billing/request class) \u2014 failing fast instead of burning the segment budget: ${apiMessage}`);
13622
+ }
13583
13623
  const retryable = res.status === 429 || res.status >= 500;
13584
13624
  if (!retryable || attempt >= maxAttempts) {
13585
13625
  throw new Error(`${label}: HTTP ${res.status} after ${attempt} attempt(s): ${apiMessage}`);