daemon

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CheckInterval      time.Duration
	TokenThreshold     time.Duration
	NotificationsOn    bool
	AttentionThreshold time.Duration
	NotifyOn           []string
	QuietHoursStart    string
	QuietHoursEnd      string
	ContainerPrefix    string
}

Config holds daemon configuration

type ContainerState

type ContainerState struct {
	Name                   string
	AttentionStarted       *time.Time
	LastNotified           *time.Time
	LastActivity           time.Time
	LastTokenCheck         time.Time
	NotificationSent       bool
	LastTaskCheck          time.Time
	HadOpenTasks           bool   // Whether container had incomplete tasks last check
	LastTaskProgress       string // Last seen task progress (e.g., "2/5")
	TaskCompletionNotified bool   // Whether we've notified about task completion
}

ContainerState tracks container monitoring state

type Credentials

type Credentials struct {
	ClaudeAiOauth struct {
		AccessToken      string   `json:"accessToken"`
		RefreshToken     string   `json:"refreshToken"`
		ExpiresAt        int64    `json:"expiresAt"`
		Scopes           []string `json:"scopes"`
		SubscriptionType string   `json:"subscriptionType"`
	} `json:"claudeAiOauth"`
}

Credentials represents OAuth credentials

type Daemon

type Daemon struct {
	// contains filtered or unexported fields
}

Daemon manages background monitoring and auto-refresh

func New

func New(config Config, mclDir string, iconData []byte) (*Daemon, error)

New creates a new daemon instance

func (*Daemon) Start

func (d *Daemon) Start() error

Start begins the daemon monitoring loop

func (*Daemon) Stop

func (d *Daemon) Stop()

Stop signals the daemon to stop

Jump to

Keyboard shortcuts

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