The IMessagingClient / IKernel / IReliableChannelManager base types were
inheritance-as-documentation: nothing dispatched over them and no impl ever
overrode their base `method`s (the ops live in `*/api/*` as plain procs). The
`method`s only returned "not implemented" at runtime and, crucially, were never
checked against the real surface -- so IKernel had silently drifted from `Waku`
(relayPublish returned int not string; filter/lightpush still carried a `peer`
param; connectedPeersInfo returned seq[string]).
Replace each base type with a structural Nim `concept` matched against the real
implementation, and assert conformance once in the concentrator
(`doAssert Waku is KernelApi`, etc.) where every impl and its op modules are in
scope. This is zero-cost, drops the dead vtables, and makes each layer's true
surface a single compiler-checked source of truth.
Move `PeerConnInfo` from `waku/api/peer_manager` into `api/types` (alongside the
other api-boundary data types) so `KernelApi` can name it without an import
cycle -- otherwise `connectedPeersInfo` could not be part of the contract.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reverses the earlier dedup-by-re-export: event TYPE definitions now live in the
interface classes, and the emptied decomposed event files are removed.
- MessageSeenEvent -> logos_delivery/api/kernel_api.nim
- Message{Sent,Error,Propagated,Received}Event -> api/messaging_client_api.nim
- ChannelMessage{Received,Sent,Error}Event -> api/reliable_channel_manager_api.nim
- EventConnectionStatusChange -> api/logos_delivery_api.nim
Deleted (became empty after the move):
- logos_delivery/waku/api/events/message_events.nim
- logos_delivery/messaging/api/events.nim
- logos_delivery/channels/api/events.nim
health_events.nim keeps its two remaining events (content/shard topic health).
Rewiring: each layer re-exports its interface module (waku->kernel_api,
messaging_client->messaging_client_api, reliable_channel->reliable_channel_manager_api,
which also re-exports messaging_client_api). Deep emitters/listeners
(subscription_manager, waku_node, waku_node/relay, node_health_monitor,
recv_service, send_service) import the owning interface module directly.
kernel_api stays below node level (types/topics/message/store-common) so the
node->kernel_api imports are acyclic. liblogosdelivery builds.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add IKernel/IMessagingClient/IReliableChannelManager/ILogosDelivery interface
classes under logos_delivery/api/. The EventBroker types PR#3975 hoisted into
these files already exist in PR#3989's decomposed */api/events/ modules, so the
interface files re-export those modules instead of redefining the types
(avoids 8 duplicate EventBroker definitions). api/types.nim kept at the
foundation version (ChannelId stays in channels/types.nim, which the decomposed
modules import).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>