Remote
swerex.runtime.remote.RemoteRuntime
RemoteRuntime(*, logger: Logger | None = None, **kwargs: Any)
Bases: AbstractRuntime
A runtime that connects to a remote server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Keyword arguments to pass to the |
{}
|
Source code in swerex/runtime/remote.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
logger
instance-attribute
logger = logger or get_logger('rex-runtime')
close
async
close() -> CloseResponse
Closes the runtime.
Source code in swerex/runtime/remote.py
263 264 265 |
|
close_session
async
close_session(request: CloseSessionRequest) -> CloseSessionResponse
Closes a shell session.
Source code in swerex/runtime/remote.py
207 208 209 |
|
create_session
async
create_session(request: CreateSessionRequest) -> CreateSessionResponse
Creates a new session.
Source code in swerex/runtime/remote.py
199 200 201 |
|
execute
async
execute(command: Command) -> CommandResponse
Executes a command (independent of any shell session).
Source code in swerex/runtime/remote.py
211 212 213 |
|
from_config
classmethod
from_config(config: RemoteRuntimeConfig) -> Self
Source code in swerex/runtime/remote.py
62 63 64 |
|
is_alive
async
is_alive(*, timeout: float | None = None) -> IsAliveResponse
Checks if the runtime is alive.
Internal server errors are thrown, everything else just has us return False together with the message.
Source code in swerex/runtime/remote.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
|
read_file
async
read_file(request: ReadFileRequest) -> ReadFileResponse
Reads a file
Source code in swerex/runtime/remote.py
215 216 217 |
|
run_in_session
async
run_in_session(action: Action) -> Observation
Runs a command in a session.
Source code in swerex/runtime/remote.py
203 204 205 |
|
upload
async
upload(request: UploadRequest) -> UploadResponse
Uploads a file
Source code in swerex/runtime/remote.py
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
|
wait_until_alive
async
wait_until_alive(*, timeout: float = 60.0)
Source code in swerex/runtime/remote.py
162 163 |
|
write_file
async
write_file(request: WriteFileRequest) -> WriteFileResponse
Writes a file
Source code in swerex/runtime/remote.py
219 220 221 |
|