Project a Product to an additive, URL-free canonical surface.
Unlike augmentProductWithFormatOptions, this always returns fresh
format_options[] declarations with v1_format_ref concealed. Unlike
toCanonicalOnlyProduct, it preserves the Product's top-level
format_ids[]. Exact canonical-to-legacy downgrade identity is returned
separately as JSON-safe CanonicalFormatLegacyRoute sidecars.
Extract routes before any JSON round-trip — WeakMap metadata is gone after
deserialization. This helper enforces that ordering internally; persist its
returned routes whenever a canonical selection may cross a process boundary
before being forwarded to a legacy seller. Rebuild the write-side resolver
with canonicalFormatLegacyResolverFromRoutes(restoredRoutes).
A legacy id at a seller's own agent URL may be projected by a guess from its
name (display_300x250 read as image). Its route carries
inferred_from_id: true; pass authoritativeOnly: true to skip guesses.
Project a Product to an additive, URL-free canonical surface.
Unlike augmentProductWithFormatOptions, this always returns fresh
format_options[]declarations withv1_format_refconcealed. Unlike toCanonicalOnlyProduct, it preserves the Product's top-levelformat_ids[]. Exact canonical-to-legacy downgrade identity is returned separately as JSON-safe CanonicalFormatLegacyRoute sidecars.Extract
routesbefore any JSON round-trip — WeakMap metadata is gone after deserialization. This helper enforces that ordering internally; persist its returnedrouteswhenever a canonical selection may cross a process boundary before being forwarded to a legacy seller. Rebuild the write-side resolver withcanonicalFormatLegacyResolverFromRoutes(restoredRoutes).A legacy id at a seller's own agent URL may be projected by a guess from its name (
display_300x250read asimage). Its route carriesinferred_from_id: true; passauthoritativeOnly: trueto skip guesses.