Expand consensus, agents, indexes, economy, pear, and observability modules

Add raft clearLog and logEntryAt, workflow nodeIds and failAllPending,
runtime session endAllActive, message envelope resetStats, trie removeBatch,
fulltext and marketplace clear helpers, credit accountCount, trace span
bulk end, link probe clearAll, import map clearAll, grow-only set clearAll,
and geo router peer listing utilities.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 02:58:47 -04:00
co-authored by Cursor
parent 5a24a4eec8
commit de7dcc38be
13 changed files with 116 additions and 0 deletions
@@ -141,6 +141,17 @@ class HyperP2PFulltextLite extends EventEmitter {
.slice(0, limit)
}
documentIds () {
return [...this._docs.keys()]
}
clearAll () {
const n = this._docs.size
this._docs.clear()
this._index.clear()
return n
}
getStats () {
return {
...this._stats,
@@ -101,6 +101,13 @@ class HyperP2PTriePrefix extends EventEmitter {
return n
}
removeBatch (words) {
if (!Array.isArray(words)) throw new Error('words array required')
let n = 0
for (const w of words) if (this.remove(w)) n++
return n
}
longestMatch (prefix) {
const matches = this.prefixSearch(prefix)
if (!matches.length) return null