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

@framers/agentos-ext-email-gmail

v0.1.6

Published

Gmail integration for AgentOS — email CRUD via Google Gmail API

Downloads

5,183

Readme

Gmail email

This pack gives an agent message listing, reading, sending, replies, search and label inspection through the Google Gmail API using googleapis and OAuth2.

Installation

npm install @framers/agentos-ext-email-gmail

Peer dependency: @framers/agentos >=0.10.40.

Usage

import { AgentOS } from '@framers/agentos';

const agentos = await AgentOS.create({
  extensionManifest: {
    packs: [
      {
        package: '@framers/agentos-ext-email-gmail',
        options: {
          clientId: process.env.GOOGLE_CLIENT_ID || process.env.GMAIL_CLIENT_ID,
          clientSecret: process.env.GOOGLE_CLIENT_SECRET || process.env.GMAIL_CLIENT_SECRET,
          refreshToken: process.env.GOOGLE_REFRESH_TOKEN || process.env.GMAIL_REFRESH_TOKEN,
        },
      },
    ],
  },
});

Configuration

| Option | Secret id | Environment variable | Required | Default | | --- | --- | --- | --- | --- | | clientId | google.clientId | GOOGLE_CLIENT_ID, then GMAIL_CLIENT_ID | Yes | No default | | clientSecret | google.clientSecret | GOOGLE_CLIENT_SECRET, then GMAIL_CLIENT_SECRET | Yes | No default | | refreshToken | google.refreshToken | GOOGLE_REFRESH_TOKEN, then GMAIL_REFRESH_TOKEN | Yes | No default | | priority | | | No | 50 | | secrets | | | No | No map | | Context logger | | | No | No logger |

Nonempty credential options precede options.secrets, followed by environment fallbacks in the order shown. The logger receives activation and deactivation messages.

Tools

| Tool | What it does | | --- | --- | | gmailListMessages | Lists message summaries with query, label and result filters. | | gmailReadMessage | Reads a message's subject, sender, recipients, date, body and labels. | | gmailSendMessage | Sends a plain text email with To, CC and BCC recipients. | | gmailReplyMessage | Replies within a thread with reply headers and a Re: subject prefix. | | gmailSearchMessages | Searches messages using Gmail search syntax. | | gmailListLabels | Lists labels with types and message counts. |

gmailListMessages

| Parameter | Type | Required | Description | | --- | --- | --- | --- | | query | string | No | Gmail search query (e.g. "is:unread", "from:[email protected]", "subject:invoice"). Uses standard Gmail search syntax. | | labelIds | array of strings | No | Filter by label IDs (e.g. ["INBOX", "UNREAD"]) | | maxResults | number | No | Maximum number of messages to return (default: 10, max: 100) |

gmailReadMessage

| Parameter | Type | Required | Description | | --- | --- | --- | --- | | messageId | string | Yes | The Gmail message ID to read |

gmailSendMessage

| Parameter | Type | Required | Description | | --- | --- | --- | --- | | to | string | Yes | Recipient email address (comma-separated for multiple) | | subject | string | Yes | Email subject line | | body | string | Yes | Email body text (plain text) | | cc | string | No | CC recipients (comma-separated email addresses) | | bcc | string | No | BCC recipients (comma-separated email addresses) |

gmailReplyMessage

| Parameter | Type | Required | Description | | --- | --- | --- | --- | | messageId | string | Yes | The Gmail message ID to reply to | | body | string | Yes | Reply body text (plain text) |

gmailSearchMessages

| Parameter | Type | Required | Description | | --- | --- | --- | --- | | query | string | Yes | Gmail search query using Gmail search syntax (e.g. "from:[email protected]", "subject:invoice has:attachment", "is:unread after:2024/06/01") | | maxResults | number | No | Maximum number of results to return (default: 10, max: 100) |

gmailListLabels

The input schema has no parameters.

Notes

The package requires Node.js >=22. Missing OAuth credentials make the factory throw. Activation initializes the OAuth client with the refresh token; service operations require initialization. The pack also registers the service as gmailService with kind productivity.

Sending and replying transmit email from the authenticated account. Replies address the original From header, use the original thread, and set In-Reply-To and References from its message ID header. Bodies are sent as plain text.

Listing and search clamp maxResults to the range from 1 to 100. They fetch full messages before returning summaries without the body. Reading extracts plain text or strips tags from HTML. Label detail failures return the basic label without message counts. Tool failures return success: false and an error message.

License

Apache-2.0