|
12 | 12 | Observation, |
13 | 13 | ) |
14 | 14 | from openhands.events.stream import EventStream |
15 | | -from openhands.runtime.base import Runtime |
| 15 | +from openhands.integrations.provider import PROVIDER_TOKEN_TYPE |
| 16 | +from openhands.runtime.impl.action_execution.action_execution_client import ( |
| 17 | + ActionExecutionClient, |
| 18 | +) |
16 | 19 | from openhands.runtime.impl.e2b.filestore import E2BFileStore |
17 | 20 | from openhands.runtime.impl.e2b.sandbox import E2BSandbox |
18 | 21 | from openhands.runtime.plugins import PluginRequirement |
19 | 22 | from openhands.runtime.utils.files import insert_lines, read_lines |
20 | 23 |
|
21 | 24 |
|
22 | | -class E2BRuntime(Runtime): |
| 25 | +class E2BRuntime(ActionExecutionClient): |
23 | 26 | def __init__( |
24 | 27 | self, |
25 | 28 | config: OpenHandsConfig, |
26 | 29 | event_stream: EventStream, |
27 | 30 | sid: str = 'default', |
28 | 31 | plugins: list[PluginRequirement] | None = None, |
29 | | - sandbox: E2BSandbox | None = None, |
| 32 | + env_vars: dict[str, str] | None = None, |
30 | 33 | status_callback: Callable | None = None, |
| 34 | + attach_to_existing: bool = False, |
| 35 | + headless_mode: bool = True, |
| 36 | + user_id: str | None = None, |
| 37 | + git_provider_tokens: PROVIDER_TOKEN_TYPE | None = None, |
| 38 | + sandbox: E2BSandbox | None = None, |
31 | 39 | ): |
32 | 40 | super().__init__( |
33 | 41 | config, |
34 | 42 | event_stream, |
35 | 43 | sid, |
36 | 44 | plugins, |
37 | | - status_callback=status_callback, |
| 45 | + env_vars, |
| 46 | + status_callback, |
| 47 | + attach_to_existing, |
| 48 | + headless_mode, |
| 49 | + user_id, |
| 50 | + git_provider_tokens, |
38 | 51 | ) |
39 | 52 | if sandbox is None: |
40 | 53 | self.sandbox = E2BSandbox() |
|
0 commit comments