Expand supercomputer, pear, storage, network, and workflow modules
Add manual API helpers across categories: net gateway capacity, compute shard plan cancel, ram pool lease release, pear target matrix and bundle/detached registry clears, argv flag reset, autobase writer full/slots, view sync isSynced, indexer bus batch publish, inverted index clear, blind relay and DHT hint listing, blind pair handoff cleanup, retransmission resolve all, version vector and OR-map clear, workflow graph complete-all-ready, and wire registry decode batch. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -99,6 +99,17 @@ class HyperP2PNetGateway extends EventEmitter {
|
||||
for (const id of this._gateways.keys()) this._usage.set(id, 0)
|
||||
}
|
||||
|
||||
gatewayCount () {
|
||||
return this._gateways.size
|
||||
}
|
||||
|
||||
remainingBytes (peerId) {
|
||||
const id = this._pid(peerId)
|
||||
const gw = this._gateways.get(id)
|
||||
if (!gw) return 0
|
||||
return Math.max(0, gw.maxBytes - (this._usage.get(id) || 0))
|
||||
}
|
||||
|
||||
async ready () {
|
||||
if (this.swarm || !this.topic) return this
|
||||
await initModuleSwarm(this, {
|
||||
|
||||
Reference in New Issue
Block a user