types

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContradictionMatch

type ContradictionMatch struct {
	Memory     Memory  `json:"memory"`
	Similarity float32 `json:"similarity"`
}

ContradictionMatch represents a potentially conflicting existing memory.

type ListInput

type ListInput struct {
	Scope   string `json:"scope,omitempty"`
	Project string `json:"project,omitempty"`
	Persona string `json:"persona,omitempty"`
	Type    string `json:"type,omitempty"`
	Limit   int    `json:"limit,omitempty"`
}

type Memory

type Memory struct {
	ID         string     `json:"id"`
	Content    string     `json:"content"`
	Scope      Scope      `json:"scope"`
	Project    string     `json:"project,omitempty"`
	Persona    string     `json:"persona,omitempty"`
	Type       MemoryType `json:"type"`
	Tags       []string   `json:"tags,omitempty"`
	Weight     float64    `json:"weight"`
	Supersedes string     `json:"supersedes,omitempty"`
	CreatedAt  time.Time  `json:"created_at"`
	UpdatedAt  time.Time  `json:"updated_at"`
	TTL        *time.Time `json:"ttl,omitempty"`
}

type MemoryType

type MemoryType string
const (
	TypeFact     MemoryType = "fact"
	TypeRule     MemoryType = "rule"
	TypeDecision MemoryType = "decision"
	TypeFeedback MemoryType = "feedback"
	TypeContext  MemoryType = "context"
)

type RecallInput

type RecallInput struct {
	Query   string `json:"query"`
	Scope   string `json:"scope,omitempty"`
	Project string `json:"project,omitempty"`
	Persona string `json:"persona,omitempty"`
	Limit   int    `json:"limit,omitempty"`
}

type RecallResult

type RecallResult struct {
	Memory Memory  `json:"memory"`
	Score  float32 `json:"score"`
}

type RememberInput

type RememberInput struct {
	Content    string     `json:"content"`
	Scope      Scope      `json:"scope"`
	Project    string     `json:"project,omitempty"`
	Persona    string     `json:"persona,omitempty"`
	Type       MemoryType `json:"type"`
	Tags       []string   `json:"tags,omitempty"`
	Weight     float64    `json:"weight,omitempty"`
	Supersedes string     `json:"supersedes,omitempty"`
	TTL        string     `json:"ttl,omitempty"` // duration string, e.g. "24h"
}

type RememberResult

type RememberResult struct {
	Memory         *Memory              `json:"memory"`
	Contradictions []ContradictionMatch `json:"contradictions,omitempty"`
}

RememberResult is returned by Remember() — includes stored memory and any contradiction warnings.

type Scope

type Scope string
const (
	ScopeGlobal  Scope = "global"
	ScopeProject Scope = "project"
	ScopePersona Scope = "persona"
)

type StatsResult

type StatsResult struct {
	Total     uint64            `json:"total"`
	ByScope   map[string]uint64 `json:"by_scope"`
	ByProject map[string]uint64 `json:"by_project"`
	ByPersona map[string]uint64 `json:"by_persona"`
	ByType    map[string]uint64 `json:"by_type"`
}

Jump to

Keyboard shortcuts

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