Versions in this module Expand all Collapse all v0 v0.17.1 Nov 24, 2026 v0.17.0 Nov 18, 2026 Changes in this version + const LiveWorkBound + const MinWakeLead + const RulesetDeadline + var ErrChecklistNoteForeign = errors.New(...) + func JudgeChecklist(v Verdict, b Behind, in StopInput, st SessionState, away bool) (out Verdict, present SessionState, save bool) + func ManagedContext(ctx context.Context, root string) bool + func TakeChecklistNote(ctx context.Context, copyRoot, sessionID string) (string, error) + type Behind struct + Moved []string + Unlisted []string + func CheckBehind(owned []OwnedRef, res checklist.Result) Behind + func (b Behind) Empty() bool + func (b Behind) Fingerprint() string + func (b Behind) Note() string type BranchChange + Session string type CreatedBranch + Session string + type LiveWork struct + Since time.Time + What string type Options + SessionID string type Owed + Owned []OwnedRef + func (o Owed) CappedAllLive() bool type OwedItem + Live *LiveWork + type OwnedRef struct + Aliases []string + Changed time.Time + Ref string type ReadOptions + LiveSessions func() ([]occupancy.Session, error) + ProcTable func(ctx context.Context) (machineload.Snapshot, error) + RulesetDeadline time.Duration + SessionID string type SessionState + ChecklistBlocked string + ChecklistNote string + ChecklistNoted string + WaitingSince time.Time type Store + func ResolveCopyContext(ctx context.Context, cwd, sessionID string, o Options) (string, Store, error) v0.16.2 Nov 6, 2026 v0.16.1 Nov 4, 2026 v0.16.0 Oct 31, 2026 Changes in this version + const DefaultBlockCap + const ForgeDeadline + const IdleCeiling + const LockFile + const LockTimeout + const MaxCreatedBranches + const MaxFileBytes + const MaxLateness + const MaxSessionNotes + const MaxStepLen + const MaxWakesUnchanged + const MaxWindow + const OwedCeiling + const RecordFile + const SchemaVersion + const SessionNoteTTL + const SessionsDir + const SessionsFile + const StaleWindow + const StateStopped + const StateWaiting + const StateWorking + const StoreDir + const StoreName + var ErrCron = errors.New("autonomy: not a five-field cron expression abcd reads") + var ErrLockBusy = errors.New("autonomy: away store lock busy") + var ErrNoHome = errors.New("autonomy: no home directory for the away store") + var ErrNoLocalTier = mode.ErrNoLocalTier + var ErrNoRootCommit = errors.New("autonomy: the repository has no root commit to key the away store on") + var ErrNotAway = errors.New("autonomy: the person is not away") + var ErrQueueFull = errors.New("autonomy: the queue is full") + var ErrRecordFull = errors.New("autonomy: the away record would pass 64 KiB") + var ErrSessionID = errors.New("autonomy: the session id is not [A-Za-z0-9_-]{1,128}") + var ErrStepEmpty = errors.New("autonomy: the step is empty") + var ErrStepTooLong = errors.New("autonomy: the step is too long") + var ErrUnsafe = errors.New("autonomy: away store file refused") + var ErrUntilBeyondCap = errors.New("autonomy: --until is past the seven-day cap") + var ErrUntilPast = errors.New("autonomy: --until is already past") + var ErrUntilUnreadable = errors.New("autonomy: --until is not a time") + func Managed(root string) bool + func QuestionRoute() string + func RecordCreated(copyRoot, runDir string, changes []BranchChange, o Options) error + func SaveSession(copyRoot, sessionID string, st SessionState) error + func ValidSessionID(id string) bool + type BackResult struct + Lines []string + Notes []string + Record *Record + State string + func Back(cwd string, o Options) (BackResult, error) + type BackgroundTask struct + Command string + Description string + ID string + Status string + Type string + type BranchChange struct + From string + Kind BranchChangeKind + Name string + type BranchChangeKind string + const BranchCheckedOut + const BranchCreated + const BranchMoved + type Closing struct + At time.Time + By string + From string + type CreatedBranch struct + At time.Time + Name string + type Cron struct + func (c Cron) Next(from, until time.Time, loc *time.Location) (time.Time, bool) + type Forge func(ctx context.Context, dir string, args ...string) (string, error) + type HandBack struct + At time.Time + Branch string + Head string + type Options struct + Home string + Now func() time.Time + Who func(root string) string + type Owed struct + HandedBack []OwedItem + Incomplete bool + Items []OwedItem + NextRenewal time.Time + Notes []string + WakeBy time.Time + func ReadOwed(ctx context.Context, o ReadOptions) (Owed, error) + func (o Owed) CappedFingerprint() string + func (o Owed) Empty() bool + func (o Owed) Fingerprint() string + func (o Owed) HasCapped() bool + func (o Owed) Next() (OwedItem, bool) + type OwedItem struct + Branch string + Capped bool + Head string + Kind OwedKind + PR int + Reason string + Record string + type OwedKind string + const OwedBehind + const OwedFailing + const OwedRenewal + const OwedStacked + const OwedUncarried + const OwedUnpushed + type QueuedStep struct + At time.Time + From string + Step string + type ReadOptions struct + Email string + Forge Forge + ForgeDeadline time.Duration + Home string + Now func() time.Time + Person string + Record *Record + Reservations func(root string, now time.Time) (claim.Snapshot, error) + Root string + type Record struct + Closed *Closing + DroppedHandBacks int + DroppedSteps int + DroppedStops int + HandedBack []HandBack + HoldPushes bool + OpenEnded bool + Queue []QueuedStep + SchemaVersion int + SetBy string + SetFrom string + Start time.Time + Stops []Stop + Until time.Time + func AwayAt(root string, o Options) (*Record, bool, error) + func QueueStep(cwd, step string, o Options) (*Record, error) + func SetAway(cwd, until string, holdPushes bool, o Options) (*Record, error) + func (r *Record) AddHandBack(branch, head string, now time.Time) bool + func (r *Record) AddStep(step, from string, now time.Time) error + func (r *Record) AddStop(s Stop, now time.Time) + func (r *Record) Close(who Who, now time.Time) + func (r *Record) Ends() time.Time + func (r *Record) Fit() + func (r *Record) Holds(now time.Time) bool + func (r *Record) Lapsed(now time.Time) bool + func (r *Record) LapsedLine() string + func (r *Record) Lines() []string + func (r *Record) PersonLine() string + func (r *Record) Terms() []string + type SessionCron struct + ID string + Prompt string + Recurring bool + Schedule string + type SessionNote struct + At time.Time + Copy string + ID string + type SessionState struct + Blocks int + Fingerprint string + NextLook time.Time + QuestionHash string + SchemaVersion int + State string + WakeFingerprint string + Wakes int + func LoadSession(copyRoot, sessionID string) (SessionState, error) + type Stop struct + Count int + Detail string + ErrorType string + First time.Time + Kind StopKind + Last time.Time + PossiblyForcedByCap bool + type StopInput struct + BackgroundTasks []BackgroundTask + Cap int + LastAssistantMessage string + Location *time.Location + SessionCrons []SessionCron + SessionID string + StopHookActive bool + type StopKind string + const StopAPIError + const StopCheckIncomplete + const StopNoNextLook + const StopWorkOwed + type Store struct + func Resolve(cwd string, o Options) (root string, st Store, err error) + func ResolveCopy(cwd, sessionID string, o Options) (string, Store, error) + func StoreAt(home, rootSHA string) (Store, error) + func (s Store) Away(now time.Time) (*Record, bool, error) + func (s Store) CreatedBranches(copyKey string) ([]CreatedBranch, error) + func (s Store) Dir() string + func (s Store) Display(name string) string + func (s Store) LockPath() string + func (s Store) NoteSessionCopy(sessionID, copy string, now time.Time) (bool, error) + func (s Store) Read() (*Record, error) + func (s Store) ReadFile(name string) ([]byte, error) + func (s Store) RecordBranches(copyKey string, changes []BranchChange, now time.Time) error + func (s Store) RecordHandBack(branch, head string, now time.Time) (bool, error) + func (s Store) RecordPath() string + func (s Store) RecordStop(st Stop, now time.Time) (bool, error) + func (s Store) Rel() string + func (s Store) RootSHA() string + func (s Store) SessionCopy(sessionID string) (string, bool) + func (s Store) Update(fn func(cur *Record) (*Record, error)) (*Record, error) + func (s Store) WithLock(fn func() error) error + func (s Store) WriteFile(name string, data []byte) error + type Verdict struct + Block bool + HandBacks []OwedItem + Reason string + Row int + Save bool + State SessionState + Stop *Stop + SystemMessage string + func Judge(rec *Record, owed Owed, in StopInput, st SessionState, now time.Time) Verdict + type Who struct + Copy string + Name string