@gobing-ai/knowledge-kit 0.1.8 → 0.1.9

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 (30) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/board/collect/index.js +725 -1101
  3. package/dist/board/daily-voice/index.js +722 -101
  4. package/dist/board/itc/index.js +13 -0
  5. package/dist/index.js +1792 -102
  6. package/package.json +1 -1
  7. package/plugins/ingestions/horizon-ingest/dist/index.js +24 -1
  8. package/plugins/ingestions/horizon-ingest/src/index.ts +34 -0
  9. package/plugins/kk/config.example.yaml +8 -0
  10. package/plugins/kk/plugin.json +1 -1
  11. package/plugins/kk/publish-presets/daily-ai-voice.json +123 -0
  12. package/plugins/kk/schedules/kk-daily-publish3-cn-peak.cron.tmpl +20 -0
  13. package/plugins/kk/schedules/kk-daily-publish3-overseas.cron.tmpl +17 -0
  14. package/plugins/kk/scripts/daily-stages.ts +580 -78
  15. package/plugins/kk/scripts/kk-workflow-stages.ts +11 -1
  16. package/plugins/kk/scripts/topic-boundary.json +18 -83
  17. package/plugins/kk/workflows/kk-collect.yaml +2 -0
  18. package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +75 -6
  19. package/plugins/kk/workflows/kk-daily-ai-voice3.yaml +842 -0
  20. package/plugins/kk/workflows/kk-daily-publish3.yaml +282 -0
  21. package/plugins/publishings/podcast-pub/README.md +65 -0
  22. package/plugins/publishings/podcast-pub/dist/index.js +1709 -274
  23. package/plugins/publishings/podcast-pub/plugin.json +1 -1
  24. package/plugins/publishings/podcast-pub/src/backfill.ts +465 -0
  25. package/plugins/publishings/podcast-pub/src/index.ts +211 -34
  26. package/plugins/publishings/podcast-pub/src/microfeed-client.ts +32 -3
  27. package/plugins/publishings/podcast-pub/src/seo.ts +1081 -0
  28. package/plugins/publishings/podcast-pub/src/show-notes.ts +71 -6
  29. package/plugins/publishings/surfdash-pub/dist/index.js +66 -5
  30. package/plugins/publishings/surfdash-pub/src/index.ts +94 -10
@@ -37,6 +37,14 @@ function storeSelectionsQueryString(query) {
37
37
  }
38
38
  return params.toString();
39
39
  }
40
+ function storeChannelsQueryString(query) {
41
+ const params = new URLSearchParams({
42
+ from: String(query.fromMs),
43
+ until: String(query.untilMs),
44
+ page: String(query.page)
45
+ });
46
+ return params.toString();
47
+ }
40
48
  var DEFAULT_READER_ORIGIN = "http://127.0.0.1:4340";
41
49
  function readerOriginFrom(search, defaultOrigin = DEFAULT_READER_ORIGIN) {
42
50
  const override = new URLSearchParams(search).get("kkApi");
@@ -112,6 +120,10 @@ function createBoardClient(options) {
112
120
  if (!isNativeSpur && !isLoopbackHttpOrigin(options.readerOrigin)) {
113
121
  throw new Error(`reader origin must be loopback http, got '${options.readerOrigin}'`);
114
122
  }
123
+ const aggregateReader = origin(options.aggregateReaderOrigin ?? DEFAULT_READER_ORIGIN);
124
+ if (!isLoopbackHttpOrigin(options.aggregateReaderOrigin ?? DEFAULT_READER_ORIGIN)) {
125
+ throw new Error(`aggregate reader origin must be loopback http, got '${options.aggregateReaderOrigin}'`);
126
+ }
115
127
  const doFetch = options.fetchImpl ?? fetch;
116
128
  async function getJson(url) {
117
129
  const response = await doFetch(url, { headers: { accept: "application/json" } });
@@ -506,6 +518,7 @@ function createBoardClient(options) {
506
518
  return getJson(path);
507
519
  },
508
520
  storeSelections: (query = {}) => isNativeSpur ? nativeStoreSelections(query) : getJson(`${reader}/api/workflows/kk-collect/store/selections?${storeSelectionsQueryString(query)}`),
521
+ storeChannels: (query) => getJson(`${aggregateReader}/api/workflows/kk-collect/store/channels?${storeChannelsQueryString(query)}`),
509
522
  runDetail: (runId) => getJson(`${board}/api/runs/${encodeURIComponent(runId)}`),
510
523
  progress: (runId) => getJson(`${board}/api/runs/${encodeURIComponent(runId)}/progress`)
511
524
  };