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

kodoma-ts

v0.1.0

Published

TypeScript SDK for building agent-native messaging interfaces

Readme

kodoma-sdk-ts

Build agent-native messaging interfaces with one TypeScript SDK.

kodoma-sdk-ts gives you a single runtime for:

  • unified inbound message streams
  • platform-scoped spaces and send APIs
  • reactions, threaded replies, and typing indicators (when supported)
  • composable content builders (text, attachment, custom)

Install

npm i kodoma-sdk-ts

Quick Start

import { Kodama, definePlatform, text } from "kodoma-sdk-ts";

const terminal = definePlatform("terminal", {
  configDefault: {},
  lifecycle: {
    createClient: async () => ({
      async send(value: string) {
        console.log("[out]", value);
      }
    }),
    destroyClient: async () => {}
  },
  events: {
    messages: async function* () {
      // plug your provider stream here
      yield {
        id: "msg_1",
        sender: { id: "user_1" },
        space: { id: "space_1" },
        content: { type: "text", text: "hello" },
        timestamp: new Date()
      };
    }
  },
  actions: {
    send: async ({ client, content }) => {
      if (content.type === "text") {
        await client.send(content.text);
      }
    }
  }
});

const app = await Kodama({ providers: [terminal.config()] });

for await (const [space, message] of app.messages) {
  await space.responding(async () => {
    await space.send(text(`received ${message.content.type}`));
  });
}

Core Concepts

Kodama(...)

Creates the multi-provider runtime.

const app = await Kodama({
  projectId: process.env.KODAMA_PROJECT_ID,
  projectSecret: process.env.KODAMA_PROJECT_SECRET,
  providers: [providerA.config(), providerB.config()]
});

app.messages

Unified async stream of [space, message] tuples across all configured providers.

for await (const [space, message] of app.messages) {
  // route by message.platform / message.content.type
}

space

A platform-scoped context.

await space.send("plain text");
await space.startTyping();
await space.stopTyping();
await space.responding(async () => {
  await space.send("done");
});

message

Inbound message helper methods.

await message.react("like");
await message.reply("got it");

Content Builders

Text

import { text } from "kodoma-sdk-ts";
await space.send(text("hello"));

Attachment

import { attachment } from "kodoma-sdk-ts";
await space.send(
  attachment(fileBytes, { name: "report.pdf", mimeType: "application/pdf" })
);

Custom

import { custom } from "kodoma-sdk-ts";
await space.send(custom({ type: "card", title: "Order Updated" }));

Creating a Platform Adapter

Use definePlatform(name, def) to register your own provider:

  • lifecycle.createClient: initialize SDK/API client
  • events.messages: async iterable of provider messages
  • actions.send: send content into a platform space
  • optional actions.replyToMessage, actions.reactToMessage, actions.startTyping, actions.stopTyping

Scripts (package local)

From packages/kodoma-sdk-ts:

bun run typecheck
bun run build
bun run example

Publishing to npm

  1. Login:
npm login
  1. Build and dry-check tarball:
bun run build
npm pack
  1. Publish:
npm publish --access public

If the package name is already taken, update name in package.json (for example to a scoped package like @your-scope/kodoma-sdk-ts) and publish again.

License

PolyForm Noncommercial 1.0.0. See LICENSE.