Versions in this module Expand all Collapse all v1 v1.0.0 Sep 16, 2026 Changes in this version + var ErrConcurrencyTimeout = errors.New("timeout waiting for concurrency slot") + var ErrDepthLimitExceeded = errors.New("sub-turn depth limit exceeded") + var ErrInvalidSubTurnConfig = errors.New("invalid sub-turn config") + func EstimateMessageTokens(msg providers.Message) int + func EstimateToolDefsTokens(defs []providers.ToolDefinition) int + func RegisterBuiltinHook(name string, factory BuiltinHookFactory) error + func RegisterContextManager(name string, factory ContextManagerFactory) error + func SpawnSubTurn(ctx context.Context, cfg SubTurnConfig) (*tools.ToolResult, error) + func TurnStateFromContext(ctx context.Context) *turnState + func WithAgentLoop(ctx context.Context, al *AgentLoop) context.Context + type ActiveTurnInfo struct + AgentID string + Channel string + ChatID string + ChildTurnIDs []string + Depth int + Iteration int + ParentTurnID string + Phase TurnPhase + SessionKey string + StartedAt time.Time + TurnID string + UserMessage string + type AgentContextDefinition struct + Agent *AgentPromptDefinition + Soul *SoulDefinition + Source AgentDefinitionSource + User *UserDefinition + type AgentDefinitionSource string + const AgentDefinitionSourceAgent + const AgentDefinitionSourceAgents + type AgentDescriptor struct + Description string + ID string + Name string + type AgentFrontmatter struct + Description string + Fields map[string]any + MCPServers []string + MaxTurns *int + Model string + Name string + Skills []string + Tools []string + type AgentInstance struct + CandidateProviders map[string]providers.LLMProvider + Candidates []providers.FallbackCandidate + ContextBuilder *ContextBuilder + ContextWindow int + Definition AgentContextDefinition + Fallbacks []string + ID string + ImageCandidates []providers.FallbackCandidate + LightCandidates []providers.FallbackCandidate + LightProvider providers.LLMProvider + MCPServerAllowlist map[string]struct{} + MaxIterations int + MaxTokens int + Model string + ModuleKnowledge func(moduleID string) (overlays string, skills string, warnings []string) + ModuleSummaries []string + Name string + Provider providers.LLMProvider + Router *routing.Router + Sessions session.SessionStore + SkillsFilter []string + Subagents *config.SubagentsConfig + SummarizeMessageThreshold int + SummarizeTokenPercent int + Temperature float64 + ThinkingLevel ThinkingLevel + ThinkingLevelConfigured bool + Tools *tools.ToolRegistry + Workspace string + func NewAgentInstance(agentCfg *config.AgentConfig, defaults *config.AgentDefaults, ...) *AgentInstance + func (a *AgentInstance) AllowsMCPServer(serverName string) bool + func (a *AgentInstance) Close() error + type AgentLoop struct + func AgentLoopFromContext(ctx context.Context) *AgentLoop + func NewAgentLoop(cfg *config.Config, msgBus *bus.MessageBus, provider providers.LLMProvider, ...) *AgentLoop + func (al *AgentLoop) Close() + func (al *AgentLoop) Continue(ctx context.Context, sessionKey, channel, chatID string) (string, error) + func (al *AgentLoop) GetActiveTurn() *ActiveTurnInfo + func (al *AgentLoop) GetActiveTurnBySession(sessionKey string) *ActiveTurnInfo + func (al *AgentLoop) GetConfig() *config.Config + func (al *AgentLoop) GetRegistry() *AgentRegistry + func (al *AgentLoop) GetStartupInfo() map[string]any + func (al *AgentLoop) HardAbort(sessionKey string) error + func (al *AgentLoop) InjectFollowUp(msg providers.Message) error + func (al *AgentLoop) InjectSteering(msg providers.Message) error + func (al *AgentLoop) InterruptGraceful(hint string) error + func (al *AgentLoop) InterruptHard() error + func (al *AgentLoop) MountHook(reg HookRegistration) error + func (al *AgentLoop) MountProcessHook(ctx context.Context, name string, opts ProcessHookOptions) error + func (al *AgentLoop) ProcessDirect(ctx context.Context, content, sessionKey string) (string, error) + func (al *AgentLoop) ProcessDirectWithChannel(ctx context.Context, content, sessionKey, channel, chatID string) (string, error) + func (al *AgentLoop) ProcessHeartbeat(ctx context.Context, content, channel, chatID string) (string, error) + func (al *AgentLoop) ProcessInstanceSelection(ctx context.Context, selection string, messages []providers.Message, ...) (*InstanceSelectionResult, error) + func (al *AgentLoop) PublishResponseIfNeeded(ctx context.Context, channel, chatID, sessionKey, response string) + func (al *AgentLoop) RecordLastChannel(channel string) error + func (al *AgentLoop) RecordLastChatID(chatID string) error + func (al *AgentLoop) RegisterTool(tool tools.Tool) + func (al *AgentLoop) ReloadProviderAndConfig(ctx context.Context, provider providers.LLMProvider, cfg *config.Config) error + func (al *AgentLoop) Run(ctx context.Context) error + func (al *AgentLoop) RuntimeEventBus() runtimeevents.Bus + func (al *AgentLoop) RuntimeEventStats() runtimeevents.Stats + func (al *AgentLoop) RuntimeEvents() runtimeevents.EventChannel + func (al *AgentLoop) SetChannelManager(cm *channels.Manager) + func (al *AgentLoop) SetMediaStore(s media.MediaStore) + func (al *AgentLoop) SetReloadFunc(fn func() error) + func (al *AgentLoop) SetSteeringMode(mode SteeringMode) + func (al *AgentLoop) SetTranscriber(t asr.Transcriber) + func (al *AgentLoop) Steer(msg providers.Message) error + func (al *AgentLoop) SteeringMode() SteeringMode + func (al *AgentLoop) Stop() + func (al *AgentLoop) SubscribeEvents(buffer int) EventSubscription + func (al *AgentLoop) UnmountHook(name string) + func (al *AgentLoop) UnsubscribeEvents(id uint64) + type AgentLoopOption func(*AgentLoop) + func WithInstanceSelectionResolver(resolver InstanceSelectionResolver) AgentLoopOption + func WithRuntimeEvents(bus runtimeevents.Bus) AgentLoopOption + func WithToolProviders(providers ...ToolProvider) AgentLoopOption + type AgentLoopSpawner struct + func NewSubTurnSpawner(al *AgentLoop) *AgentLoopSpawner + func (s *AgentLoopSpawner) SpawnSubTurn(ctx context.Context, cfg tools.SubTurnConfig) (*tools.ToolResult, error) + type AgentPromptDefinition struct + Body string + Frontmatter AgentFrontmatter + FrontmatterErr string + Path string + Raw string + RawFrontmatter string + type AgentRegistry struct + func NewAgentRegistry(cfg *config.Config, provider providers.LLMProvider) *AgentRegistry + func (r *AgentRegistry) CanSpawnSubagent(parentAgentID, targetAgentID string) bool + func (r *AgentRegistry) Close() + func (r *AgentRegistry) ForEachTool(name string, fn func(tools.Tool)) + func (r *AgentRegistry) GetAgent(agentID string) (*AgentInstance, bool) + func (r *AgentRegistry) GetAgentDescriptor(agentID string) (*AgentDescriptor, bool) + func (r *AgentRegistry) GetDefaultAgent() *AgentInstance + func (r *AgentRegistry) ListAgentIDs() []string + func (r *AgentRegistry) ListAgents(workspace string) []AgentDescriptor + func (r *AgentRegistry) ListSpawnableAgents(agentID string) []AgentDescriptor + func (r *AgentRegistry) ResolveRoute(inbound bus.InboundContext) routing.ResolvedRoute + type ApprovalDecision struct + Approved bool + Reason string + type ApprovalRequestedPayload struct + ActionID string + ApprovalID string + Parameters map[string]any + Reason string + State string + Tool string + type ApprovalResolvedPayload struct + ApprovalID string + Reason string + Resolution string + type ArtifactProducedPayload struct + ArtifactID string + Bytes int64 + Digest string + Kind string + Locator string + MediaType string + Module string + ReviewState string + Title string + ToolName string + type AssembleRequest struct + Budget int + MaxTokens int + SessionKey string + type AssembleResponse struct + History []providers.Message + Summary string + type BuiltinHookFactory func(ctx context.Context, spec config.BuiltinHookConfig) (any, error) + type CompactRequest struct + Budget int + Reason ContextCompressReason + SessionKey string + type ContextBuilder struct + func NewContextBuilder(workspace string) *ContextBuilder + func (cb *ContextBuilder) AddAssistantMessage(messages []providers.Message, content string, toolCalls []map[string]any) []providers.Message + func (cb *ContextBuilder) AddToolResult(messages []providers.Message, toolCallID, toolName, result string) []providers.Message + func (cb *ContextBuilder) BuildMessages(history []providers.Message, summary string, currentMessage string, ...) []providers.Message + func (cb *ContextBuilder) BuildMessagesFromPrompt(req PromptBuildRequest) []providers.Message + func (cb *ContextBuilder) BuildSystemPrompt() string + func (cb *ContextBuilder) BuildSystemPromptParts() []PromptPart + func (cb *ContextBuilder) BuildSystemPromptWithCache() string + func (cb *ContextBuilder) EstimateSystemTokens(summary string, activeSkills []string) int + func (cb *ContextBuilder) GetSkillsInfo() map[string]any + func (cb *ContextBuilder) InvalidateCache() + func (cb *ContextBuilder) ListSkillNames() []string + func (cb *ContextBuilder) LoadAgentDefinition() AgentContextDefinition + func (cb *ContextBuilder) LoadBootstrapFiles() string + func (cb *ContextBuilder) RegisterPromptContributor(contributor PromptContributor) error + func (cb *ContextBuilder) RegisterPromptSource(desc PromptSourceDescriptor) error + func (cb *ContextBuilder) ResolveActiveSkillsForContext(skillNames []string) []string + func (cb *ContextBuilder) ResolveSkillName(name string) (string, bool) + func (cb *ContextBuilder) WithAgentDiscovery(agentID string, discover func(agentID string) []AgentDescriptor) *ContextBuilder + func (cb *ContextBuilder) WithSplitOnMarker(enabled bool) *ContextBuilder + func (cb *ContextBuilder) WithToolDiscovery(useBM25, useRegex bool) *ContextBuilder + type ContextCompressPayload struct + DroppedMessages int + Reason ContextCompressReason + RemainingMessages int + type ContextCompressReason string + const ContextCompressReasonProactive + const ContextCompressReasonRetry + const ContextCompressReasonSummarize + type ContextManager interface + Assemble func(ctx context.Context, req *AssembleRequest) (*AssembleResponse, error) + Clear func(ctx context.Context, sessionKey string) error + Compact func(ctx context.Context, req *CompactRequest) error + Ingest func(ctx context.Context, req *IngestRequest) error + type ContextManagerFactory func(cfg json.RawMessage, al *AgentLoop) (ContextManager, error) + type Control int + const ControlBreak + const ControlContinue + const ControlToolLoop + type DispatchRequest struct + InboundContext *bus.InboundContext + Media []string + RouteResult *routing.ResolvedRoute + SessionAliases []string + SessionKey string + SessionScope *session.SessionScope + UserMessage string + func (r DispatchRequest) Channel() string + func (r DispatchRequest) ChatID() string + func (r DispatchRequest) MessageID() string + func (r DispatchRequest) ReplyToMessageID() string + func (r DispatchRequest) SelectedModule() string + func (r DispatchRequest) SenderID() string + type ErrorPayload struct + Message string + Stage string + type Event struct + Context *TurnContext + Kind EventKind + Meta EventMeta + Payload any + Time time.Time + type EventKind = runtimeevents.Kind + const EventKindContextCompress + const EventKindError + const EventKindFollowUpQueued + const EventKindInterruptReceived + const EventKindLLMDelta + const EventKindLLMRequest + const EventKindLLMResponse + const EventKindLLMRetry + const EventKindSessionSummarize + const EventKindSteeringInjected + const EventKindSubTurnEnd + const EventKindSubTurnOrphan + const EventKindSubTurnResultDelivered + const EventKindSubTurnSpawn + const EventKindToolExecEnd + const EventKindToolExecSkipped + const EventKindToolExecStart + const EventKindTurnEnd + const EventKindTurnStart + type EventMeta = HookMeta + type EventSubscription struct + C <-chan Event + ID uint64 + type FollowUpQueuedPayload struct + ContentLen int + SourceTool string + type HookAction string + const HookActionAbortTurn + const HookActionContinue + const HookActionDenyTool + const HookActionHardAbort + const HookActionModify + const HookActionRespond + type HookDecision struct + Action HookAction + Reason string + type HookManager struct + func NewHookManager(runtimeEvents runtimeevents.EventChannel) *HookManager + func (hm *HookManager) AfterLLM(ctx context.Context, resp *LLMHookResponse) (*LLMHookResponse, HookDecision) + func (hm *HookManager) AfterTool(ctx context.Context, result *ToolResultHookResponse) (*ToolResultHookResponse, HookDecision) + func (hm *HookManager) ApproveTool(ctx context.Context, req *ToolApprovalRequest) ApprovalDecision + func (hm *HookManager) BeforeLLM(ctx context.Context, req *LLMHookRequest) (*LLMHookRequest, HookDecision) + func (hm *HookManager) BeforeTool(ctx context.Context, call *ToolCallHookRequest) (*ToolCallHookRequest, HookDecision) + func (hm *HookManager) Close() + func (hm *HookManager) ConfigureTimeouts(observer, interceptor, approval time.Duration) + func (hm *HookManager) Mount(reg HookRegistration) error + func (hm *HookManager) Unmount(name string) + type HookMeta struct + AgentID string + Iteration int + ParentTurnID string + SessionKey string + Source string + TracePath string + TurnID string + type HookRegistration struct + Hook any + Name string + Priority int + Source HookSource + func NamedHook(name string, hook any) HookRegistration + type HookSource uint8 + const HookSourceInProcess + const HookSourceProcess + type IngestRequest struct + Message providers.Message + SessionKey string + type InstanceSelectionResolver func(context.Context, string) (*providers.InstanceResolution, error) + type InstanceSelectionResult struct + ExactTarget string + Response *providers.LLMResponse + ServedIdentity string + type InterruptKind string + const InterruptKindGraceful + const InterruptKindHard + const InterruptKindSteering + type InterruptReceivedPayload struct + ContentLen int + HintLen int + Kind InterruptKind + QueueDepth int + Role string + type LLMDeltaPayload struct + ContentDeltaLen int + ReasoningDeltaLen int + type LLMHookRequest struct + Context *TurnContext + GracefulTerminal bool + Messages []providers.Message + Meta HookMeta + Model string + Options map[string]any + Tools []providers.ToolDefinition + func (r *LLMHookRequest) Clone() *LLMHookRequest + type LLMHookResponse struct + Context *TurnContext + Meta HookMeta + Model string + Response *providers.LLMResponse + func (r *LLMHookResponse) Clone() *LLMHookResponse + type LLMInterceptor interface + AfterLLM func(ctx context.Context, resp *LLMHookResponse) (*LLMHookResponse, HookDecision, error) + BeforeLLM func(ctx context.Context, req *LLMHookRequest) (*LLMHookRequest, HookDecision, error) + type LLMPhase int + const LLMPhaseAborted + const LLMPhaseCompleted + const LLMPhaseFinalizing + const LLMPhaseLLMCall + const LLMPhasePreLLM + const LLMPhaseProcessing + const LLMPhaseSetup + const LLMPhaseToolLoop + const LLMPhaseTools + type LLMRequestPayload struct + MaxTokens int + MessagesCount int + Model string + Temperature float64 + ToolsCount int + type LLMResponsePayload struct + ContentLen int + HasReasoning bool + ToolCalls int + type LLMRetryPayload struct + Attempt int + Backoff time.Duration + Error string + MaxRetries int + Reason string + type MemoryStore struct + func NewMemoryStore(workspace string) *MemoryStore + func (ms *MemoryStore) AppendToday(content string) error + func (ms *MemoryStore) GetMemoryContext() string + func (ms *MemoryStore) GetRecentDailyNotes(days int) string + func (ms *MemoryStore) ReadLongTerm() string + func (ms *MemoryStore) ReadToday() string + func (ms *MemoryStore) WriteLongTerm(content string) error + type Pipeline struct + Bus interfaces.MessageBus + Cfg *config.Config + ChannelManager interfaces.ChannelManager + ContextManager ContextManager + Fallback *providers.FallbackChain + Hooks *HookManager + MediaStore media.MediaStore + Steering any + func NewPipeline(al *AgentLoop) *Pipeline + func (p *Pipeline) CallLLM(ctx context.Context, turnCtx context.Context, ts *turnState, ...) (Control, error) + func (p *Pipeline) ExecuteTools(ctx context.Context, turnCtx context.Context, ts *turnState, ...) ToolControl + func (p *Pipeline) Finalize(ctx context.Context, turnCtx context.Context, ts *turnState, ...) (turnResult, error) + func (p *Pipeline) SetupTurn(ctx context.Context, ts *turnState) (*turnExecution, error) + type ProcessHook struct + func NewProcessHook(ctx context.Context, name string, opts ProcessHookOptions) (*ProcessHook, error) + func (ph *ProcessHook) AfterLLM(ctx context.Context, resp *LLMHookResponse) (*LLMHookResponse, HookDecision, error) + func (ph *ProcessHook) AfterTool(ctx context.Context, result *ToolResultHookResponse) (*ToolResultHookResponse, HookDecision, error) + func (ph *ProcessHook) ApproveTool(ctx context.Context, req *ToolApprovalRequest) (ApprovalDecision, error) + func (ph *ProcessHook) BeforeLLM(ctx context.Context, req *LLMHookRequest) (*LLMHookRequest, HookDecision, error) + func (ph *ProcessHook) BeforeTool(ctx context.Context, call *ToolCallHookRequest) (*ToolCallHookRequest, HookDecision, error) + func (ph *ProcessHook) Close() error + func (ph *ProcessHook) OnRuntimeEvent(ctx context.Context, evt runtimeevents.Event) error + type ProcessHookOptions struct + ApproveTool bool + Command []string + Dir string + Env []string + InterceptLLM bool + InterceptTool bool + Observe bool + ObserveKinds []string + type PromptBuildRequest struct + ActiveSkills []string + AllowedSkills []string + AllowedTools []string + Channel string + ChatID string + CurrentMessage string + History []providers.Message + Media []string + ModuleSummaries []string + Overlays []PromptPart + SenderDisplayName string + SenderID string + Summary string + SuppressDefaultSystemPrompt bool + SuppressSkillContext bool + SuppressToolUseRule bool + ToolUseFallback bool + type PromptCachePolicy string + const PromptCacheDefault + const PromptCacheEphemeral + const PromptCacheNone + type PromptContributor interface + ContributePrompt func(ctx context.Context, req PromptBuildRequest) ([]PromptPart, error) + PromptSource func() PromptSourceDescriptor + type PromptLayer string + const PromptLayerCapability + const PromptLayerContext + const PromptLayerInstruction + const PromptLayerKernel + const PromptLayerTurn + type PromptPart struct + Cache PromptCachePolicy + Content string + ID string + Layer PromptLayer + Slot PromptSlot + Source PromptSource + Stable bool + Title string + type PromptPlacement struct + Layer PromptLayer + Slot PromptSlot + type PromptRegistry struct + func NewPromptRegistry() *PromptRegistry + func (r *PromptRegistry) Collect(ctx context.Context, req PromptBuildRequest) ([]PromptPart, error) + func (r *PromptRegistry) RegisterContributor(contributor PromptContributor) error + func (r *PromptRegistry) RegisterSource(desc PromptSourceDescriptor) error + func (r *PromptRegistry) ValidatePart(part PromptPart) error + type PromptSlot string + const PromptSlotActiveSkill + const PromptSlotHierarchy + const PromptSlotIdentity + const PromptSlotInterrupt + const PromptSlotMCP + const PromptSlotMemory + const PromptSlotMessage + const PromptSlotOutput + const PromptSlotRuntime + const PromptSlotSkillCatalog + const PromptSlotSteering + const PromptSlotSubTurn + const PromptSlotSummary + const PromptSlotToolResult + const PromptSlotTooling + const PromptSlotWorkspace + type PromptSource struct + ID PromptSourceID + Name string + Path string + type PromptSourceDescriptor struct + Allowed []PromptPlacement + Description string + ID PromptSourceID + Owner string + StableByDefault bool + type PromptSourceID string + const PromptSourceActiveSkills + const PromptSourceAgentDiscovery + const PromptSourceHierarchy + const PromptSourceInterrupt + const PromptSourceKernel + const PromptSourceMemory + const PromptSourceModuleKnowledge + const PromptSourceOutputPolicy + const PromptSourceRuntime + const PromptSourceSkillCatalog + const PromptSourceSteering + const PromptSourceSubTurnProfile + const PromptSourceSubTurnResult + const PromptSourceSummary + const PromptSourceToolDiscovery + const PromptSourceToolRegistry + const PromptSourceToolResult + const PromptSourceUserMessage + const PromptSourceWorkspace + type PromptStack struct + func NewPromptStack(registry *PromptRegistry) *PromptStack + func (s *PromptStack) Add(part PromptPart) error + func (s *PromptStack) Parts() []PromptPart + func (s *PromptStack) Seal() + type RuntimeEventObserver interface + OnRuntimeEvent func(ctx context.Context, evt runtimeevents.Event) error + type SessionSummarizePayload struct + KeptMessages int + OmittedOversized bool + SummarizedMessages int + SummaryLen int + type SkillContextSnapshot struct + Sequence int + SkillNames []string + Trigger string + type SoulDefinition struct + Content string + Path string + type SteeringInjectedPayload struct + Count int + TotalContentLen int + type SteeringMode string + const MaxQueueSize + const SteeringAll + const SteeringOneAtATime + type SubTurnConfig struct + ActualSystemPrompt string + Async bool + Critical bool + InitialMessages []providers.Message + InitialTokenBudget *atomic.Int64 + MaxContextRunes int + MaxTokens int + Model string + SystemPrompt string + TargetAgentID string + Timeout time.Duration + Tools []tools.Tool + type SubTurnEndPayload struct + AgentID string + Status string + type SubTurnOrphanPayload struct + ChildTurnID string + ParentTurnID string + Reason string + type SubTurnResultDeliveredPayload struct + ContentLen int + TargetChannel string + TargetChatID string + type SubTurnSpawnPayload struct + AgentID string + Label string + ParentTurnID string + type ThinkingLevel string + const ThinkingAdaptive + const ThinkingHigh + const ThinkingLow + const ThinkingMedium + const ThinkingOff + const ThinkingXHigh + type Tool = tools.Tool + type ToolApprovalRequest struct + Arguments map[string]any + Context *TurnContext + Meta HookMeta + Tool string + func (r *ToolApprovalRequest) Clone() *ToolApprovalRequest + type ToolApprover interface + ApproveTool func(ctx context.Context, req *ToolApprovalRequest) (ApprovalDecision, error) + type ToolCallHookRequest struct + Arguments map[string]any + Channel string + ChatID string + Context *TurnContext + HookResult *tools.ToolResult + Meta HookMeta + Tool string + func (r *ToolCallHookRequest) Clone() *ToolCallHookRequest + type ToolControl int + const ToolControlBreak + const ToolControlContinue + const ToolControlFinalize + type ToolExecEndPayload struct + Async bool + Duration time.Duration + ForLLMLen int + ForUserLen int + IsError bool + Tool string + type ToolExecSkippedPayload struct + Reason string + Tool string + type ToolExecStartPayload struct + Arguments map[string]any + Tool string + type ToolExecutionRecord struct + ErrorSummary string + Name string + SkillNames []string + Success bool + type ToolInterceptor interface + AfterTool func(ctx context.Context, result *ToolResultHookResponse) (*ToolResultHookResponse, HookDecision, error) + BeforeTool func(ctx context.Context, call *ToolCallHookRequest) (*ToolCallHookRequest, HookDecision, error) + type ToolProvider interface + RegisterTools func(workspace string, register func(Tool)) (summaries []string, ...) + type ToolResultHookResponse struct + Arguments map[string]any + Context *TurnContext + Duration time.Duration + Meta HookMeta + Result *tools.ToolResult + Tool string + func (r *ToolResultHookResponse) Clone() *ToolResultHookResponse + type TurnContext struct + Inbound *bus.InboundContext + Route *routing.ResolvedRoute + Scope *session.SessionScope + type TurnEndPayload struct + ActiveSkills []string + AttemptedSkills []string + Duration time.Duration + FinalContent string + FinalContentLen int + FinalSuccessfulPath []string + Iterations int + SkillContextSnapshots []SkillContextSnapshot + Status TurnEndStatus + ToolExecutions []ToolExecutionRecord + ToolKinds []string + UserMessage string + Workspace string + type TurnEndStatus string + const TurnEndStatusAborted + const TurnEndStatusCompleted + const TurnEndStatusError + type TurnPhase string + const TurnPhaseAborted + const TurnPhaseCompleted + const TurnPhaseFinalizing + const TurnPhaseRunning + const TurnPhaseSetup + const TurnPhaseTools + type TurnStartPayload struct + MediaCount int + UserMessage string + type UserDefinition struct + Content string + Path string