MCPcopy Create free account
hub / github.com/bytedance/trae-agent / __init__

Method __init__

trae_agent/tools/docker_tool_executor.py:15–33  ·  view source on GitHub ↗

Initializes the DockerToolExecutor.

(
        self,
        original_executor: ToolExecutor,
        docker_manager: DockerManager,
        docker_tools: list[str],
        host_workspace_dir: str | None,
        container_workspace_dir: str,
    )

Source from the content-addressed store, hash-verified

13 """
14
15 def __init__(
16 self,
17 original_executor: ToolExecutor,
18 docker_manager: DockerManager,
19 docker_tools: list[str],
20 host_workspace_dir: str | None,
21 container_workspace_dir: str,
22 ):
23 """
24 Initializes the DockerToolExecutor.
25 """
26 self._original_executor = original_executor
27 self._docker_manager = docker_manager
28 self._docker_tools_set = set(docker_tools)
29 # Get path from __init__ ---
30 self._host_workspace_dir = (
31 os.path.abspath(host_workspace_dir) if host_workspace_dir else None
32 )
33 self._container_workspace_dir = container_workspace_dir
34
35 def _translate_path(self, host_path: str) -> str:
36 """Robust path translation function: Translate the host path into the corresponding path within the container."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected