@gobing-ai/knowledge-kit 0.0.18 → 0.0.21
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.
- package/.claude-plugin/marketplace.json +1 -1
- package/dist/index.js +62 -7
- package/package.json +1 -1
- package/plugins/generations/dailynews-gen/dist/index.js +9 -1
- package/plugins/generations/dailynews-gen/src/script-builder.ts +19 -1
- package/plugins/generations/omni-voice-gen/src/omni_voice_gen/pipeline.py +13 -5
- package/plugins/generations/omni-voice-gen/src/omni_voice_gen/qc.py +23 -15
- package/plugins/generations/voice-gen/dist/index.js +60 -3
- package/plugins/generations/voice-gen/src/index.ts +8 -0
- package/plugins/generations/voice-gen/src/voicebox-server.ts +91 -0
- package/plugins/ingestions/aihot-ingest/dist/index.js +1 -1
- package/plugins/ingestions/aihot-ingest/plugin.json +1 -1
- package/plugins/ingestions/aihot-ingest/src/rss.ts +12 -2
- package/plugins/kk/commands/workflow-run.md +30 -12
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/scripts/itc-stages.ts +563 -0
- package/plugins/kk/scripts/kk-workflow-stages.ts +150 -23
- package/plugins/kk/skills/article-adapt/SKILL.md +85 -0
- package/plugins/kk/workflows/kk-daily-ai-voice.yaml +67 -145
- package/plugins/kk/workflows/kk-itc.yaml +461 -12
|
@@ -19,8 +19,10 @@ vars:
|
|
|
19
19
|
limit: "10"
|
|
20
20
|
language: "zh"
|
|
21
21
|
voice_profile: "robin-news"
|
|
22
|
-
# 20260917: voice driver switch —
|
|
23
|
-
|
|
22
|
+
# 20260917: voice driver switch — voicebox (default, voice-gen) | ominivoice (omni-voice-gen).
|
|
23
|
+
# 20260920: default flipped to voicebox — operator A/B at matched speech rate (~5.2 chars/s)
|
|
24
|
+
# judged voicebox clearly better (ominivoice carries ~1min dead air over 16min + ASR-garble class).
|
|
25
|
+
vdriver: "voicebox"
|
|
24
26
|
# 20260917 review #7: 8s intro sting prepended to every daily output; empty = skip.
|
|
25
27
|
intro_music: ".works/kk-daily-ai-voice/AI每日资讯_8秒播客片头.mp3"
|
|
26
28
|
# 20260917 review #4/#6: surfdash checkout the patch stage commits to.
|
|
@@ -35,6 +37,9 @@ vars:
|
|
|
35
37
|
plan_translate_enabled: "true"
|
|
36
38
|
article_write_enabled: "true"
|
|
37
39
|
plugins_path: ""
|
|
40
|
+
# Projected by the publish state from 3-publish/<run_date>_17_publish_publish-status.txt;
|
|
41
|
+
# guards test this var instead of cat-ing the file (state at decision time).
|
|
42
|
+
publish_status: ""
|
|
38
43
|
last30days_topic: "AI news"
|
|
39
44
|
horizon_hours: "24"
|
|
40
45
|
publish_enabled: "false"
|
|
@@ -62,13 +67,18 @@ states:
|
|
|
62
67
|
onEnter:
|
|
63
68
|
- kind: shell
|
|
64
69
|
options:
|
|
70
|
+
# run_date (dashed or digits; the job worker expands $(date +%F) before spur sees the
|
|
71
|
+
# JSON — var values reach non-shell steps verbatim) only names the workspace:
|
|
72
|
+
# daily-prepare composes the real dir as works_dir/kk-daily-ai-voice/<stamp> when
|
|
73
|
+
# work_dir is empty and always writes the effective work_dir to the cwd-relative
|
|
74
|
+
# anchor below. Shell actions cannot set vars, so the reads project it (then the
|
|
75
|
+
# digits-only stamp) into vars before any later state interpolates them.
|
|
65
76
|
command: >-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
bun "$st" daily-prepare "${vars.work_dir}" "${vars.limit}" "${vars.cursor}" "${vars.state_file}" "${vars.last30days_enabled}" "${vars.last30days_topic}" "${vars.horizon_hours}"
|
|
77
|
+
kk stage daily-prepare "${vars.work_dir}" "${vars.limit}" "${vars.cursor}" "${vars.state_file}" "${vars.last30days_enabled}" "${vars.last30days_topic}" "${vars.horizon_hours}" "${vars.run_date}"
|
|
78
|
+
- kind: file.read.into-var
|
|
79
|
+
options:
|
|
80
|
+
path: .spur/runs/kk-daily-ai-voice/work-dir.txt
|
|
81
|
+
var: work_dir
|
|
72
82
|
- kind: file.read.into-var
|
|
73
83
|
options:
|
|
74
84
|
path: ${vars.work_dir}/run-date.txt
|
|
@@ -89,12 +99,7 @@ states:
|
|
|
89
99
|
- kind: shell
|
|
90
100
|
options:
|
|
91
101
|
command: >-
|
|
92
|
-
|
|
93
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
94
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
95
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
96
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
97
|
-
bun "$st" daily-collect-facts "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}"
|
|
102
|
+
kk stage daily-collect-facts "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}"
|
|
98
103
|
|
|
99
104
|
- id: plan
|
|
100
105
|
description: "Score/dedup/select + annotate the blended Doc[] into the episode plan (episode-plan-gen; annotate rides inside planEpisode)"
|
|
@@ -102,12 +107,7 @@ states:
|
|
|
102
107
|
- kind: shell
|
|
103
108
|
options:
|
|
104
109
|
command: >-
|
|
105
|
-
|
|
106
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
107
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
108
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
109
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
110
|
-
bun "$st" daily-plan "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}" "${vars.plan_max_items}"
|
|
110
|
+
kk stage daily-plan "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}" "${vars.plan_max_items}"
|
|
111
111
|
|
|
112
112
|
- id: quality-control-content
|
|
113
113
|
description: "Content QC: filter the plan's annotated candidates by category allowlist + score thresholds (episode-plan-gen --mode filter); zero candidates route to done-no-content"
|
|
@@ -115,12 +115,7 @@ states:
|
|
|
115
115
|
- kind: shell
|
|
116
116
|
options:
|
|
117
117
|
command: >-
|
|
118
|
-
|
|
119
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
120
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
121
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
122
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
123
|
-
bun "$st" daily-qc-content "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}" "${vars.qc_categories}" "${vars.qc_min_quality}" "${vars.qc_min_importance}" "${vars.qc_min_urgency}" "${vars.qc_min_impact}"
|
|
118
|
+
kk stage daily-qc-content "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}" "${vars.qc_categories}" "${vars.qc_min_quality}" "${vars.qc_min_importance}" "${vars.qc_min_urgency}" "${vars.qc_min_impact}"
|
|
124
119
|
|
|
125
120
|
- id: plan-translate
|
|
126
121
|
description: "Translate needsTranslation plan items into the output plan.json via agent.run"
|
|
@@ -162,12 +157,7 @@ states:
|
|
|
162
157
|
- kind: shell
|
|
163
158
|
options:
|
|
164
159
|
command: >-
|
|
165
|
-
|
|
166
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
167
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
168
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
169
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
170
|
-
bun "$st" daily-article "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}"
|
|
160
|
+
kk stage daily-article "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}"
|
|
171
161
|
|
|
172
162
|
- id: cover
|
|
173
163
|
description: "Generate the article cover image via the kk:image-authoring skill (agent.run)"
|
|
@@ -186,12 +176,7 @@ states:
|
|
|
186
176
|
- kind: shell
|
|
187
177
|
options:
|
|
188
178
|
command: >-
|
|
189
|
-
|
|
190
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
191
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
192
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
193
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
194
|
-
bun "$st" daily-cover-normalize "${vars.work_dir}" "${vars.run_date}"
|
|
179
|
+
kk stage daily-cover-normalize "${vars.work_dir}" "${vars.run_date}"
|
|
195
180
|
|
|
196
181
|
- id: script
|
|
197
182
|
description: "Compile the episode plan Doc[] into structured broadcast VoiceScript YAML Content"
|
|
@@ -199,12 +184,7 @@ states:
|
|
|
199
184
|
- kind: shell
|
|
200
185
|
options:
|
|
201
186
|
command: >-
|
|
202
|
-
|
|
203
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
204
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
205
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
206
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
207
|
-
bun "$st" daily-script "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}" "${vars.language}" "${vars.title}" "${vars.voice_profile}"
|
|
187
|
+
kk stage daily-script "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}" "${vars.language}" "${vars.title}" "${vars.voice_profile}"
|
|
208
188
|
|
|
209
189
|
- id: review
|
|
210
190
|
description: "Operator reviews the generated news script before speech synthesis"
|
|
@@ -221,12 +201,7 @@ states:
|
|
|
221
201
|
- kind: shell
|
|
222
202
|
options:
|
|
223
203
|
command: >-
|
|
224
|
-
|
|
225
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
226
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
227
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
228
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
229
|
-
bun "$st" daily-wrap-docs "${vars.work_dir}" "${vars.run_date}" "${vars.voice_profile}"
|
|
204
|
+
kk stage daily-wrap-docs "${vars.work_dir}" "${vars.run_date}" "${vars.voice_profile}"
|
|
230
205
|
|
|
231
206
|
- id: generate
|
|
232
207
|
description: "Invoke voice driver plugin (vdriver var: ominivoice -> omni-voice-gen, voicebox -> voice-gen) to generate audio"
|
|
@@ -234,12 +209,7 @@ states:
|
|
|
234
209
|
- kind: shell
|
|
235
210
|
options:
|
|
236
211
|
command: >-
|
|
237
|
-
|
|
238
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
239
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
240
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
241
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
242
|
-
OMNIVOICE_SPEED=1.06 bun "$st" daily-generate "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}" "${vars.transcode_mp3}" "${vars.vdriver}"
|
|
212
|
+
OMNIVOICE_SPEED=1.06 kk stage daily-generate "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}" "${vars.transcode_mp3}" "${vars.vdriver}"
|
|
243
213
|
|
|
244
214
|
- id: intro-music
|
|
245
215
|
description: "Prepend the 8s intro sting (intro_music var; empty = skip) to the generated wav, update duration/audioPath"
|
|
@@ -247,12 +217,7 @@ states:
|
|
|
247
217
|
- kind: shell
|
|
248
218
|
options:
|
|
249
219
|
command: >-
|
|
250
|
-
|
|
251
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
252
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
253
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
254
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
255
|
-
bun "$st" daily-intro "${vars.work_dir}" "${vars.run_date}" "${vars.intro_music}"
|
|
220
|
+
kk stage daily-intro "${vars.work_dir}" "${vars.run_date}" "${vars.intro_music}"
|
|
256
221
|
|
|
257
222
|
- id: quality-control
|
|
258
223
|
description: "Verify audio quality, speech rate, and silence/repetition QC metrics"
|
|
@@ -260,12 +225,7 @@ states:
|
|
|
260
225
|
- kind: shell
|
|
261
226
|
options:
|
|
262
227
|
command: >-
|
|
263
|
-
|
|
264
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
265
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
266
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
267
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
268
|
-
bun "$st" daily-quality-report "${vars.work_dir}" "${vars.run_date}"
|
|
228
|
+
kk stage daily-quality-report "${vars.work_dir}" "${vars.run_date}"
|
|
269
229
|
|
|
270
230
|
- id: publish-prep
|
|
271
231
|
description: "Merge article Content with audio (podcast assembly facts ride the content options channel for podcast-pub's absorbed assembly; runDate kept for surfdash slug)"
|
|
@@ -273,12 +233,7 @@ states:
|
|
|
273
233
|
- kind: shell
|
|
274
234
|
options:
|
|
275
235
|
command: >-
|
|
276
|
-
|
|
277
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
278
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
279
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
280
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
281
|
-
bun "$st" daily-publish-prep "${vars.work_dir}" "${vars.run_date}"
|
|
236
|
+
kk stage daily-publish-prep "${vars.work_dir}" "${vars.run_date}"
|
|
282
237
|
|
|
283
238
|
- id: publish-surfdash
|
|
284
239
|
description: "Publish the merged Content to surfdash (single target); result lands in result.json — surfdash publishes first so show-notes can link the article (task 0118 seam reorder)"
|
|
@@ -286,12 +241,7 @@ states:
|
|
|
286
241
|
- kind: shell
|
|
287
242
|
options:
|
|
288
243
|
command: >-
|
|
289
|
-
|
|
290
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
291
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
292
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
293
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
294
|
-
bun "$st" daily-publish-surfdash "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}"
|
|
244
|
+
kk stage daily-publish-surfdash "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}"
|
|
295
245
|
|
|
296
246
|
- id: show-notes
|
|
297
247
|
description: "Render timeline show notes from the episode plan (podcast-pub show-notes op, briefMode; article URL from the surfdash result postPath — surfdash failure degrades to legacy full-body layout)"
|
|
@@ -299,12 +249,7 @@ states:
|
|
|
299
249
|
- kind: shell
|
|
300
250
|
options:
|
|
301
251
|
command: >-
|
|
302
|
-
|
|
303
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
304
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
305
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
306
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
307
|
-
bun "$st" daily-show-notes "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}" "${vars.title}"
|
|
252
|
+
kk stage daily-show-notes "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}" "${vars.title}"
|
|
308
253
|
|
|
309
254
|
- id: publish-podcast
|
|
310
255
|
description: "Publish the episode to podcast-pub with the rendered show notes (metadata.showNotes carries the brief/timeline markdown; map.ts falls back to content.body when absent — task 0118 R3)"
|
|
@@ -312,12 +257,7 @@ states:
|
|
|
312
257
|
- kind: shell
|
|
313
258
|
options:
|
|
314
259
|
command: >-
|
|
315
|
-
|
|
316
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
317
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
318
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
319
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
320
|
-
bun "$st" daily-publish-podcast "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}"
|
|
260
|
+
kk stage daily-publish-podcast "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}"
|
|
321
261
|
|
|
322
262
|
- id: publish
|
|
323
263
|
description: "Classify the sequenced surfdash → podcast outcomes full|partial|none into publish-status.txt (exit 0 in all three — routing is transition-owned; task 0118: per-target classification over the merged result.json)"
|
|
@@ -325,12 +265,11 @@ states:
|
|
|
325
265
|
- kind: shell
|
|
326
266
|
options:
|
|
327
267
|
command: >-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
bun "$st" daily-publish-classify "${vars.work_dir}" "${vars.run_date}"
|
|
268
|
+
kk stage daily-publish-classify "${vars.work_dir}" "${vars.run_date}"
|
|
269
|
+
- kind: file.read.into-var
|
|
270
|
+
options:
|
|
271
|
+
path: ${vars.work_dir}/3-publish/${vars.run_date}_17_publish_publish-status.txt
|
|
272
|
+
var: publish_status
|
|
334
273
|
|
|
335
274
|
- id: patch-surfdash
|
|
336
275
|
description: "20260917 #4/#6 — patch published surfdash posts: podcast cover URL into image/og_image frontmatter + podcast cross-link (zh/en/ja), commit+push"
|
|
@@ -338,12 +277,7 @@ states:
|
|
|
338
277
|
- kind: shell
|
|
339
278
|
options:
|
|
340
279
|
command: >-
|
|
341
|
-
|
|
342
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
343
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
344
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
345
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
346
|
-
bun "$st" daily-patch-surfdash "${vars.work_dir}" "${vars.run_date}" "${vars.surfdash_root}"
|
|
280
|
+
kk stage daily-patch-surfdash "${vars.work_dir}" "${vars.run_date}" "${vars.surfdash_root}"
|
|
347
281
|
|
|
348
282
|
- id: publish-partial
|
|
349
283
|
description: "Partial publish — at least one target published, at least one failed; echo warning, write a .spur/run marker, preserve result.json for --retry-from, continue to done (task 0118: surfdash failure = no-URL fallback notes; podcast failure = its own partial)"
|
|
@@ -351,12 +285,7 @@ states:
|
|
|
351
285
|
- kind: shell
|
|
352
286
|
options:
|
|
353
287
|
command: >-
|
|
354
|
-
|
|
355
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
356
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
357
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
358
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
359
|
-
bun "$st" daily-publish-partial "${vars.work_dir}" "${vars.run_date}"
|
|
288
|
+
kk stage daily-publish-partial "${vars.work_dir}" "${vars.run_date}"
|
|
360
289
|
|
|
361
290
|
- id: run-report
|
|
362
291
|
description: "Assemble the per-run report (scores+aggregates+rejected counts+step timing) from existing artifacts — news-report-gen; output-only, never throws; 0117"
|
|
@@ -364,12 +293,7 @@ states:
|
|
|
364
293
|
- kind: shell
|
|
365
294
|
options:
|
|
366
295
|
command: >-
|
|
367
|
-
|
|
368
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
369
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
370
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
371
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
372
|
-
bun "$st" daily-run-report "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}" "${vars.qc_min_quality}" "${vars.qc_min_importance}" "${vars.qc_min_urgency}" "${vars.qc_min_impact}"
|
|
296
|
+
kk stage daily-run-report "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}" "${vars.qc_min_quality}" "${vars.qc_min_importance}" "${vars.qc_min_urgency}" "${vars.qc_min_impact}"
|
|
373
297
|
|
|
374
298
|
- id: translate
|
|
375
299
|
description: "Locales — surfdash-pub scaffolds en/ja drafts (deterministic, plugin-owned), agent translates both, sync into the surfdash CMS"
|
|
@@ -377,12 +301,7 @@ states:
|
|
|
377
301
|
- kind: shell
|
|
378
302
|
options:
|
|
379
303
|
command: >-
|
|
380
|
-
|
|
381
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
382
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
383
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
384
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
385
|
-
bun "$st" daily-translate-localize "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}"
|
|
304
|
+
kk stage daily-translate-localize "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}"
|
|
386
305
|
- kind: file.read.into-var
|
|
387
306
|
options:
|
|
388
307
|
path: ${vars.work_dir}/3-publish/${vars.run_date}_20_translate-localize_en-post-path.txt
|
|
@@ -405,12 +324,7 @@ states:
|
|
|
405
324
|
- kind: shell
|
|
406
325
|
options:
|
|
407
326
|
command: >-
|
|
408
|
-
|
|
409
|
-
pkg="$(dirname "$(dirname "$(realpath "$kbin" 2>/dev/null)")")";
|
|
410
|
-
st="$pkg/plugins/kk/scripts/kk-workflow-stages.ts";
|
|
411
|
-
[ -f "$st" ] || st="plugins/kk/scripts/kk-workflow-stages.ts";
|
|
412
|
-
[ -f "$st" ] || echo "kk-workflow-stages.ts not found at $st — install or refresh the kk package (bun link in a checkout)" >&2;
|
|
413
|
-
bun "$st" daily-translate-sync "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}" "${vars.work_dir}/3-publish/${vars.run_date}_20_translate-localize_zh-post-path.txt"
|
|
327
|
+
kk stage daily-translate-sync "${vars.work_dir}" "${vars.run_date}" "${vars.plugins_path}" "${vars.work_dir}/3-publish/${vars.run_date}_20_translate-localize_zh-post-path.txt"
|
|
414
328
|
|
|
415
329
|
- id: done
|
|
416
330
|
description: "Terminal — Daily AI news pipeline completed (collect → QC'd plan → article/cover/script/voice → publish/locales)"
|
|
@@ -551,8 +465,14 @@ transitions:
|
|
|
551
465
|
kind: always
|
|
552
466
|
|
|
553
467
|
- from: generate
|
|
468
|
+
to: intro-music
|
|
469
|
+
description: "Audio generated -> prepend intro sting"
|
|
470
|
+
guard:
|
|
471
|
+
kind: always
|
|
472
|
+
|
|
473
|
+
- from: intro-music
|
|
554
474
|
to: quality-control
|
|
555
|
-
description: "
|
|
475
|
+
description: "Intro merged -> run quality control validation"
|
|
556
476
|
guard:
|
|
557
477
|
kind: always
|
|
558
478
|
|
|
@@ -606,10 +526,12 @@ transitions:
|
|
|
606
526
|
kind: always
|
|
607
527
|
|
|
608
528
|
- from: publish
|
|
609
|
-
to:
|
|
610
|
-
description: "Publish classified -> patch
|
|
529
|
+
to: translate
|
|
530
|
+
description: "Publish classified -> full publish continues to en/ja translation; guard is full-only (partial exits via publish-partial); patch-surfdash runs after translate so all three locales get cover + podcast cross-link patching"
|
|
611
531
|
guard:
|
|
612
|
-
kind:
|
|
532
|
+
kind: shell
|
|
533
|
+
options:
|
|
534
|
+
command: 'test "${vars.publish_status}" = "full"'
|
|
613
535
|
|
|
614
536
|
- from: patch-surfdash
|
|
615
537
|
to: run-report
|
|
@@ -623,7 +545,7 @@ transitions:
|
|
|
623
545
|
guard:
|
|
624
546
|
kind: shell
|
|
625
547
|
options:
|
|
626
|
-
command: 'test "$
|
|
548
|
+
command: 'test "${vars.publish_status}" = "partial"'
|
|
627
549
|
|
|
628
550
|
- from: publish
|
|
629
551
|
to: failed
|
|
@@ -631,7 +553,7 @@ transitions:
|
|
|
631
553
|
guard:
|
|
632
554
|
kind: shell
|
|
633
555
|
options:
|
|
634
|
-
command: 'test "$
|
|
556
|
+
command: 'test "${vars.publish_status}" = "none"'
|
|
635
557
|
|
|
636
558
|
- from: publish-partial
|
|
637
559
|
to: run-report
|
|
@@ -639,24 +561,24 @@ transitions:
|
|
|
639
561
|
guard:
|
|
640
562
|
kind: always
|
|
641
563
|
|
|
642
|
-
- from:
|
|
643
|
-
to:
|
|
644
|
-
description: "
|
|
564
|
+
- from: translate
|
|
565
|
+
to: patch-surfdash
|
|
566
|
+
description: "zh post + en/ja locales scaffolded, translated, and synced -> patch all published posts with cover + podcast cross-link"
|
|
645
567
|
guard:
|
|
646
|
-
kind:
|
|
647
|
-
options:
|
|
648
|
-
command: 'test "$(cat "${vars.work_dir}/3-publish/${vars.run_date}_17_publish_publish-status.txt")" = "full"'
|
|
568
|
+
kind: always
|
|
649
569
|
|
|
650
570
|
- from: run-report
|
|
651
571
|
to: done
|
|
652
|
-
description: "Run report assembled after
|
|
572
|
+
description: "Run report assembled after non-full publish (partial) -> done; retry failed targets later via kk executor fan-out --retry-from"
|
|
653
573
|
guard:
|
|
654
574
|
kind: shell
|
|
655
575
|
options:
|
|
656
|
-
command: 'test "$
|
|
576
|
+
command: 'test "${vars.publish_status}" = "partial"'
|
|
657
577
|
|
|
658
|
-
- from:
|
|
578
|
+
- from: run-report
|
|
659
579
|
to: done
|
|
660
|
-
description: "
|
|
580
|
+
description: "Run report assembled after full publish -> episode complete (en/ja already translated and patched)"
|
|
661
581
|
guard:
|
|
662
|
-
kind:
|
|
582
|
+
kind: shell
|
|
583
|
+
options:
|
|
584
|
+
command: 'test "${vars.publish_status}" = "full"'
|