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

@womp/kakapo-sdk

v0.1.0

Published

Typed Node.js and browser SDK for controlling Kakapo over WebSocket

Downloads

41

Readme

@womp/kakapo-sdk

Typed Node.js and browser SDK for manipulating a Kakapo scene through its JSON-RPC WebSocket.

yarn install
yarn build
import { KakapoAPI } from "@womp/kakapo-sdk";

const kakapo = new KakapoAPI();
await kakapo.connect();

const union = await kakapo.editScene((scene) => {
  const root = scene.createNode({
    kind: "union",
    parentId: 0,
    name: "Agent Model",
  });

  const box = scene.createNode({
    kind: "primitive",
    parentId: root.id,
    name: "Body",
    properties: {
      primitive: "box",
      transform: { scale: { x: 10, y: 4, z: 6 } },
    },
  });

  const red = scene.createMaterial({
    color: { x: 1, y: 0.05, z: 0.05 },
    roughness: 0.4,
  });

  const body = scene.node(box.id, "primitive");
  body.materialId = red.id;
  body.position = { x: 0, y: 4, z: 0 };
  body.round = 0.2;
  body.save();
  return root;
});

console.log(await kakapo.getNodeBoundingBox(union.id));

kakapo.disconnect();

The transport uses the browser's native WebSocket when bundled for the web and loads ws dynamically in Node.js.

All public inputs are checked at runtime as well as by TypeScript. Invalid calls throw structured KakapoValidationError objects with a stable code, offending path, expected rule, and a correction hint intended for automated agents.

editScene() refreshes once, exposes synchronous JSON reads and mutations, then validates and sends one RFC 6902 patch after the callback succeeds. Callback or commit failures discard the draft and refresh the authoritative scene. node(id, kind) returns a typed editable handle; save() applies its staged properties synchronously to the transaction draft.

Engine-backed reads such as bounding boxes and screenshots remain asynchronous. Run them before the first draft mutation or after editScene() commits.

Each editScene() refreshes before creating its private draft. Top-level edits are serialized per client. Calling a scene-mutating method through raw rpc() deliberately marks the cache stale.

Mesh, field, and decal names are syntax-checked, but their existence cannot be enumerated by the current engine RPC surface. Font family/weight/style combinations are checked against listFonts().

Verification

yarn test       # fake WebSocket protocol and API behavior
yarn test:live  # launches ../kakapo/kakapo_app.exe and runs named live tests per API method
yarn test:all   # runs both suites

The live suite starts Kakapo once, runs methods sequentially, and reports failures as names such as live:setNodeParent or live:createNode:mesh. Mutations refresh the authoritative engine scene before asserting their result. See TEST_MATRIX.md for the exact unit/live mapping.