feat(clients): live: Gemini Live API over WebSocket, RFC 6455 client, session, relay, discovery check

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 04:40:00 +02:00
co-authored by Claude Sonnet 5.5
parent 6d744a433f
commit fe2afe0b97
35 changed files with 4441 additions and 3 deletions
+29
View File
@@ -0,0 +1,29 @@
#pragma once
// Transport-level WebSocket failure. Messages never carry URLs with query
// strings or credentials.
#include <stdexcept>
#include <string>
namespace molo::google::live {
class WsError : public std::runtime_error {
public:
enum class Kind { Invalid, Io, Timeout, Handshake, Protocol, TooBig, Closed };
WsError(Kind kind, const std::string& message, int http_status = 0)
: std::runtime_error("molo::google::live::ws: " + message),
kind_(kind),
http_status_(http_status) {}
Kind kind() const noexcept { return kind_; }
// HTTP status of a refused upgrade, else 0.
int http_status() const noexcept { return http_status_; }
private:
Kind kind_;
int http_status_;
};
} // namespace molo::google::live