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

@agentick/connector-imessage

v0.9.2

Published

iMessage connector for Agentick — bridge iMessage to agent sessions (macOS only)

Readme

@agentick/connector-imessage

iMessage platform adapter for the Agentick connector system. macOS only.

Polls ~/Library/Messages/chat.db for incoming messages and sends responses via AppleScript through Messages.app.

Install

pnpm add @agentick/connector-imessage

Requires Node 22+ (node:sqlite built-in).

Prerequisites

Grant Full Disk Access to your terminal application in System Settings > Privacy & Security > Full Disk Access. Without this, the agent cannot read chat.db.

Usage

import { createConnector } from "@agentick/connector";
import { IMessagePlatform } from "@agentick/connector-imessage";

const connector = createConnector(
  client,
  new IMessagePlatform({
    handle: "+15551234567",
  }),
  {
    sessionId: "main",
    contentPolicy: "summarized",
    deliveryStrategy: "on-idle",
  },
);

await connector.start();

Options

interface IMessageConnectorOptions {
  handle: string;
  pollIntervalMs?: number;
  sendDelay?: number;
  dbPath?: string;
}

handle — Phone number (with country code) or email address to watch.

pollIntervalMs — How often to poll chat.db. Default: 2000ms.

sendDelay — Delay between sending multiple messages to avoid rate limiting by Messages.app. Default: 500ms.

dbPath — Custom path to chat.db (for testing).

How It Works

Inbound: Polls chat.db using node:sqlite. Tracks a ROWID watermark so each poll only returns new messages. Filters by handle and is_from_me = 0. Poll errors (e.g., SQLITE_BUSY when Messages.app holds a lock) are caught and retried on the next interval.

Outbound: Sends via osascript driving Messages.app. Text is escaped to prevent AppleScript injection.

Confirmations: Text-based only. Sends a prompt like "Allow shell to execute? Reply yes/no" and parses the next inbound message as the response. Natural language is supported — "yes but only in /tmp" is approved with the full text as reason.

Recommended Config

{
  contentPolicy: "summarized",   // clean summaries, no raw tool blocks
  deliveryStrategy: "on-idle",   // one polished message per execution
}

iMessage works best with "on-idle" delivery — one complete, well-composed message rather than a stream of fragments.

Exports

export { IMessagePlatform, type IMessageConnectorOptions } from "./imessage-platform.js";
export { IMessageDB, type IMessageRow } from "./imessage-db.js";
export { sendIMessage, buildAppleScript } from "./imessage-send.js";