Expand module APIs across pear, network, experimental, and ops categories.

Add batch helpers, counts, and management utilities so modules expose consistent peer, lease, queue, and telemetry surfaces.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 03:22:25 -04:00
co-authored by Cursor
parent c2282bd2b9
commit dec3956846
23 changed files with 199 additions and 0 deletions
@@ -66,6 +66,15 @@ class HyperPearUpdateGossip extends EventEmitter {
return n
}
publishBatch (updates) {
if (!Array.isArray(updates)) throw new Error('updates array required')
return updates.map((u) => this.publishUpdate(u.version, u.manifest))
}
listVersions () {
return this._history.map((u) => u.version)
}
subscribe (fn) {
if (typeof fn !== 'function') throw new Error('fn must be a function')
this._subs.add(fn)