npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bandeira-tech/b3nd-move

v0.18.2

Published

B3nd Move — encoding, transport, decoding. Portable service handlers and clients for each transport (HTTP, WebSocket, gRPC-HTTP, MCP).

Downloads

74

Readme

B3nd Move

Encoding, transport, decoding. The moving layer for B3nd.

For each supported transport, b3nd-move ships two halves over a Rig: a service (incoming bytes → decode → drive the rig → encode → outgoing bytes) and a client that implements ProtocolInterfaceNode. The client side is the load-bearing detail — a client speaking one wire drops into a rig route exactly like an in-process node, so any rig can be served over any subset of HTTP, WebSocket, gRPC-over-HTTP, and MCP while its individual routes are backed by b3nd-move clients pointing at upstream nodes on whatever wire they happen to speak.

Example: HTTP-backed reads, WS-backed receives, served over gRPC

import { connection, Rig } from "@bandeira-tech/b3nd-core";
import { HttpClient } from "@bandeira-tech/b3nd-move/http/client";
import { WebSocketClient } from "@bandeira-tech/b3nd-move/ws/client";
import { grpcHttpApi } from "@bandeira-tech/b3nd-move/grpc/http/service";

const reads = new HttpClient({ url: "https://content.example.com" });
const writes = new WebSocketClient({ url: "wss://ingest.example.com" });

const rig = new Rig({
  routes: {
    read: [connection(reads, ["*"])],
    receive: [connection(writes, ["*"])],
  },
});

Deno.serve({ port: 50051 }, grpcHttpApi(rig));

A gRPC client hits one endpoint; reads fan out to the HTTP upstream, receives fan out to the WS upstream. Swap grpcHttpApi for httpApi, wsApi, or any custom service handler without touching the rig.

Building custom network APIs

Two layers sit beneath the stock httpApi / wsApi / grpcHttpApi handlers. Pick the higher one when you can; drop a level when you can't.

The content facets front one URI of rig.read / rig.receive with a host-controlled response shape or body decoder — for consumers that can't speak the JSON wire (<img src>, file uploads, CDNs):

import { httpGetContentApi } from "@bandeira-tech/b3nd-move/http-get-content/service";
import { payloadResponseMap as map } from "@bandeira-tech/b3nd-move/http-get-content/payload-response-map";

Deno.serve(
  { port: 3000 },
  httpGetContentApi(rig, {
    payloadResponseMap: map.byExtension({
      png: map.fromField("bytes", { contentType: "image/png" }),
      json: map.json(),
      "*": map.json(),
    }),
  }),
);

For anything else, build a Route directly — on matches the request, decode produces the action's args, action does the work (typically one of the standard rig-bound actions), encode shapes the wire response:

import {
  dispatchHttp,
  httpRequest,
  route,
} from "@bandeira-tech/b3nd-move/http/router";
import { readAction } from "@bandeira-tech/b3nd-move/actions/standard";
import { json } from "@bandeira-tech/b3nd-move/http/wire";
import { NotFound } from "@bandeira-tech/b3nd-move/router/errors";

const getThing = route({
  on: httpRequest("GET", "/things/:id"),
  decode: ({ params }) =>
    [[`mutable://things/${params.id}`]] as readonly [string[]],
  action: readAction,
  encode: ([output]) => {
    if (!output || output[1] == null) throw new NotFound();
    return json(output[1]);
  },
});

Deno.serve({ port: 3000 }, (req) => dispatchHttp(rig, [getThing], req));

Transports

Each transport's wire format, route table, and preSend hook shape are documented in its own README. Every layer lives in one file with no barrel re-exports; runtime binding (Deno.serve, node:http, framework adapters) is the host's job. A deno task serve helper at dev/serve.ts wires a stub rig to any combination of transports for ad-hoc testing.

| Transport | Expected encoding (outbound) | Expected decoding (inbound) | Surface | | --------------------------------------------------------------------------- | ---------------------------------- | ---------------------------------------- | ------------------------------------------------- | | HTTPhttp/{service,client} | JSON | JSON + urlsafe-b64 URI lists + raw bytes | Full PIN (service + client) | | WebSocketws/{service,client} | JSON envelope per frame | JSON envelope per frame | Full PIN (service + client) | | gRPC-over-HTTPgrpc/http/{service,client} | protobuf / JSON (per req) | protobuf / JSON (per req) | Full PIN (service + client) | | MCPmcp/service | JSON-RPC over stdio | JSON-RPC over stdio | Service only; rig surfaced as MCP tools/resources | | HTTP GET contenthttp-get-content/service | host-shaped (payloadResponseMap) | URI in path | Custom — single-URI rig.read facet | | HTTP POST contenthttp-post-content/service | JSON (ReceiveResult) | host-shaped (payloadDecoder) | Custom — single-URI rig.receive facet |

Shared building blocks live under codecs/ (symmetric encode/decode pairs), router/{route,errors} + http/{router,wire} + actions/standard (route construction), and grpc/proto/{types,convert} (generated protobuf + b3nd converters).

Development

deno task check
deno task test
deno task build:npm   # universal slices → ./npm/

One-time per clone, install the pre-push hook so the fast CI subset (type check, lint, fmt --check, unit, in-process integration) runs locally before every push:

deno task hooks:install

Bypass with git push --no-verify when you really need to.

Related

License

MIT