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

octoflow-adapters

v1.0.1

Published

Platform and chat adapters for delivering OctoFlow agents across existing product surfaces.

Downloads

256

Readme

octoflow-adapters

Platform and chat adapters for delivering OctoFlow agents across existing product surfaces. Use it to connect one bridge or agent transport to CLI, Telegram, Discord, Slack, WhatsApp, Teams, Matrix, LINE, Twitch, and Mattermost.

Install

npm install octoflow-core octoflow-adapters

Node.js >=20 is required. Most platform SDKs are optional peer dependencies; install only the adapters you use.

Use It When

  • You want an agent inside an existing chat surface without rewriting the agent runtime.
  • You need one runtime that can fan out to multiple platforms.
  • You want consistent inbound message normalization, conversation keys, send/edit capability handling, and shutdown.
  • You need a local CLI adapter for development and smoke testing.

30-Second Start

import { createAgent } from 'octoflow-core';
import { createAdapterRuntime, createTelegramAdapter } from 'octoflow-adapters';

const agent = await createAgent({
  priority: ['anthropic-api', 'openai-api'],
  context: { identity: 'You are a helpful assistant.' },
});

const telegram = createTelegramAdapter({
  botToken: process.env.TELEGRAM_TOKEN!,
  allowedChatIds: process.env.TELEGRAM_CHAT_ID?.split(',').map(Number),
});

const runtime = createAdapterRuntime({
  transport: { kind: 'bridge', bridge: agent.bridge },
  adapters: [telegram],
});

await runtime.start();

Close both runtime and bridge during shutdown:

await runtime.close();
await agent.close();

Adapter Catalog

| Adapter | Factory | Dependency | Conversation key shape | | ---------- | --------------------------- | --------------------------------- | ------------------------------------------ | | CLI | createCliAdapter() | none | cli:terminal | | Discord | createDiscordAdapter() | discord.js | discord:<guild\|dm>:<channel>[:<thread>] | | LINE | createLineAdapter() | @line/bot-sdk | line:<type>:<sourceId> | | Matrix | createMatrixAdapter() | matrix-js-sdk | matrix:<roomId> | | Mattermost | createMattermostAdapter() | native fetch + WebSocket | mattermost:<team>:<channel>[:<rootId>] | | Slack | createSlackAdapter() | @slack/bolt | slack:<team>:<channel>[:<threadTs>] | | Teams | createTeamsAdapter() | botbuilder | teams:<channelId>:<convId> | | Telegram | createTelegramAdapter() | grammy | telegram:<chatId>[:<threadId>] | | Twitch | createTwitchAdapter() | @twurple/auth + @twurple/chat | twitch:<channel> | | WhatsApp | createWhatsAppAdapter() | @whiskeysockets/baileys | whatsapp:<jid> |

Local CLI Smoke Test

import { createAgent } from 'octoflow-core';
import { createAdapterRuntime, createCliAdapter } from 'octoflow-adapters';

const agent = await createAgent({ priority: ['ollama'] });
const runtime = createAdapterRuntime({
  transport: { kind: 'bridge', bridge: agent.bridge },
  adapters: [createCliAdapter({ prompt: '> ' })],
});

await runtime.start();

Extension Points

  • BaseAdapter handles lifecycle boilerplate for custom adapters.
  • ChannelAdapter is the direct adapter contract.
  • createPlatformGateway() runs multiple adapters behind one transport.
  • ConversationBindingStore can be replaced with Redis, SQL, or your app store.
  • BridgeTransport can point at a local bridge or remote A2A endpoint.

Learn More

Validate

npm run -w octoflow-adapters lint
npm run -w octoflow-adapters typecheck
npm run -w octoflow-adapters test

Status

Preview. Pin versions and read ../../CHANGELOG.md before depending on it in production.