Documentation
¶
Index ¶
- func FormatMemory(entries []capmemory.MemoryEntry, used, limit int) string
- func NewMemoryTool(_ struct{}, deps MemoryToolDeps) (agentkit.Tool, error)
- type Config
- type Deps
- type MemoryToolDeps
- type ReviewConfig
- type Service
- func (s *Service) ApproveStaged(ctx context.Context, id string) (string, error)
- func (s *Service) BackgroundReviewRequiresStaging(ctx context.Context) bool
- func (s *Service) CaptureMemoryAdd(ctx context.Context, text, source string) (string, error)
- func (s *Service) CaptureMemoryRemove(ctx context.Context, oldText string) (string, error)
- func (s *Service) CaptureMemoryReplace(ctx context.Context, oldText, content, source string) (string, error)
- func (s *Service) Commands() []agentkit.Command
- func (s *Service) Disabled() bool
- func (s *Service) ListStaged(ctx context.Context) ([]capmemory.StagedEntry, error)
- func (s *Service) LoadEntries(ctx context.Context) ([]capmemory.MemoryEntry, int, int, error)
- func (s *Service) MemoryTool(ctx context.Context, in capmemory.MemoryToolInput) (capmemory.MemoryToolOutput, error)
- func (s *Service) PromptBody(ctx context.Context) (string, error)
- func (s *Service) RegisterCommitObserver(o capmemory.CommitObserver)
- func (s *Service) RejectStaged(ctx context.Context, id string) (string, error)
- func (s *Service) ResolveRel(ctx context.Context, parts ...string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatMemory ¶
func FormatMemory(entries []capmemory.MemoryEntry, used, limit int) string
func NewMemoryTool ¶
func NewMemoryTool(_ struct{}, deps MemoryToolDeps) (agentkit.Tool, error)
NewMemoryTool registers tool/memory for the main agent.
Types ¶
type Config ¶
type Config struct {
Disabled bool `json:"disabled"`
CharLimit int `json:"charLimit"`
MemoryRoot string `json:"memoryRoot"`
MemoryFile string `json:"memoryFile"`
Review ReviewConfig `json:"review"`
}
type MemoryToolDeps ¶
type ReviewConfig ¶
type ReviewConfig struct {
WriteApproval *bool `json:"writeApproval"`
}
ReviewConfig controls background-review memory writes.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service owns tenant memory.md, ledger, staged review, and /memory commands.
func (*Service) ApproveStaged ¶
func (*Service) BackgroundReviewRequiresStaging ¶
BackgroundReviewRequiresStaging implements cap/memory.Service.
func (*Service) CaptureMemoryAdd ¶
func (*Service) CaptureMemoryRemove ¶
func (*Service) CaptureMemoryReplace ¶
func (*Service) ListStaged ¶
func (*Service) LoadEntries ¶
func (*Service) MemoryTool ¶
func (s *Service) MemoryTool(ctx context.Context, in capmemory.MemoryToolInput) (capmemory.MemoryToolOutput, error)
func (*Service) RegisterCommitObserver ¶
func (s *Service) RegisterCommitObserver(o capmemory.CommitObserver)
RegisterCommitObserver appends a post-commit hook (learning/default registers in New).
func (*Service) RejectStaged ¶
Click to show internal directories.
Click to hide internal directories.