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

skykoi

v2026.3.253

Published

SkyKoi — Koi runtime. Multi-channel gateway CLI with RPC Koi.

Readme

SkyKoi Runtime

The Koi runtime that powers SkyKoi. This is the npm package (skykoi) that runs on each user's dedicated EC2 instance, handling the Koi gateway, LLM inference, tool execution, and channel integrations.

npm: skykoi (latest: v2026.3.83) Platform: www.skykoi.com

What This Is

SkyKoi Runtime is a personal Koi runtime forked from SKYKOI (MIT License). It runs as a gateway process on an EC2 instance and provides:

  • Real-time chat via WebSocket
  • LLM inference through AWS Bedrock (Claude Opus 4.6) or any supported provider
  • Tool execution (bash, browser, file operations, cron, etc.)
  • Channel integrations (Discord, Telegram, WhatsApp, Slack, Signal, iMessage, and more)
  • Koi workspace with persistent memory
  • Self-update capability for fleet-wide rolling updates

Architecture

User (browser/app)
    |
    v  WebSocket (wss://<id>.gw.skykoi.com)
+---------------------------+
|     SkyKoi Gateway        |
|     (Node.js process)     |
|                           |
|  - WebSocket server       |
|  - Session management     |
|  - Koi runtime (Pi)       |
|  - Tool execution         |
|  - Channel routing        |
|  - Heartbeat system       |
|  - Cron scheduler         |
+---------------------------+
    |
    v  Bedrock API / Provider APIs
  LLM Inference

Key Modules

src/
  kois/           - Koi runtime, tool definitions (exec, process, browser)
  auto-reply/       - Message handling, Koi turn execution, command registry
  channels/         - Channel plugin system (Discord, Telegram, WhatsApp, etc.)
  config/           - Configuration loading, validation, schema
  cron/             - Scheduled jobs, isolated Koi turns
  gateway/          - WebSocket server, RPC handlers, session management
  infra/            - Retry logic, backoff, error handling, updates
  memory/           - Embedding-based memory with SQLite + vector search
  node-host/        - Node device management (camera, screen, location)
  providers/        - LLM provider adapters (Bedrock, Anthropic, OpenAI, Google, etc.)
  browser/          - Chrome/Chromium automation via CDP
  tui/              - Terminal UI for local development

Install

Typically installed automatically by the platform's cloud-init during EC2 provisioning:

npm install -g skykoi@latest

Running

The gateway runs as a long-lived process:

skykoi gateway --port 18789 --verbose

Or with the daemon (auto-restart on crash):

skykoi onboard --install-daemon

Configuration

Configuration lives at ~/.skykoi/skykoi.json:

{
  "koi": {
    "model": "amazon-bedrock/us.anthropic.claude-opus-4-6-v1"
  },
  "gateway": {
    "port": 18789
  }
}

On cloud instances, configuration is pushed via SSM after the instance is claimed from the warm pool. The runtime reads it on startup and connects to the platform.

Development

git clone https://github.com/ricardoamartinez/skykoi-runtime.git
cd skykoi-runtime

pnpm install
pnpm build

# Dev loop (auto-reload)
pnpm gateway:watch

Testing

pnpm test          # Full suite: 6790/7001 passing
pnpm test:config   # Config tests: 304/305 passing

Known test gaps: Worker crash cascades on Windows, browser E2E flakes.

Build

pnpm build         # Produces dist/ (26MB optimized)

The build uses SWC for compilation. tsconfig targets es2020. TypeScript has 0 errors.

How It Connects to the Platform

  1. The platform provisions an EC2 instance and pushes config via SSM
  2. The runtime starts and reads the config (gateway token, model settings, etc.)
  3. The gateway opens a WebSocket server on the configured port
  4. A wildcard TLS cert from S3 enables wss://<instanceId>.gw.skykoi.com
  5. The platform's frontend connects and sends/receives messages via WebSocket RPC
  6. The Koi processes messages through the LLM provider and streams responses back
  7. The runtime heartbeats to the platform every 30 seconds to report health

Self-Update

The runtime can update itself in place:

skykoi gateway update

This pulls the latest npm version and restarts the gateway without losing the Koi workspace or memory. Used for fleet-wide rolling updates.

Koi Workspace

Each Koi has a workspace at ~/.skykoi/workspace/ containing:

  • KOI.md - Koi behavior instructions
  • SOUL.md - Personality and tone
  • USER.md - User profile (built over time)
  • MEMORY.md - Long-term memory
  • memory/ - Daily logs and state
  • BACKLOG.md - Task tracking

The Koi can modify all of these files. Updates must preserve this workspace.

Security

  • Tools run on the host for the main session (full access)
  • Non-main sessions (groups/channels) can be sandboxed via Docker
  • DM pairing by default: unknown senders must authenticate
  • Exec approval system for sensitive commands

Origins

Forked from SKYKOI (MIT License). See THIRD_PARTY_LICENSES.txt.

License

MIT