Add firehose sync, MST path proofs, policy engine, and e2e networking tests
Four major features implemented in parallel:
- Real-time firehose sync: FirehoseSubscription subscribes to
com.atproto.sync.subscribeRepos with CBOR frame parsing, DID filtering,
cursor persistence in SQLite, and exponential backoff reconnection.
Integrated with ReplicationManager and configurable via FIREHOSE_URL
and FIREHOSE_ENABLED env vars.
- L3 MST path proof verification: generateMstProof() extracts minimal
Merkle Search Tree node path from root to leaf; verifyMstProof()
validates purely from proof bytes + trusted commit CID. Supports both
existence and non-existence proofs.
- Policy engine MVP: Declarative, deterministic, transport-agnostic
policy system with PolicyEngine class, three presets (mutualAid, saas,
groupGovernance), and config integration via POLICY_FILE env var.
- E2E networking integration tests: Two real Helia nodes with TCP on
localhost verify bitswap block exchange, bidirectional transfer, and
peer discovery.