@kukeon/console 0.0.0-stage → 0.10.0-edge.g4f69f964
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/dist/assignments-Biqg1AT0.js +257 -0
- package/dist/assignments-tab.d.ts +4 -0
- package/dist/assignments.d.mts +40 -0
- package/dist/auth.d.ts +39 -0
- package/dist/bulk-ui.d.ts +49 -0
- package/dist/bulk.d.mts +14 -0
- package/dist/catalog-B29wwZiy.js +1949 -0
- package/dist/catalog-url-Dr9e92Yq.js +19 -0
- package/dist/catalog-url.d.mts +4 -0
- package/dist/catalog.d.ts +40 -0
- package/dist/cell-filter.d.ts +10 -0
- package/dist/cell-sidebar.d.ts +26 -0
- package/dist/cells.d.mts +29 -0
- package/dist/cgroup-format.d.ts +17 -0
- package/dist/cgroup.d.ts +4 -0
- package/dist/config-form.d.mts +66 -0
- package/dist/connector-ui-CG9kLZ5s.js +2716 -0
- package/dist/connector-ui.d.ts +129 -0
- package/dist/connectors-page-ZyuSRdHC.js +241 -0
- package/dist/connectors-page.d.ts +8 -0
- package/dist/connectors.d.mts +154 -0
- package/dist/container-log.d.ts +11 -0
- package/dist/create.d.ts +11 -0
- package/dist/creation-schema.d.mts +15 -0
- package/dist/daemon-CLdOLhDb.js +394 -0
- package/dist/daemon.d.ts +24 -0
- package/dist/display-name.d.ts +10 -0
- package/dist/drift-diff.d.ts +4 -0
- package/dist/exec.d.ts +15 -0
- package/dist/extensions.d.ts +111 -0
- package/dist/get-started.d.ts +9 -0
- package/dist/health.d.ts +22 -0
- package/dist/identities-page-CyW0d5n2.js +2137 -0
- package/dist/identities-page.d.ts +15 -0
- package/dist/identities.d.mts +24 -0
- package/dist/image-format.d.ts +6 -0
- package/dist/image-inventory.d.ts +12 -0
- package/dist/images.d.ts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5241 -0
- package/dist/initialize-CAOkMhlL.js +146 -0
- package/dist/initialize.d.ts +21 -0
- package/dist/inventory.d.ts +66 -0
- package/dist/lifecycle-policy.d.ts +11 -0
- package/dist/lifecycle.d.ts +24 -0
- package/dist/log-buffer.d.ts +8 -0
- package/dist/main.d.ts +13 -0
- package/dist/majordomo-p7giptj3.js +3782 -0
- package/dist/majordomo.d.ts +102 -0
- package/dist/manage-nav.d.ts +4 -0
- package/dist/manifest-diff.d.mts +11 -0
- package/dist/merged-values-CBzWsNOS.js +739 -0
- package/dist/merged-values.d.ts +24 -0
- package/dist/network-format.d.ts +30 -0
- package/dist/network.d.ts +13 -0
- package/dist/new-agent-BweyzBnY.js +201 -0
- package/dist/new-agent.d.ts +27 -0
- package/dist/new-cell-Iceq2Zfv.js +1985 -0
- package/dist/new-cell.d.ts +29 -0
- package/dist/new-config-C9NSC9Ou.js +1541 -0
- package/dist/new-config.d.ts +7 -0
- package/dist/notifications.d.ts +26 -0
- package/dist/onboarding-oZBJXTy0.js +395 -0
- package/dist/onboarding.d.mts +40 -0
- package/dist/panel-cells.d.mts +8 -0
- package/dist/recording-source.d.ts +37 -0
- package/dist/recording.d.mts +24 -0
- package/dist/registry-credentials.d.ts +13 -0
- package/dist/relationships.d.mts +12 -0
- package/dist/replay.d.ts +14 -0
- package/dist/request.d.ts +16 -0
- package/dist/router.d.ts +12 -0
- package/dist/routes.d.ts +43 -0
- package/dist/schedule-DzQ3Homi.js +113 -0
- package/dist/schedule-format.d.mts +9 -0
- package/dist/schedule.d.ts +16 -0
- package/dist/scope-actions.d.ts +9 -0
- package/dist/screens.d.ts +6 -0
- package/dist/secret-form.d.ts +24 -0
- package/dist/settings-nav.d.ts +5 -0
- package/dist/settings-page.d.ts +4 -0
- package/dist/settings-values.d.mts +18 -0
- package/dist/settings.d.ts +50 -0
- package/dist/sidebar-shell.d.ts +55 -0
- package/dist/sources-page-CxMSM-sz.js +423 -0
- package/dist/sources-page.d.ts +5 -0
- package/dist/space-subnets.d.ts +3 -0
- package/dist/style.css +2 -0
- package/dist/team-form.d.mts +56 -0
- package/dist/team-plan-CFOIv1lN.js +735 -0
- package/dist/team-plan.d.ts +22 -0
- package/dist/team-wizard.d.ts +8 -0
- package/dist/teams-page-C6UGy4Fw.js +2216 -0
- package/dist/teams-page.d.ts +9 -0
- package/dist/teams.d.mts +114 -0
- package/dist/terminal-palette.d.ts +8 -0
- package/dist/terminal.d.ts +98 -0
- package/dist/unread.d.mts +19 -0
- package/dist/use-unread.d.ts +4 -0
- package/dist/user-menu.d.ts +7 -0
- package/dist/views.d.mts +8 -0
- package/dist/workbench.d.ts +16 -0
- package/package.json +45 -4
- package/README.md +0 -3
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
import { F as e, Gn as t, I as n, K as r, Kn as i, Un as a } from "./connector-ui-CG9kLZ5s.js";
|
|
2
|
+
import { f as o, t as s } from "./majordomo-p7giptj3.js";
|
|
3
|
+
import { useCallback as c, useEffect as l, useLayoutEffect as u, useRef as d, useState as f } from "react";
|
|
4
|
+
import { apiFetch as p } from "@kukeon/api-client";
|
|
5
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
6
|
+
// src/log-buffer.js
|
|
7
|
+
var _ = 2e3, v = 1e6;
|
|
8
|
+
function y() {
|
|
9
|
+
return {
|
|
10
|
+
lines: [],
|
|
11
|
+
open: !1,
|
|
12
|
+
omitted: !1,
|
|
13
|
+
next: null,
|
|
14
|
+
size: 0,
|
|
15
|
+
source: ""
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function b(e, t, { replace: n = !1, maxLines: r = _, maxChars: i = v } = {}) {
|
|
19
|
+
let a = n || t.reset, o = a ? [] : [...e.lines], s = !a && e.open, c = a ? !!t.truncated : e.omitted, l = t.data ?? "";
|
|
20
|
+
if (l) {
|
|
21
|
+
let e = l.split("\n"), t = !l.endsWith("\n");
|
|
22
|
+
t || e.pop(), s && o.length && e.length && (o[o.length - 1] += e.shift()), o.push(...e), s = t;
|
|
23
|
+
}
|
|
24
|
+
let u = Math.max(0, o.length - r), d = 0;
|
|
25
|
+
for (let e = o.length - 1; e >= u; e--) if (d += o[e].length + 1, d > i && e < o.length - 1) {
|
|
26
|
+
u = e + 1;
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
return u > 0 && (o.splice(0, u), c = !0), {
|
|
30
|
+
lines: o,
|
|
31
|
+
open: s,
|
|
32
|
+
omitted: c,
|
|
33
|
+
next: t.next ?? e.next,
|
|
34
|
+
size: t.size ?? e.size,
|
|
35
|
+
source: t.source || e.source
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function x(e) {
|
|
39
|
+
return e === "reachable" ? "Reachable" : e === "permission_denied" ? "Permission denied" : e === "unavailable" ? "Unavailable" : e === "daemon_outdated" ? "Daemon outdated" : e === "failed" ? "Check failed" : "Checking…";
|
|
40
|
+
}
|
|
41
|
+
function S(e) {
|
|
42
|
+
return e === "reachable" ? "ok" : e === "daemon_outdated" ? "warning" : e ? "error" : "pending";
|
|
43
|
+
}
|
|
44
|
+
// src/daemon.tsx
|
|
45
|
+
var C = 65536, w = 2e3, T = 8;
|
|
46
|
+
function E(e) {
|
|
47
|
+
return e ? e.startsWith("v") ? e : `v${e}` : "Not reported";
|
|
48
|
+
}
|
|
49
|
+
function D({ status: e }) {
|
|
50
|
+
return /* @__PURE__ */ g("span", {
|
|
51
|
+
className: `state-badge tone-${S(e)}`,
|
|
52
|
+
children: [/* @__PURE__ */ h("span", {
|
|
53
|
+
className: "state-dot",
|
|
54
|
+
"aria-hidden": "true"
|
|
55
|
+
}), x(e)]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function O({ current: t }) {
|
|
59
|
+
return /* @__PURE__ */ g("nav", {
|
|
60
|
+
className: "daemon-tabs",
|
|
61
|
+
"aria-label": "Daemon sections",
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ h("a", {
|
|
64
|
+
href: e(),
|
|
65
|
+
"aria-current": t === "status" ? "page" : void 0,
|
|
66
|
+
children: "Status"
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ h("a", {
|
|
69
|
+
href: n(),
|
|
70
|
+
"aria-current": t === "health" ? "page" : void 0,
|
|
71
|
+
children: "Health"
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ h("a", {
|
|
74
|
+
href: e("logs"),
|
|
75
|
+
"aria-current": t === "logs" ? "page" : void 0,
|
|
76
|
+
children: "Logs"
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ h("a", {
|
|
79
|
+
href: e("connectors"),
|
|
80
|
+
"aria-current": t === "connectors" ? "page" : void 0,
|
|
81
|
+
children: "Connectors"
|
|
82
|
+
})
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function k(e) {
|
|
87
|
+
let t = `connectivity ${x(e.status)}, kukeond version ${e.daemonVersion || "unknown"}, kuke serve version ${e.serverVersion}, response time ${e.latencyMs} ms${e.error ? `, error: ${e.error.message}` : ""}`;
|
|
88
|
+
return o(`About the kukeond daemon at ${e.endpoint} (${t}): diagnose its health with "kuke health" and tell me what needs attention.`);
|
|
89
|
+
}
|
|
90
|
+
function A({ revision: t, inventory: n }) {
|
|
91
|
+
let [o, c] = f(0), l = i("/daemon/health", t + o), u = l.data, d = !!u?.daemonVersion && E(u.daemonVersion) !== E(u.serverVersion);
|
|
92
|
+
return /* @__PURE__ */ g(m, { children: [
|
|
93
|
+
/* @__PURE__ */ h(O, { current: "status" }),
|
|
94
|
+
l.error && /* @__PURE__ */ h(a, {
|
|
95
|
+
error: l.error,
|
|
96
|
+
kind: "Daemon"
|
|
97
|
+
}),
|
|
98
|
+
l.error && u && /* @__PURE__ */ h("p", {
|
|
99
|
+
className: "stale",
|
|
100
|
+
children: "Stale health result — the web server could not be reached."
|
|
101
|
+
}),
|
|
102
|
+
/* @__PURE__ */ g("section", {
|
|
103
|
+
className: "panel daemon-health",
|
|
104
|
+
"aria-label": "Daemon connectivity",
|
|
105
|
+
"aria-busy": l.loading,
|
|
106
|
+
children: [/* @__PURE__ */ g("div", {
|
|
107
|
+
className: "panel-heading",
|
|
108
|
+
children: [/* @__PURE__ */ h("h2", { children: "Connectivity" }), /* @__PURE__ */ g("div", {
|
|
109
|
+
className: "health-report-actions",
|
|
110
|
+
children: [u && /* @__PURE__ */ h(s, {
|
|
111
|
+
prominent: !!u.error,
|
|
112
|
+
question: k(u),
|
|
113
|
+
subject: "the kukeond daemon"
|
|
114
|
+
}), /* @__PURE__ */ h("button", {
|
|
115
|
+
type: "button",
|
|
116
|
+
onClick: () => c((e) => e + 1),
|
|
117
|
+
disabled: l.loading,
|
|
118
|
+
children: l.loading ? "Checking…" : "Check again"
|
|
119
|
+
})]
|
|
120
|
+
})]
|
|
121
|
+
}), /* @__PURE__ */ g("div", {
|
|
122
|
+
className: "panel-body",
|
|
123
|
+
children: [
|
|
124
|
+
/* @__PURE__ */ g("div", {
|
|
125
|
+
className: "status-grid",
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ g("div", {
|
|
128
|
+
className: "status-card",
|
|
129
|
+
children: [/* @__PURE__ */ h("span", { children: "Connectivity" }), /* @__PURE__ */ h(D, { status: l.loading && !u ? void 0 : u?.status ?? (l.error?.code === "unavailable" ? "unavailable" : void 0) })]
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ g("div", {
|
|
132
|
+
className: "status-card",
|
|
133
|
+
children: [
|
|
134
|
+
/* @__PURE__ */ h("span", { children: "kukeond version" }),
|
|
135
|
+
/* @__PURE__ */ h("strong", {
|
|
136
|
+
className: "mono-id",
|
|
137
|
+
children: u?.status === "reachable" ? E(u.daemonVersion) : "Unknown"
|
|
138
|
+
}),
|
|
139
|
+
d && /* @__PURE__ */ h("small", { children: "Differs from kuke serve" })
|
|
140
|
+
]
|
|
141
|
+
}),
|
|
142
|
+
/* @__PURE__ */ g("div", {
|
|
143
|
+
className: "status-card",
|
|
144
|
+
children: [/* @__PURE__ */ h("span", { children: "kuke serve version" }), /* @__PURE__ */ h("strong", {
|
|
145
|
+
className: "mono-id",
|
|
146
|
+
children: E(u?.serverVersion)
|
|
147
|
+
})]
|
|
148
|
+
}),
|
|
149
|
+
/* @__PURE__ */ g("div", {
|
|
150
|
+
className: "status-card",
|
|
151
|
+
children: [/* @__PURE__ */ h("span", { children: "Response time" }), /* @__PURE__ */ h("strong", { children: u ? `${u.latencyMs} ms` : "—" })]
|
|
152
|
+
})
|
|
153
|
+
]
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ g("dl", {
|
|
156
|
+
className: "details-grid daemon-details",
|
|
157
|
+
children: [
|
|
158
|
+
/* @__PURE__ */ h("dt", { children: "Socket" }),
|
|
159
|
+
/* @__PURE__ */ h("dd", { children: /* @__PURE__ */ h("code", { children: u?.endpoint ?? "Loading…" }) }),
|
|
160
|
+
/* @__PURE__ */ h("dt", { children: "Last checked" }),
|
|
161
|
+
/* @__PURE__ */ h("dd", { children: u?.checkedAt ? /* @__PURE__ */ h("time", {
|
|
162
|
+
dateTime: u.checkedAt,
|
|
163
|
+
children: new Date(u.checkedAt).toLocaleString()
|
|
164
|
+
}) : "Not checked yet" }),
|
|
165
|
+
/* @__PURE__ */ h("dt", { children: "Inventory refreshed" }),
|
|
166
|
+
/* @__PURE__ */ g("dd", { children: [n.data ? /* @__PURE__ */ h("time", {
|
|
167
|
+
dateTime: n.data.updatedAt,
|
|
168
|
+
children: new Date(n.data.updatedAt).toLocaleString()
|
|
169
|
+
}) : n.loading ? "Refreshing…" : "Not refreshed", (n.error || !!n.data?.failures.length) && /* @__PURE__ */ h("span", {
|
|
170
|
+
className: "stale",
|
|
171
|
+
children: " · incomplete or stale"
|
|
172
|
+
})] })
|
|
173
|
+
]
|
|
174
|
+
}),
|
|
175
|
+
u?.error && /* @__PURE__ */ g("div", {
|
|
176
|
+
className: "error",
|
|
177
|
+
role: "alert",
|
|
178
|
+
children: [
|
|
179
|
+
/* @__PURE__ */ h("strong", { children: x(u.status) }),
|
|
180
|
+
/* @__PURE__ */ h("p", { children: u.error.message }),
|
|
181
|
+
/* @__PURE__ */ h("p", { children: u.status === "permission_denied" ? "Run kuke serve as a user that can open the daemon socket (for example, a member of the kukeon group)." : u.status === "daemon_outdated" ? "Upgrade kukeond to match this kuke serve build." : u.status === "unavailable" ? "Check that kukeond is running (kuke daemon start) and that the selected socket is correct." : "kukeond answered but the check did not succeed; see the daemon logs." })
|
|
182
|
+
]
|
|
183
|
+
})
|
|
184
|
+
]
|
|
185
|
+
})]
|
|
186
|
+
}),
|
|
187
|
+
/* @__PURE__ */ g("section", {
|
|
188
|
+
className: "panel",
|
|
189
|
+
"aria-label": "Health scope",
|
|
190
|
+
children: [/* @__PURE__ */ h("div", {
|
|
191
|
+
className: "panel-heading",
|
|
192
|
+
children: /* @__PURE__ */ h("h2", { children: "What this check covers" })
|
|
193
|
+
}), /* @__PURE__ */ h("div", {
|
|
194
|
+
className: "panel-body",
|
|
195
|
+
children: /* @__PURE__ */ g("p", {
|
|
196
|
+
className: "description",
|
|
197
|
+
children: [
|
|
198
|
+
"Connectivity means kukeond answered a ping on the selected socket using this server's permissions. It does not report the health of cells, containers, cgroups, networking or other subsystems. Review cell states in ",
|
|
199
|
+
/* @__PURE__ */ h("a", {
|
|
200
|
+
className: "text-link",
|
|
201
|
+
href: r(),
|
|
202
|
+
children: "Overview"
|
|
203
|
+
}),
|
|
204
|
+
", read the ",
|
|
205
|
+
/* @__PURE__ */ h("a", {
|
|
206
|
+
className: "text-link",
|
|
207
|
+
href: e("logs"),
|
|
208
|
+
children: "daemon logs"
|
|
209
|
+
}),
|
|
210
|
+
", or run ",
|
|
211
|
+
/* @__PURE__ */ h("code", { children: "kuke status" }),
|
|
212
|
+
" for host pre-flight and state-consistency checks."
|
|
213
|
+
]
|
|
214
|
+
})
|
|
215
|
+
})]
|
|
216
|
+
})
|
|
217
|
+
] });
|
|
218
|
+
}
|
|
219
|
+
async function j(e, t) {
|
|
220
|
+
let n = await p(`/daemon/logs?offset=${e}&maxBytes=${C}`, {
|
|
221
|
+
signal: t,
|
|
222
|
+
headers: { Accept: "application/json" }
|
|
223
|
+
}), r = {};
|
|
224
|
+
try {
|
|
225
|
+
r = await n.json();
|
|
226
|
+
} catch {}
|
|
227
|
+
if (!n.ok) throw r.error ?? {
|
|
228
|
+
code: "http_error",
|
|
229
|
+
message: `HTTP ${n.status}`
|
|
230
|
+
};
|
|
231
|
+
return r;
|
|
232
|
+
}
|
|
233
|
+
function M({ revision: e }) {
|
|
234
|
+
let [n, r] = f(y), [i, o] = f(!0), [s, p] = f(), [x, S] = f(!1), [C, E] = f(), [D, k] = f(), [A, M] = f(0), N = d(n), P = d(null), F = d(0), I = d(0), L = d(null), R = d(!0), z = c((e) => {
|
|
235
|
+
N.current = e, r(e);
|
|
236
|
+
}, []);
|
|
237
|
+
l(() => {
|
|
238
|
+
let e = new AbortController(), n = ++F.current;
|
|
239
|
+
I.current++, P.current = n, o(!0);
|
|
240
|
+
let r = () => {
|
|
241
|
+
P.current === n && (P.current = null);
|
|
242
|
+
};
|
|
243
|
+
return (async () => {
|
|
244
|
+
try {
|
|
245
|
+
let t = await j(-1, e.signal);
|
|
246
|
+
if (e.signal.aborted) return;
|
|
247
|
+
R.current = !0, z(b(N.current, t, { replace: !0 })), p(void 0), E(void 0);
|
|
248
|
+
} catch (n) {
|
|
249
|
+
e.signal.aborted || p(t(n));
|
|
250
|
+
} finally {
|
|
251
|
+
e.signal.aborted || (r(), o(!1));
|
|
252
|
+
}
|
|
253
|
+
})(), () => {
|
|
254
|
+
e.abort(), r();
|
|
255
|
+
};
|
|
256
|
+
}, [
|
|
257
|
+
e,
|
|
258
|
+
A,
|
|
259
|
+
z
|
|
260
|
+
]), l(() => {
|
|
261
|
+
if (!x) return;
|
|
262
|
+
let e = new AbortController(), n = null, r = async () => {
|
|
263
|
+
if (P.current !== null || document.visibilityState !== "visible") return;
|
|
264
|
+
let r = ++F.current, i = I.current, a = () => e.signal.aborted || I.current !== i;
|
|
265
|
+
P.current = n = r;
|
|
266
|
+
try {
|
|
267
|
+
for (let t = 0; t < T; t++) {
|
|
268
|
+
let t = N.current.next, n = await j(t ?? -1, e.signal);
|
|
269
|
+
if (a()) return;
|
|
270
|
+
if (z(b(N.current, n, { replace: t === null })), n.reset && E("The daemon log was truncated or replaced since the last read; showing its latest output."), p(void 0), !n.more) break;
|
|
271
|
+
}
|
|
272
|
+
} catch (e) {
|
|
273
|
+
a() || p(t(e));
|
|
274
|
+
} finally {
|
|
275
|
+
P.current === r && (P.current = null), n === r && (n = null);
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
r();
|
|
279
|
+
let i = window.setInterval(() => {
|
|
280
|
+
r();
|
|
281
|
+
}, w);
|
|
282
|
+
return () => {
|
|
283
|
+
window.clearInterval(i), e.abort(), n !== null && P.current === n && (P.current = null);
|
|
284
|
+
};
|
|
285
|
+
}, [x, z]), u(() => {
|
|
286
|
+
let e = L.current;
|
|
287
|
+
e && R.current && (e.scrollTop = e.scrollHeight);
|
|
288
|
+
}, [n]);
|
|
289
|
+
async function B() {
|
|
290
|
+
try {
|
|
291
|
+
await navigator.clipboard.writeText(n.lines.join("\n")), k(`Copied ${n.lines.length} lines.`);
|
|
292
|
+
} catch {
|
|
293
|
+
k("Copy failed: the browser denied clipboard access. Select the output and copy it manually.");
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
let V = n.lines;
|
|
297
|
+
return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(O, { current: "logs" }), /* @__PURE__ */ g("section", {
|
|
298
|
+
className: "panel daemon-logs",
|
|
299
|
+
"aria-label": "Daemon logs",
|
|
300
|
+
"aria-busy": i,
|
|
301
|
+
children: [
|
|
302
|
+
/* @__PURE__ */ g("div", {
|
|
303
|
+
className: "panel-heading",
|
|
304
|
+
children: [/* @__PURE__ */ h("h2", { children: "kukeond output" }), /* @__PURE__ */ h("span", {
|
|
305
|
+
className: "badge",
|
|
306
|
+
role: "status",
|
|
307
|
+
children: x ? "Following" : "Paused"
|
|
308
|
+
})]
|
|
309
|
+
}),
|
|
310
|
+
/* @__PURE__ */ g("div", {
|
|
311
|
+
className: "list-controls log-controls",
|
|
312
|
+
children: [
|
|
313
|
+
/* @__PURE__ */ h("button", {
|
|
314
|
+
type: "button",
|
|
315
|
+
"aria-pressed": x,
|
|
316
|
+
onClick: () => S((e) => !e),
|
|
317
|
+
children: x ? "Pause" : "Follow"
|
|
318
|
+
}),
|
|
319
|
+
/* @__PURE__ */ h("button", {
|
|
320
|
+
type: "button",
|
|
321
|
+
onClick: () => M((e) => e + 1),
|
|
322
|
+
disabled: i,
|
|
323
|
+
children: "Reload latest"
|
|
324
|
+
}),
|
|
325
|
+
/* @__PURE__ */ h("button", {
|
|
326
|
+
type: "button",
|
|
327
|
+
onClick: () => void B(),
|
|
328
|
+
disabled: !V.length,
|
|
329
|
+
children: "Copy"
|
|
330
|
+
}),
|
|
331
|
+
/* @__PURE__ */ g("span", {
|
|
332
|
+
className: "result-count",
|
|
333
|
+
children: [V.length, " lines"]
|
|
334
|
+
})
|
|
335
|
+
]
|
|
336
|
+
}),
|
|
337
|
+
/* @__PURE__ */ g("p", {
|
|
338
|
+
className: "description log-meta",
|
|
339
|
+
children: [
|
|
340
|
+
"Source ",
|
|
341
|
+
n.source ? /* @__PURE__ */ h("code", { children: n.source }) : "not resolved",
|
|
342
|
+
" · read through kukeond · verbatim output in arrival order · this page keeps at most ",
|
|
343
|
+
_.toLocaleString(),
|
|
344
|
+
" lines (",
|
|
345
|
+
(v / 1e6).toLocaleString(),
|
|
346
|
+
" MB)."
|
|
347
|
+
]
|
|
348
|
+
}),
|
|
349
|
+
D && /* @__PURE__ */ h("p", {
|
|
350
|
+
className: "description",
|
|
351
|
+
role: "status",
|
|
352
|
+
children: D
|
|
353
|
+
}),
|
|
354
|
+
n.omitted && V.length > 0 && /* @__PURE__ */ h("p", {
|
|
355
|
+
className: "description log-omitted",
|
|
356
|
+
children: "Earlier output is not shown."
|
|
357
|
+
}),
|
|
358
|
+
C && /* @__PURE__ */ h("p", {
|
|
359
|
+
className: "stale",
|
|
360
|
+
role: "status",
|
|
361
|
+
children: C
|
|
362
|
+
}),
|
|
363
|
+
s && /* @__PURE__ */ h(a, {
|
|
364
|
+
error: s,
|
|
365
|
+
kind: "Daemon log"
|
|
366
|
+
}),
|
|
367
|
+
s && V.length > 0 && /* @__PURE__ */ h("p", {
|
|
368
|
+
className: "stale",
|
|
369
|
+
children: x ? "Following is retrying; the output below may be out of date." : "The output below may be out of date."
|
|
370
|
+
}),
|
|
371
|
+
i && !V.length && /* @__PURE__ */ h("p", {
|
|
372
|
+
className: "scope-filter",
|
|
373
|
+
role: "status",
|
|
374
|
+
children: "Loading daemon logs…"
|
|
375
|
+
}),
|
|
376
|
+
!i && !s && !V.length && /* @__PURE__ */ g("div", {
|
|
377
|
+
className: "empty-state",
|
|
378
|
+
children: [/* @__PURE__ */ h("h3", { children: "No log output yet" }), /* @__PURE__ */ h("p", { children: "kukeond has not written any complete lines. Follow to watch for new output." })]
|
|
379
|
+
}),
|
|
380
|
+
V.length > 0 && /* @__PURE__ */ h("pre", {
|
|
381
|
+
ref: L,
|
|
382
|
+
className: "log-output",
|
|
383
|
+
tabIndex: 0,
|
|
384
|
+
"aria-label": "kukeond log output",
|
|
385
|
+
onScroll: (e) => {
|
|
386
|
+
let t = e.currentTarget;
|
|
387
|
+
R.current = t.scrollHeight - t.scrollTop - t.clientHeight < 24;
|
|
388
|
+
},
|
|
389
|
+
children: V.join("\n")
|
|
390
|
+
})
|
|
391
|
+
]
|
|
392
|
+
})] });
|
|
393
|
+
}
|
|
394
|
+
export { M as n, O as r, A as t };
|
package/dist/daemon.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type Failure } from "./request";
|
|
2
|
+
import type { InventoryResource } from "./inventory";
|
|
3
|
+
export type DaemonHealth = {
|
|
4
|
+
status: string;
|
|
5
|
+
endpoint: string;
|
|
6
|
+
daemonVersion?: string;
|
|
7
|
+
serverVersion: string;
|
|
8
|
+
checkedAt: string;
|
|
9
|
+
latencyMs: number;
|
|
10
|
+
error?: Failure;
|
|
11
|
+
};
|
|
12
|
+
export declare function HealthBadge({ status }: {
|
|
13
|
+
status?: string;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
export declare function DaemonNav({ current }: {
|
|
16
|
+
current: "status" | "health" | "logs" | "connectors";
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
export declare function DaemonHealthPage({ revision, inventory }: {
|
|
19
|
+
revision: number;
|
|
20
|
+
inventory: InventoryResource;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
22
|
+
export declare function DaemonLogsPage({ revision }: {
|
|
23
|
+
revision: number;
|
|
24
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ConfigRef } from "./inventory";
|
|
2
|
+
type Annotations = Record<string, string> | undefined;
|
|
3
|
+
export declare function renameConfig(config: ConfigRef, displayName: string): Promise<Annotations>;
|
|
4
|
+
export declare function renameCell(scope: string[], displayName: string): Promise<Annotations>;
|
|
5
|
+
export declare function RenameControl({ subject, current, onSave }: {
|
|
6
|
+
subject: string;
|
|
7
|
+
current: string;
|
|
8
|
+
onSave: (displayName: string) => Promise<void>;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
export {};
|
package/dist/exec.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Theme } from "./terminal";
|
|
2
|
+
export declare function ExecButton({ container, open, reason, onToggle }: {
|
|
3
|
+
container: string;
|
|
4
|
+
open: boolean;
|
|
5
|
+
reason: string;
|
|
6
|
+
onToggle: () => void;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
export declare function ExecPanel({ scope, container, theme, visible, expanded, onClose }: {
|
|
9
|
+
scope: string[];
|
|
10
|
+
container: string;
|
|
11
|
+
theme: Theme;
|
|
12
|
+
visible: boolean;
|
|
13
|
+
expanded: boolean;
|
|
14
|
+
onClose: () => void;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { type ComponentType, type ReactNode } from "react";
|
|
2
|
+
export type Capabilities = {
|
|
3
|
+
version: string;
|
|
4
|
+
features: string[];
|
|
5
|
+
};
|
|
6
|
+
export type ExtensionContext = {
|
|
7
|
+
extension: string;
|
|
8
|
+
capabilities: Capabilities;
|
|
9
|
+
routeHref: (path: string) => string;
|
|
10
|
+
};
|
|
11
|
+
export type ExtensionRoute = {
|
|
12
|
+
path: string;
|
|
13
|
+
title: string;
|
|
14
|
+
section?: "manage" | "settings";
|
|
15
|
+
component: ComponentType<ExtensionContext>;
|
|
16
|
+
};
|
|
17
|
+
export type ExtensionNavEntry = {
|
|
18
|
+
title: string;
|
|
19
|
+
route: string;
|
|
20
|
+
};
|
|
21
|
+
export type ExtensionNav = {
|
|
22
|
+
manage?: ExtensionNavEntry[];
|
|
23
|
+
settings?: ExtensionNavEntry[];
|
|
24
|
+
};
|
|
25
|
+
export type TopBarItem = {
|
|
26
|
+
id: string;
|
|
27
|
+
component: ComponentType<ExtensionContext>;
|
|
28
|
+
};
|
|
29
|
+
export type UserMenuItem = {
|
|
30
|
+
id: string;
|
|
31
|
+
label: string;
|
|
32
|
+
route?: string;
|
|
33
|
+
href?: string;
|
|
34
|
+
onSelect?: () => void;
|
|
35
|
+
};
|
|
36
|
+
export type OverviewCard = {
|
|
37
|
+
id: string;
|
|
38
|
+
component: ComponentType<ExtensionContext>;
|
|
39
|
+
};
|
|
40
|
+
export type CellDetailsTabProps = ExtensionContext & {
|
|
41
|
+
scope: string[];
|
|
42
|
+
};
|
|
43
|
+
export type CellDetailsTab = {
|
|
44
|
+
id: string;
|
|
45
|
+
title: string;
|
|
46
|
+
component: ComponentType<CellDetailsTabProps>;
|
|
47
|
+
};
|
|
48
|
+
export type ExtensionSlots = {
|
|
49
|
+
topBarStart?: TopBarItem[];
|
|
50
|
+
userMenuItems?: UserMenuItem[];
|
|
51
|
+
overviewCards?: OverviewCard[];
|
|
52
|
+
cellDetailsTabs?: CellDetailsTab[];
|
|
53
|
+
};
|
|
54
|
+
export type ConsoleExtension = {
|
|
55
|
+
id: string;
|
|
56
|
+
requires?: string[];
|
|
57
|
+
routes?: ExtensionRoute[];
|
|
58
|
+
nav?: ExtensionNav;
|
|
59
|
+
slots?: ExtensionSlots;
|
|
60
|
+
};
|
|
61
|
+
export declare function extensionLink(id: string, path: string): string;
|
|
62
|
+
export type ExtensionStatus = {
|
|
63
|
+
phase: "checking";
|
|
64
|
+
} | {
|
|
65
|
+
phase: "available";
|
|
66
|
+
} | {
|
|
67
|
+
phase: "unmet";
|
|
68
|
+
missing: string[];
|
|
69
|
+
unreported: boolean;
|
|
70
|
+
};
|
|
71
|
+
export declare function ExtensionsProvider({ extensions, children }: {
|
|
72
|
+
extensions: ConsoleExtension[];
|
|
73
|
+
children: ReactNode;
|
|
74
|
+
}): import("react").JSX.Element;
|
|
75
|
+
export type Extensions = {
|
|
76
|
+
all: ConsoleExtension[];
|
|
77
|
+
available: ConsoleExtension[];
|
|
78
|
+
status: (extension: ConsoleExtension) => ExtensionStatus;
|
|
79
|
+
context: (extension: ConsoleExtension) => ExtensionContext;
|
|
80
|
+
};
|
|
81
|
+
export declare function useExtensions(): Extensions;
|
|
82
|
+
export declare function findExtensionRoute(extensions: Extensions, id: string | undefined, path: string | undefined): {
|
|
83
|
+
extension: ConsoleExtension;
|
|
84
|
+
route: ExtensionRoute;
|
|
85
|
+
} | undefined;
|
|
86
|
+
export declare function ExtensionNavLinks({ section, active, onNavigate }: {
|
|
87
|
+
section: "manage" | "settings";
|
|
88
|
+
active?: {
|
|
89
|
+
id: string;
|
|
90
|
+
path: string;
|
|
91
|
+
};
|
|
92
|
+
onNavigate?: () => void;
|
|
93
|
+
}): import("react").JSX.Element;
|
|
94
|
+
export declare function TopBarStart(): import("react").JSX.Element | null;
|
|
95
|
+
export declare function OverviewCards(): import("react").JSX.Element;
|
|
96
|
+
export type ResolvedMenuItem = {
|
|
97
|
+
key: string;
|
|
98
|
+
label: string;
|
|
99
|
+
href?: string;
|
|
100
|
+
onSelect?: () => void;
|
|
101
|
+
};
|
|
102
|
+
export declare function useExtensionMenuItems(): ResolvedMenuItem[];
|
|
103
|
+
export declare function CellDetailsTabs({ scope, active, children }: {
|
|
104
|
+
scope: string[];
|
|
105
|
+
active: boolean;
|
|
106
|
+
children: ReactNode;
|
|
107
|
+
}): import("react").JSX.Element;
|
|
108
|
+
export declare function ExtensionPage({ id, path }: {
|
|
109
|
+
id?: string;
|
|
110
|
+
path?: string;
|
|
111
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InventoryResource } from "./inventory";
|
|
2
|
+
export declare function GetStarted({ revision, inventory, configs, majordomoCells, onOpenMajordomo, onChanged }: {
|
|
3
|
+
revision: number;
|
|
4
|
+
inventory: InventoryResource;
|
|
5
|
+
configs: unknown[] | undefined;
|
|
6
|
+
majordomoCells: number;
|
|
7
|
+
onOpenMajordomo: () => void;
|
|
8
|
+
onChanged: () => void;
|
|
9
|
+
}): import("react").JSX.Element | null;
|
package/dist/health.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type Majordomo } from "./majordomo";
|
|
2
|
+
import type { InventoryResource } from "./inventory";
|
|
3
|
+
export declare const filingConnector = "github";
|
|
4
|
+
export declare const healthSeenKey = "kukeon-health-seen";
|
|
5
|
+
export declare function storedHealthSeen(): string | null;
|
|
6
|
+
export type Summary = {
|
|
7
|
+
id: string;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
since: string;
|
|
10
|
+
until: string;
|
|
11
|
+
summary: string;
|
|
12
|
+
findings: number;
|
|
13
|
+
recurring: number;
|
|
14
|
+
filed: number;
|
|
15
|
+
};
|
|
16
|
+
export declare function HealthPage({ revision, major, inventory, onChanged, onSeen }: {
|
|
17
|
+
revision: number;
|
|
18
|
+
major: Majordomo;
|
|
19
|
+
inventory: InventoryResource;
|
|
20
|
+
onChanged: () => void;
|
|
21
|
+
onSeen: (id: string) => void;
|
|
22
|
+
}): import("react").JSX.Element;
|