@gobing-ai/knowledge-kit 0.1.14 → 0.1.16

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 (120) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/index.js +2399 -177
  3. package/package.json +1 -1
  4. package/plugins/generations/content-gen/dist/index.js +60 -54
  5. package/plugins/generations/content-gen/src/storm.ts +94 -61
  6. package/plugins/generations/core-facts-gen/dist/index.js +3 -3
  7. package/plugins/generations/daily-article-gen/dist/index.js +3 -3
  8. package/plugins/generations/dailynews-gen/dist/index.js +73 -10
  9. package/plugins/generations/dailynews-gen/src/index.ts +23 -1
  10. package/plugins/generations/dailynews-gen/src/script-plan.ts +103 -5
  11. package/plugins/generations/episode-plan-gen/dist/index.js +3 -3
  12. package/plugins/generations/gemini-tts/dist/index.js +3 -3
  13. package/plugins/generations/image-gen/README.md +31 -10
  14. package/plugins/generations/image-gen/assets/sample/cover__quasi-news-podcast.jpg +0 -0
  15. package/plugins/generations/image-gen/assets/sample/daily-news-cover__quasi-news-podcast.jpg +0 -0
  16. package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__clean-webapp-ui.jpg +0 -0
  17. package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__cute.jpg +0 -0
  18. package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__daily-news.jpg +0 -0
  19. package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__editorial.jpg +0 -0
  20. package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__fresh.jpg +0 -0
  21. package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__minimalist.jpg +0 -0
  22. package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__photorealistic.jpg +0 -0
  23. package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__quasi-news-podcast.jpg +0 -0
  24. package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__sketch.jpg +0 -0
  25. package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__technical-diagram.jpg +0 -0
  26. package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__vibrant.jpg +0 -0
  27. package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__warm.jpg +0 -0
  28. package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__xhs-knowledge.jpg +0 -0
  29. package/plugins/generations/image-gen/assets/sample/free__quasi-news-podcast.jpg +0 -0
  30. package/plugins/generations/image-gen/assets/sample/illustration__quasi-news-podcast.jpg +0 -0
  31. package/plugins/generations/image-gen/assets/sample/xhs-card__quasi-news-podcast.jpg +0 -0
  32. package/plugins/generations/image-gen/dist/index.js +3 -3
  33. package/plugins/generations/image-gen/presets/formats/daily-news-podcast-cover.yaml +18 -0
  34. package/plugins/generations/image-gen/presets/styles/quasi-news-podcast.yaml +9 -0
  35. package/plugins/generations/news-report-gen/dist/index.js +3 -3
  36. package/plugins/generations/voice-gen/dist/index.js +3 -3
  37. package/plugins/generations/voxcpm-tts/dist/index.js +3 -3
  38. package/plugins/ingestions/aihot-ingest/dist/index.js +3 -3
  39. package/plugins/ingestions/horizon-ingest/dist/index.js +3 -3
  40. package/plugins/ingestions/last30days-ingest/dist/index.js +3 -3
  41. package/plugins/ingestions/web-search/dist/index.js +3 -3
  42. package/plugins/kk/plugin.json +1 -1
  43. package/plugins/kk/publish-presets/daily-ai-voice-migration.json +12 -3
  44. package/plugins/kk/publish-presets/daily-ai-voice.json +11 -3
  45. package/plugins/kk/scripts/cover-compositor.ts +152 -0
  46. package/plugins/kk/scripts/daily-cover-mock.ts +164 -0
  47. package/plugins/kk/scripts/daily-scheduled-run.ts +192 -3
  48. package/plugins/kk/scripts/daily-stages.ts +599 -27
  49. package/plugins/kk/scripts/daily-triage-core.ts +451 -0
  50. package/plugins/kk/scripts/daily-triage.ts +74 -0
  51. package/plugins/kk/scripts/kk-workflow-stages.ts +51 -6
  52. package/plugins/kk/skills/content-judge/SKILL.md +5 -4
  53. package/plugins/kk/skills/content-judge/references/rubrics.md +14 -0
  54. package/plugins/kk/skills/content-safety/references/platforms/wechatmp.md +16 -10
  55. package/plugins/kk/skills/news-editorial/SKILL.md +122 -0
  56. package/plugins/kk/skills/news-editorial/references/selection.md +47 -0
  57. package/plugins/kk/skills/news-editorial/references/style-contract.zh.md +100 -0
  58. package/plugins/kk/skills/publish/SKILL.md +4 -4
  59. package/plugins/kk/skills/web-automation/SKILL.md +229 -77
  60. package/plugins/kk/skills/web-automation/references/browser-launch.md +127 -36
  61. package/plugins/kk/skills/wiki-authoring/SKILL.md +53 -0
  62. package/plugins/kk/skills/wiki-authoring/references/page-shapes.md +44 -0
  63. package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +4 -6
  64. package/plugins/kk/workflows/kk-daily-ai-voice3.yaml +185 -224
  65. package/plugins/kk/workflows/kk-daily-publish3.yaml +16 -8
  66. package/plugins/kk/workflows/kk-daily-safety.yaml +32 -7
  67. package/plugins/publishings/bilibili-pub/dist/index.js +6 -4
  68. package/plugins/publishings/bilibili-pub/dist/profile-check.js +3 -1
  69. package/plugins/publishings/cnblogs-pub/dist/index.js +6 -4
  70. package/plugins/publishings/cnblogs-pub/dist/profile-check.js +3 -1
  71. package/plugins/publishings/csdn-pub/dist/index.js +6 -4
  72. package/plugins/publishings/csdn-pub/dist/profile-check.js +6 -4
  73. package/plugins/publishings/emdash-pub/dist/index.js +3 -3
  74. package/plugins/publishings/infoq-pub/dist/index.js +6 -4
  75. package/plugins/publishings/infoq-pub/dist/profile-check.js +6 -4
  76. package/plugins/publishings/jike-pub/dist/index.js +6 -4
  77. package/plugins/publishings/jike-pub/dist/profile-check.js +6 -4
  78. package/plugins/publishings/juejin-pub/dist/index.js +6 -4
  79. package/plugins/publishings/juejin-pub/dist/profile-check.js +6 -4
  80. package/plugins/publishings/linkedin-pub/dist/index.js +6 -4
  81. package/plugins/publishings/linkedin-pub/dist/profile-check.js +6 -4
  82. package/plugins/publishings/medium-pub/dist/index.js +3 -3
  83. package/plugins/publishings/podcast-pub/dist/index.js +148 -5
  84. package/plugins/publishings/podcast-pub/src/index.ts +71 -2
  85. package/plugins/publishings/podcast-pub/src/map.ts +3 -0
  86. package/plugins/publishings/podcast-pub/src/transcript.ts +195 -0
  87. package/plugins/publishings/qiita-pub/dist/index.js +3 -3
  88. package/plugins/publishings/shipinhao-pub/dist/index.js +227 -53
  89. package/plugins/publishings/shipinhao-pub/dist/profile-check.js +51 -2
  90. package/plugins/publishings/shipinhao-pub/plugin.json +2 -2
  91. package/plugins/publishings/shipinhao-pub/src/flow.ts +335 -79
  92. package/plugins/publishings/shipinhao-pub/src/index.ts +16 -8
  93. package/plugins/publishings/shipinhao-pub/src/profile-check.ts +1 -1
  94. package/plugins/publishings/shipinhao-pub/src/selectors.ts +103 -5
  95. package/plugins/publishings/sspai-pub/dist/index.js +6 -4
  96. package/plugins/publishings/sspai-pub/dist/profile-check.js +3 -1
  97. package/plugins/publishings/substack-pub/dist/index.js +6 -4
  98. package/plugins/publishings/substack-pub/dist/profile-check.js +6 -4
  99. package/plugins/publishings/surfdash-pub/dist/index.js +237 -14
  100. package/plugins/publishings/surfdash-pub/src/index.ts +127 -6
  101. package/plugins/publishings/surfdash-pub/src/topic-claims.ts +189 -0
  102. package/plugins/publishings/threads-pub/dist/index.js +3 -3
  103. package/plugins/publishings/wechatmp-pub/dist/index.js +62 -40
  104. package/plugins/publishings/wechatmp-pub/dist/profile-check.js +6 -4
  105. package/plugins/publishings/wechatmp-pub/src/enrich.ts +10 -3
  106. package/plugins/publishings/wechatmp-pub/src/flow.ts +73 -37
  107. package/plugins/publishings/wechatmp-pub/src/page.ts +14 -0
  108. package/plugins/publishings/weibo-pub/dist/index.js +6 -4
  109. package/plugins/publishings/weibo-pub/dist/profile-check.js +6 -4
  110. package/plugins/publishings/x-pub/dist/index.js +6 -4
  111. package/plugins/publishings/x-pub/dist/profile-check.js +6 -4
  112. package/plugins/publishings/xhs-pub/dist/index.js +562 -34
  113. package/plugins/publishings/xhs-pub/dist/profile-check.js +25 -4
  114. package/plugins/publishings/xhs-pub/src/errors.ts +45 -0
  115. package/plugins/publishings/xhs-pub/src/flow.ts +773 -45
  116. package/plugins/publishings/xhs-pub/src/page.ts +33 -0
  117. package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +6 -4
  118. package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +3 -1
  119. package/plugins/publishings/zenn-pub/dist/index.js +3 -3
  120. package/plugins/kk/scripts/daily-voice-style.zh.md +0 -70
@@ -20370,10 +20370,12 @@ function sha256Hex(value) {
20370
20370
  var DEFAULT_BOT_PROFILE_ROOT = join3(homedir3(), ".config", "kk", "browser-profiles");
20371
20371
  class BotError extends Error {
20372
20372
  code;
20373
- constructor(code, message) {
20373
+ details;
20374
+ constructor(code, message, details = {}) {
20374
20375
  super(message);
20375
20376
  this.name = "BotError";
20376
20377
  this.code = code;
20378
+ this.details = details;
20377
20379
  }
20378
20380
  }
20379
20381
  // ../../packages/publish-harness/src/index.ts
@@ -20751,7 +20753,7 @@ var PLATFORM_CONTENT_LIMITS = Object.freeze({
20751
20753
  shortVideo: Object.freeze({
20752
20754
  douyin: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
20753
20755
  kuaishou: Object.freeze({ max: 1000, unit: "unicode_code_points" }),
20754
- shipinhao: Object.freeze({ max: 1000, unit: "unicode_code_points" })
20756
+ shipinhao: Object.freeze({ max: 100, unit: "unicode_code_points" })
20755
20757
  })
20756
20758
  })
20757
20759
  });
@@ -20919,11 +20921,11 @@ var PluginManifestSchemaBase = looseObject({
20919
20921
  });
20920
20922
  var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx) => {
20921
20923
  if (manifest.browserSession !== undefined) {
20922
- if (manifest.kind !== "publish") {
20924
+ if (manifest.kind !== "publish" && manifest.kind !== "ingestion") {
20923
20925
  ctx.addIssue({
20924
20926
  code: "custom",
20925
20927
  path: ["browserSession"],
20926
- message: `browserSession requires kind "publish", not "${manifest.kind}"`
20928
+ message: `browserSession requires kind "publish" or "ingestion", not "${manifest.kind}"`
20927
20929
  });
20928
20930
  }
20929
20931
  if (manifest.check === undefined) {
@@ -21022,6 +21024,25 @@ function wrapPlaywrightPage(raw, shadow) {
21022
21024
  }
21023
21025
  return pw.waitForEvent(event, options);
21024
21026
  },
21027
+ on: (event, handler) => {
21028
+ const raw2 = raw;
21029
+ raw2.on?.(event, handler);
21030
+ },
21031
+ off: (event, handler) => {
21032
+ const raw2 = raw;
21033
+ raw2.off?.(event, handler);
21034
+ },
21035
+ onContextResponse: (handler) => {
21036
+ const raw2 = raw;
21037
+ const ctx = raw2.context?.();
21038
+ ctx?.on?.("response", handler);
21039
+ },
21040
+ offContextResponse: (handler) => {
21041
+ const raw2 = raw;
21042
+ const ctx = raw2.context?.();
21043
+ ctx?.off?.("response", handler);
21044
+ },
21045
+ boundingBoxesOnScreen: (selector) => onScreen(selector).then((found) => found.map((entry) => entry.box)),
21025
21046
  mouse: {
21026
21047
  click: (x, y) => pw.mouse.click(x, y)
21027
21048
  }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Typed publish failures (task 0350), mirroring the vendor-proven
3
+ * `vendors/xiaohongshu-skills/scripts/xhs/errors.py` mapping. The flows THROW these; the
4
+ * transport's catch turns `error.message` into the failed Result, so every message names its
5
+ * class — the Result error string is what callers and tiers match on.
6
+ *
7
+ * Name assignment lives in constructor bodies, not field initializers: bun's coverage counts
8
+ * each initializer as an unattributable function, which would pin this file below the 90%
9
+ * per-file function threshold.
10
+ */
11
+ export class PublishError extends Error {
12
+ override name: string;
13
+ constructor(message: string, name = 'PublishError') {
14
+ super(message);
15
+ this.name = name;
16
+ }
17
+ }
18
+
19
+ /** The server refused the note for account-level risk control (−913x / 禁止发笔记) — not retryable. */
20
+ export class AccountRiskControlError extends PublishError {
21
+ constructor(message: string) {
22
+ super(message, 'AccountRiskControlError');
23
+ }
24
+ }
25
+
26
+ /** The platform's own counter says the title exceeds its limit. */
27
+ export class TitleTooLongError extends PublishError {
28
+ constructor(message: string) {
29
+ super(message, 'TitleTooLongError');
30
+ }
31
+ }
32
+
33
+ /** The platform's own counter says the body exceeds its limit. */
34
+ export class ContentTooLongError extends PublishError {
35
+ constructor(message: string) {
36
+ super(message, 'ContentTooLongError');
37
+ }
38
+ }
39
+
40
+ /** A just-saved draft failed its post-save reopen verification (slots/srcs/fields). */
41
+ export class DraftVerifyError extends PublishError {
42
+ constructor(message: string) {
43
+ super(message, 'DraftVerifyError');
44
+ }
45
+ }