695 B
695 B
Plan: P2P Peer Discovery (chrs-discovery)
1. Goal
Transition from polling a shared SQLite file to a true decentralized discovery mechanism using libp2p.
2. Components
- LibP2P Integration: Implement
mdnsfor local discovery andKademlia DHTfor wide-area discovery. - Identity: Cryptographic
PeerIdgeneration linked to the agent'sagekeys. - GossipSub: Replace SQLite polling with a real-time message bus for heartbeats and council broadcasts.
3. Workflow
- Agent starts and initializes a LibP2P swarm.
- Agent joins the
chorus-globaltopic. - Swarm emits
PeerDiscoveredevents. CouncilManageris updated in real-time without polling latency.