1.2 KiB
1.2 KiB
Decision: FOLD into network-discovery-peerjs (not split)
- Date: 2026-05-12
- Decided by: autonomous Wave 3.2 implementation
- Parent:
network-transport-familyproposal, §"Split vs. fold" for discovery-bundled transports
Outcome
@suaveplan/network-transport-peerjs is NOT shipped as a separate package. Its functionality lives at @suaveplan/network-discovery-peerjs/transport (subpath export of the existing discovery package).
Rationale
- Upstream code bundles transport + discovery as one integrated unit; the existing
PeerConnectionManager+PeerJSConnectionmodules ARE the transport machinery. - Splitting would require extracting a working integrated unit and re-testing — much higher risk for no functional gain.
- Fold preserves upstream parity and ships an actual usable transport in ~3× less effort.
- The two surfaces share a single PeerJS unit cleanly via a discriminated wire frame (
{kind: "suaveplan.transport.v1", envelope}) that discovery's Zod schema explicitly rejects.
What to import
- Discovery:
import { PeerJSDiscovery } from "@suaveplan/network-discovery-peerjs" - Transport:
import { PeerJSTransport, PeerJSPlugin } from "@suaveplan/network-discovery-peerjs/transport"(or/plugin)