exxec 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {exxec-0.2.0 → exxec-0.2.1}/PKG-INFO +1 -1
- {exxec-0.2.0 → exxec-0.2.1}/pyproject.toml +1 -1
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/process_manager.py +39 -11
- {exxec-0.2.0 → exxec-0.2.1}/LICENSE +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/README.md +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/__init__.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/acp_provider/__init__.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/acp_provider/process_manager.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/acp_provider/provider.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/base.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/beam_provider/__init__.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/beam_provider/helpers.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/beam_provider/process_manager.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/beam_provider/provider.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/configs.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/daytona_provider/__init__.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/daytona_provider/helpers.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/daytona_provider/process_manager.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/daytona_provider/provider.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/daytona_provider/pty_manager.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/docker_provider/__init__.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/docker_provider/provider.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/docker_provider/pty_manager.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/e2b_provider/__init__.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/e2b_provider/process_manager.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/e2b_provider/provider.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/e2b_provider/pty_manager.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/events.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/local_provider/__init__.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/local_provider/provider.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/local_provider/pty_manager.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/local_provider/utils.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/log.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/microsandbox_provider/__init__.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/microsandbox_provider/provider.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/mock_provider/__init__.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/mock_provider/process_manager.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/mock_provider/provider.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/mock_provider/pty_manager.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/modal_provider/__init__.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/modal_provider/provider.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/modal_provider/pty_manager.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/models.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/parse_output.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/pep723.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/pty_manager.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/py.typed +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/pyodide_provider/__init__.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/pyodide_provider/filesystem.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/pyodide_provider/provider.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/pyodide_provider/pyodide_server.ts +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/remote_callable.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/srt_provider/__init__.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/srt_provider/config.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/srt_provider/provider.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/ssh_provider/__init__.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/ssh_provider/provider.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/ssh_provider/pty_manager.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/vercel_provider/__init__.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/vercel_provider/process_manager.py +0 -0
- {exxec-0.2.0 → exxec-0.2.1}/src/exxec/vercel_provider/provider.py +0 -0
|
@@ -30,6 +30,7 @@ class TerminalTask(BaseTerminal):
|
|
|
30
30
|
"""Represents a running terminal task for the generic implementation."""
|
|
31
31
|
|
|
32
32
|
task: asyncio.Task[Any] | None = field(default=None)
|
|
33
|
+
process: asyncio.subprocess.Process | None = field(default=None)
|
|
33
34
|
|
|
34
35
|
def is_running(self) -> bool:
|
|
35
36
|
"""Check if task is still running."""
|
|
@@ -71,20 +72,41 @@ class EnvironmentTerminalManager(ProcessManagerProtocol):
|
|
|
71
72
|
return terminal_id
|
|
72
73
|
|
|
73
74
|
async def _run_terminal(self, terminal_id: str, command: str) -> None:
|
|
74
|
-
"""Run terminal command in background.
|
|
75
|
+
"""Run terminal command in background.
|
|
76
|
+
|
|
77
|
+
Spawns process directly without timeout constraints to support
|
|
78
|
+
long-running daemon processes.
|
|
79
|
+
"""
|
|
80
|
+
from anyenv.processes import create_shell_process
|
|
81
|
+
|
|
75
82
|
terminal = self._terminals[terminal_id]
|
|
76
83
|
try:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
process = await create_shell_process(
|
|
85
|
+
command,
|
|
86
|
+
stdout="pipe",
|
|
87
|
+
stderr="stdout",
|
|
88
|
+
env=self.env.get_env(),
|
|
89
|
+
)
|
|
90
|
+
terminal.process = process # Store for kill_process
|
|
91
|
+
|
|
92
|
+
# Read output without timeout (daemon-friendly)
|
|
93
|
+
if process.stdout:
|
|
94
|
+
while True:
|
|
95
|
+
line = await process.stdout.readline()
|
|
96
|
+
if not line:
|
|
97
|
+
break
|
|
98
|
+
terminal.add_output(line.decode())
|
|
99
|
+
|
|
100
|
+
exit_code = await process.wait()
|
|
101
|
+
terminal.set_exit_code(exit_code)
|
|
87
102
|
|
|
103
|
+
except asyncio.CancelledError:
|
|
104
|
+
# Task was cancelled (e.g., kill_process called)
|
|
105
|
+
if hasattr(terminal, "process") and terminal.process:
|
|
106
|
+
terminal.process.kill()
|
|
107
|
+
await terminal.process.wait()
|
|
108
|
+
terminal.set_exit_code(130)
|
|
109
|
+
raise
|
|
88
110
|
except Exception as e:
|
|
89
111
|
terminal.add_output(f"Terminal error: {e}\n")
|
|
90
112
|
terminal.set_exit_code(1)
|
|
@@ -128,6 +150,12 @@ class EnvironmentTerminalManager(ProcessManagerProtocol):
|
|
|
128
150
|
|
|
129
151
|
terminal = self._terminals[process_id]
|
|
130
152
|
if terminal.is_running():
|
|
153
|
+
# Kill the subprocess first if it exists
|
|
154
|
+
if terminal.process and terminal.process.returncode is None:
|
|
155
|
+
terminal.process.kill()
|
|
156
|
+
with contextlib.suppress(Exception):
|
|
157
|
+
await terminal.process.wait()
|
|
158
|
+
# Then cancel the task
|
|
131
159
|
if terminal.task:
|
|
132
160
|
terminal.task.cancel()
|
|
133
161
|
with contextlib.suppress(asyncio.CancelledError):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|