@gobing-ai/knowledge-kit 0.0.35 → 0.0.37

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.
Files changed (124) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/README.md +1 -1
  3. package/dist/board/collect/index.css +42 -0
  4. package/dist/board/collect/index.js +787 -0
  5. package/dist/board/daily-voice/index.css +13 -0
  6. package/dist/board/daily-voice/index.js +902 -0
  7. package/dist/board/itc/index.css +14 -0
  8. package/dist/board/itc/index.js +1026 -0
  9. package/dist/index.js +12996 -10476
  10. package/package.json +10 -9
  11. package/plugins/generations/content-gen/dist/index.js +1015 -10814
  12. package/plugins/generations/content-gen/package.json +1 -1
  13. package/plugins/generations/core-facts-gen/dist/index.js +1002 -10801
  14. package/plugins/generations/core-facts-gen/package.json +1 -1
  15. package/plugins/generations/daily-article-gen/dist/index.js +1004 -10803
  16. package/plugins/generations/daily-article-gen/package.json +1 -1
  17. package/plugins/generations/dailynews-gen/dist/index.js +1111 -10888
  18. package/plugins/generations/dailynews-gen/package.json +1 -1
  19. package/plugins/generations/dailynews-gen/src/script-plan.ts +32 -0
  20. package/plugins/generations/episode-plan-gen/dist/index.js +1124 -10923
  21. package/plugins/generations/episode-plan-gen/package.json +1 -1
  22. package/plugins/generations/gemini-tts/dist/index.js +1104 -10903
  23. package/plugins/generations/gemini-tts/package.json +1 -1
  24. package/plugins/generations/image-gen/dist/index.js +1239 -11035
  25. package/plugins/generations/image-gen/package.json +1 -1
  26. package/plugins/generations/news-report-gen/dist/index.js +1048 -10847
  27. package/plugins/generations/news-report-gen/package.json +1 -1
  28. package/plugins/generations/voice-gen/dist/index.js +1062 -10861
  29. package/plugins/generations/voice-gen/package.json +1 -1
  30. package/plugins/generations/voxcpm-tts/README.md +72 -0
  31. package/plugins/generations/voxcpm-tts/dist/index.js +14006 -0
  32. package/plugins/generations/voxcpm-tts/package.json +16 -0
  33. package/plugins/generations/voxcpm-tts/plugin.json +6 -0
  34. package/plugins/generations/voxcpm-tts/profiles.json +10 -0
  35. package/plugins/generations/voxcpm-tts/pyproject.toml +9 -0
  36. package/plugins/generations/voxcpm-tts/python/worker.py +353 -0
  37. package/plugins/generations/voxcpm-tts/src/index.ts +42 -0
  38. package/plugins/generations/voxcpm-tts/src/voxcpm-client.ts +765 -0
  39. package/plugins/generations/voxcpm-tts/tsconfig.json +8 -0
  40. package/plugins/generations/voxcpm-tts/uv.lock +2571 -0
  41. package/plugins/ingestions/aihot-ingest/dist/index.js +1081 -10628
  42. package/plugins/ingestions/aihot-ingest/package.json +1 -1
  43. package/plugins/ingestions/horizon-ingest/dist/index.js +1013 -10812
  44. package/plugins/ingestions/horizon-ingest/package.json +1 -1
  45. package/plugins/ingestions/karakeep-local/dist/index.js +689 -10774
  46. package/plugins/ingestions/karakeep-local/package.json +1 -1
  47. package/plugins/ingestions/last30days-ingest/dist/index.js +1011 -10810
  48. package/plugins/ingestions/last30days-ingest/package.json +1 -1
  49. package/plugins/ingestions/web-search/dist/index.js +1250 -11033
  50. package/plugins/ingestions/web-search/package.json +1 -1
  51. package/plugins/kk/README.md +29 -2
  52. package/plugins/kk/plugin.json +1 -1
  53. package/plugins/kk/schedules/cron.tmpl +9 -1
  54. package/plugins/kk/schedules/kk-serve.launchd.plist.tmpl +79 -0
  55. package/plugins/kk/schedules/launchd.plist.tmpl +11 -1
  56. package/plugins/kk/scripts/daily-stages.ts +428 -46
  57. package/plugins/kk/scripts/daily-voice-style.zh.md +1 -1
  58. package/plugins/kk/scripts/kk-workflow-stages.ts +76 -146
  59. package/plugins/kk/skills/publish/SKILL.md +8 -4
  60. package/plugins/kk/workflows/feature-verification.yaml +93 -0
  61. package/plugins/kk/workflows/judge-gated-publish-example.yaml +1 -0
  62. package/plugins/kk/workflows/kk-collect.yaml +43 -11
  63. package/plugins/kk/workflows/kk-daily-ai-voice.yaml +4 -2
  64. package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +87 -16
  65. package/plugins/kk/workflows/kk-daily-safety.yaml +15 -2
  66. package/plugins/kk/workflows/kk-itc.yaml +8 -1
  67. package/plugins/kk/workflows/kk-solo-podcast.yaml +2 -0
  68. package/plugins/publishings/emdash-pub/dist/index.js +987 -10814
  69. package/plugins/publishings/emdash-pub/package.json +1 -1
  70. package/plugins/publishings/infoq-pub/dist/index.js +1928 -11444
  71. package/plugins/publishings/infoq-pub/dist/profile-check.js +1677 -11199
  72. package/plugins/publishings/infoq-pub/package.json +1 -1
  73. package/plugins/publishings/infoq-pub/plugin.json +5 -1
  74. package/plugins/publishings/juejin-pub/dist/index.js +1940 -11456
  75. package/plugins/publishings/juejin-pub/dist/profile-check.js +1677 -11199
  76. package/plugins/publishings/juejin-pub/package.json +1 -1
  77. package/plugins/publishings/juejin-pub/plugin.json +5 -1
  78. package/plugins/publishings/medium-pub/dist/index.js +978 -10805
  79. package/plugins/publishings/medium-pub/package.json +1 -1
  80. package/plugins/publishings/podcast-pub/dist/index.js +1016 -10843
  81. package/plugins/publishings/podcast-pub/package.json +1 -1
  82. package/plugins/publishings/qiita-pub/dist/index.js +976 -10803
  83. package/plugins/publishings/qiita-pub/package.json +1 -1
  84. package/plugins/publishings/substack-pub/dist/index.js +1932 -11448
  85. package/plugins/publishings/substack-pub/dist/profile-check.js +1698 -11200
  86. package/plugins/publishings/substack-pub/package.json +1 -1
  87. package/plugins/publishings/substack-pub/plugin.json +4 -1
  88. package/plugins/publishings/substack-pub/src/profile-check.ts +36 -3
  89. package/plugins/publishings/surfdash-pub/dist/index.js +1151 -10834
  90. package/plugins/publishings/surfdash-pub/package.json +1 -1
  91. package/plugins/publishings/surfdash-pub/src/index.ts +137 -15
  92. package/plugins/publishings/surfdash-pub/src/patch.ts +144 -0
  93. package/plugins/publishings/threads-pub/dist/index.js +12394 -0
  94. package/plugins/publishings/threads-pub/package.json +17 -0
  95. package/plugins/publishings/threads-pub/plugin.json +7 -0
  96. package/plugins/publishings/threads-pub/src/index.ts +340 -0
  97. package/plugins/publishings/threads-pub/tsconfig.json +4 -0
  98. package/plugins/publishings/wechatmp-pub/dist/index.js +2508 -11695
  99. package/plugins/publishings/wechatmp-pub/dist/profile-check.js +1656 -11188
  100. package/plugins/publishings/wechatmp-pub/package.json +1 -1
  101. package/plugins/publishings/wechatmp-pub/plugin.json +5 -1
  102. package/plugins/publishings/wechatmp-pub/src/enrich.ts +244 -71
  103. package/plugins/publishings/wechatmp-pub/src/flow.ts +412 -96
  104. package/plugins/publishings/wechatmp-pub/src/index.ts +24 -3
  105. package/plugins/publishings/wechatmp-pub/src/page.ts +16 -0
  106. package/plugins/publishings/wechatmp-pub/src/profile-check.ts +40 -4
  107. package/plugins/publishings/weibo-pub/dist/index.js +21345 -0
  108. package/plugins/publishings/weibo-pub/dist/profile-check.js +20817 -0
  109. package/plugins/publishings/weibo-pub/package.json +19 -0
  110. package/plugins/publishings/weibo-pub/plugin.json +12 -0
  111. package/plugins/publishings/weibo-pub/src/index.ts +868 -0
  112. package/plugins/publishings/weibo-pub/src/profile-check.ts +20 -0
  113. package/plugins/publishings/weibo-pub/tsconfig.json +4 -0
  114. package/plugins/publishings/x-pub/dist/index.js +1948 -11440
  115. package/plugins/publishings/x-pub/dist/profile-check.js +1677 -11199
  116. package/plugins/publishings/x-pub/package.json +1 -1
  117. package/plugins/publishings/x-pub/plugin.json +5 -1
  118. package/plugins/publishings/xhs-pub/dist/index.js +1993 -11509
  119. package/plugins/publishings/xhs-pub/dist/profile-check.js +1697 -11212
  120. package/plugins/publishings/xhs-pub/package.json +1 -1
  121. package/plugins/publishings/xhs-pub/plugin.json +5 -1
  122. package/plugins/publishings/xhs-pub/src/profile-check.ts +72 -2
  123. package/plugins/publishings/zenn-pub/dist/index.js +988 -10815
  124. package/plugins/publishings/zenn-pub/package.json +1 -1
@@ -12,6 +12,6 @@
12
12
  "zod": "4.4.3"
13
13
  },
14
14
  "devDependencies": {
15
- "@types/bun": "1.3.14"
15
+ "@types/bun": "1.4.3"
16
16
  }
17
17
  }
@@ -104,9 +104,33 @@ export function parseStyleContract(markdown: string): StyleContract {
104
104
  * - `cap:<field>`: a field over its cap (`intro`/`outro` report `itemId: episode`)
105
105
  * - `banned:<phrase>`: a field containing a banned phrase
106
106
  * - `duplicate-insight`: the same insight text on two items in one episode
107
+ * - `redundant-insight`: the insight restates the narration — ≥ 3 of its clauses each share a
108
+ * ≥ 14-char verbatim span with the item's spoken facts (lead + doc body). 20261014 episode: the
109
+ * prompt told the planner to restate facts, so the listener heard near-identical wording twice
110
+ * per item. One repeated number is tolerable; three copied clauses is a second narration.
107
111
  *
108
112
  * All-or-nothing by contract (Q&A): a partially valid plan is never partially applied.
109
113
  */
114
+ /** Verbatim-span length (normalized) that counts a clause as restated, not as a fact mention. */
115
+ const REDUNDANT_INSIGHT_SPAN = 14;
116
+ /** A listener tolerates one restated clause; at this many the item reads as a second narration. */
117
+ const REDUNDANT_INSIGHT_CLAUSE_LIMIT = 3;
118
+
119
+ function redundantInsightClauses(insight: string, reference: string): number {
120
+ const ref = reference.replace(/[\s\p{P}\p{S}]+/gu, '');
121
+ let count = 0;
122
+ for (const clause of insight.split(/[。!?;,]/)) {
123
+ const norm = clause.replace(/[\s\p{P}\p{S}]+/gu, '');
124
+ if (norm.length < REDUNDANT_INSIGHT_SPAN) continue;
125
+ for (let i = 0; i + REDUNDANT_INSIGHT_SPAN <= norm.length; i++) {
126
+ if (ref.includes(norm.slice(i, i + REDUNDANT_INSIGHT_SPAN))) {
127
+ count++;
128
+ break;
129
+ }
130
+ }
131
+ }
132
+ return count;
133
+ }
110
134
  export function validateScriptPlan(plan: unknown, docs: Doc[], style: StyleContract): ScriptPlanValidation {
111
135
  const parsed = ScriptPlanSchema.safeParse(plan);
112
136
  if (!parsed.success) {
@@ -134,6 +158,14 @@ export function validateScriptPlan(plan: unknown, docs: Doc[], style: StyleContr
134
158
  for (const item of valid.items) {
135
159
  if (item.lead.length > style.caps.lead) errors.push({ itemId: item.id, rule: 'cap:lead' });
136
160
  if (item.insight.length > style.caps.insight) errors.push({ itemId: item.id, rule: 'cap:insight' });
161
+ const doc = docs.find((entry) => entry.id === item.id);
162
+ // unknown-id is already reported above; skip the redundancy check rather than double-report.
163
+ if (
164
+ doc !== undefined &&
165
+ redundantInsightClauses(item.insight, `${item.lead}${doc.body}`) >= REDUNDANT_INSIGHT_CLAUSE_LIMIT
166
+ ) {
167
+ errors.push({ itemId: item.id, rule: 'redundant-insight' });
168
+ }
137
169
  }
138
170
 
139
171
  const fields: { itemId: string; text: string }[] = [