Versions in this module Expand all Collapse all v0 v0.3.0 May 26, 2026 v0.2.1 May 26, 2026 Changes in this version + type Engine struct + func New(sess *engine.Session) *Engine + func (e *Engine) Cancel() + func (e *Engine) Events() <-chan *Event + func (e *Engine) Replay() []*Event + func (e *Engine) Session() *engine.Session + func (e *Engine) Start(ctx context.Context) + func (e *Engine) Stop() + func (e *Engine) Submit(message string) *Submission + type Event struct + Content string + ID string + SessionID string + Timestamp time.Time + ToolID string + ToolName string + Type EventType + Usage *Usage + type EventQueue struct + func NewEventQueue(maxSize int) *EventQueue + func (eq *EventQueue) Push(evt *Event) + func (eq *EventQueue) Replay() []*Event + func (eq *EventQueue) Subscribe() <-chan *Event + type EventType string + const EventDone + const EventError + const EventThinking + const EventToken + const EventToolCall + const EventToolResult + const EventUsage + type OpType string + const OpCancel + const OpInterrupt + const OpResume + const OpUserTurn + type Submission struct + ID string + Op OpType + Payload string + ReplyTo chan<- *Event + Timestamp time.Time + type SubmissionQueue struct + func NewSubmissionQueue() *SubmissionQueue + func (sq *SubmissionQueue) Len() int + func (sq *SubmissionQueue) Next() *Submission + func (sq *SubmissionQueue) Submit(s *Submission) + type Usage struct + CompletionTokens int + PromptTokens int + TotalTokens int