diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ddb9985..493148b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,17 @@ Format: [Semantic Versioning](https://semver.org/). Spec versions follow `MAJOR. acceptance behavior. Based on the maintainer ruling and producer feedback from @chernistry and @lywinged in #247. +- **`CitationCheck` and `check_citations` are exported from the package root + (#190).** `verify_record()` returns one `VerificationResult` carrying both a + `RevocationCheck` and a mapping of `CitationCheck`, and until now the revocation + half was reachable as `agentrust_trace.RevocationCheck` while the citation half + raised `AttributeError` and had to be reached by module path. The two names now + sit beside their revocation counterparts in `__all__`, which the description of + the change that added `citations` said would follow it. Nothing else changes: + the same objects stay reachable at `agentrust_trace.citation` as before, and no + behaviour, signature or outcome is affected. Informative only: no schema, + wire-format or normative change. + ## [0.11.0] - 2026-09-25 - **Breaking:** `TraceSandboxAdapter` and `TraceAGTAdapter` require `enforcement_mode`; diff --git a/src/agentrust_trace/__init__.py b/src/agentrust_trace/__init__.py index fad4fea6..c33116f6 100644 --- a/src/agentrust_trace/__init__.py +++ b/src/agentrust_trace/__init__.py @@ -38,6 +38,10 @@ sign_record, verify_record, ) +from agentrust_trace.citation import ( + CitationCheck, + check_citations, +) from agentrust_trace.revocation import ( RevocationCheck, VerificationResult, @@ -83,10 +87,12 @@ "RuntimeInfo", "ToolTranscript", "TrustRecord", + "CitationCheck", "RevocationCheck", "RevocationStore", "VerificationResult", "check_bundle", + "check_citations", "DEFAULT_ACCEPTED_PROFILES", "TRACE_PROFILE_V0_2", "SCHEMA", diff --git a/tests/test_citation_resolution.py b/tests/test_citation_resolution.py index 005602a0..d1c9e955 100644 --- a/tests/test_citation_resolution.py +++ b/tests/test_citation_resolution.py @@ -468,6 +468,29 @@ def resolver(uri: str) -> bytes: assert calls == expected_calls +# ---- the package surface ------------------------------------------------------------- + + +def test_the_citation_surface_is_exported_beside_the_revocation_surface() -> None: + """One `VerificationResult` carries a `RevocationCheck` and a mapping of + `CitationCheck`, so a caller who can name one at the package root and has to reach + the other by module path is told the two are different kinds of thing. They are not. + + The revocation names are asserted here beside the citation ones on purpose: this + fails if either side moves, rather than pinning the citation half alone. + """ + import agentrust_trace + from agentrust_trace import citation, revocation + + for module, names in ( + (citation, ("CitationCheck", "check_citations")), + (revocation, ("RevocationCheck", "check_bundle")), + ): + for name in names: + assert name in agentrust_trace.__all__, f"{name} is not in __all__" + assert getattr(agentrust_trace, name) is getattr(module, name), name + + # ---- the generator -------------------------------------------------------------------