# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. """ Data models for the Agterm Environment. The agterm environment is a terminal environment that executes code in a terminal. """ from dataclasses import dataclass from openenv_core.env_server.types import Action, Observation, State @dataclass(kw_only=True) class agtermAction(Action): """Action for the Agterm environment - command to send to the environment""" message: str @dataclass(kw_only=True) class agtermObservation(Observation): """Observation from the Agterm environment - result from the environment""" result: str done: bool reward: float @dataclass(kw_only=True) class agtermState(State): """State of the Agterm environment - current state of the environment""" last_message: str = "" last_result: str = "" total_messages: int = 0 history: list[str] = None