Giant pass: storage API docs, trust/consensus/routing code, category guides

Complete manual documentation cleanup for the storage stack and expand
category-level guides across the library.

Documentation (23 storage modules):
- Rewrite Methods sections in all storage-hypercore, storage-hyperbee,
  storage-autobase, and storage-hyperdrive api.md files from index.js
- Remove every "module-specific (see implementation)" placeholder in storage
- Fix bitfield-scheduler, bee-batch-write, bee-range-watch, drive-gc-sweep APIs

Category READMEs (modules/):
- trust-security, consensus-coordination, routing-advanced — tables + hub links
- MODULE_CATEGORIES.md typo fix (scaffold tier description)

Code:
- hyper-p2p-trust-graph: hasEdge(), nodeCount(), getStats with protocol
- hyper-p2p-circuit-breaker: listCircuitIds(), reset()
- hyper-p2p-distributed-lock: getStats merges metrics + active lock counts

Parent workspace (not in this repo) also received doc hubs for all 29
categories in docs/README.md and MODULE_DOC_PASS.md giant-pass tracker.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-21 00:27:46 -04:00
co-authored by Cursor
parent e43e2e83f1
commit 7cb1612e71
27 changed files with 459 additions and 682 deletions
+14 -10
View File
@@ -1,14 +1,18 @@
# Trust & security
**Path:** `modules/trust-security/` · **Modules:** 8 (8 production, 0 scaffold)
**Path:** `modules/trust-security/` · **Modules:** 8 (all production)
See [MODULE_CATEGORIES.md](../MODULE_CATEGORIES.md#trust-security).
Doc hub: [`docs/trust-security/README.md`](../../docs/trust-security/README.md)
- [hyper-p2p-attestation-chain](./hyper-p2p-attestation-chain/) — production
- [hyper-p2p-blind-pair-handoff](./hyper-p2p-blind-pair-handoff/) — production
- [hyper-p2p-encrypted-topic](./hyper-p2p-encrypted-topic/) — production
- [hyper-p2p-key-rotation](./hyper-p2p-key-rotation/) — production
- [hyper-p2p-multisig-threshold](./hyper-p2p-multisig-threshold/) — production
- [hyper-p2p-reputation-system](./hyper-p2p-reputation-system/) — production
- [hyper-p2p-session-rotation](./hyper-p2p-session-rotation/) — production
- [hyper-p2p-trust-graph](./hyper-p2p-trust-graph/) — production
| Module | Protocol | Summary |
|--------|----------|---------|
| [hyper-p2p-trust-graph](./hyper-p2p-trust-graph/) | `trust-graph/v1` | Trust edges, `trustScore`, `hasEdge`, decay |
| [hyper-p2p-reputation-system](./hyper-p2p-reputation-system/) | `reputation-system/v1` | Peer reputation gossip |
| [hyper-p2p-encrypted-topic](./hyper-p2p-encrypted-topic/) | `encrypted-topic/v1` | Encrypted topic helpers |
| [hyper-p2p-attestation-chain](./hyper-p2p-attestation-chain/) | `attestation-chain/v1` | Attestation chain |
| [hyper-p2p-multisig-threshold](./hyper-p2p-multisig-threshold/) | `multisig-threshold/v1` | Threshold multisig |
| [hyper-p2p-session-rotation](./hyper-p2p-session-rotation/) | `session-rotation/v1` | Session rotation |
| [hyper-p2p-key-rotation](./hyper-p2p-key-rotation/) | `key-rotation/v1` | Key rotation schedule |
| [hyper-p2p-blind-pair-handoff](./hyper-p2p-blind-pair-handoff/) | `blind-pair-handoff/v1` | Blind pair handoff |
Compose with core `capabilities`, transport `noise-session-wrap`, and `presence`.
+21 -1
View File
@@ -87,6 +87,21 @@ class HyperP2PTrustGraph extends EventEmitter {
return out
}
hasEdge (from, to) {
const f = typeof from === 'string' ? from : b4a.toString(from, 'hex')
const t = typeof to === 'string' ? to : b4a.toString(to, 'hex')
return this._edgeMap(f).has(t)
}
nodeCount () {
const nodes = new Set()
for (const [from, m] of this._edges) {
nodes.add(from)
for (const to of m.keys()) nodes.add(to)
}
return nodes.size
}
toJSON () {
return { edges: this.edges(), decay: this.decay }
}
@@ -120,7 +135,12 @@ class HyperP2PTrustGraph extends EventEmitter {
getStats () {
return { ...this._stats }
return {
...this._stats,
edges: this.edges().length,
nodes: this.nodeCount(),
protocol: PROTOCOL
}
}
async close () {