forgexa-cli 1.96.5__tar.gz → 1.97.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.
Files changed (36) hide show
  1. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/PKG-INFO +1 -1
  2. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli/__init__.py +1 -1
  3. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli/component_runtime.py +73 -0
  4. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli/daemon.py +1 -1
  5. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli.egg-info/PKG-INFO +1 -1
  6. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/pyproject.toml +1 -1
  7. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/README.md +0 -0
  8. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli/_build_config.py +0 -0
  9. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli/_local_bind.py +0 -0
  10. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli/agent_core.py +0 -0
  11. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli/autoupgrade.py +0 -0
  12. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli/aws_evidence.py +0 -0
  13. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli/aws_logs_evidence.py +0 -0
  14. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli/main.py +0 -0
  15. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli/observability_contract.py +0 -0
  16. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli/observability_evidence.py +0 -0
  17. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli/ocr_adapter.py +0 -0
  18. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli/py.typed +0 -0
  19. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli/runtime_evidence.py +0 -0
  20. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli/zcode_protocol.py +0 -0
  21. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli.egg-info/SOURCES.txt +0 -0
  22. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli.egg-info/dependency_links.txt +0 -0
  23. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli.egg-info/entry_points.txt +0 -0
  24. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli.egg-info/requires.txt +0 -0
  25. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/forgexa_cli.egg-info/top_level.txt +0 -0
  26. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/setup.cfg +0 -0
  27. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/tests/test_auth_and_runtime_commands.py +0 -0
  28. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/tests/test_autoupgrade.py +0 -0
  29. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/tests/test_check_command.py +0 -0
  30. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/tests/test_expiry_warnings_and_revoke.py +0 -0
  31. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/tests/test_local_bind_commands.py +0 -0
  32. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/tests/test_publish_script.py +0 -0
  33. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/tests/test_runtime_credentials.py +0 -0
  34. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/tests/test_session_credentials.py +0 -0
  35. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/tests/test_silent_install.py +0 -0
  36. {forgexa_cli-1.96.5 → forgexa_cli-1.97.1}/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.96.5
3
+ Version: 1.97.1
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.96.5"
2
+ __version__ = "1.97.1"
@@ -695,6 +695,79 @@ def inspect_usage(lease_id: str, root: Path | None = None) -> dict[str, Any]:
695
695
  return result
696
696
 
697
697
 
698
+ def inspect_installation_usage(installation_id: str, root: Path | None = None) -> dict[str, Any]:
699
+ _identifier(installation_id)
700
+ root = default_store_root() if root is None else root
701
+ if os.name != "posix" or os.environ.get("WSL_DISTRO_NAME"):
702
+ raise ComponentRuntimeError("component_platform_unverified")
703
+
704
+ def snapshot() -> tuple[dict[str, Any], dict[str, Any], list[tuple[str, str, int]]]:
705
+ with _ComponentManagerLock(root):
706
+ target = _component_target(root)
707
+ _private_directory(root / "receipts")
708
+ receipt = _record(root / "receipts" / f"{installation_id}.json", {
709
+ "schema_version", "installation_id", "target_id", "release", "content_digest",
710
+ "entry_point", "files", "created_by_operation_id",
711
+ })
712
+ if (
713
+ receipt is None
714
+ or receipt["installation_id"] != installation_id
715
+ or receipt["target_id"] != target["target_id"]
716
+ ):
717
+ raise ComponentRuntimeError("component_receipt_invalid")
718
+ _private_directory(root / "leases")
719
+ records = []
720
+ for index, path in enumerate((root / "leases").iterdir(), 1):
721
+ if index > 4096:
722
+ raise ComponentRuntimeError("component_usage_unavailable")
723
+ if path.suffix != ".json":
724
+ continue
725
+ lease_id = _identifier(path.stem)
726
+ record = _record(path, {
727
+ "schema_version", "target_id", "installation_id", "lease_id", "process_id",
728
+ "owner_nonce",
729
+ }, 16_384)
730
+ if (
731
+ record is None
732
+ or record["lease_id"] != lease_id
733
+ or record["target_id"] != target["target_id"]
734
+ ):
735
+ raise ComponentRuntimeError("component_usage_changed")
736
+ _identifier(record["installation_id"])
737
+ owner_nonce = _digest(record["owner_nonce"])
738
+ process_id = record["process_id"]
739
+ if type(process_id) is not int or process_id <= 0:
740
+ raise ComponentRuntimeError("component_record_invalid")
741
+ if record["installation_id"] == installation_id:
742
+ if len(records) >= 64:
743
+ raise ComponentRuntimeError("component_usage_unavailable")
744
+ records.append((lease_id, owner_nonce, process_id))
745
+ return target, receipt, sorted(records)
746
+
747
+ target, receipt, records = snapshot()
748
+ counts = {"active": 0, "legacy_unknown": 0, "spawn_unknown": 0, "descendants_unknown": 0}
749
+ for lease_id, _owner_nonce, _process_id in records:
750
+ result = inspect_usage(lease_id, root=root)
751
+ if (
752
+ result["target_id"] != target["target_id"]
753
+ or result["generation"] != target["generation"]
754
+ or result["installation_id"] != installation_id
755
+ ):
756
+ raise ComponentRuntimeError("component_usage_changed")
757
+ counts[result["state"]] += 1
758
+ if snapshot() != (target, receipt, records):
759
+ raise ComponentRuntimeError("component_usage_changed")
760
+ return {
761
+ "schema_version": 1,
762
+ "target_id": target["target_id"],
763
+ "generation": target["generation"],
764
+ "installation_id": installation_id,
765
+ "state": "active" if counts["active"] else "unknown",
766
+ "descendant_coverage": "observed_only",
767
+ "counts": counts,
768
+ }
769
+
770
+
698
771
  def inspect_target(root: Path | None = None) -> dict[str, Any] | None:
699
772
  root = default_store_root() if root is None else root
700
773
  if root.is_symlink():
@@ -1412,7 +1412,7 @@ except (ImportError, ModuleNotFoundError):
1412
1412
  # DAEMON_VERSION is the protocol/logic version of the daemon code.
1413
1413
  # Kept in sync with pyproject.toml version via bump-version.sh.
1414
1414
  # CLIENT_TYPE identifies which packaging/distribution this daemon runs in.
1415
- DAEMON_VERSION = "1.96.5"
1415
+ DAEMON_VERSION = "1.97.1"
1416
1416
 
1417
1417
 
1418
1418
  def _detect_client_type() -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: forgexa-cli
3
- Version: 1.96.5
3
+ Version: 1.97.1
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.96.5"
3
+ version = "1.97.1"
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