@gobing-ai/knowledge-kit 0.0.24 → 0.0.26
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/package.json +1 -1
- package/plugins/generations/gemini-tts/dist/index.js +3 -3
- package/plugins/generations/news-report-gen/src/index.ts +5 -5
- package/plugins/generations/voice-gen/dist/index.js +3 -3
- package/plugins/generations/voice-gen/src/mp3.ts +4 -3
- package/plugins/generations/voice-gen/src/voicescript.ts +5 -2
- package/plugins/kk/commands/workflow-run.md +4 -4
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/scripts/kk-workflow-stages.ts +146 -99
- package/plugins/kk/scripts/validate-voicescript.ts +5 -2
- package/plugins/kk/workflows/kk-daily-ai-voice.yaml +73 -39
- package/plugins/publishings/wechatmp-pub/dist/index.js +8449 -307
- package/plugins/publishings/wechatmp-pub/package.json +1 -0
- package/plugins/publishings/wechatmp-pub/plugin.json +1 -1
- package/plugins/publishings/wechatmp-pub/src/index.ts +212 -167
- package/plugins/publishings/wechatmp-pub/src/profile-check.ts +34 -0
package/package.json
CHANGED
|
@@ -22115,8 +22115,8 @@ async function transcodeWavToMp3(wavPath, mp3Path, ffmpegBin = "ffmpeg") {
|
|
|
22115
22115
|
wavPath,
|
|
22116
22116
|
"-codec:a",
|
|
22117
22117
|
"libmp3lame",
|
|
22118
|
-
"-
|
|
22119
|
-
"
|
|
22118
|
+
"-b:a",
|
|
22119
|
+
"64k",
|
|
22120
22120
|
mp3Path
|
|
22121
22121
|
], { stdout: "pipe", stderr: "pipe" });
|
|
22122
22122
|
} catch (err) {
|
|
@@ -22827,7 +22827,7 @@ function mergeVoiceScripts(scripts, docs, envDefaultProfile) {
|
|
|
22827
22827
|
}
|
|
22828
22828
|
var CONTENT_ECHO_NOISE_RE = /[\uFF0C\u3002\u3001\uFF1A:\uFF1B;!\uFF01?\uFF1F\u2026\s\u300C\u300D\u300E\u300F\u3010\u3011]/g;
|
|
22829
22829
|
var CONTENT_SCAFFOLD_LABEL_RE = /^(?:\*\*)?[\u300C\u300E]?(?:\u80CC\u666F|\u6F5C\u5728\u5F71\u54CD|\u53EF\u505A\u89D2\u5EA6|\u4E3A\u4EC0\u4E48\u73B0\u5728\u503C\u5F97\u6CE8\u610F|\u793E\u533A\u8BA8\u8BBA)[\u300D\u300F]?(?:\*\*)?(?:[\uFF1A:\uFF0C,]|\s|$)/;
|
|
22830
|
-
var CONTENT_TAG_TAIL_RE = /\u6807\u7B7E[\uFF1A:\uFF0C,]
|
|
22830
|
+
var CONTENT_TAG_TAIL_RE = /\u6807\u7B7E[\uFF1A:\uFF0C,][^\n\u3002\uFF01\uFF1F\u2026]*$/;
|
|
22831
22831
|
var CONTENT_URL_MANGLE_RE = /[\uFF0C\u3002]\/\//;
|
|
22832
22832
|
function assertSegmentContent(script) {
|
|
22833
22833
|
const seen = new Map;
|
|
@@ -13,19 +13,19 @@ import { echoError } from '@gobing-ai/ts-utils';
|
|
|
13
13
|
* if drift ever matters).
|
|
14
14
|
*
|
|
15
15
|
* Inputs:
|
|
16
|
-
* - `--in` Doc[] — kept candidates (`
|
|
16
|
+
* - `--in` Doc[] — kept candidates (`21-plan/episode-plan.json`, built by the
|
|
17
17
|
* workflow from the filter Content's metadata.docs). Scores live in
|
|
18
18
|
* `metadata.scores` (quality/importance/urgency/impact 0-5).
|
|
19
19
|
* - `NEWS_REPORT_REJECTED_FILE` — the filter's rejected audit path
|
|
20
|
-
* (`
|
|
20
|
+
* (`21-plan/candidates.rejected.json`, RejectedDoc[] of {doc, reasons})
|
|
21
21
|
* - `NEWS_REPORT_BLENDED_FILE` — the collect stage's blended fan-in output
|
|
22
|
-
* (`
|
|
22
|
+
* (`10-ingest/<date>_02_collect_blended.json`); absent or unreadable -> the
|
|
23
23
|
* 语料构成 section is omitted, never throw.
|
|
24
24
|
* - `NEWS_REPORT_QC_FILE` — the generate stage's QC audit path
|
|
25
|
-
* (`
|
|
25
|
+
* (`30-audio/<date>_11_generate_content.json`); absent -> the 音频 QC block is omitted;
|
|
26
26
|
* absent or unreadable -> reject counts render as 0, never throw.
|
|
27
27
|
* - `NEWS_REPORT_SCRIPT_FILE` — the script stage's Content path
|
|
28
|
-
* (`
|
|
28
|
+
* (`24-script/<date>_08_script_content.json`, F613 R5); absent or metadata-less -> the
|
|
29
29
|
* 脚本来源 line is omitted, never throw.
|
|
30
30
|
* - `NEWS_REPORT_TIMING_FILE` — `<work_dir>/step-timing.json` JSONL of
|
|
31
31
|
* {step, startedAt, endedAt} appended by the workflow shell steps; missing
|
|
@@ -22112,8 +22112,8 @@ async function transcodeWavToMp3(wavPath, mp3Path, ffmpegBin = "ffmpeg") {
|
|
|
22112
22112
|
wavPath,
|
|
22113
22113
|
"-codec:a",
|
|
22114
22114
|
"libmp3lame",
|
|
22115
|
-
"-
|
|
22116
|
-
"
|
|
22115
|
+
"-b:a",
|
|
22116
|
+
"64k",
|
|
22117
22117
|
mp3Path
|
|
22118
22118
|
], { stdout: "pipe", stderr: "pipe" });
|
|
22119
22119
|
} catch (err) {
|
|
@@ -22824,7 +22824,7 @@ function mergeVoiceScripts(scripts, docs, envDefaultProfile) {
|
|
|
22824
22824
|
}
|
|
22825
22825
|
var CONTENT_ECHO_NOISE_RE = /[\uFF0C\u3002\u3001\uFF1A:\uFF1B;!\uFF01?\uFF1F\u2026\s\u300C\u300D\u300E\u300F\u3010\u3011]/g;
|
|
22826
22826
|
var CONTENT_SCAFFOLD_LABEL_RE = /^(?:\*\*)?[\u300C\u300E]?(?:\u80CC\u666F|\u6F5C\u5728\u5F71\u54CD|\u53EF\u505A\u89D2\u5EA6|\u4E3A\u4EC0\u4E48\u73B0\u5728\u503C\u5F97\u6CE8\u610F|\u793E\u533A\u8BA8\u8BBA)[\u300D\u300F]?(?:\*\*)?(?:[\uFF1A:\uFF0C,]|\s|$)/;
|
|
22827
|
-
var CONTENT_TAG_TAIL_RE = /\u6807\u7B7E[\uFF1A:\uFF0C,]
|
|
22827
|
+
var CONTENT_TAG_TAIL_RE = /\u6807\u7B7E[\uFF1A:\uFF0C,][^\n\u3002\uFF01\uFF1F\u2026]*$/;
|
|
22828
22828
|
var CONTENT_URL_MANGLE_RE = /[\uFF0C\u3002]\/\//;
|
|
22829
22829
|
function assertSegmentContent(script) {
|
|
22830
22830
|
const seen = new Map;
|
|
@@ -15,7 +15,8 @@ export function isMp3Requested(env: NodeJS.ProcessEnv = process.env): boolean {
|
|
|
15
15
|
export type Mp3Transcoder = (wavPath: string, mp3Path: string) => Promise<void>;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Convert a workspace WAV to MP3 with ffmpeg + libmp3lame (
|
|
18
|
+
* Convert a workspace WAV to MP3 with ffmpeg + libmp3lame (CBR 64k — feed validators
|
|
19
|
+
* flag VBR and podcast apps seek/duration-track CBR more reliably).
|
|
19
20
|
* Fail-loud if ffmpeg is missing, exits non-zero, or writes no file.
|
|
20
21
|
*/
|
|
21
22
|
export async function transcodeWavToMp3(wavPath: string, mp3Path: string, ffmpegBin = 'ffmpeg'): Promise<void> {
|
|
@@ -37,8 +38,8 @@ export async function transcodeWavToMp3(wavPath: string, mp3Path: string, ffmpeg
|
|
|
37
38
|
wavPath,
|
|
38
39
|
'-codec:a',
|
|
39
40
|
'libmp3lame',
|
|
40
|
-
'-
|
|
41
|
-
'
|
|
41
|
+
'-b:a',
|
|
42
|
+
'64k',
|
|
42
43
|
mp3Path,
|
|
43
44
|
],
|
|
44
45
|
{ stdout: 'pipe', stderr: 'pipe' },
|
|
@@ -380,8 +380,11 @@ const CONTENT_ECHO_NOISE_RE = /[,。、::;;!!??…\s「」『』【】
|
|
|
380
380
|
/** Research scaffold labels the plan-translate stage must not emit as spoken copy. */
|
|
381
381
|
const CONTENT_SCAFFOLD_LABEL_RE =
|
|
382
382
|
/^(?:\*\*)?[「『]?(?:背景|潜在影响|可做角度|为什么现在值得注意|社区讨论)[」』]?(?:\*\*)?(?:[::,,]|\s|$)/;
|
|
383
|
-
/**
|
|
384
|
-
|
|
383
|
+
/** `标签:…` / `标签,ai、google` metadata tails — the plan item's tag line spoken aloud.
|
|
384
|
+
* Terminal-anchored: the tail runs to the end of the segment with no sentence-ending
|
|
385
|
+
* punctuation. Prose like 「一个推了两年的硬件标签,突然从新品上消失了。」 continues past the
|
|
386
|
+
* comma to a 。 and must not trip the gate (false positive of the 2026-09-28 daily run). */
|
|
387
|
+
const CONTENT_TAG_TAIL_RE = /标签[::,,][^\n。!?…]*$/;
|
|
385
388
|
/** `wss,//` / `https。//` — the translator replacing a URL colon with a Chinese comma. */
|
|
386
389
|
const CONTENT_URL_MANGLE_RE = /[,。]\/\//;
|
|
387
390
|
|
|
@@ -286,11 +286,11 @@ spur workflow run "$dest" --vars \
|
|
|
286
286
|
`$work_dir/3-script-voicescript.yaml`, `$work_dir/4-audio/content.json`, and
|
|
287
287
|
`$work_dir/4-audio/content.wav`.
|
|
288
288
|
- **`kk-daily-ai-voice`**: print resolved `work_dir` (read the date from `$work_dir/run-date.txt`),
|
|
289
|
-
then `$work_dir/
|
|
290
|
-
`$work_dir/
|
|
291
|
-
`$work_dir/
|
|
289
|
+
then `$work_dir/22-article/<date>_06_article_article.md`,
|
|
290
|
+
`$work_dir/24-script/<date>_08_script_voicescript.yaml`,
|
|
291
|
+
`$work_dir/30-audio/<date>_11_generate_content.json` (carries the audio path and QC metrics),
|
|
292
292
|
and `$work_dir/<date>_19_run-report_report.md`. With `publish_enabled=true` also print
|
|
293
|
-
`$work_dir/
|
|
293
|
+
`$work_dir/31-publish/<date>_17_publish_publish-status.txt` and the
|
|
294
294
|
`<date>_14_publish-surfdash_result.json` / `<date>_16_publish-podcast_result.json` outcomes.
|
|
295
295
|
|
|
296
296
|
If the run ended `failed`, show the failing state (`spur workflow trace <run-id> --json`) and the
|
package/plugins/kk/plugin.json
CHANGED