Waitlist
When an agent is in coming_soon status, the catalog UI replaces the "Get started" CTA with a "Notify me" dialog that captures emails into the waitlist.
Schema (agent_waitlist)
| Column | Type | Notes |
|---|---|---|
id | UUID | PK |
agentId | UUID | FK → agents |
email | text | |
createdAt | timestamptz |
Unique on (agentId, email).
Endpoints
| Verb | Path | Guard |
|---|---|---|
| POST | /agents/:agentId/waitlist | public |
| GET | /agents/:agentId/waitlist/me | bearer (optional) |
POST is idempotent — duplicate emails return 200 with the existing row. It also writes an interactions row of type notify_request for admin notification fan-out.
GET .../waitlist/me returns { notified: boolean }. For unauthenticated requests it returns { notified: false } without erroring — used by the frontend to know whether to render the "you're on the list" success state.
Frontend flow
NotifyDialog.tsx (in fleapo-marketplace/src/components/):
- Open dialog on coming-soon agent click.
- Pre-fill email from
useMe()if authenticated. - Validate via Zod (
z.string().email()). - Submit → set React Query cache key
waitlistKey(agentId)to{ notified: true }. - Render success state.
Closing the loop
The marketplace doesn't auto-email the waitlist when status flips to active. Export the list manually:
SELECT email, created_at
FROM agent_waitlist
WHERE agent_id = '<agentId>'
ORDER BY created_at;
Then send via your email-of-choice. Future work: build an admin "notify waitlist" button.