diff --git a/AGENTS.md b/AGENTS.md index 2207a6d..107d698 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -87,8 +87,8 @@ Endpoint shapes + auth model are documented canonically in `../recap-relay/AGENT - **Env vars** — `RECAP_RELAY_BASE_URL` (default `https://relay.recaps.cc`) + `RECAP_RELAY_OPERATOR_KEY` (matches the relay's `relay_cloud_operator_key`). Both gitignored; reference names, never values. Resolved in `server/relay-default.js` and `server/config.js`. - **Auth direction (what the client SENDS)** — cloud calls send `X-Recap-Operator-Key` + `X-Recap-User-Id`; self-hosted calls send `X-Recap-Install-Id` (+ optional `Authorization: `). Set the same `X-Recap-Job-Id` on transcribe + analyze in one summary so the relay bills one credit, not two. -- **Endpoints called** — `/relay/{transcribe, transcribe-url, summarize-url, summarize-url/:jobId/events, analyze, balance, user-tier, user-tier/:id, tier-invoice, tier-zaprite-order, tier-plans, expiring-subscriptions}`. Settle webhooks land on the relay side, never here. -- **Files** — `server/providers/relay.js` (transcribe/summarize/analyze + tier reads/writes), `server/billing-routes.js` (purchase orchestration), `server/subscription-reminders.js` (polls `/relay/expiring-subscriptions`). +- **Endpoints called** — `/relay/{transcribe, transcribe-url, jobs/:id, summarize-url, summarize-url/:jobId/events, analyze, tts, balance, capabilities, policy, credits/packages, credits/buy, credits/invoice/:id, user-tier, user-tier/:id, tier-invoice, tier-zaprite-order, tier-plans, expiring-subscriptions}`. Settle webhooks land on the relay side, never here. +- **Files** — `server/providers/relay.js` (transcribe/summarize/analyze/tts + balance + tier reads/writes), `server/relay-capabilities.js` (capabilities poll), `server/billing-routes.js` (tier purchase orchestration), `server/credits-purchase.js` (credit-pack purchase proxy), `server/subscription-reminders.js` (polls `/relay/expiring-subscriptions`). (`/relay/policy` is a small inline proxy in `index.js`.) ## Always