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

omp-bark-notifier

v0.1.1

Published

[![npm version](https://img.shields.io/npm/v/omp-bark-notifier)](https://www.npmjs.com/package/omp-bark-notifier)

Downloads

288

Readme

OMP Bark Notifier

npm version

An installable OMP hook that sends one Bark push to your devices when an OMP agent task settles — with a distinct notification for completed, failed, and aborted outcomes. One task yields at most one push. When the task blocks on an ask question, the hook sends a separate "waiting for your input" push.

Requirements

  • Bun 1.3.14 or newer
  • An OMP workspace
  • A Bark server URL and the device key of the target device

Installation

Install from npm:

omp install omp-bark-notifier

Or point OMP at the hook file directly (the path must be absolute):

omp --hook /absolute/path/to/omp-bark-notifier/hooks/post/bark-notifier.ts

Configuration

Settings are read from, lowest to highest precedence:

  1. Built-in defaults
  2. User file — ~/.omp/bark-notifier.json
  3. Project file — <cwd>/.omp/bark-notifier.json
  4. Environment variables

serverUrl and key are required. If either is missing, the hook logs a warning and sends nothing.

Configuration files

~/.omp/bark-notifier.json:

{
  "serverUrl": "https://bark.example.com",
  "key": "your-bark-device-key",
  "group": "personal",
  "titleTemplate": "OMP task {status}",
  "bodyTemplate": "{message}\n\nProject: {cwd}",
  "askTitleTemplate": "OMP task waiting for your input",
  "askBodyTemplate": "{message}\n\nProject: {cwd}",
  "statuses": ["completed", "failed", "waiting", "subagent:failed"]
}

A project-level .omp/bark-notifier.json in the session directory uses the same shape and overrides the user file.

Environment variables

export BARK_SERVER_URL="https://bark.example.com"
export BARK_KEY="your-bark-device-key"
export BARK_GROUP="personal"
export BARK_TITLE_TEMPLATE="OMP task {status}"
export BARK_BODY_TEMPLATE="{message}\n\nProject: {cwd}"
export BARK_ASK_TITLE_TEMPLATE="OMP task waiting for your input"
export BARK_ASK_BODY_TEMPLATE="{message}\n\nProject: {cwd}"
export BARK_STATUSES="completed,failed,waiting,subagent:failed"

Supported settings

| Setting | JSON key | Environment variable | Required | | --- | --- | --- | --- | | Bark server URL | serverUrl | BARK_SERVER_URL | yes | | Device key | key | BARK_KEY | yes | | Notification group | group | BARK_GROUP | no | | Title template | titleTemplate | BARK_TITLE_TEMPLATE | no | | Body template | bodyTemplate | BARK_BODY_TEMPLATE | no | | Ask title template | askTitleTemplate | BARK_ASK_TITLE_TEMPLATE | no | | Ask body template | askBodyTemplate | BARK_ASK_BODY_TEMPLATE | no | | Notified statuses | statuses | BARK_STATUSES | no |

Templates

Templates can use the variables {status}, {cwd}, and {message}. Unknown placeholders such as {unknown} are left as-is so mistakes stay visible.

Defaults:

  • Title template: OMP task {status}
  • Body template: {message}\n\nProject: {cwd}
  • Ask title template: OMP task waiting for your input
  • Ask body template: {message}\n\nProject: {cwd}

statuses filters which pushes fire. Allowed values: completed, failed, aborted, waiting, subagent, and subagent:completed / subagent:failed / subagent:aborted (comma-separated in BARK_STATUSES). The default is ["completed", "failed", "waiting", "subagent:failed"]; aborted is opt-in because the person who cancelled already knows. An empty list means no pushes at all.

| Variable | Meaning | | --- | --- | | {status} | completed, failed, aborted, or waiting (ask notifications); a subagent push shows the subagent's real outcome | | {cwd} | The session working directory | | {message} | The latest assistant message text, or a fallback like Agent task completed; for ask notifications, the question text |

Security: never commit key. Keep it in the BARK_KEY environment variable or in a config file that is not committed. The hook never logs the key.

What gets notified

The final assistant message of the settled task maps to one status:

| Status | Condition | | --- | --- | | completed | No failure or abort marker on the final assistant message | | failed | An explicit error stop reason or non-empty error message | | aborted | An explicit abort/cancellation stop reason |

  • At most one push per task settle; each ask wait sends at most one waiting push.
  • Only the statuses listed in statuses notify. Failed subagent settles are included by default; other subagent outcomes are silent unless opted in.
  • turn_end and tool events (except ask) never notify; automatic continuations don't notify until the task really ends.
  • Bark delivery failures never affect the task outcome — the hook logs the error and never throws.