package protocol const GetStatus = "get_status" const Status = "status" type NetworkAddress struct { Interface string `json:"interface"` IP string `json:"ip"` } type ServiceStatus struct { Health string `json:"health"` URL string `json:"url,omitempty"` Port string `json:"port,omitempty"` Candidates []string `json:"candidate_urls,omitempty"` } type SystemStatus struct { Hostname string `json:"hostname"` StartedAt string `json:"started_at"` Uptime string `json:"uptime"` Addresses []NetworkAddress `json:"addresses"` Server ServiceStatus `json:"server"` Ntfy ServiceStatus `json:"ntfy"` // OpenCode reports how brokered chat is attached to OpenCode. Health is // "endpoint" when attached to the operator's configured endpoint, // "fallback" when that endpoint could not be attached and chat fell back to // the server's own instance, "spawned" when no endpoint is configured, and // "unavailable" when chat is disabled. URL is the configured endpoint, if // any. It never carries a credential. OpenCode ServiceStatus `json:"opencode"` Topic string `json:"topic,omitempty"` NtfyUser string `json:"ntfy_user,omitempty"` Note string `json:"note"` }