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

@nodetool-ai/protocol

v0.8.2

Published

Shared message types and protocol definitions for the NodeTool workflow runtime

Readme

@nodetool-ai/protocol

Shared message types and protocol definitions for the NodeTool workflow runtime.

This is the base dependency for nearly every other package — it defines the wire types (graph nodes/edges, processing messages, type metadata, API schemas) that the kernel, runtime, websocket server, and clients all agree on.

Responsibilities

  • Graph transport types (NodeDescriptor, Edge) and correlation/lineage signals.
  • Processing message union (output_update, edge_update, job_update, …), Zod-first: every ProcessingMessage variant in src/messages.ts is a Zod schema, with its TypeScript type derived via z.infer (the two shapes Zod can't infer exactly — the recursive TaskRef/StepRef pair — keep a hand-written interface with a z.ZodType<...>-annotated schema instead). processingMessageSchema is the single z.discriminatedUnion("type", ...) validator for the whole union; processingMessageSchemas indexes the per-type schemas by discriminator; is* guard functions (isJobUpdate, isChunk, …) do a cheap discriminant-only check, and isProcessingMessage does full structural validation.
  • TypeMetadata parser and type-compatibility checks.
  • Zod schemas for the REST/tRPC boundary (api-schemas/).

Usage

import type { NodeDescriptor, Edge } from "@nodetool-ai/protocol";
import { graphNode } from "@nodetool-ai/protocol";

Develop

npm run build --workspace=packages/protocol   # tsc build, then the JSON Schema step below
npm run test  --workspace=packages/protocol   # vitest
npm run lint  --workspace=packages/protocol   # tsc --noEmit

Imports use @nodetool-ai/<package>; never import from dist/. See the root AGENTS.md for the monorepo build order.

Generated processing-messages JSON Schema

npm run build (via generate:processing-messages-schema, wired in after the tsc step) converts processingMessageSchema to JSON Schema with z.toJSONSchema and writes it to dist/processing-messages.schema.json — a build artifact (dist/ is gitignored, like the rest of this package's output), regenerated on every build rather than checked in. Non-TypeScript consumers — the Python worker, external SDKs — validate wire messages against this file instead of hand-copying the TS shapes (RELIABILITY_ARCHITECTURE.md §8.2).

npm run generate:processing-messages-schema --workspace=packages/protocol       # (re)write it
npm run check:processing-messages-schema   --workspace=packages/protocol       # verify, no write (CI)