Runtime Status Fixes (#9050)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Tim O'Farrell
2025-06-11 09:28:17 -06:00
committed by GitHub
parent 3f50eb0079
commit 47209e794a
38 changed files with 413 additions and 320 deletions

View File

@@ -49,6 +49,7 @@ from openhands.events.observation import (
from openhands.integrations.provider import PROVIDER_TOKEN_TYPE
from openhands.runtime.base import Runtime
from openhands.runtime.plugins import PluginRequirement
from openhands.runtime.runtime_status import RuntimeStatus
class CLIRuntime(Runtime):
@@ -126,7 +127,7 @@ class CLIRuntime(Runtime):
async def connect(self) -> None:
"""Initialize the runtime connection."""
self.send_status_message('STATUS$STARTING_RUNTIME')
self.set_runtime_status(RuntimeStatus.STARTING_RUNTIME)
# Ensure workspace directory exists
os.makedirs(self._workspace_path, exist_ok=True)
@@ -138,7 +139,7 @@ class CLIRuntime(Runtime):
await asyncio.to_thread(self.setup_initial_env)
self._runtime_initialized = True
self.send_status_message('STATUS$CONTAINER_STARTED')
self.set_runtime_status(RuntimeStatus.RUNTIME_STARTED)
logger.info(f'CLIRuntime initialized with workspace at {self._workspace_path}')
def add_env_vars(self, env_vars: dict[str, Any]) -> None: