sqlite

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package sqlite implémente le stockage SOUL via SQLite Réutilise le même mécanisme de stockage que MIRA pour une intégration native.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SoulSQLiteStorage

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

SoulSQLiteStorage implémente ports.SoulStorage avec SQLite Partage la même base de données que MIRA (soul_ tables dans le .mira/)

func NewSoulSQLiteStorage

func NewSoulSQLiteStorage(dbPath string) (*SoulSQLiteStorage, error)

NewSoulSQLiteStorage crée un nouveau stockage SQLite

func NewSoulSQLiteStorageFromDB

func NewSoulSQLiteStorageFromDB(db *sql.DB) (*SoulSQLiteStorage, error)

NewSoulSQLiteStorageFromDB crée un stockage SQLite à partir d'une connexion existante. La connexion n'est PAS fermée par Close() — l'appelant reste responsable du cycle de vie. Utilisé quand SOUL est embarqué dans MIRA et partage sa connexion *sql.DB.

func (*SoulSQLiteStorage) BeginTx

func (s *SoulSQLiteStorage) BeginTx(ctx context.Context) (ports.SoulTx, error)

func (*SoulSQLiteStorage) Close

func (s *SoulSQLiteStorage) Close() error

Close ferme la connexion à la base, seulement si ce storage en est propriétaire.

func (*SoulSQLiteStorage) DeleteIdentity

func (s *SoulSQLiteStorage) DeleteIdentity(ctx context.Context, id uuid.UUID) error

func (*SoulSQLiteStorage) DeleteOldObservations

func (s *SoulSQLiteStorage) DeleteOldObservations(ctx context.Context, agentID string, before time.Time) (int, error)

func (*SoulSQLiteStorage) DeleteTrait

func (s *SoulSQLiteStorage) DeleteTrait(ctx context.Context, id uuid.UUID) error

func (*SoulSQLiteStorage) GetAllTraits

func (s *SoulSQLiteStorage) GetAllTraits(ctx context.Context, agentID string) ([]*entities.PersonalityTrait, error)

func (*SoulSQLiteStorage) GetDiffsForAgent

func (s *SoulSQLiteStorage) GetDiffsForAgent(ctx context.Context, agentID string, limit int) ([]*entities.IdentityDiff, error)

func (*SoulSQLiteStorage) GetDriftReport

func (s *SoulSQLiteStorage) GetDriftReport(ctx context.Context, agentID string, windowSize int) (*valueobjects.IdentityDriftReport, error)

func (*SoulSQLiteStorage) GetIdentityAtVersion

func (s *SoulSQLiteStorage) GetIdentityAtVersion(ctx context.Context, agentID string, version int) (*entities.IdentitySnapshot, error)

func (*SoulSQLiteStorage) GetIdentityByID

func (s *SoulSQLiteStorage) GetIdentityByID(ctx context.Context, id uuid.UUID) (*entities.IdentitySnapshot, error)

func (*SoulSQLiteStorage) GetIdentityHistory

func (s *SoulSQLiteStorage) GetIdentityHistory(ctx context.Context, agentID string, limit int) ([]*entities.IdentitySnapshot, error)

func (*SoulSQLiteStorage) GetIdentityLineage

func (s *SoulSQLiteStorage) GetIdentityLineage(ctx context.Context, snapshotID uuid.UUID) (*ports.IdentityLineage, error)

func (*SoulSQLiteStorage) GetLatestDiff

func (s *SoulSQLiteStorage) GetLatestDiff(ctx context.Context, agentID string) (*entities.IdentityDiff, error)

func (*SoulSQLiteStorage) GetLatestIdentity

func (s *SoulSQLiteStorage) GetLatestIdentity(ctx context.Context, agentID string) (*entities.IdentitySnapshot, error)

func (*SoulSQLiteStorage) GetLatestModelSwap

func (s *SoulSQLiteStorage) GetLatestModelSwap(ctx context.Context, agentID string) (*valueobjects.ModelSwapContext, error)

func (*SoulSQLiteStorage) GetLinkedMemories

func (s *SoulSQLiteStorage) GetLinkedMemories(ctx context.Context, identityID uuid.UUID) ([]ports.MiraMemoryReference, error)

func (*SoulSQLiteStorage) GetMiraMemories

func (s *SoulSQLiteStorage) GetMiraMemories(ctx context.Context, agentID, query string, limit int) ([]ports.MiraMemoryReference, error)

func (*SoulSQLiteStorage) GetModelSwaps

func (s *SoulSQLiteStorage) GetModelSwaps(ctx context.Context, agentID string) ([]*valueobjects.ModelSwapContext, error)

func (*SoulSQLiteStorage) GetObservationsBySource

func (s *SoulSQLiteStorage) GetObservationsBySource(ctx context.Context, agentID string, sourceType valueobjects.SourceType) ([]*entities.TraitObservation, error)

func (*SoulSQLiteStorage) GetObservationsForTrait

func (s *SoulSQLiteStorage) GetObservationsForTrait(ctx context.Context, agentID, traitName string, limit int) ([]*entities.TraitObservation, error)

func (*SoulSQLiteStorage) GetRecentObservations

func (s *SoulSQLiteStorage) GetRecentObservations(ctx context.Context, agentID string, since time.Time) ([]*entities.TraitObservation, error)

func (*SoulSQLiteStorage) GetTraitByName

func (s *SoulSQLiteStorage) GetTraitByName(ctx context.Context, agentID, name string) (*entities.PersonalityTrait, error)

func (*SoulSQLiteStorage) GetTraitsByCategory

func (s *SoulSQLiteStorage) GetTraitsByCategory(ctx context.Context, agentID string, category entities.TraitCategory) ([]*entities.PersonalityTrait, error)

func (*SoulSQLiteStorage) GetWellEstablishedTraits

func (s *SoulSQLiteStorage) GetWellEstablishedTraits(ctx context.Context, agentID string, minConfidence float64) ([]*entities.PersonalityTrait, error)

func (*SoulSQLiteStorage) LinkIdentityToMemory

func (s *SoulSQLiteStorage) LinkIdentityToMemory(ctx context.Context, identityID, memoryID uuid.UUID) error

func (*SoulSQLiteStorage) ListAgents

func (s *SoulSQLiteStorage) ListAgents(ctx context.Context) ([]string, error)

func (*SoulSQLiteStorage) NotifyMiraOfIdentityChange

func (s *SoulSQLiteStorage) NotifyMiraOfIdentityChange(ctx context.Context, agentID string, changeType string) error

func (*SoulSQLiteStorage) RecordDiff

func (s *SoulSQLiteStorage) RecordDiff(ctx context.Context, diff *entities.IdentityDiff) error

func (*SoulSQLiteStorage) RecordModelSwap

func (s *SoulSQLiteStorage) RecordModelSwap(ctx context.Context, swap *valueobjects.ModelSwapContext) error

func (*SoulSQLiteStorage) StoreIdentity

func (s *SoulSQLiteStorage) StoreIdentity(ctx context.Context, identity *entities.IdentitySnapshot) error

func (*SoulSQLiteStorage) StoreObservation

func (s *SoulSQLiteStorage) StoreObservation(ctx context.Context, obs *entities.TraitObservation) error

func (*SoulSQLiteStorage) StoreTrait

func (s *SoulSQLiteStorage) StoreTrait(ctx context.Context, trait *entities.PersonalityTrait) error

func (*SoulSQLiteStorage) UpdateTrait

func (s *SoulSQLiteStorage) UpdateTrait(ctx context.Context, trait *entities.PersonalityTrait) error

Jump to

Keyboard shortcuts

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