sqlite

package
v0.0.0-...-5bc5eca Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: Apache-2.0 Imports: 33 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

func SharedDB

func SharedDB(ctx context.Context) (*gorm.DB, *sql.DB, error)

SharedDB exposes the process-wide SQLite GORM handle so sibling plugins can share a single opened database.

Types

type Capabilities

type Capabilities struct {
	FTS5Enabled bool
	VecEnabled  bool
}

func SharedCapabilities

func SharedCapabilities(ctx context.Context) (Capabilities, error)

type ConflictError

type ConflictError = registrystore.ConflictError

type ForbiddenError

type ForbiddenError = registrystore.ForbiddenError

type NotFoundError

type NotFoundError = registrystore.NotFoundError

Re-export error types from registry/store for backward compatibility.

type SQLiteStore

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

SQLiteStore implements MemoryStore using GORM + SQLite.

func (*SQLiteStore) AcceptTransfer

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

func (*SQLiteStore) AdminDeleteAttachment

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

func (*SQLiteStore) AdminGetAttachment

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

func (*SQLiteStore) AdminGetAttachmentByStorageKey

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

func (*SQLiteStore) AdminGetConversation

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

func (*SQLiteStore) AdminGetEntries

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

func (*SQLiteStore) AdminListAttachments

func (*SQLiteStore) AdminListChildConversations

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

func (*SQLiteStore) AdminListForks

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

func (*SQLiteStore) AdminListMemberships

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

func (*SQLiteStore) AdminSearchEntries

func (*SQLiteStore) AdminSetConversationArchived

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

func (*SQLiteStore) AdminStatsSummary

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

func (*SQLiteStore) AppendEntries

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

func (*SQLiteStore) AppendOutboxEvents

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

func (*SQLiteStore) ArchiveConversation

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

func (*SQLiteStore) ClaimReadyTasks

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

func (*SQLiteStore) CountEvictableGroups

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

func (*SQLiteStore) CreateAttachment

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

func (*SQLiteStore) CreateConversation

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

func (*SQLiteStore) CreateConversationWithID

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

func (*SQLiteStore) CreateOwnershipTransfer

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

func (*SQLiteStore) CreateTask

func (s *SQLiteStore) CreateTask(ctx context.Context, taskType string, taskBody map[string]interface{}) error

func (*SQLiteStore) DeleteAttachment

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

func (*SQLiteStore) DeleteMembership

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

func (*SQLiteStore) DeleteTask

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

func (*SQLiteStore) DeleteTransfer

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

func (*SQLiteStore) EvictOutboxEventsBefore

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

func (*SQLiteStore) FailTask

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

func (*SQLiteStore) FetchSearchResultDetails

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

func (*SQLiteStore) FindEntriesPendingVectorIndexing

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

func (*SQLiteStore) FindEvictableGroupIDs

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

func (*SQLiteStore) GetAttachment

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

func (*SQLiteStore) GetConversation

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

func (*SQLiteStore) GetEntries

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

func (*SQLiteStore) GetEntryGroupID

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

func (*SQLiteStore) GetGroupMemberUserIDs

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

func (*SQLiteStore) GetTransfer

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

func (*SQLiteStore) HardDeleteConversationGroups

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

func (*SQLiteStore) InReadTx

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

func (*SQLiteStore) InWriteTx

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

func (*SQLiteStore) ListAttachments

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

func (*SQLiteStore) ListChildConversations

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

func (*SQLiteStore) ListConversationGroupIDs

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

func (*SQLiteStore) ListConversations

func (s *SQLiteStore) 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 (*SQLiteStore) ListForks

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

func (*SQLiteStore) ListMemberships

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

func (*SQLiteStore) ListOutboxEvents

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

func (*SQLiteStore) ListPendingTransfers

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

func (*SQLiteStore) ListUnindexedEntries

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

func (*SQLiteStore) LoadDeletedConversationGroups

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

func (*SQLiteStore) OutboxEnabled

func (s *SQLiteStore) OutboxEnabled() bool

func (*SQLiteStore) SearchEntries

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

func (*SQLiteStore) SetIndexedAt

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

func (*SQLiteStore) ShareConversation

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

func (*SQLiteStore) SyncAgentEntry

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

func (*SQLiteStore) UnarchiveConversation

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

func (*SQLiteStore) UpdateAttachment

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

func (*SQLiteStore) UpdateConversation

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

func (*SQLiteStore) UpdateMembership

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

type ValidationError

type ValidationError = registrystore.ValidationError

Jump to

Keyboard shortcuts

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