Repository navigation
Conversation
This was referenced Oct 28, 2026
moetemp
force-pushed
the
moe/up/resource-definition
branch
from
October 29, 2026 04:00
cdd698d to
a5d352a
Compare
moetemp
force-pushed
the
moe/up/resource-type-parameters
branch
2 times, most recently
from
October 31, 2026 13:08
9791e30 to
5f8ad4f
Compare
moetemp
force-pushed
the
moe/up/resource-definition
branch
from
October 31, 2026 13:08
a5d352a to
1fd4ea6
Compare
moetemp
force-pushed
the
moe/up/resource-definition
branch
from
November 3, 2026 15:22
1fd4ea6 to
5bd1eef
Compare
moetemp
force-pushed
the
moe/up/resource-type-parameters
branch
from
November 3, 2026 15:22
5f8ad4f to
1180181
Compare
`@nexus.definition` names an SDK type, such as a Stream definition, that gives the type arguments of a generic resource. An operation that returns the resource takes it in place of runtime types, unless a resource method binds the operation.
moetemp
force-pushed
the
moe/up/resource-type-parameters
branch
from
November 4, 2026 09:34
1180181 to
de74981
Compare
moetemp
force-pushed
the
moe/up/resource-definition
branch
from
November 4, 2026 09:34
5bd1eef to
5e46777
Compare
Owner
Author
|
Not needed anymore. temporalio/api#895 has no Stream definitions now, so a call takes the payload type. |
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.
What changed?
This PR adds
@nexus.definition, which names an SDK type that gives the type arguments of a generic resource. An operation that returns the resource takes the definition in place of its runtime types.So Python's
create_stream(Turns, id=...)returns aStream[Turn], and the TypeScript and .NET Workflow creates take the definition first too. A resource method that binds the operation keeps the runtime types. No SDK hasStreamDefinitionyet, so the sample names a type of its own support code. nexgen refuses the directive on a resource with no@nexus.type-parameter.The TypeScript and .NET client targets still take the type argument, and take the definition in a follow-up PR.
Why?
The proposal creates a Stream from a definition, as in
client.create_stream(Turns, id=...). The form of a definition is an SDK idiom in each language, like a Workflow definition. So the SDK defines it, and nexgen only names it.How did you test it?
Link to a test plan if any -
Python and .NET tests create a typed Stream from a definition.