Skip to content

feat: add chat session websocket primitive#57

Merged
stackbilt-admin merged 1 commit into
mainfrom
feat/chat-session-ws
Jun 2, 2026
Merged

feat: add chat session websocket primitive#57
stackbilt-admin merged 1 commit into
mainfrom
feat/chat-session-ws

Conversation

@stackbilt-admin

Copy link
Copy Markdown
Member

Summary

  • Add /chat/ws as a bearer-protected core route backed by a ChatSession Durable Object.
  • Add the ChatSession DO primitive, conversation ownership checks, WebSocket frame validation, optional eventId dedup, history/start/delta/done/error frames, and grounded metadata propagation.
  • Wire the route into both the standalone Worker and createAegisApp(), export the DO/auth helpers, and document the Wrangler binding/migration plus frame contract.
  • Add focused route, auth-helper, and direct DO tests.

Validation

  • npm run typecheck
  • npx vitest run tests/chat-session.test.ts tests/chat-session-auth.test.ts tests/chat-ws.test.ts
  • npm test
  • git -c core.whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol diff --check

Advances #55.

Add the core /chat/ws route and ChatSession Durable Object for ordered
terminal/browser chat streams. The session validates inbound frames,
deduplicates client events through web_events, persists D1 conversation
messages, streams kernel deltas, and returns grounded metadata.

Governed-By: aegis-oss#55
Resolves-Request: aegis-oss#55
@stackbilt-admin stackbilt-admin merged commit a50f925 into main Jun 2, 2026
2 checks passed
@stackbilt-admin stackbilt-admin deleted the feat/chat-session-ws branch June 2, 2026 12:17
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