mongo

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ForceImport = 0

ForceImport is a no-op variable that can be referenced to ensure this package's init() runs.

Functions

This section is empty.

Types

type MongoStore

type MongoStore struct {
	// contains filtered or unexported fields
}

MongoStore implements MemoryStore using MongoDB.

func (*MongoStore) AcceptTransfer

func (s *MongoStore) AcceptTransfer(ctx context.Context, userID string, transferID uuid.UUID) error

func (*MongoStore) AdminDeleteAttachment

func (s *MongoStore) AdminDeleteAttachment(ctx context.Context, attachmentID uuid.UUID) error

func (*MongoStore) AdminGetAttachment

func (s *MongoStore) AdminGetAttachment(ctx context.Context, attachmentID uuid.UUID) (*registrystore.AdminAttachment, error)

func (*MongoStore) AdminGetAttachmentByStorageKey

func (s *MongoStore) AdminGetAttachmentByStorageKey(ctx context.Context, storageKey string) (*registrystore.AdminAttachment, error)

func (*MongoStore) AdminGetCheckpoint

func (s *MongoStore) AdminGetCheckpoint(ctx context.Context, clientID string) (*registrystore.ClientCheckpoint, error)

func (*MongoStore) AdminGetConversation

func (s *MongoStore) AdminGetConversation(ctx context.Context, conversationID uuid.UUID) (*registrystore.ConversationDetail, error)

func (*MongoStore) AdminGetEntries

func (s *MongoStore) AdminGetEntries(ctx context.Context, conversationID uuid.UUID, query registrystore.AdminMessageQuery) (*registrystore.PagedEntries, error)

func (*MongoStore) AdminGetEntryByID

func (s *MongoStore) AdminGetEntryByID(ctx context.Context, entryID uuid.UUID) (*model.Entry, error)

func (*MongoStore) AdminListAttachments

func (*MongoStore) AdminListChildConversations

func (s *MongoStore) AdminListChildConversations(ctx context.Context, conversationID uuid.UUID, afterCursor *string, limit int) ([]registrystore.ConversationSummary, *string, error)

func (*MongoStore) AdminListForks

func (s *MongoStore) AdminListForks(ctx context.Context, conversationID uuid.UUID, afterCursor *string, limit int) ([]registrystore.ConversationForkSummary, *string, error)

func (*MongoStore) AdminListMemberships

func (s *MongoStore) AdminListMemberships(ctx context.Context, conversationID uuid.UUID, afterCursor *string, limit int) ([]model.ConversationMembership, *string, error)

func (*MongoStore) AdminPutCheckpoint

func (s *MongoStore) AdminPutCheckpoint(ctx context.Context, checkpoint registrystore.ClientCheckpoint) (*registrystore.ClientCheckpoint, error)

func (*MongoStore) AdminSearchEntries

func (*MongoStore) AdminSetConversationArchived

func (s *MongoStore) AdminSetConversationArchived(ctx context.Context, conversationID uuid.UUID, archived bool) error

func (*MongoStore) AdminStatsSummary

func (s *MongoStore) AdminStatsSummary(ctx context.Context) (*registrystore.AdminStatsSummary, error)

func (*MongoStore) AppendEntries

func (s *MongoStore) AppendEntries(ctx context.Context, userID string, conversationID uuid.UUID, entries []registrystore.CreateEntryRequest, clientID *string, agentID *string, epoch *int64) ([]model.Entry, error)

func (*MongoStore) AppendOutboxEvents

func (s *MongoStore) AppendOutboxEvents(ctx context.Context, events []registrystore.OutboxWrite) ([]registrystore.OutboxEvent, error)

func (*MongoStore) ArchiveConversation

func (s *MongoStore) ArchiveConversation(ctx context.Context, userID string, conversationID uuid.UUID) error

func (*MongoStore) ClaimReadyTasks

func (s *MongoStore) ClaimReadyTasks(ctx context.Context, limit int) ([]model.Task, error)

func (*MongoStore) CountEvictableGroups

func (s *MongoStore) CountEvictableGroups(ctx context.Context, cutoff time.Time) (int64, error)

func (*MongoStore) CreateAttachment

func (s *MongoStore) CreateAttachment(ctx context.Context, userID string, conversationID uuid.UUID, attachment model.Attachment) (*model.Attachment, error)

func (*MongoStore) CreateConversation

func (s *MongoStore) CreateConversation(ctx context.Context, userID string, clientID string, title string, metadata map[string]any, agentID *string, forkedAtConversationID *uuid.UUID, forkedAtEntryID *uuid.UUID) (*registrystore.ConversationDetail, error)

func (*MongoStore) CreateConversationWithID

func (s *MongoStore) CreateConversationWithID(ctx context.Context, userID string, clientID string, convID uuid.UUID, title string, metadata map[string]any, agentID *string, forkedAtConversationID *uuid.UUID, forkedAtEntryID *uuid.UUID) (*registrystore.ConversationDetail, error)

func (*MongoStore) CreateOwnershipTransfer

func (s *MongoStore) CreateOwnershipTransfer(ctx context.Context, userID string, conversationID uuid.UUID, toUserID string) (*registrystore.OwnershipTransferDto, error)

func (*MongoStore) CreateTask

func (s *MongoStore) CreateTask(ctx context.Context, taskType string, taskBody map[string]any) error

func (*MongoStore) DeleteAttachment

func (s *MongoStore) DeleteAttachment(ctx context.Context, userID string, conversationID uuid.UUID, attachmentID uuid.UUID) error

func (*MongoStore) DeleteMembership

func (s *MongoStore) DeleteMembership(ctx context.Context, userID string, conversationID uuid.UUID, memberUserID string) error

func (*MongoStore) DeleteTask

func (s *MongoStore) DeleteTask(ctx context.Context, taskID uuid.UUID) error

func (*MongoStore) DeleteTransfer

func (s *MongoStore) DeleteTransfer(ctx context.Context, userID string, transferID uuid.UUID) error

func (*MongoStore) EvictOutboxEventsBefore

func (s *MongoStore) EvictOutboxEventsBefore(ctx context.Context, before time.Time, limit int) (int64, error)

func (*MongoStore) FailTask

func (s *MongoStore) FailTask(ctx context.Context, taskID uuid.UUID, errMsg string, retryDelay time.Duration) error

func (*MongoStore) FetchSearchResultDetails

func (s *MongoStore) FetchSearchResultDetails(ctx context.Context, userID string, entryIDs []uuid.UUID, includeEntry bool) ([]registrystore.SearchResult, error)

func (*MongoStore) FindEntriesPendingVectorIndexing

func (s *MongoStore) FindEntriesPendingVectorIndexing(ctx context.Context, limit int) ([]model.Entry, error)

func (*MongoStore) FindEvictableGroupIDs

func (s *MongoStore) FindEvictableGroupIDs(ctx context.Context, cutoff time.Time, limit int) ([]uuid.UUID, error)

func (*MongoStore) GetAttachment

func (s *MongoStore) GetAttachment(ctx context.Context, userID string, conversationID uuid.UUID, attachmentID uuid.UUID) (*model.Attachment, error)

func (*MongoStore) GetConversation

func (s *MongoStore) GetConversation(ctx context.Context, userID string, conversationID uuid.UUID) (*registrystore.ConversationDetail, error)

func (*MongoStore) GetEntries

func (s *MongoStore) GetEntries(ctx context.Context, userID string, conversationID uuid.UUID, afterEntryID *string, upToEntryID *string, limit int, channel *model.Channel, epochFilter *registrystore.MemoryEpochFilter, clientID *string, agentID *string, allForks bool) (*registrystore.PagedEntries, error)

func (*MongoStore) GetEntryGroupID

func (s *MongoStore) GetEntryGroupID(ctx context.Context, entryID uuid.UUID) (uuid.UUID, error)

func (*MongoStore) GetGroupMemberUserIDs

func (s *MongoStore) GetGroupMemberUserIDs(ctx context.Context, conversationGroupID uuid.UUID) ([]string, error)

func (*MongoStore) GetTransfer

func (s *MongoStore) GetTransfer(ctx context.Context, userID string, transferID uuid.UUID) (*registrystore.OwnershipTransferDto, error)

func (*MongoStore) HardDeleteConversationGroups

func (s *MongoStore) HardDeleteConversationGroups(ctx context.Context, groupIDs []uuid.UUID) error

func (*MongoStore) InReadTx

func (s *MongoStore) InReadTx(ctx context.Context, fn func(context.Context) error) error

func (*MongoStore) InWriteTx

func (s *MongoStore) InWriteTx(ctx context.Context, fn func(context.Context) error) error

func (*MongoStore) ListAttachments

func (s *MongoStore) ListAttachments(ctx context.Context, userID string, conversationID uuid.UUID, afterCursor *string, limit int) ([]model.Attachment, *string, error)

func (*MongoStore) ListChildConversations

func (s *MongoStore) ListChildConversations(ctx context.Context, userID string, conversationID uuid.UUID, afterCursor *string, limit int) ([]registrystore.ConversationSummary, *string, error)

func (*MongoStore) ListConversationGroupIDs

func (s *MongoStore) ListConversationGroupIDs(ctx context.Context, userID string) ([]uuid.UUID, error)

func (*MongoStore) ListConversations

func (s *MongoStore) ListConversations(ctx context.Context, userID string, query *string, afterCursor *string, limit int, mode model.ConversationListMode, ancestry model.ConversationAncestryFilter, archived registrystore.ArchiveFilter) ([]registrystore.ConversationSummary, *string, error)

func (*MongoStore) ListForks

func (s *MongoStore) ListForks(ctx context.Context, userID string, conversationID uuid.UUID, afterCursor *string, limit int) ([]registrystore.ConversationForkSummary, *string, error)

func (*MongoStore) ListMemberships

func (s *MongoStore) ListMemberships(ctx context.Context, userID string, conversationID uuid.UUID, afterCursor *string, limit int) ([]model.ConversationMembership, *string, error)

func (*MongoStore) ListOutboxEvents

func (s *MongoStore) ListOutboxEvents(ctx context.Context, query registrystore.OutboxQuery) (*registrystore.OutboxPage, error)

func (*MongoStore) ListPendingTransfers

func (s *MongoStore) ListPendingTransfers(ctx context.Context, userID string, role string, afterCursor *string, limit int) ([]registrystore.OwnershipTransferDto, *string, error)

func (*MongoStore) ListUnindexedEntries

func (s *MongoStore) ListUnindexedEntries(ctx context.Context, limit int, afterCursor *string) ([]model.Entry, *string, error)

func (*MongoStore) LoadDeletedConversationGroups

func (s *MongoStore) LoadDeletedConversationGroups(ctx context.Context, groupIDs []uuid.UUID) ([]registrystore.DeletedConversationGroup, error)

func (*MongoStore) OutboxEnabled

func (s *MongoStore) OutboxEnabled() bool

func (*MongoStore) SearchEntries

func (s *MongoStore) SearchEntries(ctx context.Context, userID string, query string, afterCursor *string, limit int, includeEntry bool, groupByConversation bool) (*registrystore.SearchResults, error)

func (*MongoStore) SetIndexedAt

func (s *MongoStore) SetIndexedAt(ctx context.Context, entryID uuid.UUID, conversationGroupID uuid.UUID, indexedAt time.Time) error

func (*MongoStore) ShareConversation

func (s *MongoStore) ShareConversation(ctx context.Context, userID string, conversationID uuid.UUID, targetUserID string, accessLevel model.AccessLevel) (*model.ConversationMembership, error)

func (*MongoStore) SyncAgentEntry

func (s *MongoStore) SyncAgentEntry(ctx context.Context, userID string, conversationID uuid.UUID, entry registrystore.CreateEntryRequest, clientID string, agentID *string) (*registrystore.SyncResult, error)

func (*MongoStore) UnarchiveConversation

func (s *MongoStore) UnarchiveConversation(ctx context.Context, userID string, conversationID uuid.UUID) error

func (*MongoStore) UpdateAttachment

func (s *MongoStore) UpdateAttachment(ctx context.Context, userID string, attachmentID uuid.UUID, update registrystore.AttachmentUpdate) (*model.Attachment, error)

func (*MongoStore) UpdateConversation

func (s *MongoStore) UpdateConversation(ctx context.Context, userID string, conversationID uuid.UUID, title *string, metadata map[string]any) (*registrystore.ConversationDetail, error)

func (*MongoStore) UpdateMembership

func (s *MongoStore) UpdateMembership(ctx context.Context, userID string, conversationID uuid.UUID, memberUserID string, accessLevel model.AccessLevel) (*model.ConversationMembership, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL