live

package
v8.0.79 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 41 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package live forwards Codex realtime WebRTC session bootstrap requests.

Index

Constants

View Source
const (
	ClientSecretSessionContextKey   = "codexLiveClientSecretSession"
	ClientSecretPrincipalContextKey = "codexLiveClientSecretPrincipal"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientSecretAuthorization

type ClientSecretAuthorization struct {
	Principal       string
	IssuerPrincipal string
	IssuerProvider  string
	Session         json.RawMessage
}

ClientSecretAuthorization contains the local session configuration associated with an ephemeral key.

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler forwards Codex live session requests through the shared auth scheduler.

func NewHandler

func NewHandler(authManager *auth.Manager, cfg *config.Config) *Handler

NewHandler creates a Codex live session handler.

func (*Handler) AuthenticateClientSecret

func (h *Handler) AuthenticateClientSecret(request *http.Request) (ClientSecretAuthorization, bool, error)

AuthenticateClientSecret validates a local ephemeral key when the request carries one.

func (*Handler) Close

func (h *Handler) Close()

Close releases all active Codex live sessions.

func (*Handler) CreateClientSecret

func (h *Handler) CreateClientSecret(c *gin.Context)

CreateClientSecret creates a short-lived credential scoped to this proxy.

func (*Handler) CreateLegacySession

func (h *Handler) CreateLegacySession(c *gin.Context)

CreateLegacySession implements the deprecated Realtime session credential endpoint.

func (*Handler) Handle

func (h *Handler) Handle(c *gin.Context)

Handle forwards a WebRTC SDP bootstrap request to the Codex realtime calls endpoint.

func (*Handler) HandleDirectWebsocket

func (h *Handler) HandleDirectWebsocket(c *gin.Context)

HandleDirectWebsocket relays a standard Realtime WebSocket through Codex OAuth.

func (*Handler) HandleHangup

func (h *Handler) HandleHangup(c *gin.Context)

HandleHangup forwards hangup for a locally created WebRTC call using its pinned OAuth credential.

func (*Handler) HandleRealtimeWebsocket

func (h *Handler) HandleRealtimeWebsocket(c *gin.Context)

HandleRealtimeWebsocket dispatches a standard Realtime WebSocket or an existing call sideband.

func (*Handler) HandleSIPControl

func (h *Handler) HandleSIPControl(c *gin.Context)

HandleSIPControl reports that the Codex OAuth upstream has no SIP dialog capability.

func (*Handler) HandleSideband

func (h *Handler) HandleSideband(c *gin.Context)

HandleSideband relays live session sideband WebSocket frames bidirectionally.

func (*Handler) HandleTranscriptionSession

func (h *Handler) HandleTranscriptionSession(c *gin.Context)

HandleTranscriptionSession reports that the Codex OAuth upstream has no transcription-only capability.

func (*Handler) HandleTranslation

func (h *Handler) HandleTranslation(c *gin.Context)

HandleTranslation reports that the Codex OAuth upstream has no translation session capability.

func (*Handler) UpdateConfig

func (h *Handler) UpdateConfig(cfg *config.Config) error

UpdateConfig atomically applies Codex Live media relay settings to new sessions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL