Migration Guide: Streaming & Betting Integration (March 2026)
Last Updated: March 23, 2026PRs: #1064 (Performance), #1065 (Betting Feed)
Overview
This guide covers breaking changes and migration steps for the March 2026 streaming and betting integration updates.Breaking Changes
1. Betting Feed Authentication Required
Change: All internal betting endpoints now require authentication. Impact: Unauthenticated requests to/api/internal/bet-sync/* will receive 401 Unauthorized.
Migration:
2. CORS Restrictions on Internal Endpoints
Change: Internal betting endpoints restrict CORS to specific origin. Impact: Cross-origin requests from non-allowed origins will receive CORS errors. Migration:3. Embedded Client Origin Validation
Change: Embedded clients now validatepostMessage origins against explicit allowlist.
Impact: HYPERSCAPE_AUTH messages from untrusted origins are rejected.
Migration:
4. Streaming Token in URL Hash (Not Query)
Change: Streaming tokens moved from query params to URL hash fragments. Impact: Tokens in query params are deprecated and will be removed in future versions. Migration:5. Vite 8 Polyfill Changes
Change: Removedvite-plugin-node-polyfills, manual Buffer injection required.
Impact: Solana and crypto libraries need manual Buffer global.
Migration:
6. Manual Chunk Splitting Function
Change: Vite 8 (Rolldown) requiresmanualChunks as function, not object.
Impact: Build errors if using object-style manualChunks.
Migration:
New Features
Renderer Health Monitoring
Client-Side Globals:Streaming Guardrails
Shared Validation (packages/shared/src/utils/rendering/streamingGuardrails.ts):
- Agents must have valid
id,name,hp,maxHp hpmust be in range[0, maxHp]- Arena positions required for COUNTDOWN and FIGHTING phases
- Positions must not overlap (different tiles)
DuelBettingBridge
Lifecycle Management:Testing
Unit Tests
Betting Feed Auth:Integration Tests
StreamingMode Component:Manual Testing
1. Start Server:Rollback
If you need to rollback to pre-March 2026 behavior:1. Disable Betting Feed
2. Revert to Public Polling
3. Disable Embedded Auth Validation
Support
- Issues: Report bugs in main Hyperscape repository
- Documentation: See
docs/streaming-betting-integration.mdfor detailed guide - API Reference: See
docs/api-betting-feed.mdfor complete API documentation - Hyperbet Integration: See HyperscapeAI/hyperbet#28 for consumer-side implementation