localmarkdown

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Path           string
	AgentID        string
	WorkspaceID    string
	ObserverPeerID string
	PeerID         string
	SessionID      string
}

Config wires the local-first Goncho V1 memory tools to a SQLite database and a Markdown export file.

type Entry

type Entry struct {
	ID         string            `json:"id"`
	Content    string            `json:"content"`
	Tags       []string          `json:"tags"`
	Importance float64           `json:"importance"`
	SessionID  string            `json:"session_id,omitempty"`
	CreatedAt  time.Time         `json:"created_at"`
	UpdatedAt  time.Time         `json:"updated_at"`
	Metadata   map[string]string `json:"metadata,omitempty"`
}

Entry is a single unit of agent-managed memory stored by the local Markdown memory backend.

type Status

type Status struct {
	Enabled         bool     `json:"enabled"`
	Path            string   `json:"path"`
	LocalFirst      bool     `json:"local_first"`
	SQLiteBacked    bool     `json:"sqlite_backed"`
	MarkdownBacked  bool     `json:"markdown_backed"`
	NetworkRequired bool     `json:"network_required"`
	OllamaRequired  bool     `json:"ollama_required"`
	MCPTools        []string `json:"mcp_tools"`
	Evidence        []string `json:"evidence,omitempty"`
}

Status is the operator-facing status for the local memory backend used by Memory V1 MCP tools.

type Store

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

Store persists tool memories into the Goncho V1 SQLite table and mirrors the table to a human-editable Markdown file.

func NewStore

func NewStore(db *sql.DB, cfg Config) *Store

func (*Store) Forget

func (s *Store) Forget(ctx context.Context, id string) error

func (*Store) Retrieve

func (s *Store) Retrieve(ctx context.Context, query string, limit int) ([]Entry, error)

func (*Store) Status

func (s *Store) Status(ctx context.Context) (Status, error)

func (*Store) Store

func (s *Store) Store(ctx context.Context, entry Entry) error

func (*Store) Update

func (s *Store) Update(ctx context.Context, id string, content string) error

func (*Store) UpdateImportance

func (s *Store) UpdateImportance(ctx context.Context, id string, importance float64) error

Jump to

Keyboard shortcuts

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