From 9c109dc6fe69f4d75589c1979eac6f4366ad9fb3 Mon Sep 17 00:00:00 2001 From: aoshen524 Date: Thu, 12 Feb 2026 14:59:37 +0000 Subject: [PATCH] fix(converter): route PynputController and _smart_paste through pyautogui exec path action_string_to_step() only checked for "pyautogui" in the action string, but make_type_command() in sandbox-platform generates PynputController().type() and _smart_paste() calls that don't contain "pyautogui". These were misrouted as shell commands instead of pyautogui exec code. Co-Authored-By: Claude Opus 4.6 --- src/oagi/converters/base.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/oagi/converters/base.py b/src/oagi/converters/base.py index be77942..f0f46d2 100644 --- a/src/oagi/converters/base.py +++ b/src/oagi/converters/base.py @@ -281,8 +281,13 @@ def action_string_to_step(self, action: str) -> dict[str, Any]: seconds = float(wait_match.group("sec")) return {"type": "sleep", "parameters": {"seconds": seconds}} - # pyautogui code path - if "pyautogui" in action_str.lower(): + # pyautogui code path - also handles PynputController and _smart_paste + action_lower = action_str.lower() + if ( + "pyautogui" in action_lower + or "pynputcontroller" in action_lower + or "_smart_paste" in action_lower + ): return { "type": "pyautogui", "parameters": {"code": action_str},