omnius 1.0.512 → 1.0.513

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/index.js CHANGED
@@ -637237,6 +637237,39 @@ async function collectNetworkMetrics() {
637237
637237
  }
637238
637238
  return { rxBytesPerSec: 0, txBytesPerSec: 0 };
637239
637239
  }
637240
+ async function hasNvidiaDevice() {
637241
+ try {
637242
+ const { readdirSync: readdirSync62 } = await import("node:fs");
637243
+ const dev = readdirSync62("/dev");
637244
+ if (dev.some((f2) => f2 === "nvidia0" || /^nvidia\d+$/.test(f2) || f2.startsWith("nvidia"))) {
637245
+ return true;
637246
+ }
637247
+ } catch {
637248
+ }
637249
+ return new Promise((resolve78) => {
637250
+ exec4("command -v nvidia-smi", { encoding: "utf8", timeout: 2e3 }, (err) => resolve78(!err));
637251
+ });
637252
+ }
637253
+ function nvidiaPresentFallback() {
637254
+ return {
637255
+ available: true,
637256
+ count: 1,
637257
+ name: "NVIDIA GPU",
637258
+ utilization: 0,
637259
+ vramUsedMB: 0,
637260
+ vramTotalMB: 0,
637261
+ vramUtilization: 0,
637262
+ devices: [{
637263
+ index: 0,
637264
+ uuid: "nvidia-fallback",
637265
+ name: "NVIDIA GPU",
637266
+ utilization: 0,
637267
+ vramUsedMB: 0,
637268
+ vramTotalMB: 0,
637269
+ vramUtilization: 0
637270
+ }]
637271
+ };
637272
+ }
637240
637273
  async function collectGpuMetrics() {
637241
637274
  const noGpu = {
637242
637275
  available: false,
@@ -637269,7 +637302,10 @@ async function collectGpuMetrics() {
637269
637302
  }]
637270
637303
  };
637271
637304
  }
637272
- if (_nvidiaSmiAvailable2 === false) return noGpu;
637305
+ if (_nvidiaSmiAvailable2 === false) {
637306
+ if (await hasNvidiaDevice()) return nvidiaPresentFallback();
637307
+ return noGpu;
637308
+ }
637273
637309
  try {
637274
637310
  const smi = await new Promise((resolve78, reject) => {
637275
637311
  exec4(
@@ -637298,7 +637334,10 @@ async function collectGpuMetrics() {
637298
637334
  vramUtilization: vramTotal2 > 0 ? Math.round(vramUsed2 / vramTotal2 * 100) : 0
637299
637335
  });
637300
637336
  }
637301
- if (devices.length === 0) return noGpu;
637337
+ if (devices.length === 0) {
637338
+ if (await hasNvidiaDevice()) return nvidiaPresentFallback();
637339
+ return noGpu;
637340
+ }
637302
637341
  const vramUsed = devices.reduce((sum2, gpu) => sum2 + gpu.vramUsedMB, 0);
637303
637342
  const vramTotal = devices.reduce((sum2, gpu) => sum2 + gpu.vramTotalMB, 0);
637304
637343
  const avgUtil = Math.round(devices.reduce((sum2, gpu) => sum2 + gpu.utilization, 0) / devices.length);
@@ -637316,6 +637355,7 @@ async function collectGpuMetrics() {
637316
637355
  };
637317
637356
  } catch {
637318
637357
  _nvidiaSmiAvailable2 = false;
637358
+ if (await hasNvidiaDevice()) return nvidiaPresentFallback();
637319
637359
  return noGpu;
637320
637360
  }
637321
637361
  }
@@ -640000,6 +640040,12 @@ var init_status_bar = __esm({
640000
640040
  this._metricsCollector.startLocal((m2) => {
640001
640041
  this._localUnifiedMetrics = m2;
640002
640042
  this._unifiedMetrics = m2;
640043
+ const hw = m2.hardware;
640044
+ if (hw) {
640045
+ this._gpuName = hw.gpuName || "";
640046
+ this._vramTotal = hw.vramTotalMB || 0;
640047
+ this._vramUsed = hw.vramUsedMB || 0;
640048
+ }
640003
640049
  if (this._remoteUnifiedMetrics) {
640004
640050
  this._remoteUnifiedMetrics = {
640005
640051
  ...this._remoteUnifiedMetrics,
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.512",
3
+ "version": "1.0.513",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.512",
9
+ "version": "1.0.513",
10
10
  "bundleDependencies": [
11
11
  "image-to-ascii"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.512",
3
+ "version": "1.0.513",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",