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-channel-mattermost

v0.1.5

Published

Mattermost channel adapter for AgentOS (REST + WebSocket)

Readme

Mattermost channel

This pack gives an agent outbound Mattermost posts through REST using fetch and inbound message events through WebSocket using ws.

Installation

npm install @framers/agentos-ext-channel-mattermost

Peer dependency: @framers/agentos >=0.10.40.

Usage

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

const agentos = await AgentOS.create({
  extensionManifest: {
    packs: [
      {
        package: '@framers/agentos-ext-channel-mattermost',
        options: {
          url: process.env.MATTERMOST_URL,
          token: process.env.MATTERMOST_TOKEN,
        },
      },
    ],
  },
});

Configuration

| Option | Secret id | Environment variable | Required | Default | | --- | --- | --- | --- | --- | | url | mattermost.url | MATTERMOST_URL | Yes | None | | token | mattermost.token | MATTERMOST_TOKEN | Yes | None | | reconnectDelayMs | | | No | 2500 milliseconds | | priority | | | No | 50 | | secrets | | | No | None | | Context logger | | | No | console for service logging |

Credentials resolve from options, then option secrets, then environment variables. URLs without an HTTP scheme receive https://; trailing slashes are removed.

Tools

| Tool | What it does | | --- | --- | | mattermostChannelSendMessage | Sends a text message through the Mattermost channel. |

mattermostChannelSendMessage

| Parameter | Type | Required | Description | | --- | --- | --- | --- | | conversationId | string | Yes | Target Mattermost channel id | | text | string | Yes | Message text |

Channel adapter

The adapter registers platform mattermost. Activation looks up the authenticated user through REST and opens a WebSocket connection. On opening, the socket sends an authentication_challenge containing the token. Received posted events with nonempty text become message events. Channel type D maps to direct conversations; other types map to groups. Self echoes are ignored when the authenticated user id is known.

Outbound text blocks create posts with bearer authentication. The adapter maps replyToMessageId to root_id for thread replies; the tool exposes only channel id and text. Typing indicators do nothing. The socket reconnects after closing while the service is running.

Notes

Sending creates posts in the target Mattermost channel. Missing URL or token causes a factory error. Sending requires a running service, a nonempty channel id and nonempty text. Failed REST sends return an error containing the response status and body. A failed authenticated-user lookup does not prevent the WebSocket connection attempt, but leaves self-echo filtering without a user id.

The connection reports connected when the socket opens, before authentication confirmation is processed. WebSocket errors are recorded and close the socket. Reconnect delays have a minimum of half a second. Shutdown cancels reconnect timers, closes the socket and clears handlers. The implementation uses fetch and ws; it does not import the SDK named in the manifest.

Node.js requirement: >=22.

License

Apache-2.0