akashcli 4.6.4__tar.gz → 4.6.5__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 (32) hide show
  1. {akashcli-4.6.4 → akashcli-4.6.5}/PKG-INFO +1 -1
  2. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/__init__.py +1 -1
  3. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/relay.py +26 -28
  4. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli.egg-info/PKG-INFO +1 -1
  5. {akashcli-4.6.4 → akashcli-4.6.5}/pyproject.toml +1 -1
  6. {akashcli-4.6.4 → akashcli-4.6.5}/README.md +0 -0
  7. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/_net.py +0 -0
  8. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/auth.py +0 -0
  9. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/cli.py +0 -0
  10. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/client.py +0 -0
  11. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/config.py +0 -0
  12. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/crypto.py +0 -0
  13. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/env_manager.py +0 -0
  14. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/exceptions.py +0 -0
  15. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/exec.py +0 -0
  16. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/integrity.py +0 -0
  17. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/logger.py +0 -0
  18. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/models.py +0 -0
  19. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/p2p.py +0 -0
  20. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/packages.py +0 -0
  21. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/restore.py +0 -0
  22. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/snapshot_crypto.py +0 -0
  23. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/storage.py +0 -0
  24. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/terminal.py +0 -0
  25. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/uploader.py +0 -0
  26. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli/utils.py +0 -0
  27. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli.egg-info/SOURCES.txt +0 -0
  28. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli.egg-info/dependency_links.txt +0 -0
  29. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli.egg-info/entry_points.txt +0 -0
  30. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli.egg-info/requires.txt +0 -0
  31. {akashcli-4.6.4 → akashcli-4.6.5}/akashcli.egg-info/top_level.txt +0 -0
  32. {akashcli-4.6.4 → akashcli-4.6.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: akashcli
3
- Version: 4.6.4
3
+ Version: 4.6.5
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
@@ -2,6 +2,6 @@ try:
2
2
  from importlib.metadata import version
3
3
  __version__ = version("akashcli")
4
4
  except Exception:
5
- __version__ = "4.6.4"
5
+ __version__ = "4.6.5"
6
6
 
7
7
  AKASH_VERSION = __version__
@@ -25,7 +25,7 @@ Wire protocol (all JSON frames over the relay WebSocket):
25
25
 
26
26
  from __future__ import annotations
27
27
 
28
- AKASH_VERSION = "4.6.4"
28
+ AKASH_VERSION = "4.6.5"
29
29
 
30
30
  import base64
31
31
  import json
@@ -290,31 +290,24 @@ def _handle_pty(ws, frame: dict) -> None:
290
290
  import subprocess as _sp
291
291
  import tempfile as _tmp
292
292
 
293
- shell = command or os.environ.get("SHELL", "/bin/bash")
294
-
295
- # On Android non-root, TIOCSCTTY is blocked by SELinux so bash prints:
296
- # "cannot set terminal process group … no job control"
297
- # Fix: launch bash with --rcfile pointing to a temp file that sources
298
- # ~/.bashrc then runs `set +m` (disable job-control monitoring).
299
- # This silences the warning while keeping the shell fully interactive.
300
- _env = {**os.environ,
301
- "TERM": "xterm-256color",
302
- "COLUMNS": str(cols), "LINES": str(rows)}
293
+ shell_bin = os.environ.get("SHELL", "/bin/bash")
294
+ _env = {**os.environ, "TERM": "xterm-256color", "COLUMNS": str(cols), "LINES": str(rows)}
303
295
  _bash_env_file = None
304
- _shell_args = [shell]
305
- if "bash" in shell.lower():
306
- try:
307
- _fd, _bash_env_file = _tmp.mkstemp(prefix=".akash_rc_", suffix=".sh")
308
- # Source ~/.bashrc if it exists, then disable job-control monitoring
309
- _rc = (
310
- b'[ -f ~/.bashrc ] && . ~/.bashrc\n'
311
- b'set +m\n'
312
- )
313
- os.write(_fd, _rc)
314
- os.close(_fd)
315
- _shell_args = [shell, "--rcfile", _bash_env_file]
316
- except Exception:
317
- _bash_env_file = None
296
+
297
+ if command:
298
+ # Evaluate commands with flags/arguments through the shell
299
+ _shell_args = [shell_bin, "-c", command]
300
+ else:
301
+ _shell_args = [shell_bin]
302
+ if "bash" in shell_bin.lower():
303
+ try:
304
+ _fd, _bash_env_file = _tmp.mkstemp(prefix=".akash_rc_", suffix=".sh")
305
+ _rc = b'[ -f ~/.bashrc ] && . ~/.bashrc\nset +m\n'
306
+ os.write(_fd, _rc)
307
+ os.close(_fd)
308
+ _shell_args = [shell_bin, "--rcfile", _bash_env_file]
309
+ except Exception:
310
+ _bash_env_file = None
318
311
 
319
312
  try:
320
313
  proc = _sp.Popen(
@@ -919,9 +912,14 @@ _PTY_APPS = frozenset({
919
912
 
920
913
  def _is_pty_cmd(cmd: str) -> bool:
921
914
  """Return True if cmd should run in PTY mode (TUI / interactive app)."""
922
- first = cmd.strip().lstrip("\\").split()[0] if cmd.strip() else ""
923
- # strip path — /usr/bin/vim → vim
924
- first = first.split("/")[-1]
915
+ parts = cmd.strip().lstrip("\\").split()
916
+ if not parts:
917
+ return False
918
+ first = parts[0].split("/")[-1]
919
+ # Commands with -c, -e, or file arguments are batch scripts, NOT interactive TUI sessions
920
+ if first in ("python", "python3", "ipython", "node", "ruby", "perl"):
921
+ if len(parts) > 1 and (parts[1] in ("-c", "-e") or not parts[1].startswith("-")):
922
+ return False
925
923
  return first in _PTY_APPS
926
924
 
927
925
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: akashcli
3
- Version: 4.6.4
3
+ Version: 4.6.5
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.6.4"
3
+ version = "4.6.5"
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