@gobing-ai/knowledge-kit 0.1.19 → 0.1.22
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 +1315 -264
- package/dist/board/itc/index.js +1 -0
- package/dist/index.js +14674 -8775
- 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/image-gen/README.md +31 -31
- package/plugins/generations/image-gen/assets/sample/provenance.json +314 -0
- package/plugins/generations/image-gen/config.example.yaml +3 -0
- package/plugins/generations/image-gen/dist/index.js +154 -14
- package/plugins/generations/image-gen/presets/SOURCE.md +65 -0
- package/plugins/generations/image-gen/scripts/eval-style-presets.ts +513 -0
- package/plugins/generations/image-gen/scripts/gen-samples.ts +57 -7
- package/plugins/generations/image-gen/src/presets.ts +6 -5
- package/plugins/generations/image-gen/src/providers/h3-local.ts +196 -0
- package/plugins/generations/image-gen/src/providers/types.ts +11 -1
- package/plugins/generations/music-gen/README.md +277 -0
- package/plugins/generations/music-gen/dist/index.js +23544 -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 +31 -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 +30 -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 +904 -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 +918 -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/kk/config.example.yaml +3 -0
- package/plugins/kk/decisions/extract/ai-news.yaml +5 -2
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/publish-presets/daily-ai-voice.json +48 -7
- package/plugins/kk/schedules/kk-serve.launchd.plist.tmpl +2 -1
- 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 +897 -34
- package/plugins/kk/scripts/episode-identity.ts +180 -0
- package/plugins/kk/scripts/kk-workflow-stages.ts +37 -1
- package/plugins/kk/scripts/music-stages.ts +624 -0
- package/plugins/kk/scripts/news-editorial-ledger.ts +906 -0
- 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/image-authoring/SKILL.md +7 -3
- package/plugins/kk/skills/image-authoring/references/providers.md +27 -0
- package/plugins/kk/skills/image-authoring/references/style-extraction.md +1 -1
- 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/skills/publish/SKILL.md +11 -0
- package/plugins/kk/skills/web-automation/SKILL.md +31 -1
- package/plugins/kk/workflows/kk-collect.yaml +8 -4
- package/plugins/kk/workflows/kk-daily-ai-voice.yaml +10 -9
- package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +11 -9
- package/plugins/kk/workflows/kk-music.yaml +328 -0
- package/plugins/kk/workflows/kk-news-generate.yaml +58 -3
- 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 +54 -7
- package/plugins/publishings/linkedin-pub/dist/profile-check.js +43 -6
- package/plugins/publishings/linkedin-pub/src/index.ts +52 -6
- 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 +437 -32
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +14 -2
- package/plugins/publishings/shipinhao-pub/plugin.json +1 -1
- package/plugins/publishings/shipinhao-pub/src/audio-flow.ts +492 -0
- package/plugins/publishings/shipinhao-pub/src/flow.ts +227 -12
- package/plugins/publishings/shipinhao-pub/src/selectors.ts +13 -0
- 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 +122 -28
- package/plugins/publishings/surfdash-pub/src/digest-check.ts +7 -3
- package/plugins/publishings/surfdash-pub/src/index.ts +159 -25
- package/plugins/publishings/surfdash-pub/src/topic-claims.ts +37 -4
- package/plugins/publishings/threads-pub/dist/index.js +9206 -296
- package/plugins/publishings/threads-pub/dist/profile-check.js +21149 -0
- package/plugins/publishings/threads-pub/package.json +3 -1
- package/plugins/publishings/threads-pub/plugin.json +6 -1
- package/plugins/publishings/threads-pub/src/index.ts +8 -1
- package/plugins/publishings/threads-pub/src/post-rail.ts +357 -0
- package/plugins/publishings/threads-pub/src/profile-check.ts +17 -0
- package/plugins/publishings/wechatmp-pub/dist/index.js +18 -1
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/wechatmp-pub/src/flow.ts +13 -0
- package/plugins/publishings/weibo-pub/dist/index.js +57 -3
- package/plugins/publishings/weibo-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/weibo-pub/src/index.ts +74 -2
- package/plugins/publishings/x-pub/dist/index.js +274 -44
- package/plugins/publishings/x-pub/dist/profile-check.js +14 -2
- package/plugins/publishings/x-pub/src/index.ts +15 -1
- package/plugins/publishings/x-pub/src/post-rail.ts +334 -0
- 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
|
@@ -11,7 +11,7 @@ import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'no
|
|
|
11
11
|
import { tmpdir } from 'node:os';
|
|
12
12
|
import { basename, dirname, join, resolve } from 'node:path';
|
|
13
13
|
import { parseArgs } from 'node:util';
|
|
14
|
-
import { COVER_HEIGHT, COVER_WIDTH, compositeCover } from './cover-compositor';
|
|
14
|
+
import { COVER_HEIGHT, COVER_WIDTH, compositeCover, writeCoverPreviews } from './cover-compositor';
|
|
15
15
|
|
|
16
16
|
interface MockOptions {
|
|
17
17
|
headline: string;
|
|
@@ -19,8 +19,17 @@ interface MockOptions {
|
|
|
19
19
|
out: string;
|
|
20
20
|
provider: string;
|
|
21
21
|
mockBg: boolean;
|
|
22
|
+
/** 0387 R1: when set, the inspectable crop/reference previews are written into this directory. */
|
|
23
|
+
previews: string;
|
|
22
24
|
}
|
|
23
25
|
|
|
26
|
+
/**
|
|
27
|
+
* 0387 R1 — the checked-in TRANSPARENT emblem used as the reference for the blend previews. The
|
|
28
|
+
* operator's banner is absent on the build machine, so verification fuses this fixture and the
|
|
29
|
+
* real reference comparison stays a separate operator check (never a fabricated banner).
|
|
30
|
+
*/
|
|
31
|
+
export const REFERENCE_LOGO_FIXTURE = join(import.meta.dir, '../tests/fixtures/alpha-logo.svg');
|
|
32
|
+
|
|
24
33
|
const MOCK_BG_SVG = `<?xml version="1.0" encoding="UTF-8"?>
|
|
25
34
|
<svg xmlns="http://www.w3.org/2000/svg" width="${COVER_WIDTH}" height="${COVER_HEIGHT}" viewBox="0 0 ${COVER_WIDTH} ${COVER_HEIGHT}">
|
|
26
35
|
<defs>
|
|
@@ -49,6 +58,7 @@ function parseMockArgs(args: string[]): MockOptions {
|
|
|
49
58
|
out: { type: 'string', default: '/tmp/kk-cover-mock.png' },
|
|
50
59
|
provider: { type: 'string', default: '' },
|
|
51
60
|
'mock-bg': { type: 'boolean', default: false },
|
|
61
|
+
previews: { type: 'string', default: '' },
|
|
52
62
|
},
|
|
53
63
|
strict: true,
|
|
54
64
|
});
|
|
@@ -58,6 +68,7 @@ function parseMockArgs(args: string[]): MockOptions {
|
|
|
58
68
|
out: resolve(values.out ?? ''),
|
|
59
69
|
provider: values.provider ?? '',
|
|
60
70
|
mockBg: values['mock-bg'] ?? false,
|
|
71
|
+
previews: values.previews ?? '',
|
|
61
72
|
};
|
|
62
73
|
}
|
|
63
74
|
|
|
@@ -123,7 +134,13 @@ function verifyOutput(outPath: string): { width: number; height: number } {
|
|
|
123
134
|
return { width, height };
|
|
124
135
|
}
|
|
125
136
|
|
|
126
|
-
export function runMock(args: string[]): {
|
|
137
|
+
export function runMock(args: string[]): {
|
|
138
|
+
out: string;
|
|
139
|
+
width: number;
|
|
140
|
+
height: number;
|
|
141
|
+
background: string;
|
|
142
|
+
previewDir: string;
|
|
143
|
+
} {
|
|
127
144
|
const options = parseMockArgs(args);
|
|
128
145
|
const parent = dirname(options.out);
|
|
129
146
|
if (!existsSync(parent)) {
|
|
@@ -149,10 +166,30 @@ export function runMock(args: string[]): { out: string; width: number; height: n
|
|
|
149
166
|
outputPath: options.out,
|
|
150
167
|
});
|
|
151
168
|
const { width, height } = verifyOutput(options.out);
|
|
169
|
+
// 0387 R1: the crop previews + reference blend are the verification artifacts — rendered
|
|
170
|
+
// from the SAME composite path, into an inspectable directory the operator can open.
|
|
171
|
+
if (options.previews !== '') {
|
|
172
|
+
const manifest = writeCoverPreviews({
|
|
173
|
+
backgroundImagePath: background,
|
|
174
|
+
headline: options.headline,
|
|
175
|
+
outputPath: options.out,
|
|
176
|
+
previewDir: options.previews,
|
|
177
|
+
referenceLogoPath: REFERENCE_LOGO_FIXTURE,
|
|
178
|
+
});
|
|
179
|
+
console.error(
|
|
180
|
+
`daily-cover-mock: previews ${manifest.coverPath} crops=${manifest.crops.map((crop) => `${crop.platform}:${crop.rect.width}x${crop.rect.height}`).join(',')} blend=${manifest.referenceBlendPath}`,
|
|
181
|
+
);
|
|
182
|
+
}
|
|
152
183
|
console.error(
|
|
153
184
|
`daily-cover-mock: composited ${options.out} (${width}x${height}, background=${options.mockBg ? 'mock' : options.provider || 'default'})`,
|
|
154
185
|
);
|
|
155
|
-
return {
|
|
186
|
+
return {
|
|
187
|
+
out: options.out,
|
|
188
|
+
width,
|
|
189
|
+
height,
|
|
190
|
+
background: options.mockBg ? 'mock' : 'live',
|
|
191
|
+
previewDir: options.previews === '' ? '' : resolve(options.previews),
|
|
192
|
+
};
|
|
156
193
|
} finally {
|
|
157
194
|
rmSync(tmp, { recursive: true, force: true });
|
|
158
195
|
}
|