Commit b876d4c
authored
Add WebSocket API conformance tests (#27)
## Summary
- Adds `ws-api-conformance.test.ts` with 53 tests validating wire format
conformance for all 3 WebSocket protocols
- WS Responses API: event structure, ID prefixes (`resp-`, `call_`),
types, delta/done shapes
- WS Realtime API: session lifecycle, `evt-`/`sess-` ID prefixes,
response event sequences, tool call structure
- WS Gemini Live: `setupComplete` shape, `serverContent` frames,
`toolCall.functionCalls` with parsed object args, error codes/statuses
- Cross-protocol invariants: upgrade acceptance on all 3 WS paths,
rejection on non-WS paths, malformed JSON handling
## Test plan
- [x] All 53 new tests pass
- [x] Red-green verified on 3 structural assertions (resp- prefix, evt-
prefix, Gemini args-as-object)
- [x] Format and lint clean
- [x] Full suite still passes (468 + 53 = 521 tests)
🤖 Generated with [Claude Code](https://claude.com/claude-code)1 file changed
Lines changed: 898 additions & 0 deletions
0 commit comments