@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
@@ -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
  }
@@ -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 |