Versions in this module Expand all Collapse all v0 v0.7.1 Jun 24, 2026 Changes in this version + const AutoDisableThreshold + const KindManual + const KindScheduled + const ScheduledRunCeiling + const SourceAgent + const SourceManual + const StatusError + const StatusInterrupted + const StatusRunning + const StatusSkipped + const StatusSuccess + var ErrNotFound = errors.New("automation not found") + func Badge(t Trigger) string + func ComputeNextRun(after time.Time, t Trigger) (time.Time, bool) + func ExecuteRun(ctx context.Context, store *Store, runner Runner, a *Automation, kind string) (string, error) + func HumanSchedule(t Trigger) string + func IsLocalPath(p string) bool + func SlotKey(t time.Time) string + func ValidateAutomation(a *Automation) error + type Automation struct + CreatedAt string + Enabled bool + ID string + Mode string + Model string + Name string + ProjectPath string + Prompt string + Provider string + RunInCloud bool + Source string + Trigger Trigger + UpdatedAt string + type Cadence string + const CadenceDaily + const CadenceHourly + const CadenceWeekly + type RunState struct + ConsecutiveFails int + LastError string + LastFiredSlot string + LastRunAt string + LastSessionID string + LastStatus string + NextRunAt string + type Runner interface + StartRun func(ctx context.Context, a *Automation, kind string) (sessionID string, err error) + type Scheduler struct + func NewScheduler(store *Store, runner Runner) *Scheduler + func (s *Scheduler) Run(ctx context.Context) + func (s *Scheduler) SetInterval(d time.Duration) + func (s *Scheduler) SetSkipNotifier(fn SkipNotifier) + type SkipNotifier func(a *Automation, reason string) + type Store struct + func NewStore() (*Store, error) + func NewStoreDir(dir string) (*Store, error) + func (s *Store) Create(a Automation) (*Automation, error) + func (s *Store) Delete(id string) error + func (s *Store) Get(id string) *Automation + func (s *Store) List() []*Automation + func (s *Store) SetEnabled(id string, enabled bool) (*Automation, error) + func (s *Store) State(id string) RunState + func (s *Store) TryMarkRunning(id string) (bool, error) + func (s *Store) Update(id string, mutate func(*Automation)) (*Automation, error) + func (s *Store) UpdateState(id string, mutate func(*RunState)) error + func (s *Store) UpdateStateAndMaybeDisable(id string, mutate func(*RunState)) (bool, error) + type Template struct + Badge string + Description string + ID string + Name string + Prompt string + SuggestMode string + Trigger Trigger + func BuiltinTemplates() []Template + type Trigger struct + Cadence Cadence + Hour int + Minute int + Type TriggerType + Weekday int + type TriggerType string + const TriggerManual + const TriggerSchedule