fix: rename platform package to platforms

This commit is contained in:
xlrrrr 2026-03-26 00:09:50 +08:00
parent a0b1222403
commit 4aade50316
12 changed files with 13 additions and 13 deletions

View file

@ -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

View file

@ -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

View file

@ -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__)

View file

@ -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)

View file

@ -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:

View file

@ -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'):

View file

@ -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__)