OpenHands/openhands/app_server/sandbox/sandbox_spec_models.py
Tim O'Farrell f292f3a84d
V1 Integration (#11183)
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: sp.wack <83104063+amanape@users.noreply.github.com>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
2025-10-14 02:16:44 +00:00

23 lines
617 B
Python

from datetime import datetime
from pydantic import BaseModel, Field
from openhands.agent_server.utils import utc_now
class SandboxSpecInfo(BaseModel):
"""A template for creating a Sandbox (e.g: A Docker Image vs Container)."""
id: str
command: list[str] | None
created_at: datetime = Field(default_factory=utc_now)
initial_env: dict[str, str] = Field(
default_factory=dict, description='Initial Environment Variables'
)
working_dir: str = '/home/openhands/workspace'
class SandboxSpecInfoPage(BaseModel):
items: list[SandboxSpecInfo]
next_page_id: str | None = None