learning

package
v0.3.14 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package learning defines injectable boundaries for learning/default and related plugins.

learning/default (*plugins/learning.Service) implements SkillProposer, ReviewHost, and DreamSweepScheduler. Config deps use json key "learning".

memory/default implements cap/memory.Capture; hook/background-review deps both learning and memory.

hook/background-review requires ReviewHost + cap/memory.Capture (learn_capture is built in-hook). learning/dream-sweep requires DreamSweepScheduler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaptureInput

type CaptureInput struct {
	Action  string `json:"action" jsonschema:"memory_add | memory_replace | memory_remove | skill_propose"`
	Content string `json:"content,omitempty" jsonschema:"Text for memory_add/replace or skill body for skill_propose"`
	OldText string `json:"old_text,omitempty" jsonschema:"Substring for memory_remove or memory_replace"`
	Name    string `json:"name,omitempty" jsonschema:"Skill name for skill_propose"`
	Focus   string `json:"focus,omitempty" jsonschema:"Short focus for skill_propose"`
}

CaptureInput is the learn_capture tool schema.

type CaptureOutput

type CaptureOutput struct {
	OK      bool   `json:"ok"`
	Message string `json:"message"`
}

CaptureOutput is returned to the review model.

type DreamSweepScheduler

type DreamSweepScheduler interface {
	Disabled() bool
	Workspace() workspace.Service
	DreamSweepDue(ctx context.Context) bool
	RunScheduledDreamSweep(ctx context.Context) error
}

DreamSweepScheduler is the learning/default surface for learning/dream-sweep.

type NudgeSessionState

type NudgeSessionState struct {
	TurnsSinceMemory int `json:"turnsSinceMemory"`
}

NudgeSessionState tracks background memory review cadence for one conversation.

type ReviewHost

type ReviewHost interface {
	Disabled() bool
	Workspace() workspace.Service
	SessionsDir() string
	ReviewSignalCandidates(ctx context.Context) string
	TryConsumeReviewQuota(ctx context.Context, maxPerDay int) (bool, error)
	ReviewNudgeLoad(ctx context.Context, sessionID string) (NudgeSessionState, bool, error)
	ReviewNudgeSave(ctx context.Context, sessionID string, state NudgeSessionState) error
}

ReviewHost is the learning/default surface for hook/background-review (orchestration only).

type SkillProposer

type SkillProposer interface {
	CaptureSkillPropose(ctx context.Context, name, body, sessionID, focus, source string) (string, error)
}

SkillProposer applies learn_capture skill_propose during background review.

Jump to

Keyboard shortcuts

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