Versions in this module Expand all Collapse all v0 v0.2.4 Oct 25, 2026 Changes in this version + type Deps struct + Audit *audit.Recorder + Caller ModelCaller + Compactor HistoryCompactor + Emitter *emitter.Emitter + Finish *Finisher + Inbox Inbox + Logger *slog.Logger + MaxReopens int + Model model.ToolCallingChatModel + Reviewer Reviewer + State *state.Run + Stop StopPolicy + StopInstructions string + Tools ToolDispatcher + TotalTimeout time.Duration + Transcript *transcript.Logger + type Engine struct + func New(d Deps) *Engine + func (e *Engine) ConfigChanged() + func (e *Engine) Injected(message string) + func (e *Engine) Run(ctx context.Context) + func (e *Engine) Seed(messages []*schema.Message) []*schema.Message + type Finisher struct + func NewFinisher(st *state.Run, em *emitter.Emitter, logger *slog.Logger) *Finisher + func (f *Finisher) Close() + func (f *Finisher) Done(reason event.DoneReason, finalContent string) + func (f *Finisher) EndAwaitingHuman(awaiting event.AwaitingInputData) + func (f *Finisher) EndStopped() + func (f *Finisher) Fail(msg string) + func (f *Finisher) Wait() + type HistoryCompactor interface + Compact func(msgs []*schema.Message) []*schema.Message + type Inbox interface + Drain func(n control.Notifier) bool + StopRequested func() bool + type ModelCaller interface + Call func(ctx context.Context, m model.ToolCallingChatModel, msgs []*schema.Message, ...) (*schema.Message, error) + type Reviewer interface + AfterIteration func(ctx context.Context, task, iteration []*schema.Message) (reflection.Verdict, error) + AtFinish func(ctx context.Context, task []*schema.Message, answer string) (reflection.Verdict, error) + type StopPolicy interface + AfterText func() (ends bool, nudge string) + FinishCall func(reply *schema.Message) (schema.ToolCall, bool) + Instructions func() string + Label func() string + type ToolDispatcher interface + Dispatch func(ctx context.Context, tc schema.ToolCall) bool