@gobing-ai/knowledge-kit 0.0.34 → 0.0.36

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 (130) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/README.md +1 -1
  3. package/dist/board/collect/index.css +42 -0
  4. package/dist/board/collect/index.js +787 -0
  5. package/dist/board/daily-voice/index.css +13 -0
  6. package/dist/board/daily-voice/index.js +902 -0
  7. package/dist/board/itc/index.css +14 -0
  8. package/dist/board/itc/index.js +1026 -0
  9. package/dist/index.js +11769 -9250
  10. package/package.json +10 -9
  11. package/plugins/generations/content-gen/dist/index.js +1015 -10814
  12. package/plugins/generations/content-gen/package.json +1 -1
  13. package/plugins/generations/core-facts-gen/dist/index.js +1002 -10801
  14. package/plugins/generations/core-facts-gen/package.json +1 -1
  15. package/plugins/generations/daily-article-gen/dist/index.js +1019 -10804
  16. package/plugins/generations/daily-article-gen/package.json +1 -1
  17. package/plugins/generations/daily-article-gen/src/index.ts +32 -3
  18. package/plugins/generations/dailynews-gen/dist/index.js +1094 -10892
  19. package/plugins/generations/dailynews-gen/package.json +1 -1
  20. package/plugins/generations/dailynews-gen/src/script-builder.ts +6 -1
  21. package/plugins/generations/episode-plan-gen/dist/index.js +1124 -10923
  22. package/plugins/generations/episode-plan-gen/package.json +1 -1
  23. package/plugins/generations/gemini-tts/dist/index.js +1108 -10906
  24. package/plugins/generations/gemini-tts/package.json +1 -1
  25. package/plugins/generations/image-gen/dist/index.js +1239 -11035
  26. package/plugins/generations/image-gen/package.json +1 -1
  27. package/plugins/generations/news-report-gen/dist/index.js +1048 -10847
  28. package/plugins/generations/news-report-gen/package.json +1 -1
  29. package/plugins/generations/omni-voice-gen/plugin.json +1 -1
  30. package/plugins/generations/voice-gen/dist/index.js +1066 -10864
  31. package/plugins/generations/voice-gen/package.json +1 -1
  32. package/plugins/generations/voice-gen/src/index.ts +9 -3
  33. package/plugins/generations/voxcpm-tts/README.md +72 -0
  34. package/plugins/generations/voxcpm-tts/dist/index.js +14006 -0
  35. package/plugins/generations/voxcpm-tts/package.json +16 -0
  36. package/plugins/generations/voxcpm-tts/plugin.json +6 -0
  37. package/plugins/generations/voxcpm-tts/profiles.json +10 -0
  38. package/plugins/generations/voxcpm-tts/pyproject.toml +9 -0
  39. package/plugins/generations/voxcpm-tts/python/worker.py +353 -0
  40. package/plugins/generations/voxcpm-tts/src/index.ts +42 -0
  41. package/plugins/generations/voxcpm-tts/src/voxcpm-client.ts +765 -0
  42. package/plugins/generations/voxcpm-tts/tsconfig.json +8 -0
  43. package/plugins/generations/voxcpm-tts/uv.lock +2571 -0
  44. package/plugins/ingestions/aihot-ingest/dist/index.js +1081 -10628
  45. package/plugins/ingestions/aihot-ingest/package.json +1 -1
  46. package/plugins/ingestions/horizon-ingest/dist/index.js +1013 -10812
  47. package/plugins/ingestions/horizon-ingest/package.json +1 -1
  48. package/plugins/ingestions/karakeep-local/dist/index.js +689 -10774
  49. package/plugins/ingestions/karakeep-local/package.json +1 -1
  50. package/plugins/ingestions/last30days-ingest/dist/index.js +1011 -10810
  51. package/plugins/ingestions/last30days-ingest/package.json +1 -1
  52. package/plugins/ingestions/web-search/dist/index.js +1250 -11033
  53. package/plugins/ingestions/web-search/package.json +1 -1
  54. package/plugins/kk/README.md +29 -2
  55. package/plugins/kk/plugin.json +1 -1
  56. package/plugins/kk/schedules/cron.tmpl +9 -1
  57. package/plugins/kk/schedules/kk-serve.launchd.plist.tmpl +79 -0
  58. package/plugins/kk/schedules/launchd.plist.tmpl +11 -1
  59. package/plugins/kk/scripts/daily-stages.ts +702 -63
  60. package/plugins/kk/scripts/kk-workflow-stages.ts +116 -146
  61. package/plugins/kk/skills/content-safety/references/platforms/wechatmp.md +2 -2
  62. package/plugins/kk/skills/content-safety/references/platforms/xiaoyuzhou.md +4 -2
  63. package/plugins/kk/skills/publish/SKILL.md +8 -4
  64. package/plugins/kk/workflows/feature-verification.yaml +93 -0
  65. package/plugins/kk/workflows/judge-gated-publish-example.yaml +1 -0
  66. package/plugins/kk/workflows/kk-collect.yaml +43 -11
  67. package/plugins/kk/workflows/kk-daily-ai-voice.yaml +36 -9
  68. package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +92 -18
  69. package/plugins/kk/workflows/kk-daily-safety.yaml +16 -3
  70. package/plugins/kk/workflows/kk-itc.yaml +8 -1
  71. package/plugins/kk/workflows/kk-solo-podcast.yaml +2 -0
  72. package/plugins/publishings/emdash-pub/dist/index.js +987 -10814
  73. package/plugins/publishings/emdash-pub/package.json +1 -1
  74. package/plugins/publishings/infoq-pub/dist/index.js +1928 -11444
  75. package/plugins/publishings/infoq-pub/dist/profile-check.js +20814 -0
  76. package/plugins/publishings/infoq-pub/package.json +1 -1
  77. package/plugins/publishings/infoq-pub/plugin.json +6 -2
  78. package/plugins/publishings/juejin-pub/dist/index.js +1940 -11456
  79. package/plugins/publishings/juejin-pub/dist/profile-check.js +20800 -0
  80. package/plugins/publishings/juejin-pub/package.json +1 -1
  81. package/plugins/publishings/juejin-pub/plugin.json +6 -2
  82. package/plugins/publishings/medium-pub/dist/index.js +978 -10805
  83. package/plugins/publishings/medium-pub/package.json +1 -1
  84. package/plugins/publishings/podcast-pub/dist/index.js +1016 -10843
  85. package/plugins/publishings/podcast-pub/package.json +1 -1
  86. package/plugins/publishings/qiita-pub/dist/index.js +976 -10803
  87. package/plugins/publishings/qiita-pub/package.json +1 -1
  88. package/plugins/publishings/substack-pub/dist/index.js +1932 -11448
  89. package/plugins/publishings/substack-pub/dist/profile-check.js +20890 -0
  90. package/plugins/publishings/substack-pub/package.json +1 -1
  91. package/plugins/publishings/substack-pub/plugin.json +5 -2
  92. package/plugins/publishings/substack-pub/src/profile-check.ts +36 -3
  93. package/plugins/publishings/surfdash-pub/dist/index.js +1151 -10834
  94. package/plugins/publishings/surfdash-pub/package.json +1 -1
  95. package/plugins/publishings/surfdash-pub/src/index.ts +137 -15
  96. package/plugins/publishings/surfdash-pub/src/patch.ts +144 -0
  97. package/plugins/publishings/threads-pub/dist/index.js +12394 -0
  98. package/plugins/publishings/threads-pub/package.json +17 -0
  99. package/plugins/publishings/threads-pub/plugin.json +7 -0
  100. package/plugins/publishings/threads-pub/src/index.ts +340 -0
  101. package/plugins/publishings/threads-pub/tsconfig.json +4 -0
  102. package/plugins/publishings/wechatmp-pub/dist/index.js +2638 -11650
  103. package/plugins/publishings/wechatmp-pub/dist/profile-check.js +20739 -0
  104. package/plugins/publishings/wechatmp-pub/package.json +1 -1
  105. package/plugins/publishings/wechatmp-pub/plugin.json +6 -2
  106. package/plugins/publishings/wechatmp-pub/src/enrich.ts +297 -163
  107. package/plugins/publishings/wechatmp-pub/src/flow.ts +611 -54
  108. package/plugins/publishings/wechatmp-pub/src/index.ts +24 -3
  109. package/plugins/publishings/wechatmp-pub/src/page.ts +36 -0
  110. package/plugins/publishings/wechatmp-pub/src/profile-check.ts +40 -4
  111. package/plugins/publishings/weibo-pub/dist/index.js +21345 -0
  112. package/plugins/publishings/weibo-pub/dist/profile-check.js +20817 -0
  113. package/plugins/publishings/weibo-pub/package.json +19 -0
  114. package/plugins/publishings/weibo-pub/plugin.json +12 -0
  115. package/plugins/publishings/weibo-pub/src/index.ts +868 -0
  116. package/plugins/publishings/weibo-pub/src/profile-check.ts +20 -0
  117. package/plugins/publishings/weibo-pub/tsconfig.json +4 -0
  118. package/plugins/publishings/x-pub/dist/index.js +1948 -11440
  119. package/plugins/publishings/x-pub/dist/profile-check.js +20806 -0
  120. package/plugins/publishings/x-pub/package.json +1 -1
  121. package/plugins/publishings/x-pub/plugin.json +6 -2
  122. package/plugins/publishings/xhs-pub/dist/index.js +1993 -11509
  123. package/plugins/publishings/xhs-pub/dist/profile-check.js +21023 -0
  124. package/plugins/publishings/xhs-pub/package.json +1 -1
  125. package/plugins/publishings/xhs-pub/plugin.json +6 -2
  126. package/plugins/publishings/xhs-pub/src/profile-check.ts +72 -2
  127. package/plugins/publishings/zenn-pub/dist/index.js +988 -10815
  128. package/plugins/publishings/zenn-pub/package.json +1 -1
  129. package/plugins/generations/omni-voice-gen/dist/omni-voice-gen-prr8skpb. +0 -2
  130. package/plugins/generations/omni-voice-gen/dist/omni-voice-gen.js +0 -6
@@ -15,6 +15,6 @@
15
15
  "zod": "4.4.3"
16
16
  },
17
17
  "devDependencies": {
18
- "@types/bun": "1.3.14"
18
+ "@types/bun": "1.4.3"
19
19
  }
20
20
  }
@@ -212,7 +212,13 @@ export async function processGeneratorIO(
212
212
  let loudnessDip = false;
213
213
  let lastError: unknown;
214
214
  let attemptBody = generateBody;
215
- for (let verifyAttempt = 0; verifyAttempt <= 2 && wavBytes === undefined; verifyAttempt++) {
215
+ // Verify-retry budget. Hosted TTS is billed per request against a daily quota
216
+ // (Gemini Tier 1: 100/day), and each retry is a full re-synthesis — a 41-segment
217
+ // episode with the default 2 retries asks for up to 123 requests and dies partway
218
+ // through the render with no audio (daily-generate failures of 2026-10-06/07/09/10).
219
+ // Lower it for a quota-bound driver; 0 keeps the dip/fidelity result for QC instead.
220
+ const maxVerifyAttempts = Number.parseInt(process.env.VOICEBOX_MAX_VERIFY_ATTEMPTS ?? '2', 10) || 0;
221
+ for (let verifyAttempt = 0; verifyAttempt <= maxVerifyAttempts && wavBytes === undefined; verifyAttempt++) {
216
222
  if (verifyAttempt > 0) {
217
223
  verifyRetries = verifyAttempt;
218
224
  const chunkChars = Math.max(VOICEBOX_CHUNK_CHARS_MIN, Math.floor(attemptBody.max_chunk_chars / 2));
@@ -262,7 +268,7 @@ export async function processGeneratorIO(
262
268
  try {
263
269
  const trans = await client.transcribe(attemptBytes, language);
264
270
  const fidelity = transcriptionFidelity(segment.text, trans.text);
265
- if (fidelity < TRANSCRIPTION_FIDELITY_FLOOR && verifyAttempt < 2) {
271
+ if (fidelity < TRANSCRIPTION_FIDELITY_FLOOR && verifyAttempt < maxVerifyAttempts) {
266
272
  echoError(
267
273
  `voice-gen: transcription fidelity ${fidelity.toFixed(2)} below ${TRANSCRIPTION_FIDELITY_FLOOR} (looped/garbage audio): "${trans.text.slice(0, 80)}..."`,
268
274
  );
@@ -278,7 +284,7 @@ export async function processGeneratorIO(
278
284
  // (dogfood 2026-09-08 A/B: same text regenerated clean, so retry usually clears).
279
285
  const dip = detectLoudnessDip(attemptBytes);
280
286
  loudnessDip = dip.dip;
281
- if (dip.dip && verifyAttempt < 2) {
287
+ if (dip.dip && verifyAttempt < maxVerifyAttempts) {
282
288
  echoError(`voice-gen: loudness dip detected at ${dip.dipAtSec ?? '?'}s — regenerating segment`);
283
289
  continue;
284
290
  }
@@ -0,0 +1,72 @@
1
+ # voxcpm-tts
2
+
3
+ Standalone VoxCPM voice generator plugin for [knowledge-kit](../../../README.md). A TypeScript
4
+ generator that reuses **voice-gen's** pipeline (VoiceScript parsing, gaps, speed, WAV
5
+ concatenation, QC, optional MP3) behind the existing `VoiceboxClient` contract, backed by a
6
+ private **uv-managed Python worker** that runs `voxcpm==2.0.3` (ADR-036). The default daily
7
+ drivers are unchanged: opt in with `vdriver: voxcpm` (wired by task 0257).
8
+
9
+ `vendors/VoxCPM` is reference-only. No import, subprocess, dependency, cache, profile or model
10
+ path in this plugin may resolve into `vendors/` — every configured path is canonicalized and
11
+ refused, including symlinks and the Hugging Face cache tiers.
12
+
13
+ ## Requirements
14
+
15
+ - `uv` on `PATH` (the worker is spawned as `uv run --project <plugin-root> --locked --no-dev`).
16
+ - Python 3.12 (the frozen interpreter; `uv` provisions it from the lock).
17
+ - `ffmpeg`/`ffprobe` only when `VOICE_GEN_MP3` requests an MP3 sibling.
18
+
19
+ ## Layout
20
+
21
+ | Path | Purpose |
22
+ | --- | --- |
23
+ | `plugin.json` | `kk` manifest (`kind: generator`, entry `./src/index.ts` → bundled `./dist/index.js`) |
24
+ | `src/index.ts` | `main(--in/--out)` entry; injects the adapter into `processGeneratorIO` and closes it in `finally` |
25
+ | `src/voxcpm-client.ts` | registry/control/path validation + the bounded NDJSON worker adapter |
26
+ | `python/worker.py` | private NDJSON worker: health/render, one model load per invocation |
27
+ | `pyproject.toml` / `uv.lock` | independent uv project pinning `voxcpm==2.0.3` on Python 3.12 |
28
+ | `profiles.json` | frozen profile registry (`profiles` array; `robin-news` instruct profile) |
29
+
30
+ ## Setup
31
+
32
+ ```bash
33
+ uv lock --project plugins/generations/voxcpm-tts # regenerate after editing pyproject.toml
34
+ uv run --project plugins/generations/voxcpm-tts --locked --no-dev python plugins/generations/voxcpm-tts/python/worker.py
35
+ ```
36
+
37
+ Step 0 (before live use) is the installed-import/API probe: confirm the locked `voxcpm==2.0.3`
38
+ imports and exposes the expected signature. Source inspection does not prove hardware viability;
39
+ that evidence belongs to task 0258.
40
+
41
+ ## Configuration (environment)
42
+
43
+ | Var | Default | Notes |
44
+ | --- | --- | --- |
45
+ | `VOXCPM_MODEL` | `openbmb/VoxCPM2` | Hub id or a local snapshot directory. Hub models use the normal external cache; local paths pass canonical vendor exclusion |
46
+ | `VOXCPM_DEVICE` | `auto` | `auto`/`cpu`/`cuda`/`mps`; an unavailable **requested** device fails |
47
+ | `VOXCPM_PROFILES_PATH` | `<plugin-root>/profiles.json` | Profile registry |
48
+ | `VOICEBOX_TIMEOUT_MS` | `600000` | Worker startup bound (shared with voice-gen) |
49
+ | `VOICE_GEN_MAX_RUN_MS` | unset | Positive value bounds the whole invocation (startup + every render) |
50
+ | `VOICE_GEN_MP3` | off | Request an MP3 sibling via ffmpeg |
51
+ | `VOICE_GEN_FAIL_ON_QC` | off | Fail generation when the QC audit fails |
52
+
53
+ ## Profiles
54
+
55
+ ```json
56
+ { "profiles": [ { "id": "robin-news", "name": "robin-news", "mode": "instruct", "instruct": "清晰、自然、沉稳的中文新闻播报,语速适中。" } ] }
57
+ ```
58
+
59
+ - `instruct`: needs a nonempty `instruct`; a per-request `instruct` overrides it.
60
+ - `reference`: needs `reference_wav_path`.
61
+ - `continuation`: needs `prompt_wav_path` + `prompt_text` together.
62
+ - Relative assets resolve against the registry directory; serialized OmniVoice prompts, duplicate
63
+ ids/names, mixed mode fields and vendor paths are refused.
64
+
65
+ ## Control policy
66
+
67
+ `normalize` maps directly; an explicit `seed` calls `torch.manual_seed` before synthesis (the
68
+ 2.0.3 API has no `seed`/`instruct` keyword); `language` is automatic multilingual inference with
69
+ an advisory diagnostic; `max_chunk_chars`/`crossfade_ms` are advisory (one warning per invocation)
70
+ — the shared VoiceScript segmentation remains the request boundary. A per-request `engine`,
71
+ `personality=true` or an active `effects_chain` is rejected. Speed stays in shared postprocessing.
72
+ Transcription is omitted, so ASR-dependent QC is reported unavailable (not passing evidence).