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

slackconnector

package
v0.2.24 Latest Latest
Warning

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

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

Documentation

Overview

Package slackconnector bridges Slack events into rocketclaw.

Index

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

func (c *Connector) Authenticate() error

Authenticate identifies the bot and workspace before other frontends use the connector.

func (*Connector) ChannelAgentChoices added in v0.1.0

func (c *Connector) ChannelAgentChoices(ctx context.Context, channelID string) ([]string, error)

ChannelAgentChoices resolves current configured policy for a Slack channel ID.

func (*Connector) SendResponse

func (c *Connector) SendResponse(ctx context.Context, msg *protocol.OutboundMessage) (err error)

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

func (c *Connector) SlackNames(ctx context.Context, ids []string) map[string]string

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

func (c *Connector) SlackTagsMatching(ctx context.Context, needle string) []string

SlackTagsMatching returns user and group IDs whose bare names contain needle.

func (*Connector) Start

func (c *Connector) Start(ctx context.Context)

Start begins consuming Slack input; call it after Authenticate.

func (*Connector) StartEvents added in v0.1.0

func (c *Connector) StartEvents(ctx context.Context, backend frontend.Backend) <-chan struct{}

StartEvents subscribes before starting live output consumption.

func (*Connector) Stop

func (c *Connector) Stop(context.Context) error

Stop stops Slack socket intake while leaving response delivery usable.

Jump to

Keyboard shortcuts

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