Server-beta event pipeline (phases 4–13)
This release lands the full server-beta track developed on server-beta-phase-4-event-pipeline — a self-contained Postgres + BullMQ event-to-observation pipeline with API-key auth, team/project scope, audit log, three AI providers (Anthropic, OpenAI, Google), a dedicated MCP server, legacy compat adapters for existing worker clients, a Docker/Compose stack, and a generation-job retry/cancel surface.
Highlights
- Event pipeline:
agent_event→observation_generation_jobs(outbox) → BullMQ worker →observationrow. Idempotent enqueue, request-id propagation end-to-end, structured audit log. - API surface:
POST /v1/events,POST /v1/sessions/start,POST /v1/sessions/:id/end, generation-job list/retry/cancel, MCP routes, scoped reads. - Legacy compat:
/api/sessions/observationsand/api/sessions/summarizeshims map legacy worker payloads into the new event/job model without touching worker code. Both shims now wrap session lookup in their try/catch so Postgres failures return structured JSON, andresolveServerSessionsurvives TOCTOU races via 23505 catch-and-refetch. - POST /v1/sessions/start also catches 23505 on concurrent start with the same
externalSessionIdand refetches the winning row instead of returning 500. - Generation providers: Anthropic, OpenAI, and Google with per-team-project scope enforcement and error classification.
- Docker / Compose stack and
bin/server-beta-clifor local operator workflows.
Bug fixes
resolveServerSessionPostgres errors no longer escapeasyncHandler.catch(next)and return HTML 500s to legacy clients.POST /v1/sessions/startno longer returns 500 to the loser of a concurrent same-externalSessionIdrace.
Full PR thread: #2383.