feat(supercomputer,experimental): expand thermal, RAM, disk, paradox APIs

Thermal hottest peer and sample clear, RAM pool reset, disk stripe
missing shards, paradox clock/merge helpers, mycelium top donors.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 02:33:33 -04:00
co-authored by Cursor
parent d285079522
commit 84bc18bc6e
7 changed files with 78 additions and 0 deletions
@@ -90,6 +90,23 @@ class HyperP2PThermalGuard extends EventEmitter {
return { cpu: this.cpuThreshold, ram: this.ramThreshold, tempC: this.tempThresholdC }
}
clearSample (peerId) {
return this._samples.delete(this._pid(peerId))
}
hottestPeer () {
let best = null
for (const s of this._samples.values()) {
const hot = s.cpuPct + s.ramPct + (s.tempC / 2)
if (!best || hot > best.hot) best = { peerId: s.peerId, hot, sample: s }
}
return best
}
sampleCount () {
return this._samples.size
}
async ready () {
if (this.swarm || !this.topic) return this
await initModuleSwarm(this, {