DXv-3/harmony-engine-protocol — reverse-engineered prompt
Reverse engineered prompt
Build me a small Python library called Harmony Engine Protocol for reliable message passing inside distributed style apps.
I want a simple message object that can hold any payload, an auto generated id and timestamp, optional source and destination, metadata, and a priority from 0 to 10. I also want a dispatcher that lets me register functions for different message types, send messages into a thread safe queue, process higher priority messages first, and keep basic stats so I can see what happened.
Please include a clear demo that creates a dispatcher, registers a greeting handler, sends a message, starts and stops cleanly, and prints what it processed. Add tests for the message class, handler registration, priority ordering, and start stop behavior. Keep the project easy to install and run with make commands, and write a README that explains the idea in plain English with a quick start example.
Want more depth? Deep Reverse