Documentation
¶
Index ¶
- Constants
- Variables
- func Clone[T any](p *T) *T
- func IsTextAttachment(name, normalizedMIME string) bool
- func NormalizeMIMEType(mimeType string) string
- func SetInboundAllowedAgents(inbound *InboundMessage, agents []string)
- func SlackThreadConversationID(channelID, threadTS string) string
- func SlackThreadSessionID(channelID, threadTS, agent string) string
- func StraightenImage(mimeType, data string) (uprightMIMEType, upright string, err error)
- type AmbientRecord
- type AmbientScreen
- type AskUserQuestionAnswer
- type AskUserQuestionOption
- type AskUserQuestionRequest
- type AttachmentPresence
- type BackgroundJob
- type BranchDeletion
- type Conversation
- type ConversationChange
- type CronRun
- type CronRunResult
- type CronjobMessage
- type Event
- type GoalAction
- type GoalRequest
- type InboundAttachment
- type InboundContent
- type InboundKind
- type InboundMessage
- type InboundResponse
- type LaterWorkKind
- type LaterWorkRow
- type OneOffCronjob
- type OutboundAttachment
- type OutboundMessage
- type OutboundPublisher
- type PrimaryTextRouter
- type RevertBoundary
- type ScheduledMessageState
- type SessionSummary
- type ShadowBinding
- type ShadowTurn
- type SlackReplyTarget
- type Source
- type Terminal
- type TextConversationTarget
- type ThreadQueueItem
- type TurnProgress
- type TurnStep
- type TurnStepState
- type UserQuestionAsker
Constants ¶
View Source
const ( InboundRawTextMetadataKey = "rocketclaw_raw_text" InboundOriginMetadataKey = "rocketclaw_origin" InboundMediaMetadataKey = "rocketclaw_media" InboundPrincipalMetadataKey = "rocketclaw_principal" InboundPrincipalNameMetadataKey = "rocketclaw_principal_name" InboundPrincipalEmailMetadataKey = "rocketclaw_principal_email" InboundAllowedAgentsMetadataKey = "rocketclaw_allowed_agents" InboundSenderSessionMetadataKey = "rocketclaw_sender_session" InboundSenderAgentMetadataKey = "rocketclaw_sender_agent" InboundSenderActionMetadataKey = "rocketclaw_sender_action" InboundAmbientMetadataKey = "rocketclaw_ambient" AmbientJoinedThread = "thread" AmbientWatchedChannel = "channel" AmbientDelegated = "delegated" SenderActionStopped = "stopped" )
View Source
const GoalCommandHelp = `` /* 252-byte string literal not displayed */
View Source
const MaxInboundTextAttachmentBytes = 256 << 10
Variables ¶
View Source
var ErrBridgeStopped = errors.New("bridge stopped")
View Source
var ErrGoalAlreadyActive = errors.New("goal already active")
Functions ¶
func IsTextAttachment ¶
func NormalizeMIMEType ¶ added in v0.1.0
func SetInboundAllowedAgents ¶
func SetInboundAllowedAgents(inbound *InboundMessage, agents []string)
func SlackThreadSessionID ¶ added in v0.2.48
func StraightenImage ¶ added in v0.2.59
Types ¶
type AmbientRecord ¶ added in v0.2.71
type AmbientScreen ¶ added in v0.2.71
type AmbientScreen struct {
WakeWhen string `json:"-"`
IncompleteContext bool `json:"-"`
Earlier []AmbientRecord `json:"earlier_messages"`
Message AmbientRecord `json:"message"`
}
type AskUserQuestionAnswer ¶
type AskUserQuestionOption ¶
type AskUserQuestionOption struct{ Label, Value, Description string }
type AskUserQuestionRequest ¶
type AskUserQuestionRequest struct {
ID, Question, Details string
ConversationID string
Options []AskUserQuestionOption
Multiple bool
}
type AttachmentPresence ¶ added in v0.1.12
type AttachmentPresence string
const ( AttachmentPresenceNone AttachmentPresence = "" AttachmentPresenceUnsupported AttachmentPresence = "unsupported" AttachmentPresenceImages AttachmentPresence = "images" )
type BackgroundJob ¶ added in v0.1.19
type BranchDeletion ¶ added in v0.2.63
type Conversation ¶ added in v0.1.0
type ConversationChange ¶ added in v0.1.12
type CronRunResult ¶
type CronjobMessage ¶
type Event ¶ added in v0.1.0
type Event struct {
Message *OutboundMessage
Acknowledgement chan error
}
type GoalAction ¶ added in v0.1.12
type GoalAction string
const ( GoalActionNone GoalAction = "" GoalActionKickoff GoalAction = "goal" GoalActionContinue GoalAction = "goal_continuation" )
type GoalRequest ¶
func ParseGoalRequest ¶
func ParseGoalRequest(text string) (goal GoalRequest, rejection string)
type InboundAttachment ¶
type InboundContent ¶
type InboundContent struct {
Text string
TextAttachments []string
Attachments []InboundAttachment
AttachmentPresence AttachmentPresence
AttachmentWarnings []string
}
type InboundKind ¶
type InboundKind string
const ( InboundKindPrompt InboundKind = "prompt" InboundKindSteer InboundKind = "steer" InboundKindEnqueue InboundKind = "enqueue" InboundKindHeld InboundKind = "held" InboundKindCancel InboundKind = "cancel" )
type InboundMessage ¶
type InboundMessage struct {
Source Source
Text string
Attachments []InboundAttachment
SlackReply *SlackReplyTarget
AttachmentPresence AttachmentPresence
Human bool
GoalTurn bool
AttachmentWarnings []string
Kind InboundKind
GoalAction GoalAction
PreserveWhitespace bool
ConversationID string
Metadata map[string]string
ExternalMCPMetadata map[string]string
SyncDestination string
RequireOutputDecision bool
Cronjob *CronjobMessage
OriginHeader string
SlackRoot *InboundMessage `json:"-"`
// contains filtered or unexported fields
}
func NewInboundMessage ¶
func NewInboundMessage(source Source, kind InboundKind, text string, human bool) *InboundMessage
func NewInboundMessageFromContent ¶
func NewInboundMessageFromContent(source Source, kind InboundKind, content *InboundContent, human bool) *InboundMessage
func (*InboundMessage) CompleteResponseWithAttachments ¶
func (m *InboundMessage) CompleteResponseWithAttachments(text string, attachments []OutboundAttachment, err error)
func (*InboundMessage) EnableResponseWait ¶
func (m *InboundMessage) EnableResponseWait() <-chan InboundResponse
type InboundResponse ¶
type InboundResponse struct {
Text string
Attachments []OutboundAttachment
Err error
}
type LaterWorkKind ¶
type LaterWorkKind string
const ( LaterWorkQueued LaterWorkKind = "queued" LaterWorkScheduled LaterWorkKind = "scheduled" )
type LaterWorkRow ¶
type LaterWorkRow struct {
Kind LaterWorkKind
Queue ThreadQueueItem
ScheduledID string
Scheduled ScheduledMessageState
}
func MixedLaterWork ¶
func MixedLaterWork(queue []ThreadQueueItem, scheduled map[string]ScheduledMessageState) []LaterWorkRow
type OneOffCronjob ¶
type OutboundAttachment ¶
type OutboundAttachment struct {
ID string
ConversationID string `json:"conversation_id,omitempty"`
Name, MIMEType string
Data []byte `json:"-"`
OriginalUnverified bool
Size int64
}
func CloneOutboundAttachments ¶
func CloneOutboundAttachments(attachments []OutboundAttachment) []OutboundAttachment
type OutboundMessage ¶
type OutboundMessage struct {
ConsumedID, ConsumedText string
ConsumedHeader string
ConsumedRawText string
ConsumedSource Source
Text string
ConversationID, TurnID string
Agent string
Model, SourceConversationID string
ReasoningEffort *string
Cronjob *CronjobMessage
Complete bool
SlackReply *SlackReplyTarget
Attachments []OutboundAttachment
GoalTurn, GoalComplete, GoalActive bool
GoalTurnNumber, GoalMaxTurns int
Terminal Terminal
ChannelQuiet, Deferred bool
}
func CloneOutboundMessage ¶
func CloneOutboundMessage(message *OutboundMessage) *OutboundMessage
func NewOutboundMessage ¶
func NewOutboundMessage(conversationID, text string) *OutboundMessage
func (*OutboundMessage) PostsNothing ¶ added in v0.2.71
func (m *OutboundMessage) PostsNothing() bool
type OutboundPublisher ¶
type OutboundPublisher interface {
PublishOutbound(context.Context, *OutboundMessage) error
}
type PrimaryTextRouter ¶
type PrimaryTextRouter interface {
ScreenAmbient(ctx context.Context, target TextConversationTarget, screen *AmbientScreen) (pass bool)
MentionThread(target TextConversationTarget) (recorded, report bool, err error)
SubmitMention(ctx context.Context, agent string, target TextConversationTarget, inbound *InboundMessage) (bool, error)
InterruptTurn(ctx context.Context, turnID string) error
WebURL(conversationID string) (string, error)
}
type RevertBoundary ¶ added in v0.2.63
type RevertBoundary string
const ( RevertBefore RevertBoundary = "before" RevertThrough RevertBoundary = "through" )
type ScheduledMessageState ¶
type ScheduledMessageState struct {
ConversationID string `json:"conversation_id,omitempty"`
Agent string `json:"agent,omitempty"`
Message string `json:"message,omitempty"`
DueAt time.Time `json:"due_at,omitzero"`
Recurring bool `json:"recurring,omitempty"`
Interval time.Duration `json:"interval,omitempty"`
Origin string `json:"origin,omitempty"`
}
type SessionSummary ¶ added in v0.1.0
type ShadowBinding ¶ added in v0.1.33
type ShadowBinding struct {
ParentConversationID, ParentAgent, ShadowAgent, ChildConversationID string
Turns []ShadowTurn
}
type ShadowTurn ¶ added in v0.1.33
type SlackReplyTarget ¶
type SlackReplyTarget struct{ ChannelID, MessageTS, ThreadTS, EditTS string }
type TextConversationTarget ¶
type TextConversationTarget struct{ ChannelID, MessageID, ThreadID, Agent string }
type ThreadQueueItem ¶
type ThreadQueueItem struct {
Kind InboundKind
ID string
ConversationID string
Message string
Content InboundContent
Source Source
SlackReply *SlackReplyTarget
Principal string
StashAt time.Time
Position int
ParkAfter string
SlackChannel string
SlackTS string
Inbound *InboundMessage
}
type TurnProgress ¶ added in v0.2.26
type TurnStep ¶ added in v0.2.26
type TurnStep struct {
ID, Title string
State TurnStepState
}
type TurnStepState ¶ added in v0.2.26
type TurnStepState string
const ( TurnStepRunning TurnStepState = "running" TurnStepDone TurnStepState = "done" TurnStepFailed TurnStepState = "failed" )
type UserQuestionAsker ¶
type UserQuestionAsker interface {
AskUserQuestion(context.Context, *AskUserQuestionRequest) (AskUserQuestionAnswer, error)
}
Click to show internal directories.
Click to hide internal directories.