Team Ai
Apppublic

openenv/coding_env

sourceHugging Faceupdated 3mo agoView on Hugging Face
21likes
models.py35 linesDownload Raw Back to coding_env
1"""2envs/coding_env/models.py3--------------------------------4Action/Observation types for the Coding environment.5"""6 7from __future__ import annotations8 9from openenv.core.env_server.interfaces import Action, Observation, State10 11 12class CodeAction(Action):13    """14    Represents a single code execution request.15    """16 17    code: str18    # Optional: future fields like 'lint': bool, 'timeout_s': float, etc.19 20 21class CodeObservation(Observation):22    """23    Result of executing code in the environment.24    """25 26    stdout: str = ""27    stderr: str = ""28    exit_code: int = 029 30 31class CodeState(State):32    """State for CodeAct environment with persistent execution context."""33 34    last_exit_code: int = 035