@gobing-ai/knowledge-kit 0.1.20 → 0.1.23

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 (149) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/board/collect/index.js +1 -0
  3. package/dist/board/daily-voice/index.js +1279 -261
  4. package/dist/board/itc/index.js +1 -0
  5. package/dist/index.js +13938 -8966
  6. package/package.json +1 -1
  7. package/plugins/generations/dailynews-gen/dist/index.js +285 -16
  8. package/plugins/generations/dailynews-gen/src/editorial-claims.ts +215 -0
  9. package/plugins/generations/dailynews-gen/src/index.ts +23 -4
  10. package/plugins/generations/dailynews-gen/src/script-builder.ts +10 -3
  11. package/plugins/generations/dailynews-gen/src/script-plan.ts +74 -14
  12. package/plugins/generations/gemini-tts/dist/index.js +47 -7
  13. package/plugins/generations/gemini-tts/src/gemini-client.ts +34 -6
  14. package/plugins/generations/music-gen/README.md +277 -0
  15. package/plugins/generations/music-gen/dist/index.js +23580 -0
  16. package/plugins/generations/music-gen/package.json +24 -0
  17. package/plugins/generations/music-gen/plugin.json +23 -0
  18. package/plugins/generations/music-gen/presets/SOURCE.md +39 -0
  19. package/plugins/generations/music-gen/presets/formats/clip.yaml +21 -0
  20. package/plugins/generations/music-gen/presets/formats/jingle.yaml +22 -0
  21. package/plugins/generations/music-gen/presets/formats/loop.yaml +21 -0
  22. package/plugins/generations/music-gen/presets/formats/song.yaml +36 -0
  23. package/plugins/generations/music-gen/presets/formats/underscore.yaml +22 -0
  24. package/plugins/generations/music-gen/presets/themes/ambient-tech.yaml +30 -0
  25. package/plugins/generations/music-gen/presets/themes/cinematic.yaml +30 -0
  26. package/plugins/generations/music-gen/presets/themes/lofi.yaml +30 -0
  27. package/plugins/generations/music-gen/presets/themes/synthwave.yaml +35 -0
  28. package/plugins/generations/music-gen/scripts/gen-preset-index.ts +181 -0
  29. package/plugins/generations/music-gen/scripts/resolve-preset.ts +64 -0
  30. package/plugins/generations/music-gen/src/adapter/index.ts +35 -0
  31. package/plugins/generations/music-gen/src/adapter/instance.ts +927 -0
  32. package/plugins/generations/music-gen/src/adapter/offline.ts +124 -0
  33. package/plugins/generations/music-gen/src/artifact.ts +223 -0
  34. package/plugins/generations/music-gen/src/audio/checks.ts +618 -0
  35. package/plugins/generations/music-gen/src/audio/master.ts +267 -0
  36. package/plugins/generations/music-gen/src/audio/measure.ts +507 -0
  37. package/plugins/generations/music-gen/src/audio/profile.ts +131 -0
  38. package/plugins/generations/music-gen/src/audio.ts +122 -0
  39. package/plugins/generations/music-gen/src/brief.ts +191 -0
  40. package/plugins/generations/music-gen/src/config.ts +451 -0
  41. package/plugins/generations/music-gen/src/content.ts +199 -0
  42. package/plugins/generations/music-gen/src/digest.ts +100 -0
  43. package/plugins/generations/music-gen/src/index.ts +147 -0
  44. package/plugins/generations/music-gen/src/job.ts +131 -0
  45. package/plugins/generations/music-gen/src/plugin.ts +371 -0
  46. package/plugins/generations/music-gen/src/presets.ts +951 -0
  47. package/plugins/generations/music-gen/src/render.ts +87 -0
  48. package/plugins/generations/music-gen/src/request.ts +102 -0
  49. package/plugins/generations/music-gen/src/spend.ts +495 -0
  50. package/plugins/generations/music-gen/tsconfig.json +8 -0
  51. package/plugins/generations/omni-voice-gen/uv.toml +5 -0
  52. package/plugins/generations/vibe-voice-tts/README.md +64 -0
  53. package/plugins/generations/vibe-voice-tts/dist/index.js +14259 -0
  54. package/plugins/generations/vibe-voice-tts/package.json +16 -0
  55. package/plugins/generations/vibe-voice-tts/plugin.json +6 -0
  56. package/plugins/generations/vibe-voice-tts/profiles.json +10 -0
  57. package/plugins/generations/vibe-voice-tts/pyproject.toml +9 -0
  58. package/plugins/generations/vibe-voice-tts/python/worker.py +566 -0
  59. package/plugins/generations/vibe-voice-tts/src/index.ts +88 -0
  60. package/plugins/generations/vibe-voice-tts/src/vibevoice-client.ts +828 -0
  61. package/plugins/generations/vibe-voice-tts/tsconfig.json +8 -0
  62. package/plugins/generations/vibe-voice-tts/uv.lock +1767 -0
  63. package/plugins/generations/vibe-voice-tts/uv.toml +4 -0
  64. package/plugins/generations/voice-gen/dist/index.js +31 -1
  65. package/plugins/generations/voice-gen/src/voicebox-client.ts +50 -1
  66. package/plugins/generations/voxcpm-tts/dist/index.js +81 -9
  67. package/plugins/generations/voxcpm-tts/python/worker.py +9 -0
  68. package/plugins/generations/voxcpm-tts/src/index.ts +41 -0
  69. package/plugins/generations/voxcpm-tts/src/voxcpm-client.ts +32 -11
  70. package/plugins/generations/voxcpm-tts/uv.toml +5 -0
  71. package/plugins/kk/README.md +21 -0
  72. package/plugins/kk/decisions/kk-safety.yaml +5 -2
  73. package/plugins/kk/plugin.json +1 -1
  74. package/plugins/kk/schedules/kk-serve.launchd.plist.tmpl +14 -2
  75. package/plugins/kk/scripts/cover-compositor.ts +380 -32
  76. package/plugins/kk/scripts/daily-cover-mock.ts +40 -3
  77. package/plugins/kk/scripts/daily-stages.ts +933 -60
  78. package/plugins/kk/scripts/episode-identity.ts +180 -0
  79. package/plugins/kk/scripts/kk-workflow-stages.ts +111 -12
  80. package/plugins/kk/scripts/music-stages.ts +624 -0
  81. package/plugins/kk/scripts/news-editorial-ledger.ts +906 -0
  82. package/plugins/kk/scripts/safety-artifact-check.ts +28 -5
  83. package/plugins/kk/scripts/source-citation.ts +187 -0
  84. package/plugins/kk/scripts/topic-selection-attempts.ts +446 -0
  85. package/plugins/kk/scripts/topic-selection-calibration.ts +161 -0
  86. package/plugins/kk/skills/content-judge/SKILL.md +11 -6
  87. package/plugins/kk/skills/content-judge/references/music-quality-rubric.md +147 -0
  88. package/plugins/kk/skills/content-judge/references/rubrics.md +15 -0
  89. package/plugins/kk/skills/content-safety/SKILL.md +12 -0
  90. package/plugins/kk/skills/music-authoring/SKILL.md +276 -0
  91. package/plugins/kk/skills/music-authoring/references/judge-input.md +117 -0
  92. package/plugins/kk/skills/news-editorial/SKILL.md +102 -15
  93. package/plugins/kk/skills/news-editorial/references/selection.md +4 -0
  94. package/plugins/kk/skills/news-editorial/references/style-contract.zh.md +58 -11
  95. package/plugins/kk/workflows/kk-daily-ai-voice.yaml +12 -11
  96. package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +13 -12
  97. package/plugins/kk/workflows/kk-daily-safety.yaml +12 -10
  98. package/plugins/kk/workflows/kk-music.yaml +332 -0
  99. package/plugins/kk/workflows/kk-news-generate.yaml +81 -6
  100. package/plugins/kk/workflows/kk-publish.yaml +4 -1
  101. package/plugins/publishings/bilibili-pub/dist/index.js +11 -1
  102. package/plugins/publishings/bilibili-pub/dist/profile-check.js +11 -1
  103. package/plugins/publishings/cnblogs-pub/dist/index.js +11 -1
  104. package/plugins/publishings/cnblogs-pub/dist/profile-check.js +11 -1
  105. package/plugins/publishings/csdn-pub/dist/index.js +11 -1
  106. package/plugins/publishings/csdn-pub/dist/profile-check.js +11 -1
  107. package/plugins/publishings/infoq-pub/dist/index.js +11 -1
  108. package/plugins/publishings/infoq-pub/dist/profile-check.js +11 -1
  109. package/plugins/publishings/jike-pub/dist/index.js +11 -1
  110. package/plugins/publishings/jike-pub/dist/profile-check.js +11 -1
  111. package/plugins/publishings/juejin-pub/dist/index.js +11 -1
  112. package/plugins/publishings/juejin-pub/dist/profile-check.js +11 -1
  113. package/plugins/publishings/linkedin-pub/dist/index.js +62 -10
  114. package/plugins/publishings/linkedin-pub/dist/profile-check.js +16 -1
  115. package/plugins/publishings/linkedin-pub/src/index.ts +99 -12
  116. package/plugins/publishings/podcast-pub/dist/index.js +586 -20
  117. package/plugins/publishings/podcast-pub/src/corrections.ts +509 -0
  118. package/plugins/publishings/podcast-pub/src/index.ts +257 -5
  119. package/plugins/publishings/podcast-pub/src/show-notes-brief.ts +240 -0
  120. package/plugins/publishings/podcast-pub/src/show-notes.ts +69 -13
  121. package/plugins/publishings/shipinhao-pub/dist/index.js +59 -8
  122. package/plugins/publishings/shipinhao-pub/dist/profile-check.js +11 -1
  123. package/plugins/publishings/shipinhao-pub/src/audio-flow.ts +105 -6
  124. package/plugins/publishings/sspai-pub/dist/index.js +11 -1
  125. package/plugins/publishings/sspai-pub/dist/profile-check.js +11 -1
  126. package/plugins/publishings/substack-pub/dist/index.js +11 -1
  127. package/plugins/publishings/substack-pub/dist/profile-check.js +11 -1
  128. package/plugins/publishings/surfdash-pub/dist/index.js +80 -24
  129. package/plugins/publishings/surfdash-pub/src/digest-check.ts +7 -3
  130. package/plugins/publishings/surfdash-pub/src/index.ts +107 -18
  131. package/plugins/publishings/surfdash-pub/src/patch.ts +21 -3
  132. package/plugins/publishings/surfdash-pub/src/topic-claims.ts +3 -1
  133. package/plugins/publishings/threads-pub/dist/index.js +58 -6
  134. package/plugins/publishings/threads-pub/dist/profile-check.js +18 -2
  135. package/plugins/publishings/threads-pub/src/post-rail.ts +101 -4
  136. package/plugins/publishings/wechatmp-pub/dist/index.js +105 -35
  137. package/plugins/publishings/wechatmp-pub/dist/profile-check.js +11 -1
  138. package/plugins/publishings/wechatmp-pub/src/cgi-draft.ts +87 -53
  139. package/plugins/publishings/wechatmp-pub/src/enrich.ts +61 -3
  140. package/plugins/publishings/wechatmp-pub/src/flow.ts +28 -0
  141. package/plugins/publishings/weibo-pub/dist/index.js +11 -1
  142. package/plugins/publishings/weibo-pub/dist/profile-check.js +11 -1
  143. package/plugins/publishings/x-pub/dist/index.js +95 -10
  144. package/plugins/publishings/x-pub/dist/profile-check.js +11 -1
  145. package/plugins/publishings/x-pub/src/post-rail.ts +154 -12
  146. package/plugins/publishings/xhs-pub/dist/index.js +11 -1
  147. package/plugins/publishings/xhs-pub/dist/profile-check.js +11 -1
  148. package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +11 -1
  149. package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +11 -1
@@ -0,0 +1,5 @@
1
+ # Hardlink wheels from the shared uv cache instead of copying them. Measured 2026-11-20: this
2
+ # env and voxcpm-tts's held 2.45 GiB with zero hardlinked bytes, so torch/scipy/llvmlite
3
+ # were stored twice on top of ~/.cache/uv/archive-v0. Hardlinks need both paths on one
4
+ # filesystem; override with UV_LINK_MODE=copy if the cache ever moves to another device.
5
+ link-mode = "hardlink"
@@ -0,0 +1,64 @@
1
+ # vibe-voice-tts
2
+
3
+ Standalone Microsoft VibeVoice generator plugin for [knowledge-kit](../../../README.md). A
4
+ TypeScript 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 PyPI `vibevoice==0.0.1` (ADR-055). Existing daily
7
+ defaults are unchanged: opt in with `vdriver: vibe-voice` / `vdriver: vibevoice` or
8
+ `kk news generate-voice --engine vibe-voice`.
9
+
10
+ `vendors/VibeVoice` is reference-only. No import, subprocess, dependency, cache, profile or model
11
+ path in this plugin may resolve into `vendors/` — every configured path is canonicalized and
12
+ refused, including symlinks and the Hugging Face / uv cache tiers.
13
+
14
+ ## Requirements
15
+
16
+ - `uv` on `PATH` (the worker is spawned as `uv run --project <plugin-root> --locked --no-dev`).
17
+ - Python 3.12 (`requires-python = "==3.12.*"`).
18
+ - `ffmpeg`/`ffprobe` only when `VOICE_GEN_MP3` requests an MP3 sibling.
19
+
20
+ ## Layout
21
+
22
+ | Path | Purpose |
23
+ | --- | --- |
24
+ | `plugin.json` | `kk` manifest (`kind: generator`, entry `./src/index.ts` → bundled `./dist/index.js`) |
25
+ | `src/index.ts` | `main(--in/--out` \| `--batch`) entry; injects adapter into `processGeneratorIO` and closes in `finally` |
26
+ | `src/vibevoice-client.ts` | registry/control/vendor-path validation + bounded NDJSON worker adapter (`kk:vibe-voice-tts`) |
27
+ | `python/worker.py` | private NDJSON worker: fd-1 isolation, `health`/`render`, one model load per invocation |
28
+ | `pyproject.toml` / `uv.lock` | independent uv project pinning `vibevoice==0.0.1` on Python 3.12 |
29
+ | `profiles.json` | frozen profile registry (`profiles` array; `robin-news` instruct placeholder) |
30
+
31
+ ## Setup
32
+
33
+ ```bash
34
+ uv lock --project plugins/generations/vibe-voice-tts
35
+ uv run --project plugins/generations/vibe-voice-tts --locked --no-dev python plugins/generations/vibe-voice-tts/python/worker.py
36
+ ```
37
+
38
+ ## Configuration (environment)
39
+
40
+ | Var | Default | Notes |
41
+ | --- | --- | --- |
42
+ | `VIBEVOICE_MODEL` | `microsoft/VibeVoice-1.5B` | Hub id or local snapshot directory (checked against vendor exclusion) |
43
+ | `VIBEVOICE_DEVICE` | `auto` | `auto`/`cpu`/`cuda`/`mps`; unavailable **requested** device fails without CPU fallback |
44
+ | `VIBEVOICE_PROFILES_PATH` | `<plugin-root>/profiles.json` | Profile registry (`reference`, `cached_prompt`, or single-segment `instruct`) |
45
+ | `VIBEVOICE_BATCH_MANIFEST` | unset | Path to JSON array of `{ in, out }` pairs for single-worker batch rendering |
46
+ | `VOICEBOX_TIMEOUT_MS` | `600000` | Worker startup and base per-segment render deadline in ms |
47
+ | `VOICE_GEN_MAX_RUN_MS` | unset | Positive value bounds the whole invocation (startup + every render) |
48
+ | `VOICE_GEN_MP3` | off | Request an MP3 sibling via ffmpeg |
49
+ | `VOICE_GEN_FAIL_ON_QC` | off | Fail generation when the QC audit fails |
50
+
51
+ ## Profiles
52
+
53
+ - `reference`: needs `reference_wav_path` (optional `cfg_scale`, default `1.5`; optional `ddpm_steps`, default `10`). Uses `VibeVoiceProcessor` + `VibeVoiceForConditionalGenerationInference` with `Speaker 1: <text>`.
54
+ - `cached_prompt`: needs `prompt_pt_path` (optional `cfg_scale`, default `1.5`; optional `ddpm_steps`, default `5`). Loaded with `torch.load(..., weights_only=True)` under `safe_globals([BaseModelOutputWithPast, DynamicCache])` against a streaming checkpoint + streaming processor.
55
+ - `instruct`: shipped placeholder for `robin-news`; carries no speaker reference, so multi-segment renders fail on segment > 1 to guarantee speaker consistency. Configure `VIBEVOICE_PROFILES_PATH` with a `reference` profile (e.g., `~/.config/kk/voices/robin-news.wav`) for episodes.
56
+ - Relative asset paths resolve against the registry directory; duplicate ids/names, mixed mode fields, serialized OmniVoice prompts, and `vendors/` paths are refused.
57
+
58
+ #### API/library claim sources and confidence
59
+
60
+ | Claim | Source | Local verification | Confidence |
61
+ | --- | --- | --- | --- |
62
+ | PyPI `vibevoice==0.0.1` (`vibevoice-0.0.1-py3-none-any.whl`) ships `vibevoice.modular.modeling_vibevoice_inference.VibeVoiceForConditionalGenerationInference` and `vibevoice.processor.vibevoice_processor.VibeVoiceProcessor`, while streaming inference modules are absent from the `0.0.1` wheel | https://pypi.org/pypi/vibevoice/0.0.1/json | Verified wheel SHA256 `fe42a8ee9adcd4fa87b2abd72be502f635bb847387e682b672022d7a9d606add` entries and `python/worker.py` `load_backend` | HIGH |
63
+ | `VibeVoiceProcessor` parses `Speaker <id>: <text>` scripts and accepts `voice_samples=[[reference_wav_path]]`, and `VibeVoiceForConditionalGenerationInference.generate` accepts `cfg_scale`, `tokenizer`, `generation_config`, and `set_ddpm_inference_steps` | `vibevoice==0.0.1` `demo/inference_from_file.py` and `vibevoice/processor/vibevoice_processor.py` | Inspected wheel contents (`demo/inference_from_file.py:319-351`, `vibevoice_processor.py:246-304`) and `python/worker.py` | HIGH |
64
+ | `VIBEVOICE_MODEL` defaults to `microsoft/VibeVoice-1.5B` and output audio writes 16-bit mono PCM WAV at `processor.audio_processor.sampling_rate` (default `24000`) | `plugins/generations/vibe-voice-tts/src/vibevoice-client.ts` & `python/worker.py` | Inspected `VIBEVOICE_DEFAULT_MODEL` in `src/vibevoice-client.ts` and `write_pcm16_wav` in `python/worker.py` | HIGH |