memory

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppService

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

*

  • ⚔️ HAKAISHIN DOMAIN SERVICE (WAVE 7)
  • Orchestrates the Kairos Memory Distillation flow.

func NewAppService

func NewAppService(memory MemoryProvider, distiller Distiller) *AppService

func (*AppService) DistillAndSave

func (s *AppService) DistillAndSave(ctx context.Context, project string, hours int) error

*

  • DistillAndSave: Core logic for memory purification.
  • Decoupled from CLI flags, SQLite, and Gemini SDK.

func (*AppService) PassiveDistill

func (s *AppService) PassiveDistill(ctx context.Context, project string, transcript []Message) error

*

  • PassiveDistill: Background distillation of session highlights.
  • Triggered automatically at turn ends.

func (*AppService) SetDistiller

func (s *AppService) SetDistiller(distiller Distiller)

type DistilledMemory

type DistilledMemory struct {
	Type    string `json:"type"` // architecture, bugfix, pattern
	Topic   string `json:"topic,omitempty"`
	Title   string `json:"title"`
	Content string `json:"content"`
}

*

  • ⚔️ HAKAISHIN DOMAIN: Distilled Memory (WAVE 11)
  • Represents a discrete finding from a session.

type Distiller

type Distiller interface {
	Distill(ctx context.Context, logs []Observation) (Summary, error)
	DistillTranscript(ctx context.Context, transcript []Message) ([]DistilledMemory, error)
}

*

  • ⚔️ HAKAISHIN DOMAIN: Distiller Interface
  • Decouples the distillation logic from Gemini/Google Gen AI SDK.

type MemoryProvider

type MemoryProvider interface {
	GetRecentObservations(ctx context.Context, project string, hours int) ([]Observation, error)
	SaveObservation(ctx context.Context, project string, memory DistilledMemory) error
	SearchInsights(ctx context.Context, query string, limit int) ([]types.MemoryInsight, error)
	SaveSummary(ctx context.Context, project string, summary Summary) error
}

*

  • ⚔️ HAKAISHIN DOMAIN: Memory Provider Interface
  • Decouples the distillation logic from SQLite/Engram storage.

type Message

type Message struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

*

  • ⚔️ HAKAISHIN DOMAIN: Transcript Message (WAVE 11)

type Observation

type Observation struct {
	Content         string   `json:"content"`
	ASTContext      string   `json:"ast_context,omitempty"`
	StructuralLinks []string `json:"structural_links,omitempty"`
}

*

  • ⚔️ HAKAISHIN DOMAIN: Observations (WAVE 7)

type Summary

type Summary struct {
	ADRs     []string `json:"adrs"`
	BugFixes []string `json:"bug_fixes"`
	Patterns []string `json:"patterns"`
}

*

  • ⚔️ HAKAISHIN DOMAIN: Distillation Summary (WAVE 7)

type SymbolSearcher

type SymbolSearcher interface {
	SearchSymbols(ctx context.Context, query string, symType string, limit, offset int) ([]types.Symbol, error)
}

*

  • ⚔️ HAKAISHIN DOMAIN: Symbol Searcher Interface
  • Used by providers to correlate memory with structural data.

Jump to

Keyboard shortcuts

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