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.
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/PKG-INFO +2 -2
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/README.md +1 -1
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/pyproject.toml +1 -1
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/__init__.py +1 -1
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/client.py +4 -0
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/models.py +19 -1
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/.gitignore +0 -0
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/demo.py +0 -0
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/requirements.txt +0 -0
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/adapters/__init__.py +0 -0
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/adapters/crewai.py +0 -0
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/adapters/langchain.py +0 -0
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/adapters/llamaindex.py +0 -0
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/config.py +0 -0
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/enforce.py +0 -0
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/exceptions.py +0 -0
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/src/ledgix_python/manifest.py +0 -0
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/tests/__init__.py +0 -0
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/tests/conftest.py +0 -0
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/tests/test_adapters.py +0 -0
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/tests/test_client.py +0 -0
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/tests/test_enforce.py +0 -0
- {ledgix_python-0.1.10 → ledgix_python-0.1.12}/tests/test_manifest.py +0 -0
- {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.
|
|
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
|
-
[](https://pypi.org/project/ledgix-python/)
|
|
46
46
|
[](https://python.org)
|
|
47
47
|
[](LICENSE)
|
|
48
48
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Ledgix ALCV — Python SDK
|
|
2
2
|
|
|
3
|
-
[](https://pypi.org/project/ledgix-python/)
|
|
4
4
|
[](https://python.org)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
|
|
@@ -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
|
|
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
|