Documentation
¶
Overview ¶
Package daemon admin listener (Phase 10 OBS-03/04/05).
This file implements the dedicated loopback admin surface: /healthz, /readyz, and conditionally /debug/pprof/*. The listener is a non-fatal errgroup goroutine in daemon.Run — bind failure is logged and the daemon continues.
Index ¶
- type Daemon
- func (d *Daemon) KernelInstance() *kernel.Kernel
- func (d *Daemon) MCPServer() *helixMCP.SerenaMCPServer
- func (d *Daemon) ObsProvider() *obs.Provider
- func (d *Daemon) Run(ctx context.Context) error
- func (d *Daemon) SemanticStore() *semanticstore.Store
- func (d *Daemon) Workspaces() *workspace.Registry
- type SkillToolExecutor
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 is the persistent supervisor process (DMN-01). It manages workspace registry, MCP server, kernel, skills, listeners, and survives client disconnects (DMN-02).
func New ¶
New creates a new Daemon with the given config and logger. Fail-fast for core subsystems per D-06; degrade gracefully for optional ones per D-07.
func NewWithObsProvider ¶
func NewWithObsProvider(cfg *config.SerenaConfig, logger *slog.Logger, provider *obs.Provider) (*Daemon, error)
NewWithObsProvider creates a Daemon with a pre-built obs.Provider. Intended for tests that need to inject a tracetest-backed provider for span assertions.
func (*Daemon) KernelInstance ¶
KernelInstance returns the kernel for lifecycle management in tests.
func (*Daemon) MCPServer ¶
func (d *Daemon) MCPServer() *helixMCP.SerenaMCPServer
MCPServer returns the MCP server for test wiring (e.g., HTTPHandler, SDK().Connect).
func (*Daemon) ObsProvider ¶
ObsProvider returns the observability provider for test assertions (e.g., ShutdownTracing flush verification in trace_shutdown_test.go).
func (*Daemon) Run ¶
Run starts the daemon and blocks until shutdown (DMN-01, DMN-12). Signal handlers are registered FIRST per Pitfall 3.
func (*Daemon) SemanticStore ¶
func (d *Daemon) SemanticStore() *semanticstore.Store
SemanticStore returns the semantic fact store, or nil when cfg.SemanticIndex.Enabled is false. Downstream consumers (Phase 64+ MCP tools) MUST nil-check.
func (*Daemon) Workspaces ¶
Workspaces returns the workspace registry (for use by MCP tools).