@gobing-ai/knowledge-kit 0.0.25 → 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.
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "plugins": [
8
8
  {
9
- "version": "0.0.25",
9
+ "version": "0.0.26",
10
10
  "name": "kk",
11
11
  "source": "./plugins/kk",
12
12
  "description": "knowledge-kit — a set of toolkit for knowledge management"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobing-ai/knowledge-kit",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "description": "An ingest → create → publish content pipeline CLI (Bun).",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22115,8 +22115,8 @@ async function transcodeWavToMp3(wavPath, mp3Path, ffmpegBin = "ffmpeg") {
22115
22115
  wavPath,
22116
22116
  "-codec:a",
22117
22117
  "libmp3lame",
22118
- "-qscale:a",
22119
- "2",
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 (`2-plan/episode-plan.json`, built by the
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
- * (`2-plan/candidates.rejected.json`, RejectedDoc[] of {doc, reasons})
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
- * (`1-ingest/<date>_02_collect_blended.json`); absent or unreadable -> the
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
- * (`3-audio/<date>_11_generate_content.json`); absent -> the 音频 QC block is omitted;
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
- * (`2-script/<date>_08_script_content.json`, F613 R5); absent or metadata-less -> the
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
- "-qscale:a",
22116
- "2",
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 (VBR `-qscale:a 2`).
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
- '-qscale:a',
41
- '2',
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
- /** `标签,` metadata tails — the plan item's tag line spoken aloud. */
384
- const CONTENT_TAG_TAIL_RE = /标签[::,,]/;
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/2-article/<date>_06_article_article.md`,
290
- `$work_dir/2-script/<date>_08_script_voicescript.yaml`,
291
- `$work_dir/3-audio/<date>_11_generate_content.json` (carries the audio path and QC metrics),
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/3-publish/<date>_17_publish_publish-status.txt` and the
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
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "kk",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "description": "knowledge-kit Claude Code plugin: skills, commands, subagents, hooks, and rules"
5
5
  }