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

@cool-ai/beach-channel-email

v0.3.1

Published

Email edge for Beach applications — IMAP inbound and SMTP outbound, gated by Delivery Manifests.

Readme

@cool-ai/beach-channel-email

The email channel adaptor: IMAP polling inbound, SMTP outbound. It implements core's ChannelAdaptor, so the channel-router routes its inbound messages and delivers its replies like any other channel. The IMAP and SMTP wire layers live here too — this package folds in what used to be @cool-ai/beach-transport-email.

Home: cool-ai.org · Documentation: cool-ai.org/docs

Install

pnpm add @cool-ai/beach-channel-email imapflow mailparser nodemailer

imapflow, mailparser, and nodemailer are peer dependencies, so you control their versions and can share them with the rest of your application.

Use

import { EmailChannelAdaptor } from '@cool-ai/beach-channel-email';
import { renderToStaticHTML, renderToStaticText } from '@cool-ai/beach-a2ui-renderer-static';

const email = new EmailChannelAdaptor({
  imap: { host: 'imap.example.com', port: 993, secure: true, auth: { type: 'password', user, pass } },
  smtp: { host: 'smtp.example.com', port: 587, secure: false, auth: { type: 'password', user, pass }, from: user },
  uidState,                                  // you persist the last-seen UID
  inbound: (req) => channelRouter.inbound(req),
  render: (parts) => ({ html: renderToStaticHTML(parts), text: renderToStaticText(parts) }),
});

await email.start();                         // begin polling (or mode: 'idle' for IMAP IDLE)
// Register `email` as a channel-router adaptor so replies are sent by SMTP.
  • Inbound. Each parsed email becomes an InboundRequest: the body is handed through channel-blind, the thread is taken off the References chain, and a reply destination carries the recipient and threading headers. No Missive is built — that interpretation is the consumer's.
  • Outbound. The consumer-wired render turns the reply's parts into the email body; the adaptor reads the threading metadata off the destination, assembles the message, and sends it by SMTP. Wire in a @cool-ai/beach-channel-composer if you want a model to write the prose.

OAuth2 (XOAUTH2) is supported on both IMAP and SMTP via a tokenProvider; Beach calls it per connection and never caches tokens.