Skip to content

feat: add Node.js/Bun cluster transport#49

Merged
jbiskur merged 1 commit intomainfrom
feat/node-cluster-transport
Mar 23, 2026
Merged

feat: add Node.js/Bun cluster transport#49
jbiskur merged 1 commit intomainfrom
feat/node-cluster-transport

Conversation

@jbiskur
Copy link
Contributor

@jbiskur jbiskur commented Mar 23, 2026

Summary

  • Auto-detect runtime in createDefaultTransport() — uses Deno APIs when available, falls back to ws-based transport for Node.js/Bun
  • New createNodeTransport() in src/pathways/cluster/node-transport.ts using ws WebSocketServer
  • Dynamic import("ws") inside startServer() to avoid loading in Deno runtime
  • Added ws to deno.json imports and npm build dependencies

Test plan

  • deno test -A passes (Deno path unchanged)
  • deno run -A bin/build-npm.ts succeeds
  • Dynamic import correctly preserved in npm output
  • CI green

🤖 Generated with Claude Code

The default cluster transport now auto-detects the runtime instead of
throwing on non-Deno environments. Uses ws WebSocketServer for Node/Bun.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jbiskur jbiskur merged commit 31ebc99 into main Mar 23, 2026
1 check passed
@jbiskur jbiskur deleted the feat/node-cluster-transport branch March 23, 2026 13:31
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