Skip to content

Add trusted browser relay client - #3

Merged
Mathieu2301 merged 1 commit into
mainfrom
mathieu/add-home-key-token-provider
Sep 4, 2026
Merged

Add trusted browser relay client#3
Mathieu2301 merged 1 commit into
mainfrom
mathieu/add-home-key-token-provider

Conversation

@Mathieu2301

Copy link
Copy Markdown
Member

Summary

  • add an isolated miakapi/browser entry point backed by the native WebSocket API
  • implement role-1 authentication, same-socket reauthentication, immutable state synchronization, home availability, and non-replayed named calls
  • add deterministic lifecycle, protocol, race, cleanup, resource-budget, bundle-isolation, and public-contract coverage
  • provide a synthetic browser fixture for the relay's real Chromium integration gate

Security boundary

This profile sends the Firebase ID-token bearer to the configured relay. It is therefore restricted to official or explicitly fully trusted relays. Product wiring to arbitrary relays remains blocked until the control plane can issue short-lived credentials scoped to the relay, home, user, and role. The integration fixture contains synthetic credentials only.

Native WebSocket messages are allocated before JavaScript can reject them. Per-frame and rolling inbound limits are defense in depth; official relay/proxy enforcement remains required.

Validation

  • bun run check
  • 115 tests / 383 assertions
  • strict typecheck and production build
  • Node and browser-bundle smoke tests
  • 11-scenario canonical SDK conformance
  • npm package dry run
  • real Chromium/WSS relay integration against the Server worktree

@Mathieu2301
Mathieu2301 merged commit 5c26eaa into main Sep 4, 2026
1 check passed
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