Skip to content

Commit d5706cd

Browse files
authored
feat(canonical-formats): add canonical reference resolver (#891)
1 parent bdf79ef commit d5706cd

3 files changed

Lines changed: 1197 additions & 0 deletions

File tree

src/adcp/canonical_formats/__init__.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
legacy upgrade.
3434
* :func:`format_is_supported` — stricter product/capability gating comparison
3535
after legacy upgrade.
36+
* :class:`CanonicalReferenceResolver` — hardened fetch/cache helper for
37+
immutable ``format_schema`` and ``platform_extensions`` references.
3638
* :func:`load_default_registry` — loads the AAO-published v1↔v2 mapping
3739
registry from the bundled schema cache.
3840
* :class:`SdkAdvisory` — typed wrapper around the SDK-source ``Error``
@@ -83,6 +85,15 @@
8385
upgrade_v1_tracker,
8486
upgrade_v1_trackers,
8587
)
88+
from adcp.canonical_formats.references import (
89+
DEFAULT_REFERENCE_BODY_LIMIT_BYTES,
90+
DEFAULT_REFERENCE_TIMEOUT_SECONDS,
91+
CanonicalReference,
92+
CanonicalReferenceResolver,
93+
CanonicalReferenceResult,
94+
CanonicalReferenceStatus,
95+
parse_canonical_reference,
96+
)
8697
from adcp.canonical_formats.registry import (
8798
RegistryLoadError,
8899
glob_match,
@@ -115,11 +126,17 @@
115126
"SDK_ID",
116127
"SdkAdvisory",
117128
"V1CatalogProjection",
129+
"CanonicalReference",
130+
"CanonicalReferenceResolver",
131+
"CanonicalReferenceResult",
132+
"CanonicalReferenceStatus",
118133
"V1ToV2Projection",
119134
"V1UrlTracker",
120135
"V1_TRANSLATABLE",
121136
"V2ToV1Projection",
122137
"check_narrows",
138+
"DEFAULT_REFERENCE_BODY_LIMIT_BYTES",
139+
"DEFAULT_REFERENCE_TIMEOUT_SECONDS",
123140
"downgrade_pixel_tracker",
124141
"downgrade_pixel_trackers",
125142
"format_is_supported",
@@ -131,6 +148,7 @@
131148
"load_default_registry",
132149
"make_sdk_advisory",
133150
"narrowing_advisory",
151+
"parse_canonical_reference",
134152
"project_declaration_to_v1",
135153
"project_product_to_v1",
136154
"project_v1_catalog_to_v2",

0 commit comments

Comments
 (0)