@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.
- package/.claude-plugin/marketplace.json +1 -1
- package/dist/board/collect/index.js +1 -0
- package/dist/board/daily-voice/index.js +1279 -261
- package/dist/board/itc/index.js +1 -0
- package/dist/index.js +13938 -8966
- package/package.json +1 -1
- package/plugins/generations/dailynews-gen/dist/index.js +285 -16
- package/plugins/generations/dailynews-gen/src/editorial-claims.ts +215 -0
- package/plugins/generations/dailynews-gen/src/index.ts +23 -4
- package/plugins/generations/dailynews-gen/src/script-builder.ts +10 -3
- package/plugins/generations/dailynews-gen/src/script-plan.ts +74 -14
- package/plugins/generations/gemini-tts/dist/index.js +47 -7
- package/plugins/generations/gemini-tts/src/gemini-client.ts +34 -6
- package/plugins/generations/music-gen/README.md +277 -0
- package/plugins/generations/music-gen/dist/index.js +23580 -0
- package/plugins/generations/music-gen/package.json +24 -0
- package/plugins/generations/music-gen/plugin.json +23 -0
- package/plugins/generations/music-gen/presets/SOURCE.md +39 -0
- package/plugins/generations/music-gen/presets/formats/clip.yaml +21 -0
- package/plugins/generations/music-gen/presets/formats/jingle.yaml +22 -0
- package/plugins/generations/music-gen/presets/formats/loop.yaml +21 -0
- package/plugins/generations/music-gen/presets/formats/song.yaml +36 -0
- package/plugins/generations/music-gen/presets/formats/underscore.yaml +22 -0
- package/plugins/generations/music-gen/presets/themes/ambient-tech.yaml +30 -0
- package/plugins/generations/music-gen/presets/themes/cinematic.yaml +30 -0
- package/plugins/generations/music-gen/presets/themes/lofi.yaml +30 -0
- package/plugins/generations/music-gen/presets/themes/synthwave.yaml +35 -0
- package/plugins/generations/music-gen/scripts/gen-preset-index.ts +181 -0
- package/plugins/generations/music-gen/scripts/resolve-preset.ts +64 -0
- package/plugins/generations/music-gen/src/adapter/index.ts +35 -0
- package/plugins/generations/music-gen/src/adapter/instance.ts +927 -0
- package/plugins/generations/music-gen/src/adapter/offline.ts +124 -0
- package/plugins/generations/music-gen/src/artifact.ts +223 -0
- package/plugins/generations/music-gen/src/audio/checks.ts +618 -0
- package/plugins/generations/music-gen/src/audio/master.ts +267 -0
- package/plugins/generations/music-gen/src/audio/measure.ts +507 -0
- package/plugins/generations/music-gen/src/audio/profile.ts +131 -0
- package/plugins/generations/music-gen/src/audio.ts +122 -0
- package/plugins/generations/music-gen/src/brief.ts +191 -0
- package/plugins/generations/music-gen/src/config.ts +451 -0
- package/plugins/generations/music-gen/src/content.ts +199 -0
- package/plugins/generations/music-gen/src/digest.ts +100 -0
- package/plugins/generations/music-gen/src/index.ts +147 -0
- package/plugins/generations/music-gen/src/job.ts +131 -0
- package/plugins/generations/music-gen/src/plugin.ts +371 -0
- package/plugins/generations/music-gen/src/presets.ts +951 -0
- package/plugins/generations/music-gen/src/render.ts +87 -0
- package/plugins/generations/music-gen/src/request.ts +102 -0
- package/plugins/generations/music-gen/src/spend.ts +495 -0
- package/plugins/generations/music-gen/tsconfig.json +8 -0
- package/plugins/generations/omni-voice-gen/uv.toml +5 -0
- package/plugins/generations/vibe-voice-tts/README.md +64 -0
- package/plugins/generations/vibe-voice-tts/dist/index.js +14259 -0
- package/plugins/generations/vibe-voice-tts/package.json +16 -0
- package/plugins/generations/vibe-voice-tts/plugin.json +6 -0
- package/plugins/generations/vibe-voice-tts/profiles.json +10 -0
- package/plugins/generations/vibe-voice-tts/pyproject.toml +9 -0
- package/plugins/generations/vibe-voice-tts/python/worker.py +566 -0
- package/plugins/generations/vibe-voice-tts/src/index.ts +88 -0
- package/plugins/generations/vibe-voice-tts/src/vibevoice-client.ts +828 -0
- package/plugins/generations/vibe-voice-tts/tsconfig.json +8 -0
- package/plugins/generations/vibe-voice-tts/uv.lock +1767 -0
- package/plugins/generations/vibe-voice-tts/uv.toml +4 -0
- package/plugins/generations/voice-gen/dist/index.js +31 -1
- package/plugins/generations/voice-gen/src/voicebox-client.ts +50 -1
- package/plugins/generations/voxcpm-tts/dist/index.js +81 -9
- package/plugins/generations/voxcpm-tts/python/worker.py +9 -0
- package/plugins/generations/voxcpm-tts/src/index.ts +41 -0
- package/plugins/generations/voxcpm-tts/src/voxcpm-client.ts +32 -11
- package/plugins/generations/voxcpm-tts/uv.toml +5 -0
- package/plugins/kk/README.md +21 -0
- package/plugins/kk/decisions/kk-safety.yaml +5 -2
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/schedules/kk-serve.launchd.plist.tmpl +14 -2
- package/plugins/kk/scripts/cover-compositor.ts +380 -32
- package/plugins/kk/scripts/daily-cover-mock.ts +40 -3
- package/plugins/kk/scripts/daily-stages.ts +933 -60
- package/plugins/kk/scripts/episode-identity.ts +180 -0
- package/plugins/kk/scripts/kk-workflow-stages.ts +111 -12
- package/plugins/kk/scripts/music-stages.ts +624 -0
- package/plugins/kk/scripts/news-editorial-ledger.ts +906 -0
- package/plugins/kk/scripts/safety-artifact-check.ts +28 -5
- package/plugins/kk/scripts/source-citation.ts +187 -0
- package/plugins/kk/scripts/topic-selection-attempts.ts +446 -0
- package/plugins/kk/scripts/topic-selection-calibration.ts +161 -0
- package/plugins/kk/skills/content-judge/SKILL.md +11 -6
- package/plugins/kk/skills/content-judge/references/music-quality-rubric.md +147 -0
- package/plugins/kk/skills/content-judge/references/rubrics.md +15 -0
- package/plugins/kk/skills/content-safety/SKILL.md +12 -0
- package/plugins/kk/skills/music-authoring/SKILL.md +276 -0
- package/plugins/kk/skills/music-authoring/references/judge-input.md +117 -0
- package/plugins/kk/skills/news-editorial/SKILL.md +102 -15
- package/plugins/kk/skills/news-editorial/references/selection.md +4 -0
- package/plugins/kk/skills/news-editorial/references/style-contract.zh.md +58 -11
- package/plugins/kk/workflows/kk-daily-ai-voice.yaml +12 -11
- package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +13 -12
- package/plugins/kk/workflows/kk-daily-safety.yaml +12 -10
- package/plugins/kk/workflows/kk-music.yaml +332 -0
- package/plugins/kk/workflows/kk-news-generate.yaml +81 -6
- package/plugins/kk/workflows/kk-publish.yaml +4 -1
- package/plugins/publishings/bilibili-pub/dist/index.js +11 -1
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/cnblogs-pub/dist/index.js +11 -1
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/csdn-pub/dist/index.js +11 -1
- package/plugins/publishings/csdn-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/infoq-pub/dist/index.js +11 -1
- package/plugins/publishings/infoq-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/jike-pub/dist/index.js +11 -1
- package/plugins/publishings/jike-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/juejin-pub/dist/index.js +11 -1
- package/plugins/publishings/juejin-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/linkedin-pub/dist/index.js +62 -10
- package/plugins/publishings/linkedin-pub/dist/profile-check.js +16 -1
- package/plugins/publishings/linkedin-pub/src/index.ts +99 -12
- package/plugins/publishings/podcast-pub/dist/index.js +586 -20
- package/plugins/publishings/podcast-pub/src/corrections.ts +509 -0
- package/plugins/publishings/podcast-pub/src/index.ts +257 -5
- package/plugins/publishings/podcast-pub/src/show-notes-brief.ts +240 -0
- package/plugins/publishings/podcast-pub/src/show-notes.ts +69 -13
- package/plugins/publishings/shipinhao-pub/dist/index.js +59 -8
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/shipinhao-pub/src/audio-flow.ts +105 -6
- package/plugins/publishings/sspai-pub/dist/index.js +11 -1
- package/plugins/publishings/sspai-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/substack-pub/dist/index.js +11 -1
- package/plugins/publishings/substack-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/surfdash-pub/dist/index.js +80 -24
- package/plugins/publishings/surfdash-pub/src/digest-check.ts +7 -3
- package/plugins/publishings/surfdash-pub/src/index.ts +107 -18
- package/plugins/publishings/surfdash-pub/src/patch.ts +21 -3
- package/plugins/publishings/surfdash-pub/src/topic-claims.ts +3 -1
- package/plugins/publishings/threads-pub/dist/index.js +58 -6
- package/plugins/publishings/threads-pub/dist/profile-check.js +18 -2
- package/plugins/publishings/threads-pub/src/post-rail.ts +101 -4
- package/plugins/publishings/wechatmp-pub/dist/index.js +105 -35
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/wechatmp-pub/src/cgi-draft.ts +87 -53
- package/plugins/publishings/wechatmp-pub/src/enrich.ts +61 -3
- package/plugins/publishings/wechatmp-pub/src/flow.ts +28 -0
- package/plugins/publishings/weibo-pub/dist/index.js +11 -1
- package/plugins/publishings/weibo-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/x-pub/dist/index.js +95 -10
- package/plugins/publishings/x-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/x-pub/src/post-rail.ts +154 -12
- package/plugins/publishings/xhs-pub/dist/index.js +11 -1
- package/plugins/publishings/xhs-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +11 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +11 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { parseArgs } from 'node:util';
|
|
2
|
+
import { echoError } from '@gobing-ai/ts-utils';
|
|
3
|
+
import { processGeneratorIO } from '@gobing-ai/voice-gen';
|
|
4
|
+
import { createVibeVoiceClient, VIBEVOICE_TTS_GENERATOR, type VibeVoiceClientOptions } from './vibevoice-client';
|
|
5
|
+
|
|
6
|
+
export * from './vibevoice-client';
|
|
7
|
+
|
|
8
|
+
interface BatchManifestEntry {
|
|
9
|
+
in: string;
|
|
10
|
+
out: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* `kk` plugin entry: render Doc[] into audio Content through the shared voice-gen pipeline,
|
|
15
|
+
* injecting the invocation-scoped VibeVoice adapter and closing it (worker, signals, scratch) in
|
|
16
|
+
* `finally`. The worker stays lazy until `health()` runs after shared Doc validation, so empty
|
|
17
|
+
* input starts nothing (R5/R6).
|
|
18
|
+
*
|
|
19
|
+
* When `VIBEVOICE_BATCH_MANIFEST` (or `--batch <path>`) is set, renders every `{ in, out }` entry
|
|
20
|
+
* sequentially against one shared worker handle so the model loads at most once per episode.
|
|
21
|
+
*/
|
|
22
|
+
export async function main(
|
|
23
|
+
argv: string[] = process.argv.slice(2),
|
|
24
|
+
options: VibeVoiceClientOptions = {},
|
|
25
|
+
): Promise<number> {
|
|
26
|
+
const { values } = parseArgs({
|
|
27
|
+
args: argv,
|
|
28
|
+
options: {
|
|
29
|
+
in: { type: 'string' },
|
|
30
|
+
out: { type: 'string' },
|
|
31
|
+
batch: { type: 'string' },
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const env = options.env ?? (process.env as Record<string, string | undefined>);
|
|
36
|
+
const batchPath = values.batch ?? env.VIBEVOICE_BATCH_MANIFEST;
|
|
37
|
+
|
|
38
|
+
if (batchPath) {
|
|
39
|
+
let entries: BatchManifestEntry[];
|
|
40
|
+
try {
|
|
41
|
+
const parsed = JSON.parse(await Bun.file(batchPath).text()) as unknown;
|
|
42
|
+
if (
|
|
43
|
+
!Array.isArray(parsed) ||
|
|
44
|
+
parsed.some((e) => !e || typeof e !== 'object' || typeof e.in !== 'string' || typeof e.out !== 'string')
|
|
45
|
+
) {
|
|
46
|
+
throw new Error('batch manifest must be an array of { in, out } string pairs');
|
|
47
|
+
}
|
|
48
|
+
entries = parsed as BatchManifestEntry[];
|
|
49
|
+
} catch (err: unknown) {
|
|
50
|
+
echoError(
|
|
51
|
+
`vibe-voice-tts failed: invalid batch manifest: ${err instanceof Error ? err.message : String(err)}`,
|
|
52
|
+
);
|
|
53
|
+
return 1;
|
|
54
|
+
}
|
|
55
|
+
const handle = createVibeVoiceClient(options);
|
|
56
|
+
try {
|
|
57
|
+
for (const entry of entries) {
|
|
58
|
+
await processGeneratorIO(entry.in, entry.out, handle.client, undefined, VIBEVOICE_TTS_GENERATOR);
|
|
59
|
+
}
|
|
60
|
+
return 0;
|
|
61
|
+
} catch (err: unknown) {
|
|
62
|
+
echoError(`vibe-voice-tts failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
63
|
+
return 1;
|
|
64
|
+
} finally {
|
|
65
|
+
await handle.close();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (!values.in || !values.out) {
|
|
70
|
+
echoError('vibe-voice-tts failed: Missing required arguments: --in and --out');
|
|
71
|
+
return 1;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const handle = createVibeVoiceClient(options);
|
|
75
|
+
try {
|
|
76
|
+
await processGeneratorIO(values.in, values.out, handle.client, undefined, VIBEVOICE_TTS_GENERATOR);
|
|
77
|
+
return 0;
|
|
78
|
+
} catch (err: unknown) {
|
|
79
|
+
echoError(`vibe-voice-tts failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
80
|
+
return 1;
|
|
81
|
+
} finally {
|
|
82
|
+
await handle.close();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (import.meta.main) {
|
|
87
|
+
process.exit(await main());
|
|
88
|
+
}
|