Deepen supercomputer category with shared base and expanded APIs.

Adds supercomputer-base helpers, richer job/shard/steal/thermal modules,
priority jobs, claimMatching, and bumps all 14 modules to 0.3.1.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 01:40:29 -04:00
co-authored by Cursor
parent cacab441af
commit d89b56d782
32 changed files with 446 additions and 74 deletions
+8 -5
View File
@@ -2,6 +2,7 @@ require('bare-process/global')
const EventEmitter = require('bare-events')
const b4a = require('b4a')
const { initModuleSwarm, gossipSend } = require('../../_shared/p2p-bare.js')
const { normalizePeerId, clusterStats, mbToBytes } = require('../../_shared/supercomputer-base.js')
const PROTOCOL = 'ram-pool/v1'
@@ -97,14 +98,16 @@ class HyperP2PRamPool extends EventEmitter {
return this
}
claimMb (ramMb, borrowerId = null) {
return this.claim(mbToBytes(ramMb), borrowerId)
}
getStats () {
return {
...this._stats,
return clusterStats(this._stats, PROTOCOL, {
lenders: this._pool.size,
leases: this._leases.size,
poolTotal: this.poolTotal(),
protocol: PROTOCOL
}
poolTotal: this.poolTotal()
})
}
async close () {
@@ -1,6 +1,6 @@
{
"name": "hyper-p2p-ram-pool",
"version": "0.3.0",
"version": "0.3.1",
"description": "P2P RAM byte lending and leases for Bare/Pear P2P supercomputer mesh.",
"main": "index.js",
"type": "commonjs",