Documentation
¶
Index ¶
- func New(cfg Config, deps Deps) (agentkit.Platform, error)
- func ReconstructDelivery(sessionKey string) (delivery, error)
- type Config
- type Deps
- type Platform
- func (p *Platform) PermissionCapability() permission.Capability
- func (p *Platform) PlatformID() string
- func (p *Platform) ReadChatHistory(ctx context.Context, req chathistory.Request) (chathistory.Result, error)
- func (p *Platform) Receive(ctx context.Context) (agentkit.MessageEvent, error)
- func (p *Platform) ResolveChannelName(channelID string) (string, error)
- func (p *Platform) Send(ctx context.Context, event agentkit.OutboundEvent) error
- func (p *Platform) SendCard(ctx context.Context, route agentkit.RouteRef, card *cap.Card) (cap.MessageRef, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New registers platform/slack: Slack Socket Mode; SessionID follows cc-connect slack conventions.
func ReconstructDelivery ¶
ReconstructDelivery parses a cc-connect style slack session key for proactive sends.
Types ¶
type Config ¶
type Config struct {
common.AgentRoutingConfig
BotToken string `json:"botToken"`
BotTokenRef string `json:"botTokenRef"`
AppToken string `json:"appToken"`
AppTokenRef string `json:"appTokenRef"`
Domain string `json:"domain"` // optional Slack Web API base URL override
AllowFrom string `json:"allowFrom"`
AllowChannels string `json:"allowChannels"`
GroupReplyAll bool `json:"groupReplyAll"`
DoneEmoji string `json:"doneEmoji"`
CancelledEmoji string `json:"cancelledEmoji"`
ErrorEmoji string `json:"errorEmoji"`
// SteerEmoji 是入站消息被并入进行中 turn(steer)时替换到该消息上的 emoji。
// 收到 turn/steer 事件后,平台把该消息的处理中 reaction(eyes)换成
// SteerEmoji,让发消息的人立刻看到"这条已被当前回复接收";turn/end 时再
// 统一换成 done/cancelled/error。默认 "inbox_tray","none" 关闭替换
//(此时消息只保留 eyes)。
SteerEmoji string `json:"steerEmoji"`
UnknownCardAction string `json:"unknownCardAction"` // forward (default) | ignore
CardSubmissionTTL string `json:"cardSubmissionTTL"` // positive duration; default 24h
}
type Deps ¶
type Deps struct {
InteractionHandlers []interaction.Handler `json:"interactionHandlers,omitempty"`
Commands agentkit.Commands `json:"commands,omitempty"`
SessionStore agentkit.SessionStore `json:"sessionStore,omitempty"`
Workspace workspace.Service `json:"workspace,omitempty"`
Credentials credentials.Store `json:"credentials,omitempty"`
}
type Platform ¶
type Platform struct {
common.InstanceIdentity
// contains filtered or unexported fields
}
func (*Platform) PermissionCapability ¶
func (p *Platform) PermissionCapability() permission.Capability
func (*Platform) PlatformID ¶
func (*Platform) ReadChatHistory ¶ added in v0.1.22
func (p *Platform) ReadChatHistory(ctx context.Context, req chathistory.Request) (chathistory.Result, error)
ReadChatHistory lists messages from a Slack channel or thread for the given delivery session.
func (*Platform) ResolveChannelName ¶
Click to show internal directories.
Click to hide internal directories.