Documentation
¶
Overview ¶
Package slackconnector bridges Slack events into rocketclaw.
Index ¶
- type Connector
- func (c *Connector) AbortResponse(msg *protocol.OutboundMessage)
- func (c *Connector) ActivateEnqueue(ctx context.Context, item *protocol.ThreadQueueItem, ...) error
- func (c *Connector) AskUserQuestion(ctx context.Context, req *protocol.AskUserQuestionRequest) (protocol.AskUserQuestionAnswer, error)
- func (c *Connector) ChannelAgentChoices(ctx context.Context, channelID string) ([]string, error)
- func (c *Connector) CleanupExternalMCPRelay(ctx context.Context, replyTarget *protocol.SlackReplyTarget)
- func (c *Connector) CleanupPendingReplyPlaceholder(ctx context.Context, replyTarget *protocol.SlackReplyTarget)
- func (c *Connector) DiscardPendingSteers(ctx context.Context, steers []protocol.PendingSteer)
- func (c *Connector) DrainSteers(ctx context.Context, conversationID string) []string
- func (c *Connector) RestorePendingSteers(conversationID string, steers []protocol.PendingSteer)
- func (c *Connector) SendCronjobRoot(ctx context.Context, msg *protocol.OutboundMessage) (protocol.TextConversationTarget, error)
- func (c *Connector) SendExternalMCPRelay(ctx context.Context, channelID, threadTS string, ...) (*protocol.SlackReplyTarget, error)
- func (c *Connector) SendResponse(ctx context.Context, msg *protocol.OutboundMessage) error
- func (c *Connector) SetPendingSteersSink(sink protocol.PendingSteersSink)
- func (c *Connector) SidebarChannelAgentChoices(ctx context.Context, channelID string) (name string, choices []string, err error)
- func (c *Connector) Start(ctx context.Context) error
- func (c *Connector) StartEvents(ctx context.Context, backend frontend.Backend) <-chan struct{}
- func (c *Connector) StartNewThreadRoot(ctx context.Context, req *protocol.StartNewThreadRequest) (protocol.StartNewThreadRootResult, error)
- 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) ActivateEnqueue ¶
func (c *Connector) ActivateEnqueue(ctx context.Context, item *protocol.ThreadQueueItem, inbound *protocol.InboundMessage) error
ActivateEnqueue posts the 📨 consume card, then one in-progress placeholder.
func (*Connector) AskUserQuestion ¶
func (c *Connector) AskUserQuestion(ctx context.Context, req *protocol.AskUserQuestionRequest) (protocol.AskUserQuestionAnswer, error)
AskUserQuestion posts one in-message Slack question and waits for the human answer.
func (*Connector) ChannelAgentChoices ¶ added in v0.1.0
ChannelAgentChoices resolves current configured policy for a Slack channel ID.
func (*Connector) CleanupExternalMCPRelay ¶
func (c *Connector) CleanupExternalMCPRelay(ctx context.Context, replyTarget *protocol.SlackReplyTarget)
CleanupExternalMCPRelay removes a failed new-conversation relay and its placeholder.
func (*Connector) CleanupPendingReplyPlaceholder ¶
func (c *Connector) CleanupPendingReplyPlaceholder(ctx context.Context, replyTarget *protocol.SlackReplyTarget)
CleanupPendingReplyPlaceholder removes a relay placeholder that no response turn claimed.
func (*Connector) DiscardPendingSteers ¶
func (c *Connector) DiscardPendingSteers(ctx context.Context, steers []protocol.PendingSteer)
DiscardPendingSteers drops uninjected Slack Steers with the interruption reaction.
func (*Connector) DrainSteers ¶
DrainSteers injects waiting Slack Steers into the current turn.
func (*Connector) RestorePendingSteers ¶
func (c *Connector) RestorePendingSteers(conversationID string, steers []protocol.PendingSteer)
RestorePendingSteers loads persisted Slack Steers onto the connector before a recovered turn can drain.
func (*Connector) SendCronjobRoot ¶ added in v0.1.0
func (c *Connector) SendCronjobRoot(ctx context.Context, msg *protocol.OutboundMessage) (protocol.TextConversationTarget, error)
SendCronjobRoot posts a completed scheduled report as a new Slack thread.
func (*Connector) SendExternalMCPRelay ¶
func (c *Connector) SendExternalMCPRelay(ctx context.Context, channelID, threadTS string, relay *protocol.ExternalMCPRelay) (*protocol.SlackReplyTarget, error)
SendExternalMCPRelay mirrors one external MCP request into a Slack root or thread.
func (*Connector) SendResponse ¶
SendResponse keeps one in-progress placeholder until the final answer arrives.
func (*Connector) SetPendingSteersSink ¶
func (c *Connector) SetPendingSteersSink(sink protocol.PendingSteersSink)
SetPendingSteersSink copies live pending Slack Steers onto the active-turn row.
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) StartEvents ¶ added in v0.1.0
StartEvents subscribes before starting live output consumption.
func (*Connector) StartNewThreadRoot ¶
func (c *Connector) StartNewThreadRoot(ctx context.Context, req *protocol.StartNewThreadRequest) (protocol.StartNewThreadRootResult, error)
StartNewThreadRoot posts the root message for a model-created Slack conversation.