types

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 Delivery added in v0.5.0

type Delivery string
const (
	DeliveryBootstrap Delivery = "bootstrap"
	DeliveryOnDemand  Delivery = "on_demand"
	DeliveryPinned    Delivery = "pinned"
)

type ListInput

type ListInput struct {
	Scope    string `json:"scope,omitempty"`
	Project  string `json:"project,omitempty"`
	Type     string `json:"type,omitempty"`
	Delivery string `json:"delivery,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"`
	Type       MemoryType `json:"type"`
	Delivery   Delivery   `json:"delivery"`
	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"`
	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"`
	Type       MemoryType `json:"type"`
	Delivery   Delivery   `json:"delivery,omitempty"`
	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"
)

type StatsResult

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

Jump to

Keyboard shortcuts

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