Versions in this module Expand all Collapse all v0 v0.4.2 Oct 22, 2026 Changes in this version + type ControlClient struct + func (c *ControlClient) Get(ctx context.Context, path string) ([]byte, error) + func (c *ControlClient) Post(ctx context.Context, path string) ([]byte, error) type Daemon + func (d *Daemon) ControlClient() (*ControlClient, error) v0.4.1 Oct 19, 2026 v0.4.0 Sep 24, 2026 Changes in this version + var ErrSpawnCooldown = errors.New("daemon: spawn cooldown active after recent failure") + var ErrStopIntent = errors.New("daemon: held; use Release or Start to allow restarts") type Config + DisableTokenAuth bool + ShutdownTimeout time.Duration + SpawnCooldown time.Duration type Daemon + func (d *Daemon) Hold(ctx context.Context) error + func (d *Daemon) Release() type ProcessManager + Start func(ctx context.Context, spec StartSpec) (pid int, err error) + type StartSpec struct + Args []string + Binary string + Dir string + Env []string + ExtraFiles []*os.File + LogFile string v0.3.3 Sep 12, 2026 Changes in this version type Config + Dir string v0.3.2 Sep 12, 2026 v0.3.1 Sep 12, 2026 Changes in this version type Config + RequireToken bool type PIDInfo + Token string v0.3.0 Sep 12, 2026 Changes in this version type Config + Args []string + Binary string type Daemon + func (d *Daemon) EnsureRunning(ctx context.Context) (*Info, error) v0.2.0 Sep 12, 2026 Changes in this version + var ErrAlreadyRunning = errors.New("daemon: already running") + var ErrInvalidConfig = errors.New("daemon: invalid config") + var ErrNotRunning = errors.New("daemon: not running") + var ErrStalePIDFile = errors.New("daemon: stale pid file") + var ErrStartTimeout = errors.New("daemon: start timeout") + var ErrUnhealthy = errors.New("daemon: health check failed") type Config + func (c *Config) Validate() error + type ProxyOptions struct + LogPayloads bool + MCPPath string + Stdin io.Reader + Stdout io.Writer v0.1.1 Sep 12, 2026 v0.1.0 Sep 11, 2026 Changes in this version + func EnsureRunning(ctx context.Context, cfg Config, binary string, args []string) (int, error) + func Proxy(ctx context.Context, port int, mcpPath string) error + func Serve(ctx context.Context, cfg Config, handler http.Handler) error + type Config struct + DataDir string + HealthPath string + IdleTimeout time.Duration + Name string + Timeout time.Duration + type ConnTracker struct + func NewConnTracker() *ConnTracker + func (ct *ConnTracker) Active() int64 + func (ct *ConnTracker) Connect() + func (ct *ConnTracker) Disconnect() + type Daemon struct + func New(cfg Config) *Daemon + func NewWithDeps(cfg Config, pids PIDStore, procs ProcessManager, health HealthChecker) *Daemon + func (d *Daemon) IsRunning() bool + func (d *Daemon) Restart(ctx context.Context, binary string, args []string) error + func (d *Daemon) SetHandler(h http.Handler) + func (d *Daemon) Start(ctx context.Context, binary string, args []string) error + func (d *Daemon) Status() (*Info, error) + func (d *Daemon) Stop() error + type Group struct + func (g *Group) Add(execute func() error, interrupt func(error)) + func (g *Group) Run() error + type HealthChecker interface + Check func(port int, healthPath string) error + WaitUntilReady func(port int, healthPath string, timeout time.Duration) error + type Info struct + Name string + PID int + Port int + StartTime time.Time + Status Status + Uptime time.Duration + type PIDInfo struct + Binary string + Name string + PID int + Port int + StartTime time.Time + type PIDStore interface + Clear func() error + IsAlive func() bool + Load func() (PIDInfo, error) + Path func() string + Save func(pid, port int, name, binary string, startTime time.Time) error + type ProcessManager interface + IsProcessAlive func(pid int) bool + KillProcess func(pid int) error + StartDetached func(binary string, args []string, logFile string, env []string) (pid int, err error) + type Status int + const StatusError + const StatusRunning + const StatusStarting + const StatusStopped + const StatusStopping + func (s Status) String() string