feat: materialize ambient UCP namespaces - #48
Open
igrigorik wants to merge 2 commits into
Open
Conversation
Implement the reference schema-resolution behavior for Universal-Commerce-Protocol/ucp#657. Add a UCP-aware resolution path that applies the central namespace vocabulary at eligible structured object scopes while excluding dictionaries. Preserve namespace openness and directional applicability, reject direct `ucp.ucp`, and emit ordinary JSON Schema for existing validators and code generators. Keep helper references valid through nested resource IDs and selected definitions, extend strict traversal across child-instance applicators, and cover directionality, composition, dictionary values, forward compatibility, and collision handling.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the reference schema-resolution behavior for Universal-Commerce-Protocol/ucp#657.
Universal-Commerce-Protocol/ucp#657 reserves an ambient
ucpprotocol namespace at eligible structured object scopes without requiring every open domain source schema to declare it. This change adds a UCP-aware resolution path that makes the namespace explicit in the resolved schema, allowing existing JSON Schema validators and code generators to consume ordinary JSON Schema without implementing a separate payload walk.Workflow
The materializer installs one collision-safe helper under the operation schema's root
$defsand uses absolute root-resource references so nested$idscopes and selected$defscontinue to resolve correctly. The existing operation resolver remains responsible for directional annotations.Category
ucp-schemaresolver and validator.Checklist
Checklist
ucp-schematool (resolver, linter, validator).