openhands.runtime.impl.eventstream.eventstream_runtime
EventStreamRuntime Objects
class EventStreamRuntime(Runtime)
This runtime will subscribe the event stream. When receive an event, it will send the event to runtime-client which run inside the docker environment.
Arguments:
config
AppConfig - The application configuration.event_stream
EventStream - The event stream to subscribe to.sid
str, optional - The session ID. Defaults to 'default'.plugins
list[PluginRequirement] | None, optional - List of plugin requirements. Defaults to None.env_vars
dict[str, str] | None, optional - Environment variables to set. Defaults to None.
close
def close(rm_all_containers: bool | None = None)
Closes the EventStreamRuntime and associated objects
Arguments:
- rm_all_containers (bool): Whether to remove all containers with the 'openhands-sandbox-' prefix
list_files
def list_files(path: str | None = None) -> list[str]
List files in the sandbox.
If path is None, list files in the sandbox's initial working directory (e.g., /workspace).
copy_from
def copy_from(path: str) -> Path
Zip all files in the sandbox and return as a stream of bytes.