daemon

package
v1.10.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2026 License: MIT Imports: 50 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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

func New(cfg *config.SerenaConfig, logger *slog.Logger) (*Daemon, error)

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

func (d *Daemon) KernelInstance() *kernel.Kernel

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

func (d *Daemon) ObsProvider() *obs.Provider

ObsProvider returns the observability provider for test assertions (e.g., ShutdownTracing flush verification in trace_shutdown_test.go).

func (*Daemon) Run

func (d *Daemon) Run(ctx context.Context) error

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

func (d *Daemon) Workspaces() *workspace.Registry

Workspaces returns the workspace registry (for use by MCP tools).

type SkillToolExecutor

type SkillToolExecutor interface {
	ExecuteTool(name string, args map[string]interface{}) (string, error)
}

SkillToolExecutor is implemented by skills that support direct tool execution (memory, workflow). Kernel skill adapters skip this and register via RegisterTools.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL