Versions in this module Expand all Collapse all v0 v0.20261130.1 Nov 30, 2026 Changes in this version type Bot + func (b *Bot) DownloadAttachment(ctx context.Context, id string, dst io.Writer) error v0.20261125.2 Nov 25, 2026 v0.20261125.1 Nov 25, 2026 Changes in this version + func SplitCommand(content string) (string, string) + type Action struct + Label string + Role string + Value string + type AgentCard struct + Actions []CardAction + AnswerID string + Details []CardDetail + ExpiresTS *time.Time + Fields []FormField + Kind CardKind + ParentID string + PlanID string + Progress *int + Result string + Revision int64 + SourceID string + Status string + Summary string + Tasks []CardTask + Title string + URL string + type Attachment struct + Height int + ID string + Kind string + Mime string + Name string + Size int64 + Thumb bool + ThumbnailURL string + URL string + Width int + type Bot struct + ArgumentCommands bool + ClientID string + ClientSecret string + CollectionRequests chan *CollectionRequest + Commands chan *Message + ID string + InputMode string + Messages chan *Message + NewSession func(session *Session) + Reactions chan *Message + ReadReceipts chan *ReadReceipt + Settings chan *SessionSettings + StartupCommands []*Command + func New(ctx context.Context, clientID, clientSecret string, opts ...*Opts) (*Bot, error) + func (b *Bot) Broadcast(ctx context.Context, content string, silent ...bool) (*Broadcast, error) + func (b *Bot) BroadcastKeyboard(ctx context.Context, content string, options []KeyboardOption) (*Broadcast, error) + func (b *Bot) BroadcastStatus(ctx context.Context, id string) (*Broadcast, error) + func (b *Bot) BroadcastWithOptions(ctx context.Context, content string, options SendOptions) (*Broadcast, error) + func (b *Bot) Delete(ctx context.Context, sessionID, messageID string) error + func (b *Bot) Edit(ctx context.Context, sessionID, messageID, content string, ...) (*Message, error) + func (b *Bot) EditWithOptions(ctx context.Context, sessionID, messageID string, options EditOptions) (*Message, error) + func (b *Bot) FeaturedBots(ctx context.Context) ([]*FeaturedBot, error) + func (b *Bot) GetCardMessage(ctx context.Context, sessionID, messageID string) (*CardMessage, error) + func (b *Bot) GetMessage(ctx context.Context, sessionID, messageID string) (*Message, error) + func (b *Bot) React(ctx context.Context, sessionID, messageID, emoji string) (*Message, error) + func (b *Bot) RecentMessages(ctx context.Context, sessionID string) ([]*Message, error) + func (b *Bot) RegisterCollections(ctx context.Context, fields []CollectionField) error + func (b *Bot) RegisterCommands(ctx context.Context, commands []*Command) error + func (b *Bot) RegisterSettings(ctx context.Context, fields []SettingField) error + func (b *Bot) RespondCollection(ctx context.Context, req *CollectionRequest, result CollectionResult) error + func (b *Bot) Run(ctx context.Context, opts ...*Opts) error + func (b *Bot) Send(ctx context.Context, sessionID, content string, silent ...bool) (*Message, error) + func (b *Bot) SendCard(ctx context.Context, sessionID string, card AgentCard) (*CardMessage, error) + func (b *Bot) SendKeyboard(ctx context.Context, sessionID, content string, options []KeyboardOption) (*Message, error) + func (b *Bot) SendMessage(ctx context.Context, sessionID string, input MessageInput) (*Message, error) + func (b *Bot) SendWithOptions(ctx context.Context, sessionID, content string, options SendOptions) (*Message, error) + func (b *Bot) Sessions(ctx context.Context) ([]*Session, error) + func (b *Bot) SetInputMode(ctx context.Context, mode string) error + func (b *Bot) SetMessageAcceptor(accept func(context.Context, *Message) error) + func (b *Bot) SetOnlineStatusVisible(ctx context.Context, visible bool) error + func (b *Bot) SetSettings(ctx context.Context, sessionID string, values map[string]string) (*SessionSettings, error) + func (b *Bot) StartStream(ctx context.Context, sessionID string) (*Message, error) + func (b *Bot) Stop() + func (b *Bot) Typing(ctx context.Context, sessionID string) error + func (b *Bot) UpdateCard(ctx context.Context, sessionID, messageID string, change CardUpdate) (*CardMessage, error) + func (b *Bot) UpdateMessage(ctx context.Context, sessionID, messageID string, change MessageUpdate) (*Message, error) + func (b *Bot) UpdateStream(ctx context.Context, sessionID, messageID string, input StreamInput) (*Message, error) + func (b *Bot) UploadAttachment(ctx context.Context, sessionID, name string, data []byte) (*Attachment, error) + type Broadcast struct + Content string + CreateTS time.Time + Done bool + DoneTS *time.Time + Failed int + ID string + Metadata json.RawMessage + Sent int + Silent bool + Subject string + Total int + type CardAction = Action + type CardDetail struct + Label string + Value string + type CardKind string + const CardKindApproval + const CardKindArtifact + const CardKindForm + const CardKindPlan + type CardMessage struct + type CardTask struct + ID string + Status CardTaskStatus + Title string + URL string + type CardTaskStatus string + const CardTaskStatusCancelled + const CardTaskStatusCompleted + const CardTaskStatusFailed + const CardTaskStatusQueued + const CardTaskStatusRunning + const CardTaskStatusWaiting + type CardUpdate struct + Metadata json.RawMessage + Progress *int + Result *string + Revision int64 + Status string + Tasks *[]CardTask + type CollectionField struct + Description string + Key string + Label string + MaxItems int + Placeholder string + type CollectionItem struct + Description string + ID string + Label string + type CollectionRequest struct + Action string + ExpiresTS time.Time + ID string + ItemID string + Key string + Revision *int64 + SessionID string + Value string + type CollectionResult struct + Changed bool + Error string + Items []CollectionItem + Revision int64 + type Command struct + Description string + Input *CommandInput + Name string + Value string + type CommandInput struct + Label string + MaxLength int + Placeholder string + Required bool + Type string + type EditOptions struct + Content *string + Keyboard *Keyboard + Metadata json.RawMessage + Subject *string + type Envelope struct + Data json.RawMessage + Type string + type FeaturedBot struct + Handle string + ID string + Name string + type FormField struct + Key string + Label string + MaxLength int + Options []KeyboardOption + Placeholder string + Required bool + Type string + type Keyboard struct + Options []KeyboardOption + Selected *string + type KeyboardOption struct + Label string + Value string + type LinkPreview struct + Description string + Image *PreviewImage + SiteName string + Title string + URL string + type Message struct + Argument string + Attachments []Attachment + AuthorID string + AuthorTS time.Time + Cancel bool + Card *AgentCard + Command string + Content string + CreateTS time.Time + Delivered bool + EditTS *time.Time + Fields map[string]any + ID string + Keyboard *Keyboard + LinkPreview *LinkPreview + Metadata json.RawMessage + PreviewTS *time.Time + ReactionRevision int64 + Reactions map[string]string + Read bool + ReplyTo string + SessionID string + Silent bool + Stream *MessageStream + Subject string + Value string + type MessageInput struct + Actions []Action + Attachments []string + Card *AgentCard + Content string + IdempotencyKey string + Keyboard *Keyboard + Metadata json.RawMessage + Silent bool + Stream bool + Subject string + TS time.Time + type MessageStream struct + Sequence int64 + Status string + UpdatedTS time.Time + type MessageUpdate struct + Actions []Action + Card *CardUpdate + Content *string + Keyboard *Keyboard + Metadata json.RawMessage + Subject *string + type Opts struct + ArgumentCommands bool + Collections []CollectionField + Commands []*Command + InputMode string + NewSession func(session *Session) + OnlineStatusVisible *bool + Settings []SettingField + func (o *Opts) SetArgumentCommands(enabled bool) *Opts + func (o *Opts) SetCollections(fields []CollectionField) *Opts + func (o *Opts) SetCommands(commands []*Command) *Opts + func (o *Opts) SetInputMode(mode string) *Opts + func (o *Opts) SetNewSession(callback func(session *Session)) *Opts + func (o *Opts) SetOnlineStatusVisible(visible bool) *Opts + func (o *Opts) SetSettings(fields []SettingField) *Opts + type PreviewImage struct + Height int + ID string + Width int + type ReadReceipt struct + By string + MessageID string + SessionID string + type SendOptions struct + Attachments []string + Keyboard *Keyboard + Metadata json.RawMessage + Silent bool + Stream bool + Subject string + type Session struct + CreateTS time.Time + ID string + LastMessage *Message + Muted bool + Settings map[string]string + UnreadCount int + User *User + type SessionSettings struct + SessionID string + Settings map[string]string + type SettingField struct + Default string + Description string + Key string + Label string + Options []KeyboardOption + Type string + type StreamInput struct + Content string + Sequence int64 + Status string + type User struct + ID string + Locale *string + Name *string + Timezone *string