Documentation
¶
Overview ¶
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 *pluginregistry.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
Protocols *service.ProtocolService
// ExtPlugins is the out-of-tree plugin manager; nil when none are configured.
ExtPlugins *extplugin.Manager
// Market is the plugin registry client; nil when the marketplace is disabled.
Market *pluginmarket.Service
// PluginsDir is the configured external-plugin directory, surfaced read-only
// to the admin UI; empty when external loading is disabled.
PluginsDir string
Users *service.UserService
TwoFactor *service.TwoFactorService
Invitations *service.InvitationService
Tunnels *transport.Registry
Leases livelease.LeaseRegistry
Instance livelease.InstanceRef
Recordings *service.RecordingService
Recording *recording.Engine
RecordingMaxChunk int64
// AI owns user providers and the env/config shared-AI provider.
AI *aiconfig.Service
// ModelRegistry resolves model context windows and live model lists.
ModelRegistry *modelreg.Registry
Audit audit.Sink
Metrics *telemetry.Metrics
Health *telemetry.Health
Logger *slog.Logger
// Version reports the running build and checks for a newer release.
Version *version.Checker
// StaticFS is the embedded web/dist; nil in dev mode.
StaticFS fs.FS
Dev bool
// AccessLog logs one structured line per API request.
AccessLog 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
¶
- access.go
- access_log.go
- activity.go
- admin.go
- admin_user_detail.go
- agent.go
- ai_chat.go
- ai_config.go
- ai_conversations.go
- auth.go
- catalog.go
- connection_folders.go
- connections.go
- credentials.go
- dispatch.go
- doc.go
- grants.go
- lease_proxy.go
- market.go
- middleware.go
- plugin_bridge.go
- protocols.go
- ratelimit.go
- recordings.go
- respond.go
- server.go
- spa.go
- stream_observe.go
- twofactor.go
- version.go
Click to show internal directories.
Click to hide internal directories.