akashcli 4.7.7__tar.gz → 4.7.8__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.
- {akashcli-4.7.7 → akashcli-4.7.8}/PKG-INFO +1 -1
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/cli.py +27 -12
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli.egg-info/PKG-INFO +1 -1
- {akashcli-4.7.7 → akashcli-4.7.8}/pyproject.toml +1 -1
- {akashcli-4.7.7 → akashcli-4.7.8}/README.md +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/__init__.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/_net.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/auth.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/client.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/config.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/crypto.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/env_manager.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/exceptions.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/exec.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/integrity.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/logger.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/models.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/p2p.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/packages.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/relay.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/restore.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/snapshot_crypto.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/storage.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/terminal.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/updater.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/uploader.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli/utils.py +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli.egg-info/SOURCES.txt +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli.egg-info/dependency_links.txt +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli.egg-info/entry_points.txt +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli.egg-info/requires.txt +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/akashcli.egg-info/top_level.txt +0 -0
- {akashcli-4.7.7 → akashcli-4.7.8}/setup.cfg +0 -0
|
@@ -3463,26 +3463,41 @@ def mcp_serve(
|
|
|
3463
3463
|
exec_cmd += " -c 4"
|
|
3464
3464
|
if re.search(r"\bapt(-get)?\s+(install|upgrade|remove)\b", exec_cmd) and "-y" not in exec_cmd:
|
|
3465
3465
|
exec_cmd += " -y"
|
|
3466
|
+
if re.search(r"\bdu\b", exec_cmd) and "-x" not in exec_cmd:
|
|
3467
|
+
exec_cmd = re.sub(r"\bdu\b", "du -x", exec_cmd)
|
|
3466
3468
|
|
|
3467
|
-
#
|
|
3469
|
+
# Process-group-isolated runner: immune to pipe deadlocks & orphaned subshells
|
|
3470
|
+
import os, signal
|
|
3468
3471
|
try:
|
|
3469
3472
|
with _Spin(f"exec: {disp_cmd}", min_seconds=0.25, prefix=ts_pfx):
|
|
3470
|
-
|
|
3473
|
+
proc = subprocess.Popen(
|
|
3471
3474
|
exec_cmd,
|
|
3472
3475
|
shell=True,
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
timeout=60,
|
|
3476
|
+
stdout=subprocess.PIPE,
|
|
3477
|
+
stderr=subprocess.PIPE,
|
|
3476
3478
|
stdin=subprocess.DEVNULL,
|
|
3479
|
+
text=True,
|
|
3480
|
+
start_new_session=True,
|
|
3477
3481
|
errors="replace"
|
|
3478
3482
|
)
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3483
|
+
try:
|
|
3484
|
+
out, err = proc.communicate(timeout=25)
|
|
3485
|
+
returncode = proc.returncode
|
|
3486
|
+
raw_out = (out or "") + (err or "")
|
|
3487
|
+
elapsed_ms = (time.monotonic() - t0) * 1000
|
|
3488
|
+
except subprocess.TimeoutExpired:
|
|
3489
|
+
try:
|
|
3490
|
+
os.killpg(os.getpgid(proc.pid), signal.SIGKILL)
|
|
3491
|
+
except Exception:
|
|
3492
|
+
pass
|
|
3493
|
+
try:
|
|
3494
|
+
out, err = proc.communicate(timeout=2)
|
|
3495
|
+
raw_out = (out or "") + (err or "")
|
|
3496
|
+
except Exception:
|
|
3497
|
+
raw_out = ""
|
|
3498
|
+
elapsed_ms = 25000.0
|
|
3499
|
+
raw_out = raw_out or "⛔ Command timed out after 25 seconds."
|
|
3500
|
+
returncode = 124
|
|
3486
3501
|
except Exception as cmd_err:
|
|
3487
3502
|
elapsed_ms = (time.monotonic() - t0) * 1000
|
|
3488
3503
|
raw_out = f"⛔ Command execution error: {cmd_err}"
|
|
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
|