Versions in this module Expand all Collapse all v0 v0.2.7 Apr 21, 2026 Changes in this version + const ArtifactPathsLLMNote + const HandledToolLLMNote + func ToolAgentID(ctx context.Context) string + func ToolChannel(ctx context.Context) string + func ToolChatID(ctx context.Context) string + func ToolMessageID(ctx context.Context) string + func ToolReplyToMessageID(ctx context.Context) string + func ToolSessionKey(ctx context.Context) string + func ToolSessionScope(ctx context.Context) *session.SessionScope + func ToolToSchema(tool Tool) map[string]any + func WithToolContext(ctx context.Context, channel, chatID string) context.Context + func WithToolInboundContext(ctx context.Context, channel, chatID, messageID, replyToMessageID string) context.Context + func WithToolMessageContext(ctx context.Context, messageID, replyToMessageID string) context.Context + func WithToolSessionContext(ctx context.Context, agentID, sessionKey string, scope *session.SessionScope) context.Context + type AsyncCallback func(ctx context.Context, result *ToolResult) + type AsyncExecutor interface + ExecuteAsync func(ctx context.Context, args map[string]any, cb AsyncCallback) *ToolResult + type ExecRequest struct + Action string + Background bool + Command string + Cwd string + Data string + Env map[string]string + PTY bool + SessionID string + Timeout int + type ExecResponse struct + Error string + ExitCode int + Output string + SessionID string + Sessions []SessionInfo + Status string + type FunctionCall struct + Arguments string + Name string + type LLMProvider interface + Chat func(ctx context.Context, messages []Message, tools []ToolDefinition, model string, ...) (*LLMResponse, error) + GetDefaultModel func() string + type LLMResponse struct + Content string + FinishReason string + ToolCalls []ToolCall + Usage *UsageInfo + type Message struct + Content string + Role string + ToolCallID string + ToolCalls []ToolCall + type SessionInfo struct + Command string + ID string + PID int + StartedAt int64 + Status string + type Tool interface + Description func() string + Execute func(ctx context.Context, args map[string]any) *ToolResult + Name func() string + Parameters func() map[string]any + type ToolCall struct + Arguments map[string]any + Function *FunctionCall + ID string + Name string + Type string + type ToolDefinition struct + Function ToolFunctionDefinition + Type string + type ToolFunctionDefinition struct + Description string + Name string + Parameters map[string]any + type ToolResult struct + ArtifactTags []string + Async bool + Err error + ForLLM string + ForUser string + IsError bool + Media []string + Messages []providers.Message + ResponseHandled bool + Silent bool + func AsyncResult(forLLM string) *ToolResult + func ErrorResult(message string) *ToolResult + func MediaResult(forLLM string, mediaRefs []string) *ToolResult + func NewToolResult(forLLM string) *ToolResult + func SilentResult(forLLM string) *ToolResult + func UserResult(content string) *ToolResult + func (tr *ToolResult) ContentForLLM() string + func (tr *ToolResult) MarshalJSON() ([]byte, error) + func (tr *ToolResult) WithError(err error) *ToolResult + func (tr *ToolResult) WithResponseHandled() *ToolResult + type UsageInfo struct + CompletionTokens int + PromptTokens int + TotalTokens int