Documentation
¶
Overview ¶
Package server exposes the control plane over HTTP: sandbox lifecycle, governed tool calls, approvals, audit endpoints, a terminal WebSocket, and optionally the web dashboard. Every tool call goes through controlplane.Manager, so governance is always enforced.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TokenAuth ¶
TokenAuth wraps next with bearer-token authentication. When token is empty, authentication is disabled and next is returned unchanged. /healthz is always exempt so liveness probes work without credentials. The token may be presented as "Authorization: Bearer <token>", an "X-Runeward-Token" header, or a "token" query parameter only for terminal WebSocket compatibility.
Types ¶
type Server ¶
type Server struct {
// AuthToken, when non-empty, requires every request (except /healthz) to
// present it as a bearer token. Empty disables authentication. Ignored when
// Authz is set.
AuthToken string
// Authz, when set, enables multi-principal RBAC: each request's bearer token
// is resolved to a named principal with per-profile launch and approval
// permissions. Takes precedence over AuthToken.
Authz *authz.Store
// MCP, when set, is mounted at /mcp alongside the REST API.
MCP http.Handler
// contains filtered or unexported fields
}
Server is the control-plane HTTP surface.
func New ¶
New builds a Server over mgr. dashboard, when non-nil, is mounted at "/"; logger may be nil.
func (*Server) ListenAndServe ¶
ListenAndServe starts the control plane on addr.