Documentation
¶
Index ¶
- Variables
- type Error
- type EventBroker
- type PairingClient
- type Service
- func (s *Service) AgentConnected(ctx context.Context, agent protocol.Actor)
- func (s *Service) AgentDisconnected(ctx context.Context, agent protocol.Actor, reason string, err error)
- func (s *Service) AgentWakeDelivered(ctx context.Context, agent protocol.Actor, event protocol.Event)
- func (s *Service) AgentWakeFailed(ctx context.Context, agent protocol.Actor, event protocol.Event, err error)
- func (s *Service) ApplyConfigContext(ctx context.Context, request protocol.ApplyConfigRequest) (protocol.ApplyConfigResult, error)
- func (s *Service) AuthenticateAgentTokenContext(ctx context.Context, token string) (authn.Claims, bool, error)
- func (s *Service) Close() error
- func (s *Service) CreateRoom(request protocol.CreateRoomRequest) (protocol.Room, error)
- func (s *Service) CreateRoomContext(ctx context.Context, request protocol.CreateRoomRequest) (protocol.Room, error)
- func (s *Service) GetAgent(agentID string) (protocol.AgentSummary, error)
- func (s *Service) GetAgentContext(ctx context.Context, agentID string) (protocol.AgentSummary, error)
- func (s *Service) GetDirectConversation(dmID string) (protocol.DirectConversation, error)
- func (s *Service) GetRoom(roomID string) (protocol.Room, error)
- func (s *Service) GetRoomContext(ctx context.Context, roomID string) (protocol.Room, error)
- func (s *Service) GetThread(threadID string) (protocol.Thread, error)
- func (s *Service) GetThreadContext(ctx context.Context, threadID string) (protocol.Thread, error)
- func (s *Service) Health(ctx context.Context) error
- func (s *Service) ListAgents() ([]protocol.AgentSummary, error)
- func (s *Service) ListAgentsContext(ctx context.Context, page protocol.PageRequest) (protocol.AgentPage, error)
- func (s *Service) ListArtifacts(filter protocol.ArtifactFilter, before string, limit int) (protocol.ArtifactPage, error)
- func (s *Service) ListArtifactsContext(ctx context.Context, filter protocol.ArtifactFilter, page protocol.PageRequest) (protocol.ArtifactPage, error)
- func (s *Service) ListDMMessages(dmID string, before string, limit int) (protocol.MessagePage, error)
- func (s *Service) ListDMMessagesContext(ctx context.Context, dmID string, page protocol.PageRequest) (protocol.MessagePage, error)
- func (s *Service) ListDirectConversations() (protocol.DirectConversationPage, error)
- func (s *Service) ListDirectConversationsContext(ctx context.Context, page protocol.PageRequest) (protocol.DirectConversationPage, error)
- func (s *Service) ListPairings() ([]protocol.Pairing, error)
- func (s *Service) ListPairingsContext(_ context.Context, page protocol.PageRequest) (protocol.PairingPage, error)
- func (s *Service) ListRoomMessages(roomID string, before string, limit int) (protocol.MessagePage, error)
- func (s *Service) ListRoomMessagesContext(ctx context.Context, roomID string, page protocol.PageRequest) (protocol.MessagePage, error)
- func (s *Service) ListRooms() ([]protocol.Room, error)
- func (s *Service) ListRoomsContext(ctx context.Context, page protocol.PageRequest) (protocol.RoomPage, error)
- func (s *Service) ListThreadMessages(threadID string, before string, limit int) (protocol.MessagePage, error)
- func (s *Service) ListThreadMessagesContext(ctx context.Context, threadID string, page protocol.PageRequest) (protocol.MessagePage, error)
- func (s *Service) ListThreads(roomID string) (protocol.ThreadPage, error)
- func (s *Service) ListThreadsContext(ctx context.Context, roomID string, page protocol.PageRequest) (protocol.ThreadPage, error)
- func (s *Service) Network() protocol.Network
- func (s *Service) PairingAgents(ctx context.Context, pairingID string) ([]protocol.AgentSummary, error)
- func (s *Service) PairingAgentsContext(ctx context.Context, pairingID string, page protocol.PageRequest) (protocol.AgentPage, error)
- func (s *Service) PairingNetwork(ctx context.Context, pairingID string) (protocol.Network, error)
- func (s *Service) PairingRooms(ctx context.Context, pairingID string) ([]protocol.Room, error)
- func (s *Service) PairingRoomsContext(ctx context.Context, pairingID string, page protocol.PageRequest) (protocol.RoomPage, error)
- func (s *Service) ReconcileRoomContext(ctx context.Context, request protocol.CreateRoomRequest) (protocol.Room, error)
- func (s *Service) RegisterAgentContext(ctx context.Context, request protocol.RegisterAgentRequest) (protocol.AgentRegistration, error)
- func (s *Service) RemoveAgentContext(ctx context.Context, agentID string) (protocol.RemoveResult, error)
- func (s *Service) RemoveRoomContext(ctx context.Context, roomID string) (protocol.RemoveResult, error)
- func (s *Service) SendMessage(request protocol.SendMessageRequest) (protocol.MessageAccepted, error)
- func (s *Service) SendMessageContext(ctx context.Context, request protocol.SendMessageRequest) (protocol.MessageAccepted, error)
- func (s *Service) Subscribe(ctx context.Context) <-chan protocol.Event
- func (s *Service) SubscribeFrom(ctx context.Context, lastEventID string) <-chan protocol.Event
- func (s *Service) UpdateRoomMembers(ctx context.Context, roomID string, request protocol.UpdateRoomMembersRequest) (protocol.Room, error)
- type ServiceConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidRoomID = errors.New("room id is required") ErrInvalidRoomRequest = errors.New("invalid room request") ErrRoomExists = errors.New("room already exists") ErrUnknownRoom = errors.New("unknown room") ErrUnknownThread = errors.New("unknown thread") ErrUnknownAgent = errors.New("unknown agent") ErrInvalidDMID = errors.New("dm id is required") ErrInvalidCursor = errors.New("invalid cursor") ErrInvalidMessage = errors.New("invalid message request") ErrUnknownDM = errors.New("unknown direct conversation") ErrArtifactFilter = errors.New("artifact filter is required") ErrUnknownPairing = errors.New("unknown pairing") ErrPairingClientMissing = errors.New("pairing client is not configured") ErrHumanIngressDisabled = errors.New("human ingress is disabled") ErrDirectMessagesDisabled = errors.New("direct messages are disabled") ErrRemotePairing = errors.New("paired network request failed") ErrAgentConflict = errors.New("agent identity conflict") ErrAgentForbidden = errors.New("agent identity is forbidden") ErrWriteForbidden = errors.New("room write policy forbids sender") )
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func (*Error) StatusCode ¶
type EventBroker ¶
type PairingClient ¶
type PairingClient interface {
FetchNetwork(ctx context.Context, pairing protocol.Pairing) (protocol.Network, error)
FetchRooms(ctx context.Context, pairing protocol.Pairing) ([]protocol.Room, error)
FetchAgents(ctx context.Context, pairing protocol.Pairing) ([]protocol.AgentSummary, error)
RelayMessage(ctx context.Context, pairing protocol.Pairing, request protocol.SendMessageRequest) (protocol.MessageAccepted, error)
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(config ServiceConfig) *Service
func (*Service) AgentConnected ¶ added in v0.1.7
func (*Service) AgentDisconnected ¶ added in v0.1.7
func (*Service) AgentWakeDelivered ¶ added in v0.1.7
func (*Service) AgentWakeFailed ¶ added in v0.1.7
func (*Service) ApplyConfigContext ¶ added in v0.1.12
func (s *Service) ApplyConfigContext( ctx context.Context, request protocol.ApplyConfigRequest, ) (protocol.ApplyConfigResult, error)
func (*Service) AuthenticateAgentTokenContext ¶ added in v0.1.1
func (*Service) CreateRoom ¶
func (*Service) CreateRoomContext ¶
func (*Service) GetAgent ¶
func (s *Service) GetAgent(agentID string) (protocol.AgentSummary, error)
func (*Service) GetAgentContext ¶ added in v0.1.11
func (*Service) GetDirectConversation ¶
func (s *Service) GetDirectConversation(dmID string) (protocol.DirectConversation, error)
func (*Service) GetRoomContext ¶ added in v0.1.11
func (*Service) GetThreadContext ¶ added in v0.1.11
func (*Service) ListAgents ¶
func (s *Service) ListAgents() ([]protocol.AgentSummary, error)
func (*Service) ListAgentsContext ¶
func (*Service) ListArtifacts ¶
func (s *Service) ListArtifacts( filter protocol.ArtifactFilter, before string, limit int, ) (protocol.ArtifactPage, error)
func (*Service) ListArtifactsContext ¶
func (s *Service) ListArtifactsContext( ctx context.Context, filter protocol.ArtifactFilter, page protocol.PageRequest, ) (protocol.ArtifactPage, error)
func (*Service) ListDMMessages ¶
func (*Service) ListDMMessagesContext ¶
func (s *Service) ListDMMessagesContext( ctx context.Context, dmID string, page protocol.PageRequest, ) (protocol.MessagePage, error)
func (*Service) ListDirectConversations ¶
func (s *Service) ListDirectConversations() (protocol.DirectConversationPage, error)
func (*Service) ListDirectConversationsContext ¶
func (s *Service) ListDirectConversationsContext(ctx context.Context, page protocol.PageRequest) (protocol.DirectConversationPage, error)
func (*Service) ListPairingsContext ¶
func (s *Service) ListPairingsContext(_ context.Context, page protocol.PageRequest) (protocol.PairingPage, error)
func (*Service) ListRoomMessages ¶
func (*Service) ListRoomMessagesContext ¶
func (s *Service) ListRoomMessagesContext( ctx context.Context, roomID string, page protocol.PageRequest, ) (protocol.MessagePage, error)
func (*Service) ListRoomsContext ¶
func (*Service) ListThreadMessages ¶
func (*Service) ListThreadMessagesContext ¶
func (s *Service) ListThreadMessagesContext( ctx context.Context, threadID string, page protocol.PageRequest, ) (protocol.MessagePage, error)
func (*Service) ListThreads ¶
func (s *Service) ListThreads(roomID string) (protocol.ThreadPage, error)
func (*Service) ListThreadsContext ¶
func (s *Service) ListThreadsContext(ctx context.Context, roomID string, page protocol.PageRequest) (protocol.ThreadPage, error)
func (*Service) PairingAgents ¶
func (*Service) PairingAgentsContext ¶
func (*Service) PairingNetwork ¶
func (*Service) PairingRooms ¶
func (*Service) PairingRoomsContext ¶
func (*Service) ReconcileRoomContext ¶ added in v0.1.11
func (*Service) RegisterAgentContext ¶
func (s *Service) RegisterAgentContext( ctx context.Context, request protocol.RegisterAgentRequest, ) (protocol.AgentRegistration, error)
func (*Service) RemoveAgentContext ¶ added in v0.1.10
func (*Service) RemoveRoomContext ¶ added in v0.1.10
func (*Service) SendMessage ¶
func (s *Service) SendMessage(request protocol.SendMessageRequest) (protocol.MessageAccepted, error)
func (*Service) SendMessageContext ¶
func (s *Service) SendMessageContext(ctx context.Context, request protocol.SendMessageRequest) (protocol.MessageAccepted, error)
func (*Service) SubscribeFrom ¶
type ServiceConfig ¶
type ServiceConfig struct {
AllowHumanIngress bool
DebugEvents bool
DisableDirectMessages bool
NetworkID string
NetworkName string
Pairings []protocol.Pairing
Version string
Store store.RoomStore
Messages store.MessageStore
Broker EventBroker
PairingClient PairingClient
}
Click to show internal directories.
Click to hide internal directories.