Documentation
¶
Overview ¶
Package codex connects Codex clients to CCL providers without moving native Codex or Claude credentials. The desktop picker and routing allow-list are deliberately separate: only names owned by CCL can reach a CCL runtime.
Index ¶
Constants ¶
const IndependentProviderID = "ccl_proxy"
Variables ¶
This section is empty.
Functions ¶
func FindExecutable ¶
Types ¶
type ConfigChange ¶
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
func New ¶
func New(ctx context.Context, runtime *oauthproxy.Runtime, configured provider.Provider, options Options) (*Gateway, error)
New wraps the standalone proxy's existing runtime. Close never stops that runtime: proxymanager owns its credential refresh and lifetime.
func (*Gateway) RefreshMetadata ¶ added in v1.7.19
RefreshMetadata changes client catalog settings only. Routes, authentication, the runtime and conversation history remain owned by the existing session. Persist the new catalog before publishing it to concurrent HTTP readers.
type Model ¶
Model preserves Codex's catalog fields, including fields introduced by newer clients. Native entries are never reconstructed from a /v1/models list.
type Options ¶
type Options struct {
// Independent selects a custom provider with its own loopback credential,
// rather than sharing OpenAI's provider/account state in the desktop app.
Independent bool
Desktop bool
// ListenAddress preserves the desktop endpoint across daemon replacement.
// It may only name an explicit IPv4 loopback port; empty chooses a free one.
ListenAddress string
// Native upstream overrides are for local integration fixtures. Commands
// never populate them from client requests or environment variables.
OpenAIURL string
ChatGPTURL string
}
type Overlay ¶
type Overlay struct {
Path string `json:"path"`
CatalogPath string `json:"catalog_path"`
BaseURL string `json:"base_url"`
Changes []ConfigChange `json:"changes"`
ProviderBlock string `json:"provider_block,omitempty"`
}
func Plan ¶
Plan writes only the proxy-owned catalog, never the user's configuration. The lifecycle manager journals Changes before Apply touches config.toml.
func (*Overlay) RefreshCatalog ¶ added in v1.7.19
RefreshCatalog updates only CCL-owned metadata in the existing file. It never rewrites config.toml, rotates independent credentials, or reconstructs native entries. The catalog path and overlay's restoration journal stay unchanged.