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

openclaw-face-hooks

v0.1.6

Published

OpenClaw hook for pushing agent status to Cloudflare R2

Downloads

65

Readme

openclaw-face-hooks

OpenClaw hook that pushes agent busy/idle status to Cloudflare R2 on message events. Designed for zero-port-exposure status visualization.

How It Works

┌─────────────┐  message:received  ┌──────────────┐  PUT status.json  ┌────────────────┐
│  OpenClaw    │───────────────────▶│  This Hook   │─────────────────▶│  Cloudflare R2 │
│  (Agent)    │  message:sent      │  (handler.ts)│                  │  (Public)      │
└─────────────┘                    └──────────────┘                  └────────────────┘
  • message:received event → uploads { "busy": true, ... }
  • message:sent event → uploads { "busy": false, ... }
  • Errors are logged but never interrupt OpenClaw operation

Installation

Via npm (Hook Pack)

npm install openclaw-face-hooks

OpenClaw will automatically discover hooks via the openclaw.hooks field in package.json.

Manual

Clone into your OpenClaw hooks directory:

cd ~/.openclaw/hooks
git clone <repo-url> openclaw-face-hooks
cd openclaw-face-hooks
pnpm install

Configuration

1. Create a Cloudflare R2 Bucket

  • Public Access: Enable (read-only)
  • CORS: Allow GET from all origins

2. Set Environment Variables

Create a .env file in the hook directory or set them in your shell:

R2_ACCESS_KEY_ID=your_access_key
R2_SECRET_ACCESS_KEY=your_secret_key
R2_ENDPOINT=https://your-account-id.r2.cloudflarestorage.com
R2_BUCKET=openclaw-status-your-username

| Variable | Description | |----------|-------------| | R2_ACCESS_KEY_ID | Cloudflare R2 API Access Key ID | | R2_SECRET_ACCESS_KEY | Cloudflare R2 API Secret Access Key | | R2_ENDPOINT | R2 endpoint URL | | R2_BUCKET | R2 bucket name |

3. Enable the Hook

openclaw hooks enable openclaw-face-hooks

4. Verify

openclaw hooks list

You should see 📡 openclaw-face-hooks ✓ in the output.

Status JSON Schema

The hook uploads the following JSON to status.json in your R2 bucket:

{
  "busy": true,
  "ts": 1704067200000,
  "sessionKey": "agent:main:main",
  "source": "telegram"
}

| Field | Type | Description | |-------|------|-------------| | busy | boolean | true when agent is processing, false when idle | | ts | number | Unix timestamp in milliseconds | | sessionKey | string? | Session identifier | | source | string? | Message source channel (e.g., telegram, whatsapp) |

Events

This hook listens to the following OpenClaw events:

| Event | Action | |-------|--------| | message (general) | Listens to all message events | | action: received | Upload busy: true | | action: sent | Upload busy: false |

Testing

Unit Tests

pnpm test:run

Integration Test (requires R2 credentials)

pnpm test:push

This simulates message events and pushes status to your R2 bucket.

Project Structure

openclaw-face-hooks/
├── HOOK.md          # Hook metadata (YAML frontmatter)
├── handler.ts       # HookHandler implementation
├── test-push.ts     # R2 integration test
├── package.json     # npm module with openclaw.hooks field
├── tsconfig.json    # TypeScript config (IDE/test only)
└── __tests__/       # Unit & property-based tests

License

MIT