Documentation
¶
Overview ¶
Package daemon assembles the magus daemon HTTP server: it mounts the MCP Streamable-HTTP handler, the k8s health routes, and the browser Graph Explorer console onto one loopback listener, applying the shared bearer and DNS-rebind guards. It is the composition point that ties together internal/handler/mcp, internal/httpx, and internal/service/console so neither the handler/mcp package nor the root magus package has to.
The CLI injects a *Daemon into the root magus package via magus.SetDaemon; magus.ServeDaemon then delegates here. That indirection keeps magus free of an import cycle (daemon depends on magus, not vice versa).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Daemon ¶
type Daemon struct {
// contains filtered or unexported fields
}
Daemon assembles and runs the daemon HTTP server from a set of MCP server options. It satisfies magus.Daemon.
type Option ¶
type Option func(*Daemon)
Option customizes a Daemon.
func WithActivityWorkspaces ¶ added in v0.4.0
func WithActivityWorkspaces(fn func() []activityhandler.Workspace) Option
WithActivityWorkspaces supplies the daemon's live workspace set (the same per-workspace registry snapshot that feeds the proc Status RPC), so the activity view merges every loaded workspace's trail instead of only the bridge workspace's. Sharing one source keeps the activity view and the status view from disagreeing about which workspaces exist. When unset, the activity view still serves the bridge workspace's own trail.
func WithRuns ¶
WithRuns supplies the daemon's live-run source (the run registry's Snapshot). When set, the StatusService (GetStatus/StreamStatus) and the status SSE frame carry the per-target execution state of every adopted run alongside the pool - the same status surface, more live state.
func WithServices ¶
func WithServices(fn func() []types.StatusService) Option
WithServices supplies the daemon's hosted-services source (the service registry's Snapshot). When set, the StatusService and the status SSE frame carry the long-running shared services the daemon is keeping warm alongside the pool and runs.