forked from unom/punktfunk
Maintain $XDG_RUNTIME_DIR/punktfunk/stream while any client is streaming, holding the primary session's negotiated mode. A per-title launch wrapper can branch on it: present → session is already at the stream mode, run the game as-is; absent → run the local (e.g. multi-head gamescope) path. - New stream_marker module: RAII Guard registered per session, refcounted for concurrent clients, atomic (temp+rename) writes, injection-safe single-quoted client name. POSIX-sh-sourceable KEY=value, namespaced PF_STREAM_* keys, schema-versioned, additive-only. - Hooked into serve_session so every exit path (disconnect, error, panic-unwind) retracts the marker. File exists iff a stream is live. Unblocks the downstream triple-head gamescope launch-wrapper use case. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>