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

@sullux/event-engine-email-plugin

v1.0.0

Published

Email synchronization bridge and event engine plugin for IMAP/SMTP.

Downloads

65

Readme

@sullux/coms-email-daemon

A persistent, local-first background supervisor daemon that bridges the @sullux/coms-lake Event Lake and the @sullux/coms-email engine. It handles bidirectional mail synchronization via IMAP IDLE push listeners and secure outbound SMTP routing.


Architecture Overview

The daemon serves as the core connection broker between standard email accounts and your central, event-sourced database.

       [ Internet Mail Servers ]
          ▲                │
    (SMTP)│                ▼ (IMAP IDLE)
     ┌────┴────────────────┴────┐
     │      @sullux/coms-email-daemon │
     └────┬────────────────▲────┘
          │                │
  (Append)▼                ▼ (Subscribe)
       [ Local SQLite Event Lake ]

Core Design Principles:

  • True Single Responsibility: Contains only the orchestration layers bridging the lake to email protocols. Delegates protocol definitions entirely to @sullux/coms-email.
  • Out-of-Band Threading Discovery: Traverses the local SQLite ledger synchronously to dynamically build and inject RFC-compliant threading headers (In-Reply-To and References) on outbound mail replies.
  • Resilient Media Pipeline: Synchronously looks up database metadata (coms.file.created) to package inline elements or attachments securely before outbound SMTP transmission.
  • Process-per-Account Isolation: Meant to be executed under standard process supervisors (such as systemd) with separate configurations per email address, confining connection issues and crash loops to a single account.

Configuration Schema

Driven by a standard JSON config file:

{
  "channelId": "chan-email-sullux",
  "emailAddress": "[email protected]",
  "imap": {
    "host": "imap.fastmail.com",
    "port": 993,
    "username": "[email protected]",
    "password": "my-secret-imap-app-password"
  },
  "smtp": {
    "host": "smtp.fastmail.com",
    "port": 465,
    "username": "[email protected]",
    "password": "my-secret-smtp-app-password"
  }
}

Usage

Start the persistent listener process:

coms-email-daemon --config /path/to/account.json

Behavior Lifecycle:

  1. Backlog Sync on Boot: Connects to the IMAP server, queries the lake over IPC for the last synchronized IMAP UID, syncs everything since that UID, registers matching coms.interaction.emitted events, and commits the cursor.
  2. Listen (IMAP IDLE): Establishes a persistent IDLE loop. When the server pushes an EXISTS signal, the daemon triggers a sync instantly.
  3. Listen (Outbound Lake Events): Subscribes to the Event Lake's stream socket. When a matching outbound interaction is emitted by this email address, the daemon builds the MIME payload and transmits it via SMTP.