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

Method execute

trae_agent/agent/docker_manager.py:128–138  ·  view source on GitHub ↗

Executes a command using the configured mode (interactive or stateless).

(self, command: str, timeout: int = 300)

Source from the content-addressed store, hash-verified

126 raise
127
128 def execute(self, command: str, timeout: int = 300) -> tuple[int, str]:
129 """
130 Executes a command using the configured mode (interactive or stateless).
131 """
132 if not self.container:
133 raise RuntimeError("Container is not running. Call start() first.")
134
135 # if self.interactive:
136 return self._execute_interactive(command, timeout)
137 # else:
138 # return self._execute_stateless(command)
139
140 def stop(self):
141 """Stops the pexpect shell and cleans up the container if managed by this instance."""

Callers

nothing calls this directly

Calls 1

_execute_interactiveMethod · 0.95

Tested by

no test coverage detected