@gobing-ai/knowledge-kit 0.1.9 → 0.1.11
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/index.js +132 -25
- package/package.json +1 -1
- package/plugins/generations/content-gen/dist/index.js +4 -0
- package/plugins/generations/core-facts-gen/dist/index.js +4 -0
- package/plugins/generations/daily-article-gen/dist/index.js +4 -0
- package/plugins/generations/dailynews-gen/dist/index.js +4 -0
- package/plugins/generations/episode-plan-gen/dist/index.js +102 -1
- package/plugins/generations/episode-plan-gen/src/index.ts +2 -4
- package/plugins/generations/gemini-tts/dist/index.js +4 -0
- package/plugins/generations/image-gen/dist/index.js +4 -0
- package/plugins/generations/news-report-gen/dist/index.js +4 -0
- package/plugins/generations/voice-gen/dist/index.js +4 -0
- package/plugins/generations/voxcpm-tts/dist/index.js +4 -0
- package/plugins/ingestions/aihot-ingest/dist/index.js +4 -0
- package/plugins/ingestions/horizon-ingest/dist/index.js +4 -0
- package/plugins/ingestions/last30days-ingest/dist/index.js +11 -3
- package/plugins/ingestions/last30days-ingest/src/index.ts +14 -3
- package/plugins/ingestions/web-search/dist/index.js +4 -0
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/scripts/daily-scheduled-run.ts +298 -0
- package/plugins/kk/scripts/daily-stages.ts +1083 -49
- package/plugins/kk/scripts/kk-workflow-stages.ts +76 -10
- package/plugins/kk/scripts/safety-artifact-check.ts +235 -0
- package/plugins/kk/scripts/sentences.ts +134 -0
- package/plugins/kk/scripts/series-names.ts +124 -0
- package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +194 -113
- package/plugins/kk/workflows/kk-daily-safety.yaml +160 -36
- package/plugins/publishings/bilibili-pub/dist/index.js +6 -1
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +2 -1
- package/plugins/publishings/cnblogs-pub/dist/index.js +6 -1
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +2 -1
- package/plugins/publishings/csdn-pub/dist/index.js +6 -1
- package/plugins/publishings/csdn-pub/dist/profile-check.js +6 -1
- package/plugins/publishings/emdash-pub/dist/index.js +4 -0
- package/plugins/publishings/infoq-pub/dist/index.js +6 -1
- package/plugins/publishings/infoq-pub/dist/profile-check.js +6 -1
- package/plugins/publishings/jike-pub/dist/index.js +6 -1
- package/plugins/publishings/jike-pub/dist/profile-check.js +6 -1
- package/plugins/publishings/juejin-pub/dist/index.js +6 -1
- package/plugins/publishings/juejin-pub/dist/profile-check.js +6 -1
- package/plugins/publishings/medium-pub/dist/index.js +4 -0
- package/plugins/publishings/podcast-pub/dist/index.js +151 -16
- package/plugins/publishings/podcast-pub/src/index.ts +62 -5
- package/plugins/publishings/podcast-pub/src/seo.ts +2 -4
- package/plugins/publishings/podcast-pub/src/show-notes.ts +3 -8
- package/plugins/publishings/qiita-pub/dist/index.js +4 -0
- package/plugins/publishings/shipinhao-pub/dist/index.js +6 -1
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +2 -1
- package/plugins/publishings/sspai-pub/dist/index.js +6 -1
- package/plugins/publishings/sspai-pub/dist/profile-check.js +2 -1
- package/plugins/publishings/substack-pub/dist/index.js +6 -1
- package/plugins/publishings/substack-pub/dist/profile-check.js +6 -1
- package/plugins/publishings/surfdash-pub/dist/index.js +691 -63
- package/plugins/publishings/surfdash-pub/src/digest-check.ts +284 -0
- package/plugins/publishings/surfdash-pub/src/index.ts +656 -84
- package/plugins/publishings/surfdash-pub/src/patch.ts +44 -7
- package/plugins/publishings/threads-pub/dist/index.js +4 -0
- package/plugins/publishings/wechatmp-pub/dist/index.js +937 -98
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +64 -3
- package/plugins/publishings/wechatmp-pub/src/flow.ts +1125 -85
- package/plugins/publishings/wechatmp-pub/src/index.ts +112 -30
- package/plugins/publishings/wechatmp-pub/src/page.ts +105 -0
- package/plugins/publishings/weibo-pub/dist/index.js +6 -1
- package/plugins/publishings/weibo-pub/dist/profile-check.js +6 -1
- package/plugins/publishings/x-pub/dist/index.js +6 -1
- package/plugins/publishings/x-pub/dist/profile-check.js +6 -1
- package/plugins/publishings/xhs-pub/dist/index.js +6 -1
- package/plugins/publishings/xhs-pub/dist/profile-check.js +6 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +6 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +2 -1
- package/plugins/publishings/zenn-pub/dist/index.js +4 -0
|
@@ -60,13 +60,23 @@ export function localeIndexPath(postPath: string, locale: PatchLocale): string |
|
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
62
|
* The podcast cross-link line per locale (task 0189 R4: the column's episode-title pattern, not the
|
|
63
|
-
* retired news-bulletin name).
|
|
63
|
+
* retired news-bulletin name). The series names are fixed per-locale product identity (2026-10-23:
|
|
64
|
+
* the translate agent had been inventing them) and must agree with the pipeline's single table in
|
|
65
|
+
* plugins/kk/scripts/series-names.ts — the two packages cannot import each other, so tests assert
|
|
66
|
+
* the agreement. digest-check.ts imports this table as the title-contract series names.
|
|
64
67
|
*/
|
|
68
|
+
export const SERIES_NAMES: Record<PatchLocale, string> = {
|
|
69
|
+
zh: '每日AI乱炖',
|
|
70
|
+
en: 'Daily AI Stew',
|
|
71
|
+
ja: 'デイリーAIシチュー',
|
|
72
|
+
};
|
|
73
|
+
|
|
65
74
|
export function crossLinkFor(locale: PatchLocale, dateIso: string, showNotesUrl: string): string {
|
|
75
|
+
const series = SERIES_NAMES[locale];
|
|
66
76
|
const links: Record<PatchLocale, string> = {
|
|
67
|
-
zh: `🎧 本期已同步制作为播客节目,[
|
|
68
|
-
en: `🎧 This episode is also available as a podcast: [listen to
|
|
69
|
-
ja: `🎧 本エピソードはポッドキャストでも配信中:[
|
|
77
|
+
zh: `🎧 本期已同步制作为播客节目,[点击收听《${series} · ${dateIso}》](${showNotesUrl})。`,
|
|
78
|
+
en: `🎧 This episode is also available as a podcast: [listen to ${series} · ${dateIso}](${showNotesUrl}).`,
|
|
79
|
+
ja: `🎧 本エピソードはポッドキャストでも配信中:[${series} · ${dateIso} を聴く](${showNotesUrl})。`,
|
|
70
80
|
};
|
|
71
81
|
return links[locale];
|
|
72
82
|
}
|
|
@@ -118,11 +128,23 @@ export async function patchPostFiles(request: PatchPostRequest): Promise<PatchPo
|
|
|
118
128
|
const end = frontmatterEnd(md);
|
|
119
129
|
const fm = end < 0 ? md : md.slice(0, end);
|
|
120
130
|
if (request.coverUrl !== '') {
|
|
131
|
+
// A relative or http:// cover would ship an unservable OG card — the deployed worker
|
|
132
|
+
// only serves absolute https URLs (prod feedback 2026-09-29).
|
|
133
|
+
if (!/^https:\/\//.test(request.coverUrl)) {
|
|
134
|
+
throw new Error(`coverUrl must be an absolute https:// URL, got: ${request.coverUrl}`);
|
|
135
|
+
}
|
|
121
136
|
md = upsertFrontmatterKey(md, 'image', request.coverUrl);
|
|
122
137
|
md = upsertFrontmatterKey(md, 'og_image', request.coverUrl);
|
|
123
138
|
images[locale] = request.coverUrl;
|
|
124
|
-
} else if (!/^image:/m.test(fm)
|
|
139
|
+
} else if (!/^image:/m.test(fm)) {
|
|
125
140
|
// Fallback for a run without a podcast cover: ship the rendered cover with the post.
|
|
141
|
+
// A locale with no cover anywhere must fail naming the locale, not silently skip —
|
|
142
|
+
// the CMS card would carry no servable image at all.
|
|
143
|
+
if (!(await fs.exists(request.localCover))) {
|
|
144
|
+
throw new Error(
|
|
145
|
+
`${locale} post has no cover: coverUrl is empty, the frontmatter has no image key, and localCover does not exist (${request.localCover})`,
|
|
146
|
+
);
|
|
147
|
+
}
|
|
126
148
|
const asset = join(dir, 'assets', 'cover.png');
|
|
127
149
|
await fs.ensureDir(dirname(asset));
|
|
128
150
|
await fs.copy(request.localCover, asset);
|
|
@@ -131,8 +153,23 @@ export async function patchPostFiles(request: PatchPostRequest): Promise<PatchPo
|
|
|
131
153
|
md = upsertFrontmatterKey(md, 'og_image', './assets/cover.png');
|
|
132
154
|
images[locale] = './assets/cover.png';
|
|
133
155
|
}
|
|
134
|
-
if (request.showNotesUrl !== ''
|
|
135
|
-
|
|
156
|
+
if (request.showNotesUrl !== '') {
|
|
157
|
+
// 2026-10-23: a previous run may have left a 🎧 cross-link line carrying a retired
|
|
158
|
+
// series name — refresh that line in place instead of keeping it forever (the URL it
|
|
159
|
+
// carries made a fresh append a no-op). A non-cross-link line mentioning the URL is
|
|
160
|
+
// left alone; the fresh link is only appended when no line carries the URL at all.
|
|
161
|
+
const link = crossLinkFor(locale, request.dateIso, request.showNotesUrl);
|
|
162
|
+
const lines = md.split('\n');
|
|
163
|
+
const carriesUrl = lines.some((line) => line.includes(request.showNotesUrl));
|
|
164
|
+
if (!carriesUrl) {
|
|
165
|
+
md = `${md.replace(/\s*$/, '')}\n\n${link}\n`;
|
|
166
|
+
} else {
|
|
167
|
+
md = lines
|
|
168
|
+
.map((line) =>
|
|
169
|
+
line.includes(request.showNotesUrl) && line.trimStart().startsWith('🎧') ? link : line,
|
|
170
|
+
)
|
|
171
|
+
.join('\n');
|
|
172
|
+
}
|
|
136
173
|
}
|
|
137
174
|
if (md !== before) {
|
|
138
175
|
await fs.writeFile(indexMd, md);
|
|
@@ -12254,6 +12254,10 @@ init_config();
|
|
|
12254
12254
|
|
|
12255
12255
|
// ../../packages/kk-core/src/render-md.ts
|
|
12256
12256
|
if (false) {}
|
|
12257
|
+
// ../../packages/kk-core/src/sentences.ts
|
|
12258
|
+
var CJK_TERMINATORS = new Set(["\u3002", "\uFF01", "\uFF1F"]);
|
|
12259
|
+
var LATIN_TERMINATORS = new Set([".", "!", "?"]);
|
|
12260
|
+
var ATTACHED_CLOSERS = new Set(["\u201D", "\u2019", "\u300D", "\u300F", "\uFF09", ")", '"', "'"]);
|
|
12257
12261
|
// ../../packages/publish-harness/src/index.ts
|
|
12258
12262
|
class FakeTransportCore {
|
|
12259
12263
|
callLogs = [];
|