Versions in this module Expand all Collapse all v1 v1.9.4 Mar 10, 2026 v1.9.3 Mar 10, 2026 v1.9.1 Mar 9, 2026 v1.9.0 Mar 8, 2026 v1.8.1 Mar 8, 2026 v1.8.0 Mar 7, 2026 Changes in this version + var ErrProjectSyncPaused = errors.New("cloudstore: project sync paused") + type AddCloudObservationParams struct + Content string + Project string + Scope string + SessionID string + Title string + ToolName string + TopicKey string + Type string + type AddCloudPromptParams struct + Content string + Project string + SessionID string + type CloudChunkEntry struct + ChunkID string + CreatedBy string + ImportedAt string + Memories int + Prompts int + Sessions int + UserID string + type CloudMutation struct + Entity string + EntityKey string + OccurredAt string + Op string + Payload json.RawMessage + Seq int64 + UserID string + type CloudObservation struct + Content string + CreatedAt string + DeletedAt *string + DuplicateCount int + ID int64 + LastSeenAt *string + Project *string + RevisionCount int + Scope string + SessionID string + Title string + ToolName *string + TopicKey *string + Type string + UpdatedAt string + UserID string + type CloudPrompt struct + Content string + CreatedAt string + ID int64 + Project string + SessionID string + UserID string + type CloudSearchOptions struct + Limit int + Project string + Scope string + Type string + type CloudSearchResult struct + Rank float64 + type CloudSession struct + Directory string + EndedAt *string + ID string + Project string + StartedAt string + Summary *string + UserID string + type CloudSessionSummary struct + EndedAt *string + ID string + ObservationCount int + Project string + StartedAt string + Summary *string + type CloudStats struct + Projects []string + TotalObservations int + TotalPrompts int + TotalSessions int + type CloudStore struct + func New(cfg cloud.Config) (*CloudStore, error) + func (cs *CloudStore) AddObservation(userID string, p AddCloudObservationParams) (int64, error) + func (cs *CloudStore) AddPrompt(userID string, p AddCloudPromptParams) (int64, error) + func (cs *CloudStore) AppendMutation(userID, entity, entityKey, op string, payload json.RawMessage) (int64, error) + func (cs *CloudStore) AppendMutationBatch(userID string, entries []PushMutationEntry) (*PushMutationsResult, error) + func (cs *CloudStore) ApplyMutationPayload(userID, entity, op string, payload json.RawMessage) error + func (cs *CloudStore) Close() error + func (cs *CloudStore) ContributorStats() ([]ContributorStat, error) + func (cs *CloudStore) CreateSession(userID, sessionID, project, directory string) error + func (cs *CloudStore) CreateUser(username, email, password string) (*CloudUser, error) + func (cs *CloudStore) DB() *sql.DB + func (cs *CloudStore) DeleteObservation(userID string, id int64, hard bool) error + func (cs *CloudStore) DeleteObservationByPayload(userID string, payload json.RawMessage) error + func (cs *CloudStore) EndSession(userID, sessionID, summary string) error + func (cs *CloudStore) FilterObservations(userID, project, scope, obsType string, limit int) ([]CloudObservation, error) + func (cs *CloudStore) FormatContext(userID, project, scope string) (string, error) + func (cs *CloudStore) GetChunk(userID, chunkID string) ([]byte, error) + func (cs *CloudStore) GetObservation(userID string, id int64) (*CloudObservation, error) + func (cs *CloudStore) GetProjectSyncControl(project string) (*ProjectSyncControl, error) + func (cs *CloudStore) GetPrompt(userID string, id int64) (*CloudPrompt, error) + func (cs *CloudStore) GetSession(userID, sessionID string) (*CloudSession, error) + func (cs *CloudStore) GetSyncedChunks(userID string) (map[string]bool, error) + func (cs *CloudStore) GetUserByAPIKeyHash(hash string) (*CloudUser, error) + func (cs *CloudStore) GetUserByEmail(email string) (*CloudUser, error) + func (cs *CloudStore) GetUserByID(userID string) (*CloudUser, error) + func (cs *CloudStore) GetUserByUsername(username string) (*CloudUser, error) + func (cs *CloudStore) IsProjectSyncEnabled(project string) (bool, error) + func (cs *CloudStore) ListAllUsers() ([]CloudUser, error) + func (cs *CloudStore) ListChunks(userID string) ([]CloudChunkEntry, error) + func (cs *CloudStore) ListProjectSyncControls() ([]ProjectSyncControl, error) + func (cs *CloudStore) ObservationTypes(userID, project string) ([]string, error) + func (cs *CloudStore) Ping() error + func (cs *CloudStore) ProjectStats(userID string) ([]ProjectStat, error) + func (cs *CloudStore) PullMutations(userID string, sinceSeq int64, limit int) (*PullMutationsResult, error) + func (cs *CloudStore) RecentObservations(userID, project, scope string, limit int) ([]CloudObservation, error) + func (cs *CloudStore) RecentPrompts(userID, project string, limit int) ([]CloudPrompt, error) + func (cs *CloudStore) RecentSessions(userID, project string, limit int) ([]CloudSessionSummary, error) + func (cs *CloudStore) RecordSyncedChunk(userID, chunkID string) error + func (cs *CloudStore) Search(userID, query string, opts CloudSearchOptions) ([]CloudSearchResult, error) + func (cs *CloudStore) SearchPrompts(userID, query, project string, limit int) ([]CloudPrompt, error) + func (cs *CloudStore) SessionObservations(userID, sessionID string, limit int) ([]CloudObservation, error) + func (cs *CloudStore) SessionPrompts(userID, sessionID string, limit int) ([]CloudPrompt, error) + func (cs *CloudStore) SetAPIKeyHash(userID, hash string) error + func (cs *CloudStore) SetProjectSyncEnabled(project string, enabled bool, updatedBy, reason string) error + func (cs *CloudStore) Stats(userID string) (*CloudStats, error) + func (cs *CloudStore) StoreChunk(userID, chunkID, createdBy string, data []byte, ...) error + func (cs *CloudStore) SystemHealth() (*SystemHealthInfo, error) + func (cs *CloudStore) UpsertObservationByPayload(userID string, payload json.RawMessage) error + func (cs *CloudStore) UpsertPromptByPayload(userID string, payload json.RawMessage) error + func (cs *CloudStore) UpsertSessionByPayload(userID string, payload json.RawMessage) error + func (cs *CloudStore) UserProjects(userID string) ([]string, error) + type CloudUser struct + APIKeyHash *string + CreatedAt string + Email string + ID string + PasswordHash string + UpdatedAt string + Username string + type ContributorStat struct + Email string + LastSync *string + ObservationCount int + SessionCount int + UserID string + Username string + type ProjectStat struct + LastActivity *string + ObservationCount int + Project string + PromptCount int + SessionCount int + type ProjectSyncControl struct + PausedReason *string + Project string + SyncEnabled bool + UpdatedAt string + UpdatedBy *string + type PullMutationsResult struct + HasMore bool + Mutations []CloudMutation + type PushMutationEntry struct + Entity string + EntityKey string + Op string + Payload json.RawMessage + type PushMutationsRequest struct + Mutations []PushMutationEntry + type PushMutationsResult struct + Accepted int + LastSeq int64 + type SystemHealthInfo struct + DBConnected bool + DBVersion string + TotalMemories int + TotalMutations int + TotalPrompts int + TotalSessions int + TotalUsers int