groove-dev 0.27.65 → 0.27.66

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groove-dev/cli",
3
- "version": "0.27.65",
3
+ "version": "0.27.66",
4
4
  "description": "GROOVE CLI — manage AI coding agents from your terminal",
5
5
  "license": "FSL-1.1-Apache-2.0",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groove-dev/daemon",
3
- "version": "0.27.65",
3
+ "version": "0.27.66",
4
4
  "description": "GROOVE daemon — agent orchestration engine",
5
5
  "license": "FSL-1.1-Apache-2.0",
6
6
  "type": "module",
@@ -4145,9 +4145,36 @@ Keep responses concise. Help them think, don't lecture them about the system the
4145
4145
 
4146
4146
  // Network node lifecycle (gated)
4147
4147
 
4148
+ let _localHwCache = null;
4149
+ function getLocalHardware() {
4150
+ if (!_localHwCache) {
4151
+ const sys = OllamaProvider.getSystemHardware();
4152
+ const vramGb = sys.gpu?.vram || 0;
4153
+ const ramGb = sys.totalRamGb || 0;
4154
+ const vramMb = vramGb * 1024;
4155
+ const ramMb = ramGb * 1024;
4156
+ const fmtGb = (gb) => gb > 0 ? `${gb} GB` : null;
4157
+ _localHwCache = {
4158
+ device: sys.gpu?.type === 'nvidia' ? 'cuda' : sys.gpu?.type === 'apple-silicon' ? 'metal' : 'cpu',
4159
+ gpu: sys.gpu?.name || null,
4160
+ memory: fmtGb(vramGb) || fmtGb(ramGb),
4161
+ vram: fmtGb(vramGb),
4162
+ ram: fmtGb(ramGb),
4163
+ cpuCores: sys.cores || null,
4164
+ ram_mb: ramMb,
4165
+ vram_mb: vramMb,
4166
+ gpu_model: sys.gpu?.name || null,
4167
+ cpu_cores: sys.cores || 0,
4168
+ bandwidth_mbps: 0,
4169
+ max_context_length: 0,
4170
+ };
4171
+ }
4172
+ return _localHwCache;
4173
+ }
4174
+
4148
4175
  function snapshotNode() {
4149
4176
  const n = daemon.networkNode || {};
4150
- const hw = n.hardware || {};
4177
+ const hw = n.hardware || getLocalHardware();
4151
4178
  return {
4152
4179
  active: !!n.active,
4153
4180
  status: n.status || 'stopped',
@@ -4155,7 +4182,7 @@ Keep responses concise. Help them think, don't lecture them about the system the
4155
4182
  layers: n.layers || null,
4156
4183
  model: n.model || null,
4157
4184
  sessions: n.sessions || 0,
4158
- hardware: n.hardware || null,
4185
+ hardware: hw,
4159
4186
  installed: !!(daemon.config?.networkBeta?.installed),
4160
4187
  ram_mb: Number(hw.ram_mb) || 0,
4161
4188
  vram_mb: Number(hw.vram_mb) || 0,
@@ -4288,7 +4315,7 @@ Keep responses concise. Help them think, don't lecture them about the system the
4288
4315
  layers: null,
4289
4316
  model: null,
4290
4317
  sessions: 0,
4291
- hardware: null,
4318
+ hardware: getLocalHardware(),
4292
4319
  startedAt: Date.now(),
4293
4320
  events: [],
4294
4321
  };
@@ -4460,13 +4487,15 @@ Keep responses concise. Help them think, don't lecture them about the system the
4460
4487
  daemon.networkNode.layers = self.layers;
4461
4488
  changed = true;
4462
4489
  }
4463
- if (self.device) {
4464
- daemon.networkNode.hardware = {
4465
- ...(daemon.networkNode.hardware || {}),
4466
- device: self.device,
4467
- };
4468
- changed = true;
4469
- }
4490
+ const prev = daemon.networkNode.hardware || getLocalHardware();
4491
+ const enriched = { ...prev };
4492
+ if (self.device) enriched.device = self.device;
4493
+ if (self.gpu_model) { enriched.gpu = self.gpu_model; enriched.gpu_model = self.gpu_model; }
4494
+ if (Number(self.ram_mb) > 0) { enriched.ram_mb = Number(self.ram_mb); }
4495
+ if (Number(self.vram_mb) > 0) { enriched.vram_mb = Number(self.vram_mb); enriched.memory = enriched.vram_mb >= 1024 ? `${(enriched.vram_mb / 1024).toFixed(1)} GB` : `${enriched.vram_mb} MB`; }
4496
+ if (Number(self.cpu_cores) > 0) { enriched.cpu_cores = Number(self.cpu_cores); enriched.cpuCores = Number(self.cpu_cores); }
4497
+ daemon.networkNode.hardware = enriched;
4498
+ changed = true;
4470
4499
  }
4471
4500
  const availModel = Array.isArray(data.models)
4472
4501
  ? data.models.find((m) => m && m.available !== false)
@@ -4479,25 +4508,39 @@ Keep responses concise. Help them think, don't lecture them about the system the
4479
4508
  }
4480
4509
 
4481
4510
  const capStr = (s, max = 200) => (typeof s === 'string' ? s.slice(0, max) : s);
4482
- const safeNodes = (Array.isArray(data.nodes) ? data.nodes : []).map((n) => ({
4483
- node_id: capStr(n.node_id || n.nodeId),
4484
- device: capStr(n.device),
4485
- layers: Array.isArray(n.layers) ? n.layers.slice(0, 2) : n.layers,
4486
- status: capStr(n.status, 50),
4487
- active_sessions: n.active_sessions ?? 0,
4488
- ram_mb: Number(n.ram_mb) || 0,
4489
- vram_mb: Number(n.vram_mb) || 0,
4490
- gpu_model: capStr(n.gpu_model || '', 200),
4491
- cpu_cores: Number(n.cpu_cores) || 0,
4492
- bandwidth_mbps: Number(n.bandwidth_mbps) || 0.0,
4493
- max_context_length: Number(n.max_context_length) || 0,
4494
- load: Number(n.load) || 0.0,
4495
- gpu_utilization_pct: Number(n.gpu_utilization_pct) || 0,
4496
- vram_used_mb: Number(n.vram_used_mb) || 0,
4497
- ram_used_mb: Number(n.ram_used_mb) || 0,
4498
- ram_pct: Number(n.ram_pct) || 0,
4499
- uptime_seconds: Number(n.uptime_seconds) || 0,
4500
- }));
4511
+ const selfId = daemon.networkNode?.nodeId;
4512
+ const localHw = getLocalHardware();
4513
+ const safeNodes = (Array.isArray(data.nodes) ? data.nodes : []).map((n) => {
4514
+ const nid = n.node_id || n.nodeId || '';
4515
+ const isSelf = selfId && nid && (nid === selfId || (nid.length >= 6 && selfId.startsWith(nid.replace(/\.{2,}$/, ''))));
4516
+ const base = {
4517
+ node_id: capStr(nid),
4518
+ device: capStr(n.device),
4519
+ layers: Array.isArray(n.layers) ? n.layers.slice(0, 2) : n.layers,
4520
+ status: capStr(n.status, 50),
4521
+ active_sessions: n.active_sessions ?? 0,
4522
+ ram_mb: Number(n.ram_mb) || 0,
4523
+ vram_mb: Number(n.vram_mb) || 0,
4524
+ gpu_model: capStr(n.gpu_model || '', 200),
4525
+ cpu_cores: Number(n.cpu_cores) || 0,
4526
+ bandwidth_mbps: Number(n.bandwidth_mbps) || 0.0,
4527
+ max_context_length: Number(n.max_context_length) || 0,
4528
+ load: Number(n.load) || 0.0,
4529
+ gpu_utilization_pct: Number(n.gpu_utilization_pct) || 0,
4530
+ vram_used_mb: Number(n.vram_used_mb) || 0,
4531
+ ram_used_mb: Number(n.ram_used_mb) || 0,
4532
+ ram_pct: Number(n.ram_pct) || 0,
4533
+ uptime_seconds: Number(n.uptime_seconds) || 0,
4534
+ };
4535
+ if (isSelf) {
4536
+ if (!base.device) base.device = localHw.device;
4537
+ if (!base.gpu_model) base.gpu_model = localHw.gpu_model || '';
4538
+ if (!base.ram_mb) base.ram_mb = localHw.ram_mb;
4539
+ if (!base.vram_mb) base.vram_mb = localHw.vram_mb;
4540
+ if (!base.cpu_cores) base.cpu_cores = localHw.cpu_cores;
4541
+ }
4542
+ return base;
4543
+ });
4501
4544
 
4502
4545
  return res.json({
4503
4546
  nodes: safeNodes,