## Phase 140: Sovereign Cloud Gaming Platform — GeForce NOW / xCloud / Luna / Stadia / PlayStation Cloud Streaming Replacement

Closes the cloud-gaming sovereignty gap. Phase 137 (Platform & Live-Service)
delivers local console + storefront sovereignty but never addresses low-latency
encoded game streaming to thin clients. This phase delivers an end-to-end
cloud-gaming stack: sovereign hardware-accelerated encoder pipeline, ultra-low-
latency transport, input prediction, adaptive bitrate, frame pacing, GPU fleet
orchestration, thin-client SDKs (TV / mobile / browser / PC / handheld), and
operator tooling so any Oshun-published title can ship as a streamable service
without NVIDIA GeForce NOW, Microsoft xCloud, Amazon Luna, Google Stadia
(residual tech), Sony PlayStation Cloud, Shadow, Blacknut, or Parsec.

Reference open-source ancestors: Moonlight, Sunshine, Selkies, NoMachine.

---

### 140.1 @neith/stream-encoder — Sovereign Real-Time Video Encoder

Ultra-low-latency game-capture encoder that meets or beats NVENC / AMF /
QuickSync / VideoToolbox on latency-quality-bitrate Pareto.

#### 140.1.1 Hardware Encoder HAL

- [x] **140.1.1.1** NVIDIA NVENC backend (Turing / Ampere / Ada / Blackwell)
- [x] **140.1.1.2** AMD AMF / VCN backend (RDNA2 / RDNA3 / RDNA4)
- [x] **140.1.1.3** Intel QuickSync / Xe Media backend
- [x] **140.1.1.4** Apple VideoToolbox backend (Metal capture)
- [x] **140.1.1.5** ARM Mali / Hexagon / MediaTek APU backend for edge
- [x] **140.1.1.6** Unified session-open / session-close / reconfigure API
- [x] **140.1.1.7** Zero-copy capture surface import (D3D12 / Vulkan / Metal)
- [x] **140.1.1.8** HDR capture (PQ / HLG / Dolby Vision 8.1 metadata)
- [x] **140.1.1.9** Multi-encoder tiling for >4K@60 or 1080p@240
- [x] **140.1.1.10** Failover between NVENC and GPU compute encoder

#### 140.1.2 Codec Support

- [x] **140.1.2.1** H.264 / AVC baseline / main / high profile
- [x] **140.1.2.2** H.265 / HEVC main / main10 / main4:4:4
- [x] **140.1.2.3** AV1 main profile with screen-content tools
- [x] **140.1.2.4** VP9 fallback for browser WebRTC legacy
- [x] **140.1.2.5** H.266 / VVC experimental backend
- [x] **140.1.2.6** Lossless / visually-lossless QP=0 mode for devkits
- [x] **140.1.2.7** Long-term reference frame (LTR) management for loss recovery
- [x] **140.1.2.8** Intra-refresh / gradual decoder refresh (no full I-frames)
- [x] **140.1.2.9** Slice-based encoding for partial frame delivery
- [x] **140.1.2.10** Region-of-interest (ROI) bitrate allocation

#### 140.1.3 Rate Control

- [x] **140.1.3.1** CBR with hard ceiling for cellular links
- [x] **140.1.3.2** VBR with quality target
- [x] **140.1.3.3** Constant-quality (CQ / CRF) mode
- [x] **140.1.3.4** Per-frame target with bandwidth estimator feedback
- [x] **140.1.3.5** Scene-change detection with adaptive GOP
- [x] **140.1.3.6** Low-latency tuning (sub-frame delay, zero B-frames)
- [x] **140.1.3.7** Lookahead budget configurable for latency vs. quality
- [x] **140.1.3.8** SVC / temporal scalability for multi-client casts
- [x] **140.1.3.9** Psycho-visual tuning with perceptual weighting
- [x] **140.1.3.10** Motion-vector hinting from game engine

#### 140.1.4 Pre/Post Processing

- [x] **140.1.4.1** Chroma subsampling 4:4:4 → 4:2:0 with text sharpening
- [x] **140.1.4.2** Content-aware denoise before encode (noise removed, grain
      added client-side)
- [x] **140.1.4.3** HDR → SDR tone-map fallback per client capability
- [x] **140.1.4.4** Sub-pixel shift / dither for banding reduction
- [x] **140.1.4.5** Client-informed detail enhance (DLSS / FSR hook)
- [x] **140.1.4.6** UI overlay pre-composite for crisp text
- [x] **140.1.4.7** Color-space conversion pipeline (scRGB, Rec709, Rec2020, P3)
- [x] **140.1.4.8** Letterbox / pillarbox injection for client aspect
- [x] **140.1.4.9** Dynamic resolution scaling (DRS) hook
- [x] **140.1.4.10** Frame-pacing smoothing via timestamp jitter buffer

---

### 140.2 @neith/stream-transport — Ultra-Low-Latency Network Layer

Sub-frame-jitter transport over unreliable consumer networks.

#### 140.2.1 Protocol Stack

- [x] **140.2.1.1** QUIC-based custom transport with 0-RTT resume
- [x] **140.2.1.2** WebRTC DataChannel + RTP for browser clients
- [x] **140.2.1.3** SRT fallback for managed networks
- [x] **140.2.1.4** RIST fallback for broadcast contribution paths
- [x] **140.2.1.5** UDP with FEC (Reed-Solomon / RaptorQ)
- [x] **140.2.1.6** TCP-over-TLS fallback for restrictive corporate networks
- [x] **140.2.1.7** Multipath (LTE + WiFi bonding) via MP-QUIC
- [x] **140.2.1.8** MoQ / Media-over-QUIC for CDN relay
- [x] **140.2.1.9** Sovereign TURN / STUN fleet
- [x] **140.2.1.10** Symmetric-NAT traversal with ICE-lite + hole-punch

#### 140.2.2 Adaptive Bitrate & Bandwidth Estimation

- [x] **140.2.2.1** GCC (Google Congestion Control) baseline
- [x] **140.2.2.2** BBRv3 / BBRv2 congestion control
- [x] **140.2.2.3** Delay-based bandwidth estimator
- [x] **140.2.2.4** Loss-based bandwidth estimator
- [x] **140.2.2.5** Sovereign ML bandwidth predictor (Nous-trained)
- [x] **140.2.2.6** Probe packets for capacity discovery
- [x] **140.2.2.7** Ladder of 240p / 480p / 720p / 1080p / 1440p / 4K presets
- [x] **140.2.2.8** Frame-rate step-down (120 → 60 → 30) before resolution
      step-down
- [x] **140.2.2.9** Switch-point smoothing (no visible snaps)
- [x] **140.2.2.10** Starvation-mode fallback (still-frame + audio)

#### 140.2.3 Loss Recovery

- [x] **140.2.3.1** NACK with per-packet feedback
- [x] **140.2.3.2** Forward error correction (adaptive FEC rate)
- [x] **140.2.3.3** Selective frame retransmit within intra-refresh window
- [x] **140.2.3.4** Packet pacing to avoid burst loss
- [x] **140.2.3.5** Jitter buffer with adaptive target depth
- [x] **140.2.3.6** Reorder tolerance with sequence number reconstruction
- [x] **140.2.3.7** Reference-frame resync request
- [x] **140.2.3.8** Long-term reference (LTR) recovery on burst loss
- [x] **140.2.3.9** Keyframe request throttle
- [x] **140.2.3.10** Freeze-frame-on-loss UX with audio continuity

---

### 140.3 @neith/stream-input — Client Input Capture & Server Injection

Round-trip latency from button press to pixel-on-screen ≤ 50 ms on managed
fiber, ≤ 90 ms on LTE, ≤ 120 ms on 5G mmWave.

#### 140.3.1 Client Capture

- [x] **140.3.1.1** Gamepad raw HID capture (Xbox / DualSense / Pro Controller /
      third-party)
- [x] **140.3.1.2** Keyboard raw input with repeat / modifier
- [x] **140.3.1.3** Mouse raw relative + absolute
- [x] **140.3.1.4** Touch / gesture / stylus for mobile and tablet
- [x] **140.3.1.5** Remote-Play-style touchscreen stick overlay
- [x] **140.3.1.6** Motion / gyro / accelerometer
- [x] **140.3.1.7** Adaptive-trigger / haptic round-trip
- [x] **140.3.1.8** Microphone capture with Opus encode
- [x] **140.3.1.9** Voice-command push-to-talk
- [x] **140.3.1.10** Accessibility input (switch, sip-and-puff, eye-gaze)

#### 140.3.2 Prediction & Compensation

- [x] **140.3.2.1** Client-side input prediction with server reconciliation
- [x] **140.3.2.2** Time-warp reprojection on late frames
- [x] **140.3.2.3** Asynchronous frame interpolation (AFI) optional
- [x] **140.3.2.4** Input-latency budget allocator
- [x] **140.3.2.5** Frame-age measurement via embedded timestamp
- [x] **140.3.2.6** Rebase latency on clock-skew detection
- [x] **140.3.2.7** Haptic feedback re-alignment on retransmit
- [x] **140.3.2.8** Audio-video sync drift correction
- [x] **140.3.2.9** Analog stick deadzone / curve client-side
- [x] **140.3.2.10** Input record & replay for QA debugging

---

### 140.4 @neith/stream-session — Session Lifecycle & Fleet Orchestration

#### 140.4.1 Session Allocation

- [x] **140.4.1.1** Instant-play pool (warm GPU slots pre-booted with title)
- [x] **140.4.1.2** Cold-start path with save-state restore
- [x] **140.4.1.3** Save-state hibernation to cheap storage
- [x] **140.4.1.4** Per-title capacity planner
- [x] **140.4.1.5** Region selection by ping and price
- [x] **140.4.1.6** Overflow redirect to adjacent region with latency budget
- [x] **140.4.1.7** Queue system with fair scheduling and priority tiers
- [x] **140.4.1.8** Preemption for premium tier
- [x] **140.4.1.9** Family / trusted-device quick-resume
- [x] **140.4.1.10** Multi-seat / party streaming (2-4 concurrent players)

#### 140.4.2 GPU Fleet Management

- [x] **140.4.2.1** Bare-metal node provisioning (CoreBoot + Neith Linux)
- [x] **140.4.2.2** Multi-tenant GPU partitioning (MIG / SR-IOV / vGPU)
- [x] **140.4.2.3** Hot-swap on GPU failure
- [x] **140.4.2.4** Power-capping / DVFS for cost-quality balance
- [x] **140.4.2.5** Thermal telemetry and throttling
- [x] **140.4.2.6** Spot / preemptible capacity with graceful eviction
- [x] **140.4.2.7** Cross-vendor fleet (NVIDIA + AMD + Intel) unified scheduler
- [x] **140.4.2.8** Blue / green driver rollout
- [x] **140.4.2.9** Rolling reboot orchestrator with save preservation
- [x] **140.4.2.10** Per-session resource accounting and chargeback

#### 140.4.3 Title Image Management

- [x] **140.4.3.1** Content-addressed VM image store
- [x] **140.4.3.2** Copy-on-write overlay per session
- [x] **140.4.3.3** Delta patching for title updates
- [x] **140.4.3.4** Rehydrated-from-disk warm pool
- [x] **140.4.3.5** Snapshot / restore for save portability
- [x] **140.4.3.6** Anti-cheat state carry across session
- [x] **140.4.3.7** User save bucket with quota + versioning
- [x] **140.4.3.8** Per-title build-channel (live / beta / internal)
- [x] **140.4.3.9** Crash-loop quarantine
- [x] **140.4.3.10** Time-rewind save browser

---

### 140.5 @neith/stream-client — Thin-Client SDK

Clients for every reasonable endpoint. One protocol, many surfaces.

#### 140.5.1 Native Clients

- [x] **140.5.1.1** Windows native client (DXGI decoder, WASAPI audio)
- [x] **140.5.1.2** macOS native client (VideoToolbox decoder, CoreAudio)
- [x] **140.5.1.3** Neith Linux native client (VAAPI / V4L2M2M / NVDEC)
- [x] **140.5.1.4** Android native client (MediaCodec, AAudio)
- [x] **140.5.1.5** Android TV client with remote + gamepad
- [x] **140.5.1.6** Steam Deck / SteamOS client
- [x] **140.5.1.7** Handheld (AYN / Ayaneo / ROG Ally) optimized build
- [x] **140.5.1.8** TV platform client (WebOS / Tizen / Google TV)
- [x] **140.5.1.9** Fire TV / Chromecast client
- [x] **140.5.1.10** Custom streaming-stick reference device (Neith Stream)

#### 140.5.2 Browser Client

- [x] **140.5.2.1** WebCodecs + WebTransport implementation
- [x] **140.5.2.2** WebRTC DataChannel fallback
- [x] **140.5.2.3** WebGPU frame presentation
- [x] **140.5.2.4** Gamepad API mapping
- [x] **140.5.2.5** WebHID for advanced controllers
- [x] **140.5.2.6** Fullscreen / pointer-lock / keyboard capture
- [x] **140.5.2.7** Screen Wake Lock integration
- [x] **140.5.2.8** Installable PWA manifest
- [x] **140.5.2.9** Safari / Firefox / Chromium compatibility shims
- [x] **140.5.2.10** Neith Browser optimized path

#### 140.5.3 Client UX

- [x] **140.5.3.1** Network-quality HUD (ping, loss, bitrate, frame-age)
- [x] **140.5.3.2** Adaptive-stream indicator with "improving" / "degrading"
      hints
- [x] **140.5.3.3** Controller-discovery wizard
- [x] **140.5.3.4** Touch overlay editor (remap on-screen controls)
- [x] **140.5.3.5** Mid-session resume banner
- [x] **140.5.3.6** Game-library browse with streamable-on-this-device filter
- [x] **140.5.3.7** Per-title local-setting override (sensitivity, deadzone)
- [x] **140.5.3.8** Parental-control / session-time-limit UI
- [x] **140.5.3.9** Accessibility overlays (captions, colour-filter,
      high-contrast)
- [x] **140.5.3.10** Offline-queue "ready when connected" reminders

---

### 140.6 @neith/stream-quality — Telemetry, QoE & SLA

#### 140.6.1 Quality Metrics

- [x] **140.6.1.1** VMAF sampling per session
- [x] **140.6.1.2** PSNR / SSIM on reference frames
- [x] **140.6.1.3** Input-to-photon latency instrumentation (blink-test pipe)
- [x] **140.6.1.4** Frame-time jitter histogram
- [x] **140.6.1.5** Stutter / judder classifier
- [x] **140.6.1.6** Audio drop / buffer-underrun counter
- [x] **140.6.1.7** Packet-loss / retransmit percentile
- [x] **140.6.1.8** Bandwidth / bitrate trace per session
- [x] **140.6.1.9** Session-end mean opinion score (MOS) collector
- [x] **140.6.1.10** Crash / disconnect reason coding

#### 140.6.2 Ops & SLA

- [x] **140.6.2.1** Per-region uptime dashboard
- [x] **140.6.2.2** Concurrent-session capacity forecast
- [x] **140.6.2.3** Wait-time + fairness dashboard
- [x] **140.6.2.4** Cost-per-hour / cost-per-session accounting
- [x] **140.6.2.5** SLO + error-budget alerting
- [x] **140.6.2.6** Incident-response runbooks
- [x] **140.6.2.7** Synthetic blink-test clients in every region
- [x] **140.6.2.8** Chaos testing (packet-loss / burst / partition injection)
- [x] **140.6.2.9** Rollback protocol for bad builds
- [x] **140.6.2.10** Customer-support session replay tooling

---

### 140.7 @neith/stream-commerce — Subscription / Bring-Your-Own-Game / Spectator

#### 140.7.1 Access Models

- [x] **140.7.1.1** Subscription tier (free, standard, premium, 4K/120,
      ultimate)
- [x] **140.7.1.2** Bring-your-own-game entitlement proof (Steam / EGS / Oshun
      Store)
- [x] **140.7.1.3** Per-hour pay-as-you-go model
- [x] **140.7.1.4** Demo / trial streaming (time-limited)
- [x] **140.7.1.5** Gift session / pass
- [x] **140.7.1.6** Family plan with shared pool
- [x] **140.7.1.7** Friend-invite streaming (spectator + shared control)
- [x] **140.7.1.8** Event / tournament ticketed access
- [x] **140.7.1.9** Enterprise / dev-kit session allocation
- [x] **140.7.1.10** Region-priced tier with fair-market adjustment

#### 140.7.2 Spectator & Broadcast

- [x] **140.7.2.1** Spectator-mode stream-out (extra encoder to CDN)
- [x] **140.7.2.2** Co-watch party (synchronized playback, voice chat)
- [x] **140.7.2.3** Streamer passthrough to Twitch / YouTube / Kick / sovereign
      platform
- [x] **140.7.2.4** Clip / share to social (short-form highlight)
- [x] **140.7.2.5** Delayed broadcast for competitive integrity
- [x] **140.7.2.6** Director-view multi-camera for esports
- [x] **140.7.2.7** Remote-coach control handoff
- [x] **140.7.2.8** Couch-coop remote (two gamepads, one stream)
- [x] **140.7.2.9** Cloud-save share + resume between friends
- [x] **140.7.2.10** Tournament matchmaking + anti-cheat integration

---

### 140.8 @neith/stream-security — Anti-Abuse & Privacy

- [x] **140.8.1** Encoder anti-leak watermark (invisible per-user fingerprint)
- [x] **140.8.2** Client attestation (device-trust token)
- [x] **140.8.3** Keystroke / microphone privacy boundary
- [x] **140.8.4** No-disk client mode (zero persistence)
- [x] **140.8.5** GDPR / CCPA data-minimization
- [x] **140.8.6** Session-recording consent & retention
- [x] **140.8.7** Abusive-input rate-limit (bot / macro detection)
- [x] **140.8.8** Dedicated-server anti-cheat passthrough
- [x] **140.8.9** Credential-replay prevention
- [x] **140.8.10** Region-compliance gate (China, EU, US export, age-rating)

---

### 140.9 Interoperability & Migration

- [x] **140.9.1** Moonlight / Sunshine protocol compatibility bridge
- [x] **140.9.2** Parsec protocol bridge for BYO-host mode
- [x] **140.9.3** Steam Link compatibility client
- [x] **140.9.4** NVIDIA GameStream legacy import
- [x] **140.9.5** xCloud bookmark / deep-link adapter
- [x] **140.9.6** PlayStation Remote Play client interop
- [x] **140.9.7** Save-file import / export across services
- [x] **140.9.8** Controller-profile import (Xbox / DS / Steam Input)
- [x] **140.9.9** Cross-service achievement sync
- [x] **140.9.10** Migration tool for streaming-service library handoff

---

### 140.10 Reference Clients & Platforms

- [x] **140.10.1** Neith Stream Stick reference hardware spec
- [x] **140.10.2** Kiosk-mode deployment for hotels / esports cafes
- [x] **140.10.3** In-car streaming (automotive infotainment) reference
- [x] **140.10.4** VR streaming (headset as thin client) reference
- [x] **140.10.5** AR glasses spectator mode
- [x] **140.10.6** 5G edge node reference deployment
- [x] **140.10.7** LAN-party cluster (on-prem home-lab) reference
- [x] **140.10.8** Compliance-certified enterprise deployment
- [x] **140.10.9** Education-sandbox deployment (schools, libraries)
- [x] **140.10.10** Developer-kit remote-devkit mode (replaces PS / Xbox DevKit
      streaming)
