xproof 0.2.2__tar.gz → 0.2.3__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.
- {xproof-0.2.2 → xproof-0.2.3}/PKG-INFO +1 -1
- {xproof-0.2.2 → xproof-0.2.3}/pyproject.toml +1 -1
- {xproof-0.2.2 → xproof-0.2.3}/xproof/__init__.py +1 -1
- {xproof-0.2.2 → xproof-0.2.3}/xproof/client.py +30 -1
- {xproof-0.2.2 → xproof-0.2.3}/xproof.egg-info/PKG-INFO +1 -1
- {xproof-0.2.2 → xproof-0.2.3}/LICENSE +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/README.md +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/setup.cfg +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/tests/test_client.py +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/tests/test_integration.py +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/xproof/exceptions.py +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/xproof/integrations/__init__.py +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/xproof/integrations/autogen.py +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/xproof/integrations/crewai.py +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/xproof/integrations/deerflow.py +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/xproof/integrations/langchain.py +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/xproof/integrations/llamaindex.py +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/xproof/integrations/openai_agents.py +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/xproof/models.py +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/xproof/py.typed +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/xproof/utils.py +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/xproof.egg-info/SOURCES.txt +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/xproof.egg-info/dependency_links.txt +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/xproof.egg-info/requires.txt +0 -0
- {xproof-0.2.2 → xproof-0.2.3}/xproof.egg-info/top_level.txt +0 -0
|
@@ -17,7 +17,7 @@ from .exceptions import (
|
|
|
17
17
|
from .models import BatchResult, Certification, PricingInfo, RegistrationResult
|
|
18
18
|
from .utils import hash_file
|
|
19
19
|
|
|
20
|
-
__version__ = "0.
|
|
20
|
+
__version__ = "0.2.3"
|
|
21
21
|
|
|
22
22
|
DEFAULT_BASE_URL = "https://xproof.app"
|
|
23
23
|
DEFAULT_TIMEOUT = 30
|
|
@@ -378,6 +378,35 @@ class XProofClient:
|
|
|
378
378
|
)
|
|
379
379
|
return data
|
|
380
380
|
|
|
381
|
+
def get_context_drift(self, decision_id: str) -> Dict[str, Any]:
|
|
382
|
+
"""Detect execution context drift across a decision chain.
|
|
383
|
+
|
|
384
|
+
Compares ``model_hash``, ``tools_version``, ``strategy_snapshot``, and
|
|
385
|
+
``operator_scope`` between consecutive proofs in the chain. Returns a
|
|
386
|
+
coherence score and per-stage breakdown of which fields changed.
|
|
387
|
+
|
|
388
|
+
Args:
|
|
389
|
+
decision_id: The shared identifier linking proofs in the chain.
|
|
390
|
+
|
|
391
|
+
Returns:
|
|
392
|
+
A dictionary with:
|
|
393
|
+
|
|
394
|
+
- ``context_coherent`` (bool): True if no drift was detected.
|
|
395
|
+
- ``drift_score`` (float): 0.0 = fully coherent, 1.0 = total drift.
|
|
396
|
+
- ``fields_drifted`` (list[str]): Fields that changed at least once.
|
|
397
|
+
- ``fields_stable`` (list[str]): Fields present in all stages and unchanged.
|
|
398
|
+
- ``fields_absent`` (list[str]): Fields never populated in any stage.
|
|
399
|
+
- ``stages`` (list[dict]): Per-stage context with ``context_break``
|
|
400
|
+
and ``drifted_fields`` flags.
|
|
401
|
+
"""
|
|
402
|
+
from urllib.parse import quote
|
|
403
|
+
data = self._request(
|
|
404
|
+
"GET",
|
|
405
|
+
f"/api/context-drift/{quote(decision_id, safe='')}",
|
|
406
|
+
auth_required=False,
|
|
407
|
+
)
|
|
408
|
+
return data
|
|
409
|
+
|
|
381
410
|
def batch_certify(
|
|
382
411
|
self,
|
|
383
412
|
files: List[Dict[str, Any]],
|
|
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
|
|
File without changes
|
|
File without changes
|