Versions in this module Expand all Collapse all v1 v1.0.3 Aug 10, 2026 v1.0.1 Aug 8, 2026 v1.0.0 Aug 8, 2026 Changes in this version + const DecisionDisable + const DecisionEnable + const DecisionNone + const DecisionReleaseOwnership + const DecisionStale + const FatalDependencyMissing + const FatalListFailed + const FatalLockFailed + const FatalLockHeld + const FatalLockReleaseFailed + const FatalStateLoadFailed + const OutcomeApplied + const OutcomeFailed + const OutcomeSkipped + const OutcomeStale + const OutcomeSuggested + const ReasonAccountMissing + const ReasonAlreadyDisabled + const ReasonAssessmentUnknown + const ReasonConfirmedExhausted + const ReasonDisabledUnknown + const ReasonFingerprintChanged + const ReasonHealthy + const ReasonManualEnable + const ReasonMissingAccountID + const ReasonNotExhausted + const ReasonNotHealthy + const ReasonNotOwned + const ReasonPendingAmbiguous + const ReasonPendingNotApplied + const ReasonProbeFailed + const ReasonResetMissing + const ReasonResetNotReached + const ReasonRuntimeOnly + const ReasonStateWriteFailed + const ReasonUnstableAuthIndex + const ReasonVerificationFailed + const ReasonWriteFailed + const StateConfirmedExhausted + const StateHealthy + const StatePendingDisable + const StateUnknown + const StoreVersion + var ErrLockHeld = errors.New("guard lock is already held") + type Account struct + AuthIndex string + ChatGPTAccountID string + Disabled bool + DisabledKnown bool + ID string + Name string + Provider string + RuntimeOnly bool + Unavailable bool + UpdatedAt string + type Assessment struct + Reason string + ResetAt *time.Time + State string + UsedPercent *float64 + type Backend interface + List func(context.Context) ([]Account, error) + ProbeCodex func(context.Context, Account) (Assessment, error) + SetDisabled func(context.Context, Account, bool) error + type Decision struct + AuthIndex string + Decision string + Identity string + Name string + Outcome string + Provider string + Reason string + ResetAt string + State string + UsedPercent *float64 + type FileLock struct + Now func() time.Time + Path string + func NewFileLock(path string) *FileLock + func (l *FileLock) Acquire(ctx context.Context) (Lease, error) + func (l *FileLock) Clear() error + type Lease interface + Release func() error + type Lock interface + Acquire func(context.Context) (Lease, error) + type Record struct + AuthIndex string + DisabledAt *time.Time + DisabledByTool bool + Fingerprint string + Identity string + LastProbe *time.Time + LastState string + Name string + Provider string + ResetAt *time.Time + type Result struct + Decisions []Decision + Fatal bool + FatalError string + Locked bool + OK bool + PartialFailure bool + Summary Summary + func (r Result) HasFailures() bool + func (r Result) IsFatal() bool + type Runner struct + Backend Backend + Lock Lock + Now func() time.Time + Store *Store + func NewRunner(backend Backend, store *Store, lock Lock) *Runner + func (r *Runner) RunOnce(ctx context.Context, apply bool) (result Result) + type Store struct + func NewStore(path string) *Store + func (s *Store) Records() ([]Record, error) + type Summary struct + Applied int + Failed int + Skipped int + Stale int + Suggested int + Total int