daemon

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 14 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 runs the Blitz service: every workspace a client opens, served over the per-user socket, and the workers' schedules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, o Options) error

Run serves until ctx is done, then lets turns in progress finish for a few seconds and removes the socket. A service already answering on the socket is an error wrapping socket.ErrRunning.

Types

type Options

type Options struct {
	// Socket is where it listens (socket.DefaultSocket when empty).
	Socket string
	// Config is the configuration file ("" for the usual search).
	Config string
	// Version is reported in the diagnostic log and telemetry.
	Version string
	// IdleExit stops the service after this long with nothing to do (no
	// request, turn or background run); 0 never. For a service a client
	// started on demand, not the login item's.
	IdleExit time.Duration
	// ExitWith stops the service when it reads to its end: the stdin of
	// a private service, a pipe from the client that started it, which
	// closes when that client exits, however it exits. Nil: never.
	ExitWith io.Reader
	// Run are one client's settings for every workspace a private service
	// opens (the CLI's flags for that run).
	Run RunOverrides
	// Private marks a service a client started for a run of its own: it
	// serves that client only, and never runs the workers' schedules (the
	// shared service does; a private one would run them twice, and open
	// every workspace with an enabled worker, keeping it from the others).
	Private bool
	// AdoptPath gives the service the user's login shell's PATH at start:
	// blitzd's, started by the tray, launchd or systemd with the system's
	// bare one (spec_service_021 SVC-57). A private service has its
	// terminal's already, and tests' services keep theirs.
	AdoptPath bool
}

Options are how the service runs.

type RunOverrides added in v0.3.1

type RunOverrides struct {
	Model, Agent, Agency string
	// PluginDirs load more plugins; AddDirs are more read-write roots
	// (as sandbox.allowed_paths).
	PluginDirs, AddDirs []string
	// SessionDir keeps sessions elsewhere (--no-session-persistence: a
	// folder the CLI removes).
	SessionDir string
	// TrustProject trusts the project's settings for this run.
	TrustProject bool
	// AppendSystemPrompt is added to the agent's instructions.
	AppendSystemPrompt string
}

RunOverrides are a run's settings over the configuration: what the CLI's flags set, for the private service it starts for that run.

Jump to

Keyboard shortcuts

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