Skip to content

feat: Add Hono server with SSE agent turns and rate limits - #9

Merged
ThomasHartDev merged 1 commit into
mainfrom
thomas/feat/server
Jul 24, 2026
Merged

feat: Add Hono server with SSE agent turns and rate limits#9
ThomasHartDev merged 1 commit into
mainfrom
thomas/feat/server

Conversation

@ThomasHartDev

Copy link
Copy Markdown
Owner

Adds apps/server as a small Hono app that runs an agent turn and streams the messages out as Server-Sent Events. createApp takes injectable LLM, store, and limiter so the tests hit app.request with no live port or credentials.

Health sits on GET /healthz and is intentionally outside the rate limiter so probes never compete with real traffic. POST /agent/turn validates the body, opens or reuses a conversation, and returns 429 with Retry-After when the token bucket is empty. Sync turn hooks chain into async SSE writes so frames stay ordered before done.

Anyway, mock provider by default, real model once OPENAI_API_KEY is set.

@ThomasHartDev
ThomasHartDev merged commit 91e2183 into main Jul 24, 2026
1 check passed
@ThomasHartDev
ThomasHartDev deleted the thomas/feat/server branch July 24, 2026 17:00
Comment thread apps/server/src/create-app.ts
Comment thread apps/server/src/rate-limit.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant