Expand collab, network-stack, messaging, storage, pear, and experimental modules

Add manual helpers: overlay topology neighbor management, stream chunker
drainAll, whiteboard and line-lock clear, fork picker and cursor presence
bulk ops, anycast unregister, bandwidth broker reset, log gossip filtering,
bee tombstone clear, gossip mesh clearSeen, update gossip unsubscribeAll,
congestion throttled peers, histogram reset, preflight cancelAll, sticky
session clearAll, gravity well and collab room bulk helpers, stream resume
reset, stream transform clearPending, entropy spiral advanceBatch, and
related list/clear utilities.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 02:56:47 -04:00
co-authored by Cursor
parent aa2de03538
commit 5a24a4eec8
21 changed files with 226 additions and 0 deletions
@@ -50,6 +50,24 @@ class HyperP2POverlayTopology extends EventEmitter {
neighborCount () { return this._neighbors.size }
neighborIds () {
return [...this._neighbors.keys()]
}
clearAll () {
const n = this._neighbors.size
this._neighbors.clear()
return n
}
lightestNeighbor () {
let best = null
for (const n of this._neighbors.values()) {
if (!best || n.weight < best.weight) best = n
}
return best
}
suggestReplacement (failedPeer) {
if (!failedPeer) throw new Error('failedPeer required')
let best = null