Expand category docs and module APIs across the library.
Manual pass adds helpers (listChannels, taskCounts, openProposals), richer getStats with protocol fields, category README hubs, and tightened api.md for core, messaging, network, routing, supercomputer, and consensus modules. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -328,8 +328,17 @@ class HyperP2PPresence extends EventEmitter {
|
||||
}
|
||||
|
||||
|
||||
onlineCount () {
|
||||
return [...this.peers.values()].filter((p) => p.status === 'online').length
|
||||
}
|
||||
|
||||
getStats () {
|
||||
return { ...this._stats }
|
||||
return {
|
||||
...this._stats,
|
||||
peers: this.peers.size,
|
||||
online: this.onlineCount(),
|
||||
protocol: 'hyper-p2p-presence/v1.1'
|
||||
}
|
||||
}
|
||||
|
||||
async close () {
|
||||
|
||||
Reference in New Issue
Block a user