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:
Raven Scott
2026-05-21 02:31:04 -04:00
co-authored by Cursor
parent f370b86662
commit bed98ff300
18 changed files with 163 additions and 8 deletions
@@ -93,6 +93,18 @@ class HyperP2PAutobaseForkChoice extends EventEmitter {
return v ? v.weight : null
}
viewCount () {
return this._views.size
}
forceChoose (forkId) {
assertForkId(forkId)
if (!this._views.has(forkId)) throw new Error(`unknown fork: ${forkId}`)
this._chosen = forkId
this._stats.picks++
return this._views.get(forkId)
}
_onGossip (d) {
if (!d || d.type !== 'view-register' || !d.view) return
this._stats.gossipIn++
@@ -1,12 +1,12 @@
{
"name": "hyper-p2p-autobase-fork-choice",
"version": "0.3.1",
"version": "0.3.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "hyper-p2p-autobase-fork-choice",
"version": "0.3.1",
"version": "0.3.2",
"license": "Apache-2.0",
"dependencies": {
"b4a": "^1.6.7",
@@ -98,6 +98,10 @@ class HyperP2PAutobaseIndexerBus extends EventEmitter {
return n
}
subscriberCount () {
return this._subs.size
}
_onGossip (d) {
if (!d || d.type !== 'index-event' || !d.evt) return
this._stats.gossipIn++