server-core/http
packages/server/src/http
Purpose
HTTP server construction barrel.Public surface
makeCoreHttpApp
Function
/health, /ws) with the auth surface
(/api/v1/auth/register) and wraps the router in CORS.
| Route | Mounted unless | Method | Body | Status |
|---|---|---|---|---|
/health | always | GET | — | 200 {status, connections} |
/ws | always | GET | WS Upgrade | 101 |
/api/v1/auth/register | skipDefaultRegisterRoute | POST | Register.params | 201 {agentId, apiKey}; 400/403/500 |
/api/v1/apps/register | skipDefaultRegisterRoute | POST | { manifest, inviteCode? } | 201 {appId, appKey}; 400/403/500 |
All bodied routes funnel through readValidatedBody for JSON | ||||
| decode + Effect-Schema strict (excess-rejecting) decode. Invite-gate | ||||
checks use safeEqual | ||||
(constant-time) to compare inviteCode against | ||||
registrationSecret. |
makeNodeHttpServer
Function
Files
node-http-server.tsroutes.ts