@legioncodeinc/hive 0.1.0
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/LICENSE +661 -0
- package/README.md +262 -0
- package/dist/cli-commands.d.ts +41 -0
- package/dist/cli-commands.js +76 -0
- package/dist/cli-commands.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +46 -0
- package/dist/cli.js.map +1 -0
- package/dist/daemon/dashboard/app.js +118 -0
- package/dist/daemon/dashboard/host.d.ts +90 -0
- package/dist/daemon/dashboard/host.js +172 -0
- package/dist/daemon/dashboard/host.js.map +1 -0
- package/dist/daemon/dashboard/web-assets.d.ts +88 -0
- package/dist/daemon/dashboard/web-assets.js +195 -0
- package/dist/daemon/dashboard/web-assets.js.map +1 -0
- package/dist/daemon/fleet-status.d.ts +15 -0
- package/dist/daemon/fleet-status.js +56 -0
- package/dist/daemon/fleet-status.js.map +1 -0
- package/dist/daemon/gate.d.ts +55 -0
- package/dist/daemon/gate.js +128 -0
- package/dist/daemon/gate.js.map +1 -0
- package/dist/daemon/proxy.d.ts +38 -0
- package/dist/daemon/proxy.js +126 -0
- package/dist/daemon/proxy.js.map +1 -0
- package/dist/daemon/registry.d.ts +31 -0
- package/dist/daemon/registry.js +120 -0
- package/dist/daemon/registry.js.map +1 -0
- package/dist/daemon/server.d.ts +41 -0
- package/dist/daemon/server.js +126 -0
- package/dist/daemon/server.js.map +1 -0
- package/dist/daemon/setup-auth.d.ts +37 -0
- package/dist/daemon/setup-auth.js +51 -0
- package/dist/daemon/setup-auth.js.map +1 -0
- package/dist/daemon/telemetry-proxy.d.ts +47 -0
- package/dist/daemon/telemetry-proxy.js +63 -0
- package/dist/daemon/telemetry-proxy.js.map +1 -0
- package/dist/dashboard/contracts.d.ts +235 -0
- package/dist/dashboard/contracts.js +43 -0
- package/dist/dashboard/contracts.js.map +1 -0
- package/dist/dashboard/web/app.d.ts +44 -0
- package/dist/dashboard/web/app.js +179 -0
- package/dist/dashboard/web/app.js.map +1 -0
- package/dist/dashboard/web/boot-route.d.ts +23 -0
- package/dist/dashboard/web/boot-route.js +29 -0
- package/dist/dashboard/web/boot-route.js.map +1 -0
- package/dist/dashboard/web/build-graph-button.d.ts +46 -0
- package/dist/dashboard/web/build-graph-button.js +81 -0
- package/dist/dashboard/web/build-graph-button.js.map +1 -0
- package/dist/dashboard/web/buzzing-screen.d.ts +30 -0
- package/dist/dashboard/web/buzzing-screen.js +135 -0
- package/dist/dashboard/web/buzzing-screen.js.map +1 -0
- package/dist/dashboard/web/folder-picker.d.ts +54 -0
- package/dist/dashboard/web/folder-picker.js +125 -0
- package/dist/dashboard/web/folder-picker.js.map +1 -0
- package/dist/dashboard/web/graph-layout.d.ts +101 -0
- package/dist/dashboard/web/graph-layout.js +0 -0
- package/dist/dashboard/web/graph-layout.js.map +1 -0
- package/dist/dashboard/web/harness-strip.d.ts +38 -0
- package/dist/dashboard/web/harness-strip.js +65 -0
- package/dist/dashboard/web/harness-strip.js.map +1 -0
- package/dist/dashboard/web/health-rail.d.ts +26 -0
- package/dist/dashboard/web/health-rail.js +61 -0
- package/dist/dashboard/web/health-rail.js.map +1 -0
- package/dist/dashboard/web/main.d.ts +22 -0
- package/dist/dashboard/web/main.js +51 -0
- package/dist/dashboard/web/main.js.map +1 -0
- package/dist/dashboard/web/needs-project.d.ts +51 -0
- package/dist/dashboard/web/needs-project.js +69 -0
- package/dist/dashboard/web/needs-project.js.map +1 -0
- package/dist/dashboard/web/page-frame.d.ts +95 -0
- package/dist/dashboard/web/page-frame.js +98 -0
- package/dist/dashboard/web/page-frame.js.map +1 -0
- package/dist/dashboard/web/pages/coming-soon.d.ts +23 -0
- package/dist/dashboard/web/pages/coming-soon.js +19 -0
- package/dist/dashboard/web/pages/coming-soon.js.map +1 -0
- package/dist/dashboard/web/pages/dashboard.d.ts +32 -0
- package/dist/dashboard/web/pages/dashboard.js +205 -0
- package/dist/dashboard/web/pages/dashboard.js.map +1 -0
- package/dist/dashboard/web/pages/graph.d.ts +72 -0
- package/dist/dashboard/web/pages/graph.js +362 -0
- package/dist/dashboard/web/pages/graph.js.map +1 -0
- package/dist/dashboard/web/pages/harnesses.d.ts +65 -0
- package/dist/dashboard/web/pages/harnesses.js +210 -0
- package/dist/dashboard/web/pages/harnesses.js.map +1 -0
- package/dist/dashboard/web/pages/health.d.ts +22 -0
- package/dist/dashboard/web/pages/health.js +91 -0
- package/dist/dashboard/web/pages/health.js.map +1 -0
- package/dist/dashboard/web/pages/lifecycle-panel.d.ts +60 -0
- package/dist/dashboard/web/pages/lifecycle-panel.js +187 -0
- package/dist/dashboard/web/pages/lifecycle-panel.js.map +1 -0
- package/dist/dashboard/web/pages/logs.d.ts +55 -0
- package/dist/dashboard/web/pages/logs.js +311 -0
- package/dist/dashboard/web/pages/logs.js.map +1 -0
- package/dist/dashboard/web/pages/memories.d.ts +35 -0
- package/dist/dashboard/web/pages/memories.js +439 -0
- package/dist/dashboard/web/pages/memories.js.map +1 -0
- package/dist/dashboard/web/pages/projects.d.ts +38 -0
- package/dist/dashboard/web/pages/projects.js +325 -0
- package/dist/dashboard/web/pages/projects.js.map +1 -0
- package/dist/dashboard/web/pages/roi-chart.d.ts +52 -0
- package/dist/dashboard/web/pages/roi-chart.js +133 -0
- package/dist/dashboard/web/pages/roi-chart.js.map +1 -0
- package/dist/dashboard/web/pages/roi.d.ts +93 -0
- package/dist/dashboard/web/pages/roi.js +375 -0
- package/dist/dashboard/web/pages/roi.js.map +1 -0
- package/dist/dashboard/web/pages/settings.d.ts +103 -0
- package/dist/dashboard/web/pages/settings.js +420 -0
- package/dist/dashboard/web/pages/settings.js.map +1 -0
- package/dist/dashboard/web/pages/sync.d.ts +59 -0
- package/dist/dashboard/web/pages/sync.js +280 -0
- package/dist/dashboard/web/pages/sync.js.map +1 -0
- package/dist/dashboard/web/panels.d.ts +178 -0
- package/dist/dashboard/web/panels.js +471 -0
- package/dist/dashboard/web/panels.js.map +1 -0
- package/dist/dashboard/web/primitives.d.ts +80 -0
- package/dist/dashboard/web/primitives.js +208 -0
- package/dist/dashboard/web/primitives.js.map +1 -0
- package/dist/dashboard/web/readiness-splash.d.ts +39 -0
- package/dist/dashboard/web/readiness-splash.js +201 -0
- package/dist/dashboard/web/readiness-splash.js.map +1 -0
- package/dist/dashboard/web/registry.d.ts +96 -0
- package/dist/dashboard/web/registry.js +99 -0
- package/dist/dashboard/web/registry.js.map +1 -0
- package/dist/dashboard/web/router.d.ts +48 -0
- package/dist/dashboard/web/router.js +76 -0
- package/dist/dashboard/web/router.js.map +1 -0
- package/dist/dashboard/web/scope-context.d.ts +155 -0
- package/dist/dashboard/web/scope-context.js +266 -0
- package/dist/dashboard/web/scope-context.js.map +1 -0
- package/dist/dashboard/web/service-icons.d.ts +33 -0
- package/dist/dashboard/web/service-icons.js +80 -0
- package/dist/dashboard/web/service-icons.js.map +1 -0
- package/dist/dashboard/web/setup-gate.d.ts +116 -0
- package/dist/dashboard/web/setup-gate.js +272 -0
- package/dist/dashboard/web/setup-gate.js.map +1 -0
- package/dist/dashboard/web/sidebar.d.ts +63 -0
- package/dist/dashboard/web/sidebar.js +91 -0
- package/dist/dashboard/web/sidebar.js.map +1 -0
- package/dist/dashboard/web/use-fleet-telemetry.d.ts +111 -0
- package/dist/dashboard/web/use-fleet-telemetry.js +278 -0
- package/dist/dashboard/web/use-fleet-telemetry.js.map +1 -0
- package/dist/dashboard/web/wire.d.ts +1937 -0
- package/dist/dashboard/web/wire.js +1837 -0
- package/dist/dashboard/web/wire.js.map +1 -0
- package/dist/errors.d.ts +5 -0
- package/dist/errors.js +11 -0
- package/dist/errors.js.map +1 -0
- package/dist/install/registry.d.ts +35 -0
- package/dist/install/registry.js +110 -0
- package/dist/install/registry.js.map +1 -0
- package/dist/lock.d.ts +10 -0
- package/dist/lock.js +87 -0
- package/dist/lock.js.map +1 -0
- package/dist/service/commands.d.ts +15 -0
- package/dist/service/commands.js +49 -0
- package/dist/service/commands.js.map +1 -0
- package/dist/service/index.d.ts +38 -0
- package/dist/service/index.js +174 -0
- package/dist/service/index.js.map +1 -0
- package/dist/service/platform.d.ts +37 -0
- package/dist/service/platform.js +67 -0
- package/dist/service/platform.js.map +1 -0
- package/dist/service/templates.d.ts +10 -0
- package/dist/service/templates.js +120 -0
- package/dist/service/templates.js.map +1 -0
- package/dist/shared/constants.d.ts +15 -0
- package/dist/shared/constants.js +19 -0
- package/dist/shared/constants.js.map +1 -0
- package/dist/shared/daemon-routing.d.ts +11 -0
- package/dist/shared/daemon-routing.js +38 -0
- package/dist/shared/daemon-routing.js.map +1 -0
- package/dist/shared/fleet-readiness.d.ts +18 -0
- package/dist/shared/fleet-readiness.js +9 -0
- package/dist/shared/fleet-readiness.js.map +1 -0
- package/dist/shared/fleet-telemetry.d.ts +68 -0
- package/dist/shared/fleet-telemetry.js +61 -0
- package/dist/shared/fleet-telemetry.js.map +1 -0
- package/dist/shared/lifecycle-flags.d.ts +34 -0
- package/dist/shared/lifecycle-flags.js +39 -0
- package/dist/shared/lifecycle-flags.js.map +1 -0
- package/dist/shared/memory-types.d.ts +55 -0
- package/dist/shared/memory-types.js +75 -0
- package/dist/shared/memory-types.js.map +1 -0
- package/dist/shared/service-status.d.ts +82 -0
- package/dist/shared/service-status.js +97 -0
- package/dist/shared/service-status.js.map +1 -0
- package/dist/telemetry/emit.d.ts +197 -0
- package/dist/telemetry/emit.js +196 -0
- package/dist/telemetry/emit.js.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* The dashboard PANEL components, ported to TSX — PRD-024 Wave 2 (AC-1..AC-6, D-5).
|
|
4
|
+
*
|
|
5
|
+
* These are the panels the UI kit declares in `assets/ui_kits/dashboard/components.jsx`
|
|
6
|
+
* (SessionsPanel, RulesPanel, SkillSyncPanel, GraphCanvas, LiveLog, ConnectivityBanner),
|
|
7
|
+
* ported verbatim from JSX to typed TSX so esbuild compiles + bundles them at build time
|
|
8
|
+
* (D-1 — no in-browser Babel). They compose the {@link Badge} primitive and read the SAME
|
|
9
|
+
* view-model shapes the daemon serves (`src/dashboard/contracts.ts`, via `wire.ts`), so the
|
|
10
|
+
* panels render the LIVE data (D-2) with the kit's exact markup + tokens.
|
|
11
|
+
*
|
|
12
|
+
* Each panel honors its empty/zero state (AC-2): no sessions → an empty session list (not a
|
|
13
|
+
* crash); graph not built → the kit's `honeycomb graph build` prompt; no skills/rules → an
|
|
14
|
+
* empty list. The data NEVER comes from the canned `data.js` — it is whatever the wire client
|
|
15
|
+
* fetched.
|
|
16
|
+
*/
|
|
17
|
+
import React from "react";
|
|
18
|
+
import { BuildGraphButton } from "./build-graph-button.js";
|
|
19
|
+
import { layout, neighborsOf } from "./graph-layout.js";
|
|
20
|
+
import { Badge } from "./primitives.js";
|
|
21
|
+
import { capGraphForRender, MAX_RENDER_NODES } from "./wire.js";
|
|
22
|
+
/** A titled dashboard panel (ported from `components.jsx` `Panel`). */
|
|
23
|
+
export function Panel({ title, eyebrow, right, children, style }) {
|
|
24
|
+
return (_jsxs("section", { style: {
|
|
25
|
+
background: "var(--bg-surface)",
|
|
26
|
+
border: "1px solid var(--border-default)",
|
|
27
|
+
borderRadius: "var(--radius-lg)",
|
|
28
|
+
overflow: "hidden",
|
|
29
|
+
display: "flex",
|
|
30
|
+
flexDirection: "column",
|
|
31
|
+
...style,
|
|
32
|
+
}, children: [_jsxs("header", { style: { display: "flex", alignItems: "center", gap: 10, padding: "13px 16px", borderBottom: "1px solid var(--border-subtle)" }, children: [_jsx("h2", { style: { fontSize: "var(--text-base)", fontWeight: 600, color: "var(--text-primary)", margin: 0, letterSpacing: "-0.01em" }, children: title }), eyebrow && _jsx("span", { style: { fontFamily: "var(--font-mono)", fontSize: 11, color: "var(--text-tertiary)" }, children: eyebrow }), _jsx("span", { style: { flex: 1 } }), right] }), _jsx("div", { style: { padding: 16, flex: 1 }, children: children })] }));
|
|
33
|
+
}
|
|
34
|
+
/** A small centered empty-state message used by panels with no rows (AC-2). */
|
|
35
|
+
function EmptyRow({ children }) {
|
|
36
|
+
return _jsx("div", { style: { padding: "12px 4px", fontSize: 13, color: "var(--text-tertiary)" }, children: children });
|
|
37
|
+
}
|
|
38
|
+
// ── Sessions ───────────────────────────────────────────────────────────────────
|
|
39
|
+
/**
|
|
40
|
+
* The shared per-harness colour language (PRD-039 OQ-4 — extended to ALL SIX). Keyed by the
|
|
41
|
+
* `sessions.agent` value the capture pipeline stamps; the Sessions panel tints each turn's dot by it
|
|
42
|
+
* and the Harnesses page (039b) reuses the SAME map so dots and the page agree. Wave-1 keyed only
|
|
43
|
+
* four; `hermes` + `pi` are added here so no captured harness renders an off-palette dot. Exported so
|
|
44
|
+
* the Harnesses page imports ONE source rather than re-deriving its own palette.
|
|
45
|
+
*/
|
|
46
|
+
export const AGENT_DOT = {
|
|
47
|
+
cursor: "var(--severity-info)",
|
|
48
|
+
"claude-code": "var(--honey)",
|
|
49
|
+
codex: "var(--pollinate)",
|
|
50
|
+
openclaw: "var(--verified)",
|
|
51
|
+
hermes: "var(--severity-warning)",
|
|
52
|
+
pi: "var(--severity-critical)",
|
|
53
|
+
};
|
|
54
|
+
/** The fallback dot colour for an unknown/empty agent (mirrors the Sessions panel's neutral dot). */
|
|
55
|
+
export const AGENT_DOT_FALLBACK = "var(--text-tertiary)";
|
|
56
|
+
/** How many session rows the panel shows per page (the live wire fetches far more than this). */
|
|
57
|
+
const PAGE_SIZE = 5;
|
|
58
|
+
/**
|
|
59
|
+
* A compact, unobtrusive page-control button matching the kit (transparent bg, default border,
|
|
60
|
+
* mono, secondary text). Disabled when there is no page in that direction.
|
|
61
|
+
*/
|
|
62
|
+
function PageButton({ label, onClick, disabled }) {
|
|
63
|
+
return (_jsx("button", { type: "button", onClick: onClick, disabled: disabled, style: {
|
|
64
|
+
width: 22,
|
|
65
|
+
height: 22,
|
|
66
|
+
padding: 0,
|
|
67
|
+
background: "transparent",
|
|
68
|
+
border: "1px solid var(--border-default)",
|
|
69
|
+
borderRadius: "var(--radius-md)",
|
|
70
|
+
color: "var(--text-secondary)",
|
|
71
|
+
fontFamily: "var(--font-mono)",
|
|
72
|
+
fontSize: 12,
|
|
73
|
+
lineHeight: 1,
|
|
74
|
+
cursor: disabled ? "default" : "pointer",
|
|
75
|
+
opacity: disabled ? 0.4 : 1,
|
|
76
|
+
}, children: label }));
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The captured-sessions table (ported from `components.jsx` `SessionsPanel`). AC-2 empty state.
|
|
80
|
+
*
|
|
81
|
+
* The wire ships up to a few hundred captured sessions, so the panel paginates client-side and
|
|
82
|
+
* renders at most {@link PAGE_SIZE} rows per page (no giant scrolling list). The header eyebrow
|
|
83
|
+
* keeps showing the TOTAL captured count; the `right` slot carries the `‹` / `›` controls + a
|
|
84
|
+
* mono `"{start}–{end} of {total}"` label, hidden entirely when there are ≤ PAGE_SIZE sessions.
|
|
85
|
+
*/
|
|
86
|
+
export function SessionsPanel({ sessions }) {
|
|
87
|
+
const total = sessions.length;
|
|
88
|
+
const pageCount = Math.max(1, Math.ceil(total / PAGE_SIZE));
|
|
89
|
+
const [page, setPage] = React.useState(0);
|
|
90
|
+
// Clamp the page in case `sessions` shrinks beneath the current page on a re-render.
|
|
91
|
+
const safePage = Math.min(page, pageCount - 1);
|
|
92
|
+
const start = safePage * PAGE_SIZE;
|
|
93
|
+
const pageRows = sessions.slice(start, start + PAGE_SIZE);
|
|
94
|
+
// 1-based, inclusive display range (e.g. `1–5 of 200`); `0 of 0` never shows (empty state below).
|
|
95
|
+
const rangeStart = total === 0 ? 0 : start + 1;
|
|
96
|
+
const rangeEnd = Math.min(start + PAGE_SIZE, total);
|
|
97
|
+
const controls = total > PAGE_SIZE ? (_jsxs("span", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [_jsx(PageButton, { label: "\u2039", onClick: () => setPage((p) => Math.max(0, p - 1)), disabled: safePage === 0 }), _jsxs("span", { style: { fontFamily: "var(--font-mono)", fontSize: 11, color: "var(--text-tertiary)", whiteSpace: "nowrap" }, children: [rangeStart, "\u2013", rangeEnd, " of ", total] }), _jsx(PageButton, { label: "\u203A", onClick: () => setPage((p) => Math.min(pageCount - 1, p + 1)), disabled: safePage >= pageCount - 1 })] })) : undefined;
|
|
98
|
+
return (_jsx(Panel, { title: "Turns", eyebrow: `${total} captured`, right: controls, children: total === 0 ? (_jsx(EmptyRow, { children: "No turns captured yet." })) : (_jsx("div", { style: { display: "flex", flexDirection: "column" }, children: pageRows.map((s, i) => (_jsxs("div", { style: {
|
|
99
|
+
display: "grid",
|
|
100
|
+
gridTemplateColumns: "84px 1fr auto auto",
|
|
101
|
+
alignItems: "center",
|
|
102
|
+
gap: 12,
|
|
103
|
+
padding: "10px 6px",
|
|
104
|
+
borderTop: i === 0 ? "none" : "1px solid var(--border-subtle)",
|
|
105
|
+
}, children: [_jsx("span", { style: { fontFamily: "var(--font-mono)", fontSize: 13, fontWeight: 600, color: "var(--honey)" }, children: s.sessionId }), _jsxs("span", { style: { display: "flex", alignItems: "center", gap: 8, minWidth: 0 }, children: [_jsx("span", { style: { width: 7, height: 7, borderRadius: "50%", background: "var(--text-tertiary)", flex: "none" } }), _jsx("span", { style: { fontSize: 13, color: "var(--text-secondary)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: s.project })] }), _jsxs("span", { style: { fontFamily: "var(--font-mono)", fontSize: 12, color: "var(--text-tertiary)" }, children: [s.startedAt, s.eventCount > 0 ? ` · ${s.eventCount}e` : ""] }), _jsx(Badge, { tone: s.status === "summarized" ? "verified" : "neutral", mono: true, children: s.status })] }, s.sessionId || i))) })) }));
|
|
106
|
+
}
|
|
107
|
+
// ── Rules ──────────────────────────────────────────────────────────────────────
|
|
108
|
+
/** The org-wide rules list (ported from `components.jsx` `RulesPanel`). AC-2 empty state. */
|
|
109
|
+
export function RulesPanel({ rules }) {
|
|
110
|
+
return (_jsx(Panel, { title: "Rules", eyebrow: "org-wide", children: rules.length === 0 ? (_jsx(EmptyRow, { children: "No rules defined." })) : (_jsx("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: rules.map((r, i) => (_jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10, padding: "9px 6px" }, children: [_jsx("span", { style: { width: 8, height: 8, borderRadius: "50%", background: r.active ? "var(--verified)" : "var(--text-disabled)", flex: "none" } }), _jsx("span", { style: { fontSize: 14, color: r.active ? "var(--text-primary)" : "var(--text-tertiary)" }, children: r.title }), _jsx("span", { style: { flex: 1 } }), _jsx("span", { style: { fontFamily: "var(--font-mono)", fontSize: 11, color: "var(--text-tertiary)" }, children: r.id })] }, r.id || i))) })) }));
|
|
111
|
+
}
|
|
112
|
+
// ── Skill-sync ───────────────────────────────────────────────────────────────
|
|
113
|
+
// PRD-036b: `local` (a skill on disk but not shared with the team) reads in a NEUTRAL/muted tone so
|
|
114
|
+
// the badge is honest — it is present, but not a verified/synced team asset. `synced` mirrors
|
|
115
|
+
// `shared` (both are team-substrate states). Unknown states fall back to `neutral` at the call site.
|
|
116
|
+
export const SYNC_TONE = { shared: "verified", synced: "verified", pulled: "honey", pending: "warning", local: "neutral" };
|
|
117
|
+
/** The skill-sync panel (ported from `components.jsx` `SkillSyncPanel`). AC-2 empty state. */
|
|
118
|
+
export function SkillSyncPanel({ skills }) {
|
|
119
|
+
return (_jsx(Panel, { title: "Skill-sync", eyebrow: `${skills.length} skills`, children: skills.length === 0 ? (_jsx(EmptyRow, { children: "No skills synced." })) : (_jsx("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: skills.map((s, i) => (_jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [_jsx("span", { style: { fontFamily: "var(--font-mono)", fontSize: 13, color: "var(--text-primary)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: s.name }), _jsx("span", { style: { flex: 1 } }), _jsx("span", { style: { fontFamily: "var(--font-mono)", fontSize: 11, color: "var(--text-tertiary)" }, children: s.scope }), _jsx(Badge, { tone: SYNC_TONE[s.syncState] ?? "neutral", mono: true, dot: true, children: s.syncState })] }, s.name || i))) })) }));
|
|
120
|
+
}
|
|
121
|
+
// ── Codebase graph ───────────────────────────────────────────────────────────
|
|
122
|
+
/**
|
|
123
|
+
* The node-kind → fill-color map (D-5). Keyed by the snapshot's `node.kind` values; an unknown kind
|
|
124
|
+
* falls back to `--text-tertiary` at the render site. Exported so the PRD-041 full-page Graph page
|
|
125
|
+
* reuses the EXACT same legend swatches the mini-widget draws (no second color map to drift).
|
|
126
|
+
*/
|
|
127
|
+
export const KIND_COLOR = { file: "var(--honey)", function: "var(--severity-info)", class: "var(--pollinate)" };
|
|
128
|
+
/** The fallback fill for a node whose `kind` is not in {@link KIND_COLOR} (shared by both canvases). */
|
|
129
|
+
export const KIND_COLOR_FALLBACK = "var(--text-tertiary)";
|
|
130
|
+
/** The canvas viewBox extent — the layout fits node positions inside this box (D-5: bounded widget). */
|
|
131
|
+
const GRAPH_VIEW = { width: 540, height: 200 };
|
|
132
|
+
/**
|
|
133
|
+
* The in-panel node-detail surface (D-3 / OQ-3): a compact block below the canvas that shows the
|
|
134
|
+
* SELECTED node's `id`, `kind`, `label`, and its neighbor labels. Rendered only when a node is
|
|
135
|
+
* selected. Pure presentation — selection state lives in {@link GraphCanvas}.
|
|
136
|
+
*/
|
|
137
|
+
function NodeDetail({ node, neighbors }) {
|
|
138
|
+
return (_jsxs("div", { "data-testid": "graph-node-detail", style: {
|
|
139
|
+
marginTop: 12,
|
|
140
|
+
padding: "10px 12px",
|
|
141
|
+
background: "var(--bg-elevated)",
|
|
142
|
+
border: "1px solid var(--border-subtle)",
|
|
143
|
+
borderRadius: "var(--radius-md)",
|
|
144
|
+
display: "flex",
|
|
145
|
+
flexDirection: "column",
|
|
146
|
+
gap: 4,
|
|
147
|
+
}, children: [_jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [_jsx("span", { style: { width: 8, height: 8, borderRadius: "50%", background: KIND_COLOR[node.kind] ?? KIND_COLOR_FALLBACK, flex: "none" } }), _jsx("span", { style: { fontSize: 14, color: "var(--text-primary)" }, children: node.label }), _jsx(Badge, { tone: "neutral", mono: true, children: node.kind || "node" })] }), _jsx("span", { style: { fontFamily: "var(--font-mono)", fontSize: 11, color: "var(--text-tertiary)", wordBreak: "break-all" }, children: node.id }), _jsx("span", { style: { fontFamily: "var(--font-mono)", fontSize: 11, color: "var(--text-secondary)" }, children: neighbors.length === 0 ? "no neighbors" : `neighbors: ${neighbors.join(", ")}` })] }));
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* The codebase-graph canvas (PRD-035c). When the wire's `graph.built` is false, renders the empty state
|
|
151
|
+
* with the wired "Build graph" button (the graph is buildable ONLY from the UI — there is no CLI verb).
|
|
152
|
+
* When built, it computes a
|
|
153
|
+
* deterministic position per node via {@link layout} (NOT a hardcoded id map — the old `NODE_POS`
|
|
154
|
+
* keyed on six fixed ids that real file-path / symbol ids never matched, so every node was skipped
|
|
155
|
+
* and the canvas was blank), then draws ONE mark per node (FR-1) and every edge whose endpoints
|
|
156
|
+
* exist (FR-3). So the "N nodes · M edges" eyebrow matches what is drawn (FR-4 / AC-6).
|
|
157
|
+
*
|
|
158
|
+
* Nodes are clickable (D-3 / FR-5): a click selects a node (highlight ring + larger radius, FR-6)
|
|
159
|
+
* and renders the {@link NodeDetail} block with the node's id/kind/label and its neighbors; clicking
|
|
160
|
+
* the selected node again — or clicking empty canvas — clears the selection. `pollinating` re-expresses
|
|
161
|
+
* the old id-specific pulse HONESTLY (OQ-2): with no hardcoded `"pollinating"` node in real data, it
|
|
162
|
+
* pulses the selected/active node (or the first node as a stable panel-level indicator while no node
|
|
163
|
+
* is selected), only while a real pollinate pass is active.
|
|
164
|
+
*/
|
|
165
|
+
export function GraphCanvas({ graph, pollinating, wire, onBuilt, }) {
|
|
166
|
+
const [selected, setSelected] = React.useState(null);
|
|
167
|
+
if (!graph.built) {
|
|
168
|
+
return (_jsx(Panel, { title: "Codebase graph", children: _jsxs("div", { style: { padding: "24px 8px", textAlign: "center", display: "flex", flexDirection: "column", alignItems: "center", gap: 8 }, children: [_jsx("div", { style: { fontSize: 14, color: "var(--text-tertiary)" }, children: "No graph built for this workspace." }), wire !== undefined ? (_jsx(BuildGraphButton, { wire: wire, onBuilt: onBuilt ?? (() => { }) })) : (_jsx("div", { style: { fontSize: 13, color: "var(--text-tertiary)" }, children: "Use the Build graph button on the Graph page." }))] }) }));
|
|
169
|
+
}
|
|
170
|
+
// graph memory cap: bound what is drawn so a large snapshot never mounts an unbounded SVG node count.
|
|
171
|
+
const view = capGraphForRender(graph, MAX_RENDER_NODES).graph;
|
|
172
|
+
// Computed positions for EVERY rendered node (D-1) — keyed by real id, so an arbitrary-id snapshot draws.
|
|
173
|
+
const positions = layout(view.nodes, view.edges, GRAPH_VIEW);
|
|
174
|
+
// The selected node still present in the rendered snapshot (clears defensively if it vanished).
|
|
175
|
+
const selectedNode = selected !== null ? view.nodes.find((n) => n.id === selected) ?? null : null;
|
|
176
|
+
const selectedNeighborIds = selectedNode !== null ? neighborsOf(selectedNode.id, view.edges) : [];
|
|
177
|
+
// Map neighbor ids → their labels for the detail surface (fall back to the id when unlabeled).
|
|
178
|
+
const selectedNeighborLabels = selectedNeighborIds.map((id) => view.nodes.find((n) => n.id === id)?.label || id);
|
|
179
|
+
// The node the pollinate pulse rides (OQ-2): the selected node, else the first node as a stable indicator.
|
|
180
|
+
const pulseId = pollinating ? (selectedNode?.id ?? view.nodes[0]?.id ?? null) : null;
|
|
181
|
+
// Clicking a node toggles selection; clicking empty canvas clears it.
|
|
182
|
+
const onPick = (id) => setSelected((cur) => (cur === id ? null : id));
|
|
183
|
+
return (_jsxs(Panel, { title: "Codebase graph", eyebrow: `${view.nodes.length} nodes · ${view.edges.length} edges`, children: [_jsxs("svg", { viewBox: `0 0 ${GRAPH_VIEW.width} ${GRAPH_VIEW.height}`, style: { width: "100%", height: 200, display: "block" }, onClick: () => setSelected(null), children: [view.edges.map((e, i) => {
|
|
184
|
+
const a = positions.get(e.from);
|
|
185
|
+
const b = positions.get(e.to);
|
|
186
|
+
if (a === undefined || b === undefined)
|
|
187
|
+
return null;
|
|
188
|
+
return _jsx("line", { x1: a.x, y1: a.y, x2: b.x, y2: b.y, stroke: "var(--border-strong)", strokeWidth: "1.5" }, i);
|
|
189
|
+
}), view.nodes.map((n) => {
|
|
190
|
+
const p = positions.get(n.id);
|
|
191
|
+
if (p === undefined)
|
|
192
|
+
return null;
|
|
193
|
+
const isSelected = n.id === selected;
|
|
194
|
+
const isPulsing = n.id === pulseId;
|
|
195
|
+
return (_jsxs("g", { role: "button", tabIndex: 0, "aria-label": `node ${n.label}`, "aria-pressed": isSelected, style: { cursor: "pointer" }, onClick: (ev) => {
|
|
196
|
+
// Stop the canvas-level clear so a node click selects rather than deselects.
|
|
197
|
+
ev.stopPropagation();
|
|
198
|
+
onPick(n.id);
|
|
199
|
+
}, children: [isSelected && _jsx("circle", { cx: p.x, cy: p.y, r: "11", fill: "none", stroke: "var(--honey)", strokeWidth: "1.5" }), _jsx("circle", { cx: p.x, cy: p.y, r: isSelected ? 9 : 7, fill: isPulsing ? "var(--pollinate)" : KIND_COLOR[n.kind] ?? KIND_COLOR_FALLBACK, children: isPulsing && _jsx("animate", { attributeName: "opacity", values: "0.5;1;0.5", dur: "0.9s", repeatCount: "indefinite" }) }), _jsx("text", { x: p.x + 12, y: p.y + 4, fontFamily: "var(--font-mono)", fontSize: "11", fill: "var(--text-secondary)", children: n.label })] }, n.id));
|
|
200
|
+
})] }), selectedNode !== null && _jsx(NodeDetail, { node: selectedNode, neighbors: selectedNeighborLabels })] }));
|
|
201
|
+
}
|
|
202
|
+
// ── Live log ───────────────────────────────────────────────────────────────────
|
|
203
|
+
/** The live-log panel (ported from `components.jsx` `LiveLog`). Lines are pre-formatted, secret-free. */
|
|
204
|
+
export function LiveLog({ lines }) {
|
|
205
|
+
return (_jsx(Panel, { title: "Live log", right: _jsxs("span", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [_jsx("span", { style: { width: 7, height: 7, borderRadius: "50%", background: "var(--verified)" } }), _jsx("span", { style: { fontFamily: "var(--font-mono)", fontSize: 11, color: "var(--text-tertiary)" }, children: "streaming" })] }), children: _jsx("div", { style: { display: "flex", flexDirection: "column", gap: 6 }, children: lines.length === 0 ? (_jsx("code", { style: { fontFamily: "var(--font-mono)", fontSize: 12, color: "var(--text-tertiary)" }, children: "waiting for daemon activity\u2026" })) : (lines.map((l, i) => (_jsx("code", { style: { fontFamily: "var(--font-mono)", fontSize: 12, color: i === 0 ? "var(--text-primary)" : "var(--text-tertiary)", whiteSpace: "pre" }, children: l }, i)))) }) }));
|
|
206
|
+
}
|
|
207
|
+
// ── Settings (PRD-032c — the vault settings panel) ───────────────────────────────
|
|
208
|
+
/** The vault setting keys this panel reads/writes (mirrors the Wave-1 `KNOWN_SETTING_KEYS`). */
|
|
209
|
+
export const SETTING_KEY = Object.freeze({
|
|
210
|
+
activeProvider: "activeProvider",
|
|
211
|
+
activeModel: "activeModel",
|
|
212
|
+
pollinatingEnabled: "pollinating.enabled",
|
|
213
|
+
// PRD-044c: the recall-mode selector key. The closed enum `keyword | semantic | hybrid` is
|
|
214
|
+
// validated daemon-side (`vault/api.ts` `isValidRecallMode`, fail-closed); an UNSET key
|
|
215
|
+
// preserves the PRD-025 runtime default (the page's "default" option leaves it unset).
|
|
216
|
+
recallMode: "recallMode",
|
|
217
|
+
// PRD-063a: Portkey gateway setting keys. Accepted by `isKnownSettingKey` + validated by
|
|
218
|
+
// `validateSettingSemantics` daemon-side; the dashboard treats them as opaque scalar settings.
|
|
219
|
+
portkeyEnabled: "portkey.enabled",
|
|
220
|
+
portkeyConfig: "portkey.config",
|
|
221
|
+
portkeyFallbackToProvider: "portkey.fallbackToProvider",
|
|
222
|
+
});
|
|
223
|
+
/**
|
|
224
|
+
* The provider→key-name mapping for the names-only PRESENCE badge (D-4 / AC-5). A provider's
|
|
225
|
+
* API key lives in the secret class under this conventional NAME (e.g. `ANTHROPIC_API_KEY`);
|
|
226
|
+
* the panel reads `GET /api/secrets` (NAMES only) and shows "set ✓" iff the name is present.
|
|
227
|
+
* It NEVER reads or renders the value — there is no value-returning route.
|
|
228
|
+
*/
|
|
229
|
+
export const PROVIDER_KEY_NAME = Object.freeze({
|
|
230
|
+
anthropic: "ANTHROPIC_API_KEY",
|
|
231
|
+
openai: "OPENAI_API_KEY",
|
|
232
|
+
openrouter: "OPENROUTER_API_KEY",
|
|
233
|
+
// PRD-044b: Cohere joins the presence map KEY-ONLY (write-only vault + presence badge). The
|
|
234
|
+
// name is NEW (grep-confirmed: `COHERE_API_KEY` exists nowhere else). Adding Cohere to the
|
|
235
|
+
// model router/catalog (PROVIDER_CATALOG) is OUT of scope here — that is PRD-010 (OQ-1).
|
|
236
|
+
cohere: "COHERE_API_KEY",
|
|
237
|
+
// PRD-063a: Portkey gateway API key presence (names-only — the write-only vault pattern).
|
|
238
|
+
portkey: "PORTKEY_API_KEY",
|
|
239
|
+
});
|
|
240
|
+
/** A styled native `<select>` matching the DS tokens (the kit has no Select primitive). */
|
|
241
|
+
function Select({ value, onChange, options, ariaLabel, }) {
|
|
242
|
+
return (_jsx("select", { "aria-label": ariaLabel, value: value, onChange: (e) => onChange(e.target.value), style: {
|
|
243
|
+
height: 36,
|
|
244
|
+
padding: "0 10px",
|
|
245
|
+
background: "var(--bg-surface)",
|
|
246
|
+
border: "1px solid var(--border-default)",
|
|
247
|
+
borderRadius: "var(--radius-md)",
|
|
248
|
+
color: "var(--text-primary)",
|
|
249
|
+
fontFamily: "var(--font-mono)",
|
|
250
|
+
fontSize: 13,
|
|
251
|
+
minWidth: 180,
|
|
252
|
+
}, children: options.map((o) => (_jsx("option", { value: o.value, children: o.label }, o.value))) }));
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* A small on/off toggle (the kit has no Toggle primitive). Renders a pill button whose label +
|
|
256
|
+
* tone reflect the boolean; clicking flips it. Used for the pollinating on/off flag (FR-3).
|
|
257
|
+
*/
|
|
258
|
+
function Toggle({ on, onToggle, ariaLabel }) {
|
|
259
|
+
return (_jsxs("button", { type: "button", role: "switch", "aria-checked": on, "aria-label": ariaLabel, onClick: onToggle, style: {
|
|
260
|
+
display: "inline-flex",
|
|
261
|
+
alignItems: "center",
|
|
262
|
+
gap: 8,
|
|
263
|
+
height: 36,
|
|
264
|
+
padding: "0 14px",
|
|
265
|
+
background: on ? "var(--pollinate-subtle)" : "var(--bg-elevated)",
|
|
266
|
+
border: `1px solid ${on ? "var(--pollinate-border)" : "var(--border-default)"}`,
|
|
267
|
+
borderRadius: "var(--radius-full)",
|
|
268
|
+
color: on ? "var(--pollinate)" : "var(--text-secondary)",
|
|
269
|
+
fontFamily: "var(--font-mono)",
|
|
270
|
+
fontSize: 12,
|
|
271
|
+
fontWeight: 600,
|
|
272
|
+
cursor: "pointer",
|
|
273
|
+
}, children: [_jsx("span", { style: { width: 8, height: 8, borderRadius: "50%", background: on ? "var(--pollinate)" : "var(--text-disabled)" } }), on ? "on" : "off"] }));
|
|
274
|
+
}
|
|
275
|
+
/** One labeled row in the settings panel (a left label + a right control). */
|
|
276
|
+
function SettingRow({ label, hint, children }) {
|
|
277
|
+
return (_jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12, padding: "10px 6px", flexWrap: "wrap" }, children: [_jsxs("div", { style: { display: "flex", flexDirection: "column", minWidth: 120 }, children: [_jsx("span", { style: { fontSize: 14, color: "var(--text-primary)" }, children: label }), hint && _jsx("span", { style: { fontFamily: "var(--font-mono)", fontSize: 11, color: "var(--text-tertiary)" }, children: hint })] }), _jsx("span", { style: { flex: 1 } }), children] }));
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* The PRD-032c Settings panel (AC-5). Renders, from daemon-served `setting`-class data:
|
|
281
|
+
* - a PROVIDER select (Anthropic / OpenAI / OpenRouter from the catalog);
|
|
282
|
+
* - a MODEL control populated from THAT provider's catalog models — a `<select>` for a
|
|
283
|
+
* closed-list provider, a free-form text input for OpenRouter (`openEnded`, D-6);
|
|
284
|
+
* - a pollinating on/off toggle;
|
|
285
|
+
* - a names-only provider-key PRESENCE badge ("set ✓" / "not set") — NO secret value.
|
|
286
|
+
*
|
|
287
|
+
* Every write goes through `onSave` (the daemon `/api/settings` POST); the panel never opens
|
|
288
|
+
* the vault directly and holds no storage logic (PRD-020b posture). On (re)load the controls
|
|
289
|
+
* reflect the PERSISTED `settings`/`secretNames` props the parent hydrated from the daemon —
|
|
290
|
+
* this component is controlled by those props, not by a local-only optimistic toggle.
|
|
291
|
+
*/
|
|
292
|
+
export function SettingsPanel({ catalog, settings, secretNames, onSave }) {
|
|
293
|
+
// The persisted values (controlled by the daemon-hydrated props). A select/toggle/input edit
|
|
294
|
+
// fires `onSave`; the parent re-reads and the new props flow back in — so what renders is
|
|
295
|
+
// always the persisted vault value (AC-5: reload reflects the persisted setting).
|
|
296
|
+
const activeProvider = String(settings[SETTING_KEY.activeProvider] ?? "");
|
|
297
|
+
const activeModel = String(settings[SETTING_KEY.activeModel] ?? "");
|
|
298
|
+
const pollinatingOn = settings[SETTING_KEY.pollinatingEnabled] === true || settings[SETTING_KEY.pollinatingEnabled] === "true";
|
|
299
|
+
// The chosen provider's catalog entry (drives the model control). A provider not in the
|
|
300
|
+
// catalog (or none chosen) → no entry → an empty model list (the panel still renders).
|
|
301
|
+
const providerEntry = catalog.find((p) => p.id === activeProvider);
|
|
302
|
+
// A pending text buffer for the OpenRouter free-form model input (committed on blur/Enter),
|
|
303
|
+
// so typing does not POST on every keystroke. Seeded from the persisted model.
|
|
304
|
+
const [modelDraft, setModelDraft] = React.useState(activeModel);
|
|
305
|
+
React.useEffect(() => setModelDraft(activeModel), [activeModel]);
|
|
306
|
+
const providerOptions = [
|
|
307
|
+
{ value: "", label: "— select —" },
|
|
308
|
+
...catalog.map((p) => ({ value: p.id, label: p.label || p.id })),
|
|
309
|
+
];
|
|
310
|
+
const modelOptions = [
|
|
311
|
+
{ value: "", label: "— select —" },
|
|
312
|
+
...(providerEntry?.models ?? []).map((m) => ({ value: m, label: m })),
|
|
313
|
+
];
|
|
314
|
+
// Picking a provider writes `activeProvider`. We do NOT auto-write a model here — the Wave-1
|
|
315
|
+
// API rejects `activeModel` until a provider is stored, and the user picks the model next.
|
|
316
|
+
const onPickProvider = (v) => {
|
|
317
|
+
void onSave(SETTING_KEY.activeProvider, v);
|
|
318
|
+
};
|
|
319
|
+
const onPickModel = (v) => {
|
|
320
|
+
if (v.length === 0)
|
|
321
|
+
return;
|
|
322
|
+
void onSave(SETTING_KEY.activeModel, v);
|
|
323
|
+
};
|
|
324
|
+
const commitOpenRouterModel = () => {
|
|
325
|
+
const v = modelDraft.trim();
|
|
326
|
+
if (v.length > 0 && v !== activeModel)
|
|
327
|
+
void onSave(SETTING_KEY.activeModel, v);
|
|
328
|
+
};
|
|
329
|
+
return (_jsx(Panel, { title: "Settings", eyebrow: "provider \u00B7 model \u00B7 pollinating", children: _jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [_jsxs(SettingRow, { label: "Provider", hint: "inference provider", children: [_jsx(Select, { ariaLabel: "provider", value: activeProvider, onChange: onPickProvider, options: providerOptions }), activeProvider.length > 0 && _jsx(ProviderKeyBadge, { provider: activeProvider, secretNames: secretNames })] }), _jsx(SettingRow, { label: "Model", hint: providerEntry?.openEnded ? "free-form id" : "from catalog", children: providerEntry === undefined ? (_jsx("span", { style: { fontFamily: "var(--font-mono)", fontSize: 12, color: "var(--text-tertiary)" }, children: "pick a provider first" })) : providerEntry.openEnded ? (_jsx("input", { "aria-label": "model", type: "text", value: modelDraft, placeholder: "vendor/model", onChange: (e) => setModelDraft(e.target.value), onBlur: commitOpenRouterModel, onKeyDown: (e) => {
|
|
330
|
+
if (e.key === "Enter")
|
|
331
|
+
commitOpenRouterModel();
|
|
332
|
+
}, style: {
|
|
333
|
+
height: 36,
|
|
334
|
+
padding: "0 10px",
|
|
335
|
+
background: "var(--bg-surface)",
|
|
336
|
+
border: "1px solid var(--border-default)",
|
|
337
|
+
borderRadius: "var(--radius-md)",
|
|
338
|
+
color: "var(--text-primary)",
|
|
339
|
+
fontFamily: "var(--font-mono)",
|
|
340
|
+
fontSize: 13,
|
|
341
|
+
minWidth: 200,
|
|
342
|
+
} })) : (_jsx(Select, { ariaLabel: "model", value: activeModel, onChange: onPickModel, options: modelOptions })) }), _jsx(SettingRow, { label: "Pollinating", hint: "background consolidation", children: _jsx(Toggle, { ariaLabel: "pollinating", on: pollinatingOn, onToggle: () => void onSave(SETTING_KEY.pollinatingEnabled, !pollinatingOn) }) })] }) }));
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* The provider-key PRESENCE badge (AC-5). Shows "key set ✓" when the provider's conventional
|
|
346
|
+
* key NAME is in `secretNames`, "not set" otherwise. It renders NAMES/STATE only — never the
|
|
347
|
+
* secret value (there is no value-returning route, and this component is given only names).
|
|
348
|
+
*/
|
|
349
|
+
function ProviderKeyBadge({ provider, secretNames }) {
|
|
350
|
+
const keyName = PROVIDER_KEY_NAME[provider];
|
|
351
|
+
const present = keyName !== undefined && secretNames.includes(keyName);
|
|
352
|
+
return (_jsx(Badge, { tone: present ? "verified" : "neutral", mono: true, dot: true, children: present ? "key set ✓" : "not set" }));
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* PRD-063a Portkey gateway section (a-AC-1 / a-AC-2 / a-AC-4 / a-AC-5 / a-AC-6).
|
|
356
|
+
*
|
|
357
|
+
* Renders:
|
|
358
|
+
* - `portkey.enabled` toggle (on/off)
|
|
359
|
+
* - `portkey.config` free-form text input (config id or virtual key)
|
|
360
|
+
* - `PORTKEY_API_KEY` write-only password input + presence badge ("key set ✓" / "not set")
|
|
361
|
+
* - `portkey.fallbackToProvider` opt-in toggle (default false)
|
|
362
|
+
*
|
|
363
|
+
* Built entirely from existing DS tokens/primitives (Panel, Toggle, SettingRow, etc.).
|
|
364
|
+
* Every write goes through `onSaveSetting` / `onSaveKey` — the section never opens the vault
|
|
365
|
+
* directly. The API key input is write-only and CLEARED on a successful save (a-AC-6).
|
|
366
|
+
*/
|
|
367
|
+
export function PortkeyGatewaySection({ settings, secretNames, onSaveSetting, onSaveKey }) {
|
|
368
|
+
const enabled = settings[SETTING_KEY.portkeyEnabled] === true || settings[SETTING_KEY.portkeyEnabled] === "true";
|
|
369
|
+
const configValue = String(settings[SETTING_KEY.portkeyConfig] ?? "");
|
|
370
|
+
const fallback = settings[SETTING_KEY.portkeyFallbackToProvider] === true || settings[SETTING_KEY.portkeyFallbackToProvider] === "true";
|
|
371
|
+
// Local draft for the config text input (committed on blur/Enter — no POST per keystroke).
|
|
372
|
+
const [configDraft, setConfigDraft] = React.useState(configValue);
|
|
373
|
+
React.useEffect(() => setConfigDraft(configValue), [configValue]);
|
|
374
|
+
// Write-only API key draft — CLEARED on success, NEVER pre-filled (no value to fetch).
|
|
375
|
+
const [keyDraft, setKeyDraft] = React.useState("");
|
|
376
|
+
const [keySaving, setKeySaving] = React.useState(false);
|
|
377
|
+
const [keyRejected, setKeyRejected] = React.useState(false);
|
|
378
|
+
const commitConfig = () => {
|
|
379
|
+
const v = configDraft.trim();
|
|
380
|
+
if (v !== configValue)
|
|
381
|
+
void onSaveSetting(SETTING_KEY.portkeyConfig, v);
|
|
382
|
+
};
|
|
383
|
+
const submitKey = React.useCallback(async () => {
|
|
384
|
+
const value = keyDraft;
|
|
385
|
+
// Client-side empty-value guard before the POST (mirrors ProviderKeyRow discipline).
|
|
386
|
+
if (value.length === 0) {
|
|
387
|
+
setKeyRejected(true);
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
setKeySaving(true);
|
|
391
|
+
setKeyRejected(false);
|
|
392
|
+
const ok = await onSaveKey(value);
|
|
393
|
+
setKeySaving(false);
|
|
394
|
+
if (ok) {
|
|
395
|
+
// Write-only: CLEAR the draft on a successful save (a-AC-6).
|
|
396
|
+
setKeyDraft("");
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
setKeyRejected(true);
|
|
400
|
+
}
|
|
401
|
+
}, [keyDraft, onSaveKey]);
|
|
402
|
+
const keyName = PROVIDER_KEY_NAME.portkey ?? "PORTKEY_API_KEY";
|
|
403
|
+
const keyPresent = secretNames.includes(keyName);
|
|
404
|
+
return (_jsx(Panel, { title: "Portkey gateway", eyebrow: "portkey.enabled \u00B7 config \u00B7 API key \u00B7 fallback", children: _jsxs("div", { "data-testid": "portkey-gateway-section", style: { display: "flex", flexDirection: "column", gap: 2 }, children: [_jsx(SettingRow, { label: "Use Portkey gateway", hint: "routes all inference through Portkey", children: _jsx(Toggle, { ariaLabel: "portkey enabled", on: enabled, onToggle: () => void onSaveSetting(SETTING_KEY.portkeyEnabled, !enabled) }) }), _jsx(SettingRow, { label: "Portkey config", hint: "config id or virtual key from your Portkey dashboard", children: _jsx("input", { "aria-label": "portkey config", "data-testid": "portkey-config-input", type: "text", value: configDraft, placeholder: "pk-\u2026", onChange: (e) => setConfigDraft(e.target.value), onBlur: commitConfig, onKeyDown: (e) => {
|
|
405
|
+
if (e.key === "Enter")
|
|
406
|
+
commitConfig();
|
|
407
|
+
}, style: {
|
|
408
|
+
height: 36,
|
|
409
|
+
padding: "0 10px",
|
|
410
|
+
background: "var(--bg-surface)",
|
|
411
|
+
border: "1px solid var(--border-default)",
|
|
412
|
+
borderRadius: "var(--radius-md)",
|
|
413
|
+
color: "var(--text-primary)",
|
|
414
|
+
fontFamily: "var(--font-mono)",
|
|
415
|
+
fontSize: 13,
|
|
416
|
+
minWidth: 240,
|
|
417
|
+
} }) }), _jsxs("div", { "data-testid": "portkey-key-row", style: { display: "flex", alignItems: "center", gap: 12, padding: "10px 6px", borderTop: "1px solid var(--border-subtle)", flexWrap: "wrap" }, children: [_jsx("span", { style: { fontSize: 14, color: "var(--text-primary)", minWidth: 150 }, children: "Portkey API key" }), _jsx("div", { style: { flex: "1 1 220px", minWidth: 180 }, children: _jsx("input", { "aria-label": "portkey api key", "data-testid": "portkey-key-input", type: "password", value: keyDraft, placeholder: keyPresent ? "replace key…" : "paste key…", onChange: (e) => {
|
|
418
|
+
setKeyDraft(e.target.value);
|
|
419
|
+
if (keyRejected)
|
|
420
|
+
setKeyRejected(false);
|
|
421
|
+
}, onKeyDown: (e) => {
|
|
422
|
+
if (e.key === "Enter")
|
|
423
|
+
void submitKey();
|
|
424
|
+
}, style: {
|
|
425
|
+
height: 36,
|
|
426
|
+
padding: "0 10px",
|
|
427
|
+
width: "100%",
|
|
428
|
+
background: "var(--bg-surface)",
|
|
429
|
+
border: "1px solid var(--border-default)",
|
|
430
|
+
borderRadius: "var(--radius-md)",
|
|
431
|
+
color: "var(--text-primary)",
|
|
432
|
+
fontFamily: "var(--font-mono)",
|
|
433
|
+
fontSize: 13,
|
|
434
|
+
} }) }), _jsx("button", { type: "button", disabled: keySaving, "data-testid": "portkey-key-save", onClick: () => void submitKey(), style: {
|
|
435
|
+
height: 36,
|
|
436
|
+
padding: "0 14px",
|
|
437
|
+
background: "var(--bg-elevated)",
|
|
438
|
+
border: "1px solid var(--border-default)",
|
|
439
|
+
borderRadius: "var(--radius-md)",
|
|
440
|
+
color: "var(--text-primary)",
|
|
441
|
+
fontFamily: "var(--font-mono)",
|
|
442
|
+
fontSize: 13,
|
|
443
|
+
cursor: keySaving ? "default" : "pointer",
|
|
444
|
+
opacity: keySaving ? 0.6 : 1,
|
|
445
|
+
}, children: keySaving ? "saving…" : "Save key" }), _jsx(Badge, { tone: keyPresent ? "verified" : "neutral", mono: true, dot: true, children: keyPresent ? "key set ✓" : "not set" }), keyRejected && (_jsx("span", { "data-testid": "portkey-key-rejected", style: { fontFamily: "var(--font-mono)", fontSize: 11, color: "var(--severity-critical)" }, children: "not accepted" }))] }), _jsx(SettingRow, { label: "Fallback to provider", hint: "use per-provider key if Portkey is unreachable", children: _jsx(Toggle, { ariaLabel: "portkey fallback to provider", on: fallback, onToggle: () => void onSaveSetting(SETTING_KEY.portkeyFallbackToProvider, !fallback) }) })] }) }));
|
|
446
|
+
}
|
|
447
|
+
// ── Connectivity banner ────────────────────────────────────────────────────────
|
|
448
|
+
/** The daemon-down banner (ported from `components.jsx` `ConnectivityBanner`). AC-5. */
|
|
449
|
+
export function ConnectivityBanner({ url, onRetry }) {
|
|
450
|
+
return (_jsxs("div", { style: {
|
|
451
|
+
display: "flex",
|
|
452
|
+
alignItems: "center",
|
|
453
|
+
gap: 14,
|
|
454
|
+
padding: "14px 18px",
|
|
455
|
+
background: "var(--severity-critical-bg)",
|
|
456
|
+
border: "1px solid var(--severity-critical)",
|
|
457
|
+
borderRadius: "var(--radius-lg)",
|
|
458
|
+
}, children: [_jsx("span", { style: { width: 9, height: 9, borderRadius: "50%", background: "var(--severity-critical)", flex: "none" } }), _jsxs("div", { style: { flex: 1 }, children: [_jsx("div", { style: { fontSize: 14, fontWeight: 600, color: "var(--text-primary)" }, children: "Daemon not reachable" }), _jsx("code", { style: { fontFamily: "var(--font-mono)", fontSize: 12, color: "var(--text-tertiary)" }, children: url })] }), _jsx("button", { onClick: onRetry, style: {
|
|
459
|
+
height: 34,
|
|
460
|
+
padding: "0 16px",
|
|
461
|
+
background: "transparent",
|
|
462
|
+
border: "1px solid var(--severity-critical)",
|
|
463
|
+
color: "var(--severity-critical)",
|
|
464
|
+
borderRadius: "var(--radius-md)",
|
|
465
|
+
fontFamily: "var(--font-sans)",
|
|
466
|
+
fontSize: 13,
|
|
467
|
+
fontWeight: 600,
|
|
468
|
+
cursor: "pointer",
|
|
469
|
+
}, children: "Retry" })] }));
|
|
470
|
+
}
|
|
471
|
+
//# sourceMappingURL=panels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panels.js","sourceRoot":"","sources":["../../../src/dashboard/web/panels.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,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EAChB,KAAK,EAAE;oBACN,MAAM,EAAE,EAAE;oBACV,OAAO,EAAE,QAAQ;oBACjB,UAAU,EAAE,aAAa;oBACzB,MAAM,EAAE,oCAAoC;oBAC5C,KAAK,EAAE,0BAA0B;oBACjC,YAAY,EAAE,kBAAkB;oBAChC,UAAU,EAAE,kBAAkB;oBAC9B,QAAQ,EAAE,EAAE;oBACZ,UAAU,EAAE,GAAG;oBACf,MAAM,EAAE,SAAS;iBACjB,sBAGO,IACJ,CACN,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Honeycomb design-system PRIMITIVES, ported to TSX — PRD-024 Wave 2 (AC-1, D-5).
|
|
3
|
+
*
|
|
4
|
+
* These are the SAME five primitives the design system exposes at runtime as
|
|
5
|
+
* `window.HoneycombDesignSystem_d60529` (`assets/components/core/*` +
|
|
6
|
+
* `assets/components/honeycomb/*`). The UI kit's `index.html` pulls them from that global
|
|
7
|
+
* via in-browser Babel; D-1 forbids that (no CDN React, no `@babel/standalone`). So we PORT
|
|
8
|
+
* the JSX sources into real typed TSX modules that esbuild compiles at build time and
|
|
9
|
+
* bundles — the design is reused verbatim (same tokens, same markup, same variants), not
|
|
10
|
+
* forked. Every visual value comes from a `var(--…)` design token (`assets/styles.css`).
|
|
11
|
+
*/
|
|
12
|
+
import React from "react";
|
|
13
|
+
/** Button visual variants (honey is the brand action; pollinate is the Pollinating/maintenance state). */
|
|
14
|
+
export type ButtonVariant = "primary" | "secondary" | "ghost" | "pollinate" | "danger";
|
|
15
|
+
/** Button sizes (`lg` is the recall-bar action). */
|
|
16
|
+
export type ButtonSize = "sm" | "md" | "lg";
|
|
17
|
+
/** Props for {@link Button}. Extends a native button so `onClick`/`title`/etc. pass through. */
|
|
18
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
19
|
+
variant?: ButtonVariant;
|
|
20
|
+
size?: ButtonSize;
|
|
21
|
+
iconLeft?: React.ReactNode;
|
|
22
|
+
iconRight?: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The Honeycomb button (ported from `assets/components/core/Button.jsx`). One primary (honey)
|
|
26
|
+
* action per region; `pollinate` is reserved for the Pollinating trigger. The hover/press handlers
|
|
27
|
+
* mutate inline style exactly as the DS source does.
|
|
28
|
+
*/
|
|
29
|
+
export declare function Button({ children, variant, size, disabled, iconLeft, iconRight, onClick, type, style, ...rest }: ButtonProps): React.JSX.Element;
|
|
30
|
+
/** Badge tones map to the semantic palette (`verified` green, `honey` brand, `pollinate` violet). */
|
|
31
|
+
export type BadgeTone = "neutral" | "honey" | "verified" | "pollinate" | "info" | "warning" | "critical";
|
|
32
|
+
/** Props for {@link Badge}. */
|
|
33
|
+
export interface BadgeProps {
|
|
34
|
+
children?: React.ReactNode;
|
|
35
|
+
tone?: BadgeTone;
|
|
36
|
+
mono?: boolean;
|
|
37
|
+
dot?: boolean;
|
|
38
|
+
style?: React.CSSProperties;
|
|
39
|
+
}
|
|
40
|
+
/** The Honeycomb status pill (ported from `assets/components/core/Badge.jsx`). */
|
|
41
|
+
export declare function Badge({ children, tone, mono, dot, style }: BadgeProps): React.JSX.Element;
|
|
42
|
+
/** Props for {@link Input}. `mono` renders the value in JetBrains Mono (recall queries, ids). */
|
|
43
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "style"> {
|
|
44
|
+
mono?: boolean;
|
|
45
|
+
size?: ButtonSize;
|
|
46
|
+
iconLeft?: React.ReactNode;
|
|
47
|
+
style?: React.CSSProperties;
|
|
48
|
+
}
|
|
49
|
+
/** The Honeycomb text input (ported from `assets/components/core/Input.jsx`). Focus lights the honey ring. */
|
|
50
|
+
export declare function Input({ value, defaultValue, onChange, placeholder, mono, size, disabled, iconLeft, type, style, ...rest }: InputProps): React.JSX.Element;
|
|
51
|
+
/** Kpi accent colors. */
|
|
52
|
+
export type KpiAccent = "honey" | "pollinate" | "verified" | "neutral";
|
|
53
|
+
/** Props for {@link Kpi} — one dashboard metric tile. */
|
|
54
|
+
export interface KpiProps {
|
|
55
|
+
label: string;
|
|
56
|
+
value: string | number;
|
|
57
|
+
unit?: string;
|
|
58
|
+
delta?: number;
|
|
59
|
+
accent?: KpiAccent;
|
|
60
|
+
style?: React.CSSProperties;
|
|
61
|
+
}
|
|
62
|
+
/** The dashboard metric tile (ported from `assets/components/honeycomb/Kpi.jsx`). */
|
|
63
|
+
export declare function Kpi({ label, value, unit, delta, accent, style }: KpiProps): React.JSX.Element;
|
|
64
|
+
/** Props for {@link MemoryCard} — one recalled or stored memory. */
|
|
65
|
+
export interface MemoryCardProps {
|
|
66
|
+
memoryKey: string;
|
|
67
|
+
snippet: string;
|
|
68
|
+
source?: string;
|
|
69
|
+
score?: number;
|
|
70
|
+
scope?: string;
|
|
71
|
+
verified?: boolean;
|
|
72
|
+
pollinating?: boolean;
|
|
73
|
+
/** Provenance class from the recall engine (PRD-027): distilled `memory` vs raw `session`. */
|
|
74
|
+
kind?: "memory" | "session";
|
|
75
|
+
/** `true` iff a drill-down raw session row — the card visually demotes it (dim + a tag). */
|
|
76
|
+
secondary?: boolean;
|
|
77
|
+
style?: React.CSSProperties;
|
|
78
|
+
}
|
|
79
|
+
/** The signature Honeycomb surface (ported from `assets/components/honeycomb/MemoryCard.jsx`). */
|
|
80
|
+
export declare function MemoryCard({ memoryKey, snippet, source, score, scope, verified, pollinating, kind, secondary, style, }: MemoryCardProps): React.JSX.Element;
|