Documentation
¶
Overview ¶
Package httpapi provides the HTTP surface of vellum: health endpoint, the /mcp mount, and later the JSON REST API for the SPA (/api/*).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶ added in v0.2.0
type API struct {
Vault *vault.Vault
Index *vault.Index
Searcher vault.Searcher
Structure vault.Structure
// Activity records sessions and events for the Connections/Activity
// panels. Endpoint is the public MCP URL shown in those panels; Curator
// reflects whether the curator tools are enabled. All optional.
Activity *activity.Recorder
Endpoint string
Curator bool
}
API is the JSON REST surface for the SPA, mirroring vault operations.
type Options ¶ added in v0.1.0
type Options struct {
// MCPHandler, when set, is mounted at /mcp behind the origin check.
MCPHandler http.Handler
// API, when set, mounts the JSON REST surface under /api/*.
API *API
// SPA, when set, serves static files with an index.html fallback for
// anything that is not /api/*, /mcp or an OAuth route (PHY-116 supplies
// the embedded dist).
SPA fs.FS
// AllowedOrigins are the browser origins allowed to call /mcp and
// /api. Same-origin requests and requests without an Origin header
// (CLI clients) always pass.
AllowedOrigins []string
// Auth, when set, mounts the OAuth endpoints and guards /mcp + /api
// with bearer verification. Nil = auth disabled, everything open.
Auth *auth.Provider
// CORSOrigins get CORS response headers (browser clients).
CORSOrigins []string
// Activity, when set, records MCP sessions and tool calls hitting /mcp.
Activity *activity.Recorder
}
Options configure the router.