{
  "name": "hg-daily-briefing",
  "endpoints": [
    "GET  /health",
    "GET  /latest                       — latest committed episode metadata",
    "GET  /feed-podcast.xml             — RSS feed mirror",
    "POST /play-event                   — body: { event: \"play\"|\"complete\", episode_date, email? }",
    "POST /generate                     — body: { date?, force?, story?, editorial_pipeline? } — generate today's episode",
    "GET  /generate?key=<ADMIN_KEY>&editorial_pipeline=0  — bypass pipeline for speed",
    "POST /dry-run                      — Claude only by default; add editorial_pipeline=1 to dry-run the full 3-model pipeline",
    "POST /queue-story                  — body: { post_url, post_title, post_summary } — editorial pipeline hook",
    "GET  /admin/queued-story?key=<ADMIN_KEY>",
    "GET  /admin/clear-queued-story?key=<ADMIN_KEY>",
    "GET  /admin/orphans?key=<ADMIN_KEY>                — list unreferenced R2 audio + transcript files",
    "POST /admin/delete-orphan?key=<ADMIN_KEY>          — body: { key: \"files/audio/briefing/...mp3\" }",
    "POST /recap/subscribe              — body: { email } — sends magic confirm link via Resend",
    "GET  /recap/confirm?token=<token>  — confirm subscription (link from email)",
    "GET  /recap/unsubscribe?token=<token>  — opt out (link in every email)",
    "GET  /admin/recap-send?key=<ADMIN_KEY>[&date=YYYY-MM-DD][&dry_run=1] — manually send a daily episode email",
    "GET  /admin/recap-list?key=<ADMIN_KEY>            — list subscribers (emails redacted)",
    "GET  /admin/analytics?key=<ADMIN_KEY>[&period=30d] — Plausible play/complete rollups"
  ]
}