@gobing-ai/knowledge-kit 0.1.29 → 0.1.30
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/api.js +8724 -3861
- package/dist/board/collect/index.js +69 -1
- package/dist/board/daily-voice/index.js +474 -265
- package/dist/board/itc/index.js +69 -1
- package/dist/board/wiki/index.css +1305 -0
- package/dist/board/wiki/index.js +1621 -0
- package/dist/index.js +34689 -28532
- package/package.json +1 -1
- package/plugins/generations/content-gen/dist/index.js +14 -1
- package/plugins/generations/core-facts-gen/dist/index.js +14 -1
- package/plugins/generations/daily-article-gen/dist/index.js +14 -1
- package/plugins/generations/dailynews-gen/dist/index.js +14 -1
- package/plugins/generations/episode-plan-gen/dist/index.js +32 -2
- package/plugins/generations/episode-plan-gen/src/index.ts +19 -1
- package/plugins/generations/gemini-tts/dist/index.js +14 -1
- package/plugins/generations/image-gen/dist/index.js +14 -1
- package/plugins/generations/music-gen/dist/index.js +15 -2
- package/plugins/generations/news-report-gen/dist/index.js +14 -1
- package/plugins/generations/vibe-voice-tts/dist/index.js +14 -1
- package/plugins/generations/video-gen/README.md +245 -8
- package/plugins/generations/video-gen/dist/index.js +22447 -4763
- package/plugins/generations/video-gen/package.json +1 -0
- package/plugins/generations/video-gen/presets/formats/avatar.yaml +5 -0
- package/plugins/generations/video-gen/presets/formats/editorial.yaml +6 -0
- package/plugins/generations/video-gen/presets/formats/hybrid-pip.yaml +5 -0
- package/plugins/generations/video-gen/presets/styles/daily-ai.yaml +5 -0
- package/plugins/generations/video-gen/presets/styles/neutral.yaml +3 -0
- package/plugins/generations/video-gen/python/colab_comfyui_h3.py +322 -0
- package/plugins/generations/video-gen/python/comfyui-h3-i2v-api.json +47 -0
- package/plugins/generations/video-gen/python/comfyui-h3-models.json +32 -0
- package/plugins/generations/video-gen/python/comfyui_model_cache.py +388 -0
- package/plugins/generations/video-gen/python/drive_client.py +187 -0
- package/plugins/generations/video-gen/src/brief-cli.ts +65 -0
- package/plugins/generations/video-gen/src/brief.ts +464 -0
- package/plugins/generations/video-gen/src/ccu-ledger.ts +206 -3
- package/plugins/generations/video-gen/src/colab-runner.ts +346 -35
- package/plugins/generations/video-gen/src/index.ts +141 -109
- package/plugins/generations/video-gen/src/inputs.ts +162 -4
- package/plugins/generations/video-gen/src/layout.ts +33 -0
- package/plugins/generations/video-gen/src/props.ts +27 -3
- package/plugins/generations/video-gen/src/remotion/AvatarReel.tsx +17 -1
- package/plugins/generations/video-gen/src/remotion/EditorialReel.tsx +17 -1
- package/plugins/generations/video-gen/src/remotion/Root.tsx +2 -0
- package/plugins/generations/video-gen/src/remotion/engine.ts +3 -7
- package/plugins/generations/video-gen/src/render.ts +25 -0
- package/plugins/generations/video-gen/src/request.ts +150 -20
- package/plugins/generations/video-gen/src/visual-provider.ts +116 -3
- package/plugins/generations/voice-gen/dist/index.js +14 -1
- package/plugins/generations/voxcpm-tts/dist/index.js +14 -1
- package/plugins/ingestions/aihot-ingest/dist/index.js +14 -1
- package/plugins/ingestions/horizon-ingest/dist/index.js +14 -1
- package/plugins/ingestions/last30days-ingest/dist/index.js +14 -1
- package/plugins/ingestions/web-search/dist/index.js +14 -1
- package/plugins/kk/config.example.yaml +1 -1
- package/plugins/kk/mcp-tools.yaml +47 -0
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/publish-presets/itc-surfdash-locales.json +42 -0
- package/plugins/kk/scripts/daily-stages.ts +87 -6
- package/plugins/kk/scripts/kk-workflow-stages.ts +64 -9
- package/plugins/kk/scripts/video-stages.ts +332 -0
- package/plugins/kk/scripts/wiki-normalize-audio.ts +354 -0
- package/plugins/kk/scripts/wiki-normalize-document.ts +495 -0
- package/plugins/kk/scripts/wiki-normalize-stages.ts +96 -0
- package/plugins/kk/scripts/wiki-stage-runtime.ts +39 -0
- package/plugins/kk/skills/news-editorial/SKILL.md +2 -1
- package/plugins/kk/workflows/kk-collect.yaml +10 -0
- package/plugins/kk/workflows/kk-news-generate.yaml +70 -8
- package/plugins/kk/workflows/kk-smart-seo.yaml +8 -0
- package/plugins/kk/workflows/kk-storm-research.yaml +10 -0
- package/plugins/kk/workflows/kk-video-generate.yaml +169 -0
- package/plugins/kk/workflows/kk-wiki-digest.yaml +49 -0
- package/plugins/publishings/bilibili-pub/dist/index.js +281 -268
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +202 -0
- package/plugins/publishings/cnblogs-pub/dist/index.js +281 -268
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +202 -0
- package/plugins/publishings/csdn-pub/dist/index.js +281 -268
- package/plugins/publishings/csdn-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/emdash-pub/dist/index.js +33 -3
- package/plugins/publishings/infoq-pub/dist/index.js +281 -268
- package/plugins/publishings/infoq-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/jike-pub/dist/index.js +281 -268
- package/plugins/publishings/jike-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/juejin-pub/dist/index.js +281 -268
- package/plugins/publishings/juejin-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/linkedin-pub/dist/index.js +281 -268
- package/plugins/publishings/linkedin-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/medium-pub/dist/index.js +281 -268
- package/plugins/publishings/medium-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/podcast-pub/dist/index.js +39 -9
- package/plugins/publishings/qiita-pub/dist/index.js +33 -3
- package/plugins/publishings/shipinhao-pub/dist/index.js +281 -268
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +175 -0
- package/plugins/publishings/sspai-pub/dist/index.js +281 -268
- package/plugins/publishings/sspai-pub/dist/profile-check.js +202 -0
- package/plugins/publishings/substack-pub/dist/index.js +281 -268
- package/plugins/publishings/substack-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/surfdash-pub/dist/index.js +99 -39
- package/plugins/publishings/surfdash-pub/plugin.json +54 -0
- package/plugins/publishings/surfdash-pub/src/index.ts +36 -5
- package/plugins/publishings/threads-pub/dist/index.js +281 -268
- package/plugins/publishings/threads-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/wechatmp-pub/dist/index.js +665 -451
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +215 -3
- package/plugins/publishings/weibo-pub/dist/index.js +281 -268
- package/plugins/publishings/weibo-pub/dist/profile-check.js +189 -1
- package/plugins/publishings/x-pub/dist/index.js +281 -268
- package/plugins/publishings/x-pub/dist/profile-check.js +216 -1
- package/plugins/publishings/xhs-pub/dist/index.js +281 -268
- package/plugins/publishings/xhs-pub/dist/profile-check.js +119 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +281 -268
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +202 -0
- package/plugins/publishings/youtube-pub/dist/index.js +14 -1
- package/plugins/publishings/zenn-pub/dist/index.js +37 -7
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
Button,
|
|
5
5
|
Card,
|
|
6
6
|
CardBody,
|
|
7
|
-
Diagnostic,
|
|
7
|
+
Diagnostic as Diagnostic2,
|
|
8
8
|
EmptyState,
|
|
9
9
|
Loading,
|
|
10
10
|
ModuleHeader,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
ModuleTabs,
|
|
13
13
|
withBase
|
|
14
14
|
} from "@gobing-ai/spur/board/ui";
|
|
15
|
-
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
15
|
+
import { useCallback, useEffect as useEffect2, useMemo, useRef, useState as useState2 } from "react";
|
|
16
16
|
|
|
17
17
|
// ../board/src/shared/api.ts
|
|
18
18
|
var MAX_OVERVIEW_RUNS = 25;
|
|
@@ -71,6 +71,41 @@ function isHttpOrigin(origin) {
|
|
|
71
71
|
return false;
|
|
72
72
|
return url.pathname === "/" && url.search === "" && url.hash === "";
|
|
73
73
|
}
|
|
74
|
+
function parseExternalJobs(raw) {
|
|
75
|
+
if (typeof raw !== "object" || raw === null)
|
|
76
|
+
return null;
|
|
77
|
+
const items = raw.items;
|
|
78
|
+
if (!Array.isArray(items))
|
|
79
|
+
return null;
|
|
80
|
+
const states = new Set(["admitting", "pending", "running", "succeeded", "failed"]);
|
|
81
|
+
const rows = [];
|
|
82
|
+
for (const entry of items) {
|
|
83
|
+
if (typeof entry !== "object" || entry === null)
|
|
84
|
+
return null;
|
|
85
|
+
const row = entry;
|
|
86
|
+
if (typeof row.key !== "string" || typeof row.runId !== "string" || typeof row.workflow !== "string") {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
if (typeof row.state !== "string" || !states.has(row.state))
|
|
90
|
+
return null;
|
|
91
|
+
rows.push({
|
|
92
|
+
key: row.key,
|
|
93
|
+
node: typeof row.node === "string" ? row.node : "",
|
|
94
|
+
provider: typeof row.provider === "string" ? row.provider : null,
|
|
95
|
+
jobId: typeof row.jobId === "string" ? row.jobId : null,
|
|
96
|
+
state: row.state,
|
|
97
|
+
progress: typeof row.progress === "number" ? row.progress : null,
|
|
98
|
+
message: typeof row.message === "string" ? row.message : null,
|
|
99
|
+
submittedAt: typeof row.submittedAt === "string" ? row.submittedAt : "",
|
|
100
|
+
elapsedMs: typeof row.elapsedMs === "number" ? row.elapsedMs : 0,
|
|
101
|
+
...typeof row.admission === "object" && row.admission !== null ? { admission: row.admission } : {},
|
|
102
|
+
runId: row.runId,
|
|
103
|
+
workflow: row.workflow,
|
|
104
|
+
runStatus: typeof row.runStatus === "string" ? row.runStatus : ""
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return { items: rows };
|
|
108
|
+
}
|
|
74
109
|
function boardBasePath(pathname) {
|
|
75
110
|
const board = pathname.indexOf("/board/");
|
|
76
111
|
return board === -1 ? "" : pathname.slice(0, board);
|
|
@@ -125,7 +160,40 @@ function createBoardClient(options) {
|
|
|
125
160
|
});
|
|
126
161
|
return { status: response.status, body: await response.json() };
|
|
127
162
|
},
|
|
128
|
-
progress: (runId) => getJson(`${board}/api/runs/${encodeURIComponent(runId)}/progress`)
|
|
163
|
+
progress: (runId) => getJson(`${board}/api/runs/${encodeURIComponent(runId)}/progress`),
|
|
164
|
+
externalJobs: async (status = "active") => {
|
|
165
|
+
const params = new URLSearchParams({ status });
|
|
166
|
+
return parseExternalJobs(await getJson(`${board}/api/runs/external-jobs?${params.toString()}`));
|
|
167
|
+
},
|
|
168
|
+
wikiComputationRuns: (vaultId, pagePath, cursor) => {
|
|
169
|
+
const params = new URLSearchParams({ path: pagePath });
|
|
170
|
+
if (cursor !== undefined)
|
|
171
|
+
params.set("cursor", String(cursor));
|
|
172
|
+
return getJson(`${moduleApi}/api/wiki/vaults/${encodeURIComponent(vaultId)}/computations/runs?${params.toString()}`);
|
|
173
|
+
},
|
|
174
|
+
wikiComputationRunDetail: (vaultId, runId) => getJson(`${moduleApi}/api/wiki/vaults/${encodeURIComponent(vaultId)}/computation-runs/${encodeURIComponent(runId)}`),
|
|
175
|
+
wikiComputationPreview: async (vaultId, body) => {
|
|
176
|
+
const response = await doFetch(`${moduleApi}/api/wiki/vaults/${encodeURIComponent(vaultId)}/computations/actions/preview`, {
|
|
177
|
+
method: "POST",
|
|
178
|
+
headers: { "content-type": "application/json", "x-kk-action": "1" },
|
|
179
|
+
body: JSON.stringify(body)
|
|
180
|
+
});
|
|
181
|
+
return {
|
|
182
|
+
status: response.status,
|
|
183
|
+
body: await response.json()
|
|
184
|
+
};
|
|
185
|
+
},
|
|
186
|
+
wikiComputationConfirm: async (vaultId, token) => {
|
|
187
|
+
const response = await doFetch(`${moduleApi}/api/wiki/vaults/${encodeURIComponent(vaultId)}/computations/actions/confirm`, {
|
|
188
|
+
method: "POST",
|
|
189
|
+
headers: { "content-type": "application/json", "x-kk-action": "1" },
|
|
190
|
+
body: JSON.stringify({ token })
|
|
191
|
+
});
|
|
192
|
+
return {
|
|
193
|
+
status: response.status,
|
|
194
|
+
body: await response.json()
|
|
195
|
+
};
|
|
196
|
+
}
|
|
129
197
|
};
|
|
130
198
|
}
|
|
131
199
|
|
|
@@ -777,8 +845,146 @@ function publishingDetail(digest) {
|
|
|
777
845
|
});
|
|
778
846
|
}
|
|
779
847
|
|
|
848
|
+
// ../board/src/daily-voice/external-jobs.tsx
|
|
849
|
+
import { Diagnostic } from "@gobing-ai/spur/board/ui";
|
|
850
|
+
import { useEffect, useState } from "react";
|
|
851
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
852
|
+
var EXTERNAL_JOB_WORKFLOWS = ["kk-video-generate", "kk-news-generate"];
|
|
853
|
+
function formatElapsed2(elapsedMs) {
|
|
854
|
+
const totalSec = Math.max(0, Math.floor(elapsedMs / 1000));
|
|
855
|
+
const hours = Math.floor(totalSec / 3600);
|
|
856
|
+
const minutes = Math.floor(totalSec % 3600 / 60);
|
|
857
|
+
const seconds = totalSec % 60;
|
|
858
|
+
if (hours > 0)
|
|
859
|
+
return `${hours}h ${String(minutes).padStart(2, "0")}m`;
|
|
860
|
+
if (minutes > 0)
|
|
861
|
+
return `${minutes}m ${String(seconds).padStart(2, "0")}s`;
|
|
862
|
+
return `${seconds}s`;
|
|
863
|
+
}
|
|
864
|
+
function admissionLabel(row) {
|
|
865
|
+
if (row.admission === undefined)
|
|
866
|
+
return "none";
|
|
867
|
+
const slot = row.admission.held === undefined || row.admission.max === undefined ? row.admission.resource : `${row.admission.resource} ${row.admission.held}/${row.admission.max}`;
|
|
868
|
+
const lost = row.admission.lost === true ? " · lease lost" : "";
|
|
869
|
+
return `${row.admission.state} ${slot}${lost}`;
|
|
870
|
+
}
|
|
871
|
+
function ExternalJobsPanel({ client }) {
|
|
872
|
+
const [rows, setRows] = useState(null);
|
|
873
|
+
const [error, setError] = useState(null);
|
|
874
|
+
useEffect(() => {
|
|
875
|
+
let cancelled = false;
|
|
876
|
+
client.externalJobs("active").then((payload) => {
|
|
877
|
+
if (cancelled)
|
|
878
|
+
return;
|
|
879
|
+
if (payload === null) {
|
|
880
|
+
setRows(null);
|
|
881
|
+
setError("the external-jobs projection did not match the shipped contract");
|
|
882
|
+
return;
|
|
883
|
+
}
|
|
884
|
+
setRows(payload.items.filter((row) => EXTERNAL_JOB_WORKFLOWS.includes(row.workflow)));
|
|
885
|
+
setError(null);
|
|
886
|
+
}).catch((cause) => {
|
|
887
|
+
if (cancelled)
|
|
888
|
+
return;
|
|
889
|
+
setRows(null);
|
|
890
|
+
setError(cause instanceof Error ? cause.message : String(cause));
|
|
891
|
+
});
|
|
892
|
+
return () => {
|
|
893
|
+
cancelled = true;
|
|
894
|
+
};
|
|
895
|
+
}, [client]);
|
|
896
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
897
|
+
className: "kk-board-generation-jobs",
|
|
898
|
+
"data-testid": "external-jobs",
|
|
899
|
+
children: [
|
|
900
|
+
/* @__PURE__ */ jsx("h3", {
|
|
901
|
+
children: "active renders"
|
|
902
|
+
}),
|
|
903
|
+
error === null ? null : /* @__PURE__ */ jsx(Diagnostic, {
|
|
904
|
+
title: "Spur external jobs could not be read",
|
|
905
|
+
detail: error,
|
|
906
|
+
code: "board.reader.unavailable"
|
|
907
|
+
}),
|
|
908
|
+
error === null && rows !== null && rows.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
909
|
+
className: "kk-board-state",
|
|
910
|
+
"data-testid": "external-jobs-empty",
|
|
911
|
+
children: "no active render — nothing is waiting on a Colab job"
|
|
912
|
+
}) : null,
|
|
913
|
+
rows === null || rows.length === 0 ? null : /* @__PURE__ */ jsxs("table", {
|
|
914
|
+
className: "kk-board-table",
|
|
915
|
+
"data-testid": "external-jobs-table",
|
|
916
|
+
children: [
|
|
917
|
+
/* @__PURE__ */ jsx("thead", {
|
|
918
|
+
children: /* @__PURE__ */ jsxs("tr", {
|
|
919
|
+
children: [
|
|
920
|
+
/* @__PURE__ */ jsx("th", {
|
|
921
|
+
scope: "col",
|
|
922
|
+
children: "run"
|
|
923
|
+
}),
|
|
924
|
+
/* @__PURE__ */ jsx("th", {
|
|
925
|
+
scope: "col",
|
|
926
|
+
children: "node"
|
|
927
|
+
}),
|
|
928
|
+
/* @__PURE__ */ jsx("th", {
|
|
929
|
+
scope: "col",
|
|
930
|
+
children: "job"
|
|
931
|
+
}),
|
|
932
|
+
/* @__PURE__ */ jsx("th", {
|
|
933
|
+
scope: "col",
|
|
934
|
+
children: "state"
|
|
935
|
+
}),
|
|
936
|
+
/* @__PURE__ */ jsx("th", {
|
|
937
|
+
scope: "col",
|
|
938
|
+
children: "elapsed"
|
|
939
|
+
}),
|
|
940
|
+
/* @__PURE__ */ jsx("th", {
|
|
941
|
+
scope: "col",
|
|
942
|
+
children: "progress"
|
|
943
|
+
}),
|
|
944
|
+
/* @__PURE__ */ jsx("th", {
|
|
945
|
+
scope: "col",
|
|
946
|
+
children: "admission"
|
|
947
|
+
})
|
|
948
|
+
]
|
|
949
|
+
})
|
|
950
|
+
}),
|
|
951
|
+
/* @__PURE__ */ jsx("tbody", {
|
|
952
|
+
children: rows.map((row) => /* @__PURE__ */ jsxs("tr", {
|
|
953
|
+
children: [
|
|
954
|
+
/* @__PURE__ */ jsx("td", {
|
|
955
|
+
title: row.workflow,
|
|
956
|
+
children: row.runId.slice(0, 8)
|
|
957
|
+
}),
|
|
958
|
+
/* @__PURE__ */ jsx("td", {
|
|
959
|
+
children: row.node
|
|
960
|
+
}),
|
|
961
|
+
/* @__PURE__ */ jsx("td", {
|
|
962
|
+
title: row.jobId ?? "",
|
|
963
|
+
children: row.jobId ?? "—"
|
|
964
|
+
}),
|
|
965
|
+
/* @__PURE__ */ jsx("td", {
|
|
966
|
+
children: row.state
|
|
967
|
+
}),
|
|
968
|
+
/* @__PURE__ */ jsx("td", {
|
|
969
|
+
children: formatElapsed2(row.elapsedMs)
|
|
970
|
+
}),
|
|
971
|
+
/* @__PURE__ */ jsx("td", {
|
|
972
|
+
children: row.progress === null ? "—" : `${Math.round(row.progress * 100)}%`
|
|
973
|
+
}),
|
|
974
|
+
/* @__PURE__ */ jsx("td", {
|
|
975
|
+
children: admissionLabel(row)
|
|
976
|
+
})
|
|
977
|
+
]
|
|
978
|
+
}, `${row.runId}:${row.key}`))
|
|
979
|
+
})
|
|
980
|
+
]
|
|
981
|
+
})
|
|
982
|
+
]
|
|
983
|
+
});
|
|
984
|
+
}
|
|
985
|
+
|
|
780
986
|
// ../board/src/daily-voice/index.tsx
|
|
781
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
987
|
+
import { jsx as jsx2, jsxs as jsxs2, Fragment } from "react/jsx-runtime";
|
|
782
988
|
var MODULE_PATH = "/board/modules/kk-daily-ai-voice2";
|
|
783
989
|
var CONSOLE_TABS_ID = "daily-voice-console";
|
|
784
990
|
var TONE_BADGE = {
|
|
@@ -799,16 +1005,16 @@ function StatusBanner({
|
|
|
799
1005
|
}) {
|
|
800
1006
|
const facts = generationFacts(digest);
|
|
801
1007
|
const status = facts[0];
|
|
802
|
-
return /* @__PURE__ */
|
|
1008
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
803
1009
|
className: "kk-board-module-banner",
|
|
804
1010
|
"data-testid": "day-status",
|
|
805
1011
|
children: [
|
|
806
|
-
/* @__PURE__ */
|
|
1012
|
+
/* @__PURE__ */ jsx2(Badge, {
|
|
807
1013
|
variant: TONE_BADGE[status?.tone ?? "neutral"],
|
|
808
1014
|
size: "md",
|
|
809
1015
|
children: status?.value ?? "unknown"
|
|
810
1016
|
}),
|
|
811
|
-
/* @__PURE__ */
|
|
1017
|
+
/* @__PURE__ */ jsxs2("span", {
|
|
812
1018
|
className: "kk-board-state",
|
|
813
1019
|
children: [
|
|
814
1020
|
digest.day,
|
|
@@ -819,7 +1025,7 @@ function StatusBanner({
|
|
|
819
1025
|
formatTimestamp(fetchedAtIso(fetchedAt))
|
|
820
1026
|
]
|
|
821
1027
|
}),
|
|
822
|
-
/* @__PURE__ */
|
|
1028
|
+
/* @__PURE__ */ jsx2(Button, {
|
|
823
1029
|
variant: "ghost",
|
|
824
1030
|
size: "xs",
|
|
825
1031
|
onClick: onRefresh,
|
|
@@ -832,12 +1038,12 @@ function fetchedAtIso(fetchedAt) {
|
|
|
832
1038
|
return fetchedAt === null ? null : new Date(fetchedAt).toISOString();
|
|
833
1039
|
}
|
|
834
1040
|
function RecipeLine({ argv, label, dryRun }) {
|
|
835
|
-
const [copied, setCopied] =
|
|
1041
|
+
const [copied, setCopied] = useState2(false);
|
|
836
1042
|
const text = recipeText(argv);
|
|
837
|
-
return /* @__PURE__ */
|
|
1043
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
838
1044
|
className: "kk-board-recipe",
|
|
839
1045
|
children: [
|
|
840
|
-
/* @__PURE__ */
|
|
1046
|
+
/* @__PURE__ */ jsx2(Button, {
|
|
841
1047
|
variant: "ghost",
|
|
842
1048
|
size: "xs",
|
|
843
1049
|
onClick: () => {
|
|
@@ -848,18 +1054,18 @@ function RecipeLine({ argv, label, dryRun }) {
|
|
|
848
1054
|
},
|
|
849
1055
|
children: copied ? "copied" : "copy"
|
|
850
1056
|
}),
|
|
851
|
-
/* @__PURE__ */
|
|
1057
|
+
/* @__PURE__ */ jsx2("code", {
|
|
852
1058
|
"data-testid": "recipe-argv",
|
|
853
1059
|
children: text
|
|
854
1060
|
}),
|
|
855
|
-
dryRun === undefined ? null : /* @__PURE__ */
|
|
1061
|
+
dryRun === undefined ? null : /* @__PURE__ */ jsxs2("span", {
|
|
856
1062
|
className: "kk-board-state",
|
|
857
1063
|
children: [
|
|
858
1064
|
"dry run: ",
|
|
859
1065
|
recipeText(dryRun)
|
|
860
1066
|
]
|
|
861
1067
|
}),
|
|
862
|
-
/* @__PURE__ */
|
|
1068
|
+
/* @__PURE__ */ jsxs2("span", {
|
|
863
1069
|
className: "kk-board-state",
|
|
864
1070
|
children: [
|
|
865
1071
|
"(",
|
|
@@ -872,27 +1078,27 @@ function RecipeLine({ argv, label, dryRun }) {
|
|
|
872
1078
|
}
|
|
873
1079
|
function AttentionList({ rows }) {
|
|
874
1080
|
if (rows.length === 0) {
|
|
875
|
-
return /* @__PURE__ */
|
|
1081
|
+
return /* @__PURE__ */ jsx2(EmptyState, {
|
|
876
1082
|
testId: "attention-all-clear",
|
|
877
1083
|
children: "All clear — nothing on this day needs the operator."
|
|
878
1084
|
});
|
|
879
1085
|
}
|
|
880
|
-
return /* @__PURE__ */
|
|
1086
|
+
return /* @__PURE__ */ jsx2("ul", {
|
|
881
1087
|
className: "kk-board-attention",
|
|
882
1088
|
"data-testid": "attention-list",
|
|
883
|
-
children: rows.map((row) => /* @__PURE__ */
|
|
1089
|
+
children: rows.map((row) => /* @__PURE__ */ jsxs2("li", {
|
|
884
1090
|
className: `kk-board-attention-${row.severity}`,
|
|
885
1091
|
children: [
|
|
886
|
-
/* @__PURE__ */
|
|
1092
|
+
/* @__PURE__ */ jsx2(Badge, {
|
|
887
1093
|
variant: TONE_BADGE[row.tone],
|
|
888
1094
|
size: "sm",
|
|
889
1095
|
children: row.severity
|
|
890
1096
|
}),
|
|
891
|
-
/* @__PURE__ */
|
|
1097
|
+
/* @__PURE__ */ jsx2("strong", {
|
|
892
1098
|
children: row.kind
|
|
893
1099
|
}),
|
|
894
1100
|
" ",
|
|
895
|
-
/* @__PURE__ */
|
|
1101
|
+
/* @__PURE__ */ jsxs2("span", {
|
|
896
1102
|
className: "kk-board-state",
|
|
897
1103
|
children: [
|
|
898
1104
|
"(",
|
|
@@ -900,24 +1106,24 @@ function AttentionList({ rows }) {
|
|
|
900
1106
|
")"
|
|
901
1107
|
]
|
|
902
1108
|
}),
|
|
903
|
-
/* @__PURE__ */
|
|
1109
|
+
/* @__PURE__ */ jsx2("p", {
|
|
904
1110
|
children: row.message
|
|
905
1111
|
}),
|
|
906
|
-
row.evidence === null ? null : /* @__PURE__ */
|
|
1112
|
+
row.evidence === null ? null : /* @__PURE__ */ jsxs2("p", {
|
|
907
1113
|
className: "kk-board-state",
|
|
908
1114
|
children: [
|
|
909
1115
|
"evidence: ",
|
|
910
|
-
/* @__PURE__ */
|
|
1116
|
+
/* @__PURE__ */ jsx2("code", {
|
|
911
1117
|
children: row.evidence
|
|
912
1118
|
})
|
|
913
1119
|
]
|
|
914
1120
|
}),
|
|
915
|
-
row.recipes.length === 0 ? /* @__PURE__ */
|
|
1121
|
+
row.recipes.length === 0 ? /* @__PURE__ */ jsx2("p", {
|
|
916
1122
|
className: "kk-board-state",
|
|
917
1123
|
children: "no recipe — the evidence above names what is missing"
|
|
918
|
-
}) : /* @__PURE__ */
|
|
919
|
-
children: row.recipes.map((recipe) => /* @__PURE__ */
|
|
920
|
-
children: /* @__PURE__ */
|
|
1124
|
+
}) : /* @__PURE__ */ jsx2("ul", {
|
|
1125
|
+
children: row.recipes.map((recipe) => /* @__PURE__ */ jsx2("li", {
|
|
1126
|
+
children: /* @__PURE__ */ jsx2(RecipeLine, {
|
|
921
1127
|
argv: recipe.argv,
|
|
922
1128
|
label: recipe.label,
|
|
923
1129
|
dryRun: recipe.dryRunArgv
|
|
@@ -937,25 +1143,25 @@ function TodayPanel({
|
|
|
937
1143
|
const windows = windowRows(digest);
|
|
938
1144
|
const attention = attentionRows(digest);
|
|
939
1145
|
const diagnostics = dedupeDiagnostics(digest.diagnostics);
|
|
940
|
-
return /* @__PURE__ */
|
|
1146
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
941
1147
|
"data-testid": "today-panel",
|
|
942
1148
|
children: [
|
|
943
|
-
/* @__PURE__ */
|
|
1149
|
+
/* @__PURE__ */ jsx2(StatusBanner, {
|
|
944
1150
|
digest,
|
|
945
1151
|
fetchedAt,
|
|
946
1152
|
onRefresh
|
|
947
1153
|
}),
|
|
948
|
-
/* @__PURE__ */
|
|
1154
|
+
/* @__PURE__ */ jsx2("div", {
|
|
949
1155
|
className: "kk-board-facts",
|
|
950
1156
|
"data-testid": "generation-card",
|
|
951
|
-
children: facts.map((fact) => /* @__PURE__ */
|
|
1157
|
+
children: facts.map((fact) => /* @__PURE__ */ jsxs2("div", {
|
|
952
1158
|
className: "kk-board-fact",
|
|
953
1159
|
children: [
|
|
954
|
-
/* @__PURE__ */
|
|
1160
|
+
/* @__PURE__ */ jsx2("span", {
|
|
955
1161
|
className: "kk-board-state",
|
|
956
1162
|
children: fact.label
|
|
957
1163
|
}),
|
|
958
|
-
/* @__PURE__ */
|
|
1164
|
+
/* @__PURE__ */ jsx2(Badge, {
|
|
959
1165
|
variant: TONE_BADGE[fact.tone] ?? "neutral",
|
|
960
1166
|
size: "sm",
|
|
961
1167
|
children: fact.value
|
|
@@ -963,25 +1169,25 @@ function TodayPanel({
|
|
|
963
1169
|
]
|
|
964
1170
|
}, fact.label))
|
|
965
1171
|
}),
|
|
966
|
-
/* @__PURE__ */
|
|
1172
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
967
1173
|
children: "Publish windows"
|
|
968
1174
|
}),
|
|
969
|
-
/* @__PURE__ */
|
|
1175
|
+
/* @__PURE__ */ jsx2("ul", {
|
|
970
1176
|
className: "kk-board-windows",
|
|
971
1177
|
"data-testid": "window-strip",
|
|
972
|
-
children: windows.map((window2) => /* @__PURE__ */
|
|
1178
|
+
children: windows.map((window2) => /* @__PURE__ */ jsxs2("li", {
|
|
973
1179
|
children: [
|
|
974
|
-
/* @__PURE__ */
|
|
1180
|
+
/* @__PURE__ */ jsx2("strong", {
|
|
975
1181
|
children: window2.label
|
|
976
1182
|
}),
|
|
977
1183
|
" ",
|
|
978
|
-
/* @__PURE__ */
|
|
1184
|
+
/* @__PURE__ */ jsx2(Badge, {
|
|
979
1185
|
variant: TONE_BADGE[window2.tone] ?? "neutral",
|
|
980
1186
|
size: "sm",
|
|
981
1187
|
children: window2.launch
|
|
982
1188
|
}),
|
|
983
1189
|
" ",
|
|
984
|
-
/* @__PURE__ */
|
|
1190
|
+
/* @__PURE__ */ jsxs2("span", {
|
|
985
1191
|
className: "kk-board-state",
|
|
986
1192
|
children: [
|
|
987
1193
|
"outcome ",
|
|
@@ -990,8 +1196,8 @@ function TodayPanel({
|
|
|
990
1196
|
window2.targets.length === 0 ? "" : ` · ${window2.targets.length} target(s)`
|
|
991
1197
|
]
|
|
992
1198
|
}),
|
|
993
|
-
window2.targets.length === 0 ? null : /* @__PURE__ */
|
|
994
|
-
children: window2.targets.map((target) => /* @__PURE__ */
|
|
1199
|
+
window2.targets.length === 0 ? null : /* @__PURE__ */ jsx2("ul", {
|
|
1200
|
+
children: window2.targets.map((target) => /* @__PURE__ */ jsxs2("li", {
|
|
995
1201
|
children: [
|
|
996
1202
|
target.id,
|
|
997
1203
|
" — ",
|
|
@@ -1005,10 +1211,10 @@ function TodayPanel({
|
|
|
1005
1211
|
]
|
|
1006
1212
|
}, window2.window))
|
|
1007
1213
|
}),
|
|
1008
|
-
/* @__PURE__ */
|
|
1214
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
1009
1215
|
children: "Safety"
|
|
1010
1216
|
}),
|
|
1011
|
-
/* @__PURE__ */
|
|
1217
|
+
/* @__PURE__ */ jsxs2("p", {
|
|
1012
1218
|
"data-testid": "safety-line",
|
|
1013
1219
|
children: [
|
|
1014
1220
|
"verdict ",
|
|
@@ -1018,15 +1224,15 @@ function TodayPanel({
|
|
|
1018
1224
|
digest.safety.judge ?? "unknown"
|
|
1019
1225
|
]
|
|
1020
1226
|
}),
|
|
1021
|
-
/* @__PURE__ */
|
|
1227
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
1022
1228
|
children: "Attention"
|
|
1023
1229
|
}),
|
|
1024
|
-
/* @__PURE__ */
|
|
1230
|
+
/* @__PURE__ */ jsx2(AttentionList, {
|
|
1025
1231
|
rows: attention
|
|
1026
1232
|
}),
|
|
1027
|
-
diagnostics.length === 0 ? null : /* @__PURE__ */
|
|
1233
|
+
diagnostics.length === 0 ? null : /* @__PURE__ */ jsx2("div", {
|
|
1028
1234
|
className: "kk-board-diagnostics",
|
|
1029
|
-
children: diagnostics.map((diagnostic) => /* @__PURE__ */
|
|
1235
|
+
children: diagnostics.map((diagnostic) => /* @__PURE__ */ jsx2(Diagnostic2, {
|
|
1030
1236
|
title: diagnostic.code,
|
|
1031
1237
|
detail: diagnostic.message
|
|
1032
1238
|
}, diagnostic.code))
|
|
@@ -1041,10 +1247,10 @@ function GenerationPanel({
|
|
|
1041
1247
|
onChanged
|
|
1042
1248
|
}) {
|
|
1043
1249
|
const attempts = useMemo(() => [...digest.generation.attempts].reverse(), [digest.generation.attempts]);
|
|
1044
|
-
const [selected, setSelected] =
|
|
1045
|
-
const [evidence, setEvidence] =
|
|
1046
|
-
const [error, setError] =
|
|
1047
|
-
|
|
1250
|
+
const [selected, setSelected] = useState2(attempts[0]?.runId ?? null);
|
|
1251
|
+
const [evidence, setEvidence] = useState2(null);
|
|
1252
|
+
const [error, setError] = useState2(null);
|
|
1253
|
+
useEffect2(() => {
|
|
1048
1254
|
if (selected === null)
|
|
1049
1255
|
return;
|
|
1050
1256
|
let cancelled = false;
|
|
@@ -1063,26 +1269,29 @@ function GenerationPanel({
|
|
|
1063
1269
|
};
|
|
1064
1270
|
}, [client, selected]);
|
|
1065
1271
|
const detail = evidence === null ? null : generationDetail(evidence, digest);
|
|
1066
|
-
return /* @__PURE__ */
|
|
1272
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
1067
1273
|
"data-testid": "generation-panel",
|
|
1068
1274
|
children: [
|
|
1069
|
-
/* @__PURE__ */
|
|
1275
|
+
/* @__PURE__ */ jsx2(ExternalJobsPanel, {
|
|
1276
|
+
client
|
|
1277
|
+
}),
|
|
1278
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
1070
1279
|
className: "kk-board-attempt-picker",
|
|
1071
1280
|
children: [
|
|
1072
|
-
/* @__PURE__ */
|
|
1281
|
+
/* @__PURE__ */ jsx2("label", {
|
|
1073
1282
|
htmlFor: "daily-voice-attempt",
|
|
1074
1283
|
children: "attempt"
|
|
1075
1284
|
}),
|
|
1076
|
-
/* @__PURE__ */
|
|
1285
|
+
/* @__PURE__ */ jsxs2("select", {
|
|
1077
1286
|
id: "daily-voice-attempt",
|
|
1078
1287
|
value: selected ?? "",
|
|
1079
1288
|
onChange: (event) => setSelected(event.target.value),
|
|
1080
1289
|
children: [
|
|
1081
|
-
attempts.length === 0 ? /* @__PURE__ */
|
|
1290
|
+
attempts.length === 0 ? /* @__PURE__ */ jsx2("option", {
|
|
1082
1291
|
value: "",
|
|
1083
1292
|
children: "no captured attempt"
|
|
1084
1293
|
}) : null,
|
|
1085
|
-
attempts.map((attempt) => /* @__PURE__ */
|
|
1294
|
+
attempts.map((attempt) => /* @__PURE__ */ jsxs2("option", {
|
|
1086
1295
|
value: attempt.runId,
|
|
1087
1296
|
children: [
|
|
1088
1297
|
attempt.runId,
|
|
@@ -1094,14 +1303,14 @@ function GenerationPanel({
|
|
|
1094
1303
|
})
|
|
1095
1304
|
]
|
|
1096
1305
|
}),
|
|
1097
|
-
error === null ? null : /* @__PURE__ */
|
|
1306
|
+
error === null ? null : /* @__PURE__ */ jsx2(Diagnostic2, {
|
|
1098
1307
|
title: "The attempt evidence could not be read",
|
|
1099
1308
|
detail: error,
|
|
1100
1309
|
code: "board.reader.unavailable"
|
|
1101
1310
|
}),
|
|
1102
|
-
detail === null ? null : /* @__PURE__ */
|
|
1311
|
+
detail === null ? null : /* @__PURE__ */ jsxs2(Fragment, {
|
|
1103
1312
|
children: [
|
|
1104
|
-
/* @__PURE__ */
|
|
1313
|
+
/* @__PURE__ */ jsxs2("p", {
|
|
1105
1314
|
className: "kk-board-state",
|
|
1106
1315
|
children: [
|
|
1107
1316
|
"capture ",
|
|
@@ -1111,79 +1320,79 @@ function GenerationPanel({
|
|
|
1111
1320
|
detail.unknownReason === null ? "" : ` · unknown (${detail.unknownReason})`
|
|
1112
1321
|
]
|
|
1113
1322
|
}),
|
|
1114
|
-
/* @__PURE__ */
|
|
1323
|
+
/* @__PURE__ */ jsx2("div", {
|
|
1115
1324
|
className: "kk-board-facts",
|
|
1116
1325
|
"data-testid": "attempt-facts",
|
|
1117
|
-
children: detail.facts.map((fact) => /* @__PURE__ */
|
|
1326
|
+
children: detail.facts.map((fact) => /* @__PURE__ */ jsxs2("div", {
|
|
1118
1327
|
className: "kk-board-fact",
|
|
1119
1328
|
children: [
|
|
1120
|
-
/* @__PURE__ */
|
|
1329
|
+
/* @__PURE__ */ jsx2("span", {
|
|
1121
1330
|
className: "kk-board-state",
|
|
1122
1331
|
children: fact.label
|
|
1123
1332
|
}),
|
|
1124
|
-
/* @__PURE__ */
|
|
1333
|
+
/* @__PURE__ */ jsx2("span", {
|
|
1125
1334
|
children: fact.value === "" ? "unknown" : fact.value
|
|
1126
1335
|
})
|
|
1127
1336
|
]
|
|
1128
1337
|
}, fact.label))
|
|
1129
1338
|
}),
|
|
1130
|
-
/* @__PURE__ */
|
|
1339
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
1131
1340
|
children: "Node timeline"
|
|
1132
1341
|
}),
|
|
1133
|
-
detail.timeline.length === 0 ? /* @__PURE__ */
|
|
1342
|
+
detail.timeline.length === 0 ? /* @__PURE__ */ jsx2(EmptyState, {
|
|
1134
1343
|
children: "No node was recorded for this attempt."
|
|
1135
|
-
}) : /* @__PURE__ */
|
|
1344
|
+
}) : /* @__PURE__ */ jsxs2("table", {
|
|
1136
1345
|
className: "kk-board-timeline",
|
|
1137
1346
|
"data-testid": "node-timeline",
|
|
1138
1347
|
children: [
|
|
1139
|
-
/* @__PURE__ */
|
|
1140
|
-
children: /* @__PURE__ */
|
|
1348
|
+
/* @__PURE__ */ jsx2("thead", {
|
|
1349
|
+
children: /* @__PURE__ */ jsxs2("tr", {
|
|
1141
1350
|
children: [
|
|
1142
|
-
/* @__PURE__ */
|
|
1351
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1143
1352
|
children: "node"
|
|
1144
1353
|
}),
|
|
1145
|
-
/* @__PURE__ */
|
|
1354
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1146
1355
|
children: "state"
|
|
1147
1356
|
}),
|
|
1148
|
-
/* @__PURE__ */
|
|
1357
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1149
1358
|
children: "attempts"
|
|
1150
1359
|
}),
|
|
1151
|
-
/* @__PURE__ */
|
|
1360
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1152
1361
|
children: "step duration"
|
|
1153
1362
|
}),
|
|
1154
|
-
/* @__PURE__ */
|
|
1363
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1155
1364
|
children: "recipe"
|
|
1156
1365
|
})
|
|
1157
1366
|
]
|
|
1158
1367
|
})
|
|
1159
1368
|
}),
|
|
1160
|
-
/* @__PURE__ */
|
|
1161
|
-
children: detail.timeline.map((node) => /* @__PURE__ */
|
|
1369
|
+
/* @__PURE__ */ jsx2("tbody", {
|
|
1370
|
+
children: detail.timeline.map((node) => /* @__PURE__ */ jsxs2("tr", {
|
|
1162
1371
|
children: [
|
|
1163
|
-
/* @__PURE__ */
|
|
1372
|
+
/* @__PURE__ */ jsxs2("td", {
|
|
1164
1373
|
children: [
|
|
1165
1374
|
node.label,
|
|
1166
|
-
node.engine ? /* @__PURE__ */
|
|
1375
|
+
node.engine ? /* @__PURE__ */ jsx2("span", {
|
|
1167
1376
|
className: "kk-board-state",
|
|
1168
1377
|
children: " (voice chain)"
|
|
1169
1378
|
}) : null
|
|
1170
1379
|
]
|
|
1171
1380
|
}),
|
|
1172
|
-
/* @__PURE__ */
|
|
1173
|
-
children: /* @__PURE__ */
|
|
1381
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1382
|
+
children: /* @__PURE__ */ jsx2(Badge, {
|
|
1174
1383
|
variant: TONE_BADGE[node.tone] ?? "neutral",
|
|
1175
1384
|
size: "sm",
|
|
1176
1385
|
children: node.word
|
|
1177
1386
|
})
|
|
1178
1387
|
}),
|
|
1179
|
-
/* @__PURE__ */
|
|
1388
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1180
1389
|
children: node.timing ?? "timing unknown"
|
|
1181
1390
|
}),
|
|
1182
|
-
/* @__PURE__ */
|
|
1391
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1183
1392
|
children: formatDuration(node.durationMs)
|
|
1184
1393
|
}),
|
|
1185
|
-
/* @__PURE__ */
|
|
1186
|
-
children: recipes(node.id).map((recipe) => /* @__PURE__ */
|
|
1394
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1395
|
+
children: recipes(node.id).map((recipe) => /* @__PURE__ */ jsx2(RecipeLine, {
|
|
1187
1396
|
argv: recipe.argv,
|
|
1188
1397
|
label: recipe.label,
|
|
1189
1398
|
dryRun: recipe.dryRunArgv
|
|
@@ -1194,14 +1403,14 @@ function GenerationPanel({
|
|
|
1194
1403
|
})
|
|
1195
1404
|
]
|
|
1196
1405
|
}),
|
|
1197
|
-
/* @__PURE__ */
|
|
1406
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
1198
1407
|
children: "Engine chain"
|
|
1199
1408
|
}),
|
|
1200
|
-
detail.engines.length === 0 ? /* @__PURE__ */
|
|
1409
|
+
detail.engines.length === 0 ? /* @__PURE__ */ jsx2(EmptyState, {
|
|
1201
1410
|
children: "No engine was recorded for this attempt."
|
|
1202
|
-
}) : /* @__PURE__ */
|
|
1411
|
+
}) : /* @__PURE__ */ jsx2("ul", {
|
|
1203
1412
|
"data-testid": "engine-chain",
|
|
1204
|
-
children: detail.engines.map((engine) => /* @__PURE__ */
|
|
1413
|
+
children: detail.engines.map((engine) => /* @__PURE__ */ jsxs2("li", {
|
|
1205
1414
|
children: [
|
|
1206
1415
|
engine.label,
|
|
1207
1416
|
" — ",
|
|
@@ -1213,22 +1422,22 @@ function GenerationPanel({
|
|
|
1213
1422
|
]
|
|
1214
1423
|
}, engine.node))
|
|
1215
1424
|
}),
|
|
1216
|
-
/* @__PURE__ */
|
|
1425
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
1217
1426
|
children: "Artifacts"
|
|
1218
1427
|
}),
|
|
1219
|
-
detail.artifacts.length === 0 ? /* @__PURE__ */
|
|
1428
|
+
detail.artifacts.length === 0 ? /* @__PURE__ */ jsx2(EmptyState, {
|
|
1220
1429
|
children: "This attempt recorded no artifact."
|
|
1221
|
-
}) : /* @__PURE__ */
|
|
1430
|
+
}) : /* @__PURE__ */ jsx2("ul", {
|
|
1222
1431
|
"data-testid": "attempt-artifacts",
|
|
1223
|
-
children: detail.artifacts.map((artifact) => /* @__PURE__ */
|
|
1432
|
+
children: detail.artifacts.map((artifact) => /* @__PURE__ */ jsxs2("li", {
|
|
1224
1433
|
children: [
|
|
1225
1434
|
artifact.label,
|
|
1226
1435
|
" —",
|
|
1227
1436
|
" ",
|
|
1228
|
-
artifact.availability === "available" ? /* @__PURE__ */
|
|
1437
|
+
artifact.availability === "available" ? /* @__PURE__ */ jsx2("a", {
|
|
1229
1438
|
href: client.artifactUrl("kk-news-generate", detail.runId, artifact.id),
|
|
1230
1439
|
children: "available"
|
|
1231
|
-
}) : /* @__PURE__ */
|
|
1440
|
+
}) : /* @__PURE__ */ jsxs2("span", {
|
|
1232
1441
|
className: "kk-board-state",
|
|
1233
1442
|
children: [
|
|
1234
1443
|
artifact.availability,
|
|
@@ -1238,18 +1447,18 @@ function GenerationPanel({
|
|
|
1238
1447
|
]
|
|
1239
1448
|
}, artifact.id))
|
|
1240
1449
|
}),
|
|
1241
|
-
/* @__PURE__ */
|
|
1450
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
1242
1451
|
children: "Diagnostics"
|
|
1243
1452
|
}),
|
|
1244
|
-
detail.diagnostics.length === 0 ? /* @__PURE__ */
|
|
1453
|
+
detail.diagnostics.length === 0 ? /* @__PURE__ */ jsx2(EmptyState, {
|
|
1245
1454
|
children: "No diagnostic was recorded for this attempt."
|
|
1246
|
-
}) : /* @__PURE__ */
|
|
1455
|
+
}) : /* @__PURE__ */ jsxs2(Fragment, {
|
|
1247
1456
|
children: [
|
|
1248
|
-
detail.diagnostics.map((diagnostic) => /* @__PURE__ */
|
|
1457
|
+
detail.diagnostics.map((diagnostic) => /* @__PURE__ */ jsx2(Diagnostic2, {
|
|
1249
1458
|
title: diagnostic.code,
|
|
1250
1459
|
detail: diagnostic.message
|
|
1251
1460
|
}, diagnostic.code)),
|
|
1252
|
-
detail.diagnostics.length >= NODE_DIAGNOSTIC_CAP ? /* @__PURE__ */
|
|
1461
|
+
detail.diagnostics.length >= NODE_DIAGNOSTIC_CAP ? /* @__PURE__ */ jsxs2("p", {
|
|
1253
1462
|
className: "kk-board-state",
|
|
1254
1463
|
children: [
|
|
1255
1464
|
"truncated — the first ",
|
|
@@ -1261,14 +1470,14 @@ function GenerationPanel({
|
|
|
1261
1470
|
})
|
|
1262
1471
|
]
|
|
1263
1472
|
}),
|
|
1264
|
-
/* @__PURE__ */
|
|
1473
|
+
/* @__PURE__ */ jsx2(ArtifactEditor, {
|
|
1265
1474
|
day: digest.day,
|
|
1266
1475
|
artifact: "article",
|
|
1267
1476
|
digest,
|
|
1268
1477
|
client,
|
|
1269
1478
|
onChanged: () => onChanged()
|
|
1270
1479
|
}),
|
|
1271
|
-
/* @__PURE__ */
|
|
1480
|
+
/* @__PURE__ */ jsx2(ArtifactEditor, {
|
|
1272
1481
|
day: digest.day,
|
|
1273
1482
|
artifact: "script",
|
|
1274
1483
|
digest,
|
|
@@ -1285,11 +1494,11 @@ function ArtifactEditor({
|
|
|
1285
1494
|
client,
|
|
1286
1495
|
onChanged
|
|
1287
1496
|
}) {
|
|
1288
|
-
const [document, setDocument] =
|
|
1289
|
-
const [draft, setDraft] =
|
|
1290
|
-
const [preview, setPreview] =
|
|
1291
|
-
const [banner, setBanner] =
|
|
1292
|
-
const [busy, setBusy] =
|
|
1497
|
+
const [document, setDocument] = useState2(null);
|
|
1498
|
+
const [draft, setDraft] = useState2("");
|
|
1499
|
+
const [preview, setPreview] = useState2(null);
|
|
1500
|
+
const [banner, setBanner] = useState2(null);
|
|
1501
|
+
const [busy, setBusy] = useState2(false);
|
|
1293
1502
|
const load = useCallback(async () => {
|
|
1294
1503
|
setBusy(true);
|
|
1295
1504
|
try {
|
|
@@ -1303,17 +1512,17 @@ function ArtifactEditor({
|
|
|
1303
1512
|
setBusy(false);
|
|
1304
1513
|
}
|
|
1305
1514
|
}, [artifact, client, day]);
|
|
1306
|
-
|
|
1515
|
+
useEffect2(() => {
|
|
1307
1516
|
load();
|
|
1308
1517
|
}, [load]);
|
|
1309
1518
|
if (document === null) {
|
|
1310
|
-
return /* @__PURE__ */
|
|
1519
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
1311
1520
|
"data-testid": `editor-${artifact}`,
|
|
1312
1521
|
children: [
|
|
1313
|
-
/* @__PURE__ */
|
|
1522
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
1314
1523
|
children: artifact === "article" ? "Article body" : "Voice script"
|
|
1315
1524
|
}),
|
|
1316
|
-
/* @__PURE__ */
|
|
1525
|
+
/* @__PURE__ */ jsx2("p", {
|
|
1317
1526
|
className: "kk-board-state",
|
|
1318
1527
|
children: "Loading the current draft…"
|
|
1319
1528
|
})
|
|
@@ -1401,14 +1610,14 @@ function ArtifactEditor({
|
|
|
1401
1610
|
setBusy(false);
|
|
1402
1611
|
}
|
|
1403
1612
|
};
|
|
1404
|
-
return /* @__PURE__ */
|
|
1613
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
1405
1614
|
className: "kk-board-editor",
|
|
1406
1615
|
"data-testid": `editor-${artifact}`,
|
|
1407
1616
|
children: [
|
|
1408
|
-
/* @__PURE__ */
|
|
1617
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
1409
1618
|
children: artifact === "article" ? "Article body" : "Voice script"
|
|
1410
1619
|
}),
|
|
1411
|
-
/* @__PURE__ */
|
|
1620
|
+
/* @__PURE__ */ jsxs2("p", {
|
|
1412
1621
|
className: "kk-board-state",
|
|
1413
1622
|
children: [
|
|
1414
1623
|
document.path,
|
|
@@ -1417,9 +1626,9 @@ function ArtifactEditor({
|
|
|
1417
1626
|
document.backup === null ? "" : ` · backup ${document.backup}`
|
|
1418
1627
|
]
|
|
1419
1628
|
}),
|
|
1420
|
-
document.editable ? /* @__PURE__ */
|
|
1629
|
+
document.editable ? /* @__PURE__ */ jsxs2(Fragment, {
|
|
1421
1630
|
children: [
|
|
1422
|
-
/* @__PURE__ */
|
|
1631
|
+
/* @__PURE__ */ jsx2("textarea", {
|
|
1423
1632
|
"aria-label": `${artifact} draft`,
|
|
1424
1633
|
"data-testid": `editor-${artifact}-draft`,
|
|
1425
1634
|
value: draft,
|
|
@@ -1427,24 +1636,24 @@ function ArtifactEditor({
|
|
|
1427
1636
|
rows: 12,
|
|
1428
1637
|
onChange: (event) => setDraft(event.target.value)
|
|
1429
1638
|
}),
|
|
1430
|
-
/* @__PURE__ */
|
|
1639
|
+
/* @__PURE__ */ jsxs2("div", {
|
|
1431
1640
|
className: "kk-board-editor-actions",
|
|
1432
1641
|
children: [
|
|
1433
|
-
/* @__PURE__ */
|
|
1642
|
+
/* @__PURE__ */ jsx2(Button, {
|
|
1434
1643
|
variant: "ghost",
|
|
1435
1644
|
size: "xs",
|
|
1436
1645
|
disabled: busy,
|
|
1437
1646
|
onClick: () => void ask(),
|
|
1438
1647
|
children: "preview"
|
|
1439
1648
|
}),
|
|
1440
|
-
preview === null ? null : /* @__PURE__ */
|
|
1649
|
+
preview === null ? null : /* @__PURE__ */ jsx2(Button, {
|
|
1441
1650
|
variant: "primary",
|
|
1442
1651
|
size: "xs",
|
|
1443
1652
|
disabled: busy,
|
|
1444
1653
|
onClick: () => void confirm(),
|
|
1445
1654
|
children: "confirm"
|
|
1446
1655
|
}),
|
|
1447
|
-
document.revertRecipe === null ? null : /* @__PURE__ */
|
|
1656
|
+
document.revertRecipe === null ? null : /* @__PURE__ */ jsx2(Button, {
|
|
1448
1657
|
variant: "ghost",
|
|
1449
1658
|
size: "xs",
|
|
1450
1659
|
disabled: busy,
|
|
@@ -1454,23 +1663,23 @@ function ArtifactEditor({
|
|
|
1454
1663
|
]
|
|
1455
1664
|
})
|
|
1456
1665
|
]
|
|
1457
|
-
}) : /* @__PURE__ */
|
|
1666
|
+
}) : /* @__PURE__ */ jsxs2("p", {
|
|
1458
1667
|
className: "kk-board-state",
|
|
1459
1668
|
children: [
|
|
1460
1669
|
"Actions are disabled — recipes only.",
|
|
1461
1670
|
" ",
|
|
1462
|
-
document.recipe === null ? null : /* @__PURE__ */
|
|
1671
|
+
document.recipe === null ? null : /* @__PURE__ */ jsx2("code", {
|
|
1463
1672
|
"data-testid": `editor-${artifact}-recipe`,
|
|
1464
1673
|
children: recipeText(document.recipe.argv)
|
|
1465
1674
|
})
|
|
1466
1675
|
]
|
|
1467
1676
|
}),
|
|
1468
|
-
banner === null ? null : /* @__PURE__ */
|
|
1677
|
+
banner === null ? null : /* @__PURE__ */ jsxs2("div", {
|
|
1469
1678
|
"data-testid": `editor-${artifact}-banner`,
|
|
1470
1679
|
className: `kk-board-state kk-board-banner-${banner.tone}`,
|
|
1471
1680
|
children: [
|
|
1472
1681
|
banner.text,
|
|
1473
|
-
banner.conflict ? /* @__PURE__ */
|
|
1682
|
+
banner.conflict ? /* @__PURE__ */ jsx2(Button, {
|
|
1474
1683
|
variant: "ghost",
|
|
1475
1684
|
size: "xs",
|
|
1476
1685
|
disabled: busy,
|
|
@@ -1479,12 +1688,12 @@ function ArtifactEditor({
|
|
|
1479
1688
|
}) : null
|
|
1480
1689
|
]
|
|
1481
1690
|
}),
|
|
1482
|
-
preview === null ? null : /* @__PURE__ */
|
|
1691
|
+
preview === null ? null : /* @__PURE__ */ jsx2("pre", {
|
|
1483
1692
|
"data-testid": `editor-${artifact}-diff`,
|
|
1484
1693
|
className: "kk-board-diff",
|
|
1485
1694
|
children: preview.diff
|
|
1486
1695
|
}),
|
|
1487
|
-
/* @__PURE__ */
|
|
1696
|
+
/* @__PURE__ */ jsx2(StaleNotice, {
|
|
1488
1697
|
digest,
|
|
1489
1698
|
artifact
|
|
1490
1699
|
})
|
|
@@ -1495,31 +1704,31 @@ function StaleNotice({ digest, artifact }) {
|
|
|
1495
1704
|
const items = digest.attention.filter((item) => item.kind === "artifact-edited" && item.subject === artifact);
|
|
1496
1705
|
if (items.length === 0 && digest.safety.stale !== true)
|
|
1497
1706
|
return null;
|
|
1498
|
-
return /* @__PURE__ */
|
|
1707
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
1499
1708
|
"data-testid": `editor-${artifact}-stale`,
|
|
1500
1709
|
className: "kk-board-state",
|
|
1501
1710
|
children: [
|
|
1502
|
-
/* @__PURE__ */
|
|
1711
|
+
/* @__PURE__ */ jsxs2("p", {
|
|
1503
1712
|
children: [
|
|
1504
1713
|
"safety: ",
|
|
1505
|
-
/* @__PURE__ */
|
|
1714
|
+
/* @__PURE__ */ jsx2("strong", {
|
|
1506
1715
|
children: digest.safety.stale === true ? "stale" : "fresh"
|
|
1507
1716
|
}),
|
|
1508
1717
|
digest.safety.staleReason == null ? "" : ` — ${digest.safety.staleReason}`
|
|
1509
1718
|
]
|
|
1510
1719
|
}),
|
|
1511
|
-
items.map((item) => /* @__PURE__ */
|
|
1720
|
+
items.map((item) => /* @__PURE__ */ jsxs2("div", {
|
|
1512
1721
|
children: [
|
|
1513
|
-
/* @__PURE__ */
|
|
1722
|
+
/* @__PURE__ */ jsx2(Badge, {
|
|
1514
1723
|
variant: TONE_BADGE[item.severity === "error" ? "error" : "warn"],
|
|
1515
1724
|
size: "sm",
|
|
1516
1725
|
children: item.kind
|
|
1517
1726
|
}),
|
|
1518
1727
|
" ",
|
|
1519
|
-
/* @__PURE__ */
|
|
1728
|
+
/* @__PURE__ */ jsx2("span", {
|
|
1520
1729
|
children: item.message
|
|
1521
1730
|
}),
|
|
1522
|
-
item.recipes.map((recipe) => /* @__PURE__ */
|
|
1731
|
+
item.recipes.map((recipe) => /* @__PURE__ */ jsx2(RecipeLine, {
|
|
1523
1732
|
argv: recipe.argv,
|
|
1524
1733
|
label: recipe.label
|
|
1525
1734
|
}, recipe.argv.join(" ")))
|
|
@@ -1530,25 +1739,25 @@ function StaleNotice({ digest, artifact }) {
|
|
|
1530
1739
|
}
|
|
1531
1740
|
function PublishingPanel({ digest, recipes }) {
|
|
1532
1741
|
const windows = publishingDetail(digest);
|
|
1533
|
-
return /* @__PURE__ */
|
|
1742
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
1534
1743
|
"data-testid": "publishing-panel",
|
|
1535
1744
|
children: [
|
|
1536
|
-
windows.map((window2) => /* @__PURE__ */
|
|
1745
|
+
windows.map((window2) => /* @__PURE__ */ jsx2(Card, {
|
|
1537
1746
|
variant: "bordered",
|
|
1538
|
-
children: /* @__PURE__ */
|
|
1747
|
+
children: /* @__PURE__ */ jsxs2(CardBody, {
|
|
1539
1748
|
children: [
|
|
1540
|
-
/* @__PURE__ */
|
|
1749
|
+
/* @__PURE__ */ jsxs2("h2", {
|
|
1541
1750
|
children: [
|
|
1542
1751
|
window2.label,
|
|
1543
1752
|
" ",
|
|
1544
|
-
/* @__PURE__ */
|
|
1753
|
+
/* @__PURE__ */ jsx2(Badge, {
|
|
1545
1754
|
variant: TONE_BADGE[window2.tone] ?? "neutral",
|
|
1546
1755
|
size: "sm",
|
|
1547
1756
|
children: window2.launch
|
|
1548
1757
|
})
|
|
1549
1758
|
]
|
|
1550
1759
|
}),
|
|
1551
|
-
/* @__PURE__ */
|
|
1760
|
+
/* @__PURE__ */ jsxs2("p", {
|
|
1552
1761
|
className: "kk-board-state",
|
|
1553
1762
|
children: [
|
|
1554
1763
|
"outcome ",
|
|
@@ -1557,7 +1766,7 @@ function PublishingPanel({ digest, recipes }) {
|
|
|
1557
1766
|
window2.runId === null ? "" : ` · run ${window2.runId}`
|
|
1558
1767
|
]
|
|
1559
1768
|
}),
|
|
1560
|
-
/* @__PURE__ */
|
|
1769
|
+
/* @__PURE__ */ jsxs2("p", {
|
|
1561
1770
|
className: "kk-board-state",
|
|
1562
1771
|
"data-testid": "window-provenance",
|
|
1563
1772
|
children: [
|
|
@@ -1566,77 +1775,77 @@ function PublishingPanel({ digest, recipes }) {
|
|
|
1566
1775
|
window2.provenance.map((row) => `${row.label} ${provenanceWord(row.matched)}`).join(" · ")
|
|
1567
1776
|
]
|
|
1568
1777
|
}),
|
|
1569
|
-
window2.rows.length === 0 ? /* @__PURE__ */
|
|
1778
|
+
window2.rows.length === 0 ? /* @__PURE__ */ jsx2(EmptyState, {
|
|
1570
1779
|
children: window2.notRun ? "This window recorded no plan and no launch receipt." : "This window planned no target."
|
|
1571
|
-
}) : /* @__PURE__ */
|
|
1780
|
+
}) : /* @__PURE__ */ jsxs2("table", {
|
|
1572
1781
|
className: "kk-board-matrix",
|
|
1573
1782
|
"data-testid": "target-matrix",
|
|
1574
1783
|
children: [
|
|
1575
|
-
/* @__PURE__ */
|
|
1576
|
-
children: /* @__PURE__ */
|
|
1784
|
+
/* @__PURE__ */ jsx2("thead", {
|
|
1785
|
+
children: /* @__PURE__ */ jsxs2("tr", {
|
|
1577
1786
|
children: [
|
|
1578
|
-
/* @__PURE__ */
|
|
1787
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1579
1788
|
children: "target"
|
|
1580
1789
|
}),
|
|
1581
|
-
/* @__PURE__ */
|
|
1790
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1582
1791
|
children: "tier"
|
|
1583
1792
|
}),
|
|
1584
|
-
/* @__PURE__ */
|
|
1793
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1585
1794
|
children: "mode"
|
|
1586
1795
|
}),
|
|
1587
|
-
/* @__PURE__ */
|
|
1796
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1588
1797
|
children: "status"
|
|
1589
1798
|
}),
|
|
1590
|
-
/* @__PURE__ */
|
|
1799
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1591
1800
|
children: "effect"
|
|
1592
1801
|
}),
|
|
1593
|
-
/* @__PURE__ */
|
|
1802
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1594
1803
|
children: "url"
|
|
1595
1804
|
}),
|
|
1596
|
-
/* @__PURE__ */
|
|
1805
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1597
1806
|
children: "error"
|
|
1598
1807
|
}),
|
|
1599
|
-
/* @__PURE__ */
|
|
1808
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1600
1809
|
children: "evidence"
|
|
1601
1810
|
})
|
|
1602
1811
|
]
|
|
1603
1812
|
})
|
|
1604
1813
|
}),
|
|
1605
|
-
/* @__PURE__ */
|
|
1606
|
-
children: window2.rows.map((row) => /* @__PURE__ */
|
|
1814
|
+
/* @__PURE__ */ jsx2("tbody", {
|
|
1815
|
+
children: window2.rows.map((row) => /* @__PURE__ */ jsxs2("tr", {
|
|
1607
1816
|
children: [
|
|
1608
|
-
/* @__PURE__ */
|
|
1817
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1609
1818
|
children: row.id
|
|
1610
1819
|
}),
|
|
1611
|
-
/* @__PURE__ */
|
|
1820
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1612
1821
|
children: row.tier
|
|
1613
1822
|
}),
|
|
1614
|
-
/* @__PURE__ */
|
|
1823
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1615
1824
|
children: row.mode
|
|
1616
1825
|
}),
|
|
1617
|
-
/* @__PURE__ */
|
|
1618
|
-
children: /* @__PURE__ */
|
|
1826
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1827
|
+
children: /* @__PURE__ */ jsx2(Badge, {
|
|
1619
1828
|
variant: TONE_BADGE[row.tone] ?? "neutral",
|
|
1620
1829
|
size: "sm",
|
|
1621
1830
|
children: row.status
|
|
1622
1831
|
})
|
|
1623
1832
|
}),
|
|
1624
|
-
/* @__PURE__ */
|
|
1833
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1625
1834
|
children: row.effect
|
|
1626
1835
|
}),
|
|
1627
|
-
/* @__PURE__ */
|
|
1628
|
-
children: row.url === null ? "—" : /* @__PURE__ */
|
|
1836
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1837
|
+
children: row.url === null ? "—" : /* @__PURE__ */ jsx2("a", {
|
|
1629
1838
|
href: row.url,
|
|
1630
1839
|
rel: "noreferrer noopener",
|
|
1631
1840
|
target: "_blank",
|
|
1632
1841
|
children: row.url
|
|
1633
1842
|
})
|
|
1634
1843
|
}),
|
|
1635
|
-
/* @__PURE__ */
|
|
1844
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1636
1845
|
children: row.error === "" ? "—" : row.error
|
|
1637
1846
|
}),
|
|
1638
|
-
/* @__PURE__ */
|
|
1639
|
-
children: /* @__PURE__ */
|
|
1847
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1848
|
+
children: /* @__PURE__ */ jsx2("code", {
|
|
1640
1849
|
children: row.evidence
|
|
1641
1850
|
})
|
|
1642
1851
|
})
|
|
@@ -1645,7 +1854,7 @@ function PublishingPanel({ digest, recipes }) {
|
|
|
1645
1854
|
})
|
|
1646
1855
|
]
|
|
1647
1856
|
}),
|
|
1648
|
-
recipes(window2.window).map((recipe) => /* @__PURE__ */
|
|
1857
|
+
recipes(window2.window).map((recipe) => /* @__PURE__ */ jsx2(RecipeLine, {
|
|
1649
1858
|
argv: recipe.argv,
|
|
1650
1859
|
label: recipe.label,
|
|
1651
1860
|
dryRun: recipe.dryRunArgv
|
|
@@ -1653,7 +1862,7 @@ function PublishingPanel({ digest, recipes }) {
|
|
|
1653
1862
|
]
|
|
1654
1863
|
})
|
|
1655
1864
|
}, window2.window)),
|
|
1656
|
-
/* @__PURE__ */
|
|
1865
|
+
/* @__PURE__ */ jsx2("p", {
|
|
1657
1866
|
className: "kk-board-state",
|
|
1658
1867
|
children: "Receipts and plans are text, never links. Only a public http(s) result URL becomes a link."
|
|
1659
1868
|
})
|
|
@@ -1668,64 +1877,64 @@ function HistoryPanel({
|
|
|
1668
1877
|
const rows = historyRows(days);
|
|
1669
1878
|
const trend = durationTrend(days);
|
|
1670
1879
|
if (rows.length === 0) {
|
|
1671
|
-
return /* @__PURE__ */
|
|
1880
|
+
return /* @__PURE__ */ jsx2(EmptyState, {
|
|
1672
1881
|
testId: "history-empty",
|
|
1673
1882
|
children: "No recorded day in the selected range."
|
|
1674
1883
|
});
|
|
1675
1884
|
}
|
|
1676
|
-
return /* @__PURE__ */
|
|
1885
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
1677
1886
|
"data-testid": "history-panel",
|
|
1678
1887
|
children: [
|
|
1679
|
-
/* @__PURE__ */
|
|
1888
|
+
/* @__PURE__ */ jsxs2("table", {
|
|
1680
1889
|
className: "kk-board-history",
|
|
1681
1890
|
children: [
|
|
1682
|
-
/* @__PURE__ */
|
|
1683
|
-
children: /* @__PURE__ */
|
|
1891
|
+
/* @__PURE__ */ jsx2("thead", {
|
|
1892
|
+
children: /* @__PURE__ */ jsxs2("tr", {
|
|
1684
1893
|
children: [
|
|
1685
|
-
/* @__PURE__ */
|
|
1894
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1686
1895
|
children: "day"
|
|
1687
1896
|
}),
|
|
1688
|
-
/* @__PURE__ */
|
|
1897
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1689
1898
|
children: "status"
|
|
1690
1899
|
}),
|
|
1691
|
-
/* @__PURE__ */
|
|
1900
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1692
1901
|
children: "run"
|
|
1693
1902
|
}),
|
|
1694
|
-
/* @__PURE__ */
|
|
1903
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1695
1904
|
children: "windows"
|
|
1696
1905
|
}),
|
|
1697
|
-
/* @__PURE__ */
|
|
1906
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1698
1907
|
children: "generation time"
|
|
1699
1908
|
})
|
|
1700
1909
|
]
|
|
1701
1910
|
})
|
|
1702
1911
|
}),
|
|
1703
|
-
/* @__PURE__ */
|
|
1704
|
-
children: rows.map((row) => /* @__PURE__ */
|
|
1912
|
+
/* @__PURE__ */ jsx2("tbody", {
|
|
1913
|
+
children: rows.map((row) => /* @__PURE__ */ jsxs2("tr", {
|
|
1705
1914
|
className: row.day === selected ? "kk-board-selected" : undefined,
|
|
1706
1915
|
children: [
|
|
1707
|
-
/* @__PURE__ */
|
|
1708
|
-
children: /* @__PURE__ */
|
|
1916
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1917
|
+
children: /* @__PURE__ */ jsx2(Button, {
|
|
1709
1918
|
variant: "ghost",
|
|
1710
1919
|
size: "xs",
|
|
1711
1920
|
onClick: () => onSelect(row.day),
|
|
1712
1921
|
children: row.day
|
|
1713
1922
|
})
|
|
1714
1923
|
}),
|
|
1715
|
-
/* @__PURE__ */
|
|
1716
|
-
children: /* @__PURE__ */
|
|
1924
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1925
|
+
children: /* @__PURE__ */ jsx2(Badge, {
|
|
1717
1926
|
variant: TONE_BADGE[row.tone] ?? "neutral",
|
|
1718
1927
|
size: "sm",
|
|
1719
1928
|
children: row.word
|
|
1720
1929
|
})
|
|
1721
1930
|
}),
|
|
1722
|
-
/* @__PURE__ */
|
|
1931
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1723
1932
|
children: row.runId ?? "unknown"
|
|
1724
1933
|
}),
|
|
1725
|
-
/* @__PURE__ */
|
|
1934
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1726
1935
|
children: row.windows.length === 0 ? "none" : row.windows.map((window2) => `${window2.window}: ${window2.launch}`).join(", ")
|
|
1727
1936
|
}),
|
|
1728
|
-
/* @__PURE__ */
|
|
1937
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1729
1938
|
children: formatDuration(row.totalMs)
|
|
1730
1939
|
})
|
|
1731
1940
|
]
|
|
@@ -1733,38 +1942,38 @@ function HistoryPanel({
|
|
|
1733
1942
|
})
|
|
1734
1943
|
]
|
|
1735
1944
|
}),
|
|
1736
|
-
/* @__PURE__ */
|
|
1945
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
1737
1946
|
children: "Per-node duration trend"
|
|
1738
1947
|
}),
|
|
1739
|
-
/* @__PURE__ */
|
|
1948
|
+
/* @__PURE__ */ jsxs2("table", {
|
|
1740
1949
|
className: "kk-board-trend",
|
|
1741
1950
|
"data-testid": "duration-trend",
|
|
1742
1951
|
children: [
|
|
1743
|
-
/* @__PURE__ */
|
|
1744
|
-
children: /* @__PURE__ */
|
|
1952
|
+
/* @__PURE__ */ jsx2("thead", {
|
|
1953
|
+
children: /* @__PURE__ */ jsxs2("tr", {
|
|
1745
1954
|
children: [
|
|
1746
|
-
/* @__PURE__ */
|
|
1955
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1747
1956
|
children: "step"
|
|
1748
1957
|
}),
|
|
1749
|
-
/* @__PURE__ */
|
|
1958
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1750
1959
|
children: "latest"
|
|
1751
1960
|
}),
|
|
1752
|
-
/* @__PURE__ */
|
|
1961
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1753
1962
|
children: "days"
|
|
1754
1963
|
})
|
|
1755
1964
|
]
|
|
1756
1965
|
})
|
|
1757
1966
|
}),
|
|
1758
|
-
/* @__PURE__ */
|
|
1759
|
-
children: trend.map((series) => /* @__PURE__ */
|
|
1967
|
+
/* @__PURE__ */ jsx2("tbody", {
|
|
1968
|
+
children: trend.map((series) => /* @__PURE__ */ jsxs2("tr", {
|
|
1760
1969
|
children: [
|
|
1761
|
-
/* @__PURE__ */
|
|
1970
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1762
1971
|
children: series.step
|
|
1763
1972
|
}),
|
|
1764
|
-
/* @__PURE__ */
|
|
1973
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1765
1974
|
children: formatDuration(series.latestMs)
|
|
1766
1975
|
}),
|
|
1767
|
-
/* @__PURE__ */
|
|
1976
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1768
1977
|
children: series.points.map((point) => `${point.day}: ${formatDuration(point.ms)}`).join(" · ")
|
|
1769
1978
|
})
|
|
1770
1979
|
]
|
|
@@ -1781,9 +1990,9 @@ function ActionLauncher({
|
|
|
1781
1990
|
day,
|
|
1782
1991
|
onLaunched
|
|
1783
1992
|
}) {
|
|
1784
|
-
const [preview, setPreview] =
|
|
1785
|
-
const [confirm, setConfirm] =
|
|
1786
|
-
const [state, setState] =
|
|
1993
|
+
const [preview, setPreview] = useState2(null);
|
|
1994
|
+
const [confirm, setConfirm] = useState2("");
|
|
1995
|
+
const [state, setState] = useState2(null);
|
|
1787
1996
|
const post = async (body) => {
|
|
1788
1997
|
const answer = await client.action(recipe.kind, body);
|
|
1789
1998
|
const payload = answer.body ?? {};
|
|
@@ -1803,36 +2012,36 @@ function ActionLauncher({
|
|
|
1803
2012
|
});
|
|
1804
2013
|
setState(null);
|
|
1805
2014
|
};
|
|
1806
|
-
return /* @__PURE__ */
|
|
2015
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
1807
2016
|
className: "kk-board-action",
|
|
1808
2017
|
children: [
|
|
1809
|
-
preview === null ? /* @__PURE__ */
|
|
2018
|
+
preview === null ? /* @__PURE__ */ jsx2(Button, {
|
|
1810
2019
|
variant: "ghost",
|
|
1811
2020
|
size: "xs",
|
|
1812
2021
|
onClick: () => void post({ params: recipe.params }),
|
|
1813
2022
|
children: "preview"
|
|
1814
|
-
}) : /* @__PURE__ */
|
|
2023
|
+
}) : /* @__PURE__ */ jsxs2(Fragment, {
|
|
1815
2024
|
children: [
|
|
1816
|
-
/* @__PURE__ */
|
|
2025
|
+
/* @__PURE__ */ jsx2("code", {
|
|
1817
2026
|
"data-testid": "action-preview-argv",
|
|
1818
2027
|
children: preview.argv.join(" ")
|
|
1819
2028
|
}),
|
|
1820
|
-
preview.dryRun === null ? null : /* @__PURE__ */
|
|
2029
|
+
preview.dryRun === null ? null : /* @__PURE__ */ jsx2("pre", {
|
|
1821
2030
|
className: "kk-board-state",
|
|
1822
2031
|
children: preview.dryRun
|
|
1823
2032
|
}),
|
|
1824
|
-
recipe.live ? /* @__PURE__ */
|
|
2033
|
+
recipe.live ? /* @__PURE__ */ jsxs2("label", {
|
|
1825
2034
|
children: [
|
|
1826
2035
|
"type ",
|
|
1827
2036
|
day,
|
|
1828
2037
|
" to send live",
|
|
1829
|
-
/* @__PURE__ */
|
|
2038
|
+
/* @__PURE__ */ jsx2("input", {
|
|
1830
2039
|
value: confirm,
|
|
1831
2040
|
onChange: (event) => setConfirm(event.target.value)
|
|
1832
2041
|
})
|
|
1833
2042
|
]
|
|
1834
2043
|
}) : null,
|
|
1835
|
-
/* @__PURE__ */
|
|
2044
|
+
/* @__PURE__ */ jsx2(Button, {
|
|
1836
2045
|
variant: "primary",
|
|
1837
2046
|
size: "xs",
|
|
1838
2047
|
onClick: () => void post({
|
|
@@ -1844,7 +2053,7 @@ function ActionLauncher({
|
|
|
1844
2053
|
})
|
|
1845
2054
|
]
|
|
1846
2055
|
}),
|
|
1847
|
-
state === null ? null : /* @__PURE__ */
|
|
2056
|
+
state === null ? null : /* @__PURE__ */ jsx2("span", {
|
|
1848
2057
|
className: "kk-board-state",
|
|
1849
2058
|
children: state
|
|
1850
2059
|
})
|
|
@@ -1859,26 +2068,26 @@ function ActionsPanel({
|
|
|
1859
2068
|
}) {
|
|
1860
2069
|
const rows = actionLogRows(digest);
|
|
1861
2070
|
const enabled = actionPlaneEnabled(digest);
|
|
1862
|
-
return /* @__PURE__ */
|
|
2071
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
1863
2072
|
"data-testid": "actions-panel",
|
|
1864
2073
|
children: [
|
|
1865
|
-
enabled ? null : /* @__PURE__ */
|
|
2074
|
+
enabled ? null : /* @__PURE__ */ jsx2(Diagnostic2, {
|
|
1866
2075
|
title: "Actions are disabled — recipes only",
|
|
1867
2076
|
detail: "Set board.actions.enabled: true in ~/.config/kk/config.yaml, then restart the reader, to launch from here.",
|
|
1868
2077
|
hint: "Every launch is previewed, confirmed with a single-use token and audited; nothing is sent silently."
|
|
1869
2078
|
}),
|
|
1870
|
-
recipes.length === 0 ? /* @__PURE__ */
|
|
2079
|
+
recipes.length === 0 ? /* @__PURE__ */ jsx2(EmptyState, {
|
|
1871
2080
|
children: "This day offered no recipe."
|
|
1872
|
-
}) : /* @__PURE__ */
|
|
2081
|
+
}) : /* @__PURE__ */ jsx2("ul", {
|
|
1873
2082
|
"data-testid": "action-recipes",
|
|
1874
|
-
children: recipes.map((recipe) => /* @__PURE__ */
|
|
2083
|
+
children: recipes.map((recipe) => /* @__PURE__ */ jsxs2("li", {
|
|
1875
2084
|
children: [
|
|
1876
|
-
/* @__PURE__ */
|
|
2085
|
+
/* @__PURE__ */ jsx2(RecipeLine, {
|
|
1877
2086
|
argv: recipe.argv,
|
|
1878
2087
|
label: recipe.label,
|
|
1879
2088
|
dryRun: recipe.dryRunArgv
|
|
1880
2089
|
}),
|
|
1881
|
-
enabled ? /* @__PURE__ */
|
|
2090
|
+
enabled ? /* @__PURE__ */ jsx2(ActionLauncher, {
|
|
1882
2091
|
client,
|
|
1883
2092
|
recipe,
|
|
1884
2093
|
day: digest.day,
|
|
@@ -1887,60 +2096,60 @@ function ActionsPanel({
|
|
|
1887
2096
|
]
|
|
1888
2097
|
}, `${recipe.kind}:${recipe.argv.join(" ")}`))
|
|
1889
2098
|
}),
|
|
1890
|
-
/* @__PURE__ */
|
|
2099
|
+
/* @__PURE__ */ jsx2("h2", {
|
|
1891
2100
|
children: "Recorded actions"
|
|
1892
2101
|
}),
|
|
1893
|
-
rows.length === 0 ? /* @__PURE__ */
|
|
2102
|
+
rows.length === 0 ? /* @__PURE__ */ jsx2(EmptyState, {
|
|
1894
2103
|
testId: "actions-empty",
|
|
1895
2104
|
children: "No action was recorded for this day."
|
|
1896
|
-
}) : /* @__PURE__ */
|
|
2105
|
+
}) : /* @__PURE__ */ jsxs2("table", {
|
|
1897
2106
|
className: "kk-board-action-log",
|
|
1898
2107
|
"data-testid": "actions-log",
|
|
1899
2108
|
children: [
|
|
1900
|
-
/* @__PURE__ */
|
|
1901
|
-
children: /* @__PURE__ */
|
|
2109
|
+
/* @__PURE__ */ jsx2("thead", {
|
|
2110
|
+
children: /* @__PURE__ */ jsxs2("tr", {
|
|
1902
2111
|
children: [
|
|
1903
|
-
/* @__PURE__ */
|
|
2112
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1904
2113
|
children: "when"
|
|
1905
2114
|
}),
|
|
1906
|
-
/* @__PURE__ */
|
|
2115
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1907
2116
|
children: "kind"
|
|
1908
2117
|
}),
|
|
1909
|
-
/* @__PURE__ */
|
|
2118
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1910
2119
|
children: "result"
|
|
1911
2120
|
}),
|
|
1912
|
-
/* @__PURE__ */
|
|
2121
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1913
2122
|
children: "argv"
|
|
1914
2123
|
}),
|
|
1915
|
-
/* @__PURE__ */
|
|
2124
|
+
/* @__PURE__ */ jsx2("th", {
|
|
1916
2125
|
children: "run"
|
|
1917
2126
|
})
|
|
1918
2127
|
]
|
|
1919
2128
|
})
|
|
1920
2129
|
}),
|
|
1921
|
-
/* @__PURE__ */
|
|
1922
|
-
children: rows.map((row) => /* @__PURE__ */
|
|
2130
|
+
/* @__PURE__ */ jsx2("tbody", {
|
|
2131
|
+
children: rows.map((row) => /* @__PURE__ */ jsxs2("tr", {
|
|
1923
2132
|
children: [
|
|
1924
|
-
/* @__PURE__ */
|
|
2133
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1925
2134
|
children: formatTimestamp(row.ts)
|
|
1926
2135
|
}),
|
|
1927
|
-
/* @__PURE__ */
|
|
2136
|
+
/* @__PURE__ */ jsx2("td", {
|
|
1928
2137
|
children: row.kind
|
|
1929
2138
|
}),
|
|
1930
|
-
/* @__PURE__ */
|
|
1931
|
-
children: /* @__PURE__ */
|
|
2139
|
+
/* @__PURE__ */ jsx2("td", {
|
|
2140
|
+
children: /* @__PURE__ */ jsx2(Badge, {
|
|
1932
2141
|
variant: TONE_BADGE[row.tone] ?? "neutral",
|
|
1933
2142
|
size: "sm",
|
|
1934
2143
|
children: row.word
|
|
1935
2144
|
})
|
|
1936
2145
|
}),
|
|
1937
|
-
/* @__PURE__ */
|
|
1938
|
-
children: /* @__PURE__ */
|
|
2146
|
+
/* @__PURE__ */ jsx2("td", {
|
|
2147
|
+
children: /* @__PURE__ */ jsx2("code", {
|
|
1939
2148
|
children: row.argv
|
|
1940
2149
|
})
|
|
1941
2150
|
}),
|
|
1942
|
-
/* @__PURE__ */
|
|
1943
|
-
children: row.runId === null ? "—" : /* @__PURE__ */
|
|
2151
|
+
/* @__PURE__ */ jsx2("td", {
|
|
2152
|
+
children: row.runId === null ? "—" : /* @__PURE__ */ jsx2("code", {
|
|
1944
2153
|
children: row.runId
|
|
1945
2154
|
})
|
|
1946
2155
|
})
|
|
@@ -1954,9 +2163,9 @@ function ActionsPanel({
|
|
|
1954
2163
|
}
|
|
1955
2164
|
function DailyVoiceModule() {
|
|
1956
2165
|
const clientRef = useRef(null);
|
|
1957
|
-
const [location, setLocation] =
|
|
1958
|
-
const [state, setState] =
|
|
1959
|
-
const [fetchedAt, setFetchedAt] =
|
|
2166
|
+
const [location, setLocation] = useState2(() => parseConsoleHash(globalThis.location?.hash ?? ""));
|
|
2167
|
+
const [state, setState] = useState2(INITIAL);
|
|
2168
|
+
const [fetchedAt, setFetchedAt] = useState2(null);
|
|
1960
2169
|
if (clientRef.current === null) {
|
|
1961
2170
|
clientRef.current = createBoardClient({
|
|
1962
2171
|
moduleId: "kk-daily-ai-voice2",
|
|
@@ -1990,10 +2199,10 @@ function DailyVoiceModule() {
|
|
|
1990
2199
|
}));
|
|
1991
2200
|
}
|
|
1992
2201
|
}, [location.day]);
|
|
1993
|
-
|
|
2202
|
+
useEffect2(() => {
|
|
1994
2203
|
load();
|
|
1995
2204
|
}, [load]);
|
|
1996
|
-
|
|
2205
|
+
useEffect2(() => {
|
|
1997
2206
|
const next = consoleHash(location.day, location.tab);
|
|
1998
2207
|
if (globalThis.location !== undefined && globalThis.location.hash !== next) {
|
|
1999
2208
|
globalThis.location.hash = next;
|
|
@@ -2002,35 +2211,35 @@ function DailyVoiceModule() {
|
|
|
2002
2211
|
const recipesFor = useCallback((subject) => state.digest === null ? [] : state.digest.attention.filter((item) => item.subject === subject).flatMap((item) => item.recipes), [state.digest]);
|
|
2003
2212
|
const setTab = (tab) => setLocation((prior) => ({ ...prior, tab }));
|
|
2004
2213
|
const setDay = (day) => setLocation({ day, tab: "today" });
|
|
2005
|
-
const header = /* @__PURE__ */
|
|
2006
|
-
icon: /* @__PURE__ */
|
|
2214
|
+
const header = /* @__PURE__ */ jsx2(ModuleHeader, {
|
|
2215
|
+
icon: /* @__PURE__ */ jsx2("span", {
|
|
2007
2216
|
"aria-hidden": "true",
|
|
2008
2217
|
children: "◉"
|
|
2009
2218
|
}),
|
|
2010
2219
|
title: "Daily AI Voice",
|
|
2011
2220
|
subtitle: "One day, one episode: generation, publish windows, safety and what needs you.",
|
|
2012
|
-
status: state.digest === null ? null : /* @__PURE__ */
|
|
2221
|
+
status: state.digest === null ? null : /* @__PURE__ */ jsx2(Badge, {
|
|
2013
2222
|
variant: TONE_BADGE[generationFacts(state.digest)[0]?.tone ?? "neutral"],
|
|
2014
2223
|
size: "sm",
|
|
2015
2224
|
children: generationFacts(state.digest)[0]?.value ?? "unknown"
|
|
2016
2225
|
}),
|
|
2017
|
-
filters: /* @__PURE__ */
|
|
2226
|
+
filters: /* @__PURE__ */ jsxs2("div", {
|
|
2018
2227
|
className: "kk-board-day-picker",
|
|
2019
2228
|
children: [
|
|
2020
|
-
/* @__PURE__ */
|
|
2229
|
+
/* @__PURE__ */ jsx2("label", {
|
|
2021
2230
|
htmlFor: `${CONSOLE_TABS_ID}-day`,
|
|
2022
2231
|
children: "day"
|
|
2023
2232
|
}),
|
|
2024
|
-
/* @__PURE__ */
|
|
2233
|
+
/* @__PURE__ */ jsxs2("select", {
|
|
2025
2234
|
id: `${CONSOLE_TABS_ID}-day`,
|
|
2026
2235
|
value: location.day ?? "",
|
|
2027
2236
|
onChange: (event) => setDay(event.target.value),
|
|
2028
2237
|
children: [
|
|
2029
|
-
state.days.length === 0 && location.day !== null ? /* @__PURE__ */
|
|
2238
|
+
state.days.length === 0 && location.day !== null ? /* @__PURE__ */ jsx2("option", {
|
|
2030
2239
|
value: location.day,
|
|
2031
2240
|
children: location.day
|
|
2032
2241
|
}) : null,
|
|
2033
|
-
state.days.map((day) => /* @__PURE__ */
|
|
2242
|
+
state.days.map((day) => /* @__PURE__ */ jsxs2("option", {
|
|
2034
2243
|
value: day.day,
|
|
2035
2244
|
children: [
|
|
2036
2245
|
day.day,
|
|
@@ -2040,7 +2249,7 @@ function DailyVoiceModule() {
|
|
|
2040
2249
|
}, day.day))
|
|
2041
2250
|
]
|
|
2042
2251
|
}),
|
|
2043
|
-
/* @__PURE__ */
|
|
2252
|
+
/* @__PURE__ */ jsx2(Button, {
|
|
2044
2253
|
variant: "ghost",
|
|
2045
2254
|
size: "xs",
|
|
2046
2255
|
onClick: () => void load(),
|
|
@@ -2048,7 +2257,7 @@ function DailyVoiceModule() {
|
|
|
2048
2257
|
})
|
|
2049
2258
|
]
|
|
2050
2259
|
}),
|
|
2051
|
-
tabs: /* @__PURE__ */
|
|
2260
|
+
tabs: /* @__PURE__ */ jsx2(ModuleTabs, {
|
|
2052
2261
|
tabs: CONSOLE_TABS.map((id) => ({ id, label: CONSOLE_TAB_LABELS[id] })),
|
|
2053
2262
|
value: location.tab,
|
|
2054
2263
|
onChange: (id) => setTab(id),
|
|
@@ -2056,59 +2265,59 @@ function DailyVoiceModule() {
|
|
|
2056
2265
|
idPrefix: CONSOLE_TABS_ID
|
|
2057
2266
|
})
|
|
2058
2267
|
});
|
|
2059
|
-
return /* @__PURE__ */
|
|
2268
|
+
return /* @__PURE__ */ jsx2("div", {
|
|
2060
2269
|
className: "kk-board kk-board-daily-voice",
|
|
2061
|
-
children: /* @__PURE__ */
|
|
2270
|
+
children: /* @__PURE__ */ jsxs2(ModuleShell, {
|
|
2062
2271
|
children: [
|
|
2063
2272
|
header,
|
|
2064
|
-
state.error === null ? null : /* @__PURE__ */
|
|
2273
|
+
state.error === null ? null : /* @__PURE__ */ jsx2(Diagnostic2, {
|
|
2065
2274
|
title: "The day could not be read",
|
|
2066
2275
|
detail: state.error,
|
|
2067
2276
|
code: state.searchedPath === null ? undefined : `day ${state.searchedPath}`,
|
|
2068
2277
|
hint: "A day with no directory answers 404 and names the path it looked up."
|
|
2069
2278
|
}),
|
|
2070
|
-
state.loading ? /* @__PURE__ */
|
|
2279
|
+
state.loading ? /* @__PURE__ */ jsx2(Loading, {
|
|
2071
2280
|
size: "sm"
|
|
2072
2281
|
}) : null,
|
|
2073
|
-
/* @__PURE__ */
|
|
2282
|
+
/* @__PURE__ */ jsx2("div", {
|
|
2074
2283
|
role: "tabpanel",
|
|
2075
2284
|
id: `${CONSOLE_TABS_ID}-panel-${location.tab}`,
|
|
2076
|
-
children: state.digest === null ? state.loading ? null : /* @__PURE__ */
|
|
2285
|
+
children: state.digest === null ? state.loading ? null : /* @__PURE__ */ jsx2(EmptyState, {
|
|
2077
2286
|
testId: "no-day",
|
|
2078
2287
|
children: "No day is selected. Pick one from the day picker, or open History."
|
|
2079
|
-
}) : location.tab === "today" ? /* @__PURE__ */
|
|
2288
|
+
}) : location.tab === "today" ? /* @__PURE__ */ jsx2(TodayPanel, {
|
|
2080
2289
|
digest: state.digest,
|
|
2081
2290
|
onRefresh: () => void load(),
|
|
2082
2291
|
fetchedAt
|
|
2083
|
-
}) : location.tab === "generation" ? /* @__PURE__ */
|
|
2292
|
+
}) : location.tab === "generation" ? /* @__PURE__ */ jsx2(GenerationPanel, {
|
|
2084
2293
|
digest: state.digest,
|
|
2085
2294
|
client: clientRef.current,
|
|
2086
2295
|
recipes: recipesFor,
|
|
2087
2296
|
onChanged: () => void load()
|
|
2088
|
-
}) : location.tab === "publishing" ? /* @__PURE__ */
|
|
2297
|
+
}) : location.tab === "publishing" ? /* @__PURE__ */ jsx2(PublishingPanel, {
|
|
2089
2298
|
digest: state.digest,
|
|
2090
2299
|
recipes: recipesFor
|
|
2091
|
-
}) : location.tab === "history" ? /* @__PURE__ */
|
|
2300
|
+
}) : location.tab === "history" ? /* @__PURE__ */ jsx2(HistoryPanel, {
|
|
2092
2301
|
days: state.days,
|
|
2093
2302
|
selected: location.day,
|
|
2094
2303
|
onSelect: setDay
|
|
2095
|
-
}) : /* @__PURE__ */
|
|
2304
|
+
}) : /* @__PURE__ */ jsx2(ActionsPanel, {
|
|
2096
2305
|
digest: state.digest,
|
|
2097
2306
|
client: clientRef.current,
|
|
2098
2307
|
recipes: state.digest.attention.flatMap((item) => item.recipes),
|
|
2099
2308
|
onLaunched: () => void load()
|
|
2100
2309
|
})
|
|
2101
2310
|
}),
|
|
2102
|
-
/* @__PURE__ */
|
|
2311
|
+
/* @__PURE__ */ jsxs2("p", {
|
|
2103
2312
|
className: "kk-board-state",
|
|
2104
2313
|
children: [
|
|
2105
2314
|
"Day projection shared with ",
|
|
2106
|
-
/* @__PURE__ */
|
|
2315
|
+
/* @__PURE__ */ jsx2("code", {
|
|
2107
2316
|
children: "kk news digest"
|
|
2108
2317
|
}),
|
|
2109
2318
|
" ·",
|
|
2110
2319
|
" ",
|
|
2111
|
-
/* @__PURE__ */
|
|
2320
|
+
/* @__PURE__ */ jsx2("a", {
|
|
2112
2321
|
href: withBase("/board/settings/workflows"),
|
|
2113
2322
|
children: "Settings → Workflows"
|
|
2114
2323
|
})
|