feat(modules): deepen trust, experimental, routing, and search
Hyper-P2P Module Tests / unit-all (push) Failing after 1h17m5s

Session revoke and encrypted-topic JSON helpers; silence/void channel
snapshots; relay tunnel route listing; grow-only set algebra; CPU top
donors; attestation chain slice/export; fulltext bulk and top terms.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 02:25:10 -04:00
co-authored by Cursor
parent ed7f0ab34f
commit cce695e34a
12 changed files with 239 additions and 1 deletions
@@ -114,6 +114,29 @@ class HyperP2PFulltextLite extends EventEmitter {
return [...this._docs.values()]
}
bulkAdd (entries) {
if (!Array.isArray(entries)) throw new Error('entries array required')
let n = 0
for (const e of entries) {
if (e && e.id != null) {
this.addDocument(e.id, e.text || '')
n++
}
}
return n
}
termCount () {
return this._index.size
}
topTerms (limit = 10) {
return [...this._index.entries()]
.map(([term, set]) => ({ term, docs: set.size }))
.sort((a, b) => b.docs - a.docs)
.slice(0, limit)
}
getStats () {
return {
...this._stats,