Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServer ¶
func NewServer(opts ServerOptions) *http.Server
NewServer builds an HTTP server from options; kept for backward compatibility (prefer NewApp).
Types ¶
type App ¶
type App struct {
Server *http.Server
Hub *SSEHub
Store store.Store
Capabilities *capabilities.Registry // optional; loaded from env (e.g. SLACK_WEBHOOK_URL)
Home string // data directory; for team/agent dirs and charter
}
App holds the HTTP server, SSE hub, store, capabilities registry, and home path.
func NewApp ¶
func NewApp(opts ServerOptions) (*App, error)
NewApp creates the HTTP app (server, hub, store, capabilities) and registers all routes.
type SSEHub ¶
type SSEHub struct {
// contains filtered or unexported fields
}
func (*SSEHub) Handler ¶
func (h *SSEHub) Handler() http.HandlerFunc
func (*SSEHub) PublishJSON ¶
func (*SSEHub) Unsubscribe ¶
type ServerOptions ¶
type ServerOptions struct {
Home string
Addr string
Dev bool
APIKey string // if set, require X-API-Key header or query api_key
DBDriver string // "sqlite" (default) or "postgres"
DBURL string // for postgres: connection string (or set DATABASE_URL env)
MetricsHandler http.Handler // if set, used for /metrics (e.g. OTel Prometheus handler)
UseOtelHTTP bool // if true, wrap handler with otelhttp for request metrics
}
ServerOptions configures the HTTP server (home dir, listen addr, API key, DB, metrics).
Click to show internal directories.
Click to hide internal directories.