feat(mma): Phase 1 — source_tier tagging at emission

- ai_client: add current_tier module var; stamp source_tier on every _append_comms entry
- multi_agent_conductor: set current_tier='Tier 3' around send(), clear in finally
- conductor_tech_lead: set current_tier='Tier 2' around send(), clear in finally
- gui_2: _on_tool_log captures current_tier; _append_tool_log stores dict with source_tier
- tests: 8 new tests covering current_tier, source_tier in comms, tool log dict format
This commit is contained in:
2026-03-02 16:18:00 -05:00
parent 264b04f060
commit 8d9f25d0ce
5 changed files with 152 additions and 14 deletions

View File

@@ -308,6 +308,7 @@ def run_worker_lifecycle(ticket: Ticket, context: WorkerContext, context_files:
old_comms_cb(entry)
ai_client.comms_log_callback = worker_comms_callback
ai_client.current_tier = "Tier 3"
try:
comms_baseline = len(ai_client.get_comms_log())
response = ai_client.send(
@@ -320,7 +321,7 @@ def run_worker_lifecycle(ticket: Ticket, context: WorkerContext, context_files:
)
finally:
ai_client.comms_log_callback = old_comms_cb
ai_client.current_tier = None
if event_queue:
# Push via "response" event type — _process_event_queue wraps this
# as {"action": "handle_ai_response", "payload": ...} for the GUI.