groove-dev 0.23.0 → 0.24.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.
Files changed (35) hide show
  1. package/node_modules/@groove-dev/gui/dist/assets/index-CqdQP7yG.js +587 -0
  2. package/node_modules/@groove-dev/gui/dist/assets/index-DvcNOnKP.css +1 -0
  3. package/node_modules/@groove-dev/gui/dist/index.html +2 -2
  4. package/node_modules/@groove-dev/gui/src/components/dashboard/activity-feed.jsx +16 -14
  5. package/node_modules/@groove-dev/gui/src/components/dashboard/cache-ring.jsx +105 -0
  6. package/node_modules/@groove-dev/gui/src/components/dashboard/fleet-panel.jsx +106 -38
  7. package/node_modules/@groove-dev/gui/src/components/dashboard/header-bar.jsx +28 -9
  8. package/node_modules/@groove-dev/gui/src/components/dashboard/intel-panel.jsx +269 -0
  9. package/node_modules/@groove-dev/gui/src/components/dashboard/kpi-card.jsx +35 -9
  10. package/node_modules/@groove-dev/gui/src/components/dashboard/routing-chart.jsx +121 -0
  11. package/node_modules/@groove-dev/gui/src/components/dashboard/token-chart.jsx +152 -34
  12. package/node_modules/@groove-dev/gui/src/lib/hooks/use-dashboard.js +28 -8
  13. package/node_modules/@groove-dev/gui/src/lib/theme-hex.js +7 -0
  14. package/node_modules/@groove-dev/gui/src/views/dashboard.jsx +97 -52
  15. package/package.json +1 -1
  16. package/packages/gui/dist/assets/index-CqdQP7yG.js +587 -0
  17. package/packages/gui/dist/assets/index-DvcNOnKP.css +1 -0
  18. package/packages/gui/dist/index.html +2 -2
  19. package/packages/gui/src/components/dashboard/activity-feed.jsx +16 -14
  20. package/packages/gui/src/components/dashboard/cache-ring.jsx +105 -0
  21. package/packages/gui/src/components/dashboard/fleet-panel.jsx +106 -38
  22. package/packages/gui/src/components/dashboard/header-bar.jsx +28 -9
  23. package/packages/gui/src/components/dashboard/intel-panel.jsx +269 -0
  24. package/packages/gui/src/components/dashboard/kpi-card.jsx +35 -9
  25. package/packages/gui/src/components/dashboard/routing-chart.jsx +121 -0
  26. package/packages/gui/src/components/dashboard/token-chart.jsx +152 -34
  27. package/packages/gui/src/lib/hooks/use-dashboard.js +28 -8
  28. package/packages/gui/src/lib/theme-hex.js +7 -0
  29. package/packages/gui/src/views/dashboard.jsx +97 -52
  30. package/node_modules/@groove-dev/gui/dist/assets/index-Cg9SzKgD.css +0 -1
  31. package/node_modules/@groove-dev/gui/dist/assets/index-QmFja2dw.js +0 -582
  32. package/node_modules/@groove-dev/gui/src/components/dashboard/savings-panel.jsx +0 -122
  33. package/packages/gui/dist/assets/index-Cg9SzKgD.css +0 -1
  34. package/packages/gui/dist/assets/index-QmFja2dw.js +0 -582
  35. package/packages/gui/src/components/dashboard/savings-panel.jsx +0 -122
@@ -1,122 +0,0 @@
1
- // FSL-1.1-Apache-2.0 — see LICENSE
2
- import { fmtNum, fmtPct } from '../../lib/format';
3
- import { cn } from '../../lib/cn';
4
- import { HEX } from '../../lib/theme-hex';
5
- import { timeAgo } from '../../lib/format';
6
-
7
- function SavingsBar({ label, value, total, color }) {
8
- const pct = total > 0 ? (value / total) * 100 : 0;
9
- return (
10
- <div className="space-y-1">
11
- <div className="flex items-center justify-between text-xs font-sans">
12
- <span className="text-text-2">{label}</span>
13
- <span className="text-text-0 font-mono">{fmtNum(value)}</span>
14
- </div>
15
- <div className="h-1.5 bg-surface-0 rounded-full overflow-hidden">
16
- <div
17
- className="h-full rounded-full transition-all duration-500"
18
- style={{ width: `${Math.min(pct, 100)}%`, background: color }}
19
- />
20
- </div>
21
- </div>
22
- );
23
- }
24
-
25
- function StatRow({ label, value }) {
26
- return (
27
- <div className="flex items-center justify-between text-xs font-sans">
28
- <span className="text-text-3">{label}</span>
29
- <span className="text-text-0 font-mono">{value}</span>
30
- </div>
31
- );
32
- }
33
-
34
- export function SavingsPanel({ data, rotation, routing, adaptive }) {
35
- if (!data) return null;
36
-
37
- const savings = data.savings || {};
38
- const totalSaved = savings.total || data.totalSaved || 0;
39
- const rotationSaved = savings.fromRotation || data.rotationSaved || 0;
40
- const conflictSaved = savings.fromConflictPrevention || data.conflictSaved || 0;
41
- const coldStartSaved = savings.fromColdStartSkip || data.coldStartSaved || 0;
42
- const totalUsed = data.totalUsed || data.totalTokens || 0;
43
- const total = totalUsed + totalSaved;
44
-
45
- return (
46
- <div className="p-4 space-y-5 overflow-y-auto h-full">
47
- {/* Summary */}
48
- <div className="flex items-baseline gap-2">
49
- <span className="text-xl font-semibold font-mono text-success">{fmtNum(totalSaved)}</span>
50
- <span className="text-xs text-text-3 font-sans">tokens saved</span>
51
- {total > 0 && (
52
- <span className="text-xs text-text-4 font-sans">({fmtPct(totalSaved / total * 100)})</span>
53
- )}
54
- </div>
55
-
56
- {/* Breakdown */}
57
- <div className="space-y-3">
58
- <SavingsBar label="Rotation savings" value={rotationSaved} total={total} color={HEX.accent} />
59
- <SavingsBar label="Conflict prevention" value={conflictSaved} total={total} color={HEX.purple} />
60
- <SavingsBar label="Cold-start prevention" value={coldStartSaved} total={total} color={HEX.info} />
61
- </div>
62
-
63
- {/* Rotation Stats */}
64
- {rotation && (rotation.totalRotations > 0 || rotation.history?.length > 0) && (
65
- <div className="space-y-2">
66
- <span className="text-2xs font-semibold text-text-3 font-sans uppercase tracking-wider">Rotations</span>
67
- <div className="space-y-1.5">
68
- <StatRow label="Total rotations" value={rotation.totalRotations || 0} />
69
- <StatRow label="Tokens saved" value={fmtNum(rotation.totalTokensSaved || 0)} />
70
- </div>
71
- {rotation.history?.length > 0 && (
72
- <div className="space-y-1 mt-2">
73
- {rotation.history.slice(-5).reverse().map((r, i) => (
74
- <div key={i} className="flex items-center gap-2 text-2xs text-text-3 font-sans px-2 py-1 bg-surface-0 rounded">
75
- <span className="text-text-1 font-medium capitalize">{r.agentName || r.role}</span>
76
- <span className="font-mono">{fmtPct((r.contextUsage || 0) * 100)}</span>
77
- <span className="ml-auto text-text-4">{timeAgo(r.timestamp)}</span>
78
- </div>
79
- ))}
80
- </div>
81
- )}
82
- </div>
83
- )}
84
-
85
- {/* Routing Breakdown */}
86
- {routing && routing.totalDecisions > 0 && (
87
- <div className="space-y-2">
88
- <span className="text-2xs font-semibold text-text-3 font-sans uppercase tracking-wider">Model Routing</span>
89
- <div className="space-y-1.5">
90
- <StatRow label="Auto-routed agents" value={routing.autoRoutedCount || 0} />
91
- <StatRow label="Total decisions" value={routing.totalDecisions || 0} />
92
- {routing.byTier && (
93
- <>
94
- <StatRow label="Heavy (Opus)" value={routing.byTier.heavy || 0} />
95
- <StatRow label="Medium (Sonnet)" value={routing.byTier.medium || 0} />
96
- <StatRow label="Light (Haiku)" value={routing.byTier.light || 0} />
97
- </>
98
- )}
99
- </div>
100
- </div>
101
- )}
102
-
103
- {/* Adaptive Thresholds */}
104
- {adaptive?.length > 0 && (
105
- <div className="space-y-2">
106
- <span className="text-2xs font-semibold text-text-3 font-sans uppercase tracking-wider">Adaptive Thresholds</span>
107
- <div className="space-y-1">
108
- {adaptive.map((p) => (
109
- <div key={p.key} className="flex items-center gap-2 text-2xs font-sans px-2 py-1 bg-surface-0 rounded">
110
- <span className="text-text-1 font-mono flex-1 truncate">{p.key}</span>
111
- <span className="font-mono text-text-0">{fmtPct(p.threshold * 100)}</span>
112
- <span className={cn('text-2xs', p.converged ? 'text-success' : 'text-text-4')}>
113
- {p.converged ? 'converged' : `${p.adjustments} adj`}
114
- </span>
115
- </div>
116
- ))}
117
- </div>
118
- </div>
119
- )}
120
- </div>
121
- );
122
- }