forgexa-cli 1.29.1__tar.gz → 1.29.2__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 (27) hide show
  1. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/PKG-INFO +1 -1
  2. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/forgexa_cli/__init__.py +1 -1
  3. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/forgexa_cli/agent_core.py +37 -8
  4. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/forgexa_cli/daemon.py +1 -1
  5. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/forgexa_cli.egg-info/PKG-INFO +1 -1
  6. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/pyproject.toml +1 -1
  7. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/README.md +0 -0
  8. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/forgexa_cli/_build_config.py +0 -0
  9. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/forgexa_cli/_local_bind.py +0 -0
  10. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/forgexa_cli/autoupgrade.py +0 -0
  11. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/forgexa_cli/main.py +0 -0
  12. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/forgexa_cli/py.typed +0 -0
  13. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/forgexa_cli.egg-info/SOURCES.txt +0 -0
  14. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/forgexa_cli.egg-info/dependency_links.txt +0 -0
  15. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/forgexa_cli.egg-info/entry_points.txt +0 -0
  16. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/forgexa_cli.egg-info/requires.txt +0 -0
  17. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/forgexa_cli.egg-info/top_level.txt +0 -0
  18. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/setup.cfg +0 -0
  19. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/tests/test_auth_and_runtime_commands.py +0 -0
  20. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/tests/test_autoupgrade.py +0 -0
  21. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/tests/test_check_command.py +0 -0
  22. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/tests/test_expiry_warnings_and_revoke.py +0 -0
  23. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/tests/test_local_bind_commands.py +0 -0
  24. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/tests/test_runtime_credentials.py +0 -0
  25. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/tests/test_session_credentials.py +0 -0
  26. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/tests/test_silent_install.py +0 -0
  27. {forgexa_cli-1.29.1 → forgexa_cli-1.29.2}/tests/test_upgrade_observability.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: forgexa-cli
3
- Version: 1.29.1
3
+ Version: 1.29.2
4
4
  Summary: Forgexa CLI — command-line client and AI agent runtime for the Forgexa platform
5
5
  Author-email: Jason Sun <dev.winds@gmail.com>
6
6
  License-Expression: MIT
@@ -1,2 +1,2 @@
1
1
  """forgexa-cli — Forgexa command-line client."""
2
- __version__ = "1.29.1"
2
+ __version__ = "1.29.2"
@@ -435,13 +435,39 @@ class AgentDiscovery:
435
435
  / "github.copilot-chat" / "copilotCli",
436
436
  ):
437
437
  extra_dirs.append(config_dir)
438
- # nvm (macOS + Linux)
439
- nvm_dir = os.environ.get("NVM_DIR", str(home / ".nvm"))
440
- nvm_path = Path(nvm_dir)
441
- if nvm_path.is_dir():
442
- versions = sorted(nvm_path.glob("versions/node/*/bin"), reverse=True)
443
- if versions:
444
- extra_dirs.append(versions[0])
438
+ # nvm (macOS + Linux). Probe the default ~/.nvm root AND the
439
+ # ~/.config/nvm variant (non-default install location — observed
440
+ # in the wild; npm -g installs land under its versioned bin dirs
441
+ # and are invisible to the daemon otherwise). NVM_DIR wins when
442
+ # the environment actually carries it.
443
+ nvm_roots: list[Path] = []
444
+ nvm_dir_env = os.environ.get("NVM_DIR", "")
445
+ if nvm_dir_env:
446
+ nvm_roots.append(Path(nvm_dir_env))
447
+ nvm_roots += [home / ".nvm", home / ".config" / "nvm"]
448
+
449
+ def _node_version_key(bin_dir: Path) -> tuple:
450
+ try:
451
+ return tuple(
452
+ int(x) for x in bin_dir.parent.name.lstrip("v").split(".")
453
+ )
454
+ except ValueError:
455
+ return (0,)
456
+
457
+ seen_roots: set[Path] = set()
458
+ for nvm_path in nvm_roots:
459
+ if nvm_path in seen_roots or not nvm_path.is_dir():
460
+ continue
461
+ seen_roots.add(nvm_path)
462
+ # Probe ALL installed node versions, newest first: npm -g
463
+ # installs are per-version, and users frequently install an
464
+ # agent CLI under one version and later add/switch to a
465
+ # newer node — newest-only probing would miss those agents.
466
+ extra_dirs.extend(sorted(
467
+ nvm_path.glob("versions/node/*/bin"),
468
+ key=_node_version_key,
469
+ reverse=True,
470
+ ))
445
471
 
446
472
  current = os.environ.get("PATH", "")
447
473
  current_set = set(current.split(os.pathsep))
@@ -471,7 +497,10 @@ class AgentDiscovery:
471
497
  # Binary found but version check failed — it is a stub or
472
498
  # not properly installed (e.g. copilot prompts to install).
473
499
  logger.warning(
474
- "Agent %s found at %s but version check failed — skipping",
500
+ "Agent %s found at %s but version check failed — skipping. "
501
+ "Likely an uninitialized first-run stub (e.g. GitHub Copilot CLI "
502
+ "prompts \"Install GitHub Copilot CLI? [y/N]\"): run it once in a "
503
+ "terminal, complete the setup/login, then restart the daemon.",
475
504
  agent_id, resolved,
476
505
  )
477
506
  continue
@@ -910,7 +910,7 @@ except (ImportError, ModuleNotFoundError):
910
910
  # DAEMON_VERSION is the protocol/logic version of the daemon code.
911
911
  # Kept in sync with pyproject.toml version via bump-version.sh.
912
912
  # CLIENT_TYPE identifies which packaging/distribution this daemon runs in.
913
- DAEMON_VERSION = "1.29.1"
913
+ DAEMON_VERSION = "1.29.2"
914
914
 
915
915
 
916
916
  def _detect_client_type() -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: forgexa-cli
3
- Version: 1.29.1
3
+ Version: 1.29.2
4
4
  Summary: Forgexa CLI — command-line client and AI agent runtime for the Forgexa platform
5
5
  Author-email: Jason Sun <dev.winds@gmail.com>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "forgexa-cli"
3
- version = "1.29.1"
3
+ version = "1.29.2"
4
4
  description = "Forgexa CLI — command-line client and AI agent runtime for the Forgexa platform"
5
5
  requires-python = ">=3.9"
6
6
  license = "MIT"
File without changes
File without changes