Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(logger *zap.SugaredLogger) http.Handler
NewHandler creates a new HTTP handler for serving the embedded web UI
func NewHandlerWithIndexCallback ¶ added in v0.47.0
func NewHandlerWithIndexCallback(logger *zap.SugaredLogger, onIndexServe func()) http.Handler
NewHandlerWithIndexCallback is NewHandler with an optional hook fired each time the UI entrypoint (index document) is served — i.e. a request for the root, index.html, or an extensionless SPA route that resolves to the index body. Asset requests never fire it, including missing assets that fall back to the index body (stale hashed bundles after an upgrade). Spec 080 FR-006 wires this to the persistent web_ui_opened telemetry counter; it is deliberately independent of the X-MCPProxy-Client-header-based surface_requests.webui counting. onIndexServe may be nil.
func NewHandlerWithOptions ¶ added in v0.70.0
func NewHandlerWithOptions(logger *zap.SugaredLogger, options HandlerOptions) http.Handler
NewHandlerWithOptions serves the embedded UI with an explicit bootstrap configuration. Existing constructors remain available for callers that do not need to customize the served index document.
Types ¶
type HandlerOptions ¶ added in v0.70.0
type HandlerOptions struct {
ServerEditionEnabled bool
OnIndexServe func()
}
HandlerOptions describes the edition-neutral, non-secret UI bootstrap data. ServerEditionEnabled is a routing hint for the SPA only; authorization remains exclusively in the HTTP and MCP middleware.