Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
Added reference documentation for: libs/python/computer-server/computer_server/diorama/diorama_computer.py
Andrei Onel4d6e611d73ac
diff --git a/libs/python/computer-server/computer_server/diorama/diorama_computer.py b/libs/python/computer-server/computer_server/diorama/diorama_computer.pyindex 4fc37b3f17..c00bd86fbd 100644--- a/libs/python/computer-server/computer_server/diorama/diorama_computer.py+++ b/libs/python/computer-server/computer_server/diorama/diorama_computer.py@@ -6,11 +6,26 @@ class DioramaComputer:Implements _initialized, run(), and __aenter__ for agent compatibility."""def __init__(self, diorama):+ """+ Initialize the DioramaComputer with a diorama instance.++ Args:+ diorama: The diorama instance to wrap with a computer-like interface.+ """self.diorama = dioramaself.interface = self.diorama.interfaceself._initialized = Falseasync def __aenter__(self):+ """+ Async context manager entry method for compatibility with ComputerAgent.++ Ensures an event loop is running and marks the instance as initialized.+ Creates a new event loop if none is currently running.++ Returns:+ DioramaComputer: The initialized instance.+ """# Ensure the event loop is running (for compatibility)try:asyncio.get_running_loop()@@ -20,6 +35,15 @@ class DioramaComputer:return selfasync def run(self):+ """+ Run method stub for compatibility with ComputerAgent interface.++ Ensures the instance is initialized before returning. If not already+ initialized, calls __aenter__ to perform initialization.++ Returns:+ DioramaComputer: The initialized instance.+ """# This is a stub for compatibilityif not self._initialized:await self.__aenter__()