Documentation
¶
Index ¶
- type SoulDriftDetector
- func (d *SoulDriftDetector) CalculateIdentityVector(ctx context.Context, identity *entities.IdentitySnapshot) (*entities.IdentityDimensionVector, error)
- func (d *SoulDriftDetector) DetectDiffusion(ctx context.Context, identity *entities.IdentitySnapshot) (bool, float64, error)
- func (d *SoulDriftDetector) DetectDrift(ctx context.Context, previous, current *entities.IdentitySnapshot) (*valueobjects.IdentityDriftReport, error)
- func (d *SoulDriftDetector) MonitorContinuously(ctx context.Context, agentID string, threshold float64) (<-chan valueobjects.IdentityDriftReport, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SoulDriftDetector ¶
type SoulDriftDetector struct {
// contains filtered or unexported fields
}
SoulDriftDetector implémente ports.IdentityDriftDetector Utilise des algorithmes de comparaison pour détecter la dérive identitaire.
func NewSoulDriftDetector ¶
func NewSoulDriftDetector(threshold float64) *SoulDriftDetector
NewSoulDriftDetector crée un nouveau détecteur de dérive
func (*SoulDriftDetector) CalculateIdentityVector ¶
func (d *SoulDriftDetector) CalculateIdentityVector(ctx context.Context, identity *entities.IdentitySnapshot) (*entities.IdentityDimensionVector, error)
CalculateIdentityVector calcule le vecteur dimensionnel de l'identité
func (*SoulDriftDetector) DetectDiffusion ¶
func (d *SoulDriftDetector) DetectDiffusion(ctx context.Context, identity *entities.IdentitySnapshot) (bool, float64, error)
DetectDiffusion détecte si l'identité s'est "diffusée" (perdue)
func (*SoulDriftDetector) DetectDrift ¶
func (d *SoulDriftDetector) DetectDrift(ctx context.Context, previous, current *entities.IdentitySnapshot) (*valueobjects.IdentityDriftReport, error)
DetectDrift compare deux snapshots et détecte la dérive
func (*SoulDriftDetector) MonitorContinuously ¶
func (d *SoulDriftDetector) MonitorContinuously(ctx context.Context, agentID string, threshold float64) (<-chan valueobjects.IdentityDriftReport, error)
MonitorContinuously periodically checks for identity drift. The monitoring loop runs until the context is cancelled. Drift reports are sent on the returned channel when significant drift is detected.
NOTE: This implementation is a stub that logs monitoring ticks. For production, integrate with storage to fetch snapshots and call DetectDrift.