Documentation
¶
Index ¶
- func AddHealthRoutes(mux *http.ServeMux)
- func AddVersionRoutes(mux *http.ServeMux, version, nodeInstanceID, tenancy string)
- func IsLoopbackAddress(addr string) bool
- func LoadConfig[T any](cfg *T) error
- func New(ctx context.Context, mux *http.ServeMux, nodeInstanceID, tenancy string, ...) (func() error, error)
- func ProtectMutatingAPI(token string, next http.Handler) http.Handler
- func ValidateLocalServeSecurity(addr, token string) error
- type Config
- type Dependencies
- type HealthResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHealthRoutes ¶
AddHealthRoutes registers GET /health for liveness checks.
func AddVersionRoutes ¶
AddVersionRoutes registers GET /version.
func IsLoopbackAddress ¶
func LoadConfig ¶
Types ¶
type Config ¶
type Config struct {
DatabaseURL string `json:"database_url"`
Port string `json:"port"`
Addr string `json:"addr"`
NATSURL string `json:"nats_url"`
NATSUser string `json:"nats_user"`
NATSPassword string `json:"nats_password"`
TokenizerServiceURL string `json:"tokenizer_service_url"`
Token string `json:"token"`
UIBaseURL string `json:"ui_base_url"`
ValkeyAddr string `json:"valkey_addr"`
ValkeyPassword string `json:"valkey_password"`
TerminalEnabled string `json:"terminal_enabled"`
TerminalAllowedRoot string `json:"terminal_allowed_root"`
TerminalShell string `json:"terminal_shell"`
TerminalIdleTimeout string `json:"terminal_idle_timeout"`
}
type Dependencies ¶
type Dependencies struct {
DB libdb.DBManager
PubSub libbus.Messenger
State *runtimestate.State
ToolsProviderService toolsproviderservice.Service
Auth middleware.AuthZReader
Agent agentservice.Agent
ChatManager *chatservice.Manager
Chains taskchainservice.Service
HITLService hitlservice.Service
TerminalService terminalservice.Service
TerminalEnabled bool
WorkspaceID string
ProjectRoot string
ContenoxDir string
DefaultChainRef string
DefaultModel string
DefaultProvider string
AltDefaultModel string
AltDefaultProvider string
DefaultThink string
}
type HealthResponse ¶
type HealthResponse struct {
Status string `json:"status"`
}
Click to show internal directories.
Click to hide internal directories.