Versions in this module Expand all Collapse all v0 v0.2.0 Jul 27, 2026 Changes in this version + var DefaultUseChatAPI = true + type AdkRunner struct + func NewAdkRunner(cfg AdkRunnerConfig) (*AdkRunner, error) + func (r *AdkRunner) Run(ctx context.Context, userID, sessionID, message string, ...) error + type AdkRunnerConfig struct + Agent agent.Agent + AppName string + MaxIterations int + MemoryService any + SessionService session.Service + type ChatModel struct + func NewChatModel(name, apiKey, baseURL string) *ChatModel + func (m *ChatModel) GenerateContent(ctx context.Context, req *model.LLMRequest, stream bool) iter.Seq2[*model.LLMResponse, error] + func (m *ChatModel) Name() string + func (m *ChatModel) SetThinkingMode(mode string) + func (m *ChatModel) SimpleChat(ctx context.Context, systemPrompt, userMessage string) (string, error) + type WailsAgent struct + func NewWailsAgent(cfg WailsAgentConfig) *WailsAgent + func (w *WailsAgent) BuildAndRun(ctx context.Context, userID, sessionID, message string, ...) error + func (w *WailsAgent) ResolveApproval(approvalID string, approved bool) + func (w *WailsAgent) ResolveQuestionnaire(questionnaireID string, answer string) + func (w *WailsAgent) SetInstruction(instruction string) + func (w *WailsAgent) SetModel(_ context.Context, apiKey, baseURL, modelName string) error + func (w *WailsAgent) SetResponsesModel(ctx context.Context, apiKey, baseURL, modelName string) error + func (w *WailsAgent) SetSubApprovalCallback(cb func(approvalID, command string, riskLevel ftool.RiskLevel)) + func (w *WailsAgent) SetThinking(mode string) + func (w *WailsAgent) SetTools(tools []tool.Tool) + type WailsAgentConfig struct + AppName string + ApprovalTimeout time.Duration + MaxIterations int + MemoryService any + SessionService session.Service v0.1.0 Jul 25, 2026 Changes in this version + func DefaultFileCleanup(change AgentFileChange) error + func DefaultFileRestore(change AgentFileChange, absPath string) error + type AgentErrorState struct + ErrType AgentErrorType + File string + LastAttempt string + Message string + Retries int + type AgentErrorType string + const AgentErrCompileFail + const AgentErrNone + const AgentErrToolFail + type AgentFileChange struct + BackupPath string + Path string + Status string + Timestamp int64 + type ApprovalResult struct + Approved bool + Reason string + type ChangeTracker struct + func NewChangeTracker() *ChangeTracker + func (t *ChangeTracker) AcceptAll(cleanupFn func(change AgentFileChange) error) int + func (t *ChangeTracker) AcceptFile(key string, cleanupFn func(change AgentFileChange) error) error + func (t *ChangeTracker) Clear() + func (t *ChangeTracker) GetChanges() []AgentFileChange + func (t *ChangeTracker) GetChangesJSON() json.RawMessage + func (t *ChangeTracker) RecordChange(key, backupKey string, isNew bool) + func (t *ChangeTracker) RevertAll(restoreFn func(change AgentFileChange, absPath string) error) (int, []string) + func (t *ChangeTracker) RevertFile(key string, restoreFn func(change AgentFileChange, absPath string) error) error + type LLMService interface + Chat func(ctx context.Context, req *llm.ChatRequest) (*llm.ChatResponse, error) + ChatStream func(ctx context.Context, req *llm.ChatRequest, onContent func(delta string), ...) (*llm.ChatResponse, error) + type MessageManager struct + func NewMessageManager(store *msgdb.Store) *MessageManager + func (mm *MessageManager) NewAssistantMessage(sessionID, turnID string) *msgdb.Message + func (mm *MessageManager) NewToolMessage(sessionID, turnID, toolCallID, toolName, toolArgs, resultContent string) *msgdb.Message + func (mm *MessageManager) NewUserMessage(sessionID, clientMsgID, turnID, content string) *msgdb.Message + func (mm *MessageManager) Persist(msg *msgdb.Message) error + func (mm *MessageManager) RebuildChatMessages(sessionID string) []llm.ChatMessage + type Orchestrator struct + func NewOrchestrator(llmSvc LLMService, toolExec ToolExecutor, promptBuilder SystemPromptBuilder, ...) *Orchestrator + func (o *Orchestrator) Orchestrate(ctx context.Context, ...) + func (o *Orchestrator) RegisterApproval(approvalID string) chan ApprovalResult + func (o *Orchestrator) RegisterQuestionnaire(questionnaireID string) chan string + func (o *Orchestrator) ResolveApproval(approvalID string, approved bool) + func (o *Orchestrator) ResolveQuestionnaire(questionnaireID string, answersJSON string) + func (o *Orchestrator) ResumeAfterApproval(approvalID string, approved bool) + func (o *Orchestrator) SetSubApprovalCallback(cb func(approvalID, command string, riskLevel ftool.RiskLevel)) + type OrchestratorCallbacks struct + OnApprovalRequired func(approvalID, callID, command string, risk ftool.RiskLevel) + OnContentDelta func(msgID, delta string) + OnError func(msgID, code, message string) + OnFileDiff func(toolMsgID, filePath, original, modified, backupPath string) + OnMessageEnd func(msgID string) + OnMessageStart func(msgID string, seq int64, turnID, role string) + OnQuestionnaire func(questionnaireID, questionsJSON string) + OnReasoningDelta func(msgID, delta string) + OnTerminalOutput func(text string, isStderr bool) + OnTokenUsage func(usage ftool.TokenUsageInfo) + OnToolCallDelta func(callID, argsDelta string) + OnToolCallEnd func(callID, name, arguments string) + OnToolCallStart func(msgID, callID, name string) + OnToolExecuting func(callID, name string) + OnToolResult func(callID, toolMsgID string, result *ftool.ToolResult) + OnTurnComplete func(turnID, sessionID string) + type OrchestratorConfig struct + ContextWindow int + IterationsPerBatch int + MaxErrorRetries int + OutputReserve int + TitleGenerator func(ctx context.Context, userMessage, model, providerID string) string + WorkspaceID string + type OrchestratorHooks struct + GetMessages func(sessionID string, userMessage, mode string) []llm.ChatMessage + OnAfterToolExec func(toolName string, result *ftool.ToolResult, filePath string) + OnAfterTurn func(sessionID string, turnID string) + OnBeforeSystemContext func() string + OnToolResult func(ctx context.Context, sessionID, turnID string, approvalMode ftool.ApprovalMode, ...) ([]llm.ChatMessage, bool) + type PendingCall struct + Args string + ID string + Name string + type QuestionItem struct + Answer string + Header string + type QuestionnaireAnswer struct + Answers []QuestionItem + type SystemPromptBuilder interface + BuildSystemPrompt func(mode string, contextInfo string) string + BuildTitlePrompt func() string + type ToolDefinitionProvider interface + GetToolDefinitions func() []tool.ToolDefinition + IsToolEnabled func(name string) bool + type ToolExecutor interface + Execute func(toolName string, args json.RawMessage) *tool.ToolResult