diff --git a/Cargo.lock b/Cargo.lock index f6313642..da61c792 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -486,7 +486,7 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" [[package]] name = "c0mpute-api" -version = "0.3.65" +version = "0.3.66" dependencies = [ "anyhow", "c0mpute-proto", @@ -501,7 +501,7 @@ dependencies = [ [[package]] name = "c0mpute-bench" -version = "0.3.65" +version = "0.3.66" dependencies = [ "anyhow", "blake3", @@ -512,7 +512,7 @@ dependencies = [ [[package]] name = "c0mpute-cli" -version = "0.3.65" +version = "0.3.66" dependencies = [ "anyhow", "async-trait", @@ -549,7 +549,7 @@ dependencies = [ [[package]] name = "c0mpute-core" -version = "0.3.65" +version = "0.3.66" dependencies = [ "aes-gcm", "anyhow", @@ -603,7 +603,7 @@ dependencies = [ [[package]] name = "c0mpute-doctor" -version = "0.3.65" +version = "0.3.66" dependencies = [ "anyhow", "serde", @@ -615,7 +615,7 @@ dependencies = [ [[package]] name = "c0mpute-envelope" -version = "0.3.65" +version = "0.3.66" dependencies = [ "blake3", "bs58", @@ -628,7 +628,7 @@ dependencies = [ [[package]] name = "c0mpute-gateway" -version = "0.3.65" +version = "0.3.66" dependencies = [ "anyhow", "axum", @@ -650,7 +650,7 @@ dependencies = [ [[package]] name = "c0mpute-market" -version = "0.3.65" +version = "0.3.66" dependencies = [ "c0mpute-envelope", "serde", @@ -660,7 +660,7 @@ dependencies = [ [[package]] name = "c0mpute-net" -version = "0.3.65" +version = "0.3.66" dependencies = [ "anyhow", "async-trait", @@ -681,7 +681,7 @@ dependencies = [ [[package]] name = "c0mpute-placement" -version = "0.3.65" +version = "0.3.66" dependencies = [ "anyhow", "async-trait", @@ -702,7 +702,7 @@ dependencies = [ [[package]] name = "c0mpute-proto" -version = "0.3.65" +version = "0.3.66" dependencies = [ "blake3", "hex", @@ -714,7 +714,7 @@ dependencies = [ [[package]] name = "c0mpute-sealed" -version = "0.3.65" +version = "0.3.66" dependencies = [ "aes", "aes-gcm", @@ -736,7 +736,7 @@ dependencies = [ [[package]] name = "c0mpute-secure-chat" -version = "0.3.65" +version = "0.3.66" dependencies = [ "aes-gcm", "anyhow", @@ -759,7 +759,7 @@ dependencies = [ [[package]] name = "c0mpute-store" -version = "0.3.65" +version = "0.3.66" dependencies = [ "anyhow", "blake3", @@ -778,7 +778,7 @@ dependencies = [ [[package]] name = "c0mpute-transcode" -version = "0.3.65" +version = "0.3.66" dependencies = [ "anyhow", "c0mpute-proto", @@ -791,7 +791,7 @@ dependencies = [ [[package]] name = "c0mpute-update" -version = "0.3.65" +version = "0.3.66" dependencies = [ "anyhow", "hex", @@ -806,7 +806,7 @@ dependencies = [ [[package]] name = "c0mpute-verify" -version = "0.3.65" +version = "0.3.66" dependencies = [ "anyhow", "blake3", diff --git a/Cargo.toml b/Cargo.toml index 8ed9cd48..3749314e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ members = [ ] [workspace.package] -version = "0.3.65" +version = "0.3.66" edition = "2024" license = "MIT" repository = "https://github.com/profullstack/c0mpute" diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 711f5bff..9a2f3f2c 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -2,7 +2,7 @@ "name": "@c0mpute/desktop", "productName": "c0mpute", "desktopName": "c0mpute-desktop.desktop", - "version": "0.3.65", + "version": "0.3.66", "private": true, "type": "module", "description": "c0mpute desktop: chat, agent with your MCP servers and skills, node manager, hosting and tasks, with the c0mpute CLI bundled.", diff --git a/apps/tui/package.json b/apps/tui/package.json index d5c29373..b78f5805 100644 --- a/apps/tui/package.json +++ b/apps/tui/package.json @@ -1,6 +1,6 @@ { "name": "@c0mpute/tui", - "version": "0.3.65", + "version": "0.3.66", "private": true, "type": "module", "bin": { diff --git a/apps/web/package.json b/apps/web/package.json index 63b5e321..67f88815 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,6 +1,6 @@ { "name": "c0mpute", - "version": "0.3.65", + "version": "0.3.66", "private": true, "type": "module", "scripts": { diff --git a/apps/web/src/app/releases/latest.json/route.ts b/apps/web/src/app/releases/latest.json/route.ts index ada47fcc..3b0f933b 100644 --- a/apps/web/src/app/releases/latest.json/route.ts +++ b/apps/web/src/app/releases/latest.json/route.ts @@ -28,7 +28,7 @@ export const dynamic = "force-dynamic"; * this in sync with the workspace version in `Cargo.toml` on each release so a * freshly built CLI reports "already latest" rather than a phantom upgrade. */ -const FALLBACK_VERSION = "0.3.65"; +const FALLBACK_VERSION = "0.3.66"; const FALLBACK_MIN_REQUIRED = "0.0.1"; type Channel = "stable" | "beta" | "nightly"; diff --git a/apps/web/src/lib/nodes.ts b/apps/web/src/lib/nodes.ts index f184ab56..b82c773b 100644 --- a/apps/web/src/lib/nodes.ts +++ b/apps/web/src/lib/nodes.ts @@ -1,5 +1,5 @@ import "server-only"; -import { fetchFromAggregators } from "./aggregators"; +import { aggregatorUrls } from "./aggregators"; import { OPERATOR_SHARE_PCT } from "./market"; /** @@ -170,12 +170,52 @@ export function publicRow(row: NodeRow & { cpu?: unknown }): NodeRow { return rest; } +type RawNodes = Omit; + +/** + * Overlay each node's 24h job stats from every aggregator onto `base`, taking + * for each node the answer that counted the most jobs. Each aggregator keeps + * its 24h window in memory, so one restarted by a deploy starts at zero while + * another still holds the whole day; the board should show the fuller one. + */ +export function mergeJobStats(base: NodeRow[], answers: RawNodes[]): NodeRow[] { + const best = new Map(); + for (const a of answers) { + for (const n of Array.isArray(a.nodes) ? a.nodes : []) { + const j = n.jobs_24h; + if (!j || !(j.jobs > 0)) continue; + const cur = best.get(n.id); + if (!cur || j.jobs > cur.jobs) best.set(n.id, j); + } + } + return base.map((n) => { + const j = best.get(n.id); + return j ? { ...n, jobs_24h: j } : n; + }); +} + +async function fetchNodesFrom(base: string): Promise { + try { + const r = await fetch(`${base}/nodes`, { signal: AbortSignal.timeout(2_000), cache: "no-store" }); + return r.ok ? ((await r.json()) as RawNodes) : null; + } catch { + return null; + } +} + export async function getNodesPayload(): Promise { - const data = await fetchFromAggregators>("/nodes"); + const answers = (await Promise.all(aggregatorUrls().map(fetchNodesFrom))).filter( + (a): a is RawNodes => a !== null && typeof a === "object", + ); + // The board itself comes from the aggregator that sees the most workers. + const data = answers.reduce( + (b, a) => (b === null || (a.workers_online ?? 0) > (b.workers_online ?? 0) ? a : b), + null, + ); if (data) { return { ...data, - nodes: Array.isArray(data.nodes) ? data.nodes.map(publicRow) : [], + nodes: mergeJobStats(Array.isArray(data.nodes) ? data.nodes.map(publicRow) : [], answers), operators: Array.isArray(data.operators) ? data.operators : [], referrers: Array.isArray(data.referrers) ? data.referrers : [], source: "aggregator", diff --git a/package.json b/package.json index 10796b21..05780fae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "c0mpute-monorepo", - "version": "0.3.65", + "version": "0.3.66", "private": true, "workspaces": [ "apps/*", diff --git a/packages/captcha/package.json b/packages/captcha/package.json index 52b286ae..e06deb6e 100644 --- a/packages/captcha/package.json +++ b/packages/captcha/package.json @@ -1,6 +1,6 @@ { "name": "@profullstack/c0mpute-captcha", - "version": "0.3.65", + "version": "0.3.66", "description": "Solve image, slider, gap, click-text, audio and math captchas on the c0mpute network: library (fetch().then(solveCaptcha)), CLI and stdio MCP server.", "type": "module", "license": "MIT", diff --git a/packages/shared/package.json b/packages/shared/package.json index c6065bfb..770a930e 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@c0mpute/shared", - "version": "0.3.65", + "version": "0.3.66", "private": true, "type": "module", "main": "./dist/index.js", diff --git a/plugins/ad-generator-agent/module.toml b/plugins/ad-generator-agent/module.toml index b000c5f9..afa10c47 100644 --- a/plugins/ad-generator-agent/module.toml +++ b/plugins/ad-generator-agent/module.toml @@ -21,7 +21,7 @@ [module] id = "ad-generator-agent" name = "Ad Generator Agent — every ad type from one URL" -version = "0.3.65" +version = "0.3.66" kind = "service" category = "applications" status = "available" diff --git a/plugins/ads-manager/module.toml b/plugins/ads-manager/module.toml index 36bdd7c4..eb6b06f2 100644 --- a/plugins/ads-manager/module.toml +++ b/plugins/ads-manager/module.toml @@ -38,7 +38,7 @@ [module] id = "ads-manager" name = "Ads Manager — shared ad operations layer" -version = "0.3.65" +version = "0.3.66" kind = "service" category = "applications" status = "partial" diff --git a/plugins/apps/module.toml b/plugins/apps/module.toml index b0c5ae01..6dd0869b 100644 --- a/plugins/apps/module.toml +++ b/plugins/apps/module.toml @@ -18,7 +18,7 @@ [module] id = "apps" name = "Apps — backends with 3x redundancy" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "infrastructure" status = "available" diff --git a/plugins/captcha/module.toml b/plugins/captcha/module.toml index cb1067be..34ecebf8 100644 --- a/plugins/captcha/module.toml +++ b/plugins/captcha/module.toml @@ -22,7 +22,7 @@ [module] id = "captcha" name = "Captcha — image, slider, audio and math solving" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "ai" status = "available" diff --git a/plugins/coinpay/module.toml b/plugins/coinpay/module.toml index 66ea5cf3..00891667 100644 --- a/plugins/coinpay/module.toml +++ b/plugins/coinpay/module.toml @@ -7,7 +7,7 @@ [module] id = "coinpay" name = "CoinPay — DID, payments, escrow, reputation" -version = "0.3.65" +version = "0.3.66" kind = "service" category = "applications" status = "available" diff --git a/plugins/containers/module.toml b/plugins/containers/module.toml index 9be47d1b..cd9a3d88 100644 --- a/plugins/containers/module.toml +++ b/plugins/containers/module.toml @@ -15,7 +15,7 @@ [module] id = "containers" name = "Containers — remote docker builds and jobs" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "developer" status = "available" diff --git a/plugins/crawl/module.toml b/plugins/crawl/module.toml index b868e817..f2daba86 100644 --- a/plugins/crawl/module.toml +++ b/plugins/crawl/module.toml @@ -8,7 +8,7 @@ [module] id = "crawl" name = "Crawl — distributed web fetching" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "data" status = "available" diff --git a/plugins/crowdgpt/module.toml b/plugins/crowdgpt/module.toml index 0e064bfc..8669363a 100644 --- a/plugins/crowdgpt/module.toml +++ b/plugins/crowdgpt/module.toml @@ -43,7 +43,7 @@ [module] id = "crowdgpt" name = "CrowdGPT: donate idle compute" -version = "0.3.65" +version = "0.3.66" kind = "donation" category = "ai" status = "available" diff --git a/plugins/ctv-ads/module.toml b/plugins/ctv-ads/module.toml index 62824e5a..038684d3 100644 --- a/plugins/ctv-ads/module.toml +++ b/plugins/ctv-ads/module.toml @@ -28,7 +28,7 @@ [module] id = "ctv-ads" name = "CTV Ads — VAST and VMAP from every gateway" -version = "0.3.65" +version = "0.3.66" kind = "service" category = "applications" status = "partial" diff --git a/plugins/diffusion/module.toml b/plugins/diffusion/module.toml index 99b78617..cb1946ba 100644 --- a/plugins/diffusion/module.toml +++ b/plugins/diffusion/module.toml @@ -11,7 +11,7 @@ [module] id = "diffusion" name = "Diffusion — image generation" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "ai" status = "available" diff --git a/plugins/embed/module.toml b/plugins/embed/module.toml index 6ff7c629..9677b3c5 100644 --- a/plugins/embed/module.toml +++ b/plugins/embed/module.toml @@ -19,7 +19,7 @@ [module] id = "embed" name = "Embeddings — vector generation" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "ai" status = "available" diff --git a/plugins/gameserver/module.toml b/plugins/gameserver/module.toml index 4ecb74cd..faee6728 100644 --- a/plugins/gameserver/module.toml +++ b/plugins/gameserver/module.toml @@ -55,7 +55,7 @@ [module] id = "gameserver" name = "Game server — Minecraft / Factorio / Valheim" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "infrastructure" status = "available" diff --git a/plugins/git/module.toml b/plugins/git/module.toml index d1bd2072..2174ca5b 100644 --- a/plugins/git/module.toml +++ b/plugins/git/module.toml @@ -32,7 +32,7 @@ [module] id = "git" name = "Git — p2p repo hosting" -version = "0.3.65" +version = "0.3.66" kind = "service" category = "data" status = "partial" diff --git a/plugins/hosting/module.toml b/plugins/hosting/module.toml index cceac060..ac9af800 100644 --- a/plugins/hosting/module.toml +++ b/plugins/hosting/module.toml @@ -30,7 +30,7 @@ [module] id = "hosting" name = "Hosting — p2p static sites" -version = "0.3.65" +version = "0.3.66" kind = "service" category = "data" status = "available" diff --git a/plugins/infernet/module.toml b/plugins/infernet/module.toml index ce4cf3cb..df83f91c 100644 --- a/plugins/infernet/module.toml +++ b/plugins/infernet/module.toml @@ -22,7 +22,7 @@ [module] id = "infernet" name = "Infernet Protocol — AI inference" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "ai" status = "available" diff --git a/plugins/live-stream/module.toml b/plugins/live-stream/module.toml index 7b4f6cda..4163d4dd 100644 --- a/plugins/live-stream/module.toml +++ b/plugins/live-stream/module.toml @@ -34,7 +34,7 @@ [module] id = "live-stream" name = "Live Stream — p2p HLS live streaming" -version = "0.3.65" +version = "0.3.66" kind = "service" category = "media" status = "available" diff --git a/plugins/music/module.toml b/plugins/music/module.toml index e6e995aa..52f04752 100644 --- a/plugins/music/module.toml +++ b/plugins/music/module.toml @@ -15,7 +15,7 @@ [module] id = "music" name = "Music — song generation (ACE-Step 1.5)" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "ai" status = "available" diff --git a/plugins/ocr/module.toml b/plugins/ocr/module.toml index fa579030..cff9ca68 100644 --- a/plugins/ocr/module.toml +++ b/plugins/ocr/module.toml @@ -19,7 +19,7 @@ [module] id = "ocr" name = "OCR — document text extraction" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "ai" status = "available" diff --git a/plugins/podcast-ads/module.toml b/plugins/podcast-ads/module.toml index 76e8aaa4..efa29d6b 100644 --- a/plugins/podcast-ads/module.toml +++ b/plugins/podcast-ads/module.toml @@ -31,7 +31,7 @@ [module] id = "podcast-ads" name = "Podcast Ads — dynamic ad insertion" -version = "0.3.65" +version = "0.3.66" kind = "service" category = "applications" status = "partial" diff --git a/plugins/podcasting/module.toml b/plugins/podcasting/module.toml index ec521b38..92050220 100644 --- a/plugins/podcasting/module.toml +++ b/plugins/podcasting/module.toml @@ -24,7 +24,7 @@ [module] id = "podcasting" name = "Podcasting — p2p podcast publishing" -version = "0.3.65" +version = "0.3.66" kind = "service" category = "media" status = "available" diff --git a/plugins/podcasts/module.toml b/plugins/podcasts/module.toml index 808e2bb0..eb2d980d 100644 --- a/plugins/podcasts/module.toml +++ b/plugins/podcasts/module.toml @@ -24,7 +24,7 @@ [module] id = "podcasts" name = "Podcasts — p2p podcast listener" -version = "0.3.65" +version = "0.3.66" kind = "service" category = "media" status = "available" diff --git a/plugins/render/module.toml b/plugins/render/module.toml index 28735f1c..0ec06d3d 100644 --- a/plugins/render/module.toml +++ b/plugins/render/module.toml @@ -33,7 +33,7 @@ [module] id = "render" name = "Render — Blender 3D rendering" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "media" status = "available" diff --git a/plugins/secure-chat/module.toml b/plugins/secure-chat/module.toml index c16b4c8a..620b26ab 100644 --- a/plugins/secure-chat/module.toml +++ b/plugins/secure-chat/module.toml @@ -21,7 +21,7 @@ [module] id = "secure-chat" name = "Secure Chat — E2E encrypted p2p messaging" -version = "0.3.65" +version = "0.3.66" kind = "service" category = "applications" status = "available" diff --git a/plugins/storage/module.toml b/plugins/storage/module.toml index 5d3c5e35..f920ecbf 100644 --- a/plugins/storage/module.toml +++ b/plugins/storage/module.toml @@ -20,7 +20,7 @@ [module] id = "storage" name = "Storage — Reed-Solomon shard service" -version = "0.3.65" +version = "0.3.66" kind = "service" category = "data" status = "available" diff --git a/plugins/threatcrush/module.toml b/plugins/threatcrush/module.toml index 87e15c5d..0e895173 100644 --- a/plugins/threatcrush/module.toml +++ b/plugins/threatcrush/module.toml @@ -19,7 +19,7 @@ [module] id = "threatcrush" name = "ThreatCrush — protect this node" -version = "0.3.65" +version = "0.3.66" kind = "service" category = "infrastructure" status = "available" diff --git a/plugins/train/module.toml b/plugins/train/module.toml index 4adf235c..e0d5adea 100644 --- a/plugins/train/module.toml +++ b/plugins/train/module.toml @@ -55,7 +55,7 @@ [module] id = "train" name = "Fine-tune — LoRA training" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "ai" status = "available" diff --git a/plugins/transcode/module.toml b/plugins/transcode/module.toml index d8301299..220392ac 100644 --- a/plugins/transcode/module.toml +++ b/plugins/transcode/module.toml @@ -7,7 +7,7 @@ [module] id = "transcode" name = "FFmpeg Transcoding" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "media" status = "available" diff --git a/plugins/tts/module.toml b/plugins/tts/module.toml index 1846daf3..76a9ad3d 100644 --- a/plugins/tts/module.toml +++ b/plugins/tts/module.toml @@ -15,7 +15,7 @@ [module] id = "tts" name = "TTS — text-to-speech" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "ai" status = "available" diff --git a/plugins/video/module.toml b/plugins/video/module.toml index 8b15141b..c0ba454d 100644 --- a/plugins/video/module.toml +++ b/plugins/video/module.toml @@ -65,7 +65,7 @@ [module] id = "video" name = "Video — generation (Wan 2.2, Wan 2.1 1.3B on 8 GiB or CPU, LTX-2.3 with audio)" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "ai" status = "available" diff --git a/plugins/webhook/module.toml b/plugins/webhook/module.toml index 3ba95531..e687ffb2 100644 --- a/plugins/webhook/module.toml +++ b/plugins/webhook/module.toml @@ -7,7 +7,7 @@ [module] id = "webhook" name = "Webhooks — paid, end-to-end encrypted delivery" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "infrastructure" status = "available" diff --git a/plugins/whisper/module.toml b/plugins/whisper/module.toml index b245c1ce..129592e7 100644 --- a/plugins/whisper/module.toml +++ b/plugins/whisper/module.toml @@ -7,7 +7,7 @@ [module] id = "whisper" name = "Whisper — speech-to-text" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "ai" status = "available" diff --git a/plugins/workflow-step/module.toml b/plugins/workflow-step/module.toml index 5608e328..bc802f25 100644 --- a/plugins/workflow-step/module.toml +++ b/plugins/workflow-step/module.toml @@ -14,7 +14,7 @@ [module] id = "workflow-step" name = "Workflow step — webhook workflow steps (meshhook)" -version = "0.3.65" +version = "0.3.66" kind = "workload" category = "infrastructure" status = "available" diff --git a/plugins/x402/module.toml b/plugins/x402/module.toml index 35e502e7..4c74ab8e 100644 --- a/plugins/x402/module.toml +++ b/plugins/x402/module.toml @@ -21,7 +21,7 @@ [module] id = "x402" name = "x402 — charge bots for hosted files" -version = "0.3.65" +version = "0.3.66" kind = "service" category = "applications" status = "available"