id: integration-protocol-workflow topic: patterns title: Implementing an integration protocol — the flua workflow pins: - tests/test_server.py::test_mock_server_example_self_tests - tests/test_qa.py::test_examples_qa_pair_calls_each_other verified: flua 0.1.169
The flagship agent task. The recipe that works, in order:
net.HTTPClient, SSE for feeds),
WebSocket (net.WebSocketClient, push via net.WebSocketServer),
MQTT (mqtt.Client), or raw TCP/UDP sockets — each has a pinned
capability entry.examples/mockServer.lua self-tests all four server
kinds). Your QA under test then talks to a real protocol peer
offline — see modeling-external-devices._FLUA.keepAlive().--bridge-debug
makes a dropped payload loud.mock-peer-testing), so the integration
cannot silently rot.QAs can also drive each other: name lookup + fibaro.call actions
(examples/qa3.lua + qa4.lua, pinned) — the pattern for splitting a
big integration into cooperating QAs.