@legioncodeinc/hive 0.6.2 → 0.6.4
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/daemon/dashboard/app.js +25 -12
- package/dist/daemon/fleet-status.js +16 -5
- package/dist/daemon/fleet-status.js.map +1 -1
- package/dist/daemon/installer/detection.js +14 -2
- package/dist/daemon/installer/detection.js.map +1 -1
- package/dist/daemon/installer/products.d.ts +2 -5
- package/dist/daemon/installer/products.js +2 -4
- package/dist/daemon/installer/products.js.map +1 -1
- package/dist/dashboard/web/buzzing-screen.d.ts +8 -0
- package/dist/dashboard/web/buzzing-screen.js +77 -3
- package/dist/dashboard/web/buzzing-screen.js.map +1 -1
- package/dist/dashboard/web/onboarding/contracts.d.ts +37 -3
- package/dist/dashboard/web/onboarding/contracts.js +25 -17
- package/dist/dashboard/web/onboarding/contracts.js.map +1 -1
- package/dist/dashboard/web/onboarding/health-view.d.ts +10 -1
- package/dist/dashboard/web/onboarding/health-view.js +109 -25
- package/dist/dashboard/web/onboarding/health-view.js.map +1 -1
- package/dist/dashboard/web/onboarding/login-step.d.ts +6 -0
- package/dist/dashboard/web/onboarding/login-step.js +117 -4
- package/dist/dashboard/web/onboarding/login-step.js.map +1 -1
- package/dist/dashboard/web/onboarding/onboarding-screen.js +1 -1
- package/dist/dashboard/web/onboarding/onboarding-screen.js.map +1 -1
- package/dist/dashboard/web/onboarding/tenancy-client.d.ts +22 -0
- package/dist/dashboard/web/onboarding/tenancy-client.js +78 -11
- package/dist/dashboard/web/onboarding/tenancy-client.js.map +1 -1
- package/dist/dashboard/web/onboarding/tenancy-step.js +53 -5
- package/dist/dashboard/web/onboarding/tenancy-step.js.map +1 -1
- package/dist/dashboard/web/use-fleet-telemetry.d.ts +27 -0
- package/dist/dashboard/web/use-fleet-telemetry.js +37 -5
- package/dist/dashboard/web/use-fleet-telemetry.js.map +1 -1
- package/dist/service/index.js +24 -2
- package/dist/service/index.js.map +1 -1
- package/dist/shared/fleet-readiness.d.ts +3 -0
- package/dist/shared/fleet-readiness.js.map +1 -1
- package/dist/shared/onboarding-types.d.ts +4 -0
- package/dist/shared/onboarding-types.js +4 -1
- package/dist/shared/onboarding-types.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ const UNREACHABLE_RESPONSE = {
|
|
|
10
10
|
const FleetHealthSchema = z.enum(["ok", "degraded", "unreachable", "unknown"]);
|
|
11
11
|
const FleetDaemonSchema = z.object({
|
|
12
12
|
name: z.string().min(1),
|
|
13
|
+
kind: z.enum(["daemon", "supervisor"]).optional(),
|
|
13
14
|
health: FleetHealthSchema,
|
|
14
15
|
escalation: z.unknown().nullable().optional()
|
|
15
16
|
});
|
|
@@ -18,6 +19,20 @@ const DoctorStatusSchema = z.object({
|
|
|
18
19
|
daemons: z.array(FleetDaemonSchema).optional().default([]),
|
|
19
20
|
asOf: z.string().min(1)
|
|
20
21
|
});
|
|
22
|
+
const DOCTOR_SUPERVISOR_NAME = "doctor";
|
|
23
|
+
function withDoctorSupervisorEntry(daemons, supervisorHealth) {
|
|
24
|
+
const normalized = daemons.map((daemon) => ({
|
|
25
|
+
name: daemon.name,
|
|
26
|
+
kind: daemon.kind,
|
|
27
|
+
health: daemon.health,
|
|
28
|
+
escalation: daemon.escalation ?? null
|
|
29
|
+
}));
|
|
30
|
+
const doctorNameMatch = (name) => name.toLowerCase() === DOCTOR_SUPERVISOR_NAME;
|
|
31
|
+
if (normalized.some((daemon) => doctorNameMatch(daemon.name))) {
|
|
32
|
+
return normalized.map((daemon) => (doctorNameMatch(daemon.name) ? { ...daemon, kind: "supervisor" } : daemon));
|
|
33
|
+
}
|
|
34
|
+
return [...normalized, { name: DOCTOR_SUPERVISOR_NAME, kind: "supervisor", health: supervisorHealth, escalation: null }];
|
|
35
|
+
}
|
|
21
36
|
export async function fetchFleetStatus(fetchImpl = fetch, url = DOCTOR_STATUS_URL) {
|
|
22
37
|
if (!isLoopbackBaseUrl(url)) {
|
|
23
38
|
return UNREACHABLE_RESPONSE;
|
|
@@ -41,11 +56,7 @@ export async function fetchFleetStatus(fetchImpl = fetch, url = DOCTOR_STATUS_UR
|
|
|
41
56
|
return {
|
|
42
57
|
supervisor: "reachable",
|
|
43
58
|
health: parsed.data.health,
|
|
44
|
-
daemons: parsed.data.daemons.
|
|
45
|
-
name: daemon.name,
|
|
46
|
-
health: daemon.health,
|
|
47
|
-
escalation: daemon.escalation ?? null
|
|
48
|
-
})),
|
|
59
|
+
daemons: withDoctorSupervisorEntry(parsed.data.daemons, parsed.data.health),
|
|
49
60
|
asOf: parsed.data.asOf
|
|
50
61
|
};
|
|
51
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fleet-status.js","sourceRoot":"","sources":["../../src/daemon/fleet-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EACL,YAAY,EACZ,iBAAiB,
|
|
1
|
+
{"version":3,"file":"fleet-status.js","sourceRoot":"","sources":["../../src/daemon/fleet-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EACL,YAAY,EACZ,iBAAiB,EAKlB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAE3C,MAAM,oBAAoB,GAAG;IAC3B,UAAU,EAAE,aAAa;IACzB,OAAO,EAAE,EAAE;CAC2B,CAAC;AAEzC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,UAAU,EAAE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AAI,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;YAC3E,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI;SACvB,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,oBAAoB,CAAC;IAC9B,CAAC;AACH,CAAC"}
|
|
@@ -16,7 +16,13 @@ import { join } from "node:path";
|
|
|
16
16
|
const InstalledPackageSchema = z.object({ version: z.string().optional() });
|
|
17
17
|
/** Read the installed version of `packageName` from its global node_modules package.json, if present. */
|
|
18
18
|
function readInstalledVersion(config, nodeModulesDir, packageName) {
|
|
19
|
-
|
|
19
|
+
let raw = null;
|
|
20
|
+
try {
|
|
21
|
+
raw = config.readTextFile(join(nodeModulesDir, packageName, "package.json"));
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
20
26
|
if (raw === null)
|
|
21
27
|
return undefined;
|
|
22
28
|
try {
|
|
@@ -66,7 +72,13 @@ export async function detectFleet(config, store) {
|
|
|
66
72
|
const nodeModulesDir = prefix === null ? null : globalNodeModulesDir(prefix, config.platform);
|
|
67
73
|
const products = {};
|
|
68
74
|
for (const slug of PRODUCT_SLUGS) {
|
|
69
|
-
|
|
75
|
+
try {
|
|
76
|
+
products[slug] = detectProduct(config, store, nodeModulesDir, slug);
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
// A read/decode error for one product never drops that product or its siblings from the map.
|
|
80
|
+
products[slug] = { state: "not_installed" };
|
|
81
|
+
}
|
|
70
82
|
}
|
|
71
83
|
return { products };
|
|
72
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detection.js","sourceRoot":"","sources":["../../../src/daemon/installer/detection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;A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,EAAE,QAAQ,EAAE,CAAC;AACtB,CAAC"}
|
|
@@ -7,17 +7,14 @@
|
|
|
7
7
|
* acts on a slug present in {@link INSTALLABLE_PRODUCTS}; `hive` is deliberately absent (it is the
|
|
8
8
|
* running daemon, never a portal install target).
|
|
9
9
|
*/
|
|
10
|
-
import type
|
|
11
|
-
|
|
12
|
-
export declare const PRODUCT_SLUGS: readonly ["honeycomb", "doctor", "hive", "nectar"];
|
|
10
|
+
import { INSTALLABLE_PRODUCTS, PRODUCT_SLUGS, type InstallableProduct, type ProductSlug } from "../../shared/onboarding-types.js";
|
|
11
|
+
export { INSTALLABLE_PRODUCTS, PRODUCT_SLUGS };
|
|
13
12
|
/**
|
|
14
13
|
* The npm package name for each slug, used as LOCAL DETECTION evidence (the folder name under the
|
|
15
14
|
* global node_modules). This is deliberately independent of the manifest so detection works before
|
|
16
15
|
* any manifest is fetched (is-AC-1); the manifest remains the sole authority for INSTALL targets.
|
|
17
16
|
*/
|
|
18
17
|
export declare const PRODUCT_PACKAGES: Record<ProductSlug, string>;
|
|
19
|
-
/** The three portal-installable products; `hive` is excluded (not installable, 400). */
|
|
20
|
-
export declare const INSTALLABLE_PRODUCTS: readonly ["doctor", "honeycomb", "nectar"];
|
|
21
18
|
/** Per-product static facts: the npm bin name and the argv of its own post-install registration verb. */
|
|
22
19
|
export interface ProductProfile {
|
|
23
20
|
/** The npm bin name (equals the slug for every fleet product). */
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* acts on a slug present in {@link INSTALLABLE_PRODUCTS}; `hive` is deliberately absent (it is the
|
|
8
8
|
* running daemon, never a portal install target).
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
|
-
export
|
|
10
|
+
import { INSTALLABLE_PRODUCTS, PRODUCT_SLUGS } from "../../shared/onboarding-types.js";
|
|
11
|
+
export { INSTALLABLE_PRODUCTS, PRODUCT_SLUGS };
|
|
12
12
|
/**
|
|
13
13
|
* The npm package name for each slug, used as LOCAL DETECTION evidence (the folder name under the
|
|
14
14
|
* global node_modules). This is deliberately independent of the manifest so detection works before
|
|
@@ -20,8 +20,6 @@ export const PRODUCT_PACKAGES = {
|
|
|
20
20
|
hive: "@legioncodeinc/hive",
|
|
21
21
|
nectar: "@legioncodeinc/nectar"
|
|
22
22
|
};
|
|
23
|
-
/** The three portal-installable products; `hive` is excluded (not installable, 400). */
|
|
24
|
-
export const INSTALLABLE_PRODUCTS = ["doctor", "honeycomb", "nectar"];
|
|
25
23
|
const PROFILES = {
|
|
26
24
|
doctor: { binName: "doctor", registrationVerb: ["install-service"] },
|
|
27
25
|
honeycomb: { binName: "honeycomb", registrationVerb: ["install"] },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../../src/daemon/installer/products.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../../src/daemon/installer/products.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,oBAAoB,EACpB,aAAa,EAGd,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,CAAC;AAE/C;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAgC;IAC3D,SAAS,EAAE,0BAA0B;IACrC,MAAM,EAAE,uBAAuB;IAC/B,IAAI,EAAE,qBAAqB;IAC3B,MAAM,EAAE,uBAAuB;CAChC,CAAC;AAUF,MAAM,QAAQ,GAA+C;IAC3D,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC,iBAAiB,CAAC,EAAE;IACpE,SAAS,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC,SAAS,CAAC,EAAE;IAClE,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC,SAAS,CAAC,EAAE;CAC7D,CAAC;AAEF,2EAA2E;AAC3E,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,OAAQ,aAAmC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC9D,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,OAAQ,oBAA0C,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,cAAc,CAAC,OAA2B;IACxD,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -14,6 +14,14 @@
|
|
|
14
14
|
* `/api/fleet-status` fail-soft), rendered one tile per registered service via the shared
|
|
15
15
|
* {@link ServiceStateIcon} vocabulary (PRD-004b). A single bad service only ever changes ITS
|
|
16
16
|
* tile (sd-AC-8/sd-AC-9) — the tile list itself is keyed by name and independent per row.
|
|
17
|
+
*
|
|
18
|
+
* UX rework (operator report): the screen used to look stalled during a long wait, with no motion
|
|
19
|
+
* once a tile settled into one state, no sense of how long "a few seconds" really means, and
|
|
20
|
+
* nothing to read while waiting. This adds an always-running progress affordance, an honest time
|
|
21
|
+
* expectation (never a fake countdown) plus a calm "still working" note past a reasonable window,
|
|
22
|
+
* a legible summary of which service is the long pole, and a short "while you wait"/"what's next"
|
|
23
|
+
* pair so the wait teaches something instead of just sitting there. None of this changes what
|
|
24
|
+
* "ready" means: `isFleetReady()` and the dismissal poll below are untouched.
|
|
17
25
|
*/
|
|
18
26
|
import React from "react";
|
|
19
27
|
export interface BuzzingScreenProps {
|
|
@@ -15,13 +15,27 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
15
15
|
* `/api/fleet-status` fail-soft), rendered one tile per registered service via the shared
|
|
16
16
|
* {@link ServiceStateIcon} vocabulary (PRD-004b). A single bad service only ever changes ITS
|
|
17
17
|
* tile (sd-AC-8/sd-AC-9) — the tile list itself is keyed by name and independent per row.
|
|
18
|
+
*
|
|
19
|
+
* UX rework (operator report): the screen used to look stalled during a long wait, with no motion
|
|
20
|
+
* once a tile settled into one state, no sense of how long "a few seconds" really means, and
|
|
21
|
+
* nothing to read while waiting. This adds an always-running progress affordance, an honest time
|
|
22
|
+
* expectation (never a fake countdown) plus a calm "still working" note past a reasonable window,
|
|
23
|
+
* a legible summary of which service is the long pole, and a short "while you wait"/"what's next"
|
|
24
|
+
* pair so the wait teaches something instead of just sitting there. None of this changes what
|
|
25
|
+
* "ready" means: `isFleetReady()` and the dismissal poll below are untouched.
|
|
18
26
|
*/
|
|
19
27
|
import React from "react";
|
|
20
28
|
import { isFleetReady } from "../../shared/fleet-readiness.js";
|
|
21
29
|
import { SERVICE_STATE_COLOR, SERVICE_STATE_LABEL, ServiceStateIcon } from "./service-icons.js";
|
|
22
30
|
import { useFleetTelemetry } from "./use-fleet-telemetry.js";
|
|
31
|
+
/** Past this many ms without readiness, the "still working" note appears (a calm, not-alarming note, never a claim of failure). */
|
|
32
|
+
const EXTENDED_WAIT_MS = 45_000;
|
|
23
33
|
/** One service tile (bz-AC-3): the shared bee-state icon, the service name, and its state label. */
|
|
24
34
|
function ServiceTile({ service }) {
|
|
35
|
+
// A lingering non-active state (starting/warming/degraded) still breathes, so a tile that sits
|
|
36
|
+
// unchanged for a while never reads as stalled; `error` and `active` are both terminal-for-now
|
|
37
|
+
// and stay still on purpose.
|
|
38
|
+
const stillWorking = service.state === "starting" || service.state === "warming" || service.state === "degraded";
|
|
25
39
|
return (_jsxs("li", { "data-testid": `buzzing-tile-${service.name}`, "data-state": service.state, style: {
|
|
26
40
|
display: "flex",
|
|
27
41
|
alignItems: "center",
|
|
@@ -30,7 +44,12 @@ function ServiceTile({ service }) {
|
|
|
30
44
|
borderRadius: "var(--radius-md)",
|
|
31
45
|
border: "1px solid var(--border-subtle)",
|
|
32
46
|
background: "var(--bg-elevated)",
|
|
33
|
-
}, children: [_jsx("span", { style: {
|
|
47
|
+
}, children: [_jsx("span", { style: {
|
|
48
|
+
color: SERVICE_STATE_COLOR[service.state],
|
|
49
|
+
display: "inline-flex",
|
|
50
|
+
flex: "none",
|
|
51
|
+
animation: stillWorking ? "hc-readiness-pulse var(--dur-pollinate) var(--ease-in-out) infinite alternate" : "none",
|
|
52
|
+
}, children: _jsx(ServiceStateIcon, { state: service.state }) }), _jsx("span", { style: { flex: 1, fontFamily: "var(--font-sans)", fontSize: "var(--text-sm)", color: "var(--text-primary)" }, children: service.name }), _jsx("span", { "data-testid": `buzzing-tile-state-${service.name}`, style: { fontFamily: "var(--font-mono)", fontSize: "var(--text-xs)", color: "var(--text-secondary)", textTransform: "lowercase" }, children: SERVICE_STATE_LABEL[service.state] })] }));
|
|
34
53
|
}
|
|
35
54
|
/** The distinct "no service enumerated yet" indicator (mirrors the old doctor-unreachable state). */
|
|
36
55
|
function AwaitingRegistrationIndicator() {
|
|
@@ -46,6 +65,45 @@ function AwaitingRegistrationIndicator() {
|
|
|
46
65
|
borderRadius: "var(--radius-lg)",
|
|
47
66
|
}, children: [_jsx("span", { role: "img", "aria-label": "doctor supervisor: unreachable", style: { width: 8, height: 8, borderRadius: "50%", background: "var(--text-tertiary)", animation: "hc-readiness-pulse var(--dur-pollinate) var(--ease-in-out) infinite alternate" } }), _jsx("p", { style: { fontSize: "var(--text-sm)", color: "var(--text-secondary)", margin: 0, lineHeight: 1.5, textAlign: "center" }, children: "Waiting on doctor. No services are registered yet." })] }));
|
|
48
67
|
}
|
|
68
|
+
/** An always-running indeterminate progress affordance: motion the operator can see regardless of tile state. */
|
|
69
|
+
function IndeterminateProgressBar() {
|
|
70
|
+
return (_jsx("div", { "data-testid": "buzzing-progress-bar", role: "progressbar", "aria-label": "Fleet still starting", style: {
|
|
71
|
+
width: "100%",
|
|
72
|
+
height: 6,
|
|
73
|
+
borderRadius: "var(--radius-full)",
|
|
74
|
+
background: "var(--bg-inset)",
|
|
75
|
+
border: "1px solid var(--border-subtle)",
|
|
76
|
+
overflow: "hidden",
|
|
77
|
+
position: "relative",
|
|
78
|
+
}, children: _jsx("div", { style: {
|
|
79
|
+
position: "absolute",
|
|
80
|
+
inset: 0,
|
|
81
|
+
width: "40%",
|
|
82
|
+
borderRadius: "var(--radius-full)",
|
|
83
|
+
background: "linear-gradient(90deg, transparent, var(--honey), transparent)",
|
|
84
|
+
animation: "hc-shimmer-sweep 1.6s var(--ease-in-out) infinite",
|
|
85
|
+
} }) }));
|
|
86
|
+
}
|
|
87
|
+
function whileYouWaitEntries(assetBase) {
|
|
88
|
+
return [
|
|
89
|
+
{ name: "Hive", blurb: "Your one dashboard: the front door to the whole fleet.", icon: "/assets/brand/hive-mark.svg" },
|
|
90
|
+
{ name: "Honeycomb", blurb: "Shared AI memory your coding tools carry across sessions.", icon: `${assetBase}/honeycomb-memory-cluster.svg` },
|
|
91
|
+
{ name: "Nectar", blurb: "Gives every file a stable identity, so recall survives renames.", icon: "/assets/brand/nectar-mark.svg" },
|
|
92
|
+
{ name: "Doctor", blurb: "The watchdog that restarts crashed daemons and keeps the fleet healthy.", icon: "/assets/brand/doctor-mark.svg" },
|
|
93
|
+
];
|
|
94
|
+
}
|
|
95
|
+
/** The compact, skimmable "while you wait" primer (one line per product, never a wall of text). */
|
|
96
|
+
function WhileYouWait({ assetBase }) {
|
|
97
|
+
return (_jsxs("div", { "data-testid": "buzzing-while-you-wait", style: { display: "flex", flexDirection: "column", gap: 10, width: "100%", textAlign: "left" }, children: [_jsx("span", { style: { fontFamily: "var(--font-mono)", fontSize: "var(--text-xs)", textTransform: "uppercase", letterSpacing: "0.08em", color: "var(--text-tertiary)" }, children: "While you wait" }), _jsx("ul", { style: { listStyle: "none", margin: 0, padding: 0, display: "flex", flexDirection: "column", gap: 8 }, children: whileYouWaitEntries(assetBase).map((entry) => (_jsxs("li", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [_jsx("img", { src: entry.icon, width: 18, height: 18, alt: "", "aria-hidden": "true", style: { flex: "none" } }), _jsxs("span", { style: { fontFamily: "var(--font-sans)", fontSize: "var(--text-xs)", color: "var(--text-secondary)", lineHeight: 1.4 }, children: [_jsxs("strong", { style: { color: "var(--text-primary)" }, children: [entry.name, ":"] }), " ", entry.blurb] })] }, entry.name))) })] }));
|
|
98
|
+
}
|
|
99
|
+
/** A legible one-line summary of which services are still not settled (never claims failure). */
|
|
100
|
+
function longPoleSummary(services) {
|
|
101
|
+
const notReady = services.filter((service) => service.state !== "active");
|
|
102
|
+
if (notReady.length === 0)
|
|
103
|
+
return null;
|
|
104
|
+
const parts = notReady.map((service) => `${service.name} (${SERVICE_STATE_LABEL[service.state]})`);
|
|
105
|
+
return notReady.length === 1 ? `Still settling: ${parts[0]}.` : `Still settling: ${parts.join(", ")}.`;
|
|
106
|
+
}
|
|
49
107
|
/**
|
|
50
108
|
* The `/buzzing` readiness screen. Uses the shared telemetry hook for the tile grid and its own,
|
|
51
109
|
* independent `isFleetReady()` poll for dismissal (see module doc for why the two are separate).
|
|
@@ -53,6 +111,16 @@ function AwaitingRegistrationIndicator() {
|
|
|
53
111
|
export function BuzzingScreen({ assetBase, pollMs = 1500, onReady }) {
|
|
54
112
|
const telemetry = useFleetTelemetry();
|
|
55
113
|
const [ready, setReady] = React.useState(false);
|
|
114
|
+
const [elapsedMs, setElapsedMs] = React.useState(0);
|
|
115
|
+
// A plain wall-clock tick, independent of any poll: the "still working" note and the honest
|
|
116
|
+
// time-expectation copy read real elapsed time, never a fabricated countdown.
|
|
117
|
+
React.useEffect(() => {
|
|
118
|
+
if (ready)
|
|
119
|
+
return;
|
|
120
|
+
const startedAt = Date.now();
|
|
121
|
+
const id = setInterval(() => setElapsedMs(Date.now() - startedAt), 1000);
|
|
122
|
+
return () => clearInterval(id);
|
|
123
|
+
}, [ready]);
|
|
56
124
|
// bz-AC-9/bz-AC-10: reuse the pinned `isFleetReady()` rule so dismissal means the same thing
|
|
57
125
|
// here as it does in the server gate. Stops polling once ready (sticky, mirrors the retired
|
|
58
126
|
// ReadinessSplash's rs-AC-7/rs-AC-9 discipline).
|
|
@@ -101,6 +169,7 @@ export function BuzzingScreen({ assetBase, pollMs = 1500, onReady }) {
|
|
|
101
169
|
if (typeof window !== "undefined")
|
|
102
170
|
window.location.assign("/");
|
|
103
171
|
}, [ready, onReady]);
|
|
172
|
+
const longPole = longPoleSummary(telemetry.services);
|
|
104
173
|
return (_jsxs("div", { "data-testid": "buzzing-screen", style: {
|
|
105
174
|
display: "flex",
|
|
106
175
|
alignItems: "center",
|
|
@@ -115,7 +184,7 @@ export function BuzzingScreen({ assetBase, pollMs = 1500, onReady }) {
|
|
|
115
184
|
alignItems: "center",
|
|
116
185
|
gap: 24,
|
|
117
186
|
width: "100%",
|
|
118
|
-
maxWidth:
|
|
187
|
+
maxWidth: 560,
|
|
119
188
|
padding: "40px 32px",
|
|
120
189
|
background: "var(--bg-surface)",
|
|
121
190
|
border: "1px solid var(--border-default)",
|
|
@@ -130,6 +199,11 @@ export function BuzzingScreen({ assetBase, pollMs = 1500, onReady }) {
|
|
|
130
199
|
borderRadius: "50%",
|
|
131
200
|
background: "var(--honey-subtle)",
|
|
132
201
|
border: "1px solid var(--honey-border)",
|
|
133
|
-
|
|
202
|
+
animation: "hc-badge-breathe 2.4s var(--ease-in-out) infinite alternate",
|
|
203
|
+
}, children: _jsx("img", { src: `${assetBase}/honeycomb-memory-cluster.svg`, width: 48, height: 48, alt: "" }) }), _jsx("h1", { style: { fontSize: "var(--text-xl)", fontWeight: 700, color: "var(--text-primary)", margin: 0, letterSpacing: "-0.02em" }, children: "Waiting for the hive\u2026" }), _jsxs("div", { "data-testid": "buzzing-status-region", role: "status", "aria-live": "polite", style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 12, width: "100%" }, children: [_jsx("p", { style: { fontSize: "var(--text-sm)", color: "var(--text-secondary)", margin: 0, lineHeight: 1.5 }, children: "Starting required services." }), _jsx("p", { "data-testid": "buzzing-time-expectation", style: { fontSize: "var(--text-xs)", color: "var(--text-tertiary)", margin: 0, lineHeight: 1.5 }, children: "This usually takes about 20 to 40 seconds on a fresh install; a cold boot can take a minute." }), elapsedMs > EXTENDED_WAIT_MS && (_jsx("p", { "data-testid": "buzzing-still-working", role: "note", style: { fontSize: "var(--text-xs)", color: "var(--severity-info)", margin: 0, lineHeight: 1.5 }, children: "Still working. Some services take longer on first run; this is not stuck." })), _jsx(IndeterminateProgressBar, {}), telemetry.services.length === 0 ? (_jsx(AwaitingRegistrationIndicator, {})) : (_jsx("ul", { "data-testid": "buzzing-tile-grid", style: { listStyle: "none", margin: 0, padding: 0, display: "flex", flexDirection: "column", gap: 8, width: "100%", textAlign: "left" }, children: telemetry.services.map((service) => (_jsx(ServiceTile, { service: service }, service.name))) })), longPole !== null && (_jsx("p", { "data-testid": "buzzing-long-pole", style: { fontSize: "var(--text-xs)", color: "var(--text-tertiary)", margin: 0, lineHeight: 1.5 }, children: longPole }))] }), _jsx(WhileYouWait, { assetBase: assetBase }), _jsx("p", { "data-testid": "buzzing-whats-next", style: { fontSize: "var(--text-xs)", color: "var(--text-secondary)", margin: 0, lineHeight: 1.5 }, children: "Once every service reports ready, you will land straight on your dashboard, already linked to Deeplake. From there, the Apiary keeps your whole local AI fleet visible and healthy, day to day." })] }), _jsx("style", { children: [
|
|
204
|
+
"@keyframes hc-readiness-pulse { from { opacity: .45 } to { opacity: 1 } }",
|
|
205
|
+
"@keyframes hc-badge-breathe { from { transform: scale(1); opacity: 0.9 } to { transform: scale(1.05); opacity: 1 } }",
|
|
206
|
+
"@keyframes hc-shimmer-sweep { 0% { transform: translateX(-120%) } 100% { transform: translateX(340%) } }",
|
|
207
|
+
].join("\n") })] }));
|
|
134
208
|
}
|
|
135
209
|
//# sourceMappingURL=buzzing-screen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buzzing-screen.js","sourceRoot":"","sources":["../../../src/dashboard/web/buzzing-screen.tsx"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"buzzing-screen.js","sourceRoot":"","sources":["../../../src/dashboard/web/buzzing-screen.tsx"],"names":[],"mappings":";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,EAAE,SAAS,GAAI,EAEtC,2BAAe,oBAAoB,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,uBAAuB,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,gNAGjI,IACC,EAEN,0BACE;oBACA,2EAA2E;oBAC3E,sHAAsH;oBACtH,0GAA0G;iBAC1G,CAAC,IAAI,CAAC,IAAI,CAAC,GACL,IACH,CACN,CAAC;AACH,CAAC"}
|
|
@@ -41,8 +41,9 @@ declare const ProductDetectionSchema: z.ZodObject<{
|
|
|
41
41
|
export type ProductDetection = z.infer<typeof ProductDetectionSchema>;
|
|
42
42
|
/** The safe default for a product the response omitted (never assume installed). */
|
|
43
43
|
export declare const DEFAULT_PRODUCT_DETECTION: ProductDetection;
|
|
44
|
+
type DetectProducts = Record<OnboardingProduct, ProductDetection>;
|
|
44
45
|
export declare const DetectResponseSchema: z.ZodObject<{
|
|
45
|
-
products: z.ZodCatch<z.ZodObject<{
|
|
46
|
+
products: z.ZodCatch<z.ZodPipe<z.ZodCatch<z.ZodObject<{
|
|
46
47
|
honeycomb: z.ZodOptional<z.ZodObject<{
|
|
47
48
|
state: z.ZodCatch<z.ZodEnum<{
|
|
48
49
|
not_installed: "not_installed";
|
|
@@ -95,12 +96,45 @@ export declare const DetectResponseSchema: z.ZodObject<{
|
|
|
95
96
|
summary: z.ZodCatch<z.ZodString>;
|
|
96
97
|
}, z.core.$strip>>;
|
|
97
98
|
}, z.core.$strip>>;
|
|
98
|
-
}, z.core.$strip
|
|
99
|
+
}, z.core.$strip>>, z.ZodTransform<DetectProducts, {
|
|
100
|
+
honeycomb?: {
|
|
101
|
+
state: "not_installed" | "installed" | "install_in_progress" | "install_failed";
|
|
102
|
+
version?: string | undefined;
|
|
103
|
+
error?: {
|
|
104
|
+
stage: string;
|
|
105
|
+
summary: string;
|
|
106
|
+
} | undefined;
|
|
107
|
+
} | undefined;
|
|
108
|
+
doctor?: {
|
|
109
|
+
state: "not_installed" | "installed" | "install_in_progress" | "install_failed";
|
|
110
|
+
version?: string | undefined;
|
|
111
|
+
error?: {
|
|
112
|
+
stage: string;
|
|
113
|
+
summary: string;
|
|
114
|
+
} | undefined;
|
|
115
|
+
} | undefined;
|
|
116
|
+
hive?: {
|
|
117
|
+
state: "not_installed" | "installed" | "install_in_progress" | "install_failed";
|
|
118
|
+
version?: string | undefined;
|
|
119
|
+
error?: {
|
|
120
|
+
stage: string;
|
|
121
|
+
summary: string;
|
|
122
|
+
} | undefined;
|
|
123
|
+
} | undefined;
|
|
124
|
+
nectar?: {
|
|
125
|
+
state: "not_installed" | "installed" | "install_in_progress" | "install_failed";
|
|
126
|
+
version?: string | undefined;
|
|
127
|
+
error?: {
|
|
128
|
+
stage: string;
|
|
129
|
+
summary: string;
|
|
130
|
+
} | undefined;
|
|
131
|
+
} | undefined;
|
|
132
|
+
}>>>;
|
|
99
133
|
}, z.core.$strip>;
|
|
100
134
|
export type DetectResponse = z.infer<typeof DetectResponseSchema>;
|
|
101
135
|
/** The honest "nothing detected yet" default (a fetch failure never fabricates an installed product). */
|
|
102
136
|
export declare const EMPTY_DETECTION: DetectResponse;
|
|
103
|
-
/** Read one product's detection
|
|
137
|
+
/** Read one product's detection from the normalized four-product map. */
|
|
104
138
|
export declare function detectionFor(detection: DetectResponse, product: OnboardingProduct): ProductDetection;
|
|
105
139
|
/** ob-AC-3, every one of the four products reports `installed`. */
|
|
106
140
|
export declare function isFleetFullyInstalled(detection: DetectResponse): boolean;
|
|
@@ -10,13 +10,14 @@
|
|
|
10
10
|
* React (the onboarding screen is the FIRST thing a new operator sees: it must never white-screen).
|
|
11
11
|
*/
|
|
12
12
|
import { z } from "zod";
|
|
13
|
+
import { INSTALLABLE_PRODUCTS as SHARED_INSTALLABLE_PRODUCTS, PRODUCT_SLUGS as SHARED_PRODUCT_SLUGS, } from "../../../shared/onboarding-types.js";
|
|
13
14
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
14
15
|
// Product identity
|
|
15
16
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
16
17
|
/** Every product the daemon reports detection for (hive is always present; it is the caller). */
|
|
17
|
-
export const ONBOARDING_PRODUCTS =
|
|
18
|
+
export const ONBOARDING_PRODUCTS = SHARED_PRODUCT_SLUGS;
|
|
18
19
|
/** The three INSTALLABLE products, in the fixed order the guided flow walks them (ob-AC-6). */
|
|
19
|
-
export const FIXED_PRODUCT_ORDER =
|
|
20
|
+
export const FIXED_PRODUCT_ORDER = SHARED_INSTALLABLE_PRODUCTS;
|
|
20
21
|
export function isInstallableProduct(value) {
|
|
21
22
|
return FIXED_PRODUCT_ORDER.includes(value);
|
|
22
23
|
}
|
|
@@ -35,25 +36,32 @@ const ProductDetectionSchema = z.object({
|
|
|
35
36
|
});
|
|
36
37
|
/** The safe default for a product the response omitted (never assume installed). */
|
|
37
38
|
export const DEFAULT_PRODUCT_DETECTION = Object.freeze({ state: "not_installed" });
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
const DetectProductsInputSchema = z
|
|
40
|
+
.object({
|
|
41
|
+
honeycomb: ProductDetectionSchema.optional(),
|
|
42
|
+
doctor: ProductDetectionSchema.optional(),
|
|
43
|
+
hive: ProductDetectionSchema.optional(),
|
|
44
|
+
nectar: ProductDetectionSchema.optional(),
|
|
45
|
+
})
|
|
46
|
+
.catch({});
|
|
47
|
+
function normalizeDetectProducts(products) {
|
|
48
|
+
return {
|
|
49
|
+
honeycomb: products.honeycomb ?? DEFAULT_PRODUCT_DETECTION,
|
|
50
|
+
doctor: products.doctor ?? DEFAULT_PRODUCT_DETECTION,
|
|
51
|
+
hive: products.hive ?? DEFAULT_PRODUCT_DETECTION,
|
|
52
|
+
nectar: products.nectar ?? DEFAULT_PRODUCT_DETECTION,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const DEFAULT_DETECT_PRODUCTS = Object.freeze(normalizeDetectProducts({}));
|
|
56
|
+
// The wire response is normalized to all four products, even if a malformed/legacy payload omits keys.
|
|
42
57
|
export const DetectResponseSchema = z.object({
|
|
43
|
-
products:
|
|
44
|
-
.object({
|
|
45
|
-
honeycomb: ProductDetectionSchema.optional(),
|
|
46
|
-
doctor: ProductDetectionSchema.optional(),
|
|
47
|
-
hive: ProductDetectionSchema.optional(),
|
|
48
|
-
nectar: ProductDetectionSchema.optional(),
|
|
49
|
-
})
|
|
50
|
-
.catch({}),
|
|
58
|
+
products: DetectProductsInputSchema.transform((products) => normalizeDetectProducts(products)).catch(DEFAULT_DETECT_PRODUCTS),
|
|
51
59
|
});
|
|
52
60
|
/** The honest "nothing detected yet" default (a fetch failure never fabricates an installed product). */
|
|
53
|
-
export const EMPTY_DETECTION = Object.freeze({ products:
|
|
54
|
-
/** Read one product's detection
|
|
61
|
+
export const EMPTY_DETECTION = Object.freeze({ products: DEFAULT_DETECT_PRODUCTS });
|
|
62
|
+
/** Read one product's detection from the normalized four-product map. */
|
|
55
63
|
export function detectionFor(detection, product) {
|
|
56
|
-
return detection.products[product]
|
|
64
|
+
return detection.products[product];
|
|
57
65
|
}
|
|
58
66
|
/** ob-AC-3, every one of the four products reports `installed`. */
|
|
59
67
|
export function isFleetFullyInstalled(detection) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../../../src/dashboard/web/onboarding/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../../../src/dashboard/web/onboarding/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EACN,oBAAoB,IAAI,2BAA2B,EACnD,aAAa,IAAI,oBAAoB,GACrC,MAAM,qCAAqC,CAAC;AAE7C,gFAAgF;AAChF,m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AAK,QAAQ,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,kBAAkB,CAAC;IACzE,MAAM,MAAM,GAAG,IAA6C,CAAC;IAC7D,MAAM,KAAK,GAAG,OAAO,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IACvE,MAAM,MAAM,GAAG,mBAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC;IAC9F,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC1B,CAAC;AAED,SAAS,mBAAmB,CAAC,KAAc;IAC1C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,UAAU,GAAI,KAAkC,CAAC,UAAU,CAAC;IAClE,OAAO,UAAU,KAAK,WAAW,IAAI,UAAU,KAAK,aAAa,CAAC;AACnE,CAAC;AAKD,gFAAgF;AAChF,mGAAmG;AACnG,gFAAgF;AAEhF,yGAAyG;AACzG,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,oBAAoB;IACpB,eAAe;IACf,aAAa;IACb,eAAe;IACf,kBAAkB;IAClB,mBAAmB;IACnB,mBAAmB;CACV,CAAC"}
|
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
* fleet reads ready, rendering one row per reported daemon using the SAME bee-state vocabulary
|
|
4
4
|
* `/buzzing` renders (`service-icons.tsx` / `service-status.ts`), so a health-conscious operator
|
|
5
5
|
* sees a consistent visual language across the whole onboarding-to-dashboard journey.
|
|
6
|
+
*
|
|
7
|
+
* UX rework (operator report): mirrors `/buzzing`'s rework (`buzzing-screen.tsx`) so the two
|
|
8
|
+
* "please wait" screens in this journey read as the same product: an always-running progress
|
|
9
|
+
* affordance, an honest (never faked) time expectation plus a calm "still working" note past a
|
|
10
|
+
* reasonable window, a legible summary of which daemon is the long pole, and a short "while you
|
|
11
|
+
* wait"/"what's next" pair so the wait teaches something. The polling and `onReady` advance below
|
|
12
|
+
* are untouched: none of this changes what "ready" means.
|
|
6
13
|
*/
|
|
7
14
|
import React from "react";
|
|
8
15
|
import type { OnboardingClient } from "./onboarding-client.js";
|
|
@@ -12,6 +19,8 @@ export interface HealthViewProps {
|
|
|
12
19
|
readonly onReady: () => void;
|
|
13
20
|
/** Overrides the poll interval (ms). Defaults to 1500, mirroring `/buzzing`'s dismissal poll. */
|
|
14
21
|
readonly pollMs?: number;
|
|
22
|
+
/** The host-served asset base (mirrors every sibling onboarding step). Defaults to the same empty base the production host serves at. */
|
|
23
|
+
readonly assetBase?: string;
|
|
15
24
|
}
|
|
16
25
|
/** ob-AC-13, the fleet reads ready only once; this screen stops polling the instant it does. */
|
|
17
|
-
export declare function HealthView({ client, onReady, pollMs }: HealthViewProps): React.JSX.Element;
|
|
26
|
+
export declare function HealthView({ client, onReady, pollMs, assetBase }: HealthViewProps): React.JSX.Element;
|