memoryplugin

package
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: May 30, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginID      = "memory"
	IndexFileName = "MEMORY.md"
)

Variables

This section is empty.

Functions

func DisplayEntry

func DisplayEntry(e Entry) string

func FormatList

func FormatList(store *Store) string

func FormatPaths

func FormatPaths(store *Store) string

func HandleCommand

func HandleCommand(store *Store, line string) (string, bool, error)

func ParseScopedName

func ParseScopedName(raw string) (string, string, error)

func StartupContext

func StartupContext(_ context.Context, store *Store) (string, error)

func Tools

func Tools(store *Store) []core.Tool

func WorkspaceHash

func WorkspaceHash(root string) string

Types

type Entry

type Entry struct {
	Name            string
	Type            string
	Scope           string
	Description     string
	Content         string
	Created         string
	Updated         string
	Path            string
	UpdatedExisting bool
}

type Plugin

type Plugin struct{}

func New

func New() *Plugin

func (*Plugin) ID

func (p *Plugin) ID() string

func (*Plugin) Name

func (p *Plugin) Name() string

type Store

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

func NewStore

func NewStore(root, workspaceRoot string) *Store

func (*Store) CappedIndex

func (s *Store) CappedIndex(scope string, maxBytes int) (string, string, bool, error)

func (*Store) Delete

func (s *Store) Delete(scope, rawName string) (bool, error)

func (*Store) Index

func (s *Store) Index(scope string) (string, string, error)

func (*Store) IndexPath

func (s *Store) IndexPath(scope string) (string, error)

func (*Store) Read

func (s *Store) Read(scope, rawName string) (Entry, error)

func (*Store) Root

func (s *Store) Root() string

func (*Store) ScopeDir

func (s *Store) ScopeDir(scope string) (string, error)

func (*Store) Write

func (s *Store) Write(in WriteInput) (Entry, error)

type WriteInput

type WriteInput struct {
	Name        string
	Type        string
	Scope       string
	Description string
	Content     string
}

Jump to

Keyboard shortcuts

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