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

@gjermundgaraba/clankerbox-sdk

v0.4.1

Published

Generated Protobuf messages and Connect RPC service descriptors for clankerbox

Readme

@gjermundgaraba/clankerbox-sdk

Generated Protobuf messages, TypeScript types and Connect RPC service descriptors for clankerbox. This ESM package includes compiled JavaScript and declarations; consumers do not need protoc, a Go toolchain, or a clankerbox source checkout.

npm install @gjermundgaraba/clankerbox-sdk @connectrpc/connect @connectrpc/connect-node
import { MachineService, SessionService } from "@gjermundgaraba/clankerbox-sdk";
import { createClient } from "@connectrpc/connect";
import { createConnectTransport } from "@connectrpc/connect-node";

The package supplies descriptors, not a transport or lifecycle coordinator. Node consumers supply Connect 2.x and use createConnectTransport({httpVersion: "2", ...}); browser fetch cannot carry the bidirectional attachment stream. @bufbuild/protobuf is included as a runtime dependency. All descriptors are exported at the root and through /resources, /machine, /session and /host subpaths.

SDK 0.4.1 targets clankerbox 0.9.0 and its attachment-owned session contract: sessions are created by Open.create inside AttachSession, and each Input is sent at the input_offset the guest last acknowledged. Use this pair together; SDK and controller version numbers are independent. The wire contract is unchanged from SDK 0.4.0 and clankerbox 0.8.0. Older installations and guest images are not migrated.

RPC contract

The wire package is clankerbox.v1. The Protobuf sources under clankerbox/v1/ generate Go messages in gen/clankerbox/v1, Go Connect handlers and clients in gen/clankerbox/v1/clankerboxv1connect, and TypeScript in src/gen/clankerbox/v1. Generated code is checked in.

The services:

  • MachineService: discovery, resource reads, lifecycle mutations, operation inspection and label replacement. Lifecycle mutations carry idempotency keys and return durable Operations; clients poll GetOperation and never resubmit a mutation because a wait timed out. SetLabels is the exception: it takes no key and returns the updated Machine synchronously.
  • SessionService: terminal sessions, mounted on controller, host and guest with endpoint-specific authorization.
  • HostService: private operation submission and status plus host and machine inspection. Each action is a oneof payload.

Public Profile, Host, Machine and Checkpoint messages omit image paths, private endpoints, engine store paths and credentials. internal/rpcmodel converts between these messages and the services' persisted records.

Errors combine a Connect status code with a typed ErrorDetail reason. retryable describes the operation, not terminal input: input is addressed by offset, so repeating it on the same attachment is safe and carrying it to another is not. The streaming semantics of AttachSession are specified in terminal sessions.

Generation and packaging

cd protocol
pnpm install --frozen-lockfile
pnpm generate
pnpm build
pnpm check
pnpm test
pnpm test:package
pnpm pack

generate requires protoc 36.1 and installs pinned protoc-gen-go, protoc-gen-connect-go and protoc-gen-es into .tools/. Go dependency versions are in the root go.mod; JavaScript versions are in package.json and the lockfile. Regeneration must leave the checked-in output unchanged.

pnpm pack clean-builds JavaScript and declarations and copies the repository's MIT license into the package. pnpm test:package packs and installs the artifact in a temporary consumer with lifecycle scripts disabled, then checks runtime imports, TypeScript declarations, package contents and license inclusion.

Publishing uses dedicated sdk-v<VERSION> tags, not controller release tags. See SDK publishing for first-publish setup and the tokenless GitHub Actions release workflow.

Tests

go test -race ./internal/rpcmodel ./gen/...
cd protocol && pnpm test

The Go tests cover conversion round trips, private-field redaction, every operation action and state, and typed errors over a real connection. The SDK tests cover bigint and JSON precision, oneofs and service shapes. test/real-vm.mjs and test/public-session.mjs drive a running machine and are not part of the default test glob; see tests.