refactor(converter): align PyautoguiActionConvertor with sandbox-platform#16
Merged
gwynbleidd003 merged 3 commits intoagiopen-org:mainfrom Feb 16, 2026
Conversation
…form task_utils Replace OagiActionConverter with standalone PyautoguiActionConvertor that matches task_utils.py:PyautoguiActionConvertor exactly, enabling sandbox-platform to import directly from oagi-python. Key changes: - Rename converters/oagi.py -> converters/pyautogui_action_converter.py - TYPE action: use make_type_command() (PynputController/_smart_paste) instead of pyautogui.typewrite() - Return type: list[tuple[str, bool]] with is_last_of_repeat tracking - Coordinates: always validate range [0, 1000] instead of configurable strict mode - Key normalization: full mapping table (windows/super/meta, control, cmd, media keys) - Move PyautoguiConfig from handler to handler/utils.py (shared by handler and converter) - Remove ConverterConfig, BaseActionConverter now uses PyautoguiConfig - Add make_type_command() and _PYNPUT_CHAR_LIMIT to handler/utils.py - OagiActionConverter kept as backward-compat alias Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…idual params Replace 6 individual __init__ parameters with a single config: PyautoguiConfig object. Only override scroll_amount=2 in the default (converter targets remote sandbox VM, not local platform). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use unicode arrow → in _validate_keys suggestions (matching task_utils) - Fix self-referencing comment in _normalize_key Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
converters/oagi.py→converters/pyautogui_action_converter.pywith standalonePyautoguiActionConvertorclass matching sandbox-platformtask_utils.pyexactlymake_type_command()(PynputController for short ASCII,_smart_pastefor Unicode/long/multiline) instead ofpyautogui.typewrite()list[tuple[str, bool]]withis_last_of_repeattrackingPyautoguiConfigfrompyautogui_action_handler.pytohandler/utils.py(shared between handler and converter)ConverterConfig,BaseActionConverternow usesPyautoguiConfigmake_type_command()and_PYNPUT_CHAR_LIMITtohandler/utils.pyOagiActionConverterkept as backward-compat aliasTest plan
OagiActionConverteralias worksfrom oagi.converters import PyautoguiActionConvertorworksPyautoguiConfigimportable from bothoagi.handler.utilsand top-leveloagi🤖 Generated with Claude Code