@infernetprotocol/cli 0.1.73 → 0.1.78
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/commands/model.js +2 -2
- package/commands/register.js +2 -0
- package/commands/remove.js +4 -0
- package/commands/setup.js +9 -2
- package/commands/start.js +18 -6
- package/commands/update.js +32 -3
- package/lib/chat-executor.js +26 -5
- package/lib/recommender.js +9 -9
- package/lib/version.js +23 -9
- package/package.json +9 -8
package/commands/model.js
CHANGED
|
@@ -39,7 +39,7 @@ Usage:
|
|
|
39
39
|
(node id or row id, public nodes only).
|
|
40
40
|
--url <control-plane> default infernetprotocol.com
|
|
41
41
|
infernet model recommend [flags] Recommend models for your hardware.
|
|
42
|
-
--use-case <chat|coding|study|agents|uncensored|vision>
|
|
42
|
+
--use-case <chat|marketing|research|coding|study|agents|uncensored|vision>
|
|
43
43
|
--uncensored
|
|
44
44
|
--install install the top pick
|
|
45
45
|
--install-all install everything that fits on disk
|
|
@@ -183,7 +183,7 @@ async function cmdListNode(nodeId, args) {
|
|
|
183
183
|
async function cmdRecommend(args) {
|
|
184
184
|
const useCase = args.get("use-case") ?? args.get("for") ?? null;
|
|
185
185
|
const uncensoredOnly = args.has("uncensored");
|
|
186
|
-
const limit = Number.parseInt(args.get("limit") ?? "
|
|
186
|
+
const limit = Number.parseInt(args.get("limit") ?? "3", 10);
|
|
187
187
|
const wantInstall = args.has("install") || args.has("i");
|
|
188
188
|
const wantInstallAll = args.has("install-all");
|
|
189
189
|
|
package/commands/register.js
CHANGED
|
@@ -204,6 +204,8 @@ export async function gatherCoarseSpecs() {
|
|
|
204
204
|
const served_models = [...new Set([...pulledModels.map((m) => m.name), ...vllmModels])];
|
|
205
205
|
|
|
206
206
|
return {
|
|
207
|
+
e2e_capable: true,
|
|
208
|
+
e2e_version: 'nip44-v2',
|
|
207
209
|
cpu: summarizeCpu(),
|
|
208
210
|
gpu_count: gpus.length,
|
|
209
211
|
gpus: gpus.map((g) => ({
|
package/commands/remove.js
CHANGED
|
@@ -212,6 +212,10 @@ export default async function remove(args, ctx) {
|
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
if (!keepBinary) {
|
|
215
|
+
try {
|
|
216
|
+
const { removeAutoUpdate } = await import('@profullstack/cli/auto-update');
|
|
217
|
+
await removeAutoUpdate('infernet');
|
|
218
|
+
} catch { /* older installs may not have the shared updater dependency */ }
|
|
215
219
|
const { removed, skipped } = await uninstallBinary();
|
|
216
220
|
for (const p of removed) process.stdout.write(`Removed ${p}\n`);
|
|
217
221
|
if (skipped.length > 0) {
|
package/commands/setup.js
CHANGED
|
@@ -76,7 +76,7 @@ skip the prompts.
|
|
|
76
76
|
export const ABLITERATED_DEFAULT = "huihui_ai/Qwen3.8-abliterated:27b";
|
|
77
77
|
|
|
78
78
|
const MODEL_SUGGESTIONS = [
|
|
79
|
-
{ name: "qwen2.5:0.5b", size_gb: 0.4, size: "≈400 MB", note: "smoke test, runs on CPU" },
|
|
79
|
+
{ name: "qwen2.5:0.5b", size_gb: 0.4, size: "≈400 MB", note: "small-memory fallback / smoke test, runs on CPU", cpuFallback: true },
|
|
80
80
|
{ name: "qwen2.5:3b", size_gb: 2.0, size: "≈2 GB", note: "fits 6 GB+ GPU / 8 GB+ RAM" },
|
|
81
81
|
{ name: "qwen2.5:7b", size_gb: 4.4, size: "≈4.4 GB", note: "fits 8 GB+ GPU / 12 GB+ RAM" },
|
|
82
82
|
{ name: "qwen2.5:14b", size_gb: 9.0, size: "≈9 GB", note: "fits 16 GB+ GPU / 24 GB+ RAM" },
|
|
@@ -91,7 +91,14 @@ const MODEL_SUGGESTIONS = [
|
|
|
91
91
|
* out), otherwise the largest stock model that fits.
|
|
92
92
|
*/
|
|
93
93
|
export function pickDefaultSuggestion(evaluated, { isCpuOnly, abliterated = true } = {}) {
|
|
94
|
-
if (isCpuOnly)
|
|
94
|
+
if (isCpuOnly) {
|
|
95
|
+
// Prefer a useful small model on CPU; keep the 0.5B option for hosts
|
|
96
|
+
// that cannot fit 3B in RAM.
|
|
97
|
+
const cpuDefault = evaluated.find((m) => m.name === "qwen2.5:3b");
|
|
98
|
+
if (cpuDefault?.fits) return cpuDefault.name;
|
|
99
|
+
return evaluated.find((m) => m.cpuFallback && m.fits)?.name
|
|
100
|
+
?? MODEL_SUGGESTIONS[0].name;
|
|
101
|
+
}
|
|
95
102
|
const fitting = evaluated.filter((m) => m.fits);
|
|
96
103
|
if (abliterated) {
|
|
97
104
|
const abl = fitting.find((m) => m.abliterated);
|
package/commands/start.js
CHANGED
|
@@ -92,7 +92,7 @@ live queries (see \`infernet status\`, \`infernet stats\`, \`infernet logs\`).
|
|
|
92
92
|
|
|
93
93
|
const DEFAULT_HEARTBEAT_MS = 30_000;
|
|
94
94
|
const DEFAULT_POLL_MS = 15_000;
|
|
95
|
-
const UPDATE_CHECK_MS =
|
|
95
|
+
const UPDATE_CHECK_MS = 60_000; // 60 seconds
|
|
96
96
|
const UPDATE_DRAIN_MS = 10 * 60 * 1000; // wait for in-flight jobs before restarting
|
|
97
97
|
const UPDATE_PAUSE_MS = 6 * 60 * 60 * 1000; // after an update that installed nothing newer
|
|
98
98
|
const SHUTDOWN_DEADLINE_MS = 5_000; // hard exit: a half-shut daemon must never outlive its pidfile
|
|
@@ -492,6 +492,11 @@ async function runDaemon(args, ctx) {
|
|
|
492
492
|
|
|
493
493
|
return {
|
|
494
494
|
...base,
|
|
495
|
+
// Every provider daemon implements NIP-44 prompt and response
|
|
496
|
+
// encryption. Publish the capability so the control plane can
|
|
497
|
+
// exclude daemons that have not upgraded yet.
|
|
498
|
+
e2e_capable: true,
|
|
499
|
+
e2e_version: 'nip44-v2',
|
|
495
500
|
...(bench ? { bench } : {}),
|
|
496
501
|
load,
|
|
497
502
|
...(reachable ? { reachable } : {}),
|
|
@@ -544,11 +549,15 @@ async function runDaemon(args, ctx) {
|
|
|
544
549
|
recordBench(result);
|
|
545
550
|
resultPayload = {
|
|
546
551
|
type: 'chat',
|
|
547
|
-
text: result.text,
|
|
548
552
|
token_count: result.token_count,
|
|
549
553
|
duration_ms: result.duration_ms,
|
|
550
554
|
completed_by: node.nodeId
|
|
551
555
|
};
|
|
556
|
+
// For an E2E job, response text was delivered in encrypted
|
|
557
|
+
// job events. Do not send a plaintext copy in the completion
|
|
558
|
+
// payload, which is readable by the control plane.
|
|
559
|
+
if (result.e2e) resultPayload.e2e = true;
|
|
560
|
+
else resultPayload.text = result.text;
|
|
552
561
|
} else {
|
|
553
562
|
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
554
563
|
resultPayload = { stub: true, completed_by: node.nodeId };
|
|
@@ -1621,7 +1630,7 @@ async function runDaemon(args, ctx) {
|
|
|
1621
1630
|
if (typeof trainingTimer.unref === 'function') trainingTimer.unref();
|
|
1622
1631
|
}
|
|
1623
1632
|
|
|
1624
|
-
// Self-update: check
|
|
1633
|
+
// Self-update: check the GitHub release feed every 60 seconds. If a newer version is
|
|
1625
1634
|
// available, pull the installer, re-generate any missing keys + re-register
|
|
1626
1635
|
// specs (idempotent), then re-exec so the new code is running immediately.
|
|
1627
1636
|
let isUpgrading = false;
|
|
@@ -1631,7 +1640,7 @@ async function runDaemon(args, ctx) {
|
|
|
1631
1640
|
// version. For a second daemon on the same install, e.g. an aggregator, so
|
|
1632
1641
|
// two daemons never run the installer at once.
|
|
1633
1642
|
const followOnly = process.env.INFERNET_AUTO_UPDATE === 'follow';
|
|
1634
|
-
const
|
|
1643
|
+
const checkForUpdate = async () => {
|
|
1635
1644
|
if (shuttingDown || isUpgrading || Date.now() < updatePausedUntil) return;
|
|
1636
1645
|
// Never start an upgrade under a running job; the next check retries.
|
|
1637
1646
|
if (stats.activeJobIds.size > 0) return;
|
|
@@ -1651,7 +1660,7 @@ async function runDaemon(args, ctx) {
|
|
|
1651
1660
|
}
|
|
1652
1661
|
// The installer can succeed without changing this install (a git checkout
|
|
1653
1662
|
// whose package.json lagged the release, or npm writing to another
|
|
1654
|
-
// prefix). Restarting then would rerun the same update every
|
|
1663
|
+
// prefix). Restarting then would rerun the same update every 60 seconds
|
|
1655
1664
|
// forever, so keep serving and try again much later.
|
|
1656
1665
|
const installed = readInstalledVersion();
|
|
1657
1666
|
if (!isNewerVersion(CURRENT_VERSION, installed)) {
|
|
@@ -1726,8 +1735,11 @@ async function runDaemon(args, ctx) {
|
|
|
1726
1735
|
}).unref();
|
|
1727
1736
|
|
|
1728
1737
|
process.exit(0);
|
|
1729
|
-
}
|
|
1738
|
+
};
|
|
1739
|
+
const updateTimer = setInterval(checkForUpdate, UPDATE_CHECK_MS);
|
|
1730
1740
|
if (typeof updateTimer.unref === 'function') updateTimer.unref();
|
|
1741
|
+
// Check immediately on startup, then repeat on the 60-second cadence.
|
|
1742
|
+
void checkForUpdate();
|
|
1731
1743
|
|
|
1732
1744
|
await new Promise(() => {});
|
|
1733
1745
|
return 0;
|
package/commands/update.js
CHANGED
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { spawn } from 'node:child_process';
|
|
12
|
+
import { compareVersions } from '@profullstack/cli';
|
|
12
13
|
import setup from './setup.js';
|
|
14
|
+
import { CURRENT_VERSION, fetchLatestVersion } from '../lib/version.js';
|
|
13
15
|
|
|
14
16
|
const HELP = `infernet update — pull latest CLI + autonomous post-upgrade setup
|
|
15
17
|
|
|
@@ -17,6 +19,9 @@ Usage:
|
|
|
17
19
|
infernet update [flags]
|
|
18
20
|
|
|
19
21
|
Flags:
|
|
22
|
+
--check Check for a newer release without installing it.
|
|
23
|
+
--force Reinstall when the published version matches (never downgrades).
|
|
24
|
+
--quiet Suppress routine update progress.
|
|
20
25
|
--skip-setup Just re-run the installer; don't run setup afterward.
|
|
21
26
|
--help Show this help.
|
|
22
27
|
|
|
@@ -43,8 +48,8 @@ function runShell(cmd) {
|
|
|
43
48
|
});
|
|
44
49
|
}
|
|
45
50
|
|
|
46
|
-
export async function pullLatestBinary() {
|
|
47
|
-
process.stdout.write(`\n→ Pulling latest CLI from ${INSTALLER_URL}\n\n`);
|
|
51
|
+
export async function pullLatestBinary({ quiet = false } = {}) {
|
|
52
|
+
if (!quiet) process.stdout.write(`\n→ Pulling latest CLI from ${INSTALLER_URL}\n\n`);
|
|
48
53
|
// INFERNET_AUTOSTART=0: the installer would otherwise run `infernet setup`,
|
|
49
54
|
// which restarts (or, next to infernet.service, duplicates) the daemon from
|
|
50
55
|
// inside its own self-update. Both callers run setup themselves afterwards.
|
|
@@ -62,7 +67,31 @@ export default async function update(args, ctx) {
|
|
|
62
67
|
return 0;
|
|
63
68
|
}
|
|
64
69
|
|
|
65
|
-
const
|
|
70
|
+
const quiet = args.has('quiet');
|
|
71
|
+
const latest = await fetchLatestVersion();
|
|
72
|
+
if (!latest) {
|
|
73
|
+
process.stderr.write('error: could not check the latest Infernet version; installer was not run.\n');
|
|
74
|
+
return 1;
|
|
75
|
+
}
|
|
76
|
+
const comparison = compareVersions(CURRENT_VERSION, latest);
|
|
77
|
+
if (comparison === null) {
|
|
78
|
+
process.stderr.write('error: invalid version from the Infernet update feed; installer was not run.\n');
|
|
79
|
+
return 1;
|
|
80
|
+
}
|
|
81
|
+
if (comparison > 0) {
|
|
82
|
+
if (!quiet) process.stdout.write(`Infernet ${CURRENT_VERSION} is newer than the published ${latest}; refusing to downgrade.\n`);
|
|
83
|
+
return 0;
|
|
84
|
+
}
|
|
85
|
+
if (comparison === 0 && !args.has('force')) {
|
|
86
|
+
if (!quiet) process.stdout.write(`Infernet ${CURRENT_VERSION} is already current; skipping reinstall.\n`);
|
|
87
|
+
return 0;
|
|
88
|
+
}
|
|
89
|
+
if (args.has('check')) {
|
|
90
|
+
if (!quiet) process.stdout.write(`Infernet update available: ${CURRENT_VERSION} → ${latest}.\n`);
|
|
91
|
+
return 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const ok = await pullLatestBinary({ quiet });
|
|
66
95
|
if (!ok) return 1;
|
|
67
96
|
|
|
68
97
|
if (args.has('skip-setup')) {
|
package/lib/chat-executor.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
import { createEngine, MSG } from "@infernetprotocol/engine";
|
|
16
16
|
import { loadConfig } from "./config.js";
|
|
17
|
-
import { getConversationKey, decrypt } from "./nip44.js";
|
|
17
|
+
import { getConversationKey, decrypt, encrypt } from "./nip44.js";
|
|
18
18
|
import { getModelKeyPair } from "./model-key.js";
|
|
19
19
|
|
|
20
20
|
// Flush the event buffer when it hits this many tokens OR when we haven't
|
|
@@ -55,9 +55,10 @@ function mergeTokens(events) {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
class EventBuffer {
|
|
58
|
-
constructor(client, jobId) {
|
|
58
|
+
constructor(client, jobId, conversationKey = null) {
|
|
59
59
|
this.client = client;
|
|
60
60
|
this.jobId = jobId;
|
|
61
|
+
this.conversationKey = conversationKey;
|
|
61
62
|
this.events = [];
|
|
62
63
|
this.lastFlush = Date.now();
|
|
63
64
|
}
|
|
@@ -72,13 +73,33 @@ class EventBuffer {
|
|
|
72
73
|
}
|
|
73
74
|
async flush() {
|
|
74
75
|
if (this.events.length === 0) return;
|
|
75
|
-
const batch = mergeTokens(this.events)
|
|
76
|
+
const batch = mergeTokens(this.events).map((event) => {
|
|
77
|
+
if (!this.conversationKey) return event;
|
|
78
|
+
if (event.event_type === "token") {
|
|
79
|
+
return {
|
|
80
|
+
...event,
|
|
81
|
+
data: { encrypted_text: encrypt(this.conversationKey, event.data?.text ?? "") }
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
if (event.event_type === "done") {
|
|
85
|
+
const { text = "", ...metadata } = event.data ?? {};
|
|
86
|
+
return {
|
|
87
|
+
...event,
|
|
88
|
+
data: {
|
|
89
|
+
...metadata,
|
|
90
|
+
encrypted_text: encrypt(this.conversationKey, text)
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
return event;
|
|
95
|
+
});
|
|
76
96
|
this.events = [];
|
|
77
97
|
this.lastFlush = Date.now();
|
|
78
98
|
try {
|
|
79
99
|
await this.client.postJobEvents(this.jobId, batch);
|
|
80
100
|
} catch (err) {
|
|
81
101
|
process.stderr.write(`postJobEvents failed: ${err?.message ?? err}\n`);
|
|
102
|
+
throw err;
|
|
82
103
|
}
|
|
83
104
|
}
|
|
84
105
|
}
|
|
@@ -210,7 +231,7 @@ export async function executeChatJob({ client, job, node }) {
|
|
|
210
231
|
}
|
|
211
232
|
|
|
212
233
|
const engine = await getEngineForModel(job.model_name);
|
|
213
|
-
const buffer = new EventBuffer(client, job.id);
|
|
234
|
+
const buffer = new EventBuffer(client, job.id, convKey);
|
|
214
235
|
|
|
215
236
|
const t0 = Date.now();
|
|
216
237
|
const generation = engine.generate({
|
|
@@ -262,7 +283,7 @@ export async function executeChatJob({ client, job, node }) {
|
|
|
262
283
|
|
|
263
284
|
await buffer.flush();
|
|
264
285
|
const duration_ms = Date.now() - t0;
|
|
265
|
-
return { text: accumulated, token_count: tokenCount, duration_ms };
|
|
286
|
+
return { text: accumulated, token_count: tokenCount, duration_ms, e2e: Boolean(convKey) };
|
|
266
287
|
}
|
|
267
288
|
|
|
268
289
|
export async function failChatJob({ client, jobId, message }) {
|
package/lib/recommender.js
CHANGED
|
@@ -19,35 +19,35 @@ export const CATALOG = [
|
|
|
19
19
|
// ── ultra-light (CPU / phone-tier GPU) ──
|
|
20
20
|
{ id: "tinyllama", name: "TinyLlama 1.1B", paramsB: 1.1, vramMin: 0, ramMin: 4, pullName: "tinyllama", backend: "ollama", quality: 2, speed: 10, useCases: ["chat","testing"], notes: "Good only for testing the stack." },
|
|
21
21
|
{ id: "llama3.2-1b", name: "Llama 3.2 1B", paramsB: 1, vramMin: 0, ramMin: 4, pullName: "llama3.2:1b", backend: "ollama", quality: 4, speed: 10, useCases: ["chat","summary"], notes: "Light, fast Q&A." },
|
|
22
|
-
{ id: "qwen2.5-1.5b", name: "Qwen2.5 1.5B", paramsB: 1.5, vramMin: 0, ramMin: 4, pullName: "qwen2.5:1.5b", backend: "ollama", quality: 5, speed: 9, useCases: ["chat","study"] },
|
|
22
|
+
{ id: "qwen2.5-1.5b", name: "Qwen2.5 1.5B", paramsB: 1.5, vramMin: 0, ramMin: 4, pullName: "qwen2.5:1.5b", backend: "ollama", quality: 5, speed: 9, useCases: ["chat","study","marketing"] },
|
|
23
23
|
|
|
24
24
|
// ── light (small GPU / 16GB RAM) ──
|
|
25
25
|
{ id: "llama3.2-3b", name: "Llama 3.2 3B", paramsB: 3, vramMin: 2, ramMin: 8, pullName: "llama3.2:3b", backend: "ollama", quality: 6, speed: 8, useCases: ["chat","study","agents"] },
|
|
26
|
-
{ id: "qwen2.5-3b", name: "Qwen2.5 3B", paramsB: 3, vramMin: 2, ramMin: 8, pullName: "qwen2.5:3b", backend: "ollama", quality: 6, speed: 8, useCases: ["chat","study"] },
|
|
26
|
+
{ id: "qwen2.5-3b", name: "Qwen2.5 3B", paramsB: 3, vramMin: 2, ramMin: 8, pullName: "qwen2.5:3b", backend: "ollama", quality: 6, speed: 8, useCases: ["chat","study","marketing"] },
|
|
27
27
|
{ id: "phi4-mini", name: "Phi-4 Mini 3.8B", paramsB: 3.8, vramMin: 4, ramMin: 8, pullName: "phi4-mini", backend: "ollama", quality: 8, speed: 7, useCases: ["chat","study","agents","coding"] },
|
|
28
28
|
{ id: "gemma3-4b", name: "Gemma 3 4B (vision)",paramsB: 4, vramMin: 4, ramMin: 8, pullName: "gemma3:4b", backend: "ollama", quality: 7, speed: 7, useCases: ["chat","vision","study"] },
|
|
29
29
|
|
|
30
30
|
// ── 7-8B (RTX 3060/4060+, 16GB+ RAM) ──
|
|
31
|
-
{ id: "qwen2.5-7b", name: "Qwen2.5 7B", paramsB: 7, vramMin: 6, ramMin: 16, pullName: "qwen2.5:7b", backend: "ollama", quality: 8, speed: 6, useCases: ["chat","study","coding","agents"] },
|
|
31
|
+
{ id: "qwen2.5-7b", name: "Qwen2.5 7B", paramsB: 7, vramMin: 6, ramMin: 16, pullName: "qwen2.5:7b", backend: "ollama", quality: 8, speed: 6, useCases: ["chat","study","coding","agents","marketing"] },
|
|
32
32
|
{ id: "llama3.1-8b", name: "Llama 3.1 8B", paramsB: 8, vramMin: 6, ramMin: 16, pullName: "llama3.1:8b", backend: "ollama", quality: 8, speed: 6, useCases: ["chat","study","agents"] },
|
|
33
33
|
{ id: "mistral-7b", name: "Mistral 7B", paramsB: 7, vramMin: 6, ramMin: 16, pullName: "mistral:7b", backend: "ollama", quality: 7, speed: 6, useCases: ["chat","study","coding"] },
|
|
34
34
|
{ id: "qwen2.5-coder-7b",name: "Qwen2.5 Coder 7B", paramsB: 7, vramMin: 6, ramMin: 16, pullName: "qwen2.5-coder:7b", backend: "ollama", quality: 9, speed: 6, useCases: ["coding","agents"], notes: "Best 7B coding model." },
|
|
35
35
|
{ id: "dolphin3-8b", name: "Dolphin 3 8B (uncensored)", paramsB: 8, vramMin: 6, ramMin: 16, pullName: "dolphin3:8b", backend: "ollama", quality: 8, speed: 6, useCases: ["chat","uncensored"], uncensored: true, notes: "Eric Hartford's Dolphin series, no alignment." },
|
|
36
|
-
{ id: "deepseek-r1-7b", name: "DeepSeek-R1 7B", paramsB: 7, vramMin: 6, ramMin: 16, pullName: "deepseek-r1:7b", backend: "ollama", quality: 8, speed: 4, useCases: ["study","coding","reasoning"], notes: "Reasoning-focused; slower because it thinks." },
|
|
36
|
+
{ id: "deepseek-r1-7b", name: "DeepSeek-R1 7B", paramsB: 7, vramMin: 6, ramMin: 16, pullName: "deepseek-r1:7b", backend: "ollama", quality: 8, speed: 4, useCases: ["study","coding","research","reasoning"], notes: "Reasoning-focused; slower because it thinks." },
|
|
37
37
|
{ id: "hermes3-llama3-8b",name:"Hermes 3 Llama-3.1 8B (uncensored)", paramsB: 8, vramMin: 8, ramMin: 16, pullName: "hf:NousResearch/Hermes-3-Llama-3.1-8B", backend: "vllm", quality: 8, speed: 6, useCases: ["chat","uncensored","agents"], uncensored: true },
|
|
38
38
|
|
|
39
39
|
// ── 13-14B (16GB+ VRAM) ──
|
|
40
|
-
{ id: "qwen2.5-14b", name: "Qwen2.5 14B", paramsB: 14, vramMin: 12, ramMin: 32, pullName: "qwen2.5:14b", backend: "ollama", quality: 9, speed: 5, useCases: ["chat","coding","study","agents"] },
|
|
40
|
+
{ id: "qwen2.5-14b", name: "Qwen2.5 14B", paramsB: 14, vramMin: 12, ramMin: 32, pullName: "qwen2.5:14b", backend: "ollama", quality: 9, speed: 5, useCases: ["chat","coding","study","agents","marketing"] },
|
|
41
41
|
{ id: "qwen2.5-coder-14b",name:"Qwen2.5 Coder 14B", paramsB: 14, vramMin: 12, ramMin: 32, pullName: "qwen2.5-coder:14b", backend: "ollama", quality: 9, speed: 5, useCases: ["coding","agents"] },
|
|
42
42
|
|
|
43
43
|
// ── 32B (24GB+ VRAM, RTX 4090 / A100 sweet spot) ──
|
|
44
44
|
{ id: "qwen3.5-9b-heretic", name: "Qwen3.5 9B Heretic (uncensored)", paramsB: 9, vramMin: 24, ramMin: 32, pullName: "hf:DavidAU/Qwen3.5-9B-Claude-4.6-HighIQ-THINKING-HERETIC-UNCENSORED", backend: "vllm", quality: 8, speed: 6, useCases: ["chat","uncensored","vision","agents","study"], uncensored: true },
|
|
45
|
-
{ id: "qwen2.5-32b", name: "Qwen2.5 32B", paramsB: 32, vramMin: 24, ramMin: 48, pullName: "qwen2.5:32b", backend: "ollama", quality: 9, speed: 4, useCases: ["chat","coding","study","agents"], notes: "Single-80GB-GPU sweet spot." },
|
|
45
|
+
{ id: "qwen2.5-32b", name: "Qwen2.5 32B", paramsB: 32, vramMin: 24, ramMin: 48, pullName: "qwen2.5:32b", backend: "ollama", quality: 9, speed: 4, useCases: ["chat","coding","study","agents","marketing","research"], notes: "Single-80GB-GPU sweet spot." },
|
|
46
46
|
{ id: "qwen2.5-coder-32b",name:"Qwen2.5 Coder 32B", paramsB: 32, vramMin: 24, ramMin: 48, pullName: "qwen2.5-coder:32b", backend: "ollama", quality: 10, speed: 4, useCases: ["coding","agents"] },
|
|
47
47
|
|
|
48
48
|
// ── 70B (40-80GB VRAM, Q4 fits 24GB) ──
|
|
49
|
-
{ id: "llama3.3-70b", name: "Llama 3.3 70B", paramsB: 70, vramMin: 40, ramMin: 64, pullName: "llama3.3:70b", backend: "ollama", quality: 10, speed: 3, useCases: ["chat","study","coding","agents"], notes: "Frontier-class at home with 80GB." },
|
|
50
|
-
{ id: "qwen2.5-72b", name: "Qwen2.5 72B", paramsB: 72, vramMin: 40, ramMin: 64, pullName: "qwen2.5:72b", backend: "ollama", quality: 10, speed: 3, useCases: ["chat","coding","study","agents"] },
|
|
49
|
+
{ id: "llama3.3-70b", name: "Llama 3.3 70B", paramsB: 70, vramMin: 40, ramMin: 64, pullName: "llama3.3:70b", backend: "ollama", quality: 10, speed: 3, useCases: ["chat","study","coding","agents","marketing"], notes: "Frontier-class at home with 80GB." },
|
|
50
|
+
{ id: "qwen2.5-72b", name: "Qwen2.5 72B", paramsB: 72, vramMin: 40, ramMin: 64, pullName: "qwen2.5:72b", backend: "ollama", quality: 10, speed: 3, useCases: ["chat","coding","study","agents","marketing","research"] },
|
|
51
51
|
|
|
52
52
|
// ── MoE (high VRAM, vLLM only) ──
|
|
53
53
|
{ id: "mixtral-8x7b", name: "Mixtral 8x7B", paramsB: 47, vramMin: 30, ramMin: 64, pullName: "dolphin-mixtral:8x7b", backend: "ollama", quality: 9, speed: 5, useCases: ["chat","coding","uncensored"], uncensored: true },
|
|
@@ -98,7 +98,7 @@ function scoreModel(m, { vramGb, ramGb, useCase }) {
|
|
|
98
98
|
* @param {object} opts
|
|
99
99
|
* @param {number} opts.vramGb
|
|
100
100
|
* @param {number} opts.ramGb
|
|
101
|
-
* @param {string} [opts.useCase] chat | coding | study | agents | uncensored | vision
|
|
101
|
+
* @param {string} [opts.useCase] chat | marketing | research | coding | study | agents | uncensored | vision
|
|
102
102
|
* @param {boolean} [opts.uncensoredOnly]
|
|
103
103
|
* @param {number} [opts.limit=3]
|
|
104
104
|
* @returns {Array<{model, score, fits}>}
|
package/lib/version.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
2
|
import { join, dirname } from 'node:path';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
3
4
|
import { fileURLToPath } from 'node:url';
|
|
4
5
|
|
|
5
6
|
const _dir = dirname(fileURLToPath(import.meta.url));
|
|
@@ -9,26 +10,39 @@ export const CURRENT_VERSION = readInstalledVersion();
|
|
|
9
10
|
* The version on disk right now, read fresh (CURRENT_VERSION is what this
|
|
10
11
|
* process started with). Self-update compares the two after the installer
|
|
11
12
|
* runs: if nothing newer landed, restarting would only repeat the same update
|
|
12
|
-
* every
|
|
13
|
+
* every 60 seconds.
|
|
13
14
|
*/
|
|
14
15
|
export function readInstalledVersion() {
|
|
16
|
+
const versions = [];
|
|
15
17
|
try {
|
|
16
|
-
|
|
17
|
-
} catch {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
versions.push(JSON.parse(readFileSync(join(_dir, '../package.json'), 'utf8')).version);
|
|
19
|
+
} catch { /* this install may be a source checkout, not an npm package */ }
|
|
20
|
+
|
|
21
|
+
// When npm is behind master, install.sh deliberately switches to the git
|
|
22
|
+
// checkout at ~/.infernet/source. The running process still imports this
|
|
23
|
+
// helper from its old npm package, so its adjacent package.json stays at
|
|
24
|
+
// the old version even though the source install and wrapper now point at
|
|
25
|
+
// the newer CLI. Include that source version or the updater will pause for
|
|
26
|
+
// six hours and never restart into the version it just installed.
|
|
27
|
+
const sourceHome = process.env.INFERNET_HOME || join(homedir(), '.infernet');
|
|
28
|
+
try {
|
|
29
|
+
versions.push(JSON.parse(readFileSync(join(sourceHome, 'source', 'apps', 'cli', 'package.json'), 'utf8')).version);
|
|
30
|
+
} catch { /* no source install */ }
|
|
31
|
+
|
|
32
|
+
return versions.reduce((latest, version) =>
|
|
33
|
+
typeof version === 'string' && isNewerVersion(latest, version) ? version : latest,
|
|
34
|
+
'0.0.0');
|
|
20
35
|
}
|
|
21
36
|
|
|
22
37
|
export async function fetchLatestVersion() {
|
|
23
38
|
try {
|
|
24
39
|
const res = await fetch(
|
|
25
|
-
'https://
|
|
26
|
-
{ headers: { accept: 'application/
|
|
40
|
+
'https://infernetprotocol.com/api/cli/latest-version',
|
|
41
|
+
{ headers: { accept: 'application/json', 'user-agent': 'infernet-daemon' }, signal: AbortSignal.timeout(10_000) }
|
|
27
42
|
);
|
|
28
43
|
if (!res.ok) return null;
|
|
29
44
|
const data = await res.json();
|
|
30
|
-
|
|
31
|
-
return tag;
|
|
45
|
+
return typeof data.version === 'string' ? data.version.replace(/^v/, '') : null;
|
|
32
46
|
} catch {
|
|
33
47
|
return null;
|
|
34
48
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infernetprotocol/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.78",
|
|
4
4
|
"description": "GPU-node CLI / daemon for the Infernet Protocol — register a GPU server with a Supabase control plane and start earning.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,19 +25,20 @@
|
|
|
25
25
|
"@noble/ciphers": "^2.4.0",
|
|
26
26
|
"@noble/curves": "^2.4.0",
|
|
27
27
|
"@noble/hashes": "^2.4.0",
|
|
28
|
+
"@profullstack/cli": "^0.2.0",
|
|
28
29
|
"@profullstack/x402-client": "^0.3.0",
|
|
29
30
|
"blessed": "^0.1.81",
|
|
30
31
|
"dotenv": "^18.0.9",
|
|
31
32
|
"ora": "^9.4.1",
|
|
32
33
|
"react": "^17.0.2",
|
|
33
34
|
"react-blessed": "^0.7.2",
|
|
34
|
-
"@infernetprotocol/auth": "0.1.
|
|
35
|
-
"@infernetprotocol/config": "0.1.
|
|
36
|
-
"@infernetprotocol/
|
|
37
|
-
"@infernetprotocol/gpu": "0.1.
|
|
38
|
-
"@infernetprotocol/
|
|
39
|
-
"@infernetprotocol/
|
|
40
|
-
"@infernetprotocol/
|
|
35
|
+
"@infernetprotocol/auth": "0.1.78",
|
|
36
|
+
"@infernetprotocol/config": "0.1.78",
|
|
37
|
+
"@infernetprotocol/deploy-providers": "0.1.78",
|
|
38
|
+
"@infernetprotocol/gpu": "0.1.78",
|
|
39
|
+
"@infernetprotocol/engine": "0.1.78",
|
|
40
|
+
"@infernetprotocol/liquid-agent": "0.1.78",
|
|
41
|
+
"@infernetprotocol/rpc-adapter": "0.1.78"
|
|
41
42
|
},
|
|
42
43
|
"repository": {
|
|
43
44
|
"type": "git",
|