Documentation
¶
Overview ¶
Package server provides the HTTP and WebSocket layer.
Package server is the HTTP/WS adapter for APIs, plugin routes, and the UI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deps ¶
type Deps struct {
Plugins *plugin.Registry
Store *store.Store
Sessions *session.Manager
Auth auth.Authenticator
SessionMgr *auth.SessionManager
Tickets *auth.TicketStore
// ArtifactTickets guards public install-artifact fetches.
ArtifactTickets *auth.TicketStore
Policy *policy.Enforcer
Connector *service.Connector
Connections *service.ConnectionService
Credentials *service.CredentialService
Enrollments *service.EnrollmentService
Users *service.UserService
TwoFactor *service.TwoFactorService
Invitations *service.InvitationService
Tunnels *transport.Registry
Recordings *service.RecordingService
Recording *recording.Engine
RecordingMaxChunk int64
AI *aiconfig.Service
// AIGlobal is the env/config shared-AI provider.
AIGlobal config.AIConfig
// ModelRegistry resolves model context windows and live model lists.
ModelRegistry *modelreg.Registry
Audit audit.Sink
Metrics *telemetry.Metrics
Health *telemetry.Health
Logger *slog.Logger
// StaticFS is the embedded web/dist; nil in dev mode.
StaticFS fs.FS
Dev bool
// AllowedOrigins are extra WS origins beyond same-site (usually empty).
AllowedOrigins []string
}
Deps are the server's injected dependencies (wired once in cmd/server).
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server wires the dependencies into a chi router.
func (*Server) InvokeRoute ¶
func (s *Server) InvokeRoute(ctx context.Context, user models.User, connID, routeID string, params map[string]string, body []byte) (any, error)
InvokeRoute runs one non-streaming plugin route as the given user through the same authorization, validation, and audit path as HTTP dispatch.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.