You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(sdk): generate TypeScript/Node.js client from proto #20
Generate a TypeScript gRPC client from nexus.proto and publish it as
an npm package. Covers both Node.js server-side usage and browser usage
via gRPC-Web.
Deliverables
sdk/typescript/ — generated stubs + typed wrapper
sdk/typescript/src/client.ts — NexusClient class with full TypeScript types
sdk/typescript/package.json — publishable as @nexus-engine/client
README with quickstart for Node.js and browser (gRPC-Web)
NexusClient API (proposed)
import{NexusClient}from"@nexus-engine/client";constclient=newNexusClient({host: "localhost:50051",apiKey: "..."});// One-shotconstresponse=awaitclient.query("Refactor the auth module");console.log(response.content);// Streamingforawait(consteventofclient.stream("Write a TypeScript handler")){if(event.textChunk)process.stdout.write(event.textChunk.text);}// Sessionsconstsession=awaitclient.createSession();awaitsession.submit("First message");
Acceptance criteria
Generated stubs in sdk/typescript/src/_generated/
NexusClient exposes a fully typed async/await + async-iterator API
Works with Node.js 18+ and modern bundlers (Vite, webpack)
make sdk-typescript regenerates stubs
At least one working example in sdk/typescript/examples/
Activity