Documentation
¶
Overview ¶
Package slackconnector bridges Slack events into rocketclaw.
Index ¶
- type Connector
- func (c *Connector) AbortResponse(msg *protocol.OutboundMessage)
- func (c *Connector) Authenticate() error
- func (c *Connector) ChannelAgentChoices(ctx context.Context, channelID string) ([]string, error)
- func (c *Connector) SendResponse(ctx context.Context, msg *protocol.OutboundMessage) (err error)
- func (c *Connector) SidebarChannelAgentChoices(ctx context.Context, channelID string) (name string, choices []string, err error)
- func (c *Connector) SlackNames(ctx context.Context, ids []string) map[string]string
- func (c *Connector) SlackTagsMatching(ctx context.Context, needle string) []string
- func (c *Connector) Start(ctx context.Context)
- func (c *Connector) StartEvents(ctx context.Context, backend frontend.Backend) <-chan struct{}
- func (c *Connector) Stop(context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector bridges Slack DM events into the shared rocketclaw bus.
func New ¶
func New(cfg *config.SlackConfig, threadRouter protocol.PrimaryTextRouter, facts channelFactsStore, logger *slog.Logger) *Connector
New constructs a Slack connector.
func (*Connector) AbortResponse ¶
func (c *Connector) AbortResponse(msg *protocol.OutboundMessage)
AbortResponse releases Slack state after final response delivery cannot recover.
func (*Connector) Authenticate ¶ added in v0.1.14
Authenticate identifies the bot and workspace before other frontends use the connector.
func (*Connector) ChannelAgentChoices ¶ added in v0.1.0
ChannelAgentChoices resolves current configured policy for a Slack channel ID.
func (*Connector) SendResponse ¶
SendResponse keeps one in-progress placeholder until the final answer arrives.
func (*Connector) SidebarChannelAgentChoices ¶ added in v0.1.0
func (c *Connector) SidebarChannelAgentChoices(ctx context.Context, channelID string) (name string, choices []string, err error)
SidebarChannelAgentChoices returns the stored name and display choices without contacting Slack. Unknown channels return their stable ID and no choices.
func (*Connector) SlackNames ¶ added in v0.1.17
SlackNames returns bare display names for Slack user, user group, and channel IDs, omitting IDs it cannot resolve. Users and groups come from a directory reloaded every 8 hours; channels come from stored facts without calling Slack.
func (*Connector) SlackTagsMatching ¶ added in v0.1.17
SlackTagsMatching returns user and group IDs whose bare names contain needle.
func (*Connector) StartEvents ¶ added in v0.1.0
StartEvents subscribes before starting live output consumption.