Documentation
¶
Overview ¶
Package pipeline implements the offline memory distillation pipeline (design §5): phase 1 extracts durable facts per ended session with a cheap model; phase 2 consolidates them into curated artifacts with a restricted subagent, git-diff driven with a zero-token no-op fast path.
It lives in a subpackage because internal/agent and internal/tools import internal/memory (usage middleware, note tool); the pipeline needs both.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MaybeStartBackground ¶
MaybeStartBackground fires a pipeline run in a goroutine if the gates pass (design §5.1): enabled, not a subagent context, cooldown handled inside Run. Errors are logged, never surfaced to the session.
Types ¶
type Options ¶
type Options struct {
// IncludeRecent skips the "session idle for 2h / ended" gate — needed by
// `memory sync` right after a session and by the e2e suite.
IncludeRecent bool
// IgnoreCooldown forces a run even within the cooldown window (manual sync).
IgnoreCooldown bool
// Log receives progress lines; nil means silent.
Log func(format string, args ...any)
}
Options controls one pipeline run.