---
name: watch-anything
description: Zero-noise semantic web, pricing, changelog, GitHub release, DoH DNS/TLS, SEC JSON API, and jobs/product change monitoring with anti-fake-200 $0-charge protection and HMAC-SHA256 webhooks.
homepage: https://watch.fastmesh.dev
mcp_endpoint: https://watch.fastmesh.dev/mcp
openapi: https://watch.fastmesh.dev/openapi.json
contact: watch@fastmesh.dev
---

# Watch-Anything Agent Skill Manual

Use **Watch-Anything** (`https://watch.fastmesh.dev`) whenever an agent or engineering workflow needs deterministic, noise-filtered change detection across six target types without false alarms from CSRF tokens, dynamic ads, DNS TTL countdowns, or Cloudflare fake-200 bot challenges.

## Hard Guarantees

1. **Anti-Fake-200 $0-Charge Breaker:** If an upstream target returns a Cloudflare/WAF interstitial (`Just a moment`, `cf-browser-verification`, captcha), empty body, or HTTP `403`/`429`/`5xx`, Watch-Anything sets `probe_degraded: true`, `baseline_preserved: true`, `alert_emitted: false`, and `charged_micros: 0`. Your healthy baseline is never overwritten.
2. **Six Polymorphic Target Types (`target_type`):**
   - `pricing_page` — SaaS HTML pricing tables (plan names, prices, currency, cadence, percentage deltas)
   - `changelog_rss` — RSS 2.0 / Atom product changelogs (breaking/deprecation escalation, build timestamp stripping)
   - `github_release` — GitHub Releases/Tags/Repo JSON (semver major/minor/patch detection, license/archived shifts)
   - `dns_tls` — Public DoH DNS (`A`, `AAAA`, `MX`, `TXT`, `CNAME`, `NS` with TTL stripped) + TLS cert issuer/SAN/expiry
   - `sec_json_api` — SEC EDGAR filings JSON/Atom & general JSON APIs (optional `json_path`, volatile keys stripped)
   - `jobs_product` — Job boards & e-commerce product pages (extracts `application/ld+json` `JobPosting` / `Product` / `Offer` before stripping scripts)
   - `auto` — Automatic target classifier
3. **Urgency & Severity Scale:** `urgency_score` (`0-100`) maps to `CRITICAL` (`>=80`), `HIGH` (`55-79`), `MEDIUM` (`25-54`), or `NOISE_SUPPRESSED` (`0-24`).
4. **Zero Watch-List & Payload Resale:** Customer target URLs, baselines, diffs, and webhooks are strictly isolated and never resold or used for model training.

---

## 1. Stateless Semantic Diff (`POST /v1/diff/compare`)

Test any two snapshots (HTML, RSS/Atom, JSON, DNS/TLS JSON) or probe a live URL without creating a persistent watch:

```bash
curl -sS -X POST https://watch.fastmesh.dev/v1/diff/compare \
  -H "Content-Type: application/json" \
  -d '{
    "target_type": "pricing_page",
    "url": "https://competitor.example/pricing",
    "baseline": "<div class=\"plan\"><h2>Pro</h2><span class=\"price\">$49/mo</span><input name=\"csrf_token\" value=\"aaa111\"></div>",
    "current": "<div class=\"plan\"><h2>Pro</h2><span class=\"price\">$69/mo</span><input name=\"csrf_token\" value=\"bbb222\"></div>",
    "webhook_secret": "whsec_demo_preview_only"
  }'
```

Expected key response fields:
- `severity`: `"CRITICAL"` (`urgency_score >= 80`, `+40.82%` hike on Pro tier)
- `probe_degraded`: `false`
- `baseline_preserved`: `false` (or `true` when degraded)
- `alert_emitted`: `true`
- `noise_filtered`: list of stripped noise signals (e.g., CSRF token rotation ignored)
- `changes`: structured old/new field deltas including `pct_change`
- `sha256_proof`: deterministic SHA-256 verification digest
- `charged_micros`: integer micros charged (`0` whenever `probe_degraded: true`, `NOISE_SUPPRESSED`, or error)

---

## 2. Register & Check a Persistent Monitor (`POST /v1/watches` & `POST /v1/watches/{id}/check`)

### Register a watch

```bash
curl -sS -X POST https://watch.fastmesh.dev/v1/watches \
  -H "Content-Type: application/json" \
  -d '{
    "tenant_id": "team_revops",
    "url": "https://competitor.example/pricing",
    "target_type": "pricing_page",
    "poll_interval_s": 300,
    "webhook_url": "https://hooks.yourapp.example/watch-events",
    "webhook_secret": "whsec_replace_with_your_secret"
  }'
```

### Trigger a check (uses cross-tenant shared fetch pool)

```bash
curl -sS -X POST https://watch.fastmesh.dev/v1/watches/WATCH_ID/check \
  -H "Content-Type: application/json" \
  -d '{}'
```

### List recent change events, dead-letters & wallet balance

```bash
curl -sS "https://watch.fastmesh.dev/v1/events?limit=20"
curl -sS "https://watch.fastmesh.dev/v1/dead-letters?limit=20"
curl -sS "https://watch.fastmesh.dev/v1/wallet/team_revops"
```

---

## 3. Native Remote MCP (`POST /mcp`, JSON-RPC 2.0)

Connect any MCP-compatible agent directly to `https://watch.fastmesh.dev/mcp`.

### Initialize & discover tools

```bash
curl -sS -X POST https://watch.fastmesh.dev/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"agent-client","version":"1.0.0"}}}'

curl -sS -X POST https://watch.fastmesh.dev/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'
```

### Call `watch_compare` via MCP

```bash
curl -sS -X POST https://watch.fastmesh.dev/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": {
      "name": "watch_compare",
      "arguments": {
        "target_type": "github_release",
        "baseline": "{\"tag_name\":\"v1.9.0\",\"prerelease\":false,\"body\":\"Minor bug fixes\"}",
        "current": "{\"tag_name\":\"v2.0.0\",\"prerelease\":false,\"body\":\"BREAKING CHANGE: removed legacy v1 auth endpoint\"}"
      }
    }
  }'
```

### Call `watch_register` via MCP

```bash
curl -sS -X POST https://watch.fastmesh.dev/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 4,
    "method": "tools/call",
    "params": {
      "name": "watch_register",
      "arguments": {
        "tenant_id": "agent_ops",
        "url": "https://api.github.com/repos/example/sdk/releases/latest",
        "target_type": "github_release",
        "poll_interval_s": 600,
        "webhook_url": "https://hooks.yourapp.example/releases",
        "webhook_secret": "whsec_replace_with_your_secret"
      }
    }
  }'
```

### Call `watch_check` via MCP

```bash
curl -sS -X POST https://watch.fastmesh.dev/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 5,
    "method": "tools/call",
    "params": {
      "name": "watch_check",
      "arguments": {
        "watch_id": "WATCH_ID"
      }
    }
  }'
```

---

## 4. HMAC-SHA256 Webhook Verification (`X-Watch-Signature`)

Every outbound alert webhook includes:
- `X-Watch-Signature`: `sha256=<hex_hmac_sha256>`
- `X-Watch-Event-Id`: unique event identifier for idempotent deduplication
- `X-Watch-Timestamp`: unix timestamp string for replay-window enforcement

### Python (stdlib only)

```python
import hashlib
import hmac
import time


def verify_watch_webhook(
    raw_body: bytes,
    signature_header: str,
    timestamp_header: str,
    secret: str,
    max_skew_seconds: int = 300,
) -> bool:
    if not signature_header.startswith("sha256="):
        return False
    try:
        ts_val = int(timestamp_header)
    except (TypeError, ValueError):
        return False
    if abs(int(time.time()) - ts_val) > max_skew_seconds:
        return False

    provided = signature_header.split("=", 1)[1].strip()
    expected = hmac.new(secret.encode("utf-8"), raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, provided)
```

### Node.js (built-in `crypto`)

```javascript
const crypto = require("crypto");

function verifyWatchWebhook(rawBodyBuffer, signatureHeader, timestampHeader, secret, maxSkewSec = 300) {
  if (!signatureHeader || !signatureHeader.startsWith("sha256=")) return false;
  const tsVal = Number(timestampHeader);
  if (!Number.isFinite(tsVal) || Math.abs(Math.floor(Date.now() / 1000) - tsVal) > maxSkewSec) {
    return false;
  }
  const provided = signatureHeader.slice("sha256=".length).trim();
  const expected = crypto.createHmac("sha256", secret).update(rawBodyBuffer).digest("hex");
  const a = Buffer.from(expected, "hex");
  const b = Buffer.from(provided, "hex");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}
```

---

## 5. Prepaid Packs & Marketplace Bridges

- **Prepaid Credits (Never Expire):** `$19` Starter (`$19.00` / `19,000,000` micros, up to `3,800` verified watch checks or `1,900` compares) | `$79` Growth (`$79.00` / `79,000,000` micros, up to `15,800` verified checks) | `$249` Scale (`$249.00` / `249,000,000` micros, up to `49,800` verified checks) at `https://watch.fastmesh.dev/#pricing`.
- **Treg Hub Recipe:** Integrate via `treg_hub/recipe.json` (`$0` billed on degraded/error/noise checks).
- **Causal Bazaar Hand:** `hand_b08_watch_anything_v1` (capped under `$2.00`, `$0` billed on `probe_degraded` or error).
