Massive Supercomputer pass: mesh factory, compute-shard, fabric depth

Turn the category into a production-ready unified virtual supercomputer.

New:
- _shared/supercomputer-mesh.js — createSupercomputerMesh() wires all 14 modules
- hyper-p2p-compute-shard — round-robin workload sharding across cluster peers

cluster-fabric:
- canFit, broadcastSnapshot, completeClusterRun
- cluster-snapshot gossip; fix RAM lend on publishNode

Pool modules — introspection helpers:
- capacity-registry: meetsRequirements, exportClusterView, listPeerIds
- cpu-share: totalPool, hasBalance
- ram-pool: lendMb, listLenders, availableBytes, listLeases
- disk-stripe: reassemble, clusterDiskBytes
- job-dispatcher: listJobs, runningCount, cancelJob
- gpu-slot: reserveCount, clusterGpuSlots
- bandwidth-share: clusterMbps
- net-gateway: bestGateway, totalCapacityBytes
- thermal-guard: throttledPeerIds, healthyPeerIds
- cluster-affinity: bestPeer
- work-stealer: totalPending, stealFromBusiest
- cache-farm: has, keys

Docs: SUPERCOMPUTER_LAYERS, category README, cluster-fabric api.md
Examples: demo-supercomputer-mesh uses createSupercomputerMesh

Registry: 166 modules (14 supercomputer)
Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 00:45:58 -04:00
co-authored by Cursor
parent 03151a4cfc
commit e67097f62b
28 changed files with 2396 additions and 112 deletions
@@ -69,6 +69,24 @@ class HyperP2PDiskStripe extends EventEmitter {
listStripeIds () { return [...this._stripes.keys()] }
reassemble (stripeId) {
const stripe = this._stripes.get(stripeId)
if (!stripe || stripe.shards.size !== stripe.pathCount) return null
const parts = []
for (let i = 0; i < stripe.pathCount; i++) {
const s = stripe.shards.get(i)
if (!s) return null
parts.push(b4a.from(s.data, 'hex'))
}
return b4a.concat(parts)
}
clusterDiskBytes () {
let t = 0
for (const s of this._stripes.values()) t += s.sizeBytes
return t
}
async ready () {
if (this.swarm || !this.topic) return this
await initModuleSwarm(this, {