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

@hypelens/agent-guard

v0.1.2

Published

OpenClaw-native risk sidecar for funded Polymarket (PM-first) agents. Discovers positions from chain/CLOB Data API — never agent memory — and enforces hard stop / trailing / daily loss / max exposure outside the LLM. NOT a place/trade skill.

Readme

@hypelens/agent-guard

OpenClaw-native risk sidecar (aka agent-risk) for funded Polymarket operators.

Senpi proved chain-truth exits fix P&L. Polymarket has no native stops. Place skills put risk on; this product keeps exits/risk outside the LLM.

Who it’s for

Funded OpenClaw / agent operators trading Polymarket (optional Hyperliquid watch) who currently lose money because stop-loss, trailing, daily loss, and max exposure live in LLM prompts or cron.

Why place skills aren’t this

| Place skill (polymarket-place, hyperliquid-place, …) | agent-guard | |---|---| | Hero path = enter / bet / order | Hero path = protect / exit on breach | | Positions often from agent memory | Positions only from PM Data API (+ optional HL clearinghouse) | | Risk text in SOUL.md / cron | Hard policy in YAML; agent cannot loosen | | Health = model self-report | Health = CLOB/Data probe + watcher heartbeat | | Alerts via the trading agent | Alerts via file/log + webhook (does not trust the agent) |

This package exposes no place / buy / entry tools.

Install

npm install -g @hypelens/agent-guard
# or
npx @hypelens/agent-guard

Attach a funded wallet (operator)

  1. Copy policy:
cp config/policy.example.yaml config/policy.yaml
# edit wallet: "0xYourPolymarketProxyOrFunder"
  1. Export env (wallet is enough for discovery + dry-run enforcement):
export AGENT_GUARD_WALLET=0xYourFundedPmWallet   # proxy/funder preferred
export AGENT_GUARD_POLICY=./config/policy.yaml
# optional live protective sells (operator accepts stop sells):
# export AGENT_GUARD_EXIT_PK=0x…                 # NEVER 0x9548…
# then set exits.dryRun: false in YAML
  1. Run the watcher beside the trading agent (not inside its prompt loop):
npm run watcher
# → writes state/heartbeat.json + state/guard-alerts.log
  1. Wire MCP for OpenClaw / Claude:
{
  "mcpServers": {
    "agent-guard": {
      "command": "npx",
      "args": ["-y", "@hypelens/agent-guard"],
      "env": {
        "AGENT_GUARD_WALLET": "0xYourFundedPmWallet",
        "AGENT_GUARD_POLICY": "/absolute/path/to/policy.yaml"
      }
    }
  }
}
  1. Arm: call guard_arm. Disarm requires confirm:true and confirmDisarm:"DISARM".

MCP tools

| Tool | Purpose | |---|---| | guard_status | Floors + health (API probe + heartbeat) — not SOUL | | guard_positions | Data API / clearinghouse discovery | | guard_set_policy | Tighten overlay only (cannot loosen YAML floors) | | guard_arm | Enable enforcement | | guard_disarm | Disable — explicit confirm required | | guard_tick | One-shot discover→evaluate→alert→(dry-run)exit |

Policy (YAML)

See config/policy.example.yaml:

  • polymarket.hardStopPct / trailingStopPct / dailyLossLimitUsd / maxExposureUsd
  • Agent overlays may only tighten these
  • exits.dryRun: true by default (safe adoption)
  • Fee stub default free — optional adapter later, only while a position is actively guarded (no SaaS invented here)

HARD rules

  1. Never trade/farm 0x9548B8E9554a1968843B3C380431b10996247c88
  2. No place-order hero path
  3. PM-first; HL clearinghouse is optional discovery/alerts
  4. Positions never from agent memory

ClawHub skill

Draft skill at skill/SKILL.md — use-when: funded agent / protect positions / stop loss / trailing. Not place/trade entry.

cd skill/scripts && npm install && node start-mcp.mjs
# separate terminal:
node start-watcher.mjs

Tests

npm test

Policy enforcement unit tests cover hard stop, trailing, daily loss, max exposure, tighten-only overlay, and disarm confirm.

Fee

Default free for adoption. fee.enabled only activates a stub that records “would charge while guarded” — wire a real adapter later. Do not invent SaaS in this package.

License

MIT