@gobing-ai/knowledge-kit 0.0.16 → 0.0.18

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 (77) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/README.md +74 -0
  3. package/dist/index.js +46 -100
  4. package/package.json +19 -1
  5. package/plugins/generations/content-gen/dist/index.js +42 -94
  6. package/plugins/generations/core-facts-gen/dist/index.js +51 -100
  7. package/plugins/generations/daily-article-gen/dist/index.js +98 -100
  8. package/plugins/generations/daily-article-gen/src/index.ts +80 -6
  9. package/plugins/generations/dailynews-gen/dist/index.js +144 -130
  10. package/plugins/generations/dailynews-gen/src/script-builder.ts +141 -33
  11. package/plugins/generations/episode-plan-gen/dist/index.js +124 -115
  12. package/plugins/generations/episode-plan-gen/src/index.ts +111 -24
  13. package/plugins/generations/image-gen/dist/index.js +63 -115
  14. package/plugins/generations/news-report-gen/dist/index.js +164 -100
  15. package/plugins/generations/news-report-gen/src/index.ts +199 -7
  16. package/plugins/generations/omni-voice-gen/src/omni_voice_gen/pipeline.py +17 -1
  17. package/plugins/generations/omni-voice-gen/src/omni_voice_gen/qc.py +4 -22
  18. package/plugins/generations/omni-voice-gen/src/omni_voice_gen/voicescript.py +8 -0
  19. package/plugins/generations/voice-gen/dist/index.js +136 -117
  20. package/plugins/generations/voice-gen/src/concat.ts +34 -0
  21. package/plugins/generations/voice-gen/src/index.ts +6 -4
  22. package/plugins/generations/voice-gen/src/voicescript.ts +61 -0
  23. package/plugins/ingestions/aihot-ingest/dist/index.js +47 -97
  24. package/plugins/ingestions/horizon-ingest/dist/index.js +47 -96
  25. package/plugins/ingestions/karakeep-local/dist/index.js +217 -266
  26. package/plugins/ingestions/last30days-ingest/dist/index.js +42 -91
  27. package/plugins/ingestions/web-search/dist/index.js +68 -117
  28. package/plugins/kk/commands/workflow-run.md +25 -2
  29. package/plugins/kk/plugin.json +1 -1
  30. package/plugins/kk/scripts/kk-workflow-stages.ts +522 -163
  31. package/plugins/kk/scripts/validate-voicescript.ts +55 -0
  32. package/plugins/kk/skills/publish/SKILL.md +80 -0
  33. package/plugins/kk/workflows/kk-daily-ai-voice.yaml +125 -120
  34. package/plugins/kk/workflows/leftover-publish-fanout-example.yaml +53 -0
  35. package/plugins/publishings/emdash-pub/dist/index.js +42 -91
  36. package/plugins/publishings/infoq-pub/dist/index.js +21994 -0
  37. package/plugins/publishings/infoq-pub/package.json +17 -0
  38. package/plugins/publishings/infoq-pub/plugin.json +7 -0
  39. package/plugins/publishings/infoq-pub/src/index.ts +123 -0
  40. package/plugins/publishings/infoq-pub/tsconfig.json +4 -0
  41. package/plugins/publishings/juejin-pub/dist/index.js +21994 -0
  42. package/plugins/publishings/juejin-pub/package.json +17 -0
  43. package/plugins/publishings/juejin-pub/plugin.json +7 -0
  44. package/plugins/publishings/juejin-pub/src/index.ts +123 -0
  45. package/plugins/publishings/juejin-pub/tsconfig.json +4 -0
  46. package/plugins/publishings/medium-pub/dist/index.js +22041 -0
  47. package/plugins/publishings/medium-pub/package.json +17 -0
  48. package/plugins/publishings/medium-pub/plugin.json +7 -0
  49. package/plugins/publishings/medium-pub/src/index.ts +215 -0
  50. package/plugins/publishings/medium-pub/tsconfig.json +4 -0
  51. package/plugins/publishings/podcast-pub/dist/index.js +183 -123
  52. package/plugins/publishings/podcast-pub/src/index.ts +47 -3
  53. package/plugins/publishings/podcast-pub/src/show-notes.ts +153 -34
  54. package/plugins/publishings/qiita-pub/dist/index.js +42 -91
  55. package/plugins/publishings/substack-pub/dist/index.js +21994 -0
  56. package/plugins/publishings/substack-pub/package.json +17 -0
  57. package/plugins/publishings/substack-pub/plugin.json +7 -0
  58. package/plugins/publishings/substack-pub/src/index.ts +123 -0
  59. package/plugins/publishings/substack-pub/tsconfig.json +4 -0
  60. package/plugins/publishings/surfdash-pub/dist/index.js +172 -103
  61. package/plugins/publishings/surfdash-pub/src/index.ts +32 -2
  62. package/plugins/publishings/wechatmp-pub/dist/index.js +22119 -0
  63. package/plugins/publishings/wechatmp-pub/package.json +17 -0
  64. package/plugins/publishings/wechatmp-pub/plugin.json +7 -0
  65. package/plugins/publishings/wechatmp-pub/src/index.ts +304 -0
  66. package/plugins/publishings/wechatmp-pub/tsconfig.json +4 -0
  67. package/plugins/publishings/x-pub/dist/index.js +22110 -0
  68. package/plugins/publishings/x-pub/package.json +17 -0
  69. package/plugins/publishings/x-pub/plugin.json +7 -0
  70. package/plugins/publishings/x-pub/src/index.ts +222 -0
  71. package/plugins/publishings/x-pub/tsconfig.json +4 -0
  72. package/plugins/publishings/xhs-pub/dist/index.js +21994 -0
  73. package/plugins/publishings/xhs-pub/package.json +17 -0
  74. package/plugins/publishings/xhs-pub/plugin.json +7 -0
  75. package/plugins/publishings/xhs-pub/src/index.ts +123 -0
  76. package/plugins/publishings/xhs-pub/tsconfig.json +4 -0
  77. package/plugins/publishings/zenn-pub/dist/index.js +42 -91
@@ -8,7 +8,8 @@ import { echoError } from '@gobing-ai/ts-utils';
8
8
  * daily-article-gen: render a merged `Doc[]` into one readable daily AI-news
9
9
  * article. Mechanical template fill — no LLM, no STORM. Every news item keeps
10
10
  * a human-clickable source link (`[来源](sourceUri)`) so readers can trace
11
- * claims to their origin.
11
+ * claims to their origin. Research scaffolding is stripped before render
12
+ * (task 0138 R4b — see `stripScaffold`).
12
13
  *
13
14
  * Run date: `ARTICLE_DATE` env var (YYYYMMDD or ISO), else today (UTC).
14
15
  * Language-neutral: the Doc bodies already carry the summary language.
@@ -26,6 +27,71 @@ function sourceLabelOf(doc: Doc): string {
26
27
  }
27
28
  }
28
29
 
30
+ /**
31
+ * Research-scaffold labels that must never reach reader copy (task 0138 R4b). The last30days
32
+ * research style emits them as `**「label」**` prefixes; the plan-translate prompt forbids them,
33
+ * but this deterministic pass catches what the agent misses. Grows with sources.
34
+ */
35
+ const SCAFFOLD_LABELS = ['可做角度', '为什么现在值得注意', '社区讨论', '背景', '潜在影响', '影响'];
36
+
37
+ /** Self-referential hedging markers — research voice, not news copy (task 0138 R4b). */
38
+ const HEDGING_MARKERS = ['读者宜另行核实', '读者最好', '仍待验证', '尚待验证', '需另行核实'];
39
+
40
+ /**
41
+ * Length of a leading scaffold label in any shape the research bodies use — `**「背景」**`,
42
+ * `「背景」`, `**背景**`, `### 背景`, `背景:` — or 0 when the line does not open with a known label.
43
+ * The capture is greedy and unbounded on purpose: it must reach the whole label (so `可做` cannot
44
+ * satisfy it where `可做角度` is the real one) and must not impose a length the label list outgrows.
45
+ * The `SCAFFOLD_LABELS` membership check, not the regex, decides.
46
+ */
47
+ function scaffoldPrefixLength(text: string): number {
48
+ const match = text.match(
49
+ /^(?:#{1,6}\s*)?(?:\*\*)?\s*[「『]?\s*([^」』*::\n]{2,})\s*[」』]?\s*(?:\*\*)?\s*[::]?\s*/,
50
+ );
51
+ if (match === null || !SCAFFOLD_LABELS.includes((match[1] ?? '').trim())) return 0;
52
+ return match[0].length;
53
+ }
54
+
55
+ /** Drop every leading scaffold label, keeping the prose after it (`**「可做角度」** 可做角度:X` -> `X`). */
56
+ function collapseScaffoldLabels(text: string): string {
57
+ let rest = text;
58
+ for (;;) {
59
+ const next = rest.slice(scaffoldPrefixLength(rest));
60
+ if (next === rest) return rest;
61
+ rest = next;
62
+ }
63
+ }
64
+
65
+ /** Drop the sentences carrying a hedging marker; a line that is only hedging collapses to ''. */
66
+ function stripHedging(text: string): string {
67
+ if (!HEDGING_MARKERS.some((marker) => text.includes(marker))) return text;
68
+ return text
69
+ .split(/(?<=。)/)
70
+ .filter((sentence) => !HEDGING_MARKERS.some((marker) => sentence.includes(marker)))
71
+ .join('')
72
+ .trim();
73
+ }
74
+
75
+ /**
76
+ * Strip research scaffolding from a Doc body before it reaches reader copy (task 0138 R4b):
77
+ * standalone label lines are dropped, inline label prefixes collapse to their prose, and hedging
78
+ * sentences are removed. A clean body passes through byte-identical.
79
+ */
80
+ export function stripScaffold(body: string): string {
81
+ const kept: string[] = [];
82
+ for (const line of body.split('\n')) {
83
+ const trimmed = line.trim();
84
+ if (trimmed === '') {
85
+ kept.push(line); // paragraph breaks survive untouched
86
+ continue;
87
+ }
88
+ const collapsed = stripHedging(collapseScaffoldLabels(trimmed));
89
+ if (collapsed === '') continue;
90
+ kept.push(collapsed === trimmed ? line : collapsed);
91
+ }
92
+ return kept.join('\n');
93
+ }
94
+
29
95
  /** Render one news item section: heading, source link, and summary body. */
30
96
  function renderDoc(doc: Doc, index: number): string {
31
97
  const heading = doc.title?.trim() || `新闻 ${index + 1}`;
@@ -33,7 +99,7 @@ function renderDoc(doc: Doc, index: number): string {
33
99
  const meta = doc.metadata as Record<string, unknown> | undefined;
34
100
  const publishedAt = typeof meta?.publishedAt === 'string' ? meta.publishedAt.slice(0, 10) : '';
35
101
  const metaLine = [link, publishedAt].filter(Boolean).join(' · ');
36
- return `## ${index + 1}. ${heading}\n\n${metaLine ? `${metaLine}\n\n` : ''}${(doc.body ?? '').trim()}`;
102
+ return `## ${index + 1}. ${heading}\n\n${metaLine ? `${metaLine}\n\n` : ''}${stripScaffold(doc.body ?? '').trim()}`;
37
103
  }
38
104
 
39
105
  /** Render the article markdown for a merged Doc[] (pure — exported for tests). */
@@ -54,11 +120,11 @@ function tagsFor(docs: Doc[]): string[] {
54
120
  return [AI_NEWS_TAG, ...existing.filter((t) => t !== AI_NEWS_TAG)];
55
121
  }
56
122
 
57
- /** Build the article Content from a merged Doc[]. */
58
- export function docsToContent(docs: Doc[], date: string): Content {
123
+ /** Build the article Content from a merged Doc[]; `bodyOverride` replaces the mechanical render (agent-written prose), still scaffold-stripped as a safety net. */
124
+ export function docsToContent(docs: Doc[], date: string, bodyOverride?: string): Content {
59
125
  return ContentSchema.parse({
60
126
  title: `每日 AI 资讯 — ${date}`,
61
- body: renderDailyArticle(docs, date),
127
+ body: bodyOverride ? stripScaffold(bodyOverride).trim() : renderDailyArticle(docs, date),
62
128
  format: 'markdown',
63
129
  references: docs.filter((d) => d.sourceUri).map((d) => ({ url: d.sourceUri, title: d.title, cite: d.id })),
64
130
  metadata: { generator: 'kk:daily-article', date, doc_count: docs.length, tags: tagsFor(docs) },
@@ -69,7 +135,15 @@ export async function processGeneratorIO(inputPath: string, outputPath: string):
69
135
  const docs = DocListSchema.parse(await readJsonFile(inputPath));
70
136
  const raw = process.env.ARTICLE_DATE ?? new Date().toISOString().slice(0, 10);
71
137
  const date = raw.length === 8 ? `${raw.slice(0, 4)}-${raw.slice(4, 6)}-${raw.slice(6, 8)}` : raw;
72
- const content = docsToContent(docs, date);
138
+ // Agent-written prose body (workflow `article-write` state) replaces the mechanical
139
+ // per-item render; missing/empty env ⇒ mechanical render as before.
140
+ let bodyOverride: string | undefined;
141
+ const bodyFile = process.env.ARTICLE_BODY_FILE;
142
+ if (bodyFile && bodyFile.length > 0) {
143
+ bodyOverride = await Bun.file(bodyFile).text();
144
+ if (bodyOverride.trim() === '') bodyOverride = undefined;
145
+ }
146
+ const content = docsToContent(docs, date, bodyOverride);
73
147
  const fs = createNodeFileSystem();
74
148
  const outDir = dirname(outputPath);
75
149
  if (outDir && outDir !== '.') await fs.ensureDir(outDir);
@@ -14642,72 +14642,6 @@ var init_zod = __esm(() => {
14642
14642
  init_external();
14643
14643
  });
14644
14644
 
14645
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.39/node_modules/@gobing-ai/ts-utils/dist/errors.js
14646
- var ErrorCode;
14647
- var init_errors3 = __esm(() => {
14648
- ErrorCode = {
14649
- NotFound: "NOT_FOUND",
14650
- Validation: "VALIDATION",
14651
- Conflict: "CONFLICT",
14652
- Internal: "INTERNAL"
14653
- };
14654
- });
14655
-
14656
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.39/node_modules/@gobing-ai/ts-utils/dist/api-response.js
14657
- var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
14658
- var init_api_response = __esm(() => {
14659
- init_errors3();
14660
- API_ERROR_CODES = {
14661
- SUCCESS: 0,
14662
- NOT_FOUND: 404,
14663
- VALIDATION_ERROR: 422,
14664
- BAD_REQUEST: 400,
14665
- UNAUTHORIZED: 401,
14666
- FORBIDDEN: 403,
14667
- CONFLICT: 409,
14668
- INTERNAL_ERROR: 500
14669
- };
14670
- ERROR_CODE_TO_HTTP = {
14671
- [ErrorCode.NotFound]: API_ERROR_CODES.NOT_FOUND,
14672
- [ErrorCode.Validation]: API_ERROR_CODES.VALIDATION_ERROR,
14673
- [ErrorCode.Conflict]: API_ERROR_CODES.CONFLICT,
14674
- [ErrorCode.Internal]: API_ERROR_CODES.INTERNAL_ERROR
14675
- };
14676
- CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
14677
- });
14678
-
14679
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.39/node_modules/@gobing-ai/ts-utils/dist/cursor.js
14680
- var init_cursor = () => {};
14681
-
14682
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.39/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
14683
- var init_event_severity = () => {};
14684
-
14685
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.39/node_modules/@gobing-ai/ts-utils/dist/output.js
14686
- function processStream(name) {
14687
- const proc = globalThis.process;
14688
- const stream = proc?.[name];
14689
- if (stream === undefined) {
14690
- throw new Error(`No ${name} target available: set one via setDefaultOutputTargets or pass an explicit target`);
14691
- }
14692
- return stream;
14693
- }
14694
- function writeLine(message, target) {
14695
- target.write(`${message}
14696
- `);
14697
- }
14698
- function echoError(message, target = defaultStderrTarget ?? processStream("stderr")) {
14699
- writeLine(message, target);
14700
- }
14701
- var defaultStderrTarget;
14702
-
14703
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.39/node_modules/@gobing-ai/ts-utils/dist/index.js
14704
- var init_dist = __esm(() => {
14705
- init_api_response();
14706
- init_cursor();
14707
- init_errors3();
14708
- init_event_severity();
14709
- });
14710
-
14711
14645
  // ../../node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/nodes/identity.js
14712
14646
  var require_identity = __commonJS((exports) => {
14713
14647
  var ALIAS = Symbol.for("yaml.alias");
@@ -17612,15 +17546,15 @@ var require_timestamp = __commonJS((exports) => {
17612
17546
  throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
17613
17547
  const [, year, month, day, hour, minute, second] = match.map(Number);
17614
17548
  const millisec = match[7] ? Number((match[7] + "00").substr(1, 3)) : 0;
17615
- let date6 = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);
17549
+ let date5 = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);
17616
17550
  const tz = match[8];
17617
17551
  if (tz && tz !== "Z") {
17618
17552
  let d = parseSexagesimal(tz, false);
17619
17553
  if (Math.abs(d) < 30)
17620
17554
  d *= 60;
17621
- date6 -= 60000 * d;
17555
+ date5 -= 60000 * d;
17622
17556
  }
17623
- return new Date(date6);
17557
+ return new Date(date5);
17624
17558
  },
17625
17559
  stringify: ({ value }) => value?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
17626
17560
  };
@@ -19480,7 +19414,7 @@ var require_composer = __commonJS((exports) => {
19480
19414
  var node_process = __require("process");
19481
19415
  var directives = require_directives();
19482
19416
  var Document = require_Document();
19483
- var errors4 = require_errors();
19417
+ var errors3 = require_errors();
19484
19418
  var identity = require_identity();
19485
19419
  var composeDoc = require_compose_doc();
19486
19420
  var resolveEnd = require_resolve_end();
@@ -19531,9 +19465,9 @@ var require_composer = __commonJS((exports) => {
19531
19465
  this.onError = (source, code, message, warning) => {
19532
19466
  const pos = getErrorPos(source);
19533
19467
  if (warning)
19534
- this.warnings.push(new errors4.YAMLWarning(pos, code, message));
19468
+ this.warnings.push(new errors3.YAMLWarning(pos, code, message));
19535
19469
  else
19536
- this.errors.push(new errors4.YAMLParseError(pos, code, message));
19470
+ this.errors.push(new errors3.YAMLParseError(pos, code, message));
19537
19471
  };
19538
19472
  this.directives = new directives.Directives({ version: options.version || "1.2" });
19539
19473
  this.options = options;
@@ -19619,7 +19553,7 @@ ${cb}` : comment;
19619
19553
  break;
19620
19554
  case "error": {
19621
19555
  const msg = token.source ? `${token.message}: ${JSON.stringify(token.source)}` : token.message;
19622
- const error51 = new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
19556
+ const error51 = new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg);
19623
19557
  if (this.atDirectives || !this.doc)
19624
19558
  this.errors.push(error51);
19625
19559
  else
@@ -19629,7 +19563,7 @@ ${cb}` : comment;
19629
19563
  case "doc-end": {
19630
19564
  if (!this.doc) {
19631
19565
  const msg = "Unexpected doc-end without preceding document";
19632
- this.errors.push(new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
19566
+ this.errors.push(new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", msg));
19633
19567
  break;
19634
19568
  }
19635
19569
  this.doc.directives.docEnd = true;
@@ -19644,7 +19578,7 @@ ${end.comment}` : end.comment;
19644
19578
  break;
19645
19579
  }
19646
19580
  default:
19647
- this.errors.push(new errors4.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
19581
+ this.errors.push(new errors3.YAMLParseError(getErrorPos(token), "UNEXPECTED_TOKEN", `Unsupported token ${token.type}`));
19648
19582
  }
19649
19583
  }
19650
19584
  *end(forceDoc = false, endOffset = -1) {
@@ -19670,7 +19604,7 @@ ${end.comment}` : end.comment;
19670
19604
  var require_cst_scalar = __commonJS((exports) => {
19671
19605
  var resolveBlockScalar = require_resolve_block_scalar();
19672
19606
  var resolveFlowScalar = require_resolve_flow_scalar();
19673
- var errors4 = require_errors();
19607
+ var errors3 = require_errors();
19674
19608
  var stringifyString = require_stringifyString();
19675
19609
  function resolveAsScalar(token, strict = true, onError) {
19676
19610
  if (token) {
@@ -19679,7 +19613,7 @@ var require_cst_scalar = __commonJS((exports) => {
19679
19613
  if (onError)
19680
19614
  onError(offset, code, message);
19681
19615
  else
19682
- throw new errors4.YAMLParseError([offset, offset + 1], code, message);
19616
+ throw new errors3.YAMLParseError([offset, offset + 1], code, message);
19683
19617
  };
19684
19618
  switch (token.type) {
19685
19619
  case "scalar":
@@ -21559,7 +21493,7 @@ var require_parser = __commonJS((exports) => {
21559
21493
  var require_public_api = __commonJS((exports) => {
21560
21494
  var composer = require_composer();
21561
21495
  var Document = require_Document();
21562
- var errors4 = require_errors();
21496
+ var errors3 = require_errors();
21563
21497
  var log = require_log();
21564
21498
  var identity = require_identity();
21565
21499
  var lineCounter = require_line_counter();
@@ -21576,8 +21510,8 @@ var require_public_api = __commonJS((exports) => {
21576
21510
  const docs = Array.from(composer$1.compose(parser$1.parse(source)));
21577
21511
  if (prettyErrors && lineCounter2)
21578
21512
  for (const doc2 of docs) {
21579
- doc2.errors.forEach(errors4.prettifyError(source, lineCounter2));
21580
- doc2.warnings.forEach(errors4.prettifyError(source, lineCounter2));
21513
+ doc2.errors.forEach(errors3.prettifyError(source, lineCounter2));
21514
+ doc2.warnings.forEach(errors3.prettifyError(source, lineCounter2));
21581
21515
  }
21582
21516
  if (docs.length > 0)
21583
21517
  return docs;
@@ -21592,13 +21526,13 @@ var require_public_api = __commonJS((exports) => {
21592
21526
  if (!doc2)
21593
21527
  doc2 = _doc;
21594
21528
  else if (doc2.options.logLevel !== "silent") {
21595
- doc2.errors.push(new errors4.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
21529
+ doc2.errors.push(new errors3.YAMLParseError(_doc.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
21596
21530
  break;
21597
21531
  }
21598
21532
  }
21599
21533
  if (prettyErrors && lineCounter2) {
21600
- doc2.errors.forEach(errors4.prettifyError(source, lineCounter2));
21601
- doc2.warnings.forEach(errors4.prettifyError(source, lineCounter2));
21534
+ doc2.errors.forEach(errors3.prettifyError(source, lineCounter2));
21535
+ doc2.warnings.forEach(errors3.prettifyError(source, lineCounter2));
21602
21536
  }
21603
21537
  return doc2;
21604
21538
  }
@@ -21650,12 +21584,12 @@ var require_public_api = __commonJS((exports) => {
21650
21584
  });
21651
21585
 
21652
21586
  // ../../node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/index.js
21653
- var composer, Document, Schema, errors4, Alias, identity, Pair, Scalar, YAMLMap, YAMLSeq, cst, lexer, lineCounter, parser, publicApi, visit, $Composer, $Document, $Schema, $YAMLError, $YAMLParseError, $YAMLWarning, $Alias, $isAlias, $isCollection, $isDocument, $isMap, $isNode, $isPair, $isScalar, $isSeq, $Pair, $Scalar, $YAMLMap, $YAMLSeq, $Lexer, $LineCounter, $Parser, $parse, $parseAllDocuments, $parseDocument, $stringify, $visit, $visitAsync;
21654
- var init_dist2 = __esm(() => {
21587
+ var composer, Document, Schema, errors3, Alias, identity, Pair, Scalar, YAMLMap, YAMLSeq, cst, lexer, lineCounter, parser, publicApi, visit, $Composer, $Document, $Schema, $YAMLError, $YAMLParseError, $YAMLWarning, $Alias, $isAlias, $isCollection, $isDocument, $isMap, $isNode, $isPair, $isScalar, $isSeq, $Pair, $Scalar, $YAMLMap, $YAMLSeq, $Lexer, $LineCounter, $Parser, $parse, $parseAllDocuments, $parseDocument, $stringify, $visit, $visitAsync;
21588
+ var init_dist = __esm(() => {
21655
21589
  composer = require_composer();
21656
21590
  Document = require_Document();
21657
21591
  Schema = require_Schema();
21658
- errors4 = require_errors();
21592
+ errors3 = require_errors();
21659
21593
  Alias = require_Alias();
21660
21594
  identity = require_identity();
21661
21595
  Pair = require_Pair();
@@ -21671,9 +21605,9 @@ var init_dist2 = __esm(() => {
21671
21605
  $Composer = composer.Composer;
21672
21606
  $Document = Document.Document;
21673
21607
  $Schema = Schema.Schema;
21674
- $YAMLError = errors4.YAMLError;
21675
- $YAMLParseError = errors4.YAMLParseError;
21676
- $YAMLWarning = errors4.YAMLWarning;
21608
+ $YAMLError = errors3.YAMLError;
21609
+ $YAMLParseError = errors3.YAMLParseError;
21610
+ $YAMLWarning = errors3.YAMLWarning;
21677
21611
  $Alias = Alias.Alias;
21678
21612
  $isAlias = identity.isAlias;
21679
21613
  $isCollection = identity.isCollection;
@@ -21701,7 +21635,7 @@ var init_dist2 = __esm(() => {
21701
21635
  // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.4.39/node_modules/@gobing-ai/ts-runtime/dist/config.js
21702
21636
  var configSchema;
21703
21637
  var init_config = __esm(() => {
21704
- init_dist2();
21638
+ init_dist();
21705
21639
  init_zod();
21706
21640
  configSchema = exports_external.object({
21707
21641
  app: exports_external.object({
@@ -21887,11 +21821,26 @@ var PluginManifestSchema = exports_external.object({
21887
21821
  init_file_system_node();
21888
21822
  init_config();
21889
21823
 
21824
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.4.67/node_modules/@gobing-ai/ts-utils/dist/output.js
21825
+ var defaultStderrTarget;
21826
+ function processStream(name) {
21827
+ const proc = globalThis.process;
21828
+ const stream = proc?.[name];
21829
+ if (stream === undefined) {
21830
+ throw new Error(`No ${name} target available: set one via setDefaultOutputTargets or pass an explicit target`);
21831
+ }
21832
+ return stream;
21833
+ }
21834
+ function writeLine(message, target) {
21835
+ target.write(`${message}
21836
+ `);
21837
+ }
21838
+ function echoError(message, target = defaultStderrTarget ?? processStream("stderr")) {
21839
+ writeLine(message, target);
21840
+ }
21841
+
21890
21842
  // ../../packages/kk-core/src/render-md.ts
21891
21843
  if (false) {}
21892
- // ../../plugins/generations/dailynews-gen/src/index.ts
21893
- init_dist();
21894
-
21895
21844
  // ../../plugins/generations/dailynews-gen/src/script-builder.ts
21896
21845
  init_zod();
21897
21846
  var EffectConfigSchema = exports_external.object({
@@ -21922,6 +21871,7 @@ var VoiceScriptSegmentSchema = exports_external.object({
21922
21871
  engine: exports_external.string().min(1).optional(),
21923
21872
  language: exports_external.string().min(1).optional(),
21924
21873
  gap_ms: exports_external.number().int().nonnegative().optional(),
21874
+ speed: exports_external.number().min(0.5).max(2).optional(),
21925
21875
  max_chunk_chars: exports_external.number().int().optional(),
21926
21876
  crossfade_ms: exports_external.number().int().optional(),
21927
21877
  personality: exports_external.boolean().optional(),
@@ -21951,13 +21901,13 @@ function formatChineseCount(n) {
21951
21901
  return ZH_DIGITS[n] ?? String(n);
21952
21902
  return String(n);
21953
21903
  }
21954
- function formatBroadcastDate(date6, language) {
21904
+ function formatBroadcastDate(date5, language) {
21955
21905
  if (language === "zh") {
21956
- const year = date6.getFullYear();
21957
- const month = date6.getMonth() + 1;
21958
- const day = date6.getDate();
21906
+ const year = date5.getFullYear();
21907
+ const month = date5.getMonth() + 1;
21908
+ const day = date5.getDate();
21959
21909
  const weekdays = ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
21960
- const weekday = weekdays[date6.getDay()] ?? "\u65E5";
21910
+ const weekday = weekdays[date5.getDay()] ?? "\u65E5";
21961
21911
  return `${year}\u5E74${month}\u6708${day}\u65E5\uFF0C\u661F\u671F${weekday}`;
21962
21912
  }
21963
21913
  return new Intl.DateTimeFormat("en-US", {
@@ -21965,7 +21915,7 @@ function formatBroadcastDate(date6, language) {
21965
21915
  month: "long",
21966
21916
  day: "numeric",
21967
21917
  year: "numeric"
21968
- }).format(date6);
21918
+ }).format(date5);
21969
21919
  }
21970
21920
  function normalizeBroadcastText(raw, isZh) {
21971
21921
  let text = raw.trim();
@@ -21999,34 +21949,85 @@ function normalizeBroadcastText(raw, isZh) {
21999
21949
  }
22000
21950
  return text;
22001
21951
  }
22002
- function synthesizePersonalUnderstanding(title, body, isZh) {
21952
+ function synthesizePersonalUnderstanding(title, body, isZh, used) {
22003
21953
  const combined = `${title} ${body}`.toLowerCase();
22004
- if (isZh) {
22005
- if (/jakub|szymon|\u9996\u5E2D\u79D1\u5B66\u5BB6|\u521B\u59CB\u56E2\u961F|\u6280\u672F\u9886\u8896|\u9EC4\u91D1\u642D\u6863/i.test(combined)) {
22006
- return "\u5728\u5404\u79CD\u6280\u672F\u5149\u73AF\u80CC\u540E\uFF0C\u6B63\u662F\u8FD9\u6837\u4E13\u6CE8\u800C\u4E0D\u77E5\u75B2\u5026\u7684\u5E95\u5C42\u653B\u575A\u8005\uFF0C\u4E3A\u4ECA\u5929\u6574\u4E2A\u5927\u6A21\u578B\u751F\u6001\u5960\u5B9A\u4E86\u6700\u575A\u5B9E\u7684\u6280\u672F\u57FA\u77F3\u3002";
22007
- }
22008
- if (/\u7B97\u529B|\u5409\u74E6|\u5DE5\u5382|\u7535\u529B|\u82AF\u7247|\u57FA\u7840\u8BBE\u65BD|\u57FA\u5EFA|\u786C\u4EF6|\u80FD\u6E90/i.test(combined)) {
22009
- return "\u8FD9\u5176\u5B9E\u91CA\u653E\u4E86\u4E00\u4E2A\u975E\u5E38\u660E\u786E\u7684\u4FE1\u53F7\uFF1AAI\u7ADE\u4E89\u7684\u4E0B\u534A\u573A\uFF0C\u5DF2\u7ECF\u4E0D\u518D\u53EA\u662F\u5355\u7EAF\u62FC\u6A21\u578B\u53C2\u6570\uFF0C\u66F4\u662F\u7535\u529B\u3001\u80FD\u6E90\u548C\u5168\u6808\u5DE5\u4E1A\u57FA\u7840\u8BBE\u65BD\u7684\u786C\u6838\u8F83\u91CF\u3002";
22010
- }
22011
- if (/sora|\u89C6\u9891|\u751F\u6210|cameo|chatgpt/i.test(combined)) {
22012
- return "\u6211\u4E2A\u4EBA\u89C9\u5F97\uFF0C\u8FD9\u6B21\u6700\u5927\u7684\u770B\u70B9\u662F\u5185\u5BB9\u521B\u4F5C\u95E8\u69DB\u7684\u518D\u6B21\u964D\u4F4E\u3002\u4E0D\u8FC7\u6B63\u5982\u56E2\u961F\u63D0\u5230\u7684\uFF0C\u5982\u4F55\u5E73\u8861\u521B\u4F5C\u81EA\u7531\u4E0E\u9632\u6B62\u4F4E\u8D28\u5185\u5BB9\u6CDB\u6EE5\uFF0C\u4F1A\u662F\u6574\u4E2A\u884C\u4E1A\u63A5\u4E0B\u6765\u6700\u503C\u5F97\u89C2\u5BDF\u7684\u5173\u952E\u8003\u9898\u3002";
22013
- }
22014
- if (/\u878D\u8D44|\u6295\u8D44|\u5E02\u573A|\u5546\u4E1A|\u4F30\u503C|\u5408\u4F5C/i.test(combined)) {
22015
- return "\u8FD9\u9879\u8FDB\u5C55\u53CD\u6620\u51FA\u8D44\u672C\u4E0E\u4EA7\u4E1A\u754C\u6B63\u5728\u52A0\u901F\u5F62\u6210\u5408\u529B\uFF0C\u540E\u7EED\u5B9E\u9645\u4E1A\u52A1\u573A\u666F\u7684\u843D\u5730\u6548\u679C\u975E\u5E38\u503C\u5F97\u6211\u4EEC\u6301\u7EED\u8DDF\u8FDB\u3002";
22016
- }
22017
- return "\u8FD9\u9879\u65B0\u52A8\u6001\u53CD\u6620\u51FA\u6280\u672F\u6F14\u8FDB\u6B63\u5728\u8FDB\u4E00\u6B65\u63D0\u901F\uFF0C\u5BF9\u76F8\u5173\u9886\u57DF\u7684\u5B9E\u9645\u5F71\u54CD\u4E5F\u975E\u5E38\u503C\u5F97\u6211\u4EEC\u6301\u7EED\u5173\u6CE8\u3002";
21954
+ const line = isZh ? zhInsightFor(combined) : enInsightFor(combined);
21955
+ if (used.has(line))
21956
+ return null;
21957
+ used.add(line);
21958
+ return line;
21959
+ }
21960
+ function zhInsightFor(combined) {
21961
+ if (/jakub|szymon|\u9996\u5E2D\u79D1\u5B66\u5BB6|\u521B\u59CB\u56E2\u961F|\u6280\u672F\u9886\u8896|\u9EC4\u91D1\u642D\u6863/i.test(combined)) {
21962
+ return "\u5728\u5404\u79CD\u6280\u672F\u5149\u73AF\u80CC\u540E\uFF0C\u6B63\u662F\u8FD9\u6837\u4E13\u6CE8\u800C\u4E0D\u77E5\u75B2\u5026\u7684\u5E95\u5C42\u653B\u575A\u8005\uFF0C\u4E3A\u4ECA\u5929\u6574\u4E2A\u5927\u6A21\u578B\u751F\u6001\u5960\u5B9A\u4E86\u6700\u575A\u5B9E\u7684\u6280\u672F\u57FA\u77F3\u3002";
22018
21963
  }
21964
+ if (/\u7B97\u529B|\u5409\u74E6|\u7535\u529B|\u80FD\u6E90|\u6570\u636E\u4E2D\u5FC3|\u57FA\u7840\u8BBE\u65BD|\u57FA\u5EFA/.test(combined)) {
21965
+ return "\u8FD9\u5176\u5B9E\u91CA\u653E\u4E86\u4E00\u4E2A\u975E\u5E38\u660E\u786E\u7684\u4FE1\u53F7\uFF1AAI\u7ADE\u4E89\u7684\u4E0B\u534A\u573A\uFF0C\u5DF2\u7ECF\u4E0D\u518D\u53EA\u662F\u5355\u7EAF\u62FC\u6A21\u578B\u53C2\u6570\uFF0C\u66F4\u662F\u7535\u529B\u3001\u80FD\u6E90\u548C\u5168\u6808\u5DE5\u4E1A\u57FA\u7840\u8BBE\u65BD\u7684\u786C\u6838\u8F83\u91CF\u3002";
21966
+ }
21967
+ if (/\u82AF\u7247|\u786C\u4EF6|\u5904\u7406\u5668|enclave/i.test(combined)) {
21968
+ return "\u771F\u6B63\u88AB\u91CD\u65B0\u5B9A\u4E49\u7684\uFF0C\u662F\u786C\u4EF6\u5C42\u627F\u62C5\u7684\u5B89\u5168\u4E0E\u7B97\u529B\u8D23\u4EFB\uFF1A\u628A\u80FD\u529B\u505A\u8FDB\u7845\u7247\u5C42\u66F4\u53EF\u9760\u3001\u4E5F\u66F4\u96BE\u7ED5\u8FC7\uFF0C\u4F46\u751F\u6001\u9501\u5B9A\u7684\u4EE3\u4EF7\u9700\u8981\u4E00\u8D77\u7B97\u8FDB\u53BB\u3002";
21969
+ }
21970
+ if (/sora|\u89C6\u9891|\u751F\u6210\u89C6\u9891|\u89C6\u9891\u751F\u6210|\u6587\u751F\u89C6\u9891|\u5185\u5BB9\u521B\u4F5C|cameo/i.test(combined)) {
21971
+ return "\u6211\u4E2A\u4EBA\u89C9\u5F97\uFF0C\u8FD9\u6B21\u6700\u5927\u7684\u770B\u70B9\u662F\u5185\u5BB9\u521B\u4F5C\u95E8\u69DB\u7684\u518D\u6B21\u964D\u4F4E\u3002\u4E0D\u8FC7\u6B63\u5982\u56E2\u961F\u63D0\u5230\u7684\uFF0C\u5982\u4F55\u5E73\u8861\u521B\u4F5C\u81EA\u7531\u4E0E\u9632\u6B62\u4F4E\u8D28\u5185\u5BB9\u6CDB\u6EE5\uFF0C\u4F1A\u662F\u6574\u4E2A\u884C\u4E1A\u63A5\u4E0B\u6765\u6700\u503C\u5F97\u89C2\u5BDF\u7684\u5173\u952E\u8003\u9898\u3002";
21972
+ }
21973
+ if (/\u878D\u8D44|\u6295\u8D44|\u5E02\u573A|\u5546\u4E1A|\u4F30\u503C|\u5408\u4F5C/.test(combined)) {
21974
+ return "\u8FD9\u9879\u8FDB\u5C55\u53CD\u6620\u51FA\u8D44\u672C\u4E0E\u4EA7\u4E1A\u754C\u6B63\u5728\u52A0\u901F\u5F62\u6210\u5408\u529B\uFF0C\u540E\u7EED\u5B9E\u9645\u4E1A\u52A1\u573A\u666F\u7684\u843D\u5730\u6548\u679C\u975E\u5E38\u503C\u5F97\u6211\u4EEC\u6301\u7EED\u8DDF\u8FDB\u3002";
21975
+ }
21976
+ return "\u8FD9\u9879\u65B0\u52A8\u6001\u53CD\u6620\u51FA\u6280\u672F\u6F14\u8FDB\u6B63\u5728\u8FDB\u4E00\u6B65\u63D0\u901F\uFF0C\u5BF9\u76F8\u5173\u9886\u57DF\u7684\u5B9E\u9645\u5F71\u54CD\u4E5F\u975E\u5E38\u503C\u5F97\u6211\u4EEC\u6301\u7EED\u5173\u6CE8\u3002";
21977
+ }
21978
+ function enInsightFor(combined) {
22019
21979
  if (/jakub|szymon|chief scientist|founding team|technical leader|partnership/i.test(combined)) {
22020
21980
  return "Behind the headlines, it is relentless technical leadership and deep engineering rigor that continue to drive these foundational milestones.";
22021
21981
  }
22022
- if (/compute|gigawatt|factory|power|chip|infrastructure|datacenter/i.test(combined)) {
21982
+ if (/compute|gigawatt|power|energy|datacenter|infrastructure/.test(combined)) {
22023
21983
  return "This signals clearly that the AI frontier is no longer just about algorithms, but a massive contest of power, energy, and full-stack industrial engineering.";
22024
21984
  }
22025
- if (/sora|video|generation|cameo|chatgpt/i.test(combined)) {
21985
+ if (/chip|hardware|processor|enclave/i.test(combined)) {
21986
+ return "What stands out is the hardware layer quietly taking on the security and compute burden: putting the guarantee in silicon is harder to bypass, and it carries its own lock-in cost.";
21987
+ }
21988
+ if (/sora|video|video generation|content creation|cameo/i.test(combined)) {
22026
21989
  return "In my view, the biggest takeaway here is the dramatic lowering of creation barriers, while content quality governance will be the key test ahead.";
22027
21990
  }
22028
21991
  return "This development highlights how rapidly the ecosystem is moving from experimental proofs of concept into large-scale execution.";
22029
21992
  }
21993
+ var MAX_FACT_SEGMENT_CHARS = 300;
21994
+ var TITLE_ECHO_NOISE_RE = /[\uFF0C\u3002\u3001\uFF1A:\uFF1B;!\uFF01?\uFF1F\u2026\s\u300C\u300D\u300E\u300F\u3010\u3011]/g;
21995
+ function stripLeadingTitleEcho(body, title) {
21996
+ const wanted = title.replace(TITLE_ECHO_NOISE_RE, "");
21997
+ if (wanted.length < 4)
21998
+ return body;
21999
+ let matched = "";
22000
+ let end = -1;
22001
+ for (let i = 0;i < body.length && matched.length < wanted.length; i++) {
22002
+ const kept = (body[i] ?? "").replace(TITLE_ECHO_NOISE_RE, "");
22003
+ if (kept === "")
22004
+ continue;
22005
+ matched += kept;
22006
+ if (matched.length >= wanted.length)
22007
+ end = i + 1;
22008
+ }
22009
+ if (end === -1 || matched !== wanted)
22010
+ return body;
22011
+ return body.slice(end).replace(/^[\uFF0C\u3002\u3001\uFF1A:\uFF1B;!\uFF01?\uFF1F\u2026\s\u300C\u300D\u300E\u300F\u3010\u3011]+/, "");
22012
+ }
22013
+ function splitFactText(text, maxChars = MAX_FACT_SEGMENT_CHARS) {
22014
+ if (text.length <= maxChars)
22015
+ return [text];
22016
+ const clauses = text.match(/[^\u3002\uFF01\uFF1F\u2026\uFF1B]+[\u3002\uFF01\uFF1F\u2026\uFF1B]*|[\s\S]/g) ?? [text];
22017
+ const chunks = [];
22018
+ let current = "";
22019
+ for (const clause of clauses) {
22020
+ if (current !== "" && current.length + clause.length > maxChars) {
22021
+ chunks.push(current);
22022
+ current = clause;
22023
+ continue;
22024
+ }
22025
+ current += clause;
22026
+ }
22027
+ if (current !== "")
22028
+ chunks.push(current);
22029
+ return chunks.length > 0 ? chunks : [text];
22030
+ }
22030
22031
  function buildNewsVoiceScript(docs, options) {
22031
22032
  const language = exports_external.enum(["zh", "en"]).parse((options?.language || "zh").toLowerCase());
22032
22033
  const isZh = language === "zh";
@@ -22086,26 +22087,33 @@ function buildNewsVoiceScript(docs, options) {
22086
22087
  gap_ms: 700,
22087
22088
  emotion: "confident, warm"
22088
22089
  });
22090
+ const usedInsights = new Set;
22089
22091
  docs.forEach((doc2, idx) => {
22090
22092
  const isLast = idx === docs.length - 1 && docs.length > 1;
22091
22093
  const cleanTitle = (doc2.title ?? "").trim();
22092
- const cleanBody = (doc2.body ?? "").trim();
22094
+ const cleanBody = stripLeadingTitleEcho((doc2.body ?? "").trim(), cleanTitle);
22093
22095
  const lead = isZh ? idx === 0 ? `\u9996\u5148\u6765\u804A\u804A\u5927\u5BB6\u975E\u5E38\u5173\u6CE8\u7684\u3010${cleanTitle}\u3011\u3002` : isLast ? `\u6700\u540E\uFF0C\u6765\u770B\u770B\u4ECA\u5929\u7684\u6700\u540E\u4E00\u6761\u8D44\u8BAF\uFF0C\u3010${cleanTitle}\u3011\u3002` : `\u63A5\u7740\u6211\u4EEC\u628A\u76EE\u5149\u8F6C\u5411\u53E6\u4E00\u6761\u91CD\u8981\u8FDB\u5C55\uFF0C\u3010${cleanTitle}\u3011\u3002` : idx === 0 ? `First up today, let's look at ${cleanTitle}.` : isLast ? `And finally today, let's wrap up with ${cleanTitle}.` : `Next, turning our attention to ${cleanTitle}.`;
22094
22096
  const normalizedLead = normalizeBroadcastText(lead, isZh);
22095
- const normalizedBody = normalizeBroadcastText(cleanBody, isZh);
22096
- const insight = synthesizePersonalUnderstanding(cleanTitle, cleanBody, isZh);
22097
- const normalizedInsight = normalizeBroadcastText(insight, isZh);
22097
+ const normalizedBody = cleanBody === "" ? "" : normalizeBroadcastText(cleanBody, isZh);
22098
+ const insight = synthesizePersonalUnderstanding(cleanTitle, cleanBody, isZh, usedInsights);
22099
+ const normalizedInsight = insight === null ? null : normalizeBroadcastText(insight, isZh);
22098
22100
  const factText = isZh ? `${normalizedLead}${normalizedBody}` : `${normalizedLead} ${normalizedBody}`;
22099
- segments.push({
22100
- text: factText,
22101
- gap_ms: 500,
22102
- emotion: "professional, clear"
22103
- });
22104
- segments.push({
22105
- text: normalizedInsight,
22106
- gap_ms: 800,
22107
- emotion: "thoughtful, personal"
22108
- });
22101
+ for (const chunk of splitFactText(factText)) {
22102
+ segments.push({
22103
+ text: chunk,
22104
+ gap_ms: 500,
22105
+ emotion: "professional, clear",
22106
+ speed: 1
22107
+ });
22108
+ }
22109
+ if (normalizedInsight !== null) {
22110
+ segments.push({
22111
+ text: normalizedInsight,
22112
+ gap_ms: 1200,
22113
+ emotion: "thoughtful, personal",
22114
+ speed: 1.12
22115
+ });
22116
+ }
22109
22117
  });
22110
22118
  const outroText = isZh ? `\u597D\u4E86\uFF0C\u4EE5\u4E0A\u5C31\u662F\u4ECA\u5929AI\u79D1\u6280\u6F2B\u8C08\u7684\u5168\u90E8\u5185\u5BB9\u3002\u4E0D\u77E5\u9053\u4ECA\u5929\u8FD9\u51E0\u6761\u6D88\u606F\u6709\u6CA1\u6709\u7ED9\u60A8\u5E26\u6765\u4E00\u4E9B\u65B0\u7684\u542F\u53D1\uFF1F\u611F\u8C22\u60A8\u7684\u6536\u542C\uFF0C\u6211\u662F${hostName}\uFF0C\u795D\u60A8\u62E5\u6709\u5145\u5B9E\u9AD8\u6548\u7684\u4E00\u5929\uFF0C\u6211\u4EEC\u4E0B\u671F\u8282\u76EE\u4E0D\u89C1\u4E0D\u6563\uFF01` : `That wraps up today's AI Daily Briefing. I hope today's highlights gave you some useful takeaways. Thank you for listening. This is ${hostName}, wishing you a productive and wonderful day. Until next time!`;
22111
22119
  segments.push({
@@ -22216,6 +22224,9 @@ function formatVoiceScriptToYaml(script) {
22216
22224
  if (segment.gap_ms !== undefined) {
22217
22225
  lines.push(` gap_ms: ${segment.gap_ms}`);
22218
22226
  }
22227
+ if (segment.speed !== undefined) {
22228
+ lines.push(` speed: ${segment.speed}`);
22229
+ }
22219
22230
  if (segment.seed !== undefined) {
22220
22231
  lines.push(` seed: ${segment.seed}`);
22221
22232
  }
@@ -22330,6 +22341,8 @@ if (import.meta.main) {
22330
22341
  }
22331
22342
  export {
22332
22343
  synthesizePersonalUnderstanding,
22344
+ stripLeadingTitleEcho,
22345
+ splitFactText,
22333
22346
  processGeneratorIO,
22334
22347
  normalizeBroadcastText,
22335
22348
  main2 as main,
@@ -22340,5 +22353,6 @@ export {
22340
22353
  VoiceSpeakerSchema,
22341
22354
  VoiceScriptSegmentSchema,
22342
22355
  VoiceScriptSchema,
22356
+ MAX_FACT_SEGMENT_CHARS,
22343
22357
  EffectConfigSchema
22344
22358
  };