@gobing-ai/knowledge-kit 0.1.2 → 0.1.3

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 (69) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/board/collect/index.css +178 -0
  3. package/dist/board/collect/index.js +1164 -345
  4. package/dist/board/daily-voice/index.css +178 -0
  5. package/dist/board/daily-voice/index.js +32 -8
  6. package/dist/board/itc/index.css +178 -0
  7. package/dist/board/itc/index.js +32 -8
  8. package/dist/index.js +3991 -3032
  9. package/package.json +4 -4
  10. package/plugins/generations/content-gen/dist/index.js +11 -11
  11. package/plugins/generations/core-facts-gen/dist/index.js +14 -14
  12. package/plugins/generations/daily-article-gen/dist/index.js +14 -14
  13. package/plugins/generations/dailynews-gen/dist/index.js +11 -11
  14. package/plugins/generations/episode-plan-gen/dist/index.js +14 -14
  15. package/plugins/generations/gemini-tts/dist/index.js +11 -11
  16. package/plugins/generations/image-gen/dist/index.js +11 -11
  17. package/plugins/generations/news-report-gen/dist/index.js +14 -14
  18. package/plugins/generations/voice-gen/dist/index.js +11 -11
  19. package/plugins/generations/voxcpm-tts/dist/index.js +11 -11
  20. package/plugins/ingestions/aihot-ingest/dist/index.js +14 -14
  21. package/plugins/ingestions/horizon-ingest/dist/index.js +14 -14
  22. package/plugins/ingestions/karakeep-local/dist/index.js +15 -15
  23. package/plugins/ingestions/last30days-ingest/dist/index.js +14 -14
  24. package/plugins/ingestions/web-search/dist/index.js +12 -12
  25. package/plugins/kk/commands/workflow-run.md +8 -4
  26. package/plugins/kk/decisions/extract/ai-news.yaml +7 -1
  27. package/plugins/kk/plugin.json +1 -1
  28. package/plugins/kk/scripts/kk-workflow-stages.ts +4 -3
  29. package/plugins/kk/workflows/feature-verification.yaml +1 -9
  30. package/plugins/kk/workflows/kk-itc-author.yaml +12 -9
  31. package/plugins/kk/workflows/kk-itc-publish-tail.yaml +90 -0
  32. package/plugins/kk/workflows/kk-solo-podcast.yaml +6 -0
  33. package/plugins/publishings/bilibili-pub/dist/index.js +24 -24
  34. package/plugins/publishings/bilibili-pub/dist/profile-check.js +83 -32
  35. package/plugins/publishings/cnblogs-pub/dist/index.js +24 -24
  36. package/plugins/publishings/cnblogs-pub/dist/profile-check.js +83 -32
  37. package/plugins/publishings/csdn-pub/dist/index.js +24 -24
  38. package/plugins/publishings/csdn-pub/dist/profile-check.js +83 -32
  39. package/plugins/publishings/emdash-pub/dist/index.js +11 -11
  40. package/plugins/publishings/infoq-pub/dist/index.js +24 -24
  41. package/plugins/publishings/infoq-pub/dist/profile-check.js +83 -32
  42. package/plugins/publishings/jike-pub/dist/index.js +24 -24
  43. package/plugins/publishings/jike-pub/dist/profile-check.js +83 -32
  44. package/plugins/publishings/juejin-pub/dist/index.js +24 -24
  45. package/plugins/publishings/juejin-pub/dist/profile-check.js +83 -32
  46. package/plugins/publishings/medium-pub/dist/index.js +11 -11
  47. package/plugins/publishings/podcast-pub/dist/index.js +11 -11
  48. package/plugins/publishings/qiita-pub/dist/index.js +11 -11
  49. package/plugins/publishings/shipinhao-pub/dist/index.js +24 -24
  50. package/plugins/publishings/shipinhao-pub/dist/profile-check.js +83 -32
  51. package/plugins/publishings/sspai-pub/dist/index.js +24 -24
  52. package/plugins/publishings/sspai-pub/dist/profile-check.js +83 -32
  53. package/plugins/publishings/substack-pub/dist/index.js +24 -24
  54. package/plugins/publishings/substack-pub/dist/profile-check.js +83 -32
  55. package/plugins/publishings/surfdash-pub/dist/index.js +11 -11
  56. package/plugins/publishings/threads-pub/dist/index.js +11 -11
  57. package/plugins/publishings/wechatmp-pub/dist/index.js +29 -25
  58. package/plugins/publishings/wechatmp-pub/dist/profile-check.js +24 -24
  59. package/plugins/publishings/wechatmp-pub/src/modes.ts +11 -1
  60. package/plugins/publishings/weibo-pub/dist/index.js +24 -24
  61. package/plugins/publishings/weibo-pub/dist/profile-check.js +83 -32
  62. package/plugins/publishings/x-pub/dist/index.js +24 -24
  63. package/plugins/publishings/x-pub/dist/profile-check.js +83 -32
  64. package/plugins/publishings/x-pub/plugin.json +18 -0
  65. package/plugins/publishings/xhs-pub/dist/index.js +24 -24
  66. package/plugins/publishings/xhs-pub/dist/profile-check.js +24 -24
  67. package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +24 -24
  68. package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +83 -32
  69. package/plugins/publishings/zenn-pub/dist/index.js +11 -11
@@ -27,7 +27,7 @@ var __esm = (fn, res, err) => () => {
27
27
  };
28
28
  var __require = import.meta.require;
29
29
 
30
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/errors.js
30
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/errors.js
31
31
  var ErrorCode;
32
32
  var init_errors = __esm(() => {
33
33
  ErrorCode = {
@@ -38,7 +38,7 @@ var init_errors = __esm(() => {
38
38
  };
39
39
  });
40
40
 
41
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/api-response.js
41
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/api-response.js
42
42
  var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
43
43
  var init_api_response = __esm(() => {
44
44
  init_errors();
@@ -61,13 +61,13 @@ var init_api_response = __esm(() => {
61
61
  CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
62
62
  });
63
63
 
64
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/cursor.js
64
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/cursor.js
65
65
  var init_cursor = () => {};
66
66
 
67
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
67
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
68
68
  var init_event_severity = () => {};
69
69
 
70
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/output.js
70
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/output.js
71
71
  function processStream(name) {
72
72
  const proc = globalThis.process;
73
73
  const stream = proc?.[name];
@@ -85,7 +85,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
85
85
  }
86
86
  var defaultStderrTarget;
87
87
 
88
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/index.js
88
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/index.js
89
89
  var init_dist = __esm(() => {
90
90
  init_api_response();
91
91
  init_cursor();
@@ -11611,7 +11611,7 @@ var init_zod = __esm(() => {
11611
11611
  init_external();
11612
11612
  });
11613
11613
 
11614
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.28+531271cb50a1e275/node_modules/@gobing-ai/ts-runtime/dist/config.js
11614
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/config.js
11615
11615
  var configSchema;
11616
11616
  var init_config = __esm(() => {
11617
11617
  init_dist2();
@@ -11635,7 +11635,7 @@ var init_config = __esm(() => {
11635
11635
  });
11636
11636
  });
11637
11637
 
11638
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.28+531271cb50a1e275/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
11638
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
11639
11639
  import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
11640
11640
  import { dirname, resolve as resolvePath } from "path";
11641
11641
  function createNodeFileSystem(root, paths) {
@@ -11653,11 +11653,11 @@ function createNodeFileSystem(root, paths) {
11653
11653
  const lines = buffer.split(/\r?\n/);
11654
11654
  buffer = lines.pop() ?? "";
11655
11655
  for (const line of lines) {
11656
- yield line;
11656
+ yield { text: line, terminated: true };
11657
11657
  }
11658
11658
  }
11659
11659
  if (buffer.length > 0)
11660
- yield buffer;
11660
+ yield { text: buffer, terminated: false };
11661
11661
  },
11662
11662
  writeFile: (path, content) => {
11663
11663
  ensureParentDir(path);
@@ -13857,7 +13857,7 @@ var ConfigError = class extends Error {
13857
13857
  }
13858
13858
  };
13859
13859
 
13860
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.5.28+10b6b623ece42801/node_modules/@gobing-ai/ts-infra/dist/logger.js
13860
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.5.30+72430983864a6768/node_modules/@gobing-ai/ts-infra/dist/logger.js
13861
13861
  var ROOT_CATEGORY = "app";
13862
13862
  function toLogTapeLevel(level) {
13863
13863
  return level === "warn" ? "warning" : level;
@@ -13926,14 +13926,14 @@ async function initializeLogger(options = {}) {
13926
13926
  throw error;
13927
13927
  }
13928
13928
  }
13929
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.28+531271cb50a1e275/node_modules/@gobing-ai/ts-runtime/dist/index.js
13929
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
13930
13930
  init_file_system_node();
13931
13931
  init_config();
13932
13932
 
13933
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.28+531271cb50a1e275/node_modules/@gobing-ai/ts-runtime/dist/fs.js
13933
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/fs.js
13934
13934
  init_file_system_node();
13935
13935
 
13936
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.28+531271cb50a1e275/node_modules/@gobing-ai/ts-runtime/dist/path.js
13936
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/path.js
13937
13937
  function normalizeSeparators(path) {
13938
13938
  return path.replaceAll("\\", "/");
13939
13939
  }
@@ -13950,7 +13950,7 @@ function joinPath(...segments) {
13950
13950
  return absolute ? joined : joined.replace(/^\//, "");
13951
13951
  }
13952
13952
 
13953
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.28+531271cb50a1e275/node_modules/@gobing-ai/ts-runtime/dist/fs.js
13953
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/fs.js
13954
13954
  async function walkDir(path, fs = createNodeFileSystem(), exclude) {
13955
13955
  const startReal = fs.realPath?.(path) ?? path;
13956
13956
  const visited = new Set([startReal]);
@@ -4813,7 +4813,7 @@ var init_zod = __esm(() => {
4813
4813
  init_external();
4814
4814
  });
4815
4815
 
4816
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/errors.js
4816
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/errors.js
4817
4817
  var ErrorCode;
4818
4818
  var init_errors3 = __esm(() => {
4819
4819
  ErrorCode = {
@@ -4824,7 +4824,7 @@ var init_errors3 = __esm(() => {
4824
4824
  };
4825
4825
  });
4826
4826
 
4827
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/api-response.js
4827
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/api-response.js
4828
4828
  var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
4829
4829
  var init_api_response = __esm(() => {
4830
4830
  init_errors3();
@@ -4847,13 +4847,13 @@ var init_api_response = __esm(() => {
4847
4847
  CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
4848
4848
  });
4849
4849
 
4850
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/cursor.js
4850
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/cursor.js
4851
4851
  var init_cursor = () => {};
4852
4852
 
4853
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
4853
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
4854
4854
  var init_event_severity = () => {};
4855
4855
 
4856
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/output.js
4856
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/output.js
4857
4857
  function processStream(name) {
4858
4858
  const proc = globalThis.process;
4859
4859
  const stream = proc?.[name];
@@ -4871,7 +4871,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
4871
4871
  }
4872
4872
  var defaultStderrTarget;
4873
4873
 
4874
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/index.js
4874
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/index.js
4875
4875
  var init_dist = __esm(() => {
4876
4876
  init_api_response();
4877
4877
  init_cursor();
@@ -11869,7 +11869,7 @@ var init_dist2 = __esm(() => {
11869
11869
  $visitAsync = visit.visitAsync;
11870
11870
  });
11871
11871
 
11872
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.28+531271cb50a1e275/node_modules/@gobing-ai/ts-runtime/dist/config.js
11872
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/config.js
11873
11873
  var configSchema;
11874
11874
  var init_config = __esm(() => {
11875
11875
  init_dist2();
@@ -11893,7 +11893,7 @@ var init_config = __esm(() => {
11893
11893
  });
11894
11894
  });
11895
11895
 
11896
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.28+531271cb50a1e275/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
11896
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
11897
11897
  import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
11898
11898
  import { dirname, resolve as resolvePath } from "path";
11899
11899
  function createNodeFileSystem(root, paths) {
@@ -11911,11 +11911,11 @@ function createNodeFileSystem(root, paths) {
11911
11911
  const lines = buffer.split(/\r?\n/);
11912
11912
  buffer = lines.pop() ?? "";
11913
11913
  for (const line of lines) {
11914
- yield line;
11914
+ yield { text: line, terminated: true };
11915
11915
  }
11916
11916
  }
11917
11917
  if (buffer.length > 0)
11918
- yield buffer;
11918
+ yield { text: buffer, terminated: false };
11919
11919
  },
11920
11920
  writeFile: (path, content) => {
11921
11921
  ensureParentDir(path);
@@ -12250,14 +12250,14 @@ var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx)
12250
12250
  });
12251
12251
  }
12252
12252
  });
12253
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.28+531271cb50a1e275/node_modules/@gobing-ai/ts-runtime/dist/index.js
12253
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
12254
12254
  init_file_system_node();
12255
12255
  init_config();
12256
12256
 
12257
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.28+531271cb50a1e275/node_modules/@gobing-ai/ts-runtime/dist/fs.js
12257
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/fs.js
12258
12258
  init_file_system_node();
12259
12259
 
12260
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.28+531271cb50a1e275/node_modules/@gobing-ai/ts-runtime/dist/path.js
12260
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/path.js
12261
12261
  function normalizeSeparators(path) {
12262
12262
  return path.replaceAll("\\", "/");
12263
12263
  }
@@ -12291,7 +12291,7 @@ function dirnamePath(path) {
12291
12291
  return normalized.slice(0, index);
12292
12292
  }
12293
12293
 
12294
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.28+531271cb50a1e275/node_modules/@gobing-ai/ts-runtime/dist/fs.js
12294
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/fs.js
12295
12295
  async function ensureDirForFile(path, fs = createNodeFileSystem()) {
12296
12296
  await fs.ensureDir(dirnamePath(path));
12297
12297
  }
@@ -4827,7 +4827,7 @@ var init_zod = __esm(() => {
4827
4827
  init_external();
4828
4828
  });
4829
4829
 
4830
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/errors.js
4830
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/errors.js
4831
4831
  var ErrorCode;
4832
4832
  var init_errors3 = __esm(() => {
4833
4833
  ErrorCode = {
@@ -4838,7 +4838,7 @@ var init_errors3 = __esm(() => {
4838
4838
  };
4839
4839
  });
4840
4840
 
4841
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/api-response.js
4841
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/api-response.js
4842
4842
  var API_ERROR_CODES, ERROR_CODE_TO_HTTP, CLIENT_SAFE_CODES;
4843
4843
  var init_api_response = __esm(() => {
4844
4844
  init_errors3();
@@ -4861,13 +4861,13 @@ var init_api_response = __esm(() => {
4861
4861
  CLIENT_SAFE_CODES = new Set([ErrorCode.NotFound, ErrorCode.Validation, ErrorCode.Conflict]);
4862
4862
  });
4863
4863
 
4864
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/cursor.js
4864
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/cursor.js
4865
4865
  var init_cursor = () => {};
4866
4866
 
4867
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
4867
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/event-severity.js
4868
4868
  var init_event_severity = () => {};
4869
4869
 
4870
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/output.js
4870
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/output.js
4871
4871
  function processStream(name) {
4872
4872
  const proc = globalThis.process;
4873
4873
  const stream = proc?.[name];
@@ -4885,7 +4885,7 @@ function echoError(message, target = defaultStderrTarget ?? processStream("stder
4885
4885
  }
4886
4886
  var defaultStderrTarget;
4887
4887
 
4888
- // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.28/node_modules/@gobing-ai/ts-utils/dist/index.js
4888
+ // ../../node_modules/.bun/@gobing-ai+ts-utils@0.5.30/node_modules/@gobing-ai/ts-utils/dist/index.js
4889
4889
  var init_dist = __esm(() => {
4890
4890
  init_api_response();
4891
4891
  init_cursor();
@@ -11883,7 +11883,7 @@ var init_dist2 = __esm(() => {
11883
11883
  $visitAsync = visit.visitAsync;
11884
11884
  });
11885
11885
 
11886
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.28+531271cb50a1e275/node_modules/@gobing-ai/ts-runtime/dist/config.js
11886
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/config.js
11887
11887
  var configSchema;
11888
11888
  var init_config = __esm(() => {
11889
11889
  init_dist2();
@@ -11907,7 +11907,7 @@ var init_config = __esm(() => {
11907
11907
  });
11908
11908
  });
11909
11909
 
11910
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.28+531271cb50a1e275/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
11910
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/file-system-node.js
11911
11911
  import { appendFileSync, cpSync, createReadStream, createWriteStream, existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "fs";
11912
11912
  import { dirname, resolve as resolvePath } from "path";
11913
11913
  function createNodeFileSystem(root, paths) {
@@ -11925,11 +11925,11 @@ function createNodeFileSystem(root, paths) {
11925
11925
  const lines = buffer.split(/\r?\n/);
11926
11926
  buffer = lines.pop() ?? "";
11927
11927
  for (const line of lines) {
11928
- yield line;
11928
+ yield { text: line, terminated: true };
11929
11929
  }
11930
11930
  }
11931
11931
  if (buffer.length > 0)
11932
- yield buffer;
11932
+ yield { text: buffer, terminated: false };
11933
11933
  },
11934
11934
  writeFile: (path, content) => {
11935
11935
  ensureParentDir(path);
@@ -12269,7 +12269,7 @@ var PluginManifestSchema = PluginManifestSchemaBase.superRefine((manifest, ctx)
12269
12269
  });
12270
12270
  }
12271
12271
  });
12272
- // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.28+531271cb50a1e275/node_modules/@gobing-ai/ts-runtime/dist/index.js
12272
+ // ../../node_modules/.bun/@gobing-ai+ts-runtime@0.5.30+fa3ca66e1fba4d51/node_modules/@gobing-ai/ts-runtime/dist/index.js
12273
12273
  init_file_system_node();
12274
12274
  init_config();
12275
12275
 
@@ -14400,7 +14400,7 @@ var ConfigError = class extends Error {
14400
14400
  }
14401
14401
  };
14402
14402
 
14403
- // ../../node_modules/.bun/@gobing-ai+ts-infra@0.5.28+10b6b623ece42801/node_modules/@gobing-ai/ts-infra/dist/logger.js
14403
+ // ../../node_modules/.bun/@gobing-ai+ts-infra@0.5.30+72430983864a6768/node_modules/@gobing-ai/ts-infra/dist/logger.js
14404
14404
  var ROOT_CATEGORY = "app";
14405
14405
  function toLogTapeLevel(level) {
14406
14406
  return level === "warn" ? "warning" : level;
@@ -67,22 +67,26 @@ Resolve these before step 2: `NAME`, `TOPIC`, `INPUT_FILE` (empty in sentence mo
67
67
 
68
68
  ```bash
69
69
  install -d "$(dirname "$config_path")"
70
- cat > "$config_path" <<'EOF'
71
- works_dir: "$HOME/.config/kk/works"
72
- workflows_dir: "$HOME/.config/kk/workflows"
70
+ cat > "$config_path" <<EOF
71
+ works_dir: "$PWD/.works"
73
72
  defaults:
74
73
  maxResults: 8
75
74
  fixture: false
76
75
  EOF
77
76
  ```
78
77
 
78
+ `workflows_dir` is deliberately omitted (ADR-042): the shipped fallback chain is the primary
79
+ source, and a stale user override silently wins over newer package copies. `works_dir` is pinned
80
+ to the CURRENT directory's `.works` at creation time — the compiled default is cwd-relative, and
81
+ a headless/cron caller needs a fixed root.
82
+
79
83
  - **Unreadable / unparseable / invalid types** (e.g. `maxResults: "eight"`) → exit 1, stderr
80
84
  names the key and expected vs actual type; touch nothing.
81
85
  - Read the four values with precedence **command flag > env > file > compiled default**:
82
86
 
83
87
  | Value | Env override | Compiled default |
84
88
  | --- | --- | --- |
85
- | `works_dir` | `KK_WORKS_DIR` | `$HOME/.config/kk/works` |
89
+ | `works_dir` | `KK_WORKS_DIR` | `<cwd>/.works` (ADR-042) |
86
90
  | `workflows_dir` | `KK_WORKFLOWS_DIR` | `$HOME/.config/kk/workflows` |
87
91
  | `defaults.maxResults` | — | `8` |
88
92
  | `defaults.fixture` | — | `false` |
@@ -17,7 +17,13 @@ where:
17
17
  # heuristic labeler tops out at 1-2 and a gte-3 gate empties every real pool (task 0212 dogfood
18
18
  # finding). Raise this back when a full-text ingest source lands.
19
19
  kk-item-quality: { gte: 2 }
20
- kk-item-importance: { gte: 3 }
20
+ # importance 2, not 3 (2026-10-18): this profile selects the *pool*; the 3-cutoff belongs to
21
+ # `daily-qc-content`, which backfills importance-only rejects (`backfillToFloor`, 20261002) so a
22
+ # thin news day deepens instead of shipping a stub. A gte-3 gate here front-ran that backfill and
23
+ # made it dead code on the store path: on 2026-10-18 the run closed `done-no-content` with a
24
+ # 2-item / 9.1-min pool while six quality-2, importance-2 AI items sat in the same 24h window.
25
+ # The key still has to be present — an unjudged item stays excluded (fail-closed INNER join).
26
+ kk-item-importance: { gte: 2 }
21
27
  # Conservative moderation gate (task 0229 R5): 0-1 is "no reference to the political system" or
22
28
  # "a factual policy/government mention as news context". A `where` key is an INNER join on
23
29
  # `labels_current`, so an item with NO current china-politics answer is excluded (fail-closed) —
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "kk",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "knowledge-kit Claude Code plugin: skills, commands, subagents, hooks, and rules"
5
5
  }
@@ -674,7 +674,7 @@ function dailyPrepare(args: string[]): void {
674
674
  runDateArg = '',
675
675
  ] = args;
676
676
  // Empty work_dir composes the real workspace from the operator's works_dir
677
- // (workflow-run.md §2 precedence: KK_WORKS_DIR > config works_dir > ~/.config/kk/works):
677
+ // (workflow-run.md §2 precedence: KK_WORKS_DIR > config works_dir > <cwd>/.works):
678
678
  // $works_dir/kk-daily-ai-voice/<stamp>
679
679
  // The stamp is digits-only (dashes stripped from the caller's run_date, else today) so a
680
680
  // resumed/retried run whose persisted run_date var already carries the digits-only
@@ -745,7 +745,8 @@ function expandHome(p: string): string {
745
745
 
746
746
  /**
747
747
  * works_dir for composed daily workspaces — workflow-run.md §2 precedence:
748
- * KK_WORKS_DIR env > config works_dir > compiled default ~/.config/kk/works.
748
+ * KK_WORKS_DIR env > config works_dir > compiled default <cwd>/.works (ADR: the config root
749
+ * holds no disposable data; matches collect-prepare's cwd-relative `.works`).
749
750
  * Unreadable/unparseable config falls through to the default (pluginEnvFromConfig
750
751
  * tolerates the same), never fails the run.
751
752
  */
@@ -762,7 +763,7 @@ function resolveWorksDir(): string {
762
763
  // fall through to the compiled default
763
764
  }
764
765
  }
765
- return join(homedir(), '.config/kk/works');
766
+ return resolve(process.cwd(), '.works');
766
767
  }
767
768
 
768
769
  /**
@@ -52,14 +52,6 @@ vars:
52
52
  featureId: "X"
53
53
  spurBin: "spur"
54
54
  verificationCmd: "bun run spur-check"
55
- # Operator-declared confidence level; empty derives it from the pass (HIGH when the selected
56
- # definition's own command exited 0 with an unchanged proof-input digest, MEDIUM under a caller
57
- # `--cmd` override, LOW otherwise). The completion boundary refuses a PASS carrying no level or
58
- # LOW unless the receipt records the acknowledgement below.
59
- confidence: ""
60
- # Operator acknowledgement of a LOW level. It rides the receipt, so the transition reads it from
61
- # the evidence rather than from whatever flags a later command happens to pass.
62
- ackLowConfidence: "false"
63
55
  __runId: ""
64
56
 
65
57
  states:
@@ -73,7 +65,7 @@ states:
73
65
  - kind: shell
74
66
  options:
75
67
  command: >-
76
- mkdir -p .spur/run; ACK=""; [ "$ackLowConfidence" = "true" ] && ACK="--ack-low-confidence"; $spurBin feature verify "$featureId" --run-id "$__runId" --confidence "$confidence" $ACK --no-logo || printf 'FAIL feature-verification failed closed — spur feature verify exited nonzero\n' > ".spur/run/$__runId-feature-verification.status"; exit 0
68
+ mkdir -p .spur/run; $spurBin feature verify "$featureId" --run-id "$__runId" --no-logo || printf 'FAIL feature-verification failed closed — spur feature verify exited nonzero\n' > ".spur/run/$__runId-feature-verification.status"; exit 0
77
69
 
78
70
  - id: done
79
71
  description: Terminal — repo-wide checks passed and the receipt is bound.
@@ -37,17 +37,14 @@ states:
37
37
  onEnter:
38
38
  - kind: shell
39
39
  options:
40
+ # jq one-liner, not a heredoc: this is a folded scalar (>-), so newlines become spaces
41
+ # and a heredoc body would land on cat's argv (dogfood 2026-10-16: "cat: {: No such file").
40
42
  command: >-
41
43
  mkdir -p "${vars.work_dir}/.itc" &&
42
- cat <<EOF > "${vars.work_dir}/.itc/author-run.json"
43
- {
44
- "schemaVersion": 1,
45
- "parentRunId": "${vars.parent_run_id}",
46
- "childRunId": "${vars.child_run_id}",
47
- "definitionDigest": "${vars.definition_digest}",
48
- "optionsDigest": "${vars.options_digest}"
49
- }
50
- EOF
44
+ jq -n --arg p "${vars.parent_run_id}" --arg c "${vars.child_run_id}"
45
+ --arg d "${vars.definition_digest}" --arg o "${vars.options_digest}"
46
+ '{schemaVersion:1, parentRunId:$p, childRunId:$c, definitionDigest:$d, optionsDigest:$o}'
47
+ > "${vars.work_dir}/.itc/author-run.json"
51
48
 
52
49
  - id: outline-write
53
50
  description: "Generate outline options a, b (and optional c) via writer skill"
@@ -79,6 +76,9 @@ states:
79
76
  - b
80
77
  - c
81
78
  var: __hitlAnswer
79
+ # The auto paths bypass this state by edge guard, so this gate always asks the operator.
80
+ decision:
81
+ mode: never
82
82
 
83
83
  - id: outline-autopick
84
84
  description: "Auto mode — validate the writer's recommendation, then bind the bounded catalog decision (empty on defer)"
@@ -144,6 +144,9 @@ states:
144
144
  options:
145
145
  prompt: "Review draft at ${vars.work_dir}/3-draft-draft-article.md. Approve?"
146
146
  var: __hitlAnswer
147
+ # The auto paths bypass this state by edge guard, so this gate always asks the operator.
148
+ decision:
149
+ mode: never
147
150
 
148
151
  - id: draft-revise
149
152
  description: "Collect revision feedback from operator (bounded by 3 rounds)"
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: kk-itc-publish-tail
3
+ kind: dag
4
+ version: "2"
5
+ description: >-
6
+ Re-entry seam for a failed kk-itc publish run: the seven post-authoring nodes only, so no
7
+ invocation can re-run authoring, and send-confirm keeps the live-send approval. Re-enter with
8
+ `spur workflow run plugins/kk/workflows/kk-itc-publish-tail.yaml --vars '{"work_dir":"<failed work_dir>"}'`.
9
+ Run identity comes from the frozen `$work_dir/itc-options.json` parentRunId, never from this run.
10
+
11
+ vars:
12
+ work_dir: ""
13
+ # Declared for the engine's own injection; no tail node templates it (run identity is frozen).
14
+ __runId: ""
15
+ __definitionDigest: ""
16
+
17
+ nodes:
18
+ - id: check-targets
19
+ description: "Check readiness probes for plannable publish targets"
20
+ action:
21
+ kind: shell
22
+ options:
23
+ command: >-
24
+ test -f "${vars.work_dir}/4-publish/publish-plan.json" || exit 0;
25
+ kk stage run itc-check-targets "${vars.work_dir}"
26
+
27
+ - id: send-confirm
28
+ description: >-
29
+ Operator approval of a LIVE send: `pause: true` stops the run and RESUME is the approval
30
+ (no action); cancelling is the rejection. Skipped for draft-only or empty plans.
31
+ dependsOn:
32
+ - check-targets
33
+ pause: true
34
+ condition:
35
+ kind: shell
36
+ options:
37
+ command: 'jq -e ".live == true and (.targets // [] | length) > 0" "${vars.work_dir}/4-publish/publish-plan.json" >/dev/null 2>&1'
38
+
39
+ - id: fanout-send
40
+ description: "Dispatch target payloads via executor fan-out and record receipts"
41
+ dependsOn:
42
+ - send-confirm
43
+ action:
44
+ kind: shell
45
+ options:
46
+ command: >-
47
+ test -f "${vars.work_dir}/4-publish/publish-plan.json" || exit 0;
48
+ kk stage run itc-send-targets "${vars.work_dir}"
49
+
50
+ - id: fanout-recovery
51
+ description: "Retry safe effect-none target failures once within budget"
52
+ dependsOn:
53
+ - fanout-send
54
+ action:
55
+ kind: shell
56
+ options:
57
+ command: >-
58
+ test -f "${vars.work_dir}/4-publish/publish-plan.json" || exit 0;
59
+ kk stage run itc-send-targets "${vars.work_dir}" --retry
60
+
61
+ - id: reconcile-settle
62
+ description: "Reconcile target receipts and settle store selection"
63
+ dependsOn:
64
+ - fanout-recovery
65
+ action:
66
+ kind: shell
67
+ options:
68
+ command: >-
69
+ kk stage run itc-reconcile-receipts "${vars.work_dir}"
70
+
71
+ - id: seo
72
+ description: "Export SEO prepublish request and published pages handoffs"
73
+ action:
74
+ kind: shell
75
+ options:
76
+ command: >-
77
+ kk stage run itc-export-seo "${vars.work_dir}" "$(jq -r '.seo' "${vars.work_dir}/itc-options.json")"
78
+
79
+ - id: report
80
+ description: "Produce final run report summary"
81
+ # Every tail branch: a skipped optional branch still satisfies the edge, so an all-skipped
82
+ # publication reports, but a report never races an unfinished send.
83
+ dependsOn:
84
+ - reconcile-settle
85
+ - seo
86
+ action:
87
+ kind: shell
88
+ options:
89
+ command: >-
90
+ kk stage run itc-report-summary "${vars.work_dir}" "$(jq -r '.maxRevisions' "${vars.work_dir}/itc-options.json")"
@@ -98,6 +98,9 @@ states:
98
98
  - b
99
99
  - c
100
100
  var: __hitlAnswer
101
+ # No auto path skips this state, so the gate always asks the operator.
102
+ decision:
103
+ mode: never
101
104
 
102
105
  - id: outline-commit
103
106
  description: "Copy selected outline to outline-approved.md"
@@ -156,6 +159,9 @@ states:
156
159
  options:
157
160
  prompt: "Review VoiceScript at ${vars.work_dir}/3-script-voicescript.yaml. Approve for voice generation?"
158
161
  var: __hitlAnswer
162
+ # No auto path skips this state, so the gate always asks the operator.
163
+ decision:
164
+ mode: never
159
165
 
160
166
  - id: script-revise
161
167
  description: "Collect revision feedback from operator (bounded by 3 rounds)"