Minimal executable protocol seam. Heavy peers are injected as values
(peer) and are never imported by SDK core; discovery stays lazy so a
module that is registered but never discovered pays no I/O or peer-import
cost. discover may return synchronously when construction needs no I/O
(as PMTiles does — the archive itself is opened lazily on first
describe()), or asynchronously for a module whose discovery is
inherently a network round trip.
capabilities()/discover() accept SourceDescriptor<TKind | Protocol>
— the built-in Protocol union plus this module's own TKind — so a
third-party module with a custom protocol id (e.g. the cloud-tiles fixture's
"cloud-tiles", test/fixtures/plugins/cloud-tiles/protocol-module.ts)
can pass a descriptor typed to its own kind without an as cast, matching
how pmtilesProtocolModule() (src/contract/pmtiles.ts) already accepts
SourceDescriptor<"pmtiles" | Protocol>, i.e. SourceDescriptor (issue
#671).
Minimal executable protocol seam. Heavy peers are injected as values (
peer) and are never imported by SDK core; discovery stays lazy so a module that is registered but never discovered pays no I/O or peer-import cost.discovermay return synchronously when construction needs no I/O (as PMTiles does — the archive itself is opened lazily on firstdescribe()), or asynchronously for a module whose discovery is inherently a network round trip.capabilities()/discover()acceptSourceDescriptor<TKind | Protocol>— the built-inProtocolunion plus this module's ownTKind— so a third-party module with a custom protocol id (e.g. the cloud-tiles fixture's"cloud-tiles",test/fixtures/plugins/cloud-tiles/protocol-module.ts) can pass a descriptor typed to its own kind without anascast, matching howpmtilesProtocolModule()(src/contract/pmtiles.ts) already acceptsSourceDescriptor<"pmtiles" | Protocol>, i.e.SourceDescriptor(issue #671).