
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
@ws-kit/plugins
Advanced tools
Core plugins for WS-Kit routers — framework features that add capabilities via composition.
withMessaging() — Fire-and-forget unicast messaging (ctx.send())withRpc() — Request-response with streaming (ctx.reply(), ctx.progress())withPubSub(options) — Topic-based broadcasting (ctx.publish(), ctx.topics)bun add @ws-kit/plugins
import { createRouter, withZod } from "@ws-kit/zod";
import { withPubSub, withRpc } from "@ws-kit/plugins";
import { memoryPubSub } from "@ws-kit/memory";
const router = createRouter()
.plugin(withZod()) // Validation
.plugin(withRpc()) // Request-response
.plugin(
withPubSub({
adapter: memoryPubSub(), // In-memory pub/sub (dev)
}),
);
// Handlers now have:
// - ctx.send() — fire-and-forget
// - ctx.publish() — broadcast to topic
// - ctx.reply(), ctx.progress() — RPC responses
Plugins define framework features; adapters provide backend implementations:
@ws-kit/memory) — For development and testing@ws-kit/redis) — For distributed deployments@ws-kit/cloudflare) — For Cloudflare WorkersSwap adapters without changing your code:
// Development
.plugin(withPubSub({ adapter: memoryPubSub() }))
// Production
.plugin(withPubSub({ adapter: redisPubSub(redis) }))
For convenience, validator packages re-export these plugins:
// âś… Convenient (recommended)
import { withPubSub, withRpc } from "@ws-kit/zod";
// âś… Also works (explicit)
import { withPubSub, withRpc } from "@ws-kit/plugins";
All plugins are fully typed. The type system enforces that:
MIT
FAQs
Core plugins for WS-Kit routers (messaging, RPC, pub/sub)
We found that @ws-kit/plugins demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.