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

@gethmy/agent

v1.10.4

Published

Push-based agent daemon for Harmony — watches board assignments and spawns Claude CLI workers

Downloads

2,327

Readme

@gethmy/agent

Push-based agent daemon for Harmony. Watches board assignments via Supabase Realtime and autonomously implements and reviews cards using Claude CLI workers in isolated git worktrees.

Built for failsafe auto mode: crashed daemons recover on restart, misconfigured columns fail fast, runaway costs trip a daily budget, and cards that can't pass build land in a dead-letter queue instead of bouncing forever.

Prerequisites

Installation

# Run directly (works with any package manager)
npx @gethmy/agent@latest

# Or install globally
npm install -g @gethmy/agent
harmony-agent

Always pin @latest. A bare npx @gethmy/agent reuses any previously cached version that satisfies the spec — so an old install in ~/.npm/_npx can shadow the current release and you'll get stale startup logs and CLI behavior. npx @gethmy/agent@latest re-resolves to the newest published version. If you ever suspect a stale run, clear the cache with rm -rf ~/.npm/_npx (or install globally to skip npx caching entirely).

Configuration

  1. Set up the MCP server first:
npx @gethmy/mcp setup
  1. Add agent config to ~/.harmony-mcp/config.json. Every field is optional — the snippet below shows the common options with their defaults. For the full schema (worktree, verification, completion, priority labels), see docs/agent-daemon.md:
{
  "agent": {
    "poolSize": 3,
    "pickupColumns": ["To Do"],
    "claude": { "model": "opus", "escalateModel": "claude-fable-5", "reviewModel": "sonnet" },
    "review": {
      "enabled": true,
      "poolSize": 2,
      "pickupColumns": ["Review"],
      "moveToColumn": "Done",
      "failColumn": "To Do"
    },
    "budget": {
      "maxAttemptsPerCard": 3,      // DLQ after N full failed runs
      "maxCentsPerCard": 500,        // $5.00 per-card cost cap
      "dailyBudgetCents": 5000,      // $50.00 total daily cap
      "dlqLabel": "dlq"
    },
    "http": {
      "enabled": true,
      "port": 47821,
      "bindAddr": "127.0.0.1"
    },
    "timing": {
      "heartbeatMs": 30000,
      "staleHeartbeatMs": 120000,
      "reconcileIntervalMs": 60000,
      "worktreeGcIntervalMs": 300000
    }
  }
}

CLI

harmony-agent [run]              # Start the daemon (default)
harmony-agent status             # Snapshot: workers, queues, DLQ, budget
harmony-agent health             # Exit 0 if healthy, 1 otherwise
harmony-agent doctor             # Preflight checks without starting the daemon
harmony-agent gc                 # One-shot worktree garbage collection
harmony-agent dlq list           # List dead-lettered cards
harmony-agent dlq clear <cardId> # Release a card from the DLQ
harmony-agent help               # Show usage

# Flags:
--pretty                         # Force colored human log output
--json                           # Force JSON (one record per line)
                                 # Default: pretty on a TTY, JSON when piped

status, health, and dlq clear route through the running daemon's HTTP server (127.0.0.1:47821 by default). dlq clear falls back to a direct state-store write only when the daemon is offline.

What the daemon does

  1. Watches the board in real time via Supabase Realtime.
  2. Picks up cards assigned to your agent user from configured columns.
  3. Implements changes in an isolated git worktree using a full-tool Claude run.
  4. Verifies the build + lint pass. Failures trigger an auto-fix attempt. Persistent failures move the card back to the verification.failColumn (default: To Do).
  5. Pushes the branch and moves the card to Review.
  6. Reviews the diff with a read-only Claude run against a live dev server. Verdict is either approved (PR created, Ready to Merge label) or rejected (findings posted, card moved back to pickup).

Guarantees

  • Resumable. A crash never orphans a card. On restart the daemon reconciles its own ghosts, returns implement cards to the pickup column with an agent-recovered label, ends their Harmony sessions, and cleans up worktrees.
  • Trustworthy. The review worker refuses to approve if the dev server didn't respond to an HTTP probe. Infrastructure failures are distinguished from code failures, so valid PRs don't get bounced back to rework.
  • Bounded. Per-card attempt and cost caps plus a daily budget cap prevent runaway spend. When caps hit, cards go to a dead-letter queue with a label instead of silently re-queuing.
  • Observable. Structured JSON logs on stderr (pipe to jq), a local HTTP status endpoint, and per-worker heartbeats so the reconciler can detect zombie runs within 2 minutes.
  • Safe. Claude subprocesses run in their own process group. Cancellation (SIGINT → SIGTERM → SIGKILL) terminates the whole subprocess tree, including build tools and dev servers Claude spawned.

State

Durable state lives at ~/.harmony-mcp/agent-state.json. Tracks live runs, per-card attempts and costs, daily spend, and DLQ markers. Atomic writes via write-to-tmp + rename.

Worktrees live at .harmony-worktrees/ inside your repo. A background sweep every 5 minutes removes directories older than 1 hour that no live run claims.

Debugging

Every Claude CLI run writes a per-run log at ~/.harmony-mcp/runs/<runId>-card-<shortId>.log — full stdout (NDJSON), stderr, parse errors, and an exit footer with tool-call and cost totals. Start there when a run ends silently or the card activity log shows only "Still working..." heartbeats.

See Debugging a Silent Run for interpretation table and retention notes.

See docs/agent-daemon.md for the full architecture.