diff --git a/openspace/agents/grounding_agent.py b/openspace/agents/grounding_agent.py index f66ae99..4e36cba 100644 --- a/openspace/agents/grounding_agent.py +++ b/openspace/agents/grounding_agent.py @@ -6,7 +6,7 @@ from typing import TYPE_CHECKING, Any, Dict, List, Optional from openspace.agents.base import BaseAgent from openspace.grounding.core.types import BackendType, ToolResult -from openspace.platform.screenshot import ScreenshotClient +from openspace.platforms.screenshot import ScreenshotClient from openspace.prompts import GroundingAgentPrompts from openspace.utils.logging import Logger diff --git a/openspace/grounding/backends/gui/provider.py b/openspace/grounding/backends/gui/provider.py index ec551bf..3f9389e 100644 --- a/openspace/grounding/backends/gui/provider.py +++ b/openspace/grounding/backends/gui/provider.py @@ -4,7 +4,7 @@ from openspace.grounding.core.provider import Provider from openspace.grounding.core.session import BaseSession from openspace.config import get_config from openspace.config.utils import get_config_value -from openspace.platform import get_local_server_config +from openspace.platforms import get_local_server_config from openspace.utils.logging import Logger from .transport.connector import GUIConnector from .transport.local_connector import LocalGUIConnector diff --git a/openspace/grounding/backends/shell/provider.py b/openspace/grounding/backends/shell/provider.py index 1122ef6..2884fbf 100644 --- a/openspace/grounding/backends/shell/provider.py +++ b/openspace/grounding/backends/shell/provider.py @@ -5,7 +5,7 @@ from .transport.connector import ShellConnector from .transport.local_connector import LocalShellConnector from openspace.config import get_config from openspace.config.utils import get_config_value -from openspace.platform.config import get_local_server_config +from openspace.platforms.config import get_local_server_config from openspace.utils.logging import Logger logger = Logger.get_logger(__name__) diff --git a/openspace/grounding/backends/shell/session.py b/openspace/grounding/backends/shell/session.py index 38879ff..7dad2e2 100644 --- a/openspace/grounding/backends/shell/session.py +++ b/openspace/grounding/backends/shell/session.py @@ -375,7 +375,7 @@ If you already have the exact command/script to run, use run_shell instead.""" if base_url is not None: try: - from openspace.platform import SystemInfoClient + from openspace.platforms import SystemInfoClient async with SystemInfoClient(base_url=base_url, timeout=5) as client: info = await client.get_system_info(use_cache=False) diff --git a/openspace/platform/__init__.py b/openspace/platforms/__init__.py similarity index 100% rename from openspace/platform/__init__.py rename to openspace/platforms/__init__.py diff --git a/openspace/platform/config.py b/openspace/platforms/config.py similarity index 100% rename from openspace/platform/config.py rename to openspace/platforms/config.py diff --git a/openspace/platform/recording.py b/openspace/platforms/recording.py similarity index 100% rename from openspace/platform/recording.py rename to openspace/platforms/recording.py diff --git a/openspace/platform/screenshot.py b/openspace/platforms/screenshot.py similarity index 100% rename from openspace/platform/screenshot.py rename to openspace/platforms/screenshot.py diff --git a/openspace/platform/system_info.py b/openspace/platforms/system_info.py similarity index 100% rename from openspace/platform/system_info.py rename to openspace/platforms/system_info.py diff --git a/openspace/recording/manager.py b/openspace/recording/manager.py index d3e23ed..fd6d7ed 100644 --- a/openspace/recording/manager.py +++ b/openspace/recording/manager.py @@ -500,7 +500,7 @@ class RecordingManager: # create video client (internal management) if self.enable_video: - from openspace.platform import RecordingClient + from openspace.platforms import RecordingClient self._recording_client = RecordingClient(base_url=self.server_url) success = await self._recording_client.start_recording() if success: @@ -510,7 +510,7 @@ class RecordingManager: # create screenshot client (internal management) if self.enable_screenshot: - from openspace.platform import ScreenshotClient + from openspace.platforms import ScreenshotClient self._screenshot_client = ScreenshotClient(base_url=self.server_url) logger.debug("Screenshot client ready") @@ -539,7 +539,7 @@ class RecordingManager: async def _check_server_availability(self): """Check if local server is available""" try: - from openspace.platform import SystemInfoClient + from openspace.platforms import SystemInfoClient # Use context manager to ensure aiohttp session is closed, avoiding warning of unclosed session async with SystemInfoClient(base_url=self.server_url) as client: diff --git a/openspace/recording/recorder.py b/openspace/recording/recorder.py index d1f7678..aaee792 100644 --- a/openspace/recording/recorder.py +++ b/openspace/recording/recorder.py @@ -23,7 +23,7 @@ class TrajectoryRecorder: Args: task_name: task name (optional, will be saved in metadata) log_dir: log directory - enable_screenshot: whether to save screenshots (through platform.ScreenshotClient) + enable_screenshot: whether to save screenshots (through platforms.ScreenshotClient) enable_video: whether to enable video recording (through platform.RecordingClient) server_url: local_server address (None = read from config/environment variables) """ @@ -91,7 +91,7 @@ class TrajectoryRecorder: parameters: tool parameters screenshot: screenshot bytes (if provided) extra: extra information (e.g. server field for MCP) - auto_screenshot: whether to automatically capture screenshot (through platform.ScreenshotClient) + auto_screenshot: whether to automatically capture screenshot (through platforms.ScreenshotClient) """ self.step_counter += 1 step_num = self.step_counter @@ -145,9 +145,9 @@ class TrajectoryRecorder: return step_info async def _capture_screenshot(self) -> Optional[bytes]: - """Capture screenshot automatically through platform.ScreenshotClient""" + """Capture screenshot automatically through platforms.ScreenshotClient""" try: - from openspace.platform import ScreenshotClient + from openspace.platforms import ScreenshotClient # Lazy initialization screenshot client if not hasattr(self, '_screenshot_client'): diff --git a/openspace/recording/video.py b/openspace/recording/video.py index 72aa273..65e7c1c 100644 --- a/openspace/recording/video.py +++ b/openspace/recording/video.py @@ -1,7 +1,7 @@ """ Video Recorder -Communicates with local_server through platform.RecordingClient +Communicates with local_server through platforms.RecordingClient Supports local and remote recording (through configuration LOCAL_SERVER_URL) """ @@ -9,7 +9,7 @@ from pathlib import Path from typing import Optional from openspace.utils.logging import Logger -from openspace.platform import RecordingClient +from openspace.platforms import RecordingClient logger = Logger.get_logger(__name__)