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:
@@ -102,6 +102,17 @@ class HyperP2PAutobaseIndexerBus extends EventEmitter {
|
||||
return this._subs.size
|
||||
}
|
||||
|
||||
unsubscribeAll () {
|
||||
const n = this._subs.size
|
||||
this._subs.clear()
|
||||
return n
|
||||
}
|
||||
|
||||
publishBatch (events) {
|
||||
if (!Array.isArray(events)) throw new Error('events array required')
|
||||
return events.map((e) => this.publishIndexEvent(e.type, e.payload))
|
||||
}
|
||||
|
||||
_onGossip (d) {
|
||||
if (!d || d.type !== 'index-event' || !d.evt) return
|
||||
this._stats.gossipIn++
|
||||
|
||||
@@ -78,6 +78,14 @@ class HyperP2PAutobaseLightWriter extends EventEmitter {
|
||||
return n
|
||||
}
|
||||
|
||||
isFull () {
|
||||
return this._ops.length >= this.maxBatch
|
||||
}
|
||||
|
||||
slotsRemaining () {
|
||||
return Math.max(0, this.maxBatch - this._ops.length)
|
||||
}
|
||||
|
||||
getStats () {
|
||||
return autobaseStats(this._stats, PROTOCOL, {
|
||||
pending: this._ops.length,
|
||||
|
||||
@@ -89,6 +89,10 @@ class HyperP2PAutobaseViewSync extends EventEmitter {
|
||||
return this.publishView(version)
|
||||
}
|
||||
|
||||
isSynced (version) {
|
||||
return this._view.version >= version
|
||||
}
|
||||
|
||||
_onGossip (d) {
|
||||
if (!d || d.type !== 'view-sync' || !d.view) return
|
||||
this._stats.gossipIn++
|
||||
|
||||
Reference in New Issue
Block a user