mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-25 21:36:52 +08:00
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>
23 lines
617 B
Python
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
|