Skip to content

Add standalone Nexus operations client#2027

Draft
VegetarianOrc wants to merge 4 commits intomainfrom
amazzeo/sano
Draft

Add standalone Nexus operations client#2027
VegetarianOrc wants to merge 4 commits intomainfrom
amazzeo/sano

Conversation

@VegetarianOrc
Copy link
Copy Markdown
Contributor

NOTE FOR REVIEWERS: This PR is pending the actual release of the API and Server and will not be merged until those are complete.

What was changed

Add a standalone Nexus operations client to the TypeScript SDK.

  • New NexusClient sub-client on Client, accessible via client.nexus.
  • NexusClient.createServiceClient({ endpoint, service }) returns a typed NexusServiceClient built from a nexus-rpc
    ServiceDefinition
  • NexusClient.getHandle(operationId, { runId? }) to rehydrate a handle for an existing operation.
  • NexusOperationHandle supports result(), describe(), cancel(), and terminate().
  • Listing / counting APIs: NexusClient.list(options) (async iterable) and NexusClient.count(options).
  • New types in packages/client/src/nexus-types.ts
  • Interceptor support via ClientInterceptors.nexus / NexusClientInterceptor with inputs for start, get-result, describe, cancel, terminate, list, and count.
  • New error classes: NexusOperationFailureError, NexusOperationAlreadyStartedError, NexusOperationNotFoundError.
  • Re-exports wired in packages/client/src/index.ts

Checklist

  1. How was this tested:
    • Added packages/test/src/test-nexus-standalone.ts with integration tests exercising startOperation / executeOperation, result, describe, cancel, terminate, list, count, id-reuse and id-conflict policies, search attributes, and interceptor.
    • Added packages/test/src/test-nexus-standalone-types.ts with compile-time assertions that createServiceClient produces correctly typed start/execute signatures and handles generic inference from nexus.OperationDefinition.
  2. Any docs updates needed?
    - Yes SANO will need documentation for all languages.

  Introduce NexusClient sub-client on Client for starting and managing standalone Nexus operations and interceptor support via ClientInterceptors.nexus.
… and decodeMetadata to avoid duplicate work.
@VegetarianOrc VegetarianOrc changed the title feat(client): add standalone Nexus operations client Add standalone Nexus operations client Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant