Versions in this module Expand all Collapse all v0 v0.14.0 Nov 8, 2026 Changes in this version + const MaxItems + const MaxTextBytes + const NoteMacInUse + const NoteWorking + const QueuePaused + const QueueRunning + const ReasonAutomationDenied + const ReasonBoxHasUnsent + const ReasonBoxNotEmpty + const ReasonClearBox + const ReasonClosed + const ReasonDisabled + const ReasonInBox + const ReasonInTerminal + const ReasonMaybeSent + const ReasonNoAnswer + const ReasonNoDriver + const ReasonNoHistory + const ReasonNotAllowed + const ReasonNotClaude + const ReasonNotRunning + const ReasonReadFailed + const ReasonSendFailed + const ReasonTurnFailed + const ReasonUnsentUnconfirmed + const ReasonUsedOnMac + const StateAnswering + const StateDone + const StateSending + const StateWaiting + var ErrBadText = errors.New(...) + var ErrBusy = errors.New("chatqueue: another message is being typed into this session") + var ErrFull = errors.New("chatqueue: the queue holds the most items it can") + var ErrInTerminal = errors.New("chatqueue: the session is open in a terminal") + var ErrItemSending = errors.New("chatqueue: the item is being sent") + var ErrNotFound = errors.New("chatqueue: no such item in this session's queue") + var ErrNotFree = errors.New("chatqueue: the session cannot take a turn yet") + var ErrNotRunning = errors.New("chatqueue: the session is not running") + var ErrWrongState = errors.New("chatqueue: the item is not in the state this step needs") + func SamePrompt(saved, text string) bool + type ACP interface + Busy func(session string) bool + Start func(session, text, key string) (turn string, err error) + TurnEnded func(session, turn string) (ended, failed bool) + type Auditor interface + Write func(devicelogin.AuditEntry) + type Config struct + ACP ACP + After func(d time.Duration) <-chan time.Time + Audit Auditor + NoteChanged func(session string) + Now func() time.Time + Store *Store + Terminal Terminal + TerminalEnabled bool + Typed func(session string) + type Dispatcher struct + func New(cfg Config) *Dispatcher + func (d *Dispatcher) Kick() + func (d *Dispatcher) Note(session string) string + func (d *Dispatcher) NoteSentNow(session, text string, at time.Time) (forget func()) + func (d *Dispatcher) Run(ctx context.Context) + type Item struct + Created time.Time + ID string + Key string + State string + Text string + type Queue struct + Items []Item + Reason string + State string + type Store struct + func Open(path string, now func() time.Time, allowSlash bool) (*Store, error) + func (s *Store) Add(session, text, key string) (Item, error) + func (s *Store) BindTerminal(session string) error + func (s *Store) Changes() <-chan string + func (s *Store) ClaimNow(session, item string) (Item, error) + func (s *Store) Close() + func (s *Store) Delete(session, item string) error + func (s *Store) Done(session, item string) error + func (s *Store) DoneNow(session, item string) error + func (s *Store) Edit(session, item, text string) error + func (s *Store) Get(session string) Queue + func (s *Store) MarkAnswering(session, item string) error + func (s *Store) MarkSending(session, item string) (Item, error) + func (s *Store) Move(session, item string, position int) error + func (s *Store) Next(session string) (Item, bool) + func (s *Store) Pause(session, reason string) error + func (s *Store) Release(session, item string) error + func (s *Store) ReleaseNow(session, item string) + func (s *Store) Resume(session string) error + func (s *Store) Sessions() []string + func (s *Store) Terminal(session string) bool + func (s *Store) Typing(session string) bool + type Terminal interface + LeftInBox func(session string) bool + Open func(session string) (registryStatus string, ok bool) + Send func(ctx context.Context, session, text, key string) error + Status func(ctx context.Context, session, registryStatus string) terminput.Status + Submit func(ctx context.Context, session, text string) error + Turns func(ctx context.Context, session string) ([]Turn, error) + type Turn struct + Time time.Time + User string