@gobing-ai/knowledge-kit 0.0.35 → 0.0.37

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 (124) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/README.md +1 -1
  3. package/dist/board/collect/index.css +42 -0
  4. package/dist/board/collect/index.js +787 -0
  5. package/dist/board/daily-voice/index.css +13 -0
  6. package/dist/board/daily-voice/index.js +902 -0
  7. package/dist/board/itc/index.css +14 -0
  8. package/dist/board/itc/index.js +1026 -0
  9. package/dist/index.js +12996 -10476
  10. package/package.json +10 -9
  11. package/plugins/generations/content-gen/dist/index.js +1015 -10814
  12. package/plugins/generations/content-gen/package.json +1 -1
  13. package/plugins/generations/core-facts-gen/dist/index.js +1002 -10801
  14. package/plugins/generations/core-facts-gen/package.json +1 -1
  15. package/plugins/generations/daily-article-gen/dist/index.js +1004 -10803
  16. package/plugins/generations/daily-article-gen/package.json +1 -1
  17. package/plugins/generations/dailynews-gen/dist/index.js +1111 -10888
  18. package/plugins/generations/dailynews-gen/package.json +1 -1
  19. package/plugins/generations/dailynews-gen/src/script-plan.ts +32 -0
  20. package/plugins/generations/episode-plan-gen/dist/index.js +1124 -10923
  21. package/plugins/generations/episode-plan-gen/package.json +1 -1
  22. package/plugins/generations/gemini-tts/dist/index.js +1104 -10903
  23. package/plugins/generations/gemini-tts/package.json +1 -1
  24. package/plugins/generations/image-gen/dist/index.js +1239 -11035
  25. package/plugins/generations/image-gen/package.json +1 -1
  26. package/plugins/generations/news-report-gen/dist/index.js +1048 -10847
  27. package/plugins/generations/news-report-gen/package.json +1 -1
  28. package/plugins/generations/voice-gen/dist/index.js +1062 -10861
  29. package/plugins/generations/voice-gen/package.json +1 -1
  30. package/plugins/generations/voxcpm-tts/README.md +72 -0
  31. package/plugins/generations/voxcpm-tts/dist/index.js +14006 -0
  32. package/plugins/generations/voxcpm-tts/package.json +16 -0
  33. package/plugins/generations/voxcpm-tts/plugin.json +6 -0
  34. package/plugins/generations/voxcpm-tts/profiles.json +10 -0
  35. package/plugins/generations/voxcpm-tts/pyproject.toml +9 -0
  36. package/plugins/generations/voxcpm-tts/python/worker.py +353 -0
  37. package/plugins/generations/voxcpm-tts/src/index.ts +42 -0
  38. package/plugins/generations/voxcpm-tts/src/voxcpm-client.ts +765 -0
  39. package/plugins/generations/voxcpm-tts/tsconfig.json +8 -0
  40. package/plugins/generations/voxcpm-tts/uv.lock +2571 -0
  41. package/plugins/ingestions/aihot-ingest/dist/index.js +1081 -10628
  42. package/plugins/ingestions/aihot-ingest/package.json +1 -1
  43. package/plugins/ingestions/horizon-ingest/dist/index.js +1013 -10812
  44. package/plugins/ingestions/horizon-ingest/package.json +1 -1
  45. package/plugins/ingestions/karakeep-local/dist/index.js +689 -10774
  46. package/plugins/ingestions/karakeep-local/package.json +1 -1
  47. package/plugins/ingestions/last30days-ingest/dist/index.js +1011 -10810
  48. package/plugins/ingestions/last30days-ingest/package.json +1 -1
  49. package/plugins/ingestions/web-search/dist/index.js +1250 -11033
  50. package/plugins/ingestions/web-search/package.json +1 -1
  51. package/plugins/kk/README.md +29 -2
  52. package/plugins/kk/plugin.json +1 -1
  53. package/plugins/kk/schedules/cron.tmpl +9 -1
  54. package/plugins/kk/schedules/kk-serve.launchd.plist.tmpl +79 -0
  55. package/plugins/kk/schedules/launchd.plist.tmpl +11 -1
  56. package/plugins/kk/scripts/daily-stages.ts +428 -46
  57. package/plugins/kk/scripts/daily-voice-style.zh.md +1 -1
  58. package/plugins/kk/scripts/kk-workflow-stages.ts +76 -146
  59. package/plugins/kk/skills/publish/SKILL.md +8 -4
  60. package/plugins/kk/workflows/feature-verification.yaml +93 -0
  61. package/plugins/kk/workflows/judge-gated-publish-example.yaml +1 -0
  62. package/plugins/kk/workflows/kk-collect.yaml +43 -11
  63. package/plugins/kk/workflows/kk-daily-ai-voice.yaml +4 -2
  64. package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +87 -16
  65. package/plugins/kk/workflows/kk-daily-safety.yaml +15 -2
  66. package/plugins/kk/workflows/kk-itc.yaml +8 -1
  67. package/plugins/kk/workflows/kk-solo-podcast.yaml +2 -0
  68. package/plugins/publishings/emdash-pub/dist/index.js +987 -10814
  69. package/plugins/publishings/emdash-pub/package.json +1 -1
  70. package/plugins/publishings/infoq-pub/dist/index.js +1928 -11444
  71. package/plugins/publishings/infoq-pub/dist/profile-check.js +1677 -11199
  72. package/plugins/publishings/infoq-pub/package.json +1 -1
  73. package/plugins/publishings/infoq-pub/plugin.json +5 -1
  74. package/plugins/publishings/juejin-pub/dist/index.js +1940 -11456
  75. package/plugins/publishings/juejin-pub/dist/profile-check.js +1677 -11199
  76. package/plugins/publishings/juejin-pub/package.json +1 -1
  77. package/plugins/publishings/juejin-pub/plugin.json +5 -1
  78. package/plugins/publishings/medium-pub/dist/index.js +978 -10805
  79. package/plugins/publishings/medium-pub/package.json +1 -1
  80. package/plugins/publishings/podcast-pub/dist/index.js +1016 -10843
  81. package/plugins/publishings/podcast-pub/package.json +1 -1
  82. package/plugins/publishings/qiita-pub/dist/index.js +976 -10803
  83. package/plugins/publishings/qiita-pub/package.json +1 -1
  84. package/plugins/publishings/substack-pub/dist/index.js +1932 -11448
  85. package/plugins/publishings/substack-pub/dist/profile-check.js +1698 -11200
  86. package/plugins/publishings/substack-pub/package.json +1 -1
  87. package/plugins/publishings/substack-pub/plugin.json +4 -1
  88. package/plugins/publishings/substack-pub/src/profile-check.ts +36 -3
  89. package/plugins/publishings/surfdash-pub/dist/index.js +1151 -10834
  90. package/plugins/publishings/surfdash-pub/package.json +1 -1
  91. package/plugins/publishings/surfdash-pub/src/index.ts +137 -15
  92. package/plugins/publishings/surfdash-pub/src/patch.ts +144 -0
  93. package/plugins/publishings/threads-pub/dist/index.js +12394 -0
  94. package/plugins/publishings/threads-pub/package.json +17 -0
  95. package/plugins/publishings/threads-pub/plugin.json +7 -0
  96. package/plugins/publishings/threads-pub/src/index.ts +340 -0
  97. package/plugins/publishings/threads-pub/tsconfig.json +4 -0
  98. package/plugins/publishings/wechatmp-pub/dist/index.js +2508 -11695
  99. package/plugins/publishings/wechatmp-pub/dist/profile-check.js +1656 -11188
  100. package/plugins/publishings/wechatmp-pub/package.json +1 -1
  101. package/plugins/publishings/wechatmp-pub/plugin.json +5 -1
  102. package/plugins/publishings/wechatmp-pub/src/enrich.ts +244 -71
  103. package/plugins/publishings/wechatmp-pub/src/flow.ts +412 -96
  104. package/plugins/publishings/wechatmp-pub/src/index.ts +24 -3
  105. package/plugins/publishings/wechatmp-pub/src/page.ts +16 -0
  106. package/plugins/publishings/wechatmp-pub/src/profile-check.ts +40 -4
  107. package/plugins/publishings/weibo-pub/dist/index.js +21345 -0
  108. package/plugins/publishings/weibo-pub/dist/profile-check.js +20817 -0
  109. package/plugins/publishings/weibo-pub/package.json +19 -0
  110. package/plugins/publishings/weibo-pub/plugin.json +12 -0
  111. package/plugins/publishings/weibo-pub/src/index.ts +868 -0
  112. package/plugins/publishings/weibo-pub/src/profile-check.ts +20 -0
  113. package/plugins/publishings/weibo-pub/tsconfig.json +4 -0
  114. package/plugins/publishings/x-pub/dist/index.js +1948 -11440
  115. package/plugins/publishings/x-pub/dist/profile-check.js +1677 -11199
  116. package/plugins/publishings/x-pub/package.json +1 -1
  117. package/plugins/publishings/x-pub/plugin.json +5 -1
  118. package/plugins/publishings/xhs-pub/dist/index.js +1993 -11509
  119. package/plugins/publishings/xhs-pub/dist/profile-check.js +1697 -11212
  120. package/plugins/publishings/xhs-pub/package.json +1 -1
  121. package/plugins/publishings/xhs-pub/plugin.json +5 -1
  122. package/plugins/publishings/xhs-pub/src/profile-check.ts +72 -2
  123. package/plugins/publishings/zenn-pub/dist/index.js +988 -10815
  124. package/plugins/publishings/zenn-pub/package.json +1 -1
@@ -12,6 +12,6 @@
12
12
  "@gobing-ai/ts-utils": "catalog:"
13
13
  },
14
14
  "devDependencies": {
15
- "@types/bun": "1.3.14"
15
+ "@types/bun": "1.4.3"
16
16
  }
17
17
  }
@@ -30,11 +30,22 @@ keeps its existing name — that is a workflow stem, not an installable agent ca
30
30
 
31
31
  ## Schedule
32
32
 
33
- `spur` **has no scheduler**, so kk ships templates and `kk schedule render` prints the artifact for
34
- the platform — **installing it is an operator action** (kk never writes a crontab or a
33
+ `spur serve` **hosts the scheduler**: the `.spur/config.yaml` `bootstrap.scheduler` jobs (the daily
34
+ `kk-daily-ai-voice` tick) are enqueued by the job worker that lives inside the server, so the server
35
+ itself is what must be kept alive. kk ships the templates and `kk schedule render` prints the
36
+ artifact for the platform — **installing it is an operator action** (kk never writes a crontab or a
35
37
  `LaunchAgents` plist):
36
38
 
37
39
  ```bash
40
+ # kk-serve: keep the spur server — and therefore the scheduler that fires the daily pipeline —
41
+ # running whenever you are logged in. kk-serve is launchd-only (cron cannot restart a dead
42
+ # server): `--platform cron` exits 1 instead of printing a line that cannot do the job.
43
+ mkdir -p "$PWD/.works/spur-serve"
44
+ kk schedule render kk-serve --platform launchd --repo "$PWD" \
45
+ > ~/Library/LaunchAgents/ai.gobing.spur-serve.plist
46
+ launchctl bootout gui/$(id -u)/ai.gobing.spur-serve 2>/dev/null || :
47
+ launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/ai.gobing.spur-serve.plist
48
+
38
49
  # launchd (macOS): every 6 h at 04:00/10:00/16:00/22:00 local (StartCalendarInterval), one shared log
39
50
  # 1. the log directory must exist — launchd opens StandardOutPath but never creates its parent
40
51
  mkdir -p "$PWD/.works/kk-collect"
@@ -59,8 +70,24 @@ also carries an absolute `Program` (`{{home}}/.bun/bin/spur`) while keeping `Pro
59
70
  frozen argv. Set both to wherever `spur`/`bun` actually live, and `mkdir -p` the log directory first
60
71
  (cron's `>>` aborts before the command runs when its directory is missing).
61
72
 
73
+ Both artifacts **also bind `TYPESAFE_API_KEY` from the environment `kk schedule render` runs in**, so
74
+ render from a shell that has it. `kk store label` consults the `typesafe` decision maker for
75
+ `kk-item-china-politics`/`-sensitivity`/`-audience`, spur keeps that credential env-only, and a
76
+ scheduled job inherits nothing from your shell: without the key those labels degrade to their
77
+ fail-closed defaults (`china-politics` = 3), the `ai-news` extract profile's `lte: 1` gate drops the
78
+ whole day, and the daily run closes as no-content. A render without the key is still valid — the
79
+ value is simply empty, which spur reads as "not set". The rendered artifact carries a live
80
+ credential: keep it in `~/Library/LaunchAgents` (or your crontab), never in a committed file.
81
+
62
82
  `kk-collect` collects every ingestion source into the kk store and never publishes. Two ticks that
63
83
  overlap are **one** collection: the first state takes `kk store lock acquire --name collect` and a
64
84
  tick that finds the claim inside its TTL exits 0 (`skipped`) without collecting. Before relying on
65
85
  the schedule, check the store is reachable from the scheduled checkout (`kk store migrate`), and
66
86
  `tail -f "$PWD/.works/kk-collect/launchd.log"` after the first launch.
87
+
88
+ The `kk-serve` plist keeps the same `Label` (`ai.gobing.spur-serve`) as the hand-installed one, so
89
+ re-rendering replaces it in place instead of starting a second server on port 3003. It carries the
90
+ same PATH + `TYPESAFE_API_KEY` block, plus `RunAtLoad`, `KeepAlive` and `ThrottleInterval` 10 — its
91
+ `spur serve --cwd <repo> --host 127.0.0.1 --port 3003 --no-open` stdout/stderr goes to
92
+ `$PWD/.works/spur-serve/serve.log`, and the scheduler's registration line lands in
93
+ `$PWD/.spur/logs/spur.log` (never in `serve.log`).
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "kk",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "description": "knowledge-kit Claude Code plugin: skills, commands, subagents, hooks, and rules"
5
5
  }
@@ -12,4 +12,12 @@
12
12
  # `mkdir -p` + an explicit PATH are load-bearing, not decoration: cron runs with a minimal PATH (no
13
13
  # `spur`/`kk`/`jq`/`bun`) and its `>>` redirect fails on a missing directory BEFORE the command runs,
14
14
  # so a bare line would produce no log and no tick. The README install steps mirror this.
15
- 0 4,10,16,22 * * * cd {{repo}} && mkdir -p .works/kk-collect && PATH="{{home}}/.bun/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" spur workflow run plugins/kk/workflows/kk-collect.yaml >> {{repo}}/.works/kk-collect/launchd.log 2>&1
15
+ #
16
+ # TYPESAFE_API_KEY is bound by `kk schedule render` from the environment it runs in, for the same
17
+ # reason PATH is: `kk store label` consults the `typesafe` decision maker, spur keeps that credential
18
+ # env-only, and cron inherits nothing from the operator's shell — without it every typesafe label
19
+ # degrades to its fail-closed default and the daily pool comes back empty (2026-10-12).
20
+ #
21
+ # shortcut: the value is single-quoted verbatim, so it must not contain a literal `'` — true of the
22
+ # apikey_<hex>_<hex> form; escape it here (or move to a wrapper script) if a credential ever can.
23
+ 0 4,10,16,22 * * * cd {{repo}} && mkdir -p .works/kk-collect && PATH="{{home}}/.bun/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" TYPESAFE_API_KEY='{{typesafe_api_key}}' spur workflow run plugins/kk/workflows/kk-collect.yaml >> {{repo}}/.works/kk-collect/launchd.log 2>&1
@@ -0,0 +1,79 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <!-- kk-serve — keeps the knowledge-kit Spur server alive whenever this user is logged in.
4
+
5
+ WHY the keepalive is not optional: the daily job `kk-daily-ai-voice` (cron `30 4 * * *`) is
6
+ enqueued by the job worker that lives INSIDE `spur serve` (`.spur/config.yaml`
7
+ `bootstrap.scheduler`). On 2026-10-12 that process was SIGTERM'd at 00:17 local and not
8
+ restarted until 10:00, so the 04:30 tick never fired and the day produced no episode at all —
9
+ no workspace, no ledger row, no run record. `crontab -l` is empty and nothing else supervises
10
+ it, so an unsupervised server is a silently missed day. RunAtLoad brings it up at login;
11
+ KeepAlive restarts it on crash; ThrottleInterval bounds the restart rate.
12
+
13
+ Rendered by `kk schedule render kk-serve --platform launchd --repo <checkout>`; kk never
14
+ installs it. Operator action (plugins/kk/README.md §Schedule):
15
+
16
+ mkdir -p "$PWD/.works/spur-serve"
17
+ kk schedule render kk-serve --platform launchd --repo "$PWD" \
18
+ > ~/Library/LaunchAgents/ai.gobing.spur-serve.plist
19
+ launchctl bootout gui/$(id -u)/ai.gobing.spur-serve 2>/dev/null || :
20
+ launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/ai.gobing.spur-serve.plist
21
+
22
+ launchd only, deliberately: cron has no keepalive semantics, so a cron render is refused
23
+ rather than rendered half-useful. -->
24
+ <plist version="1.0">
25
+ <dict>
26
+ <key>Label</key>
27
+ <string>ai.gobing.spur-serve</string>
28
+ <!-- Absolute `Program` for the same reason as ai.gobing.kk-collect: launchd resolves a RELATIVE
29
+ ProgramArguments[0] with its own _PATH_STDPATH (/usr/bin:/bin:/usr/sbin:/sbin) before the
30
+ job environment exists, so a bare `spur` fails with posix_spawn error 0x2 no matter what
31
+ PATH this plist sets (man launchd.plist: ProgramArguments). -->
32
+ <key>Program</key>
33
+ <string>{{home}}/.bun/bin/spur</string>
34
+ <key>ProgramArguments</key>
35
+ <array>
36
+ <string>spur</string>
37
+ <string>serve</string>
38
+ <string>--cwd</string>
39
+ <string>{{repo}}</string>
40
+ <string>--host</string>
41
+ <string>127.0.0.1</string>
42
+ <string>--port</string>
43
+ <string>3003</string>
44
+ <string>--no-open</string>
45
+ </array>
46
+ <key>WorkingDirectory</key>
47
+ <string>{{repo}}</string>
48
+ <!-- The environment block is load-bearing twice over:
49
+ - PATH — launchd starts with /usr/bin:/bin:/usr/sbin:/sbin and the scheduler's job worker
50
+ runs its commands through /bin/sh -c, so bare `spur`, `kk`, `jq` and `bun` must resolve.
51
+ - TYPESAFE_API_KEY — spur keeps the decision-maker credential env-only, and a server
52
+ started from launchd inherits nothing from the operator's shell; without the key every
53
+ `typesafe`-routed decision (kk-item-china-politics, -sensitivity, -audience) falls back
54
+ fail-closed (china-politics = 3), which empties the ai-news extract pool and makes the
55
+ daily run close as no-content. `kk schedule render` binds it from the environment it
56
+ runs in, so render from a shell that has the key.
57
+
58
+ The hand-installed plist also bound TYPESAFE_BASE_URL; it is deliberately not part of the
59
+ shipped template (task 0265 decision D2) — no placeholder exists and no artifact needs it. -->
60
+ <key>EnvironmentVariables</key>
61
+ <dict>
62
+ <key>PATH</key>
63
+ <string>{{home}}/.bun/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
64
+ <key>TYPESAFE_API_KEY</key>
65
+ <string>{{typesafe_api_key}}</string>
66
+ </dict>
67
+ <!-- launchd opens these itself, but never creates the parent: `mkdir -p .works/spur-serve` first. -->
68
+ <key>StandardOutPath</key>
69
+ <string>{{repo}}/.works/spur-serve/serve.log</string>
70
+ <key>StandardErrorPath</key>
71
+ <string>{{repo}}/.works/spur-serve/serve.log</string>
72
+ <key>RunAtLoad</key>
73
+ <true/>
74
+ <key>KeepAlive</key>
75
+ <true/>
76
+ <key>ThrottleInterval</key>
77
+ <integer>10</integer>
78
+ </dict>
79
+ </plist>
@@ -61,11 +61,21 @@
61
61
  </array>
62
62
  <!-- The job environment applies only AFTER exec, so it is not what resolves `spur` above —
63
63
  it is what the workflow's own children need (`kk`, `jq`, `bun` are all `#!/usr/bin/env bun`
64
- or PATH-resolved). -->
64
+ or PATH-resolved).
65
+
66
+ TYPESAFE_API_KEY is the same kind of dependency one step further: `kk store label` consults the
67
+ `typesafe` decision maker for kk-item-china-politics / -sensitivity / -audience, spur keeps that
68
+ credential env-only, and launchd inherits nothing from the operator's shell. Without it every one
69
+ of those labels degrades to its fail-closed default (china-politics = 3), the `ai-news` extract
70
+ profile's `lte: 1` gate then excludes the whole day, and the next `kk-daily-ai-voice` tick finds
71
+ an empty pool. `kk schedule render` binds it from the environment it runs in, so render from a
72
+ shell that has the key (2026-10-12). -->
65
73
  <key>EnvironmentVariables</key>
66
74
  <dict>
67
75
  <key>PATH</key>
68
76
  <string>{{home}}/.bun/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
77
+ <key>TYPESAFE_API_KEY</key>
78
+ <string>{{typesafe_api_key}}</string>
69
79
  </dict>
70
80
  <key>StandardOutPath</key>
71
81
  <string>{{repo}}/.works/kk-collect/launchd.log</string>