Saidie000's picture
Upload 83 files
09f1b19 verified
raw
history blame contribute delete
599 Bytes
"""Multi-channel protocol router."""
from __future__ import annotations
from jenaai.core.module import BaseModule
class Module(BaseModule):
"""Routes messages across channels via the event bus."""
async def start(self) -> None:
await self.event_bus.publish(
"system.log",
{"message": "MCP handler online", "module": self.metadata.name},
)
async def route(self, channel: str, payload: dict) -> None:
await self.event_bus.publish(
f"mcp.{channel}",
{"payload": payload, "module": self.metadata.name},
)