feat(modules): manual deepen pear, trust, crdt, storage, gossip, network
Trust gate and detached registry helpers, blind handoff cancel, LWW snapshot/compare, fork forceChoose, dedup restore, DHT prune, indexer bus subscribers, inverted hasDoc, similarity listIds. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -104,6 +104,10 @@ class HyperP2PInvertedIndex extends EventEmitter {
|
||||
return this._docs.size
|
||||
}
|
||||
|
||||
hasDoc (docId) {
|
||||
return this._docs.has(String(docId))
|
||||
}
|
||||
|
||||
topTerms (limit = 10) {
|
||||
const ranked = [...this._terms.entries()]
|
||||
.map(([term, set]) => ({ term, docs: set.size }))
|
||||
|
||||
@@ -142,6 +142,14 @@ class HyperP2PSimilarityLsh extends EventEmitter {
|
||||
return this._buckets.size
|
||||
}
|
||||
|
||||
listIds () {
|
||||
return [...this._vectors.keys()]
|
||||
}
|
||||
|
||||
vectorCount () {
|
||||
return this._vectors.size
|
||||
}
|
||||
|
||||
getStats () {
|
||||
return {
|
||||
...this._stats,
|
||||
|
||||
Reference in New Issue
Block a user