from tongcell.core import MessageContext, TopicId, TopicKind

from judy_core.events import OutputEvent

OUTPUT_TOPIC_KIND = TopicKind("output")
OUTPUT_TOPIC_ID = TopicId.default(OUTPUT_TOPIC_KIND)
TRAJECTORY_TOPIC_KIND = TopicKind("trajectory")


async def publish_output_event(ctx: MessageContext, event: OutputEvent):
    await ctx.publish(event, OUTPUT_TOPIC_ID)
