WIP: PAIN2

This commit is contained in:
2026-03-05 14:43:45 -05:00
parent 0e3b479bd6
commit fca57841c6
8 changed files with 162 additions and 104 deletions

View File

@@ -69,6 +69,10 @@ class ApiHookClient:
"""Pushes an event to the GUI's SyncEventQueue via the /api/gui endpoint."""
return self._make_request('POST', '/api/gui', data=payload) or {}
def push_event(self, action: str, payload: dict) -> dict[str, Any]:
"""Convenience to push a GUI task."""
return self.post_gui({"action": action, **payload})
def click(self, item: str, user_data: Any = None) -> dict[str, Any]:
"""Simulates a button click."""
return self.post_gui({"action": "click", "item": item, "user_data": user_data})
@@ -127,14 +131,14 @@ class ApiHookClient:
"""Retrieves performance and diagnostic metrics."""
return self._make_request('GET', '/api/gui/diagnostics') or {}
def get_performance(self) -> dict[str, Any]:
"""Convenience for test_visual_sim_gui_ux.py."""
diag = self.get_gui_diagnostics()
return {"performance": diag}
def get_mma_status(self) -> dict[str, Any]:
"""Convenience to get the current MMA engine status."""
state = self.get_gui_state()
return {
"mma_status": state.get("mma_status"),
"ai_status": state.get("ai_status"),
"active_tier": state.get("mma_active_tier")
}
"""Convenience to get the current MMA engine status. Returns FULL state."""
return self.get_gui_state()
def get_node_status(self, node_id: str) -> dict[str, Any]:
"""Retrieves status for a specific node in the MMA DAG."""