From 3aef442b555b01dcf8614a8b76e7f92bd8f3af3d Mon Sep 17 00:00:00 2001 From: Alex Mazzeo Date: Tue, 15 Sep 2026 15:45:41 -0700 Subject: [PATCH 1/3] Add notificaiton service wit --- nexus/notification-service.wit | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 nexus/notification-service.wit diff --git a/nexus/notification-service.wit b/nexus/notification-service.wit new file mode 100644 index 000000000..ea8fa2a74 --- /dev/null +++ b/nexus/notification-service.wit @@ -0,0 +1,34 @@ +package temporal:nexus@1.0.0; + +world system { + export on-complete-request; +} + +interface on-complete-request { + use nexus:temporal-types/model@1.0.0.{ + failure, + placeholder, + }; + + /// @nexus.type-parameter + type source-context-t = placeholder; + + /// @nexus.type-parameter + type output-t = placeholder; + + /// @nexus.proto "temporal.api.notificationservice.v1.OnCompleteRequest.result" + variant on-complete-request-result { + success(output-t), + failure(failure), + } + + /// @nexus.proto "temporal.api.notificationservice.v1.OnCompleteRequest" + record on-complete-request { + %result: on-complete-request-result, + source-context: source-context-t, + } + + /// @nexus.proto "temporal.api.notificationservice.v1.OnCompleteResponse" + record on-complete-response { + } +} From e872859d74f7ccbc6f8d6950858a7ad78a660809 Mon Sep 17 00:00:00 2001 From: Alex Mazzeo Date: Mon, 12 Oct 2026 09:28:49 -0700 Subject: [PATCH 2/3] Rename interface in notification-service.wit --- nexus/notification-service.wit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nexus/notification-service.wit b/nexus/notification-service.wit index ea8fa2a74..19a89381c 100644 --- a/nexus/notification-service.wit +++ b/nexus/notification-service.wit @@ -1,10 +1,10 @@ package temporal:nexus@1.0.0; world system { - export on-complete-request; + export notification-service; } -interface on-complete-request { +interface notification-service { use nexus:temporal-types/model@1.0.0.{ failure, placeholder, @@ -31,4 +31,4 @@ interface on-complete-request { /// @nexus.proto "temporal.api.notificationservice.v1.OnCompleteResponse" record on-complete-response { } -} +} \ No newline at end of file From c9bab080885c3b4aa929edd2e312b1cd7d82c7b2 Mon Sep 17 00:00:00 2001 From: Alex Mazzeo Date: Mon, 12 Oct 2026 16:22:30 -0700 Subject: [PATCH 3/3] Validate notification WIT with system Nexus generation --- Makefile | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index f6fcf899d..a0b49fe91 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ PROTO_PATHS = paths=source_relative:$(PROTO_OUT) OAPI_OUT := openapi OAPI3_PATH := .components.schemas.Payload -NEX_GEN ?= nex-gen +NEX_GEN ?= nexgen $(PROTO_OUT): mkdir $(PROTO_OUT) @@ -144,20 +144,29 @@ nexus-rpc-yaml-install: ##### Compile system Nexus WIT files ##### system-nexus-wit: system-nexus-wit-install nex-gen-install printf $(COLOR) "Generate system Nexus WIT..." - protoc -I $(PROTO_ROOT) \ + tmp=$$(mktemp -d); trap 'rm -rf "$$tmp"' EXIT; \ + protoc -I $(PROTO_ROOT) --include_imports \ + --descriptor_set_out="$$tmp/system.bin" \ --system-nexus-wit_opt=output=nexus/workflow-service.wit \ --system-nexus-wit_opt=nex_gen=$(NEX_GEN) \ --system-nexus-wit_opt=linked_input=nexus/deps \ --system-nexus-wit_out=. \ - temporal/api/workflowservice/v1/service.proto + temporal/api/workflowservice/v1/service.proto \ + temporal/api/notificationservice/v1/request_response.proto && \ + $(NEX_GEN) add-message \ + --descriptors "$$tmp/system.bin" \ + --file temporal/api/notificationservice/v1/request_response.proto \ + --input nexus/notification-service.wit \ + --input nexus/deps \ + --output nexus/notification-service.wit system-nexus-wit-install: printf $(COLOR) "Build and install protoc-gen-system-nexus-wit..." @cd cmd/protoc-gen-system-nexus-wit && go install . nex-gen-install: - printf $(COLOR) "Install nex-gen if missing..." - command -v $(NEX_GEN) >/dev/null || cargo install nex-gen --version ^0.1 + printf $(COLOR) "Install nexgen if missing..." + command -v $(NEX_GEN) >/dev/null || cargo install nexgen --version ^0.2 --features advanced ##### Clean ##### clean: