@gobing-ai/knowledge-kit 0.1.29 → 0.1.30

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 (114) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/board/api.js +8724 -3861
  3. package/dist/board/collect/index.js +69 -1
  4. package/dist/board/daily-voice/index.js +474 -265
  5. package/dist/board/itc/index.js +69 -1
  6. package/dist/board/wiki/index.css +1305 -0
  7. package/dist/board/wiki/index.js +1621 -0
  8. package/dist/index.js +34689 -28532
  9. package/package.json +1 -1
  10. package/plugins/generations/content-gen/dist/index.js +14 -1
  11. package/plugins/generations/core-facts-gen/dist/index.js +14 -1
  12. package/plugins/generations/daily-article-gen/dist/index.js +14 -1
  13. package/plugins/generations/dailynews-gen/dist/index.js +14 -1
  14. package/plugins/generations/episode-plan-gen/dist/index.js +32 -2
  15. package/plugins/generations/episode-plan-gen/src/index.ts +19 -1
  16. package/plugins/generations/gemini-tts/dist/index.js +14 -1
  17. package/plugins/generations/image-gen/dist/index.js +14 -1
  18. package/plugins/generations/music-gen/dist/index.js +15 -2
  19. package/plugins/generations/news-report-gen/dist/index.js +14 -1
  20. package/plugins/generations/vibe-voice-tts/dist/index.js +14 -1
  21. package/plugins/generations/video-gen/README.md +245 -8
  22. package/plugins/generations/video-gen/dist/index.js +22447 -4763
  23. package/plugins/generations/video-gen/package.json +1 -0
  24. package/plugins/generations/video-gen/presets/formats/avatar.yaml +5 -0
  25. package/plugins/generations/video-gen/presets/formats/editorial.yaml +6 -0
  26. package/plugins/generations/video-gen/presets/formats/hybrid-pip.yaml +5 -0
  27. package/plugins/generations/video-gen/presets/styles/daily-ai.yaml +5 -0
  28. package/plugins/generations/video-gen/presets/styles/neutral.yaml +3 -0
  29. package/plugins/generations/video-gen/python/colab_comfyui_h3.py +322 -0
  30. package/plugins/generations/video-gen/python/comfyui-h3-i2v-api.json +47 -0
  31. package/plugins/generations/video-gen/python/comfyui-h3-models.json +32 -0
  32. package/plugins/generations/video-gen/python/comfyui_model_cache.py +388 -0
  33. package/plugins/generations/video-gen/python/drive_client.py +187 -0
  34. package/plugins/generations/video-gen/src/brief-cli.ts +65 -0
  35. package/plugins/generations/video-gen/src/brief.ts +464 -0
  36. package/plugins/generations/video-gen/src/ccu-ledger.ts +206 -3
  37. package/plugins/generations/video-gen/src/colab-runner.ts +346 -35
  38. package/plugins/generations/video-gen/src/index.ts +141 -109
  39. package/plugins/generations/video-gen/src/inputs.ts +162 -4
  40. package/plugins/generations/video-gen/src/layout.ts +33 -0
  41. package/plugins/generations/video-gen/src/props.ts +27 -3
  42. package/plugins/generations/video-gen/src/remotion/AvatarReel.tsx +17 -1
  43. package/plugins/generations/video-gen/src/remotion/EditorialReel.tsx +17 -1
  44. package/plugins/generations/video-gen/src/remotion/Root.tsx +2 -0
  45. package/plugins/generations/video-gen/src/remotion/engine.ts +3 -7
  46. package/plugins/generations/video-gen/src/render.ts +25 -0
  47. package/plugins/generations/video-gen/src/request.ts +150 -20
  48. package/plugins/generations/video-gen/src/visual-provider.ts +116 -3
  49. package/plugins/generations/voice-gen/dist/index.js +14 -1
  50. package/plugins/generations/voxcpm-tts/dist/index.js +14 -1
  51. package/plugins/ingestions/aihot-ingest/dist/index.js +14 -1
  52. package/plugins/ingestions/horizon-ingest/dist/index.js +14 -1
  53. package/plugins/ingestions/last30days-ingest/dist/index.js +14 -1
  54. package/plugins/ingestions/web-search/dist/index.js +14 -1
  55. package/plugins/kk/config.example.yaml +1 -1
  56. package/plugins/kk/mcp-tools.yaml +47 -0
  57. package/plugins/kk/plugin.json +1 -1
  58. package/plugins/kk/publish-presets/itc-surfdash-locales.json +42 -0
  59. package/plugins/kk/scripts/daily-stages.ts +87 -6
  60. package/plugins/kk/scripts/kk-workflow-stages.ts +64 -9
  61. package/plugins/kk/scripts/video-stages.ts +332 -0
  62. package/plugins/kk/scripts/wiki-normalize-audio.ts +354 -0
  63. package/plugins/kk/scripts/wiki-normalize-document.ts +495 -0
  64. package/plugins/kk/scripts/wiki-normalize-stages.ts +96 -0
  65. package/plugins/kk/scripts/wiki-stage-runtime.ts +39 -0
  66. package/plugins/kk/skills/news-editorial/SKILL.md +2 -1
  67. package/plugins/kk/workflows/kk-collect.yaml +10 -0
  68. package/plugins/kk/workflows/kk-news-generate.yaml +70 -8
  69. package/plugins/kk/workflows/kk-smart-seo.yaml +8 -0
  70. package/plugins/kk/workflows/kk-storm-research.yaml +10 -0
  71. package/plugins/kk/workflows/kk-video-generate.yaml +169 -0
  72. package/plugins/kk/workflows/kk-wiki-digest.yaml +49 -0
  73. package/plugins/publishings/bilibili-pub/dist/index.js +281 -268
  74. package/plugins/publishings/bilibili-pub/dist/profile-check.js +202 -0
  75. package/plugins/publishings/cnblogs-pub/dist/index.js +281 -268
  76. package/plugins/publishings/cnblogs-pub/dist/profile-check.js +202 -0
  77. package/plugins/publishings/csdn-pub/dist/index.js +281 -268
  78. package/plugins/publishings/csdn-pub/dist/profile-check.js +216 -1
  79. package/plugins/publishings/emdash-pub/dist/index.js +33 -3
  80. package/plugins/publishings/infoq-pub/dist/index.js +281 -268
  81. package/plugins/publishings/infoq-pub/dist/profile-check.js +216 -1
  82. package/plugins/publishings/jike-pub/dist/index.js +281 -268
  83. package/plugins/publishings/jike-pub/dist/profile-check.js +216 -1
  84. package/plugins/publishings/juejin-pub/dist/index.js +281 -268
  85. package/plugins/publishings/juejin-pub/dist/profile-check.js +216 -1
  86. package/plugins/publishings/linkedin-pub/dist/index.js +281 -268
  87. package/plugins/publishings/linkedin-pub/dist/profile-check.js +216 -1
  88. package/plugins/publishings/medium-pub/dist/index.js +281 -268
  89. package/plugins/publishings/medium-pub/dist/profile-check.js +216 -1
  90. package/plugins/publishings/podcast-pub/dist/index.js +39 -9
  91. package/plugins/publishings/qiita-pub/dist/index.js +33 -3
  92. package/plugins/publishings/shipinhao-pub/dist/index.js +281 -268
  93. package/plugins/publishings/shipinhao-pub/dist/profile-check.js +175 -0
  94. package/plugins/publishings/sspai-pub/dist/index.js +281 -268
  95. package/plugins/publishings/sspai-pub/dist/profile-check.js +202 -0
  96. package/plugins/publishings/substack-pub/dist/index.js +281 -268
  97. package/plugins/publishings/substack-pub/dist/profile-check.js +216 -1
  98. package/plugins/publishings/surfdash-pub/dist/index.js +99 -39
  99. package/plugins/publishings/surfdash-pub/plugin.json +54 -0
  100. package/plugins/publishings/surfdash-pub/src/index.ts +36 -5
  101. package/plugins/publishings/threads-pub/dist/index.js +281 -268
  102. package/plugins/publishings/threads-pub/dist/profile-check.js +216 -1
  103. package/plugins/publishings/wechatmp-pub/dist/index.js +665 -451
  104. package/plugins/publishings/wechatmp-pub/dist/profile-check.js +215 -3
  105. package/plugins/publishings/weibo-pub/dist/index.js +281 -268
  106. package/plugins/publishings/weibo-pub/dist/profile-check.js +189 -1
  107. package/plugins/publishings/x-pub/dist/index.js +281 -268
  108. package/plugins/publishings/x-pub/dist/profile-check.js +216 -1
  109. package/plugins/publishings/xhs-pub/dist/index.js +281 -268
  110. package/plugins/publishings/xhs-pub/dist/profile-check.js +119 -1
  111. package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +281 -268
  112. package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +202 -0
  113. package/plugins/publishings/youtube-pub/dist/index.js +14 -1
  114. package/plugins/publishings/zenn-pub/dist/index.js +37 -7
@@ -58,6 +58,41 @@ function isHttpOrigin(origin) {
58
58
  return false;
59
59
  return url.pathname === "/" && url.search === "" && url.hash === "";
60
60
  }
61
+ function parseExternalJobs(raw) {
62
+ if (typeof raw !== "object" || raw === null)
63
+ return null;
64
+ const items = raw.items;
65
+ if (!Array.isArray(items))
66
+ return null;
67
+ const states = new Set(["admitting", "pending", "running", "succeeded", "failed"]);
68
+ const rows = [];
69
+ for (const entry of items) {
70
+ if (typeof entry !== "object" || entry === null)
71
+ return null;
72
+ const row = entry;
73
+ if (typeof row.key !== "string" || typeof row.runId !== "string" || typeof row.workflow !== "string") {
74
+ return null;
75
+ }
76
+ if (typeof row.state !== "string" || !states.has(row.state))
77
+ return null;
78
+ rows.push({
79
+ key: row.key,
80
+ node: typeof row.node === "string" ? row.node : "",
81
+ provider: typeof row.provider === "string" ? row.provider : null,
82
+ jobId: typeof row.jobId === "string" ? row.jobId : null,
83
+ state: row.state,
84
+ progress: typeof row.progress === "number" ? row.progress : null,
85
+ message: typeof row.message === "string" ? row.message : null,
86
+ submittedAt: typeof row.submittedAt === "string" ? row.submittedAt : "",
87
+ elapsedMs: typeof row.elapsedMs === "number" ? row.elapsedMs : 0,
88
+ ...typeof row.admission === "object" && row.admission !== null ? { admission: row.admission } : {},
89
+ runId: row.runId,
90
+ workflow: row.workflow,
91
+ runStatus: typeof row.runStatus === "string" ? row.runStatus : ""
92
+ });
93
+ }
94
+ return { items: rows };
95
+ }
61
96
  function boardBasePath(pathname) {
62
97
  const board = pathname.indexOf("/board/");
63
98
  return board === -1 ? "" : pathname.slice(0, board);
@@ -112,7 +147,40 @@ function createBoardClient(options) {
112
147
  });
113
148
  return { status: response.status, body: await response.json() };
114
149
  },
115
- progress: (runId) => getJson(`${board}/api/runs/${encodeURIComponent(runId)}/progress`)
150
+ progress: (runId) => getJson(`${board}/api/runs/${encodeURIComponent(runId)}/progress`),
151
+ externalJobs: async (status = "active") => {
152
+ const params = new URLSearchParams({ status });
153
+ return parseExternalJobs(await getJson(`${board}/api/runs/external-jobs?${params.toString()}`));
154
+ },
155
+ wikiComputationRuns: (vaultId, pagePath, cursor) => {
156
+ const params = new URLSearchParams({ path: pagePath });
157
+ if (cursor !== undefined)
158
+ params.set("cursor", String(cursor));
159
+ return getJson(`${moduleApi}/api/wiki/vaults/${encodeURIComponent(vaultId)}/computations/runs?${params.toString()}`);
160
+ },
161
+ wikiComputationRunDetail: (vaultId, runId) => getJson(`${moduleApi}/api/wiki/vaults/${encodeURIComponent(vaultId)}/computation-runs/${encodeURIComponent(runId)}`),
162
+ wikiComputationPreview: async (vaultId, body) => {
163
+ const response = await doFetch(`${moduleApi}/api/wiki/vaults/${encodeURIComponent(vaultId)}/computations/actions/preview`, {
164
+ method: "POST",
165
+ headers: { "content-type": "application/json", "x-kk-action": "1" },
166
+ body: JSON.stringify(body)
167
+ });
168
+ return {
169
+ status: response.status,
170
+ body: await response.json()
171
+ };
172
+ },
173
+ wikiComputationConfirm: async (vaultId, token) => {
174
+ const response = await doFetch(`${moduleApi}/api/wiki/vaults/${encodeURIComponent(vaultId)}/computations/actions/confirm`, {
175
+ method: "POST",
176
+ headers: { "content-type": "application/json", "x-kk-action": "1" },
177
+ body: JSON.stringify({ token })
178
+ });
179
+ return {
180
+ status: response.status,
181
+ body: await response.json()
182
+ };
183
+ }
116
184
  };
117
185
  }
118
186