982e1b0d66
- Replace the Commands-table Lint/Type-check TODOs with the real, verified commands: `npm run check` (tsc --noEmit over startos/) and `npm run prettier`. There is no ESLint/linter; server/ JS is untooled. - Move the client-side relay contract (env vars, /relay/* endpoints, X-Recap-* headers, file map) out of AGENTS.md into docs/guides/relay-client.md with paths: frontmatter, lazy-loaded via a .claude/rules symlink; AGENTS.md keeps a one-line pointer. - Un-ignore .claude/rules/ so the guide auto-attaches in any clone, while .claude/ local state (worktrees, plans) stays ignored.
1.7 KiB
1.7 KiB
paths
| paths | |||||||
|---|---|---|---|---|---|---|---|
|
Client-side contract with the relay
Endpoint shapes + auth model are documented canonically in ../recap-relay/AGENTS.md. The client side is:
- Env vars —
RECAP_RELAY_BASE_URL(defaulthttps://relay.recaps.cc) +RECAP_RELAY_OPERATOR_KEY(matches the relay'srelay_cloud_operator_key). Both gitignored; reference names, never values. Resolved inserver/relay-default.jsandserver/config.js. - Auth direction (what the client SENDS) — cloud calls send
X-Recap-Operator-Key+X-Recap-User-Id; self-hosted calls sendX-Recap-Install-Id(+ optionalAuthorization: <license>). Set the sameX-Recap-Job-Idon transcribe + analyze in one summary so the relay bills one credit, not two. - 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/policyis a small inline proxy inindex.js.)