forgexa-cli 1.106.4__tar.gz → 1.107.0__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 (40) hide show
  1. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/PKG-INFO +1 -1
  2. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/__init__.py +1 -1
  3. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/daemon.py +1 -1
  4. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/observability_contract.py +44 -11
  5. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/observability_evidence.py +15 -0
  6. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli.egg-info/PKG-INFO +1 -1
  7. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/pyproject.toml +1 -1
  8. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/README.md +0 -0
  9. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/_build_config.py +0 -0
  10. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/_local_bind.py +0 -0
  11. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/agent_core.py +0 -0
  12. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/autoupgrade.py +0 -0
  13. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/aws_evidence.py +0 -0
  14. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/aws_logs_evidence.py +0 -0
  15. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/code_review_rules.py +0 -0
  16. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/component_runtime.py +0 -0
  17. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/main.py +0 -0
  18. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/ocr_adapter.py +0 -0
  19. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/py.typed +0 -0
  20. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/runtime_evidence.py +0 -0
  21. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/workspace_storage.py +0 -0
  22. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli/zcode_protocol.py +0 -0
  23. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli.egg-info/SOURCES.txt +0 -0
  24. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli.egg-info/dependency_links.txt +0 -0
  25. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli.egg-info/entry_points.txt +0 -0
  26. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli.egg-info/requires.txt +0 -0
  27. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/forgexa_cli.egg-info/top_level.txt +0 -0
  28. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/setup.cfg +0 -0
  29. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/tests/test_auth_and_runtime_commands.py +0 -0
  30. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/tests/test_autoupgrade.py +0 -0
  31. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/tests/test_check_command.py +0 -0
  32. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/tests/test_delivery_review_packaged.py +0 -0
  33. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/tests/test_expiry_warnings_and_revoke.py +0 -0
  34. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/tests/test_local_bind_commands.py +0 -0
  35. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/tests/test_publish_script.py +0 -0
  36. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/tests/test_runtime_credentials.py +0 -0
  37. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/tests/test_session_credentials.py +0 -0
  38. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/tests/test_silent_install.py +0 -0
  39. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/tests/test_upgrade_observability.py +0 -0
  40. {forgexa_cli-1.106.4 → forgexa_cli-1.107.0}/tests/test_workspace_storage.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: forgexa-cli
3
- Version: 1.106.4
3
+ Version: 1.107.0
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.106.4"
2
+ __version__ = "1.107.0"
@@ -1428,7 +1428,7 @@ except (ImportError, ModuleNotFoundError):
1428
1428
  # DAEMON_VERSION is the protocol/logic version of the daemon code.
1429
1429
  # Kept in sync with pyproject.toml version via bump-version.sh.
1430
1430
  # CLIENT_TYPE identifies which packaging/distribution this daemon runs in.
1431
- DAEMON_VERSION = "1.106.4"
1431
+ DAEMON_VERSION = "1.107.0"
1432
1432
 
1433
1433
 
1434
1434
  def _detect_client_type() -> str:
@@ -62,7 +62,7 @@ class ObservabilitySelection(ObservabilityModel):
62
62
  @model_validator(mode='after')
63
63
  def validate_arguments(self) -> ObservabilitySelection:
64
64
  arguments = {'percentile': 'percentile', 'rate_interval_seconds': 'rate', 'threshold': 'apdex'}
65
- for (name, aggregate) in arguments.items():
65
+ for name, aggregate in arguments.items():
66
66
  required = self.aggregate == aggregate
67
67
  if required != (getattr(self, name) is not None):
68
68
  raise ValueError('Aggregate arguments do not match the selected function')
@@ -127,7 +127,7 @@ class ObservabilityQuery(ObservabilityModel):
127
127
  pending = [(value, 1)] if value is not None else []
128
128
  count = 0
129
129
  while pending:
130
- (node, depth) = pending.pop()
130
+ node, depth = pending.pop()
131
131
  count += 1
132
132
  if depth > 8 or count > 100:
133
133
  raise ValueError('Filter tree exceeds its depth or node limit')
@@ -396,7 +396,7 @@ class ObservabilitySeries(ObservabilityModel):
396
396
  raise ValueError('observability_percentile_required')
397
397
  for bucket in self.buckets:
398
398
  validate_unit_values(bucket.native_value, bucket.value, self.native_unit, self.display_unit)
399
- for (previous, current) in zip(self.buckets, self.buckets[1:]):
399
+ for previous, current in zip(self.buckets, self.buckets[1:]):
400
400
  if previous.end_time > current.start_time:
401
401
  raise ValueError('observability_time_buckets_overlap')
402
402
  return self
@@ -432,7 +432,7 @@ class ObservabilityHistory(ObservabilityModel):
432
432
  raise ValueError('observability_history_empty')
433
433
  if len(self.native_values) != len(self.values) or (self.statistic == 'percentile') != (self.percentile is not None):
434
434
  raise ValueError('observability_history_semantics_invalid')
435
- for (native_value, value) in _strict_zip(self.native_values, self.values):
435
+ for native_value, value in _strict_zip(self.native_values, self.values):
436
436
  validate_unit_values(native_value, value, self.native_unit, self.display_unit)
437
437
  validate_unit_values(self.latest_native_value, self.latest_value, self.native_unit, self.display_unit)
438
438
  return self
@@ -616,7 +616,7 @@ class ObservabilitySnapshotPayload(ObservabilityModel):
616
616
  column = column_map[item.field_id]
617
617
  if column.statistic != item.statistic or column.percentile != item.percentile:
618
618
  raise ValueError('observability_statistic_mismatch')
619
- for (field_id, value) in item.dimensions.items():
619
+ for field_id, value in item.dimensions.items():
620
620
  if field_id not in column_map:
621
621
  raise ValueError('observability_projection_not_declared')
622
622
  validate_redacted_value(value, column_map[field_id].redaction)
@@ -642,7 +642,7 @@ class ObservabilitySnapshotPayload(ObservabilityModel):
642
642
  else:
643
643
  if item.kind == 'span' and any((column.redaction != 'none' for column in self.columns)):
644
644
  raise ValueError('observability_redacted_representation_required')
645
- for (field_id, value) in item.values.items():
645
+ for field_id, value in item.values.items():
646
646
  if field_id not in column_map:
647
647
  raise ValueError('observability_projection_not_declared')
648
648
  mode = column_map[field_id].redaction
@@ -689,7 +689,7 @@ class ObservabilityAttachmentSelection(ObservabilityModel):
689
689
  request_id: UUID
690
690
  item_refs: list[Identifier] = Field(default_factory=list, max_length=1000)
691
691
  field_ids: list[Identifier] = Field(default_factory=list, max_length=50)
692
- representation_version: Literal[1, 2] = 1
692
+ representation_version: Literal[1, 2, 3] = 1
693
693
  include_zero_matches: bool = False
694
694
 
695
695
  @model_validator(mode='after')
@@ -703,18 +703,50 @@ class ObservabilityAttachmentSelection(ObservabilityModel):
703
703
  raise ValueError('observability_attachment_selection_empty')
704
704
  return self
705
705
 
706
+ class ObservabilityPageGroupContext(ObservabilityModel):
707
+ state: Literal['available', 'redacted', 'restricted', 'unavailable']
708
+ value: Union[str, None] = Field(default=None, min_length=1, max_length=2048, repr=False)
709
+
710
+ @model_validator(mode='after')
711
+ def validate_value(self):
712
+ if self.state == 'available' and self.value is not None:
713
+ return self
714
+ if self.state == 'redacted' and self.value is not None:
715
+ if self.value == '[REDACTED]' or (self.value.startswith('sha256:') and len(self.value) == 71 and all((character in '0123456789abcdef' for character in self.value[7:]))):
716
+ return self
717
+ if self.state in {'restricted', 'unavailable'} and self.value is None:
718
+ return self
719
+ raise ValueError('observability_page_group_context_invalid')
720
+
721
+ @model_serializer(mode='wrap')
722
+ def serialize_context(self, handler):
723
+ value = handler(self)
724
+ if self.value is None:
725
+ value.pop('value', None)
726
+ return value
727
+
706
728
  class ObservabilityAttachmentPayload(ObservabilitySnapshotPayload):
707
729
  attachment_id: UUID
708
730
  parent_payload_sha256: Sha256
709
731
  selection: ObservabilityAttachmentSelection
710
732
  redaction_version: int = Field(ge=1, strict=True)
733
+ page_group_context: Union[ObservabilityPageGroupContext, None] = None
734
+
735
+ @model_serializer(mode='wrap')
736
+ def serialize_page_group_context(self, handler):
737
+ value = handler(self)
738
+ if self.page_group_context is None:
739
+ value.pop('page_group_context', None)
740
+ return value
711
741
 
712
742
  @model_validator(mode='after')
713
743
  def validate_selected_content(self) -> ObservabilityAttachmentPayload:
714
744
  if self.selection.field_ids != self.parameters.field_ids:
715
745
  raise ValueError('observability_attachment_selection_mismatch')
716
- if self.selection.representation_version != 2 and any((column.redaction != 'none' for column in self.columns)):
746
+ if self.selection.representation_version == 1 and any((column.redaction != 'none' for column in self.columns)):
717
747
  raise ValueError('observability_representation_version_required')
748
+ if (self.selection.representation_version == 3) != (self.page_group_context is not None) or (self.page_group_context is not None and self.integration_type != 'mpulse'):
749
+ raise ValueError('observability_page_group_context_invalid')
718
750
  selected = set(self.selection.item_refs)
719
751
  represented = set()
720
752
  for item in self.data:
@@ -759,7 +791,7 @@ class ObservabilityEvidenceReference(ObservabilityModel):
759
791
  return self
760
792
 
761
793
  class ObservabilityAttachmentMetadata(ObservabilityEvidenceReference):
762
- representation_version: Literal[1, 2] = 1
794
+ representation_version: Literal[1, 2, 3] = 1
763
795
  schema_version: Literal[1] = 1
764
796
  byte_count: int = Field(ge=1, le=32768, strict=True)
765
797
  expires_at: AwareDatetime
@@ -871,7 +903,7 @@ class TransactionComponent(ObservabilityModel):
871
903
  if any((set(value) - bindings.keys() for value in values)):
872
904
  raise ValueError('Transaction values require declared field bindings')
873
905
  for value in values:
874
- for (column_ref, cell) in value.items():
906
+ for column_ref, cell in value.items():
875
907
  definition = bindings[column_ref]
876
908
  validate_redacted_value(cell, definition.redaction)
877
909
  if cell is not None and (not (definition.value_type == 'number' and type(cell) in {int, float} or (definition.value_type == 'integer' and type(cell) is int) or (definition.value_type == 'boolean' and type(cell) is bool) or (definition.value_type in {'string', 'timestamp'} and isinstance(cell, str)))):
@@ -989,7 +1021,7 @@ def canonical_bytes(value: object) -> bytes:
989
1021
 
990
1022
  def _unique_object(pairs):
991
1023
  result = {}
992
- for (key, value) in pairs:
1024
+ for key, value in pairs:
993
1025
  if key in result:
994
1026
  raise ValueError('observability_invalid_json')
995
1027
  result[key] = value
@@ -1035,6 +1067,7 @@ ObservabilityRedactedItem.model_rebuild()
1035
1067
  ObservabilitySnapshotQuality.model_rebuild()
1036
1068
  ObservabilitySnapshotPayload.model_rebuild()
1037
1069
  ObservabilityAttachmentSelection.model_rebuild()
1070
+ ObservabilityPageGroupContext.model_rebuild()
1038
1071
  ObservabilityAttachmentPayload.model_rebuild()
1039
1072
  ObservabilityEvidenceReference.model_rebuild()
1040
1073
  ObservabilityAttachmentMetadata.model_rebuild()
@@ -62,6 +62,21 @@ def validate_reference(reference) -> dict:
62
62
  return normalized
63
63
 
64
64
 
65
+ def page_group_context_protocol() -> int:
66
+ from typing import get_args
67
+
68
+ try:
69
+ _reference, metadata, payload, _canonical, _loads = _contract()
70
+ selection = payload.model_fields["selection"].annotation
71
+ return int(
72
+ "page_group_context" in payload.model_fields
73
+ and 3 in get_args(selection.model_fields["representation_version"].annotation)
74
+ and 3 in get_args(metadata.model_fields["representation_version"].annotation)
75
+ )
76
+ except (EvidenceError, AttributeError, KeyError, TypeError):
77
+ return 0
78
+
79
+
65
80
  @lru_cache(maxsize=1)
66
81
  def _transaction_contract():
67
82
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: forgexa-cli
3
- Version: 1.106.4
3
+ Version: 1.107.0
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.106.4"
3
+ version = "1.107.0"
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