akashcli 4.7.7__tar.gz → 4.7.9__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.
Files changed (33) hide show
  1. {akashcli-4.7.7 → akashcli-4.7.9}/PKG-INFO +1 -1
  2. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/cli.py +50 -18
  3. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli.egg-info/PKG-INFO +1 -1
  4. {akashcli-4.7.7 → akashcli-4.7.9}/pyproject.toml +1 -1
  5. {akashcli-4.7.7 → akashcli-4.7.9}/README.md +0 -0
  6. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/__init__.py +0 -0
  7. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/_net.py +0 -0
  8. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/auth.py +0 -0
  9. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/client.py +0 -0
  10. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/config.py +0 -0
  11. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/crypto.py +0 -0
  12. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/env_manager.py +0 -0
  13. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/exceptions.py +0 -0
  14. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/exec.py +0 -0
  15. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/integrity.py +0 -0
  16. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/logger.py +0 -0
  17. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/models.py +0 -0
  18. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/p2p.py +0 -0
  19. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/packages.py +0 -0
  20. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/relay.py +0 -0
  21. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/restore.py +0 -0
  22. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/snapshot_crypto.py +0 -0
  23. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/storage.py +0 -0
  24. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/terminal.py +0 -0
  25. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/updater.py +0 -0
  26. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/uploader.py +0 -0
  27. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli/utils.py +0 -0
  28. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli.egg-info/SOURCES.txt +0 -0
  29. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli.egg-info/dependency_links.txt +0 -0
  30. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli.egg-info/entry_points.txt +0 -0
  31. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli.egg-info/requires.txt +0 -0
  32. {akashcli-4.7.7 → akashcli-4.7.9}/akashcli.egg-info/top_level.txt +0 -0
  33. {akashcli-4.7.7 → akashcli-4.7.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: akashcli
3
- Version: 4.7.7
3
+ Version: 4.7.9
4
4
  Summary: Akash CLI — secure remote shell relay, file vault, and device management
5
5
  License-Expression: MIT
6
6
  Keywords: akash,cli,relay,remote-shell,vault
@@ -19,7 +19,7 @@ from .config import ConfigManager, DEFAULT_STORAGE_URL
19
19
  from .exceptions import AkashError
20
20
  from .exec import _device_fingerprint
21
21
  from .uploader import VaultUploader
22
- from .updater import show_update_warning_if_available, check_for_updates, format_update_box, mark_update_printed
22
+ from .updater import show_update_warning_if_available, check_for_updates, format_update_box, mark_update_printed, is_newer_version
23
23
 
24
24
  atexit.register(show_update_warning_if_available)
25
25
 
@@ -361,23 +361,38 @@ def update():
361
361
 
362
362
  print(f" {_Y}⚡{_RS} New version available: {_DM}{__version__}{_RS} {_C}→{_RS} {_G}{latest}{_RS}")
363
363
  with _Spin(f"updating akashcli to v{latest}…"):
364
- cmd = [sys.executable, "-m", "pip", "install", "-U", "akashcli", "--break-system-packages"]
364
+ cmd = [sys.executable, "-m", "pip", "install", "-U", "--no-cache-dir", f"akashcli=={latest}", "--break-system-packages"]
365
365
  res = subprocess.run(cmd, capture_output=True, text=True)
366
366
  if res.returncode != 0:
367
- cmd = [sys.executable, "-m", "pip", "install", "-U", "akashcli"]
367
+ cmd = [sys.executable, "-m", "pip", "install", "-U", "--no-cache-dir", f"akashcli=={latest}"]
368
368
  res = subprocess.run(cmd, capture_output=True, text=True)
369
+ if res.returncode != 0:
370
+ # Fallback to general upgrade if pinned version is waiting on PyPI CDN propagation
371
+ cmd = [sys.executable, "-m", "pip", "install", "-U", "--no-cache-dir", "akashcli", "--break-system-packages"]
372
+ res = subprocess.run(cmd, capture_output=True, text=True)
373
+
374
+ # Verify what version is actually installed now in a fresh Python runtime
375
+ chk = subprocess.run(
376
+ [sys.executable, "-c", "import importlib.metadata; print(importlib.metadata.version('akashcli'))"],
377
+ capture_output=True,
378
+ text=True
379
+ )
380
+ curr = chk.stdout.strip() if chk.returncode == 0 else ""
369
381
 
370
- if res.returncode == 0:
371
- _ok(f"Successfully updated akashcli to {_G}v{latest}{_RS}!")
382
+ if curr == latest or (curr and not is_newer_version(latest, curr)):
383
+ _ok(f"Successfully updated akashcli to {_G}v{curr or latest}{_RS}!")
372
384
  try:
373
385
  from .integrity import seal
374
386
  seal()
375
387
  _ok("Integrity manifest re-sealed.")
376
388
  except Exception:
377
389
  pass
390
+ elif res.returncode == 0:
391
+ _warn(f"pip reported success, but installed version is still v{curr or __version__}.")
392
+ _info(f"PyPI CDN may take 1-2 minutes to replicate. Try: {_cy(f'pip install -U --no-cache-dir akashcli=={latest}')}")
378
393
  else:
379
394
  _err(f"Update failed: {res.stderr or res.stdout}")
380
- _info(f"Please run manually: {_cy('pip install -U akashcli')}")
395
+ _info(f"Please run manually: {_cy(f'pip install -U --no-cache-dir akashcli=={latest}')}")
381
396
  mark_update_printed()
382
397
  _p()
383
398
 
@@ -3463,26 +3478,43 @@ def mcp_serve(
3463
3478
  exec_cmd += " -c 4"
3464
3479
  if re.search(r"\bapt(-get)?\s+(install|upgrade|remove)\b", exec_cmd) and "-y" not in exec_cmd:
3465
3480
  exec_cmd += " -y"
3481
+ if re.search(r"\bdu\b", exec_cmd) and "-x" not in exec_cmd:
3482
+ exec_cmd = re.sub(r"\bdu\b", "du -x", exec_cmd)
3483
+ if re.search(r"\btermux-location\b", exec_cmd) and "-r" not in exec_cmd:
3484
+ exec_cmd = re.sub(r"\btermux-location\b", "termux-location -r once", exec_cmd)
3466
3485
 
3467
- # Instant frame-0 animated spinner with live visibility and timeout protection
3486
+ # Process-group-isolated runner: immune to pipe deadlocks & orphaned subshells
3487
+ import os, signal
3468
3488
  try:
3469
3489
  with _Spin(f"exec: {disp_cmd}", min_seconds=0.25, prefix=ts_pfx):
3470
- r = subprocess.run(
3490
+ proc = subprocess.Popen(
3471
3491
  exec_cmd,
3472
3492
  shell=True,
3473
- capture_output=True,
3474
- text=True,
3475
- timeout=60,
3493
+ stdout=subprocess.PIPE,
3494
+ stderr=subprocess.PIPE,
3476
3495
  stdin=subprocess.DEVNULL,
3496
+ text=True,
3497
+ start_new_session=True,
3477
3498
  errors="replace"
3478
3499
  )
3479
- elapsed_ms = (time.monotonic() - t0) * 1000
3480
- raw_out = (r.stdout or "") + (r.stderr or "")
3481
- returncode = r.returncode
3482
- except subprocess.TimeoutExpired:
3483
- elapsed_ms = 60000.0
3484
- raw_out = "⛔ Command timed out after 60 seconds."
3485
- returncode = 124
3500
+ try:
3501
+ out, err = proc.communicate(timeout=25)
3502
+ returncode = proc.returncode
3503
+ raw_out = (out or "") + (err or "")
3504
+ elapsed_ms = (time.monotonic() - t0) * 1000
3505
+ except subprocess.TimeoutExpired:
3506
+ try:
3507
+ os.killpg(os.getpgid(proc.pid), signal.SIGKILL)
3508
+ except Exception:
3509
+ pass
3510
+ try:
3511
+ out, err = proc.communicate(timeout=2)
3512
+ raw_out = (out or "") + (err or "")
3513
+ except Exception:
3514
+ raw_out = ""
3515
+ elapsed_ms = 25000.0
3516
+ raw_out = raw_out or "⛔ Command timed out after 25 seconds."
3517
+ returncode = 124
3486
3518
  except Exception as cmd_err:
3487
3519
  elapsed_ms = (time.monotonic() - t0) * 1000
3488
3520
  raw_out = f"⛔ Command execution error: {cmd_err}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: akashcli
3
- Version: 4.7.7
3
+ Version: 4.7.9
4
4
  Summary: Akash CLI — secure remote shell relay, file vault, and device management
5
5
  License-Expression: MIT
6
6
  Keywords: akash,cli,relay,remote-shell,vault
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "akashcli"
3
- version = "4.7.7"
3
+ version = "4.7.9"
4
4
  description = "Akash CLI — secure remote shell relay, file vault, and device management"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.9"
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