Repository navigation
Add provide: named values on $context, declared down the model tree - #1304
Merged
Merged
Conversation
CommandContext, QueryContext, PolicyContext and RuleContext gain an init-only Values member; ProvideContext is new. Existing constructors are unchanged.
provide adds a named value to $context at application, module, feature and slice level. Executable admission refuses it with PLAY0268 (#1300).
Contributor
Author
|
Reviewer notes for #1300. Verified locally on the final head:
Not done:
Corpus impact: Cratis/AI#1144 tracks the skill corpus. |
Contributor
Author
|
AI corpus tracking: Cratis/AI#1144 |
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.
A
provideline adds a named value to$context, declared once at the application, a module, a feature or a slice and read as$context.<name>beneath it.Added
provide <name> <Type> [optional] from query <Query> [by <expression>, ...],from host,from <literal or $context expression>, or afilereference or inline code block beneath it, at the application, module, feature and slice levels. The nearest declaration wins and an override keeps the type (Context values:provideat application, module, feature and slice #1300)PLAY1119toPLAY1129for malformed, duplicate, reserved-name, mistyped, unknown-query, observable-query and cyclic providesValuesproperty andValuesAs<T>()onCommandContext,QueryContext,RuleContext,PolicyContextand the newProvideContext, so code reads provided values by nameprovidesupport in both compilers, the printer, Monaco (completion, hover, validation), the VS Code grammar and the MCP authoring index, with documentation and a multi-file fixtureChanged
$context.audiencesno longer raisePLAY0153as unknown context pathsprovidein executable form reportsPLAY0268until a later release admits it; it is a preview construct