- Python 100%
Lead with what an Adapter is and why the kit exists, add a what's-in-the-box section and a start-here path, link the protocol reference on docs.mobrule.tv. |
||
|---|---|---|
| mpp-v2 | ||
| packcomms | ||
| reference/python | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
mobrule-pack-communication-kit
Build a mobrule pack Adapter in any language, straight from the protocol.
A mobrule pack lets a streamer's Twitch chat set off effects inside the game they're playing. The piece that makes an effect actually happen is the Adapter: a small program that talks to the mobrule bridge and turns each incoming redeem into something in-game. This kit is everything you need to write one.
MPP (the Mobrule Pack Protocol) is how the Adapter and the bridge talk: newline delimited JSON over a TCP socket. The bridge hands out invocations, the Adapter reports what it did with each one. That is the whole conversation. There is no SDK to link and nothing runtime-specific here, just the protocol and enough reference material to check your work against.
MIT licensed. Copy anything useful straight into your pack, closed source or not. No strings.
What's in the box
mpp-v2/the protocol, as fixtures you can run against.sample-runs/full bridge-to-adapter conversations, step by step: the happy path, refunds on failure, config latching, timed effects, version rejection.sample-frames/single frames with their exact wire bytes, for codec tests.mpp-v2/README.mdexplains the fixture formats.
reference/python/a complete, working Adapter in about 200 lines of Python stdlib. Read it next to the spec, then port it to your language.packcomms/the conformance checker that replays the sample runs against your Adapter. Scaffolded here, not built yet.
Start here
- Read the MPP protocol reference. An Adapter written from that page alone will interoperate with any bridge.
- Read
reference/python/mpp_adapter.pyalongside it to see the whole flow in one file. - Write your Adapter, keeping the sample runs open and matching their frames.
- Check it against the fixtures before you ship.
Conformance is honor-system
No badge, no registry, no "certified adapter" stamp. The fixtures are a spec you can execute: feed the sample runs through your Adapter, check its output matches what is expected, and if it does, you are good. Run the checks yourself, trust your own results, ship it.