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

@smooai/smooth-extension-sdk

v0.6.0

Published

TypeScript SDK for building Smooth Extension Protocol (SEP) extensions: `defineExtension`, `defineTool`, a stdio JSON-RPC transport, an in-process test host, and a conformance runner. Extensions are subprocesses speaking JSON-RPC 2.0 ndjson to any SEP hos

Downloads

1,011

Readme

@smooai/smooth-extension-sdk

Build SEP (Smooth Extension Protocol) extensions in TypeScript.

An extension is a long-lived subprocess that speaks JSON-RPC 2.0 over ndjson on its stdin/stdout to a SEP host (smooth-operator-core and its polyglot servers). This SDK is the DX centerpiece: describe your extension declaratively, serve() it, test it in-process, and gate it against the shared conformance fixtures.

Quick start

import { z } from 'zod';
import { defineExtension, defineTool } from '@smooai/smooth-extension-sdk';

export const hello = defineExtension((smooth) => {
    smooth.name = 'hello';
    smooth.version = '0.1.0';

    smooth.registerTool(
        defineTool({
            name: 'greet',
            description: 'Greet someone by name.',
            parameters: z.object({ name: z.string() }),
            async execute(args, ctx) {
                ctx.onUpdate({ message: `greeting ${args.name}`, progress: 0.5 });
                return { content: `Hello, ${args.name}!` };
            },
        }),
    );
});

hello.serve(); // wire to stdin/stdout and run

The host exposes the tool to the LLM as hello.greet.

Schemas

parameters accepts three shapes — the wire truth is always JSON Schema:

  • a zod v4 schema → converted with z.toJSONSchema()
  • a TypeBox schema → TypeBox schemas already ARE JSON Schema, passed through
  • a raw JSON Schema object → passed through unchanged

Tool context

execute(args, ctx) receives a ctx with:

  • ctx.onUpdate({ message?, progress?, details? }) — stream tool/update progress
  • ctx.signal — an AbortSignal that fires when the host sends $/cancel
  • ctx.callId / ctx.context — the call id and dispatch context (epoch token + tier)

Return a { content, is_error?, details? } result, or just a string shorthand for { content }.

Testing

import { createTestHost } from '@smooai/smooth-extension-sdk';
import { hello } from './hello.js';

const host = createTestHost(hello); // in-process, no subprocess
await host.initialize();
const res = await host.callTool('greet', { name: 'Ada' });
// res === { content: 'Hello, Ada!' }
host.close();

runConformance replays the shared SEP fixtures against a real extension subprocess, validating every reply against its schema:

import { runConformance } from '@smooai/smooth-extension-sdk';

const report = await runConformance({ command: 'node', args: ['./hello.js'] });
// report.passed === true

API

  • defineExtension((smooth) => void) — set smooth.name/version, registerTool, on(event), log.
  • defineTool({ name, description, parameters, deferred?, execute })
  • createTestHost(extension){ initialize, callTool, ping, sendEvent, shutdown, close }
  • runConformance({ command, args?, env?, cwd?, specDir? })ConformanceReport
  • Peer, stdioTransport, linkedPair, toJsonSchema — the building blocks
  • PROTOCOL_VERSION, method, errorCode and the wire types

Scope (Phase 1)

The tool path: registration, execute, streamed progress, cancellation, plus observe on(event) subscriptions and lifecycle (initialize/ping/shutdown). Hooks, commands, ui/kv/session/exec land in later phases — the wire and API were shaped to grow into them without breaking the tool path.