Documentation
¶
Overview ¶
Package proxymanager owns a standalone Codex provider runtime and reversible Codex configuration overlay. Its control API only listens on loopback.
Legacy Claude settings recovery for journals written before the proxy became Codex-only. Fresh proxy sessions never apply or inspect Claude settings.
Index ¶
- func ShowMenuError(string)
- type Change
- type Manager
- func (m *Manager) Read() (*State, error)
- func (m *Manager) RecoverStale(ctx context.Context) (bool, error)
- func (m *Manager) Run(ctx context.Context, p provider.Provider, id string) (runErr error)
- func (m *Manager) RunMenuBar(context.Context, string) error
- func (m *Manager) Running(ctx context.Context, s *State) bool
- func (m *Manager) Start(ctx context.Context, executable string, p provider.Provider) (*State, error)
- func (m *Manager) Stop(ctx context.Context) error
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShowMenuError ¶ added in v1.7.17
func ShowMenuError(string)
Types ¶
type Change ¶
type Change struct {
Env bool `json:"env,omitempty"`
Key string `json:"key"`
Before json.RawMessage `json:"before,omitempty"`
Applied json.RawMessage `json:"applied"`
}
Changes keep only fields owned by this proxy. Restore compares the current value with Applied so user edits made while the proxy runs are retained.
type Manager ¶
type Manager struct {
AdditionalProviders []string
CatalogMode codex.CatalogMode
Refresh bool
Dir string
// CodexListenAddress pins replacements, including a failed menu switch rollback.
CodexListenAddress string
// Empty inherits the running daemon's mode, or uses shared on first start.
CodexMode string
}
func (*Manager) RecoverStale ¶
RecoverStale restores the settings overlay of a proxy that died without cleaning up (kill -9, power loss), including legacy Claude overlays. It never waits: a start or stop in progress owns the command lock and recovers on its own, and a held daemon lock means the proxy is alive. Reports whether it restored anything.
func (*Manager) Run ¶
Run owns the entire runtime lifetime. The caller cancels ctx for signals; the authenticated local stop endpoint uses the same cleanup path.
func (*Manager) RunMenuBar ¶ added in v1.7.17
type State ¶
type State struct {
AdditionalProviders []string `json:"additional_providers,omitempty"`
CatalogMode codex.CatalogMode `json:"catalog_mode,omitempty"`
ProxyVersion int `json:"proxy_version,omitempty"`
ID string `json:"id"`
Provider string `json:"provider"`
PID int `json:"pid"`
BaseURL string `json:"base_url"`
ControlURL string `json:"control_url"`
ControlToken string `json:"control_token"`
// Legacy Claude overlay fields are read only to restore pre-Codex-only daemons.
SettingsPath string `json:"settings_path,omitempty"`
StartedAt time.Time `json:"started_at"`
ConfigHash string `json:"config_hash"`
MetadataStamp string `json:"metadata_stamp,omitempty"`
CodexMode string `json:"codex_mode,omitempty"`
EnvBefore json.RawMessage `json:"env_before,omitempty"`
Changes []Change `json:"changes,omitempty"`
CodexHome string `json:"codex_home,omitempty"`
Codex *codex.Overlay `json:"codex,omitempty"`
}
func (*State) CatalogCapabilities ¶ added in v1.7.20
func (s *State) CatalogCapabilities() codex.CatalogCapabilities
CatalogCapabilities describes the client guarantees of the selected source. Shared mode remains local even when inspecting a malformed/stale journal.