Versions in this module Expand all Collapse all v0 v0.1.0 May 7, 2026 Changes in this version + const MaxAgentLabelChars + const MaxContentBytes + const MaxSessionSummaryBytes + const MaxTagLen + const MaxTitleChars + const MaxTopicKeyLen + var ErrAgentLabelTooLong = errors.New("session: agent_label exceeds maximum characters") + var ErrContentTooLong = errors.New("memory: content exceeds maximum bytes") + var ErrEmptyContent = errors.New("memory: content must not be empty") + var ErrEmptyProject = errors.New("memory: project must not be empty") + var ErrEmptySessionProject = errors.New("session: project must not be empty") + var ErrEmptySessionSummary = errors.New("session: summary must not be empty when ending a session") + var ErrEmptyTitle = errors.New("memory: title must not be empty") + var ErrInvalidScope = errors.New("memory: invalid scope") + var ErrInvalidSessionID = errors.New("session: invalid id (must be a UUIDv7)") + var ErrInvalidTag = errors.New("memory: invalid tag format") + var ErrInvalidTopicKey = errors.New("memory: invalid topic_key format") + var ErrInvalidType = errors.New("memory: invalid type") + var ErrNonPreferenceMustBeProject = errors.New("memory: non-preference types require project scope") + var ErrPreferenceMustBePersonal = errors.New("memory: preference type requires personal scope") + var ErrSessionEndedBeforeStart = errors.New("session: ended_at must be at or after started_at") + var ErrSessionSummaryTooLong = errors.New("session: summary exceeds maximum bytes") + var ErrTitleTooLong = errors.New("memory: title exceeds 200 characters") + func Validate(m Memory) error + func ValidateSession(s Session) error + type Memory struct + Content string + CreatedAt time.Time + DeletedAt *time.Time + ID int64 + NormalizedHash string + Project string + RevisionCount int + Scope Scope + SessionID string + SyncID string + Tags []string + Title string + TopicKey string + Type Type + UpdatedAt time.Time + type Scope string + const ScopePersonal + const ScopeProject + func (s Scope) Valid() bool + type Session struct + AgentLabel string + EndedAt *time.Time + ID string + Project string + StartedAt time.Time + Summary string + func (s Session) Duration() time.Duration + func (s Session) IsOpen() bool + type Type string + const TypeArchitecture + const TypeAssetReference + const TypeBugfix + const TypeConvention + const TypeDecision + const TypeGameDesignDecision + const TypePerfGotcha + const TypePipelineStep + const TypePreference + const TypeScenePattern + const TypeScriptPattern + func AllTypes() []Type + func (t Type) Valid() bool