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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user