MCPcopy Create free account
hub / github.com/agent0ai/agent-zero / start

Method start

plugins/_code_execution/helpers/tty_session.py:49–65  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

47
48 # ── user-facing coroutines ────────────────────────────────────────
49 async def start(self):
50 self._buf = asyncio.Queue()
51 if _IS_WIN:
52 self._proc = await _spawn_winpty(
53 self.cmd, self.cwd, self.env, self.echo
54 ) # ← pass echo
55 else:
56 self._proc = await _spawn_posix_pty(
57 self.cmd, self.cwd, self.env, self.echo
58 ) # ← pass echo
59 self._pty_master_ref = getattr(self._proc, "_pty_master_ref", None)
60 self._pty_master = (
61 self._pty_master_ref.get("fd")
62 if self._pty_master_ref is not None
63 else getattr(self._proc, "_pty_master", None)
64 )
65 self._pump_task = asyncio.create_task(self._pump_stdout())
66
67 async def close(self):
68 # Cancel the pump task if it exists

Callers 2

interactive_shellFunction · 0.95
connectMethod · 0.45

Calls 4

_pump_stdoutMethod · 0.95
_spawn_winptyFunction · 0.85
_spawn_posix_ptyFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected