Documentation
¶
Index ¶
- type Firestore
- func (r *Firestore) AddAlertsToList(ctx context.Context, listID types.AlertListID, alertIDs []types.AlertID) error
- func (r *Firestore) AddTicketToTag(ctx context.Context, tagID string, ticketID types.TicketID) error
- func (r *Firestore) ArchiveKnowledge(ctx context.Context, topic types.KnowledgeTopic, slug types.KnowledgeSlug) error
- func (r *Firestore) BatchGetAlerts(ctx context.Context, alertIDs []types.AlertID) (alert.Alerts, error)
- func (r *Firestore) BatchGetTickets(ctx context.Context, ticketIDs []types.TicketID) ([]*ticket.Ticket, error)
- func (r *Firestore) BatchPutAlerts(ctx context.Context, alerts alert.Alerts) error
- func (r *Firestore) BatchSaveAgentMemories(ctx context.Context, memories []*memory.AgentMemory) error
- func (r *Firestore) BatchUpdateTicketsStatus(ctx context.Context, ticketIDs []types.TicketID, status types.TicketStatus) error
- func (r *Firestore) BindAlertsToTicket(ctx context.Context, alertIDs []types.AlertID, ticketID types.TicketID) error
- func (r *Firestore) CalculateKnowledgeSize(ctx context.Context, topic types.KnowledgeTopic) (int, error)
- func (r *Firestore) Close() error
- func (r *Firestore) CountActivities(ctx context.Context) (int, error)
- func (r *Firestore) CountAlerts(ctx context.Context) (int, error)
- func (r *Firestore) CountAlertsBySchema(ctx context.Context, schema types.AlertSchema) (int, error)
- func (r *Firestore) CountAlertsWithoutTicket(ctx context.Context) (int, error)
- func (r *Firestore) CountDeclinedAlerts(ctx context.Context) (int, error)
- func (r *Firestore) CountTags(ctx context.Context) (int, error)
- func (r *Firestore) CountTicketComments(ctx context.Context, ticketID types.TicketID) (int, error)
- func (r *Firestore) CountTickets(ctx context.Context) (int, error)
- func (r *Firestore) CountTicketsByStatus(ctx context.Context, statuses []types.TicketStatus, keyword, assigneeID string) (int, error)
- func (r *Firestore) CreateNotice(ctx context.Context, notice *notice.Notice) error
- func (r *Firestore) CreateTagWithID(ctx context.Context, tag *tag.Tag) error
- func (r *Firestore) DeleteActivity(ctx context.Context, activityID types.ActivityID) error
- func (r *Firestore) DeleteAgentMemoriesBatch(ctx context.Context, agentID string, memoryIDs []types.AgentMemoryID) (int, error)
- func (r *Firestore) DeleteAlertList(ctx context.Context, listID types.AlertListID) error
- func (r *Firestore) DeleteSession(ctx context.Context, sessionID types.SessionID) error
- func (r *Firestore) DeleteTag(ctx context.Context, tagID string) error
- func (r *Firestore) DeleteTagByID(ctx context.Context, tagID string) error
- func (r *Firestore) DeleteTagsByTicketID(ctx context.Context, ticketID types.TicketID) error
- func (r *Firestore) DeleteTicket(ctx context.Context, ticketID types.TicketID) error
- func (r *Firestore) DeleteTicketComment(ctx context.Context, ticketID types.TicketID, commentID types.CommentID) error
- func (r *Firestore) DeleteToken(ctx context.Context, tokenID auth.TokenID) error
- func (r *Firestore) FindNearestAlerts(ctx context.Context, embedding []float32, limit int) (alert.Alerts, error)
- func (r *Firestore) FindNearestTickets(ctx context.Context, embedding []float32, limit int) ([]*ticket.Ticket, error)
- func (r *Firestore) FindNearestTicketsWithSpan(ctx context.Context, embedding []float32, begin, end time.Time, limit int) ([]*ticket.Ticket, error)
- func (r *Firestore) FindSimilarAlerts(ctx context.Context, target alert.Alert, limit int) (alert.Alerts, error)
- func (r *Firestore) GetActivities(ctx context.Context, offset, limit int) ([]*activity.Activity, error)
- func (r *Firestore) GetAgentMemory(ctx context.Context, agentID string, id types.AgentMemoryID) (*memory.AgentMemory, error)
- func (r *Firestore) GetAlert(ctx context.Context, alertID types.AlertID) (*alert.Alert, error)
- func (r *Firestore) GetAlertList(ctx context.Context, listID types.AlertListID) (*alert.List, error)
- func (r *Firestore) GetAlertListByThread(ctx context.Context, thread slack.Thread) (*alert.List, error)
- func (r *Firestore) GetAlertLists(ctx context.Context) ([]*alert.List, error)
- func (r *Firestore) GetAlertListsInThread(ctx context.Context, thread slack.Thread) ([]*alert.List, error)
- func (r *Firestore) GetAlertWithoutEmbedding(ctx context.Context) (alert.Alerts, error)
- func (r *Firestore) GetAlertWithoutTicket(ctx context.Context, offset, limit int) (alert.Alerts, error)
- func (r *Firestore) GetAlertsByIDs(ctx context.Context, alertIDs []types.AlertID) (alert.Alerts, error)
- func (r *Firestore) GetAlertsBySpan(ctx context.Context, begin, end time.Time) (alert.Alerts, error)
- func (r *Firestore) GetAlertsByThread(ctx context.Context, thread slack.Thread) (alert.Alerts, error)
- func (r *Firestore) GetAlertsByTicketID(ctx context.Context, ticketID types.TicketID) (alert.Alerts, error)
- func (r *Firestore) GetAlertsWithInvalidEmbedding(ctx context.Context) (alert.Alerts, error)
- func (r *Firestore) GetAllAlerts(ctx context.Context, offset, limit int) (alert.Alerts, error)
- func (r *Firestore) GetAllTickets(ctx context.Context, offset, limit int) ([]*ticket.Ticket, error)
- func (f *Firestore) GetClient() *firestore.Client
- func (r *Firestore) GetDeclinedAlerts(ctx context.Context, offset, limit int) (alert.Alerts, error)
- func (r *Firestore) GetKnowledge(ctx context.Context, topic types.KnowledgeTopic, slug types.KnowledgeSlug) (*knowledge.Knowledge, error)
- func (r *Firestore) GetKnowledgeByCommit(ctx context.Context, topic types.KnowledgeTopic, slug types.KnowledgeSlug, ...) (*knowledge.Knowledge, error)
- func (r *Firestore) GetKnowledges(ctx context.Context, topic types.KnowledgeTopic) ([]*knowledge.Knowledge, error)
- func (r *Firestore) GetLatestAlertByThread(ctx context.Context, thread slack.Thread) (*alert.Alert, error)
- func (r *Firestore) GetLatestAlertListInThread(ctx context.Context, thread slack.Thread) (*alert.List, error)
- func (r *Firestore) GetLatestHistory(ctx context.Context, ticketID types.TicketID) (*ticket.History, error)
- func (r *Firestore) GetNotice(ctx context.Context, id types.NoticeID) (*notice.Notice, error)
- func (r *Firestore) GetNotices(ctx context.Context) ([]*notice.Notice, error)
- func (r *Firestore) GetOrCreateTagByName(ctx context.Context, name, description, color, createdBy string) (*tag.Tag, error)
- func (r *Firestore) GetRefineGroup(ctx context.Context, groupID types.RefineGroupID) (*refine.Group, error)
- func (r *Firestore) GetSession(ctx context.Context, sessionID types.SessionID) (*session.Session, error)
- func (r *Firestore) GetSessionMessages(ctx context.Context, sessionID types.SessionID) ([]*session.Message, error)
- func (r *Firestore) GetSessionsByTicket(ctx context.Context, ticketID types.TicketID) ([]*session.Session, error)
- func (r *Firestore) GetTag(ctx context.Context, tagID string) (*tag.Tag, error)
- func (r *Firestore) GetTagByID(ctx context.Context, tagID string) (*tag.Tag, error)
- func (r *Firestore) GetTagByName(ctx context.Context, name string) (*tag.Tag, error)
- func (r *Firestore) GetTags(ctx context.Context) ([]*tag.Tag, error)
- func (r *Firestore) GetTagsByIDs(ctx context.Context, tagIDs []string) ([]*tag.Tag, error)
- func (r *Firestore) GetTagsByTicketID(ctx context.Context, ticketID types.TicketID) ([]*tag.Tag, error)
- func (r *Firestore) GetTicket(ctx context.Context, ticketID types.TicketID) (*ticket.Ticket, error)
- func (r *Firestore) GetTicketByThread(ctx context.Context, thread slack.Thread) (*ticket.Ticket, error)
- func (r *Firestore) GetTicketComments(ctx context.Context, ticketID types.TicketID) ([]ticket.Comment, error)
- func (r *Firestore) GetTicketCommentsPaginated(ctx context.Context, ticketID types.TicketID, offset, limit int) ([]ticket.Comment, error)
- func (r *Firestore) GetTicketHistories(ctx context.Context, ticketID types.TicketID) ([]*ticket.History, error)
- func (r *Firestore) GetTicketUnpromptedComments(ctx context.Context, ticketID types.TicketID) ([]ticket.Comment, error)
- func (r *Firestore) GetTicketsByIDs(ctx context.Context, ticketIDs []types.TicketID) ([]*ticket.Ticket, error)
- func (r *Firestore) GetTicketsBySpan(ctx context.Context, begin, end time.Time) ([]*ticket.Ticket, error)
- func (r *Firestore) GetTicketsByStatus(ctx context.Context, statuses []types.TicketStatus, keyword, assigneeID string, ...) ([]*ticket.Ticket, error)
- func (r *Firestore) GetTicketsByStatusAndSpan(ctx context.Context, status types.TicketStatus, begin, end time.Time) ([]*ticket.Ticket, error)
- func (r *Firestore) GetTicketsByTagName(ctx context.Context, tagName string) ([]types.TicketID, error)
- func (r *Firestore) GetTicketsByTagNames(ctx context.Context, tagNames []string) ([]types.TicketID, error)
- func (r *Firestore) GetTicketsWithInvalidEmbedding(ctx context.Context) ([]*ticket.Ticket, error)
- func (r *Firestore) GetToken(ctx context.Context, tokenID auth.TokenID) (*auth.Token, error)
- func (r *Firestore) GetTokens(ctx context.Context) ([]*auth.Token, error)
- func (r *Firestore) IsTagNameExists(ctx context.Context, name string) (bool, error)
- func (r *Firestore) ListAgentMemories(ctx context.Context, agentID string) ([]*memory.AgentMemory, error)
- func (r *Firestore) ListAgentMemoriesWithOptions(ctx context.Context, agentID string, opts interfaces.AgentMemoryListOptions) ([]*memory.AgentMemory, int, error)
- func (r *Firestore) ListAllAgentIDs(ctx context.Context) ([]*interfaces.AgentSummary, error)
- func (r *Firestore) ListAllTags(ctx context.Context) ([]*tag.Tag, error)
- func (r *Firestore) ListKnowledgeSlugs(ctx context.Context, topic types.KnowledgeTopic) ([]*knowledge.SlugInfo, error)
- func (r *Firestore) ListKnowledgeTopics(ctx context.Context) ([]*knowledge.TopicSummary, error)
- func (r *Firestore) PutActivity(ctx context.Context, activity *activity.Activity) error
- func (r *Firestore) PutAgentMemory(ctx context.Context, mem *memory.AgentMemory) error
- func (r *Firestore) PutAlert(ctx context.Context, a alert.Alert) error
- func (r *Firestore) PutAlertList(ctx context.Context, list *alert.List) error
- func (r *Firestore) PutHistory(ctx context.Context, ticketID types.TicketID, history *ticket.History) error
- func (r *Firestore) PutKnowledge(ctx context.Context, k *knowledge.Knowledge) error
- func (r *Firestore) PutNotice(ctx context.Context, notice *notice.Notice) error
- func (r *Firestore) PutRefineGroup(ctx context.Context, group *refine.Group) error
- func (r *Firestore) PutSession(ctx context.Context, sess *session.Session) error
- func (r *Firestore) PutSessionMessage(ctx context.Context, message *session.Message) error
- func (r *Firestore) PutTag(ctx context.Context, tag *tag.Tag) error
- func (r *Firestore) PutTicket(ctx context.Context, t ticket.Ticket) error
- func (r *Firestore) PutTicketComment(ctx context.Context, comment ticket.Comment) error
- func (r *Firestore) PutTicketCommentsPrompted(ctx context.Context, ticketID types.TicketID, commentIDs []types.CommentID) error
- func (r *Firestore) PutTicketHistory(ctx context.Context, ticketID types.TicketID, history *ticket.History) error
- func (r *Firestore) PutToken(ctx context.Context, token *auth.Token) error
- func (r *Firestore) QueryTags(ctx context.Context, query string) ([]*tag.Tag, error)
- func (r *Firestore) QueryTickets(ctx context.Context, query string, offset, limit int) ([]*ticket.Ticket, error)
- func (r *Firestore) RemoveAlertsFromList(ctx context.Context, listID types.AlertListID, alertIDs []types.AlertID) error
- func (r *Firestore) RemoveTagFromAllAlerts(ctx context.Context, name string) error
- func (r *Firestore) RemoveTagFromAllTickets(ctx context.Context, name string) error
- func (r *Firestore) RemoveTagIDFromAllAlerts(ctx context.Context, tagID string) error
- func (r *Firestore) RemoveTagIDFromAllTickets(ctx context.Context, tagID string) error
- func (r *Firestore) RemoveTicketFromTag(ctx context.Context, tagID string, ticketID types.TicketID) error
- func (r *Firestore) SaveAgentMemory(ctx context.Context, mem *memory.AgentMemory) error
- func (r *Firestore) SearchAlerts(ctx context.Context, path, op string, value any, limit int) (alert.Alerts, error)
- func (r *Firestore) SearchMemoriesByEmbedding(ctx context.Context, agentID string, embedding []float32, limit int) ([]*memory.AgentMemory, error)
- func (r *Firestore) UnbindAlertFromTicket(ctx context.Context, alertID types.AlertID) error
- func (r *Firestore) UpdateAlertStatus(ctx context.Context, alertID types.AlertID, status alert.AlertStatus) error
- func (r *Firestore) UpdateMemoryScoreBatch(ctx context.Context, agentID string, ...) error
- func (r *Firestore) UpdateNotice(ctx context.Context, notice *notice.Notice) error
- func (r *Firestore) UpdateTag(ctx context.Context, tag *tag.Tag) error
- func (r *Firestore) UpdateTicketComment(ctx context.Context, comment ticket.Comment) error
- func (r *Firestore) UpdateTicketStatus(ctx context.Context, ticketID types.TicketID, status types.TicketStatus) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Firestore ¶
type Firestore struct {
// contains filtered or unexported fields
}
func (*Firestore) AddAlertsToList ¶
func (*Firestore) AddTicketToTag ¶
func (*Firestore) ArchiveKnowledge ¶ added in v0.8.0
func (r *Firestore) ArchiveKnowledge(ctx context.Context, topic types.KnowledgeTopic, slug types.KnowledgeSlug) error
func (*Firestore) BatchGetAlerts ¶
func (*Firestore) BatchGetTickets ¶
func (r *Firestore) BatchGetTickets(ctx context.Context, ticketIDs []types.TicketID) ([]*ticket.Ticket, error)
BatchGetTickets gets tickets by their IDs. If some tickets are not found, it will be ignored.
func (*Firestore) BatchPutAlerts ¶
func (*Firestore) BatchSaveAgentMemories ¶ added in v0.8.0
func (r *Firestore) BatchSaveAgentMemories(ctx context.Context, memories []*memory.AgentMemory) error
BatchSaveAgentMemories saves multiple agent memories in batches Firestore supports max 500 operations per batch, so this method splits if needed
func (*Firestore) BatchUpdateTicketsStatus ¶
func (*Firestore) BindAlertsToTicket ¶
func (r *Firestore) BindAlertsToTicket(ctx context.Context, alertIDs []types.AlertID, ticketID types.TicketID) error
Alert-Ticket binding methods
func (*Firestore) CalculateKnowledgeSize ¶ added in v0.8.0
func (*Firestore) CountActivities ¶
func (*Firestore) CountAlertsBySchema ¶
func (*Firestore) CountAlertsWithoutTicket ¶
func (*Firestore) CountDeclinedAlerts ¶ added in v0.10.0
func (*Firestore) CountTicketComments ¶
func (*Firestore) CountTicketsByStatus ¶
func (*Firestore) CreateNotice ¶
func (*Firestore) CreateTagWithID ¶
func (*Firestore) DeleteActivity ¶
func (*Firestore) DeleteAgentMemoriesBatch ¶ added in v0.6.2
func (r *Firestore) DeleteAgentMemoriesBatch(ctx context.Context, agentID string, memoryIDs []types.AgentMemoryID) (int, error)
DeleteAgentMemoriesBatch deletes multiple agent memories in a batch Uses BulkWriter for efficient batch deletion Returns the number of successfully deleted memories
func (*Firestore) DeleteAlertList ¶
func (*Firestore) DeleteSession ¶ added in v0.8.0
func (*Firestore) DeleteTagByID ¶
func (*Firestore) DeleteTagsByTicketID ¶
func (*Firestore) DeleteTicket ¶
func (*Firestore) DeleteTicketComment ¶
func (*Firestore) DeleteToken ¶
func (*Firestore) FindNearestAlerts ¶
func (*Firestore) FindNearestTickets ¶
func (*Firestore) FindNearestTicketsWithSpan ¶
func (*Firestore) FindSimilarAlerts ¶
func (*Firestore) GetActivities ¶
func (*Firestore) GetAgentMemory ¶
func (r *Firestore) GetAgentMemory(ctx context.Context, agentID string, id types.AgentMemoryID) (*memory.AgentMemory, error)
GetAgentMemory retrieves an agent memory record by agentID and memoryID Path: agents/{agentID}/memories/{memoryID}
func (*Firestore) GetAlertList ¶
func (*Firestore) GetAlertListByThread ¶
func (*Firestore) GetAlertLists ¶
func (*Firestore) GetAlertListsInThread ¶
func (*Firestore) GetAlertWithoutEmbedding ¶
func (*Firestore) GetAlertWithoutTicket ¶
func (*Firestore) GetAlertsByIDs ¶
func (*Firestore) GetAlertsBySpan ¶
func (*Firestore) GetAlertsByThread ¶
func (*Firestore) GetAlertsByTicketID ¶
func (*Firestore) GetAlertsWithInvalidEmbedding ¶
func (*Firestore) GetAllAlerts ¶
func (*Firestore) GetAllTickets ¶
func (*Firestore) GetDeclinedAlerts ¶ added in v0.10.0
func (*Firestore) GetKnowledge ¶ added in v0.8.0
func (r *Firestore) GetKnowledge(ctx context.Context, topic types.KnowledgeTopic, slug types.KnowledgeSlug) (*knowledge.Knowledge, error)
func (*Firestore) GetKnowledgeByCommit ¶ added in v0.8.0
func (*Firestore) GetKnowledges ¶ added in v0.8.0
func (*Firestore) GetLatestAlertByThread ¶
func (*Firestore) GetLatestAlertListInThread ¶
func (*Firestore) GetLatestHistory ¶
func (*Firestore) GetNotices ¶
func (*Firestore) GetOrCreateTagByName ¶
func (r *Firestore) GetOrCreateTagByName(ctx context.Context, name, description, color, createdBy string) (*tag.Tag, error)
GetOrCreateTagByName atomically gets an existing tag or creates a new one
func (*Firestore) GetRefineGroup ¶ added in v0.10.0
func (*Firestore) GetSession ¶ added in v0.8.0
func (*Firestore) GetSessionMessages ¶ added in v0.8.0
func (*Firestore) GetSessionsByTicket ¶ added in v0.8.0
func (*Firestore) GetTagByID ¶
func (*Firestore) GetTagByName ¶
func (*Firestore) GetTagsByIDs ¶
func (*Firestore) GetTagsByTicketID ¶
func (*Firestore) GetTicketByThread ¶
func (*Firestore) GetTicketComments ¶
func (*Firestore) GetTicketCommentsPaginated ¶
func (*Firestore) GetTicketHistories ¶
func (*Firestore) GetTicketUnpromptedComments ¶
func (*Firestore) GetTicketsByIDs ¶
func (*Firestore) GetTicketsBySpan ¶
func (*Firestore) GetTicketsByStatus ¶
func (*Firestore) GetTicketsByStatusAndSpan ¶
func (*Firestore) GetTicketsByTagName ¶
func (*Firestore) GetTicketsByTagNames ¶
func (*Firestore) GetTicketsWithInvalidEmbedding ¶
func (*Firestore) IsTagNameExists ¶
func (*Firestore) ListAgentMemories ¶ added in v0.6.2
func (r *Firestore) ListAgentMemories(ctx context.Context, agentID string) ([]*memory.AgentMemory, error)
ListAgentMemories lists all memories for an agent Results are ordered by CreatedAt DESC
func (*Firestore) ListAgentMemoriesWithOptions ¶ added in v0.8.0
func (r *Firestore) ListAgentMemoriesWithOptions(ctx context.Context, agentID string, opts interfaces.AgentMemoryListOptions) ([]*memory.AgentMemory, int, error)
ListAgentMemoriesWithOptions lists memories with filtering, sorting, and pagination Note: Firestore implementation fetches all memories and applies filtering/sorting in-memory to avoid requiring additional composite indexes
func (*Firestore) ListAllAgentIDs ¶ added in v0.8.0
func (r *Firestore) ListAllAgentIDs(ctx context.Context) ([]*interfaces.AgentSummary, error)
ListAllAgentIDs returns all agent IDs that have memories with their counts and latest memory timestamp Uses CollectionGroup query to find all memories subcollections regardless of parent document existence
func (*Firestore) ListAllTags ¶
func (*Firestore) ListKnowledgeSlugs ¶ added in v0.8.0
func (*Firestore) ListKnowledgeTopics ¶ added in v0.8.0
func (*Firestore) PutActivity ¶
Activity related methods
func (*Firestore) PutAgentMemory ¶
func (*Firestore) PutAlertList ¶
func (*Firestore) PutHistory ¶
func (*Firestore) PutKnowledge ¶ added in v0.8.0
func (*Firestore) PutRefineGroup ¶ added in v0.10.0
func (*Firestore) PutSession ¶ added in v0.8.0
func (*Firestore) PutSessionMessage ¶ added in v0.8.0
func (*Firestore) PutTicketComment ¶
func (*Firestore) PutTicketCommentsPrompted ¶
func (*Firestore) PutTicketHistory ¶
func (*Firestore) QueryTickets ¶
func (*Firestore) RemoveAlertsFromList ¶
func (*Firestore) RemoveTagFromAllAlerts ¶
func (*Firestore) RemoveTagFromAllTickets ¶
func (*Firestore) RemoveTagIDFromAllAlerts ¶
func (*Firestore) RemoveTagIDFromAllTickets ¶
func (*Firestore) RemoveTicketFromTag ¶
func (*Firestore) SaveAgentMemory ¶
SaveAgentMemory saves an agent memory record in subcollection structure Path: agents/{agentID}/memories/{memoryID}
func (*Firestore) SearchAlerts ¶
func (*Firestore) SearchMemoriesByEmbedding ¶
func (r *Firestore) SearchMemoriesByEmbedding(ctx context.Context, agentID string, embedding []float32, limit int) ([]*memory.AgentMemory, error)
SearchMemoriesByEmbedding searches for agent memories by embedding similarity within an agent's subcollection Path: agents/{agentID}/memories/*
func (*Firestore) UnbindAlertFromTicket ¶
func (*Firestore) UpdateAlertStatus ¶ added in v0.10.0
func (*Firestore) UpdateMemoryScoreBatch ¶ added in v0.6.2
func (r *Firestore) UpdateMemoryScoreBatch(ctx context.Context, agentID string, updates map[types.AgentMemoryID]struct { Score float64 LastUsedAt time.Time }) error
UpdateMemoryScoreBatch updates quality scores and last used timestamps for multiple agent memories Uses BulkWriter for efficient batch updates