memory

package
v0.2.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DirName          = "memory"
	WorkflowFileName = "MEMORY.md"
)

Variables

This section is empty.

Functions

func Directory

func Directory(tasksDir string) string

func ResolveDocumentPath added in v0.1.11

func ResolveDocumentPath(tasksDir, taskFileName string) string

func TaskPath

func TaskPath(tasksDir, taskFileName string) string

func WorkflowPath

func WorkflowPath(tasksDir string) string

Types

type Context

type Context struct {
	Directory string
	Workflow  FileState
	Task      FileState
}

func Prepare

func Prepare(tasksDir, taskFileName string) (Context, error)

type Document added in v0.1.11

type Document struct {
	FileState
	Content string
	Exists  bool
}

func ReadDocument added in v0.1.11

func ReadDocument(tasksDir, taskFileName string) (Document, error)

func WriteDocument added in v0.1.11

func WriteDocument(tasksDir, taskFileName, content string, mode WriteMode) (Document, int, error)

type FileState

type FileState struct {
	Path            string
	LineCount       int
	ByteCount       int
	NeedsCompaction bool
}

type WriteMode added in v0.1.11

type WriteMode string
const (
	WriteModeReplace WriteMode = "replace"
	WriteModeAppend  WriteMode = "append"
)

Jump to

Keyboard shortcuts

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