memory

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 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

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

type Document struct {
	FileState
	Content string
	Exists  bool
}

func ReadDocument

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

func WriteDocument

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

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