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

@odla-ai/chat

v0.2.0

Published

Channels, threads, DMs, and AI participants for odla apps — a Slack/Groups-style messaging layer built natively on odla-db's realtime engine. Schema + default-deny CEL rules + an injectable client, so humans and agents chat over the same rule-governed gra

Readme

@odla-ai/chat

Channels, threads, DMs, and AI participants for odla apps — a Slack/Groups-style messaging layer built natively on odla-db's realtime engine. Chat is a schema + default-deny CEL rules + an injectable client; humans and agents chat over the same rule-governed graph. No server to run — it rides the existing odla-db Durable Object.

import { createChatClient } from "@odla-ai/chat";
import { init } from "@odla-ai/db/client";

const db = init({ appId, endpoint: "wss://db.odla.ai", getToken });
const chat = createChatClient(db, { selfId: myAuthId, selfEmail, displayName });

const { id } = await chat.createChannel({ slug: "general", name: "General", kind: "public" });
const channel = await chat.getChannel(id);
if (!channel) throw new Error("channel creation did not become visible");
const unsub = chat.subscribeChannel(id, (messages) => render(messages));
await chat.sendMessage(channel, { body: "hello" });

Model

Access is denormalized (no graph edges, to fit odla-db's single-hop ref and pre-commit rule evaluation): a channel's memberIds (json) is the auth roster for private/dm channels; messages and reactions carry a denormalized visibility + audience. chat_membership rows are the per-user index and read-state, not the source of truth for access. Message ordering + pagination use the indexed createdAt cursor.

Pieces

  • CHAT_SCHEMA — push to /app/:id/schema.
  • CHAT_RULES / chatRules({ orgDomain }) — install at /app/:id/admin/rules.
  • createChatClient(db, self) — the UI-facing client (channels, DMs, messages, feeds, threads, reactions, read-state, typing/presence).
  • chatSkill({ db, channelId, self }) — a @odla-ai/ai Skill so an agent reads and posts as a bot member.
  • botTrigger({ id, agentId, persona, mention }) — the commit-trigger config to register at /app/:id/admin/triggers; the odla-db commit hook fires it on human messages and dispatches to the chat-agent worker.
  • chatIntegration — a descriptor bundling the schema, rules, and provisioning steps.

Chat-agent credentials

The optional @odla/chat-agent Worker fails closed unless CHAT_DISPATCH_SECRET is configured. It does not accept a platform-wide DB admin token. Store ODLA_BOT_TOKENS as a Worker secret containing a JSON map from exact tenant id to a scoped app key, for example:

{ "my-app--dev": "odla_sk_...", "my-app": "odla_sk_..." }

Mint each key with mode: "rules", the five chat_* namespaces, and only the provider secret it needs, such as secrets: ["anthropic_api_key"]. The worker has no wildcard tenant or machine-token fallback.

See this installed README and the exported TypeScript declarations/JSDoc for the version-matched API. The rendered public reference is at https://odla.ai/docs/packages/chat.

License

MIT