"""Action and observation models. One generic action serves every task: each task lists its own tools.""" from typing import Any from openenv.core.env_server.types import Action, Observation from pydantic import Field class ToolAction(Action): tool: str = Field(min_length=1, max_length=40, description="Name of one of the tools listed in the task.") args: dict[str, Any] = Field( default_factory=dict, description="Arguments for that tool, exactly as the task lists them (an empty object if it takes none).", ) class ToolObservation(Observation): output: str = Field(default="", description="Result of the last tool call.") steps_left: int = Field(default=0, description="Tool calls left before the episode ends.")