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
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|
close
async
close() -> CloseResponse
Closes the runtime.
Source code in swerex/runtime/remote.py
214 215 216 |
|
close_session
async
close_session(request: CloseSessionRequest) -> CloseSessionResponse
Closes a shell session.
Source code in swerex/runtime/remote.py
173 174 175 |
|
create_session
async
create_session(request: CreateSessionRequest) -> CreateSessionResponse
Creates a new session.
Source code in swerex/runtime/remote.py
165 166 167 |
|
execute
async
execute(command: Command) -> CommandResponse
Executes a command (independent of any shell session).
Source code in swerex/runtime/remote.py
177 178 179 |
|
from_config
classmethod
from_config(config: RemoteRuntimeConfig) -> Self
Source code in swerex/runtime/remote.py
59 60 61 |
|
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
125 126 127 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 |
|
read_file
async
read_file(request: ReadFileRequest) -> ReadFileResponse
Reads a file
Source code in swerex/runtime/remote.py
181 182 183 |
|
run_in_session
async
run_in_session(action: Action) -> Observation
Runs a command in a session.
Source code in swerex/runtime/remote.py
169 170 171 |
|
upload
async
upload(request: UploadRequest) -> UploadResponse
Uploads a file
Source code in swerex/runtime/remote.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
|
wait_until_alive
async
wait_until_alive(*, timeout: float = 60.0)
Source code in swerex/runtime/remote.py
154 155 |
|
write_file
async
write_file(request: WriteFileRequest) -> WriteFileResponse
Writes a file
Source code in swerex/runtime/remote.py
185 186 187 |
|