@gobing-ai/knowledge-kit 0.1.20 → 0.1.22
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/board/collect/index.js +1 -0
- package/dist/board/daily-voice/index.js +1279 -261
- package/dist/board/itc/index.js +1 -0
- package/dist/index.js +13893 -8995
- package/package.json +1 -1
- package/plugins/generations/dailynews-gen/dist/index.js +285 -16
- package/plugins/generations/dailynews-gen/src/editorial-claims.ts +215 -0
- package/plugins/generations/dailynews-gen/src/index.ts +23 -4
- package/plugins/generations/dailynews-gen/src/script-builder.ts +10 -3
- package/plugins/generations/dailynews-gen/src/script-plan.ts +74 -14
- package/plugins/generations/music-gen/README.md +277 -0
- package/plugins/generations/music-gen/dist/index.js +23544 -0
- package/plugins/generations/music-gen/package.json +24 -0
- package/plugins/generations/music-gen/plugin.json +23 -0
- package/plugins/generations/music-gen/presets/SOURCE.md +39 -0
- package/plugins/generations/music-gen/presets/formats/clip.yaml +21 -0
- package/plugins/generations/music-gen/presets/formats/jingle.yaml +22 -0
- package/plugins/generations/music-gen/presets/formats/loop.yaml +21 -0
- package/plugins/generations/music-gen/presets/formats/song.yaml +31 -0
- package/plugins/generations/music-gen/presets/formats/underscore.yaml +22 -0
- package/plugins/generations/music-gen/presets/themes/ambient-tech.yaml +30 -0
- package/plugins/generations/music-gen/presets/themes/cinematic.yaml +30 -0
- package/plugins/generations/music-gen/presets/themes/lofi.yaml +30 -0
- package/plugins/generations/music-gen/presets/themes/synthwave.yaml +30 -0
- package/plugins/generations/music-gen/scripts/gen-preset-index.ts +181 -0
- package/plugins/generations/music-gen/scripts/resolve-preset.ts +64 -0
- package/plugins/generations/music-gen/src/adapter/index.ts +35 -0
- package/plugins/generations/music-gen/src/adapter/instance.ts +904 -0
- package/plugins/generations/music-gen/src/adapter/offline.ts +124 -0
- package/plugins/generations/music-gen/src/artifact.ts +223 -0
- package/plugins/generations/music-gen/src/audio/checks.ts +618 -0
- package/plugins/generations/music-gen/src/audio/master.ts +267 -0
- package/plugins/generations/music-gen/src/audio/measure.ts +507 -0
- package/plugins/generations/music-gen/src/audio/profile.ts +131 -0
- package/plugins/generations/music-gen/src/audio.ts +122 -0
- package/plugins/generations/music-gen/src/brief.ts +191 -0
- package/plugins/generations/music-gen/src/config.ts +451 -0
- package/plugins/generations/music-gen/src/content.ts +199 -0
- package/plugins/generations/music-gen/src/digest.ts +100 -0
- package/plugins/generations/music-gen/src/index.ts +147 -0
- package/plugins/generations/music-gen/src/job.ts +131 -0
- package/plugins/generations/music-gen/src/plugin.ts +371 -0
- package/plugins/generations/music-gen/src/presets.ts +918 -0
- package/plugins/generations/music-gen/src/render.ts +87 -0
- package/plugins/generations/music-gen/src/request.ts +102 -0
- package/plugins/generations/music-gen/src/spend.ts +495 -0
- package/plugins/generations/music-gen/tsconfig.json +8 -0
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/schedules/kk-serve.launchd.plist.tmpl +2 -1
- package/plugins/kk/scripts/cover-compositor.ts +380 -32
- package/plugins/kk/scripts/daily-cover-mock.ts +40 -3
- package/plugins/kk/scripts/daily-stages.ts +659 -20
- package/plugins/kk/scripts/episode-identity.ts +180 -0
- package/plugins/kk/scripts/kk-workflow-stages.ts +37 -1
- package/plugins/kk/scripts/music-stages.ts +624 -0
- package/plugins/kk/scripts/news-editorial-ledger.ts +906 -0
- package/plugins/kk/scripts/source-citation.ts +187 -0
- package/plugins/kk/scripts/topic-selection-attempts.ts +446 -0
- package/plugins/kk/scripts/topic-selection-calibration.ts +161 -0
- package/plugins/kk/skills/content-judge/SKILL.md +11 -6
- package/plugins/kk/skills/content-judge/references/music-quality-rubric.md +147 -0
- package/plugins/kk/skills/content-judge/references/rubrics.md +15 -0
- package/plugins/kk/skills/content-safety/SKILL.md +12 -0
- package/plugins/kk/skills/music-authoring/SKILL.md +276 -0
- package/plugins/kk/skills/music-authoring/references/judge-input.md +117 -0
- package/plugins/kk/skills/news-editorial/SKILL.md +102 -15
- package/plugins/kk/skills/news-editorial/references/selection.md +4 -0
- package/plugins/kk/skills/news-editorial/references/style-contract.zh.md +58 -11
- package/plugins/kk/workflows/kk-daily-ai-voice.yaml +8 -8
- package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +7 -7
- package/plugins/kk/workflows/kk-music.yaml +328 -0
- package/plugins/kk/workflows/kk-news-generate.yaml +58 -3
- package/plugins/publishings/bilibili-pub/dist/index.js +11 -1
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/cnblogs-pub/dist/index.js +11 -1
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/csdn-pub/dist/index.js +11 -1
- package/plugins/publishings/csdn-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/infoq-pub/dist/index.js +11 -1
- package/plugins/publishings/infoq-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/jike-pub/dist/index.js +11 -1
- package/plugins/publishings/jike-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/juejin-pub/dist/index.js +11 -1
- package/plugins/publishings/juejin-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/linkedin-pub/dist/index.js +11 -1
- package/plugins/publishings/linkedin-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/podcast-pub/dist/index.js +586 -20
- package/plugins/publishings/podcast-pub/src/corrections.ts +509 -0
- package/plugins/publishings/podcast-pub/src/index.ts +257 -5
- package/plugins/publishings/podcast-pub/src/show-notes-brief.ts +240 -0
- package/plugins/publishings/podcast-pub/src/show-notes.ts +69 -13
- package/plugins/publishings/shipinhao-pub/dist/index.js +59 -8
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/shipinhao-pub/src/audio-flow.ts +105 -6
- package/plugins/publishings/sspai-pub/dist/index.js +11 -1
- package/plugins/publishings/sspai-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/substack-pub/dist/index.js +11 -1
- package/plugins/publishings/substack-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/surfdash-pub/dist/index.js +72 -20
- package/plugins/publishings/surfdash-pub/src/digest-check.ts +7 -3
- package/plugins/publishings/surfdash-pub/src/index.ts +100 -17
- package/plugins/publishings/surfdash-pub/src/topic-claims.ts +3 -1
- package/plugins/publishings/threads-pub/dist/index.js +11 -1
- package/plugins/publishings/threads-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/wechatmp-pub/dist/index.js +11 -1
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/weibo-pub/dist/index.js +11 -1
- package/plugins/publishings/weibo-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/x-pub/dist/index.js +11 -1
- package/plugins/publishings/x-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/xhs-pub/dist/index.js +11 -1
- package/plugins/publishings/xhs-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +11 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +11 -1
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
// ../board/src/daily-voice/index.tsx
|
|
2
|
+
import {
|
|
3
|
+
Badge,
|
|
4
|
+
Diagnostic,
|
|
5
|
+
EmptyState,
|
|
6
|
+
ModuleHeader,
|
|
7
|
+
ModuleShell,
|
|
8
|
+
ModuleTabs,
|
|
9
|
+
withBase
|
|
10
|
+
} from "@gobing-ai/spur/board/ui";
|
|
2
11
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
12
|
|
|
4
13
|
// ../board/src/shared/api.ts
|
|
@@ -520,6 +529,7 @@ function createBoardClient(options) {
|
|
|
520
529
|
storeSelections: (query = {}) => isNativeSpur ? nativeStoreSelections(query) : getJson(`${reader}/api/workflows/kk-collect/store/selections?${storeSelectionsQueryString(query)}`),
|
|
521
530
|
storeChannels: (query) => getJson(`${aggregateReader}/api/workflows/kk-collect/store/channels?${storeChannelsQueryString(query)}`),
|
|
522
531
|
runDetail: (runId) => getJson(`${board}/api/runs/${encodeURIComponent(runId)}`),
|
|
532
|
+
evidence: (workflow, runId) => getJson(`${reader}/api/workflows/${encodeURIComponent(workflow)}/runs/${encodeURIComponent(runId)}/evidence`),
|
|
523
533
|
progress: (runId) => getJson(`${board}/api/runs/${encodeURIComponent(runId)}/progress`)
|
|
524
534
|
};
|
|
525
535
|
}
|
|
@@ -721,9 +731,6 @@ function availabilityLabel(availability) {
|
|
|
721
731
|
return "Unverified";
|
|
722
732
|
}
|
|
723
733
|
}
|
|
724
|
-
function diagnosticLine(diagnostic) {
|
|
725
|
-
return `${diagnostic.code}: ${diagnostic.message}`;
|
|
726
|
-
}
|
|
727
734
|
function formatElapsed(startedAt, now) {
|
|
728
735
|
if (startedAt === null || startedAt === undefined)
|
|
729
736
|
return "elapsed unknown";
|
|
@@ -1114,6 +1121,12 @@ function supplyContextOf(windowSetting, startedAt) {
|
|
|
1114
1121
|
untilLabel: formatTimestamp(new Date(started).toISOString())
|
|
1115
1122
|
};
|
|
1116
1123
|
}
|
|
1124
|
+
var DAILY_VIEWS = ["summary", "generation", "publishing"];
|
|
1125
|
+
var DAILY_VIEW_ALIASES = {
|
|
1126
|
+
results: "generation",
|
|
1127
|
+
progress: "generation",
|
|
1128
|
+
config: "summary"
|
|
1129
|
+
};
|
|
1117
1130
|
var DAILY_WORKFLOW = "kk-news-generate";
|
|
1118
1131
|
var RETIRED_DAILY_WORKFLOWS = ["kk-daily-ai-voice2", "kk-daily-ai-voice"];
|
|
1119
1132
|
function pickDailyFamily(current, retired) {
|
|
@@ -1131,21 +1144,438 @@ function retiredLayoutNotice(choice) {
|
|
|
1131
1144
|
return `Showing ${days} recorded under the retired ${choice.family} layout. New runs are recorded as ${DAILY_WORKFLOW}, so this list stops growing until that workflow runs.`;
|
|
1132
1145
|
}
|
|
1133
1146
|
|
|
1147
|
+
// ../board/src/daily-voice/evidence.ts
|
|
1148
|
+
function captureState(evidence) {
|
|
1149
|
+
return evidence.capture ? "captured" : "uncaptured";
|
|
1150
|
+
}
|
|
1151
|
+
function asRecord2(value) {
|
|
1152
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
|
|
1153
|
+
}
|
|
1154
|
+
function asString2(value) {
|
|
1155
|
+
return typeof value === "string" && value.length > 0 ? value : null;
|
|
1156
|
+
}
|
|
1157
|
+
function asNumber2(value) {
|
|
1158
|
+
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
1159
|
+
}
|
|
1160
|
+
function asBool2(value) {
|
|
1161
|
+
return typeof value === "boolean" ? value : null;
|
|
1162
|
+
}
|
|
1163
|
+
function newsSummaryOf(evidence) {
|
|
1164
|
+
if (!evidence.results)
|
|
1165
|
+
return null;
|
|
1166
|
+
return newsSummaryOfResults(evidence.results);
|
|
1167
|
+
}
|
|
1168
|
+
function newsSummaryOfResults(results) {
|
|
1169
|
+
const summary = asRecord2(results.summary);
|
|
1170
|
+
if (!summary)
|
|
1171
|
+
return null;
|
|
1172
|
+
const generation = generationOf(summary);
|
|
1173
|
+
const publishing = publishingOf(summary);
|
|
1174
|
+
const counts = countsOf(summary);
|
|
1175
|
+
const outcome = asString2(summary.outcome);
|
|
1176
|
+
return {
|
|
1177
|
+
status: asString2(summary.status) ?? "unknown",
|
|
1178
|
+
startedAt: asString2(summary.startedAt),
|
|
1179
|
+
completedAt: asString2(summary.completedAt),
|
|
1180
|
+
outcome,
|
|
1181
|
+
generation,
|
|
1182
|
+
publishing,
|
|
1183
|
+
counts
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
1186
|
+
function generationOf(summary) {
|
|
1187
|
+
const bag = asRecord2(summary.generation) ?? {};
|
|
1188
|
+
const gate = asRecord2(bag.gate) ?? {};
|
|
1189
|
+
const launch = asRecord2(bag.launch) ?? {};
|
|
1190
|
+
const progress = asRecord2(bag.progress) ?? null;
|
|
1191
|
+
const engines = Array.isArray(bag.engines) ? bag.engines.flatMap((entry) => {
|
|
1192
|
+
const row = asRecord2(entry);
|
|
1193
|
+
if (!row)
|
|
1194
|
+
return [];
|
|
1195
|
+
const attempts = Array.isArray(row.attempts) ? row.attempts.flatMap((attempt) => {
|
|
1196
|
+
const a = asRecord2(attempt);
|
|
1197
|
+
if (!a)
|
|
1198
|
+
return [];
|
|
1199
|
+
return [
|
|
1200
|
+
{
|
|
1201
|
+
status: asString2(a.status) ?? "unknown",
|
|
1202
|
+
timing: asString2(a.timing) ?? "unknown"
|
|
1203
|
+
}
|
|
1204
|
+
];
|
|
1205
|
+
}) : [];
|
|
1206
|
+
return [
|
|
1207
|
+
{
|
|
1208
|
+
node: asString2(row.node) ?? "unknown",
|
|
1209
|
+
state: asString2(row.state) ?? "unknown",
|
|
1210
|
+
attempts
|
|
1211
|
+
}
|
|
1212
|
+
];
|
|
1213
|
+
}) : [];
|
|
1214
|
+
return {
|
|
1215
|
+
outcome: asString2(bag.outcome),
|
|
1216
|
+
gate: { status: asString2(gate.status) },
|
|
1217
|
+
launch: {
|
|
1218
|
+
status: asString2(launch.status),
|
|
1219
|
+
runId: asString2(launch.runId),
|
|
1220
|
+
startedAt: asString2(launch.startedAt),
|
|
1221
|
+
finishedAt: asString2(launch.finishedAt),
|
|
1222
|
+
reason: asString2(launch.reason),
|
|
1223
|
+
stale: asBool2(launch.stale) === true
|
|
1224
|
+
},
|
|
1225
|
+
engines,
|
|
1226
|
+
progress
|
|
1227
|
+
};
|
|
1228
|
+
}
|
|
1229
|
+
function publishingOf(summary) {
|
|
1230
|
+
const bag = asRecord2(summary.publishing) ?? {};
|
|
1231
|
+
const bundleBag = asRecord2(bag.bundle) ?? null;
|
|
1232
|
+
const bundle = bundleBag ? {
|
|
1233
|
+
identity: asString2(bundleBag.identity) ?? "unknown",
|
|
1234
|
+
runDate: asString2(bundleBag.runDate) ?? "unknown",
|
|
1235
|
+
parentRunId: asString2(bundleBag.parentRunId),
|
|
1236
|
+
title: asString2(bundleBag.title),
|
|
1237
|
+
variants: Array.isArray(bundleBag.variants) ? bundleBag.variants.flatMap((v) => {
|
|
1238
|
+
const s = asString2(v);
|
|
1239
|
+
return s ? [s] : [];
|
|
1240
|
+
}) : [],
|
|
1241
|
+
safety: asString2(bundleBag.safety)
|
|
1242
|
+
} : null;
|
|
1243
|
+
const windows = Array.isArray(bag.windows) ? bag.windows.flatMap((entry) => {
|
|
1244
|
+
const row = asRecord2(entry);
|
|
1245
|
+
if (!row)
|
|
1246
|
+
return [];
|
|
1247
|
+
const windowId = asString2(row.window);
|
|
1248
|
+
if (!windowId)
|
|
1249
|
+
return [];
|
|
1250
|
+
const provenance = asRecord2(row.provenance) ?? {};
|
|
1251
|
+
const recorded = asString2(row.recordedStatus);
|
|
1252
|
+
return [
|
|
1253
|
+
{
|
|
1254
|
+
window: windowId,
|
|
1255
|
+
recordedStatus: isWindowStatus(recorded) ? recorded : null,
|
|
1256
|
+
provenance: {
|
|
1257
|
+
dateMatch: asBool2(provenance.dateMatch),
|
|
1258
|
+
bundleMatch: asBool2(provenance.bundleMatch),
|
|
1259
|
+
parentMatch: asBool2(provenance.parentMatch),
|
|
1260
|
+
digestMatch: asBool2(provenance.digestMatch)
|
|
1261
|
+
},
|
|
1262
|
+
targets: Array.isArray(row.targets) ? row.targets.flatMap((target) => {
|
|
1263
|
+
const t = asRecord2(target);
|
|
1264
|
+
if (!t)
|
|
1265
|
+
return [];
|
|
1266
|
+
const id = asString2(t.id);
|
|
1267
|
+
if (!id)
|
|
1268
|
+
return [];
|
|
1269
|
+
const evidenceFiles = asRecord2(t.evidence) ?? {};
|
|
1270
|
+
return [
|
|
1271
|
+
{
|
|
1272
|
+
id,
|
|
1273
|
+
tier: asNumber2(t.tier),
|
|
1274
|
+
mode: asString2(t.mode),
|
|
1275
|
+
target: asString2(t.target),
|
|
1276
|
+
status: isTargetStatus(asString2(t.status)) ? asString2(t.status) : "planned",
|
|
1277
|
+
effect: asString2(t.effect),
|
|
1278
|
+
url: asString2(t.url),
|
|
1279
|
+
guid: asString2(t.guid),
|
|
1280
|
+
finishedAt: asString2(t.finishedAt),
|
|
1281
|
+
error: asString2(t.error),
|
|
1282
|
+
evidence: {
|
|
1283
|
+
plan: asString2(evidenceFiles.plan) ?? "unknown",
|
|
1284
|
+
receipt: asString2(evidenceFiles.receipt)
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
];
|
|
1288
|
+
}) : []
|
|
1289
|
+
}
|
|
1290
|
+
];
|
|
1291
|
+
}) : [];
|
|
1292
|
+
return { bundle, windows };
|
|
1293
|
+
}
|
|
1294
|
+
function isWindowStatus(value) {
|
|
1295
|
+
return value === "full" || value === "partial" || value === "none" || value === "dummy";
|
|
1296
|
+
}
|
|
1297
|
+
function isTargetStatus(value) {
|
|
1298
|
+
return value === "succeeded" || value === "failed" || value === "uncertain" || value === "planned" || value === "dummy" || value === "skipped";
|
|
1299
|
+
}
|
|
1300
|
+
function countsOf(summary) {
|
|
1301
|
+
const bag = asRecord2(summary.counts) ?? {};
|
|
1302
|
+
const n = (key) => asNumber2(bag[key]);
|
|
1303
|
+
return {
|
|
1304
|
+
artifactsAvailable: n("artifactsAvailable"),
|
|
1305
|
+
artifactsTotal: n("artifactsTotal"),
|
|
1306
|
+
targetsSucceeded: n("targetsSucceeded"),
|
|
1307
|
+
targetsFailed: n("targetsFailed"),
|
|
1308
|
+
targetsUncertain: n("targetsUncertain"),
|
|
1309
|
+
targetsPlanned: n("targetsPlanned"),
|
|
1310
|
+
windowsFull: n("windowsFull"),
|
|
1311
|
+
windowsPartial: n("windowsPartial"),
|
|
1312
|
+
windowsNone: n("windowsNone")
|
|
1313
|
+
};
|
|
1314
|
+
}
|
|
1315
|
+
var ENGINE_WORDS = {
|
|
1316
|
+
success: { word: "done", tone: "success" },
|
|
1317
|
+
failure: { word: "failed", tone: "error" },
|
|
1318
|
+
pending: { word: "active", tone: "info" },
|
|
1319
|
+
unknown: { word: "unrecorded", tone: "neutral" }
|
|
1320
|
+
};
|
|
1321
|
+
function engineStateWord(state) {
|
|
1322
|
+
return ENGINE_WORDS[state] ?? { word: state, tone: "neutral" };
|
|
1323
|
+
}
|
|
1324
|
+
var TARGET_WORDS = {
|
|
1325
|
+
succeeded: { word: "sent", tone: "success" },
|
|
1326
|
+
failed: { word: "failed", tone: "error" },
|
|
1327
|
+
uncertain: { word: "uncertain", tone: "warn" },
|
|
1328
|
+
planned: { word: "no evidence recorded", tone: "warn" },
|
|
1329
|
+
dummy: { word: "rehearsal only", tone: "neutral" },
|
|
1330
|
+
skipped: { word: "skipped", tone: "neutral" }
|
|
1331
|
+
};
|
|
1332
|
+
function targetStateWord(target) {
|
|
1333
|
+
return TARGET_WORDS[target.status] ?? { word: target.status, tone: "neutral" };
|
|
1334
|
+
}
|
|
1335
|
+
var WINDOW_WORDS = {
|
|
1336
|
+
full: { word: "all targets sent", tone: "success" },
|
|
1337
|
+
partial: { word: "partially sent", tone: "warn" },
|
|
1338
|
+
none: { word: "nothing sent", tone: "error" },
|
|
1339
|
+
dummy: { word: "rehearsal only", tone: "neutral" }
|
|
1340
|
+
};
|
|
1341
|
+
function windowStateWord(status) {
|
|
1342
|
+
return status ? WINDOW_WORDS[status] ?? null : null;
|
|
1343
|
+
}
|
|
1344
|
+
function windowLabel(window2) {
|
|
1345
|
+
if (window2 === "after-generate")
|
|
1346
|
+
return "After generate";
|
|
1347
|
+
if (window2 === "cn-peak")
|
|
1348
|
+
return "CN peak";
|
|
1349
|
+
if (window2 === "overseas-rss")
|
|
1350
|
+
return "Overseas RSS";
|
|
1351
|
+
return window2;
|
|
1352
|
+
}
|
|
1353
|
+
function provenanceRows(window2) {
|
|
1354
|
+
return [
|
|
1355
|
+
{ label: "run date matches the bundle", matched: window2.provenance.dateMatch },
|
|
1356
|
+
{ label: "plan references this bundle", matched: window2.provenance.bundleMatch },
|
|
1357
|
+
{ label: "plan references this parent run", matched: window2.provenance.parentMatch },
|
|
1358
|
+
{ label: "receipt digests match the plan", matched: window2.provenance.digestMatch }
|
|
1359
|
+
];
|
|
1360
|
+
}
|
|
1361
|
+
function generationStageRows(summary) {
|
|
1362
|
+
const recorded = new Set;
|
|
1363
|
+
const engineRows = summary.generation.engines.map((engine) => {
|
|
1364
|
+
recorded.add(engine.node);
|
|
1365
|
+
const { word, tone } = engineStateWord(engine.state);
|
|
1366
|
+
const attempts = engine.attempts.length;
|
|
1367
|
+
return {
|
|
1368
|
+
id: engine.node,
|
|
1369
|
+
label: engineNodeLabel(engine.node),
|
|
1370
|
+
status: engine.state,
|
|
1371
|
+
word: attempts > 1 ? `${word} after ${attempts} attempts` : word,
|
|
1372
|
+
tone,
|
|
1373
|
+
timing: engine.attempts.at(-1)?.timing ?? null,
|
|
1374
|
+
engine
|
|
1375
|
+
};
|
|
1376
|
+
});
|
|
1377
|
+
const progress = asRecord2(summary.generation.progress);
|
|
1378
|
+
const nodes = progress && Array.isArray(progress.nodes) ? progress.nodes : [];
|
|
1379
|
+
const progressRows = nodes.flatMap((entry) => {
|
|
1380
|
+
const row = asRecord2(entry);
|
|
1381
|
+
if (!row)
|
|
1382
|
+
return [];
|
|
1383
|
+
const id = asString2(row.id);
|
|
1384
|
+
if (!id || recorded.has(id))
|
|
1385
|
+
return [];
|
|
1386
|
+
const status = asString2(row.status) ?? "unknown";
|
|
1387
|
+
const { word, tone } = engineStateWord(status);
|
|
1388
|
+
return [
|
|
1389
|
+
{
|
|
1390
|
+
id,
|
|
1391
|
+
label: engineNodeLabel(id),
|
|
1392
|
+
status,
|
|
1393
|
+
word,
|
|
1394
|
+
tone,
|
|
1395
|
+
timing: asString2(row.timing),
|
|
1396
|
+
engine: null
|
|
1397
|
+
}
|
|
1398
|
+
];
|
|
1399
|
+
});
|
|
1400
|
+
return [...engineRows, ...progressRows];
|
|
1401
|
+
}
|
|
1402
|
+
function engineNodeLabel(node) {
|
|
1403
|
+
const labels = {
|
|
1404
|
+
prepare: "Prepare sources",
|
|
1405
|
+
curate: "Curate topics",
|
|
1406
|
+
"script-write": "Write script",
|
|
1407
|
+
"editorial-judge": "Editorial review",
|
|
1408
|
+
render: "Render article & cover",
|
|
1409
|
+
safety: "Safety review",
|
|
1410
|
+
voice: "Generate audio",
|
|
1411
|
+
"voice-fallback": "Generate audio (retry A)",
|
|
1412
|
+
"voice-fallback2": "Generate audio (retry B)",
|
|
1413
|
+
freeze: "Freeze bundle"
|
|
1414
|
+
};
|
|
1415
|
+
return labels[node] ?? node;
|
|
1416
|
+
}
|
|
1417
|
+
function publishingWindowRows(summary) {
|
|
1418
|
+
return summary.publishing.windows.map((window2) => ({
|
|
1419
|
+
window: window2.window,
|
|
1420
|
+
label: windowLabel(window2.window),
|
|
1421
|
+
recorded: windowStateWord(window2.recordedStatus),
|
|
1422
|
+
provenance: provenanceRows(window2),
|
|
1423
|
+
targets: window2.targets.map((target) => {
|
|
1424
|
+
const { word, tone } = targetStateWord(target);
|
|
1425
|
+
return { ...target, word, tone };
|
|
1426
|
+
})
|
|
1427
|
+
}));
|
|
1428
|
+
}
|
|
1429
|
+
var STAGE_ORDER = [
|
|
1430
|
+
"prepare",
|
|
1431
|
+
"curate",
|
|
1432
|
+
"script-write",
|
|
1433
|
+
"editorial-judge",
|
|
1434
|
+
"render",
|
|
1435
|
+
"safety",
|
|
1436
|
+
"voice",
|
|
1437
|
+
"freeze"
|
|
1438
|
+
];
|
|
1439
|
+
function outputGroups(results, readerOrigin) {
|
|
1440
|
+
const views = artifactViews(results, readerOrigin);
|
|
1441
|
+
const producersOf = new Map(views.map((view) => [view.id, view]));
|
|
1442
|
+
const byProducer = new Map;
|
|
1443
|
+
for (const descriptor of results.artifacts) {
|
|
1444
|
+
const view = producersOf.get(descriptor.id);
|
|
1445
|
+
if (!view)
|
|
1446
|
+
continue;
|
|
1447
|
+
const producer = descriptor.producerNode ?? "";
|
|
1448
|
+
const bucket = byProducer.get(producer);
|
|
1449
|
+
if (bucket)
|
|
1450
|
+
bucket.push(view);
|
|
1451
|
+
else
|
|
1452
|
+
byProducer.set(producer, [view]);
|
|
1453
|
+
}
|
|
1454
|
+
const producers = [...byProducer.keys()].sort((a, b) => {
|
|
1455
|
+
const ia = STAGE_ORDER.indexOf(a);
|
|
1456
|
+
const ib = STAGE_ORDER.indexOf(b);
|
|
1457
|
+
return (ia === -1 ? STAGE_ORDER.length : ia) - (ib === -1 ? STAGE_ORDER.length : ib);
|
|
1458
|
+
});
|
|
1459
|
+
return producers.map((producer) => ({
|
|
1460
|
+
producer,
|
|
1461
|
+
label: producer ? engineNodeLabel(producer) : "Unattributed",
|
|
1462
|
+
artifacts: byProducer.get(producer) ?? []
|
|
1463
|
+
}));
|
|
1464
|
+
}
|
|
1465
|
+
function stamp(value) {
|
|
1466
|
+
if (!value)
|
|
1467
|
+
return "not recorded";
|
|
1468
|
+
const ms = Date.parse(value);
|
|
1469
|
+
return Number.isNaN(ms) ? value : new Date(ms).toLocaleString(undefined, { dateStyle: "medium", timeStyle: "short" });
|
|
1470
|
+
}
|
|
1471
|
+
function newsSummaryFacts(evidence) {
|
|
1472
|
+
const summary = newsSummaryOf(evidence);
|
|
1473
|
+
const facts = [{ label: "Status", value: evidence.run.status, availability: "available" }];
|
|
1474
|
+
if (!summary) {
|
|
1475
|
+
facts.push({
|
|
1476
|
+
label: "Projection",
|
|
1477
|
+
value: "No captured projection for this attempt",
|
|
1478
|
+
availability: "unverified"
|
|
1479
|
+
});
|
|
1480
|
+
return facts;
|
|
1481
|
+
}
|
|
1482
|
+
const workspace = evidence.results?.availability;
|
|
1483
|
+
const availabilityOf = (present) => present ? workspace === "superseded" ? "superseded" : "available" : "missing";
|
|
1484
|
+
facts.push({
|
|
1485
|
+
label: "Outcome",
|
|
1486
|
+
value: summary.outcome ?? "not recorded",
|
|
1487
|
+
availability: summary.outcome ? "available" : "missing"
|
|
1488
|
+
});
|
|
1489
|
+
facts.push({
|
|
1490
|
+
label: "Gate",
|
|
1491
|
+
value: summary.generation.gate.status ?? "not recorded",
|
|
1492
|
+
availability: summary.generation.gate.status ? "available" : "missing"
|
|
1493
|
+
});
|
|
1494
|
+
facts.push({
|
|
1495
|
+
label: "Started",
|
|
1496
|
+
value: stamp(summary.startedAt),
|
|
1497
|
+
availability: availabilityOf(summary.startedAt !== null)
|
|
1498
|
+
});
|
|
1499
|
+
facts.push({
|
|
1500
|
+
label: "Completed",
|
|
1501
|
+
value: stamp(summary.completedAt),
|
|
1502
|
+
availability: availabilityOf(summary.completedAt !== null)
|
|
1503
|
+
});
|
|
1504
|
+
const { artifactsAvailable, artifactsTotal, targetsSucceeded, targetsFailed, targetsUncertain } = summary.counts;
|
|
1505
|
+
const countsRecorded = artifactsAvailable !== null && artifactsTotal !== null && targetsSucceeded !== null && targetsFailed !== null && targetsUncertain !== null;
|
|
1506
|
+
facts.push({
|
|
1507
|
+
label: "Artifacts",
|
|
1508
|
+
value: artifactsAvailable === null || artifactsTotal === null ? "not recorded" : `${artifactsAvailable} available of ${artifactsTotal}`,
|
|
1509
|
+
availability: countsRecorded ? availabilityOf(true) : "unverified"
|
|
1510
|
+
});
|
|
1511
|
+
const sent = targetsSucceeded ?? 0;
|
|
1512
|
+
const bad = (targetsFailed ?? 0) + (targetsUncertain ?? 0);
|
|
1513
|
+
facts.push({
|
|
1514
|
+
label: "Publishing",
|
|
1515
|
+
value: !countsRecorded ? "not recorded" : bad > 0 ? `${sent} sent, ${bad} failed or uncertain` : `${sent} sent`,
|
|
1516
|
+
availability: countsRecorded ? availabilityOf(true) : "unverified"
|
|
1517
|
+
});
|
|
1518
|
+
return facts;
|
|
1519
|
+
}
|
|
1520
|
+
function latestIssue(summary, diagnostics) {
|
|
1521
|
+
if (summary) {
|
|
1522
|
+
for (const window2 of summary.publishing.windows) {
|
|
1523
|
+
for (const target of window2.targets) {
|
|
1524
|
+
if (target.status === "failed" || target.status === "uncertain") {
|
|
1525
|
+
const why = target.error ?? "no error detail recorded";
|
|
1526
|
+
return {
|
|
1527
|
+
title: `${windowLabel(window2.window)}: ${target.id} ${target.status}`,
|
|
1528
|
+
detail: why
|
|
1529
|
+
};
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
if (summary.generation.launch.stale) {
|
|
1534
|
+
return {
|
|
1535
|
+
title: "Launch receipt points at another run",
|
|
1536
|
+
detail: `receipt run ${summary.generation.launch.runId ?? "unknown"} is not this attempt`
|
|
1537
|
+
};
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
const first = diagnostics.find((d) => typeof d.message === "string" && d.message.length > 0);
|
|
1541
|
+
return first ? { title: first.code, detail: first.message } : null;
|
|
1542
|
+
}
|
|
1543
|
+
function uncapturedDiagnostic(evidence) {
|
|
1544
|
+
if (captureState(evidence) !== "uncaptured")
|
|
1545
|
+
return null;
|
|
1546
|
+
const found = evidence.diagnostics.find((d) => d.code === "board.evidence.uncaptured");
|
|
1547
|
+
return found ?? null;
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1134
1550
|
// ../board/src/daily-voice/index.tsx
|
|
1135
1551
|
import { jsx as jsx2, jsxs as jsxs2, Fragment } from "react/jsx-runtime";
|
|
1136
1552
|
var MODULE_PATH = "/board/modules/kk-daily-ai-voice2";
|
|
1137
|
-
var
|
|
1553
|
+
var VIEW_TABS_ID = "daily-voice-view";
|
|
1554
|
+
var VIEW_LABELS = {
|
|
1138
1555
|
summary: "Summary",
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
config: "Workflow Config Summary"
|
|
1556
|
+
generation: "Generation",
|
|
1557
|
+
publishing: "Publishing"
|
|
1142
1558
|
};
|
|
1143
|
-
|
|
1144
|
-
|
|
1559
|
+
var TONE_BADGE = {
|
|
1560
|
+
info: "info",
|
|
1561
|
+
success: "success",
|
|
1562
|
+
warn: "warning",
|
|
1563
|
+
error: "error",
|
|
1564
|
+
neutral: "neutral"
|
|
1565
|
+
};
|
|
1566
|
+
function statusBadgeVariant(status) {
|
|
1567
|
+
if (status === "done" || status === "success" || status === "passed")
|
|
1568
|
+
return "success";
|
|
1569
|
+
if (status === "failed" || status === "failure")
|
|
1570
|
+
return "error";
|
|
1571
|
+
return "info";
|
|
1145
1572
|
}
|
|
1146
1573
|
function isOfflineError(message) {
|
|
1147
1574
|
return message.includes("Failed to fetch") || message.includes("NetworkError") || message.includes("ECONNREFUSED");
|
|
1148
1575
|
}
|
|
1576
|
+
function messageOf(error) {
|
|
1577
|
+
return error instanceof Error ? error.message : String(error);
|
|
1578
|
+
}
|
|
1149
1579
|
function usePolling(loader, intervalMs, refresh) {
|
|
1150
1580
|
const loaderRef = useRef(loader);
|
|
1151
1581
|
loaderRef.current = loader;
|
|
@@ -1168,7 +1598,7 @@ function usePolling(loader, intervalMs, refresh) {
|
|
|
1168
1598
|
}, [intervalMs]);
|
|
1169
1599
|
}
|
|
1170
1600
|
function DailyVoiceModule() {
|
|
1171
|
-
const [link] = useState(() => parseDeepLink(window.location.search));
|
|
1601
|
+
const [link] = useState(() => parseDeepLink(window.location.search, DAILY_VIEWS, DAILY_VIEW_ALIASES));
|
|
1172
1602
|
const [reader] = useState(() => readerOriginFrom(window.location.search));
|
|
1173
1603
|
const [aggregateReader] = useState(() => readerOriginFrom(window.location.search, DEFAULT_READER_ORIGIN));
|
|
1174
1604
|
const readerOrigin = reader.origin;
|
|
@@ -1179,7 +1609,10 @@ function DailyVoiceModule() {
|
|
|
1179
1609
|
}), [readerOrigin, aggregateReader.origin]);
|
|
1180
1610
|
const [rows, setRows] = useState([]);
|
|
1181
1611
|
const [cursor, setCursor] = useState(null);
|
|
1182
|
-
const [selection, setSelection] = useState({
|
|
1612
|
+
const [selection, setSelection] = useState({
|
|
1613
|
+
runId: link.runId ?? null,
|
|
1614
|
+
tab: link.tab ?? "summary"
|
|
1615
|
+
});
|
|
1183
1616
|
const [diagnostics, setDiagnostics] = useState(() => [
|
|
1184
1617
|
...link.diagnostics,
|
|
1185
1618
|
...reader.diagnostic === null ? [] : [reader.diagnostic],
|
|
@@ -1187,6 +1620,7 @@ function DailyVoiceModule() {
|
|
|
1187
1620
|
]);
|
|
1188
1621
|
const [historyRefresh, setHistoryRefresh] = useState(() => initialRefresh(HISTORY_POLL_MS));
|
|
1189
1622
|
const [readerRefresh, setReaderRefresh] = useState(() => initialRefresh(ACTIVE_POLL_MS));
|
|
1623
|
+
const [evidence, setEvidence] = useState(null);
|
|
1190
1624
|
const [results, setResults] = useState(null);
|
|
1191
1625
|
const [config, setConfig] = useState(null);
|
|
1192
1626
|
const [filterQuery, setFilterQuery] = useState("");
|
|
@@ -1209,7 +1643,10 @@ function DailyVoiceModule() {
|
|
|
1209
1643
|
const current = await client.runs(DAILY_WORKFLOW);
|
|
1210
1644
|
let chosen = { family: DAILY_WORKFLOW, page: current };
|
|
1211
1645
|
if (current.runs.length === 0) {
|
|
1212
|
-
const retiredPages = await Promise.all(RETIRED_DAILY_WORKFLOWS.map(async (
|
|
1646
|
+
const retiredPages = await Promise.all(RETIRED_DAILY_WORKFLOWS.map(async (retired) => ({
|
|
1647
|
+
family: retired,
|
|
1648
|
+
page: await client.runs(retired)
|
|
1649
|
+
})));
|
|
1213
1650
|
const choice = pickDailyFamily(current.runs, retiredPages.map((entry) => ({ family: entry.family, rows: entry.page.runs })));
|
|
1214
1651
|
const hit = retiredPages.find((entry) => entry.family === choice.family);
|
|
1215
1652
|
if (choice.retired && hit !== undefined)
|
|
@@ -1240,16 +1677,28 @@ function DailyVoiceModule() {
|
|
|
1240
1677
|
setReaderRefresh((state) => tick(state));
|
|
1241
1678
|
let stale = false;
|
|
1242
1679
|
try {
|
|
1243
|
-
|
|
1244
|
-
client.
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1680
|
+
if (familyRef.current === DAILY_WORKFLOW) {
|
|
1681
|
+
const envelope = await client.evidence(familyRef.current, runId);
|
|
1682
|
+
if (selectionRef.current.runId !== runId) {
|
|
1683
|
+
stale = true;
|
|
1684
|
+
return;
|
|
1685
|
+
}
|
|
1686
|
+
setEvidence(envelope);
|
|
1687
|
+
setResults(null);
|
|
1688
|
+
setConfig(null);
|
|
1689
|
+
} else {
|
|
1690
|
+
const [nextResults, nextConfig] = await Promise.all([
|
|
1691
|
+
client.results(familyRef.current, runId),
|
|
1692
|
+
client.config(familyRef.current, runId)
|
|
1693
|
+
]);
|
|
1694
|
+
if (selectionRef.current.runId !== runId) {
|
|
1695
|
+
stale = true;
|
|
1696
|
+
return;
|
|
1697
|
+
}
|
|
1698
|
+
setResults(nextResults);
|
|
1699
|
+
setConfig(nextConfig);
|
|
1700
|
+
setEvidence(null);
|
|
1250
1701
|
}
|
|
1251
|
-
setResults(nextResults);
|
|
1252
|
-
setConfig(nextConfig);
|
|
1253
1702
|
setReaderRefresh(() => succeeded(Date.now(), ACTIVE_POLL_MS));
|
|
1254
1703
|
} catch (error) {
|
|
1255
1704
|
if (selectionRef.current.runId !== runId) {
|
|
@@ -1271,20 +1720,26 @@ function DailyVoiceModule() {
|
|
|
1271
1720
|
usePolling(loadReader, ACTIVE_POLL_MS, readerRefresh);
|
|
1272
1721
|
useEffect(() => {
|
|
1273
1722
|
if (selection.runId === null && rows.length > 0) {
|
|
1274
|
-
setSelection((state) => state.runId === null ? resolveSelection(rows, link) : state);
|
|
1723
|
+
setSelection((state) => state.runId === null ? resolveSelection(rows, link, "summary") : state);
|
|
1275
1724
|
}
|
|
1276
1725
|
}, [rows, selection.runId, link]);
|
|
1277
1726
|
useEffect(() => {
|
|
1278
1727
|
syncSelectionUrl(selection, { location: window.location, history: window.history }, MODULE_PATH);
|
|
1279
1728
|
}, [selection]);
|
|
1280
|
-
const
|
|
1729
|
+
const view = selection.tab;
|
|
1730
|
+
const newsFamily = family === DAILY_WORKFLOW;
|
|
1281
1731
|
const now = Date.now();
|
|
1282
|
-
const
|
|
1283
|
-
const
|
|
1732
|
+
const legacySummary = results === null ? null : dailySummary(results);
|
|
1733
|
+
const news = evidence !== null && newsFamily ? newsSummaryOf(evidence) : null;
|
|
1734
|
+
const newsFacts = evidence !== null && newsFamily ? newsSummaryFacts(evidence) : [];
|
|
1735
|
+
const issue = evidence !== null && newsFamily ? latestIssue(news, evidence.diagnostics) : null;
|
|
1284
1736
|
const funnel = funnelView(results?.summary.funnel);
|
|
1285
|
-
const
|
|
1737
|
+
const legacyArtifacts = results === null ? [] : artifactViews(results, readerOrigin);
|
|
1738
|
+
const outputRows = evidence !== null && newsFamily && evidence.results !== null ? outputGroups(evidence.results, readerOrigin) : [];
|
|
1739
|
+
const stageRows = news === null ? [] : generationStageRows(news);
|
|
1740
|
+
const context = supplyContextOf(newsFamily ? evidence?.capture?.settings.window ?? null : config?.settings.window ?? null, news?.startedAt ?? legacySummary?.startedAt ?? null);
|
|
1286
1741
|
useEffect(() => {
|
|
1287
|
-
const bounds =
|
|
1742
|
+
const bounds = view === "summary" && context !== null ? context : null;
|
|
1288
1743
|
const key = bounds === null ? null : `${selection.runId}:${bounds.fromMs}:${bounds.untilMs}`;
|
|
1289
1744
|
if (key === supplyKeyRef.current)
|
|
1290
1745
|
return;
|
|
@@ -1316,8 +1771,7 @@ function DailyVoiceModule() {
|
|
|
1316
1771
|
return () => {
|
|
1317
1772
|
cancelled = true;
|
|
1318
1773
|
};
|
|
1319
|
-
}, [client,
|
|
1320
|
-
const artifacts = results === null ? [] : artifactViews(results, readerOrigin);
|
|
1774
|
+
}, [client, view, context, selection.runId]);
|
|
1321
1775
|
const selectedRow = rows.find((row) => row.id === selection.runId);
|
|
1322
1776
|
const filteredRows = useMemo(() => {
|
|
1323
1777
|
const q = filterQuery.trim().toLowerCase();
|
|
@@ -1325,147 +1779,171 @@ function DailyVoiceModule() {
|
|
|
1325
1779
|
return rows;
|
|
1326
1780
|
return rows.filter((r) => r.id.toLowerCase().includes(q) || r.status.toLowerCase().includes(q));
|
|
1327
1781
|
}, [rows, filterQuery]);
|
|
1328
|
-
|
|
1329
|
-
|
|
1782
|
+
const displayDiagnostics = dedupeDiagnostics([
|
|
1783
|
+
...diagnostics,
|
|
1784
|
+
...evidence?.diagnostics ?? results?.diagnostics ?? []
|
|
1785
|
+
]);
|
|
1786
|
+
const freshness = freshnessLabel(readerRefresh);
|
|
1787
|
+
const availability = evidence?.results?.availability ?? results?.availability ?? "unverified";
|
|
1788
|
+
const outcomeWord = newsFamily ? news?.outcome ?? null : legacySummary?.outcome ?? null;
|
|
1789
|
+
const filterBox = /* @__PURE__ */ jsxs2("div", {
|
|
1790
|
+
className: "kk-board-run-filter-group",
|
|
1330
1791
|
children: [
|
|
1331
|
-
/* @__PURE__ */
|
|
1332
|
-
|
|
1792
|
+
/* @__PURE__ */ jsx2("input", {
|
|
1793
|
+
type: "text",
|
|
1794
|
+
className: "kk-board-run-filter-input",
|
|
1795
|
+
placeholder: "Filter runs...",
|
|
1796
|
+
value: filterQuery,
|
|
1797
|
+
onChange: (e) => setFilterQuery(e.target.value),
|
|
1798
|
+
"aria-label": "Filter runs"
|
|
1799
|
+
}),
|
|
1800
|
+
/* @__PURE__ */ jsxs2("label", {
|
|
1801
|
+
className: "kk-board-run-selector",
|
|
1333
1802
|
children: [
|
|
1334
|
-
|
|
1335
|
-
|
|
1803
|
+
"Run",
|
|
1804
|
+
/* @__PURE__ */ jsxs2("select", {
|
|
1805
|
+
value: selection.runId ?? "",
|
|
1806
|
+
onChange: (event) => setSelection((state) => ({ ...state, runId: event.target.value || null })),
|
|
1336
1807
|
children: [
|
|
1337
|
-
/* @__PURE__ */
|
|
1338
|
-
|
|
1339
|
-
children:
|
|
1340
|
-
/* @__PURE__ */ jsx2("h1", {
|
|
1341
|
-
children: "Daily AI Voice"
|
|
1342
|
-
}),
|
|
1343
|
-
selectedRow ? /* @__PURE__ */ jsx2("span", {
|
|
1344
|
-
className: `kk-badge ${selectedRow.status === "done" ? "kk-badge-success" : selectedRow.status === "failed" ? "kk-badge-failed" : "kk-badge-running"}`,
|
|
1345
|
-
children: selectedRow.status
|
|
1346
|
-
}) : null
|
|
1347
|
-
]
|
|
1808
|
+
/* @__PURE__ */ jsx2("option", {
|
|
1809
|
+
value: "",
|
|
1810
|
+
children: rows.length === 0 ? "No runs recorded" : filteredRows.length === 0 ? "No matching runs" : "Select a run"
|
|
1348
1811
|
}),
|
|
1349
|
-
/* @__PURE__ */ jsxs2("
|
|
1812
|
+
filteredRows.map((row) => /* @__PURE__ */ jsxs2("option", {
|
|
1813
|
+
value: row.id,
|
|
1350
1814
|
children: [
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
}),
|
|
1355
|
-
" · ",
|
|
1356
|
-
freshnessLabel(readerRefresh),
|
|
1357
|
-
summary === null ? "" : ` · Outcome ${summary.outcome ?? "unknown"} · ${results?.availability ?? "unverified"}`
|
|
1358
|
-
]
|
|
1359
|
-
})
|
|
1360
|
-
]
|
|
1361
|
-
}),
|
|
1362
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
1363
|
-
className: "kk-board-header-right",
|
|
1364
|
-
children: [
|
|
1365
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
1366
|
-
className: "kk-board-run-filter-group",
|
|
1367
|
-
children: [
|
|
1368
|
-
/* @__PURE__ */ jsx2("input", {
|
|
1369
|
-
type: "text",
|
|
1370
|
-
className: "kk-board-run-filter-input",
|
|
1371
|
-
placeholder: "Filter runs...",
|
|
1372
|
-
value: filterQuery,
|
|
1373
|
-
onChange: (e) => setFilterQuery(e.target.value),
|
|
1374
|
-
"aria-label": "Filter runs"
|
|
1375
|
-
}),
|
|
1376
|
-
/* @__PURE__ */ jsxs2("label", {
|
|
1377
|
-
className: "kk-board-run-selector",
|
|
1378
|
-
children: [
|
|
1379
|
-
"Run",
|
|
1380
|
-
/* @__PURE__ */ jsxs2("select", {
|
|
1381
|
-
value: selection.runId ?? "",
|
|
1382
|
-
onChange: (event) => setSelection((state) => ({ ...state, runId: event.target.value || null })),
|
|
1383
|
-
children: [
|
|
1384
|
-
/* @__PURE__ */ jsx2("option", {
|
|
1385
|
-
value: "",
|
|
1386
|
-
children: rows.length === 0 ? "No runs recorded" : filteredRows.length === 0 ? "No matching runs" : "Select a run"
|
|
1387
|
-
}),
|
|
1388
|
-
filteredRows.map((row) => /* @__PURE__ */ jsxs2("option", {
|
|
1389
|
-
value: row.id,
|
|
1390
|
-
children: [
|
|
1391
|
-
row.id,
|
|
1392
|
-
" — ",
|
|
1393
|
-
row.status
|
|
1394
|
-
]
|
|
1395
|
-
}, row.id))
|
|
1396
|
-
]
|
|
1397
|
-
})
|
|
1398
|
-
]
|
|
1399
|
-
})
|
|
1815
|
+
row.id,
|
|
1816
|
+
" — ",
|
|
1817
|
+
row.status
|
|
1400
1818
|
]
|
|
1401
|
-
})
|
|
1402
|
-
/* @__PURE__ */ jsx2("button", {
|
|
1403
|
-
type: "button",
|
|
1404
|
-
onClick: () => void loadReader(),
|
|
1405
|
-
title: "Refresh run data",
|
|
1406
|
-
children: "↻ Refresh"
|
|
1407
|
-
}),
|
|
1408
|
-
selection.runId === null ? null : /* @__PURE__ */ jsx2("a", {
|
|
1409
|
-
href: selectionPath(selection, window.location.search, MODULE_PATH),
|
|
1410
|
-
className: "kk-btn-action",
|
|
1411
|
-
title: "Permanent link",
|
|
1412
|
-
children: "\uD83D\uDD17 Link"
|
|
1413
|
-
})
|
|
1819
|
+
}, row.id))
|
|
1414
1820
|
]
|
|
1415
1821
|
})
|
|
1416
1822
|
]
|
|
1417
1823
|
}),
|
|
1418
|
-
/* @__PURE__ */ jsx2("
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1824
|
+
/* @__PURE__ */ jsx2("button", {
|
|
1825
|
+
type: "button",
|
|
1826
|
+
onClick: () => void loadReader(),
|
|
1827
|
+
title: "Refresh run data",
|
|
1828
|
+
children: "↻ Refresh"
|
|
1829
|
+
}),
|
|
1830
|
+
selection.runId === null ? null : /* @__PURE__ */ jsx2("a", {
|
|
1831
|
+
href: selectionPath(selection, window.location.search, MODULE_PATH),
|
|
1832
|
+
className: "kk-btn-action",
|
|
1833
|
+
title: "Permanent link",
|
|
1834
|
+
children: "\uD83D\uDD17 Link"
|
|
1835
|
+
})
|
|
1836
|
+
]
|
|
1837
|
+
});
|
|
1838
|
+
return /* @__PURE__ */ jsxs2(ModuleShell, {
|
|
1839
|
+
className: "kk-board kk-board-daily-voice",
|
|
1840
|
+
children: [
|
|
1841
|
+
/* @__PURE__ */ jsx2(ModuleHeader, {
|
|
1842
|
+
icon: /* @__PURE__ */ jsx2("span", {
|
|
1843
|
+
"aria-hidden": "true",
|
|
1844
|
+
children: "\uD83C\uDF99️"
|
|
1845
|
+
}),
|
|
1846
|
+
title: "Daily AI Voice",
|
|
1847
|
+
subtitle: /* @__PURE__ */ jsxs2(Fragment, {
|
|
1848
|
+
children: [
|
|
1849
|
+
"Run ",
|
|
1850
|
+
/* @__PURE__ */ jsx2("code", {
|
|
1851
|
+
children: selection.runId ?? "none selected"
|
|
1852
|
+
}),
|
|
1853
|
+
" · ",
|
|
1854
|
+
freshness,
|
|
1855
|
+
" ·",
|
|
1856
|
+
" ",
|
|
1857
|
+
outcomeWord === null ? "outcome unknown" : `Outcome ${outcomeWord}`,
|
|
1858
|
+
" · ",
|
|
1859
|
+
availability
|
|
1860
|
+
]
|
|
1861
|
+
}),
|
|
1862
|
+
status: selectedRow ? /* @__PURE__ */ jsx2(Badge, {
|
|
1863
|
+
variant: statusBadgeVariant(selectedRow.status),
|
|
1864
|
+
size: "sm",
|
|
1865
|
+
children: selectedRow.status
|
|
1866
|
+
}) : undefined,
|
|
1867
|
+
filters: filterBox,
|
|
1868
|
+
tabs: /* @__PURE__ */ jsx2(ModuleTabs, {
|
|
1869
|
+
tabs: DAILY_VIEWS.map((id) => ({ id, label: VIEW_LABELS[id] })),
|
|
1870
|
+
value: view,
|
|
1871
|
+
onChange: (id) => setSelection((state) => ({ ...state, tab: id })),
|
|
1872
|
+
label: "Daily AI Voice views",
|
|
1873
|
+
idPrefix: VIEW_TABS_ID
|
|
1874
|
+
})
|
|
1427
1875
|
}),
|
|
1428
|
-
|
|
1876
|
+
newsFamily ? null : /* @__PURE__ */ jsx2("p", {
|
|
1429
1877
|
className: "kk-board-empty kk-board-retired-layout",
|
|
1430
1878
|
children: retiredLayoutNotice({ family, rows, retired: true })
|
|
1431
1879
|
}),
|
|
1432
|
-
rows.length === 0 ? /* @__PURE__ */ jsxs2(
|
|
1433
|
-
|
|
1880
|
+
rows.length === 0 ? /* @__PURE__ */ jsxs2(EmptyState, {
|
|
1881
|
+
testId: "daily-voice-no-runs",
|
|
1434
1882
|
children: [
|
|
1435
1883
|
"No runs recorded for ",
|
|
1436
1884
|
DAILY_WORKFLOW,
|
|
1437
1885
|
". Configure the workflow in",
|
|
1438
1886
|
" ",
|
|
1439
1887
|
/* @__PURE__ */ jsx2("a", {
|
|
1440
|
-
href: "/board/settings/workflows",
|
|
1888
|
+
href: withBase("/board/settings/workflows"),
|
|
1441
1889
|
children: "Settings → Workflows"
|
|
1442
1890
|
}),
|
|
1443
1891
|
"."
|
|
1444
1892
|
]
|
|
1445
1893
|
}) : null,
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1894
|
+
DAILY_VIEWS.map((panelView) => {
|
|
1895
|
+
const active = panelView === view;
|
|
1896
|
+
const panel = panelView === "summary" ? newsFamily ? /* @__PURE__ */ jsx2(NewsSummaryPanel, {
|
|
1897
|
+
evidence,
|
|
1898
|
+
news,
|
|
1899
|
+
facts: newsFacts,
|
|
1900
|
+
issue,
|
|
1901
|
+
context,
|
|
1902
|
+
supply,
|
|
1903
|
+
storeOffline
|
|
1904
|
+
}) : /* @__PURE__ */ jsx2(LegacySummaryPanel, {
|
|
1905
|
+
facts: results === null ? [] : dailySummaryFacts(results, now),
|
|
1906
|
+
results,
|
|
1907
|
+
config,
|
|
1908
|
+
funnel,
|
|
1909
|
+
artifacts: legacyArtifacts,
|
|
1910
|
+
context,
|
|
1911
|
+
supply,
|
|
1912
|
+
storeOffline
|
|
1913
|
+
}) : panelView === "generation" ? newsFamily ? /* @__PURE__ */ jsx2(NewsGenerationPanel, {
|
|
1914
|
+
evidence,
|
|
1915
|
+
news,
|
|
1916
|
+
stages: stageRows,
|
|
1917
|
+
groups: outputRows
|
|
1918
|
+
}) : /* @__PURE__ */ jsxs2(Fragment, {
|
|
1919
|
+
children: [
|
|
1920
|
+
/* @__PURE__ */ jsx2(LegacyResultsPanel, {
|
|
1921
|
+
artifacts: legacyArtifacts,
|
|
1922
|
+
channels: legacySummary?.channels ?? []
|
|
1923
|
+
}),
|
|
1924
|
+
/* @__PURE__ */ jsx2(LegacyProgressPanel, {
|
|
1925
|
+
progress: legacySummary?.progress ?? null
|
|
1926
|
+
})
|
|
1927
|
+
]
|
|
1928
|
+
}) : newsFamily ? /* @__PURE__ */ jsx2(NewsPublishingPanel, {
|
|
1929
|
+
news
|
|
1930
|
+
}) : /* @__PURE__ */ jsx2(LegacyChannelList, {
|
|
1931
|
+
channels: legacySummary?.channels ?? []
|
|
1932
|
+
});
|
|
1933
|
+
return /* @__PURE__ */ jsx2("div", {
|
|
1934
|
+
id: `${VIEW_TABS_ID}-panel-${panelView}`,
|
|
1935
|
+
role: "tabpanel",
|
|
1936
|
+
"aria-labelledby": `${VIEW_TABS_ID}-${panelView}`,
|
|
1937
|
+
hidden: !active,
|
|
1938
|
+
style: active ? { display: "flex", flexDirection: "column", gap: "0.875rem" } : undefined,
|
|
1939
|
+
children: panel
|
|
1940
|
+
}, panelView);
|
|
1941
|
+
}),
|
|
1942
|
+
displayDiagnostics.map((diagnostic) => /* @__PURE__ */ jsx2(Diagnostic, {
|
|
1943
|
+
tone: "error",
|
|
1944
|
+
title: diagnostic.code,
|
|
1945
|
+
detail: diagnostic.message,
|
|
1946
|
+
testId: "daily-voice-diagnostic"
|
|
1469
1947
|
}, diagnostic.code)),
|
|
1470
1948
|
cursor === null ? null : /* @__PURE__ */ jsx2("button", {
|
|
1471
1949
|
type: "button",
|
|
@@ -1485,41 +1963,239 @@ function DailyVoiceModule() {
|
|
|
1485
1963
|
]
|
|
1486
1964
|
});
|
|
1487
1965
|
}
|
|
1488
|
-
function
|
|
1966
|
+
function NewsSummaryPanel({
|
|
1967
|
+
evidence,
|
|
1968
|
+
news,
|
|
1489
1969
|
facts,
|
|
1490
|
-
|
|
1491
|
-
funnel,
|
|
1492
|
-
artifacts,
|
|
1970
|
+
issue,
|
|
1493
1971
|
context,
|
|
1494
1972
|
supply,
|
|
1495
1973
|
storeOffline
|
|
1496
1974
|
}) {
|
|
1497
|
-
if (
|
|
1498
|
-
return /* @__PURE__ */ jsx2(
|
|
1499
|
-
children: "No
|
|
1975
|
+
if (evidence === null)
|
|
1976
|
+
return /* @__PURE__ */ jsx2(EmptyState, {
|
|
1977
|
+
children: "No evidence for the selected run yet."
|
|
1500
1978
|
});
|
|
1501
|
-
const
|
|
1502
|
-
const
|
|
1503
|
-
return /* @__PURE__ */ jsxs2(
|
|
1504
|
-
|
|
1979
|
+
const capture = evidence.capture;
|
|
1980
|
+
const settings = capture === null ? [] : Object.entries(capture.settings);
|
|
1981
|
+
return /* @__PURE__ */ jsxs2(Fragment, {
|
|
1982
|
+
children: [
|
|
1983
|
+
issue === null ? null : /* @__PURE__ */ jsx2(Diagnostic, {
|
|
1984
|
+
tone: "error",
|
|
1985
|
+
title: issue.title,
|
|
1986
|
+
detail: issue.detail,
|
|
1987
|
+
testId: "daily-voice-issue"
|
|
1988
|
+
}),
|
|
1989
|
+
uncapturedDiagnostic(evidence) === null ? null : /* @__PURE__ */ jsx2(Diagnostic, {
|
|
1990
|
+
tone: "warning",
|
|
1991
|
+
title: "Attempt not captured",
|
|
1992
|
+
detail: uncapturedDiagnostic(evidence)?.message,
|
|
1993
|
+
code: uncapturedDiagnostic(evidence)?.code,
|
|
1994
|
+
testId: "daily-voice-uncaptured"
|
|
1995
|
+
}),
|
|
1996
|
+
/* @__PURE__ */ jsx2("dl", {
|
|
1997
|
+
className: "kk-board-facts",
|
|
1998
|
+
"data-testid": "daily-voice-summary-facts",
|
|
1999
|
+
children: facts.map((fact) => /* @__PURE__ */ jsxs2("div", {
|
|
2000
|
+
children: [
|
|
2001
|
+
/* @__PURE__ */ jsx2("dt", {
|
|
2002
|
+
children: fact.label
|
|
2003
|
+
}),
|
|
2004
|
+
/* @__PURE__ */ jsxs2("dd", {
|
|
2005
|
+
children: [
|
|
2006
|
+
fact.value,
|
|
2007
|
+
" ",
|
|
2008
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2009
|
+
className: "kk-board-state",
|
|
2010
|
+
children: fact.availability
|
|
2011
|
+
})
|
|
2012
|
+
]
|
|
2013
|
+
})
|
|
2014
|
+
]
|
|
2015
|
+
}, fact.label))
|
|
2016
|
+
}),
|
|
2017
|
+
capture === null ? null : /* @__PURE__ */ jsxs2("details", {
|
|
2018
|
+
className: "kk-card",
|
|
2019
|
+
"data-testid": "daily-voice-captured-settings",
|
|
2020
|
+
children: [
|
|
2021
|
+
/* @__PURE__ */ jsxs2("summary", {
|
|
2022
|
+
children: [
|
|
2023
|
+
"Captured settings ",
|
|
2024
|
+
/* @__PURE__ */ jsxs2("span", {
|
|
2025
|
+
className: "kk-stat-sub",
|
|
2026
|
+
children: [
|
|
2027
|
+
"stamp ",
|
|
2028
|
+
capture.stamp
|
|
2029
|
+
]
|
|
2030
|
+
})
|
|
2031
|
+
]
|
|
2032
|
+
}),
|
|
2033
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
2034
|
+
className: "kk-board-config",
|
|
2035
|
+
children: [
|
|
2036
|
+
/* @__PURE__ */ jsxs2("p", {
|
|
2037
|
+
children: [
|
|
2038
|
+
"Captured ",
|
|
2039
|
+
formatTimestamp(capture.capturedAt)
|
|
2040
|
+
]
|
|
2041
|
+
}),
|
|
2042
|
+
settings.length === 0 ? /* @__PURE__ */ jsx2("p", {
|
|
2043
|
+
children: "No settings were recorded for this attempt."
|
|
2044
|
+
}) : null,
|
|
2045
|
+
/* @__PURE__ */ jsx2("dl", {
|
|
2046
|
+
children: settings.map(([key, value]) => /* @__PURE__ */ jsxs2("div", {
|
|
2047
|
+
children: [
|
|
2048
|
+
/* @__PURE__ */ jsx2("dt", {
|
|
2049
|
+
children: key
|
|
2050
|
+
}),
|
|
2051
|
+
/* @__PURE__ */ jsx2("dd", {
|
|
2052
|
+
children: value
|
|
2053
|
+
})
|
|
2054
|
+
]
|
|
2055
|
+
}, key))
|
|
2056
|
+
}),
|
|
2057
|
+
capture.definitionDigest === undefined ? null : /* @__PURE__ */ jsxs2("p", {
|
|
2058
|
+
children: [
|
|
2059
|
+
"Definition digest ",
|
|
2060
|
+
/* @__PURE__ */ jsx2("code", {
|
|
2061
|
+
children: capture.definitionDigest
|
|
2062
|
+
})
|
|
2063
|
+
]
|
|
2064
|
+
})
|
|
2065
|
+
]
|
|
2066
|
+
})
|
|
2067
|
+
]
|
|
2068
|
+
}),
|
|
2069
|
+
/* @__PURE__ */ jsx2(SupplyPanel, {
|
|
2070
|
+
context,
|
|
2071
|
+
supply,
|
|
2072
|
+
storeOffline
|
|
2073
|
+
}),
|
|
2074
|
+
news === null ? /* @__PURE__ */ jsx2("p", {
|
|
2075
|
+
className: "kk-board-footnote",
|
|
2076
|
+
children: "The generation and publishing views stay empty for an uncaptured attempt — fixed artifacts are unknown, never invented."
|
|
2077
|
+
}) : null
|
|
2078
|
+
]
|
|
2079
|
+
});
|
|
2080
|
+
}
|
|
2081
|
+
function StageRow({ stage }) {
|
|
2082
|
+
return /* @__PURE__ */ jsxs2("li", {
|
|
2083
|
+
children: [
|
|
2084
|
+
/* @__PURE__ */ jsx2("strong", {
|
|
2085
|
+
children: stage.label
|
|
2086
|
+
}),
|
|
2087
|
+
" ",
|
|
2088
|
+
/* @__PURE__ */ jsx2(Badge, {
|
|
2089
|
+
variant: TONE_BADGE[stage.tone],
|
|
2090
|
+
size: "sm",
|
|
2091
|
+
children: stage.word
|
|
2092
|
+
}),
|
|
2093
|
+
stage.timing === null ? null : /* @__PURE__ */ jsxs2("span", {
|
|
2094
|
+
className: "kk-board-state",
|
|
2095
|
+
children: [
|
|
2096
|
+
" ",
|
|
2097
|
+
stage.timing
|
|
2098
|
+
]
|
|
2099
|
+
})
|
|
2100
|
+
]
|
|
2101
|
+
});
|
|
2102
|
+
}
|
|
2103
|
+
function ArtifactRow({ artifact }) {
|
|
2104
|
+
if (artifact.href === null) {
|
|
2105
|
+
return /* @__PURE__ */ jsx2("li", {
|
|
2106
|
+
children: /* @__PURE__ */ jsxs2("span", {
|
|
2107
|
+
children: [
|
|
2108
|
+
artifact.label,
|
|
2109
|
+
" — ",
|
|
2110
|
+
artifact.state
|
|
2111
|
+
]
|
|
2112
|
+
})
|
|
2113
|
+
}, artifact.id);
|
|
2114
|
+
}
|
|
2115
|
+
if (artifact.kind === "audio") {
|
|
2116
|
+
return /* @__PURE__ */ jsxs2("li", {
|
|
2117
|
+
children: [
|
|
2118
|
+
/* @__PURE__ */ jsx2("audio", {
|
|
2119
|
+
controls: true,
|
|
2120
|
+
src: artifact.href,
|
|
2121
|
+
children: /* @__PURE__ */ jsx2("track", {
|
|
2122
|
+
kind: "captions"
|
|
2123
|
+
})
|
|
2124
|
+
}),
|
|
2125
|
+
" ",
|
|
2126
|
+
/* @__PURE__ */ jsxs2("a", {
|
|
2127
|
+
href: artifact.href,
|
|
2128
|
+
download: true,
|
|
2129
|
+
children: [
|
|
2130
|
+
"download ",
|
|
2131
|
+
artifact.label
|
|
2132
|
+
]
|
|
2133
|
+
}),
|
|
2134
|
+
" ",
|
|
2135
|
+
"— ",
|
|
2136
|
+
artifact.state
|
|
2137
|
+
]
|
|
2138
|
+
}, artifact.id);
|
|
2139
|
+
}
|
|
2140
|
+
if (artifact.kind === "image") {
|
|
2141
|
+
return /* @__PURE__ */ jsxs2("li", {
|
|
2142
|
+
children: [
|
|
2143
|
+
/* @__PURE__ */ jsx2("img", {
|
|
2144
|
+
src: artifact.href,
|
|
2145
|
+
alt: artifact.label
|
|
2146
|
+
}),
|
|
2147
|
+
" ",
|
|
2148
|
+
artifact.label,
|
|
2149
|
+
" — ",
|
|
2150
|
+
artifact.state
|
|
2151
|
+
]
|
|
2152
|
+
}, artifact.id);
|
|
2153
|
+
}
|
|
2154
|
+
return /* @__PURE__ */ jsxs2("li", {
|
|
2155
|
+
children: [
|
|
2156
|
+
/* @__PURE__ */ jsx2("a", {
|
|
2157
|
+
href: artifact.href,
|
|
2158
|
+
children: artifact.label
|
|
2159
|
+
}),
|
|
2160
|
+
" — ",
|
|
2161
|
+
artifact.state
|
|
2162
|
+
]
|
|
2163
|
+
}, artifact.id);
|
|
2164
|
+
}
|
|
2165
|
+
function NewsGenerationPanel({
|
|
2166
|
+
evidence,
|
|
2167
|
+
news,
|
|
2168
|
+
stages,
|
|
2169
|
+
groups
|
|
2170
|
+
}) {
|
|
2171
|
+
if (evidence === null || evidence.results === null) {
|
|
2172
|
+
return /* @__PURE__ */ jsx2(EmptyState, {
|
|
2173
|
+
testId: "daily-voice-generation-empty",
|
|
2174
|
+
children: "No captured projection for the selected run."
|
|
2175
|
+
});
|
|
2176
|
+
}
|
|
2177
|
+
const gate = news?.generation.gate.status ?? null;
|
|
2178
|
+
const launch = news?.generation.launch ?? null;
|
|
2179
|
+
return /* @__PURE__ */ jsxs2(Fragment, {
|
|
1505
2180
|
children: [
|
|
1506
2181
|
/* @__PURE__ */ jsxs2("div", {
|
|
1507
2182
|
className: "kk-stat-grid",
|
|
2183
|
+
"data-testid": "daily-voice-generation-facts",
|
|
1508
2184
|
children: [
|
|
1509
2185
|
/* @__PURE__ */ jsxs2("div", {
|
|
1510
2186
|
className: "kk-stat-card",
|
|
1511
2187
|
children: [
|
|
1512
2188
|
/* @__PURE__ */ jsx2("span", {
|
|
1513
2189
|
className: "kk-stat-label",
|
|
1514
|
-
children: "
|
|
2190
|
+
children: "Generation outcome"
|
|
1515
2191
|
}),
|
|
1516
2192
|
/* @__PURE__ */ jsx2("span", {
|
|
1517
2193
|
className: "kk-stat-value",
|
|
1518
|
-
children:
|
|
2194
|
+
children: news?.generation.outcome ?? "—"
|
|
1519
2195
|
}),
|
|
1520
2196
|
/* @__PURE__ */ jsx2("span", {
|
|
1521
2197
|
className: "kk-stat-sub",
|
|
1522
|
-
children:
|
|
2198
|
+
children: "from the recorded result files"
|
|
1523
2199
|
})
|
|
1524
2200
|
]
|
|
1525
2201
|
}),
|
|
@@ -1528,19 +2204,15 @@ function SummaryPanel({
|
|
|
1528
2204
|
children: [
|
|
1529
2205
|
/* @__PURE__ */ jsx2("span", {
|
|
1530
2206
|
className: "kk-stat-label",
|
|
1531
|
-
children: "
|
|
2207
|
+
children: "Pool gate"
|
|
1532
2208
|
}),
|
|
1533
|
-
/* @__PURE__ */
|
|
2209
|
+
/* @__PURE__ */ jsx2("span", {
|
|
1534
2210
|
className: "kk-stat-value",
|
|
1535
|
-
children:
|
|
1536
|
-
liveChannels,
|
|
1537
|
-
" / ",
|
|
1538
|
-
summary.channels.length
|
|
1539
|
-
]
|
|
2211
|
+
children: gate ?? "—"
|
|
1540
2212
|
}),
|
|
1541
2213
|
/* @__PURE__ */ jsx2("span", {
|
|
1542
2214
|
className: "kk-stat-sub",
|
|
1543
|
-
children: "
|
|
2215
|
+
children: "pool-gate verdict"
|
|
1544
2216
|
})
|
|
1545
2217
|
]
|
|
1546
2218
|
}),
|
|
@@ -1549,68 +2221,281 @@ function SummaryPanel({
|
|
|
1549
2221
|
children: [
|
|
1550
2222
|
/* @__PURE__ */ jsx2("span", {
|
|
1551
2223
|
className: "kk-stat-label",
|
|
1552
|
-
children: "
|
|
2224
|
+
children: "Launch receipt"
|
|
1553
2225
|
}),
|
|
1554
2226
|
/* @__PURE__ */ jsx2("span", {
|
|
1555
2227
|
className: "kk-stat-value",
|
|
1556
|
-
children:
|
|
2228
|
+
children: launch?.status ?? "—"
|
|
1557
2229
|
}),
|
|
1558
2230
|
/* @__PURE__ */ jsx2("span", {
|
|
1559
2231
|
className: "kk-stat-sub",
|
|
1560
|
-
children:
|
|
2232
|
+
children: launch === null ? "not recorded" : launch.stale ? `stale — receipt run ${launch.runId ?? "unknown"} is not this attempt` : `run ${launch.runId ?? "unknown"}`
|
|
1561
2233
|
})
|
|
1562
2234
|
]
|
|
2235
|
+
})
|
|
2236
|
+
]
|
|
2237
|
+
}),
|
|
2238
|
+
stages.length === 0 ? /* @__PURE__ */ jsx2("p", {
|
|
2239
|
+
children: "No producer stages were recorded for this attempt."
|
|
2240
|
+
}) : /* @__PURE__ */ jsx2("ul", {
|
|
2241
|
+
className: "kk-board-progress",
|
|
2242
|
+
"data-testid": "daily-voice-generation-stages",
|
|
2243
|
+
children: stages.map((stage) => /* @__PURE__ */ jsx2(StageRow, {
|
|
2244
|
+
stage
|
|
2245
|
+
}, stage.id))
|
|
2246
|
+
}),
|
|
2247
|
+
groups.length === 0 ? /* @__PURE__ */ jsx2("p", {
|
|
2248
|
+
children: "No fixed artifacts were recorded for this attempt."
|
|
2249
|
+
}) : groups.map((group) => /* @__PURE__ */ jsxs2("details", {
|
|
2250
|
+
className: "kk-card",
|
|
2251
|
+
"data-testid": "daily-voice-artifact-group",
|
|
2252
|
+
children: [
|
|
2253
|
+
/* @__PURE__ */ jsxs2("summary", {
|
|
2254
|
+
children: [
|
|
2255
|
+
group.label,
|
|
2256
|
+
" ",
|
|
2257
|
+
/* @__PURE__ */ jsxs2("span", {
|
|
2258
|
+
className: "kk-stat-sub",
|
|
2259
|
+
children: [
|
|
2260
|
+
group.artifacts.filter((a) => a.href !== null).length,
|
|
2261
|
+
" available of",
|
|
2262
|
+
" ",
|
|
2263
|
+
group.artifacts.length
|
|
2264
|
+
]
|
|
2265
|
+
})
|
|
2266
|
+
]
|
|
2267
|
+
}),
|
|
2268
|
+
/* @__PURE__ */ jsx2("ul", {
|
|
2269
|
+
className: "kk-board-artifacts",
|
|
2270
|
+
children: group.artifacts.map((artifact) => /* @__PURE__ */ jsx2(ArtifactRow, {
|
|
2271
|
+
artifact
|
|
2272
|
+
}, artifact.id))
|
|
2273
|
+
})
|
|
2274
|
+
]
|
|
2275
|
+
}, group.producer || "unattributed"))
|
|
2276
|
+
]
|
|
2277
|
+
});
|
|
2278
|
+
}
|
|
2279
|
+
function countWord(value) {
|
|
2280
|
+
return value === null ? "not recorded" : `${value}`;
|
|
2281
|
+
}
|
|
2282
|
+
function countSumWord(left, right) {
|
|
2283
|
+
return left === null || right === null ? "not recorded" : `${left + right}`;
|
|
2284
|
+
}
|
|
2285
|
+
function ProvenanceRow({ label, matched }) {
|
|
2286
|
+
const word = matched === null ? "unknown" : matched ? "matched" : "MISMATCHED";
|
|
2287
|
+
const tone = matched === null ? "neutral" : matched ? "success" : "error";
|
|
2288
|
+
return /* @__PURE__ */ jsxs2("li", {
|
|
2289
|
+
children: [
|
|
2290
|
+
label,
|
|
2291
|
+
" ",
|
|
2292
|
+
/* @__PURE__ */ jsx2(Badge, {
|
|
2293
|
+
variant: TONE_BADGE[tone],
|
|
2294
|
+
size: "sm",
|
|
2295
|
+
children: word
|
|
2296
|
+
})
|
|
2297
|
+
]
|
|
2298
|
+
});
|
|
2299
|
+
}
|
|
2300
|
+
function TargetRow({ target }) {
|
|
2301
|
+
return /* @__PURE__ */ jsxs2("li", {
|
|
2302
|
+
"data-testid": "daily-voice-publish-target",
|
|
2303
|
+
children: [
|
|
2304
|
+
/* @__PURE__ */ jsx2("strong", {
|
|
2305
|
+
children: target.id
|
|
2306
|
+
}),
|
|
2307
|
+
" ",
|
|
2308
|
+
/* @__PURE__ */ jsx2(Badge, {
|
|
2309
|
+
variant: TONE_BADGE[target.tone],
|
|
2310
|
+
size: "sm",
|
|
2311
|
+
children: target.word
|
|
2312
|
+
}),
|
|
2313
|
+
target.target === null ? null : /* @__PURE__ */ jsxs2("span", {
|
|
2314
|
+
children: [
|
|
2315
|
+
" · ",
|
|
2316
|
+
target.target
|
|
2317
|
+
]
|
|
2318
|
+
}),
|
|
2319
|
+
target.mode === null ? null : /* @__PURE__ */ jsxs2("span", {
|
|
2320
|
+
children: [
|
|
2321
|
+
" (",
|
|
2322
|
+
target.mode,
|
|
2323
|
+
")"
|
|
2324
|
+
]
|
|
2325
|
+
}),
|
|
2326
|
+
target.url === null ? null : /* @__PURE__ */ jsxs2(Fragment, {
|
|
2327
|
+
children: [
|
|
2328
|
+
" ",
|
|
2329
|
+
/* @__PURE__ */ jsx2("a", {
|
|
2330
|
+
href: target.url,
|
|
2331
|
+
rel: "noreferrer",
|
|
2332
|
+
children: "open"
|
|
2333
|
+
})
|
|
2334
|
+
]
|
|
2335
|
+
}),
|
|
2336
|
+
target.error === null ? null : /* @__PURE__ */ jsxs2("span", {
|
|
2337
|
+
className: "kk-board-state",
|
|
2338
|
+
children: [
|
|
2339
|
+
" — ",
|
|
2340
|
+
target.error
|
|
2341
|
+
]
|
|
2342
|
+
}),
|
|
2343
|
+
target.finishedAt === null ? null : /* @__PURE__ */ jsxs2("span", {
|
|
2344
|
+
className: "kk-board-state",
|
|
2345
|
+
children: [
|
|
2346
|
+
" finished ",
|
|
2347
|
+
formatTimestamp(target.finishedAt)
|
|
2348
|
+
]
|
|
2349
|
+
}),
|
|
2350
|
+
/* @__PURE__ */ jsxs2("span", {
|
|
2351
|
+
className: "kk-board-state",
|
|
2352
|
+
children: [
|
|
2353
|
+
" ",
|
|
2354
|
+
"evidence ",
|
|
2355
|
+
/* @__PURE__ */ jsx2("code", {
|
|
2356
|
+
children: target.evidence.plan
|
|
1563
2357
|
}),
|
|
2358
|
+
target.evidence.receipt === null ? " · receipt not recorded" : /* @__PURE__ */ jsxs2("code", {
|
|
2359
|
+
children: [
|
|
2360
|
+
" · ",
|
|
2361
|
+
target.evidence.receipt
|
|
2362
|
+
]
|
|
2363
|
+
})
|
|
2364
|
+
]
|
|
2365
|
+
})
|
|
2366
|
+
]
|
|
2367
|
+
}, target.id);
|
|
2368
|
+
}
|
|
2369
|
+
function NewsPublishingPanel({ news }) {
|
|
2370
|
+
if (news === null) {
|
|
2371
|
+
return /* @__PURE__ */ jsx2(EmptyState, {
|
|
2372
|
+
testId: "daily-voice-publishing-empty",
|
|
2373
|
+
children: "No captured publishing projection for the selected run."
|
|
2374
|
+
});
|
|
2375
|
+
}
|
|
2376
|
+
const bundle = news.publishing.bundle;
|
|
2377
|
+
const rows = publishingWindowRows(news);
|
|
2378
|
+
return /* @__PURE__ */ jsxs2(Fragment, {
|
|
2379
|
+
children: [
|
|
2380
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
2381
|
+
className: "kk-stat-grid",
|
|
2382
|
+
"data-testid": "daily-voice-bundle",
|
|
2383
|
+
children: [
|
|
1564
2384
|
/* @__PURE__ */ jsxs2("div", {
|
|
1565
2385
|
className: "kk-stat-card",
|
|
1566
2386
|
children: [
|
|
1567
2387
|
/* @__PURE__ */ jsx2("span", {
|
|
1568
2388
|
className: "kk-stat-label",
|
|
1569
|
-
children: "
|
|
2389
|
+
children: "Bundle"
|
|
1570
2390
|
}),
|
|
1571
2391
|
/* @__PURE__ */ jsx2("span", {
|
|
1572
2392
|
className: "kk-stat-value",
|
|
1573
|
-
children:
|
|
2393
|
+
children: bundle?.title ?? "—"
|
|
2394
|
+
}),
|
|
2395
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2396
|
+
className: "kk-stat-sub",
|
|
2397
|
+
children: bundle === null ? "not recorded" : bundle.identity
|
|
2398
|
+
})
|
|
2399
|
+
]
|
|
2400
|
+
}),
|
|
2401
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
2402
|
+
className: "kk-stat-card",
|
|
2403
|
+
children: [
|
|
2404
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2405
|
+
className: "kk-stat-label",
|
|
2406
|
+
children: "Run date"
|
|
2407
|
+
}),
|
|
2408
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2409
|
+
className: "kk-stat-value",
|
|
2410
|
+
children: bundle?.runDate ?? "—"
|
|
2411
|
+
}),
|
|
2412
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2413
|
+
className: "kk-stat-sub",
|
|
2414
|
+
children: bundle?.variants.length ? `variants ${bundle.variants.join(", ")}` : "variants unrecorded"
|
|
2415
|
+
})
|
|
2416
|
+
]
|
|
2417
|
+
}),
|
|
2418
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
2419
|
+
className: "kk-stat-card",
|
|
2420
|
+
children: [
|
|
2421
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2422
|
+
className: "kk-stat-label",
|
|
2423
|
+
children: "Targets"
|
|
2424
|
+
}),
|
|
2425
|
+
/* @__PURE__ */ jsxs2("span", {
|
|
2426
|
+
className: "kk-stat-value",
|
|
2427
|
+
children: [
|
|
2428
|
+
countWord(news.counts.targetsSucceeded),
|
|
2429
|
+
" sent"
|
|
2430
|
+
]
|
|
1574
2431
|
}),
|
|
1575
2432
|
/* @__PURE__ */ jsxs2("span", {
|
|
1576
2433
|
className: "kk-stat-sub",
|
|
1577
2434
|
children: [
|
|
1578
|
-
|
|
1579
|
-
|
|
2435
|
+
countSumWord(news.counts.targetsFailed, news.counts.targetsUncertain),
|
|
2436
|
+
" failed or uncertain ·",
|
|
2437
|
+
" ",
|
|
2438
|
+
countWord(news.counts.targetsPlanned),
|
|
2439
|
+
" planned"
|
|
1580
2440
|
]
|
|
1581
2441
|
})
|
|
1582
2442
|
]
|
|
1583
2443
|
})
|
|
1584
2444
|
]
|
|
1585
2445
|
}),
|
|
1586
|
-
/* @__PURE__ */
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
/* @__PURE__ */ jsxs2("dd", {
|
|
1594
|
-
children: [
|
|
1595
|
-
fact.value,
|
|
1596
|
-
" ",
|
|
1597
|
-
/* @__PURE__ */ jsx2("span", {
|
|
1598
|
-
className: "kk-board-state",
|
|
1599
|
-
children: fact.availability
|
|
1600
|
-
})
|
|
1601
|
-
]
|
|
1602
|
-
})
|
|
1603
|
-
]
|
|
1604
|
-
}, fact.label))
|
|
2446
|
+
bundle?.parentRunId == null ? null : /* @__PURE__ */ jsxs2("p", {
|
|
2447
|
+
children: [
|
|
2448
|
+
"Parent run ",
|
|
2449
|
+
/* @__PURE__ */ jsx2("code", {
|
|
2450
|
+
children: bundle.parentRunId
|
|
2451
|
+
})
|
|
2452
|
+
]
|
|
1605
2453
|
}),
|
|
1606
|
-
/* @__PURE__ */
|
|
1607
|
-
|
|
1608
|
-
|
|
2454
|
+
bundle?.safety == null ? null : /* @__PURE__ */ jsxs2("p", {
|
|
2455
|
+
children: [
|
|
2456
|
+
"Safety: ",
|
|
2457
|
+
bundle.safety
|
|
2458
|
+
]
|
|
1609
2459
|
}),
|
|
1610
|
-
/* @__PURE__ */ jsx2(
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
2460
|
+
rows.length === 0 ? /* @__PURE__ */ jsx2(EmptyState, {
|
|
2461
|
+
children: "No publishable window was recorded for this attempt."
|
|
2462
|
+
}) : rows.map((row) => /* @__PURE__ */ jsxs2("section", {
|
|
2463
|
+
className: "kk-card",
|
|
2464
|
+
"data-testid": "daily-voice-publish-window",
|
|
2465
|
+
children: [
|
|
2466
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
2467
|
+
className: "kk-card-header",
|
|
2468
|
+
children: [
|
|
2469
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
2470
|
+
children: row.label
|
|
2471
|
+
}),
|
|
2472
|
+
/* @__PURE__ */ jsx2(Badge, {
|
|
2473
|
+
variant: row.recorded === null ? "neutral" : TONE_BADGE[row.recorded.tone],
|
|
2474
|
+
size: "sm",
|
|
2475
|
+
children: row.recorded === null ? "outcome not recorded" : row.recorded.word
|
|
2476
|
+
})
|
|
2477
|
+
]
|
|
2478
|
+
}),
|
|
2479
|
+
/* @__PURE__ */ jsx2("ul", {
|
|
2480
|
+
className: "kk-board-edges",
|
|
2481
|
+
children: row.provenance.map((check) => /* @__PURE__ */ jsx2(ProvenanceRow, {
|
|
2482
|
+
label: check.label,
|
|
2483
|
+
matched: check.matched
|
|
2484
|
+
}, check.label))
|
|
2485
|
+
}),
|
|
2486
|
+
row.targets.length === 0 ? /* @__PURE__ */ jsx2("p", {
|
|
2487
|
+
children: "No target plan was recorded for this window."
|
|
2488
|
+
}) : /* @__PURE__ */ jsx2("ul", {
|
|
2489
|
+
className: "kk-board-channels",
|
|
2490
|
+
children: row.targets.map((target) => /* @__PURE__ */ jsx2(TargetRow, {
|
|
2491
|
+
target
|
|
2492
|
+
}, target.id))
|
|
2493
|
+
})
|
|
2494
|
+
]
|
|
2495
|
+
}, row.window)),
|
|
2496
|
+
/* @__PURE__ */ jsx2("p", {
|
|
2497
|
+
className: "kk-board-footnote",
|
|
2498
|
+
children: "Evidence paths are workspace-relative references recorded by the run — shown as text, never turned into links."
|
|
1614
2499
|
})
|
|
1615
2500
|
]
|
|
1616
2501
|
});
|
|
@@ -1884,14 +2769,199 @@ function SupplyPanel({
|
|
|
1884
2769
|
}) : null,
|
|
1885
2770
|
/* @__PURE__ */ jsx2("p", {
|
|
1886
2771
|
className: "kk-board-footnote",
|
|
1887
|
-
children: "A source absent from this window recorded 0 contributions; its health is unknown. The
|
|
2772
|
+
children: "A source absent from this window recorded 0 contributions; its health is unknown. The artifact-backed evidence stays the consumption record — supply here is context, not consumption."
|
|
1888
2773
|
})
|
|
1889
2774
|
]
|
|
1890
2775
|
});
|
|
1891
2776
|
}
|
|
1892
|
-
function
|
|
2777
|
+
function LegacySummaryPanel({
|
|
2778
|
+
facts,
|
|
2779
|
+
results,
|
|
2780
|
+
config,
|
|
2781
|
+
funnel,
|
|
2782
|
+
artifacts,
|
|
2783
|
+
context,
|
|
2784
|
+
supply,
|
|
2785
|
+
storeOffline
|
|
2786
|
+
}) {
|
|
2787
|
+
if (results === null)
|
|
2788
|
+
return /* @__PURE__ */ jsx2(EmptyState, {
|
|
2789
|
+
children: "No captured results for the selected run."
|
|
2790
|
+
});
|
|
2791
|
+
const summary = dailySummary(results);
|
|
2792
|
+
const settings = config === null ? [] : Object.entries(config.settings);
|
|
2793
|
+
const liveChannels = summary.channels.filter((c) => c.state === "live").length;
|
|
2794
|
+
return /* @__PURE__ */ jsxs2(Fragment, {
|
|
2795
|
+
children: [
|
|
2796
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
2797
|
+
className: "kk-stat-grid",
|
|
2798
|
+
children: [
|
|
2799
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
2800
|
+
className: "kk-stat-card",
|
|
2801
|
+
children: [
|
|
2802
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2803
|
+
className: "kk-stat-label",
|
|
2804
|
+
children: "Episode Outcome"
|
|
2805
|
+
}),
|
|
2806
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2807
|
+
className: "kk-stat-value",
|
|
2808
|
+
children: summary.outcome ?? "—"
|
|
2809
|
+
}),
|
|
2810
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2811
|
+
className: "kk-stat-sub",
|
|
2812
|
+
children: summary.articleTitle ? summary.articleTitle.slice(0, 32) : "Daily podcast"
|
|
2813
|
+
})
|
|
2814
|
+
]
|
|
2815
|
+
}),
|
|
2816
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
2817
|
+
className: "kk-stat-card",
|
|
2818
|
+
children: [
|
|
2819
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2820
|
+
className: "kk-stat-label",
|
|
2821
|
+
children: "Distribution"
|
|
2822
|
+
}),
|
|
2823
|
+
/* @__PURE__ */ jsxs2("span", {
|
|
2824
|
+
className: "kk-stat-value",
|
|
2825
|
+
children: [
|
|
2826
|
+
liveChannels,
|
|
2827
|
+
" / ",
|
|
2828
|
+
summary.channels.length
|
|
2829
|
+
]
|
|
2830
|
+
}),
|
|
2831
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2832
|
+
className: "kk-stat-sub",
|
|
2833
|
+
children: "Channels published live"
|
|
2834
|
+
})
|
|
2835
|
+
]
|
|
2836
|
+
}),
|
|
2837
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
2838
|
+
className: "kk-stat-card",
|
|
2839
|
+
children: [
|
|
2840
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2841
|
+
className: "kk-stat-label",
|
|
2842
|
+
children: "Quality Score"
|
|
2843
|
+
}),
|
|
2844
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2845
|
+
className: "kk-stat-value",
|
|
2846
|
+
children: summary.quality?.overallScore ?? "—"
|
|
2847
|
+
}),
|
|
2848
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2849
|
+
className: "kk-stat-sub",
|
|
2850
|
+
children: summary.quality?.passed ? "Passed QC standard" : "Under evaluation"
|
|
2851
|
+
})
|
|
2852
|
+
]
|
|
2853
|
+
}),
|
|
2854
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
2855
|
+
className: "kk-stat-card",
|
|
2856
|
+
children: [
|
|
2857
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2858
|
+
className: "kk-stat-label",
|
|
2859
|
+
children: "Safety Verdict"
|
|
2860
|
+
}),
|
|
2861
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2862
|
+
className: "kk-stat-value",
|
|
2863
|
+
children: summary.safety?.verdict ?? "—"
|
|
2864
|
+
}),
|
|
2865
|
+
/* @__PURE__ */ jsxs2("span", {
|
|
2866
|
+
className: "kk-stat-sub",
|
|
2867
|
+
children: [
|
|
2868
|
+
"Confidence: ",
|
|
2869
|
+
summary.safety?.confidence ?? "—"
|
|
2870
|
+
]
|
|
2871
|
+
})
|
|
2872
|
+
]
|
|
2873
|
+
})
|
|
2874
|
+
]
|
|
2875
|
+
}),
|
|
2876
|
+
/* @__PURE__ */ jsx2("dl", {
|
|
2877
|
+
className: "kk-board-facts",
|
|
2878
|
+
children: facts.map((fact) => /* @__PURE__ */ jsxs2("div", {
|
|
2879
|
+
children: [
|
|
2880
|
+
/* @__PURE__ */ jsx2("dt", {
|
|
2881
|
+
children: fact.label
|
|
2882
|
+
}),
|
|
2883
|
+
/* @__PURE__ */ jsxs2("dd", {
|
|
2884
|
+
children: [
|
|
2885
|
+
fact.value,
|
|
2886
|
+
" ",
|
|
2887
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2888
|
+
className: "kk-board-state",
|
|
2889
|
+
children: fact.availability
|
|
2890
|
+
})
|
|
2891
|
+
]
|
|
2892
|
+
})
|
|
2893
|
+
]
|
|
2894
|
+
}, fact.label))
|
|
2895
|
+
}),
|
|
2896
|
+
config === null ? null : /* @__PURE__ */ jsxs2("details", {
|
|
2897
|
+
className: "kk-card",
|
|
2898
|
+
"data-testid": "daily-voice-captured-config",
|
|
2899
|
+
children: [
|
|
2900
|
+
/* @__PURE__ */ jsxs2("summary", {
|
|
2901
|
+
children: [
|
|
2902
|
+
"Captured configuration",
|
|
2903
|
+
" ",
|
|
2904
|
+
/* @__PURE__ */ jsx2("span", {
|
|
2905
|
+
className: "kk-stat-sub",
|
|
2906
|
+
children: config.capturedAt === null ? "capture time not recorded" : `captured ${formatTimestamp(config.capturedAt)}`
|
|
2907
|
+
})
|
|
2908
|
+
]
|
|
2909
|
+
}),
|
|
2910
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
2911
|
+
className: "kk-board-config",
|
|
2912
|
+
children: [
|
|
2913
|
+
/* @__PURE__ */ jsx2("p", {
|
|
2914
|
+
children: config.capturedAt === null ? "This run predates capture: its settings are unknown, never today’s defaults." : `Captured ${formatTimestamp(config.capturedAt)}`
|
|
2915
|
+
}),
|
|
2916
|
+
settings.length === 0 ? /* @__PURE__ */ jsx2("p", {
|
|
2917
|
+
children: "No settings were recorded for this run."
|
|
2918
|
+
}) : /* @__PURE__ */ jsx2("dl", {
|
|
2919
|
+
children: settings.map(([key, value]) => /* @__PURE__ */ jsxs2("div", {
|
|
2920
|
+
children: [
|
|
2921
|
+
/* @__PURE__ */ jsx2("dt", {
|
|
2922
|
+
children: key
|
|
2923
|
+
}),
|
|
2924
|
+
/* @__PURE__ */ jsx2("dd", {
|
|
2925
|
+
children: value
|
|
2926
|
+
})
|
|
2927
|
+
]
|
|
2928
|
+
}, key))
|
|
2929
|
+
}),
|
|
2930
|
+
config.unavailableKeys.length === 0 ? null : /* @__PURE__ */ jsxs2("p", {
|
|
2931
|
+
children: [
|
|
2932
|
+
"Not captured: ",
|
|
2933
|
+
/* @__PURE__ */ jsx2("code", {
|
|
2934
|
+
children: config.unavailableKeys.join(", ")
|
|
2935
|
+
})
|
|
2936
|
+
]
|
|
2937
|
+
}),
|
|
2938
|
+
config.definitionDigest === undefined ? null : /* @__PURE__ */ jsxs2("p", {
|
|
2939
|
+
children: [
|
|
2940
|
+
"Definition digest ",
|
|
2941
|
+
/* @__PURE__ */ jsx2("code", {
|
|
2942
|
+
children: config.definitionDigest
|
|
2943
|
+
})
|
|
2944
|
+
]
|
|
2945
|
+
})
|
|
2946
|
+
]
|
|
2947
|
+
})
|
|
2948
|
+
]
|
|
2949
|
+
}),
|
|
2950
|
+
/* @__PURE__ */ jsx2(FunnelPanel, {
|
|
2951
|
+
funnel,
|
|
2952
|
+
artifacts
|
|
2953
|
+
}),
|
|
2954
|
+
/* @__PURE__ */ jsx2(SupplyPanel, {
|
|
2955
|
+
context,
|
|
2956
|
+
supply,
|
|
2957
|
+
storeOffline
|
|
2958
|
+
})
|
|
2959
|
+
]
|
|
2960
|
+
});
|
|
2961
|
+
}
|
|
2962
|
+
function LegacyChannelList({ channels }) {
|
|
1893
2963
|
if (channels.length === 0)
|
|
1894
|
-
return /* @__PURE__ */ jsx2(
|
|
2964
|
+
return /* @__PURE__ */ jsx2(EmptyState, {
|
|
1895
2965
|
children: "No channel outcomes recorded for the selected run."
|
|
1896
2966
|
});
|
|
1897
2967
|
return /* @__PURE__ */ jsx2("ul", {
|
|
@@ -1925,12 +2995,9 @@ function ChannelList({ channels }) {
|
|
|
1925
2995
|
}, channel.channel))
|
|
1926
2996
|
});
|
|
1927
2997
|
}
|
|
1928
|
-
function
|
|
1929
|
-
artifacts,
|
|
1930
|
-
channels
|
|
1931
|
-
}) {
|
|
2998
|
+
function LegacyResultsPanel({ artifacts, channels }) {
|
|
1932
2999
|
if (artifacts.length === 0)
|
|
1933
|
-
return /* @__PURE__ */ jsx2(
|
|
3000
|
+
return /* @__PURE__ */ jsx2(EmptyState, {
|
|
1934
3001
|
children: "No artifact evidence for the selected run."
|
|
1935
3002
|
});
|
|
1936
3003
|
const media = artifacts.filter((artifact) => artifact.kind === "image" || artifact.kind === "audio");
|
|
@@ -1996,15 +3063,15 @@ function ResultsPanel({
|
|
|
1996
3063
|
})
|
|
1997
3064
|
}, artifact.id))
|
|
1998
3065
|
}),
|
|
1999
|
-
/* @__PURE__ */ jsx2(
|
|
3066
|
+
/* @__PURE__ */ jsx2(LegacyChannelList, {
|
|
2000
3067
|
channels
|
|
2001
3068
|
})
|
|
2002
3069
|
]
|
|
2003
3070
|
});
|
|
2004
3071
|
}
|
|
2005
|
-
function
|
|
3072
|
+
function LegacyProgressPanel({ progress }) {
|
|
2006
3073
|
if (progress === null || progress.nodes.length === 0) {
|
|
2007
|
-
return /* @__PURE__ */ jsx2(
|
|
3074
|
+
return /* @__PURE__ */ jsx2(EmptyState, {
|
|
2008
3075
|
children: "Recorded progress is unavailable for the selected run."
|
|
2009
3076
|
});
|
|
2010
3077
|
}
|
|
@@ -2046,7 +3113,7 @@ function ProgressPanel({ progress }) {
|
|
|
2046
3113
|
"Dependency edges are unknown — no digest-verified topology was captured. See",
|
|
2047
3114
|
" ",
|
|
2048
3115
|
/* @__PURE__ */ jsx2("a", {
|
|
2049
|
-
href: "/board/settings/workflows",
|
|
3116
|
+
href: withBase("/board/settings/workflows"),
|
|
2050
3117
|
children: "Settings → Workflows"
|
|
2051
3118
|
}),
|
|
2052
3119
|
" for the current graph."
|
|
@@ -2063,55 +3130,6 @@ function ProgressPanel({ progress }) {
|
|
|
2063
3130
|
]
|
|
2064
3131
|
});
|
|
2065
3132
|
}
|
|
2066
|
-
function ConfigPanel({ config }) {
|
|
2067
|
-
if (config === null)
|
|
2068
|
-
return /* @__PURE__ */ jsx2("p", {
|
|
2069
|
-
children: "No captured configuration for the selected run."
|
|
2070
|
-
});
|
|
2071
|
-
const entries = Object.entries(config.settings);
|
|
2072
|
-
return /* @__PURE__ */ jsxs2("div", {
|
|
2073
|
-
className: "kk-board-config",
|
|
2074
|
-
children: [
|
|
2075
|
-
/* @__PURE__ */ jsxs2("p", {
|
|
2076
|
-
children: [
|
|
2077
|
-
"Captured ",
|
|
2078
|
-
formatTimestamp(config.capturedAt)
|
|
2079
|
-
]
|
|
2080
|
-
}),
|
|
2081
|
-
entries.length === 0 ? /* @__PURE__ */ jsx2("p", {
|
|
2082
|
-
children: "Recorded configuration unavailable for this run."
|
|
2083
|
-
}) : null,
|
|
2084
|
-
/* @__PURE__ */ jsx2("dl", {
|
|
2085
|
-
children: entries.map(([key, value]) => /* @__PURE__ */ jsxs2("div", {
|
|
2086
|
-
children: [
|
|
2087
|
-
/* @__PURE__ */ jsx2("dt", {
|
|
2088
|
-
children: key
|
|
2089
|
-
}),
|
|
2090
|
-
/* @__PURE__ */ jsx2("dd", {
|
|
2091
|
-
children: value
|
|
2092
|
-
})
|
|
2093
|
-
]
|
|
2094
|
-
}, key))
|
|
2095
|
-
}),
|
|
2096
|
-
config.unavailableKeys.length === 0 ? null : /* @__PURE__ */ jsxs2("p", {
|
|
2097
|
-
children: [
|
|
2098
|
-
"Uncaptured keys: ",
|
|
2099
|
-
config.unavailableKeys.join(", ")
|
|
2100
|
-
]
|
|
2101
|
-
}),
|
|
2102
|
-
/* @__PURE__ */ jsxs2("p", {
|
|
2103
|
-
children: [
|
|
2104
|
-
"Current definitions and defaults live in ",
|
|
2105
|
-
/* @__PURE__ */ jsx2("a", {
|
|
2106
|
-
href: "/board/settings/workflows",
|
|
2107
|
-
children: "Settings → Workflows"
|
|
2108
|
-
}),
|
|
2109
|
-
"."
|
|
2110
|
-
]
|
|
2111
|
-
})
|
|
2112
|
-
]
|
|
2113
|
-
});
|
|
2114
|
-
}
|
|
2115
3133
|
var webModule = { apiVersion: 1, component: DailyVoiceModule };
|
|
2116
3134
|
export {
|
|
2117
3135
|
DailyVoiceModule,
|