ledgix-python 0.1.10__tar.gz → 0.1.12__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 (24) hide show
  1. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/PKG-INFO +2 -2
  2. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/README.md +1 -1
  3. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/pyproject.toml +1 -1
  4. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/__init__.py +1 -1
  5. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/client.py +4 -0
  6. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/models.py +19 -1
  7. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/.gitignore +0 -0
  8. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/demo.py +0 -0
  9. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/requirements.txt +0 -0
  10. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/adapters/__init__.py +0 -0
  11. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/adapters/crewai.py +0 -0
  12. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/adapters/langchain.py +0 -0
  13. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/adapters/llamaindex.py +0 -0
  14. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/config.py +0 -0
  15. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/enforce.py +0 -0
  16. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/exceptions.py +0 -0
  17. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/manifest.py +0 -0
  18. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/tests/__init__.py +0 -0
  19. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/tests/conftest.py +0 -0
  20. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/tests/test_adapters.py +0 -0
  21. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/tests/test_client.py +0 -0
  22. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/tests/test_enforce.py +0 -0
  23. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/tests/test_manifest.py +0 -0
  24. {ledgix_python-0.1.10 → ledgix_python-0.1.12}/tests/test_models.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ledgix-python
3
- Version: 0.1.10
3
+ Version: 0.1.12
4
4
  Summary: Agent-agnostic compliance shim for SOX 404 policy enforcement via the ALCV Vault
5
5
  Project-URL: Homepage, https://github.com/ledgix-dev/python-sdk
6
6
  Project-URL: Documentation, https://docs.ledgix.dev
@@ -42,7 +42,7 @@ Description-Content-Type: text/markdown
42
42
 
43
43
  # Ledgix ALCV — Python SDK
44
44
 
45
- [![PyPI](https://img.shields.io/badge/pypi-v0.1.10-blue)](https://pypi.org/project/ledgix-python/)
45
+ [![PyPI](https://img.shields.io/badge/pypi-v0.1.12-blue)](https://pypi.org/project/ledgix-python/)
46
46
  [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue)](https://python.org)
47
47
  [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
48
48
 
@@ -1,6 +1,6 @@
1
1
  # Ledgix ALCV — Python SDK
2
2
 
3
- [![PyPI](https://img.shields.io/badge/pypi-v0.1.10-blue)](https://pypi.org/project/ledgix-python/)
3
+ [![PyPI](https://img.shields.io/badge/pypi-v0.1.12-blue)](https://pypi.org/project/ledgix-python/)
4
4
  [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue)](https://python.org)
5
5
  [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
6
6
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "ledgix-python"
7
- version = "0.1.10"
7
+ version = "0.1.12"
8
8
  description = "Agent-agnostic compliance shim for SOX 404 policy enforcement via the ALCV Vault"
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -59,7 +59,7 @@ from .models import (
59
59
  PolicyRegistrationResponse,
60
60
  )
61
61
 
62
- __version__ = "0.1.10"
62
+ __version__ = "0.1.12"
63
63
 
64
64
  __all__ = [
65
65
  # Core
@@ -889,6 +889,8 @@ class LedgixClient:
889
889
  payload = self._encode_deterministic_cbor(
890
890
  {
891
891
  "accepted_at": entry.accepted_at,
892
+ "action_category": entry.action_category,
893
+ "action_metadata": self._normalize_json_numbers_for_cbor(entry.action_metadata),
892
894
  "agent_id": entry.agent_id,
893
895
  "approved": entry.approved,
894
896
  "canonical_version": entry.canonical_version,
@@ -898,6 +900,8 @@ class LedgixClient:
898
900
  "evidence_chunks": self._normalize_json_numbers_for_cbor(entry.evidence_chunks),
899
901
  "intent_hash": entry.intent_hash,
900
902
  "policy_id": entry.policy_id,
903
+ "policy_version_id": entry.policy_version_id,
904
+ "policy_content_hash": entry.policy_content_hash,
901
905
  "reason": entry.reason,
902
906
  "request_id": entry.request_id,
903
907
  "tool_args": self._normalize_json_numbers_for_cbor(entry.tool_args),
@@ -5,7 +5,7 @@ from __future__ import annotations
5
5
 
6
6
  from typing import Any
7
7
 
8
- from pydantic import AliasChoices, BaseModel, ConfigDict, Field
8
+ from pydantic import AliasChoices, BaseModel, ConfigDict, Field, field_validator
9
9
 
10
10
 
11
11
  class ClearanceRequest(BaseModel):
@@ -75,9 +75,13 @@ class LedgerEntry(BaseModel):
75
75
  request_id: str
76
76
  agent_id: str = ""
77
77
  policy_id: str = ""
78
+ policy_version_id: str = ""
79
+ policy_content_hash: str = ""
78
80
  intent_hash: str = ""
79
81
  tool_name: str
80
82
  tool_args: dict[str, Any] = Field(default_factory=dict)
83
+ action_category: str = ""
84
+ action_metadata: dict[str, Any] = Field(default_factory=dict)
81
85
  reason: str = ""
82
86
  citations: list[dict[str, Any]] = Field(default_factory=list)
83
87
  evidence_chunks: list[dict[str, Any]] = Field(default_factory=list)
@@ -103,6 +107,20 @@ class LedgerEntry(BaseModel):
103
107
  )
104
108
  receipt_payload: str = Field(default="")
105
109
 
110
+ @field_validator("tool_args", "action_metadata", mode="before")
111
+ @classmethod
112
+ def _normalize_nullable_dicts(cls, value: Any) -> Any:
113
+ if value is None:
114
+ return {}
115
+ return value
116
+
117
+ @field_validator("citations", "evidence_chunks", mode="before")
118
+ @classmethod
119
+ def _normalize_nullable_lists(cls, value: Any) -> Any:
120
+ if value is None:
121
+ return []
122
+ return value
123
+
106
124
 
107
125
  class LedgerCheckpoint(BaseModel):
108
126
  """Signed checkpoint returned by the Vault."""
File without changes