Help us shape the future of Go! Take the 2026 Go Developer Survey

pipeline

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 23 Imported by: 0

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

func MaybeStartBackground(cfg *config.Config, projectDir string)

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.

func Run

func Run(ctx context.Context, cfg *config.Config, projectDir string, opts Options) error

Run executes phase 1 + phase 2 for a project. Concurrency-safe across processes: a non-blocking flock guards the whole run, so concurrent sessions simply skip.

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.

Jump to

Keyboard shortcuts

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