(route_protocol=True)
| 373 | |
| 374 | |
| 375 | def consume_lead_inbox(route_protocol=True) -> list[dict]: |
| 376 | msgs = BUS.read_inbox("lead") |
| 377 | if route_protocol: |
| 378 | for msg in msgs: |
| 379 | meta = msg.get("metadata", {}) |
| 380 | req_id = meta.get("request_id", "") |
| 381 | msg_type = msg.get("type", "") |
| 382 | if req_id and msg_type.endswith("_response"): |
| 383 | match_response(msg_type, req_id, meta.get("approve", False)) |
| 384 | return msgs |
| 385 | |
| 386 | |
| 387 | # ── Autonomous Agent ── |
no test coverage detected