Documentation
¶
Index ¶
- type Channel
- type ChannelType
- type Direct
- type Email
- func (e *Email) DeprovisionInbox(ctx context.Context, inboxID string) error
- func (e *Email) Mail() *clients.AgentMailClient
- func (e *Email) ProvisionInbox(ctx context.Context, key string, displayName string) (string, error)
- func (e *Email) ResolveInbound(ctx context.Context, toAddress string) (workspaceID uint, agentID string, err error)
- func (e *Email) SendToAgent(ctx context.Context, workspaceID uint, agentID string, message Message) (*SendResult, error)
- func (e *Email) SendToRun(ctx context.Context, workspaceID uint, runID string, message Message) (*SendResult, error)
- func (e *Email) Type() ChannelType
- type ErrChannelTypeNotRegistered
- type InboundChannel
- type Message
- type Registry
- type SMS
- func (s *SMS) ResolveInbound(ctx context.Context, toNumber string) (workspaceID uint, agentID string, err error)
- func (s *SMS) SendToAgent(ctx context.Context, workspaceID uint, agentID string, message Message) (*SendResult, error)
- func (s *SMS) SendToRun(ctx context.Context, workspaceID uint, runID string, message Message) (*SendResult, error)
- func (s *SMS) Type() ChannelType
- type SendResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel interface {
Type() ChannelType
SendToAgent(ctx context.Context, workspaceID uint, agentID string, message Message) (*SendResult, error)
SendToRun(ctx context.Context, workspaceID uint, runID string, message Message) (*SendResult, error)
}
type ChannelType ¶
type ChannelType string
const (
ChannelTypeDirect ChannelType = "direct"
)
const ChannelTypeEmail ChannelType = "email"
const ChannelTypeSMS ChannelType = "sms"
type Direct ¶
type Direct struct {
// contains filtered or unexported fields
}
func NewDirect ¶
func NewDirect(agents *orchestration.AgentAPI) *Direct
func (*Direct) SendToAgent ¶
func (*Direct) Type ¶
func (d *Direct) Type() ChannelType
type Email ¶ added in v0.1.96
type Email struct {
// contains filtered or unexported fields
}
func NewEmail ¶ added in v0.1.96
func NewEmail(agents *orchestration.AgentAPI, repo repository.BackendRepository, mail *clients.AgentMailClient) *Email
func (*Email) DeprovisionInbox ¶ added in v0.1.96
func (*Email) Mail ¶ added in v0.1.96
func (e *Email) Mail() *clients.AgentMailClient
func (*Email) ProvisionInbox ¶ added in v0.1.96
func (*Email) ResolveInbound ¶ added in v0.1.96
func (*Email) SendToAgent ¶ added in v0.1.96
func (*Email) Type ¶ added in v0.1.96
func (e *Email) Type() ChannelType
type ErrChannelTypeNotRegistered ¶
type ErrChannelTypeNotRegistered struct {
ChannelType ChannelType
}
func (*ErrChannelTypeNotRegistered) Error ¶
func (e *ErrChannelTypeNotRegistered) Error() string
type InboundChannel ¶ added in v0.1.96
type InboundChannel interface {
Channel
ResolveInbound(ctx context.Context, address string) (workspaceID uint, agentID string, err error)
}
InboundChannel is implemented by channels that accept inbound messages (email, SMS).
type Message ¶
type Message struct {
Message string `json:"message"`
IdempotencyKey string `json:"idempotency_key,omitempty"`
TaskID string `json:"task_id,omitempty"`
SessionID string `json:"session_id,omitempty"`
SessionKey *string `json:"session_key,omitempty"`
Deliver *bool `json:"deliver,omitempty"`
TimeoutMs *int `json:"timeout_ms,omitempty"`
Policy *orchestration.RunExecutionPolicy `json:"policy,omitempty"`
Lane *string `json:"lane,omitempty"`
ExtraSystemPrompt *string `json:"extra_system_prompt,omitempty"`
InputProvenance *orchestration.InputProvenance `json:"input_provenance,omitempty"`
Routing *orchestration.RoutingContext `json:"routing,omitempty"`
Attachments []map[string]any `json:"attachments,omitempty"`
Label *string `json:"label,omitempty"`
SpawnedBy *string `json:"spawned_by,omitempty"`
QueueMode types.AgentQueueMode `json:"queue_mode,omitempty"`
}
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
type SMS ¶ added in v0.1.96
type SMS struct {
// contains filtered or unexported fields
}
func NewSMS ¶ added in v0.1.96
func NewSMS(agents *orchestration.AgentAPI, repo repository.BackendRepository) *SMS
func (*SMS) ResolveInbound ¶ added in v0.1.96
func (*SMS) SendToAgent ¶ added in v0.1.96
func (*SMS) Type ¶ added in v0.1.96
func (s *SMS) Type() ChannelType
type SendResult ¶
type SendResult struct {
Accepted bool `json:"accepted"`
IdempotentHit bool `json:"idempotent_hit"`
Task *types.AgentTask `json:"task,omitempty"`
RunID *string `json:"run_id,omitempty"`
DeliveryOutcome types.RunInputDeliveryOutcome `json:"delivery_outcome,omitempty"`
Interaction *types.RunInteraction `json:"interaction,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.