Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
2258a2c
Attached and detached stream operation callers in Core.
moetemp Oct 14, 2026
4842388
Armed a stream from a Nexus read that waits and finds nothing.
moetemp Oct 14, 2026
af5a195
Vendored the System Nexus WIT for the stream notifier RPCs.
moetemp Oct 14, 2026
51a99fb
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 14, 2026
06ab5a7
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 14, 2026
d8c6039
Merged an3-read-arm into core-n3-protos.
moetemp Oct 14, 2026
782a464
Named the token ref's chain by chain_run_id, as the contract does.
moetemp Oct 14, 2026
6a038b0
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 14, 2026
6b39aca
Merged an3-read-arm into core-n3-protos.
moetemp Oct 14, 2026
b5464aa
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 14, 2026
4d7a435
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 14, 2026
11fe777
Merged an3-read-arm into core-n3-protos.
moetemp Oct 14, 2026
4d9da0e
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 14, 2026
36cfa2e
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 14, 2026
c2e0445
Merged an3-read-arm into core-n3-protos.
moetemp Oct 14, 2026
a7fc825
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 14, 2026
ebf35c8
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 14, 2026
d8f449e
Merged an3-read-arm into core-n3-protos.
moetemp Oct 14, 2026
5bc1b0d
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 14, 2026
65eeb53
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 14, 2026
a9513bb
Merged an3-read-arm into core-n3-protos.
moetemp Oct 14, 2026
59d9fc8
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 14, 2026
9520d16
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 14, 2026
46f7d20
Merged an3-read-arm into core-n3-protos.
moetemp Oct 14, 2026
2a78db7
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 14, 2026
6ac364c
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 14, 2026
d74193d
Merged an3-read-arm into core-n3-protos.
moetemp Oct 14, 2026
7e1daff
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 14, 2026
49f1fec
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 15, 2026
422d7ec
Merged an3-read-arm into core-n3-protos.
moetemp Oct 15, 2026
8493ad0
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 15, 2026
e83ccd8
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 15, 2026
b0888b8
Merged an3-read-arm into core-n3-protos.
moetemp Oct 15, 2026
c135210
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 15, 2026
1d9f7cb
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 15, 2026
1460b15
Merged an3-read-arm into core-n3-protos.
moetemp Oct 15, 2026
906ed77
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 15, 2026
2b10ae2
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 15, 2026
e467ef9
Merged an3-read-arm into core-n3-protos.
moetemp Oct 15, 2026
32fe88d
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 15, 2026
64b5cb8
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 15, 2026
018dd0b
Merged an3-read-arm into core-n3-protos.
moetemp Oct 15, 2026
12dec08
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 15, 2026
f0fc726
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 15, 2026
ad52573
Merged an3-read-arm into core-n3-protos.
moetemp Oct 15, 2026
c1c251f
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 15, 2026
8ede0e0
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 15, 2026
0956696
Merged an3-read-arm into core-n3-protos.
moetemp Oct 15, 2026
366b242
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 15, 2026
026d8f6
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 15, 2026
8999e20
Merged an3-read-arm into core-n3-protos.
moetemp Oct 15, 2026
2ac0d2f
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 15, 2026
d4763e5
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 16, 2026
ce01762
Merged an3-read-arm into core-n3-protos.
moetemp Oct 16, 2026
67a2126
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 16, 2026
03fb443
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 16, 2026
2d7f7ff
Merged an3-read-arm into core-n3-protos.
moetemp Oct 16, 2026
8ce2e71
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 16, 2026
c9d532b
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 16, 2026
93ddf4f
Merged an3-read-arm into core-n3-protos.
moetemp Oct 16, 2026
0c2b450
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 16, 2026
5f82b8a
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 16, 2026
0d39942
Merged an3-read-arm into core-n3-protos.
moetemp Oct 16, 2026
1b8ec77
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 16, 2026
6bc366d
Merged cn4-nexus-stream-calls into an3-read-arm.
moetemp Oct 16, 2026
fc42fa0
Merged an3-read-arm into core-n3-protos.
moetemp Oct 16, 2026
add70fc
Merged core-n3-protos into cn5-stream-callers.
moetemp Oct 16, 2026
03ddc70
Merged cn4 into an3.
moetemp Oct 16, 2026
9ab629a
Merged an3 into core.
moetemp Oct 16, 2026
91eda57
Merged core-n3 into cn5.
moetemp Oct 16, 2026
0f1bdd0
Kept a retried stream-returning start on its first try's chain.
moetemp Oct 16, 2026
e55f6cc
Merged cn4 into an3.
moetemp Oct 16, 2026
69972d5
Merged an3 into core.
moetemp Oct 16, 2026
574e83e
Merged core into cn5.
moetemp Oct 16, 2026
f992ce7
Merged cn4 into an3.
moetemp Oct 16, 2026
909db77
Merged an3 into core.
moetemp Oct 16, 2026
a5d2e22
Merged core into cn5.
moetemp Oct 16, 2026
307c13a
Merged cn4 into cn5.
moetemp Oct 16, 2026
5b0fd31
Merged cn4 into cn5.
moetemp Oct 16, 2026
d88c239
Merged cn4 into cn5.
moetemp Oct 16, 2026
61a013a
Merged cn4 into cn5.
moetemp Oct 16, 2026
a3ccfe7
Merged cn4 into cn5.
moetemp Oct 16, 2026
46c4159
Merged cn4 into cn5.
moetemp Oct 16, 2026
269f17d
Merged cn4 into cn5.
moetemp Oct 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions crates/protos/protos/api_upstream/Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

97 changes: 97 additions & 0 deletions crates/protos/protos/api_upstream/nexus/workflow-service.wit

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions crates/protos/protos/local/temporal/sdk/core/streams/nexus.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ option ruby_package = "Temporalio::Internal::Bridge::Api::Streams";
import "google/protobuf/timestamp.proto";
import "temporal/api/common/v1/message.proto";
import "temporal/api/failure/v1/message.proto";
import "temporal/sdk/core/streams/streams.proto";

// The stream service's Nexus operations, served by Core. Lang forwards each call's input in the
// N0a contract's JSON transfer form, runs its payload codec when Core asks for it, and hands the
Expand All @@ -20,6 +21,12 @@ service StreamNexusService {
rpc NexusRead(NexusCall) returns (NexusStep);
// Goes on with a call that asked for codec work.
rpc NexusResume(NexusResumeRequest) returns (NexusStep);
// Attaches the caller of a stream-returning Nexus operation's start to the stream's notifier,
// and answers with the operation token, or the failure the start answers with. The server then delivers the stream's progress and its
// close result to the caller's callback. Idempotent by the start's request id.
rpc AttachCaller(AttachCallerRequest) returns (AttachCallerResponse);
// Detaches the caller a token's start attached, from the chain it attached to.
rpc DetachCaller(DetachCallerRequest) returns (DetachCallerResponse);
}

// One Nexus operation call.
Expand Down Expand Up @@ -91,3 +98,34 @@ message NexusFailure {
// application error type.
temporal.api.failure.v1.Failure failure = 4;
}

message AttachCallerRequest {
// The stream the operation's start names. An empty run id attaches to the chain that holds the
// Workflow id now.
StreamAddress stream = 1;
// The start's request id. A retried start attaches once.
string request_id = 2;
// The start's callback URL and headers. An empty URL is refused, since the caller could never
// hear about the stream.
string callback_url = 3;
map<string, string> callback_headers = 4;
}

message AttachCallerResponse {
// The token the start answers with. It names the stream, the attach and the chain.
string operation_token = 1;
// Set when the attach failed, as the Nexus calls answer a failure, so lang hands it to its
// Nexus handler as it is. The token is then empty.
NexusFailure failure = 2;
}

message DetachCallerRequest {
string namespace = 1;
// The token the start answered with.
string operation_token = 2;
}

message DetachCallerResponse {
// Set when the detach failed, as the Nexus calls answer a failure.
NexusFailure failure = 1;
}
9 changes: 9 additions & 0 deletions crates/sdk-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,15 @@ relevant information.
in the same activations. Progress for an operation that is unknown, not started, already
resolved, or below a counter already delivered is dropped. A task scheduled with progress ends
a workflow task heartbeat chain, as one with stream wakes does.
* Experimental: the stream calls `AttachCaller` and `DetachCaller` serve a stream-returning Nexus
operation. `AttachCaller` resolves the stream's run chain, mints the operation token and
attaches the start's callback to the stream's notifier with the token and start time.
`DetachCaller` decodes the token and detaches from the chain the start attached to. The token
format is in `crates/streams/nexus/operation_token_vectors.json`, which every SDK's encoder and
decoder check. Both answer a failure in the response as a `NexusFailure`, from the same table as
the Nexus calls, so lang's handler raises it as it is. A mistake in the stream, an empty callback
URL or request id, and a token that names no stream are `BAD_REQUEST`. An attach for the latest
run describes the Workflow fresh, so it never lands on a chain that already ended.
* Experimental: a Workflow publishes stream records with `WorkflowOutputStreamCommit` in its
activation completion. The Worker appends them to its `stream_store` before it reports the
completion, so readers see them while the Workflow Task runs, and nothing goes to History. The
Expand Down
Loading
Loading