Documentation
¶
Index ¶
- type Entry
- type Manager
- func (m *Manager) Delete(idOrKey string) error
- func (m *Manager) FormatPrompt() string
- func (m *Manager) List() []Entry
- func (m *Manager) Reload()
- func (m *Manager) Save(e Entry) error
- func (m *Manager) Search(query string) []Entry
- func (m *Manager) SetGlobalDir(dir string)
- func (m *Manager) SetWorkspace(dir string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
ID string `json:"id"`
Key string `json:"key"`
Content string `json:"content"`
Category string `json:"category,omitempty"` // "project", "architecture", "preference", "rule"
Scope string `json:"scope,omitempty"` // "workspace", "global"
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Entry represents a single memory item persisted across agent turns.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages workspace and global persistent memory for agents.
func New ¶
New creates a new memory Manager. Global memories default to <store root>/memory.json; hosts with their own layout override it via SetGlobalDir before use.
func (*Manager) FormatPrompt ¶
FormatPrompt constructs the <project_memory> block for the agent system prompt.
func (*Manager) Reload ¶
func (m *Manager) Reload()
Reload loads all memories from workspace (.forge/memory.json) and global (~/.forge-ade/memory.json).
func (*Manager) SetGlobalDir ¶
SetGlobalDir points the global memory scope at dir and reloads.
func (*Manager) SetWorkspace ¶
SetWorkspace updates the active workspace directory and reloads memories.
Click to show internal directories.
Click to hide internal directories.