Documentation
¶
Index ¶
- Constants
- func FormatHelp() string
- func FormatMemory(entries []MemoryEntry, used, limit int) string
- func MemoryRelPath(root, file string) string
- func NewBackgroundReview(cfg BackgroundReviewConfig, deps backgroundReviewDeps) (agentkit.HookProvider, error)
- func NewDreamSweep(cfg DreamSweepConfig, deps DreamSweepDeps) (capschedule.Runtime, error)
- func NewLearnCapture(_ struct{}, deps struct{ ... }) (agentkit.Tool, error)
- func RenderMemory(entries []MemoryEntry) string
- func SummarizeSessionUserMessages(ctx context.Context, store agentkit.SessionStore, sessionID agentkit.SessionID, ...) (string, error)
- type BackgroundReviewConfig
- type Config
- type Deps
- type DreamSweep
- type DreamSweepConfig
- type DreamSweepDeps
- type MemoryEntry
- type MemoryStore
- type ReviewServiceConfig
- type Service
- 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) CaptureSkillPropose(ctx context.Context, name, body, sessionID, focus, source string) (string, error)
- func (s *Service) Commands() []agentkit.Command
- func (s *Service) LoadEntries(ctx context.Context) ([]MemoryEntry, int, int, error)
Constants ¶
const ( // DefaultMemoryRoot is the workspace-relative directory for memory.md (tenant local root). DefaultMemoryRoot = "." DefaultMemoryFile = "memory.md" DefaultCharLimit = 2200 DefaultDreamsFile = "DREAMS.md" DefaultDreamingSubdir = "memory/dreaming" DefaultStagedSubdir = "memory/.staged" )
Variables ¶
This section is empty.
Functions ¶
func FormatMemory ¶
func FormatMemory(entries []MemoryEntry, used, limit int) string
FormatMemory renders memory entries for display.
func MemoryRelPath ¶
MemoryRelPath returns workspace-relative path to memory.md.
func NewBackgroundReview ¶ added in v0.3.13
func NewBackgroundReview(cfg BackgroundReviewConfig, deps backgroundReviewDeps) (agentkit.HookProvider, error)
NewBackgroundReview registers hook/background-review: spawn an LLM review fork after each successful turn.
func NewDreamSweep ¶ added in v0.1.17
func NewDreamSweep(cfg DreamSweepConfig, deps DreamSweepDeps) (capschedule.Runtime, error)
NewDreamSweep registers learning/dream-sweep: background grounded dreaming sweeps.
func NewLearnCapture ¶ added in v0.3.13
func NewLearnCapture(_ struct{}, deps struct {
Learning *Service `json:"learning"`
}) (agentkit.Tool, error)
NewLearnCapture registers tool/learn-capture for background review and /learn tooling.
func RenderMemory ¶
func RenderMemory(entries []MemoryEntry) string
RenderMemory serializes entries into a memory.md file body.
Types ¶
type BackgroundReviewConfig ¶ added in v0.3.13
type BackgroundReviewConfig struct {
Enabled *bool `json:"enabled"`
Model string `json:"model"`
MaxSteps int `json:"maxSteps"`
MaxDigestMessages int `json:"maxDigestMessages"`
SkipSlashOnly *bool `json:"skipSlashOnly"`
MinTurnTokens int `json:"minTurnTokens"`
MaxReviewsPerDay int `json:"maxReviewsPerDay"`
MinIdleSeconds int `json:"minIdleSeconds"`
Notify bool `json:"notify"`
}
BackgroundReviewConfig controls post-turn LLM review (Hermes-style learning fork).
type Config ¶
type Config struct {
Disabled bool `json:"disabled"`
CharLimit int `json:"charLimit"`
// MemoryRoot is where memory.md, dreaming, and staged review files live.
// Default "." resolves under each tenant local root; use "global:." for shared ~/.agentkit (or L1 global root).
MemoryRoot string `json:"memoryRoot"`
MemoryFile string `json:"memoryFile"`
SessionsDir string `json:"sessionsDir"`
Dreaming dreaming.Config `json:"dreaming"`
Workshop workshop.Config `json:"workshop"`
Review ReviewServiceConfig `json:"review"`
}
type Deps ¶
type Deps struct {
Workspace workspace.Service `json:"workspace"`
SessionStore agentkit.SessionStore `json:"sessionStore"`
}
type DreamSweep ¶ added in v0.1.17
type DreamSweep struct {
// contains filtered or unexported fields
}
DreamSweep runs scheduled dreaming sweeps without agent turns.
func (*DreamSweep) Start ¶ added in v0.1.17
func (d *DreamSweep) Start(ctx context.Context, _ capschedule.SubmitFunc) error
type DreamSweepConfig ¶ added in v0.1.17
type DreamSweepConfig struct {
PollSeconds int `json:"pollSeconds"`
}
type DreamSweepDeps ¶ added in v0.1.17
type DreamSweepDeps struct {
Learning *Service `json:"learning"`
}
type MemoryEntry ¶
type MemoryEntry = rtlearning.MemoryEntry
MemoryEntry is one §-delimited block in memory.md.
func ParseMemory ¶
func ParseMemory(raw string) []MemoryEntry
ParseMemory splits a memory.md body into entries.
type MemoryStore ¶
type MemoryStore struct {
Path string
CharLimit int
// DocName is the file title in the on-disk header (default memory.md).
DocName string
}
MemoryStore reads and writes a §-delimited memory.md file with capacity limits.
func NewMemoryStore ¶
func NewMemoryStore(path string, charLimit int) *MemoryStore
func (*MemoryStore) Add ¶
func (s *MemoryStore) Add(content, source string) error
func (*MemoryStore) Load ¶
func (s *MemoryStore) Load() ([]MemoryEntry, error)
func (*MemoryStore) Remove ¶
func (s *MemoryStore) Remove(oldText string) error
func (*MemoryStore) Save ¶
func (s *MemoryStore) Save(entries []MemoryEntry) error
func (*MemoryStore) TotalChars ¶
func (s *MemoryStore) TotalChars(entries []MemoryEntry) int
type ReviewServiceConfig ¶ added in v0.3.13
type ReviewServiceConfig struct {
// WriteApproval when true, background-review memory writes are staged until /learn approve (default false = auto).
WriteApproval *bool `json:"writeApproval"`
}
ReviewServiceConfig controls background-review writes (learning/default).
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service owns tenant personal memory, dreaming, workshop, and /learn commands.
func (*Service) CaptureMemoryAdd ¶ added in v0.3.13
CaptureMemoryAdd implements rtlearning.CaptureApplier.
func (*Service) CaptureMemoryRemove ¶ added in v0.3.13
CaptureMemoryRemove implements rtlearning.CaptureApplier.
func (*Service) CaptureSkillPropose ¶ added in v0.3.13
func (s *Service) CaptureSkillPropose(ctx context.Context, name, body, sessionID, focus, source string) (string, error)
CaptureSkillPropose implements rtlearning.CaptureApplier.
func (*Service) LoadEntries ¶
LoadEntries reads personal memory for the current tenant workspace.