@gobing-ai/knowledge-kit 0.0.37 → 0.1.1

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 (157) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/board/collect/index.css +654 -16
  3. package/dist/board/collect/index.js +191 -64
  4. package/dist/board/daily-voice/index.css +679 -12
  5. package/dist/board/daily-voice/index.js +185 -66
  6. package/dist/board/itc/index.css +679 -13
  7. package/dist/board/itc/index.js +188 -66
  8. package/dist/index.js +2864 -139
  9. package/package.json +3 -2
  10. package/plugins/generations/content-gen/dist/index.js +158 -12
  11. package/plugins/generations/core-facts-gen/dist/index.js +158 -12
  12. package/plugins/generations/daily-article-gen/dist/index.js +158 -12
  13. package/plugins/generations/dailynews-gen/dist/index.js +158 -12
  14. package/plugins/generations/episode-plan-gen/dist/index.js +158 -12
  15. package/plugins/generations/gemini-tts/README.md +4 -3
  16. package/plugins/generations/gemini-tts/dist/index.js +158 -12
  17. package/plugins/generations/image-gen/dist/index.js +158 -12
  18. package/plugins/generations/news-report-gen/dist/index.js +158 -12
  19. package/plugins/generations/omni-voice-gen/README.md +15 -4
  20. package/plugins/generations/omni-voice-gen/profiles.json +1 -2
  21. package/plugins/generations/voice-gen/dist/index.js +158 -12
  22. package/plugins/generations/voxcpm-tts/README.md +21 -1
  23. package/plugins/generations/voxcpm-tts/dist/index.js +173 -13
  24. package/plugins/generations/voxcpm-tts/scripts/audit-speaker-consistency.py +109 -0
  25. package/plugins/generations/voxcpm-tts/src/voxcpm-client.ts +28 -1
  26. package/plugins/ingestions/aihot-ingest/dist/index.js +158 -12
  27. package/plugins/ingestions/horizon-ingest/dist/index.js +158 -12
  28. package/plugins/ingestions/last30days-ingest/dist/index.js +158 -12
  29. package/plugins/ingestions/web-search/dist/index.js +158 -12
  30. package/plugins/kk/commands/workflow-run.md +56 -18
  31. package/plugins/kk/decisions/kk-itc.yaml +46 -0
  32. package/plugins/kk/decisions/kk-seo-keyword.yaml +57 -0
  33. package/plugins/kk/decisions/kk-seo-page.yaml +230 -0
  34. package/plugins/kk/decisions/kk-seo-pair.yaml +21 -0
  35. package/plugins/kk/decisions/kk-seo-site.yaml +90 -0
  36. package/plugins/kk/plugin.json +1 -1
  37. package/plugins/kk/publish-presets/chinese-article.json +14 -0
  38. package/plugins/kk/publish-presets/technical-article.json +14 -0
  39. package/plugins/kk/references/smart-seo-attribution.md +85 -0
  40. package/plugins/kk/scripts/daily-stages.ts +42 -2
  41. package/plugins/kk/scripts/itc-stages.ts +25 -118
  42. package/plugins/kk/scripts/kk-workflow-stages.ts +38 -1
  43. package/plugins/kk/scripts/seo-decisions.ts +491 -0
  44. package/plugins/kk/scripts/seo-enrich.ts +728 -0
  45. package/plugins/kk/scripts/seo-facts.ts +610 -0
  46. package/plugins/kk/scripts/seo-fetch.ts +766 -0
  47. package/plugins/kk/scripts/seo-report.ts +460 -0
  48. package/plugins/kk/scripts/seo-rules.ts +1882 -0
  49. package/plugins/kk/scripts/seo-stages.ts +1044 -0
  50. package/plugins/kk/skills/article-adapt/SKILL.md +2 -2
  51. package/plugins/kk/skills/smart-seo/SKILL.md +183 -0
  52. package/plugins/kk/skills/smart-seo/references/method.md +126 -0
  53. package/plugins/kk/skills/smart-seo/references/narrative.md +125 -0
  54. package/plugins/kk/skills/smart-seo/references/operations.md +209 -0
  55. package/plugins/kk/skills/smart-seo/references/seo-geo-sources.md +90 -0
  56. package/plugins/kk/workflows/feature-verification.yaml +28 -24
  57. package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +85 -17
  58. package/plugins/kk/workflows/kk-itc-author.yaml +406 -0
  59. package/plugins/kk/workflows/kk-itc.yaml +208 -682
  60. package/plugins/kk/workflows/kk-smart-seo.yaml +251 -0
  61. package/plugins/publishings/bilibili-pub/dist/index.js +21782 -0
  62. package/plugins/publishings/bilibili-pub/dist/profile-check.js +20410 -0
  63. package/plugins/publishings/bilibili-pub/package.json +20 -0
  64. package/plugins/publishings/bilibili-pub/plugin.json +12 -0
  65. package/plugins/publishings/bilibili-pub/src/flow.ts +1296 -0
  66. package/plugins/publishings/bilibili-pub/src/index.ts +139 -0
  67. package/plugins/publishings/bilibili-pub/src/profile-check.ts +19 -0
  68. package/plugins/publishings/bilibili-pub/src/selectors.ts +222 -0
  69. package/plugins/publishings/bilibili-pub/tsconfig.json +4 -0
  70. package/plugins/publishings/cnblogs-pub/dist/index.js +21383 -0
  71. package/plugins/publishings/cnblogs-pub/dist/profile-check.js +20412 -0
  72. package/plugins/publishings/cnblogs-pub/package.json +19 -0
  73. package/plugins/publishings/cnblogs-pub/plugin.json +12 -0
  74. package/plugins/publishings/cnblogs-pub/src/flow.ts +708 -0
  75. package/plugins/publishings/cnblogs-pub/src/index.ts +172 -0
  76. package/plugins/publishings/cnblogs-pub/src/profile-check.ts +24 -0
  77. package/plugins/publishings/cnblogs-pub/src/selectors.ts +104 -0
  78. package/plugins/publishings/cnblogs-pub/tsconfig.json +4 -0
  79. package/plugins/publishings/csdn-pub/dist/index.js +21552 -0
  80. package/plugins/publishings/csdn-pub/dist/profile-check.js +20963 -0
  81. package/plugins/publishings/csdn-pub/package.json +19 -0
  82. package/plugins/publishings/csdn-pub/plugin.json +12 -0
  83. package/plugins/publishings/csdn-pub/src/index.ts +1178 -0
  84. package/plugins/publishings/csdn-pub/src/profile-check.ts +23 -0
  85. package/plugins/publishings/csdn-pub/tsconfig.json +4 -0
  86. package/plugins/publishings/emdash-pub/dist/index.js +158 -12
  87. package/plugins/publishings/emdash-pub/plugin.json +22 -1
  88. package/plugins/publishings/infoq-pub/dist/index.js +160 -12
  89. package/plugins/publishings/infoq-pub/dist/profile-check.js +160 -12
  90. package/plugins/publishings/infoq-pub/plugin.json +21 -0
  91. package/plugins/publishings/jike-pub/dist/index.js +21379 -0
  92. package/plugins/publishings/jike-pub/dist/profile-check.js +20951 -0
  93. package/plugins/publishings/jike-pub/package.json +19 -0
  94. package/plugins/publishings/jike-pub/plugin.json +12 -0
  95. package/plugins/publishings/jike-pub/src/index.ts +800 -0
  96. package/plugins/publishings/jike-pub/src/profile-check.ts +21 -0
  97. package/plugins/publishings/jike-pub/tsconfig.json +4 -0
  98. package/plugins/publishings/juejin-pub/dist/index.js +160 -12
  99. package/plugins/publishings/juejin-pub/dist/profile-check.js +160 -12
  100. package/plugins/publishings/juejin-pub/plugin.json +21 -0
  101. package/plugins/publishings/medium-pub/dist/index.js +158 -12
  102. package/plugins/publishings/medium-pub/plugin.json +22 -1
  103. package/plugins/publishings/podcast-pub/dist/index.js +158 -12
  104. package/plugins/publishings/qiita-pub/dist/index.js +158 -12
  105. package/plugins/publishings/qiita-pub/plugin.json +24 -1
  106. package/plugins/publishings/shipinhao-pub/dist/index.js +21715 -0
  107. package/plugins/publishings/shipinhao-pub/dist/profile-check.js +20431 -0
  108. package/plugins/publishings/shipinhao-pub/package.json +19 -0
  109. package/plugins/publishings/shipinhao-pub/plugin.json +12 -0
  110. package/plugins/publishings/shipinhao-pub/src/flow.ts +1323 -0
  111. package/plugins/publishings/shipinhao-pub/src/index.ts +173 -0
  112. package/plugins/publishings/shipinhao-pub/src/profile-check.ts +25 -0
  113. package/plugins/publishings/shipinhao-pub/src/selectors.ts +241 -0
  114. package/plugins/publishings/shipinhao-pub/tsconfig.json +4 -0
  115. package/plugins/publishings/sspai-pub/dist/index.js +21371 -0
  116. package/plugins/publishings/sspai-pub/dist/profile-check.js +20414 -0
  117. package/plugins/publishings/sspai-pub/package.json +19 -0
  118. package/plugins/publishings/sspai-pub/plugin.json +12 -0
  119. package/plugins/publishings/sspai-pub/src/flow.ts +624 -0
  120. package/plugins/publishings/sspai-pub/src/index.ts +167 -0
  121. package/plugins/publishings/sspai-pub/src/profile-check.ts +25 -0
  122. package/plugins/publishings/sspai-pub/src/selectors.ts +122 -0
  123. package/plugins/publishings/sspai-pub/tsconfig.json +4 -0
  124. package/plugins/publishings/substack-pub/dist/index.js +160 -12
  125. package/plugins/publishings/substack-pub/dist/profile-check.js +160 -12
  126. package/plugins/publishings/substack-pub/plugin.json +21 -0
  127. package/plugins/publishings/surfdash-pub/dist/index.js +158 -12
  128. package/plugins/publishings/surfdash-pub/plugin.json +22 -1
  129. package/plugins/publishings/threads-pub/dist/index.js +158 -12
  130. package/plugins/publishings/wechatmp-pub/dist/index.js +1669 -502
  131. package/plugins/publishings/wechatmp-pub/dist/profile-check.js +204 -21
  132. package/plugins/publishings/wechatmp-pub/plugin.json +32 -0
  133. package/plugins/publishings/wechatmp-pub/src/cgi-draft.ts +540 -0
  134. package/plugins/publishings/wechatmp-pub/src/cgi-media.ts +380 -0
  135. package/plugins/publishings/wechatmp-pub/src/cgi.ts +485 -0
  136. package/plugins/publishings/wechatmp-pub/src/flow.ts +104 -0
  137. package/plugins/publishings/weibo-pub/dist/index.js +160 -12
  138. package/plugins/publishings/weibo-pub/dist/profile-check.js +160 -12
  139. package/plugins/publishings/weibo-pub/plugin.json +35 -0
  140. package/plugins/publishings/x-pub/dist/index.js +160 -12
  141. package/plugins/publishings/x-pub/dist/profile-check.js +160 -12
  142. package/plugins/publishings/x-pub/plugin.json +40 -0
  143. package/plugins/publishings/xhs-pub/dist/index.js +160 -12
  144. package/plugins/publishings/xhs-pub/dist/profile-check.js +160 -12
  145. package/plugins/publishings/xhs-pub/plugin.json +37 -0
  146. package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +21491 -0
  147. package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +20417 -0
  148. package/plugins/publishings/xiaoyuzhou-pub/package.json +19 -0
  149. package/plugins/publishings/xiaoyuzhou-pub/plugin.json +12 -0
  150. package/plugins/publishings/xiaoyuzhou-pub/src/flow.ts +826 -0
  151. package/plugins/publishings/xiaoyuzhou-pub/src/index.ts +174 -0
  152. package/plugins/publishings/xiaoyuzhou-pub/src/profile-check.ts +26 -0
  153. package/plugins/publishings/xiaoyuzhou-pub/src/selectors.ts +125 -0
  154. package/plugins/publishings/xiaoyuzhou-pub/tsconfig.json +4 -0
  155. package/plugins/publishings/zenn-pub/dist/index.js +158 -12
  156. package/plugins/publishings/zenn-pub/plugin.json +22 -1
  157. package/plugins/generations/omni-voice-gen/voices/robin-news.wav +0 -0
@@ -456,6 +456,7 @@ function CollectModule() {
456
456
  const [results, setResults] = useState(null);
457
457
  const [config, setConfig] = useState(null);
458
458
  const [progress, setProgress] = useState(null);
459
+ const [filterQuery, setFilterQuery] = useState("");
459
460
  const historyBusy = useRef(false);
460
461
  const readerBusy = useRef(false);
461
462
  const loadHistory = useCallback(async () => {
@@ -525,42 +526,99 @@ function CollectModule() {
525
526
  const artifacts = results === null ? [] : artifactViews(results, readerOrigin);
526
527
  const steps = progressRows(progress);
527
528
  const selectedRow = rows.find((row) => row.id === selection.runId);
529
+ const filteredRows = useMemo(() => {
530
+ const q = filterQuery.trim().toLowerCase();
531
+ if (q === "")
532
+ return rows;
533
+ return rows.filter((r) => r.id.toLowerCase().includes(q) || r.status.toLowerCase().includes(q));
534
+ }, [rows, filterQuery]);
528
535
  return /* @__PURE__ */ jsxs("div", {
529
536
  className: "kk-board kk-board-collect",
530
537
  children: [
531
538
  /* @__PURE__ */ jsxs("header", {
532
539
  className: "kk-board-header",
533
540
  children: [
534
- /* @__PURE__ */ jsx("h1", {
535
- children: "Collect"
536
- }),
537
- /* @__PURE__ */ jsxs("p", {
541
+ /* @__PURE__ */ jsxs("div", {
542
+ className: "kk-board-header-left",
538
543
  children: [
539
- "Run ",
540
- /* @__PURE__ */ jsx("code", {
541
- children: selection.runId ?? "none selected"
544
+ /* @__PURE__ */ jsxs("div", {
545
+ className: "kk-board-header-title-row",
546
+ children: [
547
+ /* @__PURE__ */ jsx("h1", {
548
+ children: "Collect"
549
+ }),
550
+ selectedRow ? /* @__PURE__ */ jsx("span", {
551
+ className: `kk-badge ${selectedRow.status === "done" ? "kk-badge-success" : selectedRow.status === "failed" ? "kk-badge-failed" : "kk-badge-running"}`,
552
+ children: selectedRow.status
553
+ }) : null
554
+ ]
542
555
  }),
543
- " · ",
544
- selectedRow?.status ?? "status unknown",
545
- " ·",
546
- " ",
547
- freshnessLabel(readerRefresh)
556
+ /* @__PURE__ */ jsxs("p", {
557
+ children: [
558
+ "Run ",
559
+ /* @__PURE__ */ jsx("code", {
560
+ children: selection.runId ?? "none selected"
561
+ }),
562
+ " · ",
563
+ freshnessLabel(readerRefresh),
564
+ results === null ? "" : ` · Results ${results.availability}`
565
+ ]
566
+ })
548
567
  ]
549
568
  }),
550
- results === null ? null : /* @__PURE__ */ jsxs("p", {
569
+ /* @__PURE__ */ jsxs("div", {
570
+ className: "kk-board-header-right",
551
571
  children: [
552
- "Results ",
553
- results.availability
572
+ /* @__PURE__ */ jsxs("div", {
573
+ className: "kk-board-run-filter-group",
574
+ children: [
575
+ /* @__PURE__ */ jsx("input", {
576
+ type: "text",
577
+ className: "kk-board-run-filter-input",
578
+ placeholder: "Filter runs...",
579
+ value: filterQuery,
580
+ onChange: (e) => setFilterQuery(e.target.value),
581
+ "aria-label": "Filter runs"
582
+ }),
583
+ /* @__PURE__ */ jsxs("label", {
584
+ className: "kk-board-run-selector",
585
+ children: [
586
+ "Run",
587
+ /* @__PURE__ */ jsxs("select", {
588
+ value: selection.runId ?? "",
589
+ onChange: (event) => setSelection((state) => ({ ...state, runId: event.target.value || null })),
590
+ children: [
591
+ /* @__PURE__ */ jsx("option", {
592
+ value: "",
593
+ children: rows.length === 0 ? "No runs recorded" : filteredRows.length === 0 ? "No matching runs" : "Select a run"
594
+ }),
595
+ filteredRows.map((row) => /* @__PURE__ */ jsxs("option", {
596
+ value: row.id,
597
+ children: [
598
+ row.id,
599
+ " — ",
600
+ row.status
601
+ ]
602
+ }, row.id))
603
+ ]
604
+ })
605
+ ]
606
+ })
607
+ ]
608
+ }),
609
+ /* @__PURE__ */ jsx("button", {
610
+ type: "button",
611
+ onClick: () => void loadReader(),
612
+ title: "Refresh run data",
613
+ children: "↻ Refresh"
614
+ }),
615
+ selection.runId === null ? null : /* @__PURE__ */ jsx("a", {
616
+ href: selectionPath(selection, window.location.search),
617
+ className: "kk-btn-action",
618
+ title: "Permanent link",
619
+ children: "\uD83D\uDD17 Link"
620
+ })
554
621
  ]
555
- }),
556
- /* @__PURE__ */ jsx("button", {
557
- type: "button",
558
- onClick: () => void loadReader(),
559
- children: "Refresh"
560
- }),
561
- selection.runId === null ? null : /* @__PURE__ */ jsx("a", {
562
- href: selectionPath(selection, window.location.search),
563
- children: "Permanent link to this view"
564
622
  })
565
623
  ]
566
624
  }),
@@ -574,30 +632,6 @@ function CollectModule() {
574
632
  children: TAB_LABELS[candidate]
575
633
  }, candidate))
576
634
  }),
577
- /* @__PURE__ */ jsxs("label", {
578
- className: "kk-board-run-selector",
579
- children: [
580
- "Run",
581
- /* @__PURE__ */ jsxs("select", {
582
- value: selection.runId ?? "",
583
- onChange: (event) => setSelection((state) => ({ ...state, runId: event.target.value || null })),
584
- children: [
585
- /* @__PURE__ */ jsx("option", {
586
- value: "",
587
- children: rows.length === 0 ? "No runs recorded" : "Select a run"
588
- }),
589
- rows.map((row) => /* @__PURE__ */ jsxs("option", {
590
- value: row.id,
591
- children: [
592
- row.id,
593
- " — ",
594
- row.status
595
- ]
596
- }, row.id))
597
- ]
598
- })
599
- ]
600
- }),
601
635
  rows.length === 0 ? /* @__PURE__ */ jsxs("p", {
602
636
  className: "kk-board-empty",
603
637
  children: [
@@ -654,25 +688,118 @@ function SummaryPanel({
654
688
  return /* @__PURE__ */ jsx("p", {
655
689
  children: "No captured results for the selected run."
656
690
  });
657
- return /* @__PURE__ */ jsx("dl", {
658
- className: "kk-board-facts",
659
- children: facts.map((fact) => /* @__PURE__ */ jsxs("div", {
660
- children: [
661
- /* @__PURE__ */ jsx("dt", {
662
- children: fact.label
663
- }),
664
- /* @__PURE__ */ jsxs("dd", {
691
+ const summary = collectSummary(results);
692
+ const totalItems = (summary.inserted ?? 0) + (summary.updated ?? 0) + (summary.unchanged ?? 0);
693
+ return /* @__PURE__ */ jsxs("div", {
694
+ style: { display: "flex", flexDirection: "column", gap: "0.875rem" },
695
+ children: [
696
+ summary.labeled !== null || summary.inserted !== null ? /* @__PURE__ */ jsxs("div", {
697
+ className: "kk-stat-grid",
698
+ children: [
699
+ /* @__PURE__ */ jsxs("div", {
700
+ className: "kk-stat-card",
701
+ children: [
702
+ /* @__PURE__ */ jsx("span", {
703
+ className: "kk-stat-label",
704
+ children: "Ingested Items"
705
+ }),
706
+ /* @__PURE__ */ jsx("span", {
707
+ className: "kk-stat-value",
708
+ children: totalItems
709
+ }),
710
+ /* @__PURE__ */ jsxs("span", {
711
+ className: "kk-stat-sub",
712
+ children: [
713
+ summary.inserted ?? 0,
714
+ " new · ",
715
+ summary.updated ?? 0,
716
+ " updated"
717
+ ]
718
+ })
719
+ ]
720
+ }),
721
+ /* @__PURE__ */ jsxs("div", {
722
+ className: "kk-stat-card",
723
+ children: [
724
+ /* @__PURE__ */ jsx("span", {
725
+ className: "kk-stat-label",
726
+ children: "Labeled Pool"
727
+ }),
728
+ /* @__PURE__ */ jsx("span", {
729
+ className: "kk-stat-value",
730
+ children: summary.labeled ?? "—"
731
+ }),
732
+ /* @__PURE__ */ jsxs("span", {
733
+ className: "kk-stat-sub",
734
+ children: [
735
+ summary.model ?? 0,
736
+ " model · ",
737
+ summary.fallback ?? 0,
738
+ " fallback"
739
+ ]
740
+ })
741
+ ]
742
+ }),
743
+ /* @__PURE__ */ jsxs("div", {
744
+ className: "kk-stat-card",
745
+ children: [
746
+ /* @__PURE__ */ jsx("span", {
747
+ className: "kk-stat-label",
748
+ children: "Verdict"
749
+ }),
750
+ /* @__PURE__ */ jsx("span", {
751
+ className: "kk-stat-value",
752
+ children: summary.verdict ?? "—"
753
+ }),
754
+ /* @__PURE__ */ jsxs("span", {
755
+ className: "kk-stat-sub",
756
+ children: [
757
+ "Confidence: ",
758
+ summary.confidence ?? "—"
759
+ ]
760
+ })
761
+ ]
762
+ }),
763
+ /* @__PURE__ */ jsxs("div", {
764
+ className: "kk-stat-card",
765
+ children: [
766
+ /* @__PURE__ */ jsx("span", {
767
+ className: "kk-stat-label",
768
+ children: "Sources Active"
769
+ }),
770
+ /* @__PURE__ */ jsx("span", {
771
+ className: "kk-stat-value",
772
+ children: Object.keys(summary.sourceCounts ?? {}).length
773
+ }),
774
+ /* @__PURE__ */ jsx("span", {
775
+ className: "kk-stat-sub",
776
+ children: "Ingest channels"
777
+ })
778
+ ]
779
+ })
780
+ ]
781
+ }) : null,
782
+ /* @__PURE__ */ jsx("dl", {
783
+ className: "kk-board-facts",
784
+ children: facts.map((fact) => /* @__PURE__ */ jsxs("div", {
665
785
  children: [
666
- fact.value,
667
- " ",
668
- /* @__PURE__ */ jsx("span", {
669
- className: "kk-board-state",
670
- children: fact.availability
786
+ /* @__PURE__ */ jsx("dt", {
787
+ children: fact.label
788
+ }),
789
+ /* @__PURE__ */ jsxs("dd", {
790
+ children: [
791
+ fact.value,
792
+ " ",
793
+ /* @__PURE__ */ jsx("span", {
794
+ className: "kk-board-state",
795
+ children: fact.availability
796
+ })
797
+ ]
671
798
  })
672
799
  ]
673
- })
674
- ]
675
- }, fact.label))
800
+ }, fact.label))
801
+ })
802
+ ]
676
803
  });
677
804
  }
678
805
  function ResultsPanel({ artifacts }) {