Help us shape the future of Go! Take the 2026 Go Developer Survey

slack

package
v0.4.45 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config, deps Deps) (agentkit.Platform, error)

New registers platform/slack: Slack Socket Mode; SessionID follows cc-connect slack conventions.

func ReconstructDelivery

func ReconstructDelivery(sessionKey string) (delivery, error)

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
}

func (*Config) Validate added in v0.3.48

func (c *Config) Validate() error

Validate implements pluginkit.Validator.

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 (p *Platform) PlatformID() string

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) Receive

func (p *Platform) Receive(ctx context.Context) (agentkit.MessageEvent, error)

func (*Platform) ResolveChannelName

func (p *Platform) ResolveChannelName(channelID string) (string, error)

func (*Platform) Send

func (p *Platform) Send(ctx context.Context, event agentkit.OutboundEvent) error

func (*Platform) SendCard added in v0.4.44

func (p *Platform) SendCard(ctx context.Context, route agentkit.RouteRef, card *cap.Card) (cap.MessageRef, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL