omnius 1.0.517 → 1.0.518
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 +47 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -566060,9 +566060,54 @@ function detectPeerOmniusOllamaPool() {
|
|
|
566060
566060
|
}
|
|
566061
566061
|
return false;
|
|
566062
566062
|
}
|
|
566063
|
+
async function isJetsonSystem() {
|
|
566064
|
+
try {
|
|
566065
|
+
const { existsSync: existsSync174 } = await import("node:fs");
|
|
566066
|
+
const jetsonIndicators = [
|
|
566067
|
+
"/sys/devices/platform/tegra-gr2d",
|
|
566068
|
+
"/sys/devices/platform/tegra-fb",
|
|
566069
|
+
"/sys/devices/soc0/soc_id"
|
|
566070
|
+
];
|
|
566071
|
+
return jetsonIndicators.some((p2) => existsSync174(p2));
|
|
566072
|
+
} catch {
|
|
566073
|
+
return false;
|
|
566074
|
+
}
|
|
566075
|
+
}
|
|
566076
|
+
async function detectGpusViaJtop() {
|
|
566077
|
+
try {
|
|
566078
|
+
const { execSync: execSync41 } = await import("node:child_process");
|
|
566079
|
+
const output = execSync41("jtop -c 1 -j", {
|
|
566080
|
+
encoding: "utf-8",
|
|
566081
|
+
timeout: 3e3,
|
|
566082
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
566083
|
+
});
|
|
566084
|
+
const data = JSON.parse(output);
|
|
566085
|
+
if (data?.gpu && Array.isArray(data.gpu)) {
|
|
566086
|
+
return data.gpu.map((g, i2) => ({
|
|
566087
|
+
index: i2,
|
|
566088
|
+
uuid: `jetson-gpu-${i2}`,
|
|
566089
|
+
name: g.name || "NVIDIA Jetson GPU",
|
|
566090
|
+
memoryTotalMB: g.memory_total || 0,
|
|
566091
|
+
memoryFreeMB: g.memory_free || 0,
|
|
566092
|
+
utilization: g.utilization || 0,
|
|
566093
|
+
computeCap: g.compute_cap || "7.2"
|
|
566094
|
+
// Jetson Xavier: 7.2, Orin: 8.7
|
|
566095
|
+
}));
|
|
566096
|
+
}
|
|
566097
|
+
return [];
|
|
566098
|
+
} catch {
|
|
566099
|
+
return [];
|
|
566100
|
+
}
|
|
566101
|
+
}
|
|
566063
566102
|
async function detectGpus() {
|
|
566064
|
-
if (_nvidiaSmiAvailable === false)
|
|
566103
|
+
if (_nvidiaSmiAvailable === false) {
|
|
566104
|
+
if (await isJetsonSystem()) {
|
|
566105
|
+
const jtopGpus = await detectGpusViaJtop();
|
|
566106
|
+
if (jtopGpus.length > 0)
|
|
566107
|
+
return jtopGpus;
|
|
566108
|
+
}
|
|
566065
566109
|
return [];
|
|
566110
|
+
}
|
|
566066
566111
|
return new Promise((resolve78) => {
|
|
566067
566112
|
const queryFields = "index,uuid,name,memory.total,memory.free,utilization.gpu,compute_cap";
|
|
566068
566113
|
exec2(`nvidia-smi --query-gpu=${queryFields} --format=csv,noheader,nounits 2>/dev/null`, { encoding: "utf8", timeout: 3e3 }, (err, stdout) => {
|
|
@@ -680855,7 +680900,7 @@ var init_stream_renderer = __esm({
|
|
|
680855
680900
|
if (!text3) return;
|
|
680856
680901
|
}
|
|
680857
680902
|
}
|
|
680858
|
-
const usePrefix = this.lineStarted ? "" : prefix;
|
|
680903
|
+
const usePrefix = this.lineStarted && this._cursorCol > 0 ? "" : prefix;
|
|
680859
680904
|
const usableW = this.lineStarted ? maxW : Math.max(1, maxW - usePrefix.length);
|
|
680860
680905
|
const lines = text3.length > usableW ? this.wordWrap(text3, usableW) : [text3];
|
|
680861
680906
|
const isBlockquote = kind === "content" && /^>\s/.test(text3);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.518",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.518",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED