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

skai-sdk

v0.1.0

Published

Official TypeScript SDK for the Skai Protocol.

Readme

Skai SDK

Official TypeScript SDK for the Skai Protocol.

The Skai SDK is the reference implementation of the Skai Protocol. It provides everything needed to build clients and servers that communicate over Skainet.

This SDK is intentionally lightweight. It focuses on implementing the protocol, not adding unnecessary abstractions.


Table of Contents

  • About
  • Goals
  • Features
  • Installation
  • Project Structure
  • Concepts
  • Architecture
  • Client API
  • Server API
  • Protocol
  • Examples
  • Roadmap
  • Contributing
  • License

About

Skai is an experimental service-oriented protocol.

Instead of interacting with websites, applications communicate with services.

Example:

skai://chat.ski/send

The SDK handles creating protocol messages, sending them, parsing responses, and validating packets.

It does not implement the network itself.

That responsibility belongs to skai-node.


Goals

The SDK is designed with a few simple principles.

  • Lightweight
  • Easy to understand
  • Fully typed
  • Zero external dependencies (whenever possible)
  • Protocol-first
  • Runtime agnostic

The SDK should work in:

  • Browsers
  • Node.js
  • Cloudflare Workers
  • Bun
  • Deno

Features

Current features:

  • Request builder
  • Response builder
  • Protocol validation
  • Request parser
  • Response parser
  • JSON serializer
  • JSON deserializer
  • Client API
  • Server utilities

Planned features:

  • Authentication helpers
  • Streaming
  • Binary serialization
  • Compression
  • Plugins

Installation

npm install skai-sdk

Project Structure

src/
│
├── client.ts
├── server.ts
├── protocol.ts
├── parser.ts
├── serializer.ts
├── types.ts
└── index.ts

client.ts

Contains the client implementation.

Responsible for:

  • Sending requests
  • Receiving responses

server.ts

Contains helper utilities used by Skai Nodes.

Responsible for:

  • Parsing requests
  • Creating responses

protocol.ts

Contains protocol validation.

Examples:

  • Request validation
  • Response validation
  • Version checking

parser.ts

Converts JSON into protocol objects.


serializer.ts

Converts protocol objects into JSON.


types.ts

Contains every protocol interface.


index.ts

Exports the entire public API.


Concepts

Client

Applications communicate using a client.

Example:

const skai = new SkaiClient();

const response = await skai.call(
    "chat.ski",
    "send",
    {
        text: "Hello!"
    }
);

Server

Nodes receive requests using the server utilities.

const request = parseRequest(raw);

Request

Every request follows the protocol specification.

{
    "version":1,
    "host":"chat.ski",
    "action":"send",
    "body":{
        "text":"Hello"
    }
}

Response

Responses always return a status.

{
    "status":"ok",
    "body":{
        "message":"Sent"
    }
}

Architecture

Application

↓

Skai SDK

↓

Transport (HTTPS)

↓

Skai Node

The SDK never communicates directly with services.

It communicates with a Skai Node.


Public API

SkaiClient

Primary client class.

Methods:

call()

call(
    host,
    action,
    body
)

Creates a request.

Sends it.

Returns the parsed response.


parseRequest()

Parses a raw request.

Returns a typed object.


parseResponse()

Parses a raw response.

Returns a typed object.


serializeRequest()

Converts a request into JSON.


serializeResponse()

Converts a response into JSON.


validateRequest()

Validates request structure.


validateResponse()

Validates response structure.


Error Handling

Every parser throws an Error if the message is invalid.

Example:

try {

}
catch(err){

}

Applications are expected to catch parser errors.


Examples

Ping

await skai.call(
    "kernel.ski",
    "ping",
    {}
);

Chat

await skai.call(
    "chat.ski",
    "send",
    {
        text:"Hello!"
    }
);

File Read

await skai.call(
    "files.ski",
    "read",
    {
        path:"hello.txt"
    }
);

Roadmap

Version 0.1

  • Basic protocol
  • JSON transport
  • Client
  • Server

Version 0.2

  • Authentication
  • Better validation

Version 0.3

  • Streaming

Version 1.0

Stable protocol.


Contributing

This project is currently experimental.

Contributions are welcome after Version 0.5.


License

GNU GPLv3