Voice 1: fluxer-proto voice gateway types #62

Closed
opened 2026-11-11 12:17:32 +00:00 by charles · 0 comments
Owner

Files:

  • Create: crates/fluxer-proto/src/gateway/voice.rs, fixtures crates/fluxer-proto/fixtures/gateway/voice_*.json
  • Modify: crates/fluxer-proto/src/gateway/{events.rs,mod.rs,identify.rs,ready.rs}
  • Test: crates/fluxer-proto/tests/voice.rs

Interfaces:

  • Produces: VoiceStateUpdateParams { guild_id: Option<Snowflake>, channel_id: Option<Snowflake>, self_mute, self_deaf, self_video, self_stream: bool, viewer_stream_keys: Vec<String>, connection_id: Option<String> } with fn into_envelope(self) -> Envelope (op 4); VoiceState (facts §1 type; guild_id: Option<Snowflake>, all optionals tolerated, version: Option<u64>); VoiceServerUpdate::{Sfu { token: SecretString, endpoint: String, connection_id: String, guild_id, channel_id, e2ee_key: Option<SecretString> }, P2p}; CallCreate/CallUpdate (CallData), CallDelete, CallVoiceState; GatewayErrorCode voice codes incl. VoiceE2eeRequired and Unknown(u32); GatewayEvent::{VoiceStateUpdate, VoiceServerUpdate, CallCreate, CallUpdate, CallDelete}; voice_states: Vec<VoiceState> on the guild create/ready payloads; IdentifyProperties::e2ee_capable: bool set by the caller (default false).

  • Debug for VoiceServerUpdate must not print token or e2ee_key.

  • Step 1: Write failing tests: op4_join_serialises_like_the_fork (exact JSON of facts §1 join form, connection_id: null), op4_leave_form, voice_state_minimal_and_full_fixture, voice_server_update_sfu_and_p2p, voice_server_update_debug_hides_secrets, call_events_roundtrip, ready_with_voice_states, unknown_voice_error_code_is_tolerated.

  • Step 2–5: FAIL → implement → PASS → commit feat(proto): voice gateway types.

Plan: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/plans/2026-11-11-voice.md
Spec: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/specs/2026-11-11-fluxer-native-voice-design.md

**Files:** - Create: `crates/fluxer-proto/src/gateway/voice.rs`, fixtures `crates/fluxer-proto/fixtures/gateway/voice_*.json` - Modify: `crates/fluxer-proto/src/gateway/{events.rs,mod.rs,identify.rs,ready.rs}` - Test: `crates/fluxer-proto/tests/voice.rs` **Interfaces:** - Produces: `VoiceStateUpdateParams { guild_id: Option<Snowflake>, channel_id: Option<Snowflake>, self_mute, self_deaf, self_video, self_stream: bool, viewer_stream_keys: Vec<String>, connection_id: Option<String> }` with `fn into_envelope(self) -> Envelope` (op 4); `VoiceState` (facts §1 type; `guild_id: Option<Snowflake>`, all optionals tolerated, `version: Option<u64>`); `VoiceServerUpdate::{Sfu { token: SecretString, endpoint: String, connection_id: String, guild_id, channel_id, e2ee_key: Option<SecretString> }, P2p}`; `CallCreate`/`CallUpdate` (`CallData`), `CallDelete`, `CallVoiceState`; `GatewayErrorCode` voice codes incl. `VoiceE2eeRequired` and `Unknown(u32)`; `GatewayEvent::{VoiceStateUpdate, VoiceServerUpdate, CallCreate, CallUpdate, CallDelete}`; `voice_states: Vec<VoiceState>` on the guild create/ready payloads; `IdentifyProperties::e2ee_capable: bool` set by the caller (default `false`). - `Debug` for `VoiceServerUpdate` must not print `token` or `e2ee_key`. - [ ] **Step 1: Write failing tests**: `op4_join_serialises_like_the_fork` (exact JSON of facts §1 join form, `connection_id: null`), `op4_leave_form`, `voice_state_minimal_and_full_fixture`, `voice_server_update_sfu_and_p2p`, `voice_server_update_debug_hides_secrets`, `call_events_roundtrip`, `ready_with_voice_states`, `unknown_voice_error_code_is_tolerated`. - [ ] **Step 2–5:** FAIL → implement → PASS → commit `feat(proto): voice gateway types`. Plan: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/plans/2026-11-11-voice.md Spec: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/specs/2026-11-11-fluxer-native-voice-design.md
charles added this to the Voice milestone 2026-11-11 12:17:32 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#62
No description provided.