engine

package
v0.207.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package engine assembles one explicit daily memory synthesis run: it reads the live memory.synthesis configuration, builds the material sources and the model-backed synthesizer, and drives memorysynthesis.Service. It sits above memorysynthesis (and uses job for the one-shot model call) so the entry layers (httpapi, commands) only bind parameters and forward (G021); nothing in memorysynthesis imports it back (G022).

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDisabled: memory.synthesis.enabled is false.
	ErrDisabled = errors.New("memory synthesis is disabled: set memory.synthesis.enabled to true in the server configuration")
	// ErrProject: the project is unknown or not listed in memory.synthesis.projects.
	ErrProject = errors.New("memory synthesis project not available")
	// ErrAgent: the configured synthesis agent cannot run a read-only, tool-less call.
	ErrAgent = errors.New("memory synthesis agent unusable")
	// ErrDay: the day is not a YYYY-MM-DD date.
	ErrDay = errors.New("memory synthesis day must be YYYY-MM-DD")
)

Errors a caller maps to an answer; the wrapped text says what to change.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	Store   *jobstore.Store
	Doctor  sources.DoctorReader
	Config  func() *config.Config
	OneShot OneShot
	Now     func() time.Time
}

Deps are the engine's collaborators. Config returns the live configuration generation (hot reload takes effect on the next run).

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine runs explicit synthesis requests.

func New

func New(d Deps) *Engine

New builds an Engine.

func (*Engine) Enabled

func (e *Engine) Enabled() bool

Enabled reports whether memory.synthesis.enabled is on in the live configuration.

func (*Engine) Run

Run executes one explicit synthesis: disabled configuration is refused before anything is read or sent; otherwise the run record, reuse and force semantics are those of memorysynthesis.Service.

type JobOneShot

type JobOneShot struct {
	Jobs   *job.Service
	Agents *agent.Registry
}

JobOneShot is the production memorysynthesis.OneShot: one read-only, tool-less, single-turn job of a cli-agent on the server's own runner, with the summarizer's internal tag (hidden from ordinary lists and excluded from the synthesis materials) and no project rules.

func (JobOneShot) Check

func (o JobOneShot) Check(agentKey string) error

Check says why the agent cannot run a synthesis ("" nil = usable), before any record exists.

func (JobOneShot) Run

type OneShot

type OneShot interface {
	memorysynthesis.OneShot
	Check(agent string) error
}

OneShot is memorysynthesis.OneShot plus the up-front usability check.

type Request

type Request struct {
	Project string
	// Day is YYYY-MM-DD in the server time zone; "" means today.
	Day       string
	CreatedBy string
	// Origin is the ceiling owner of the model call (the calling person).
	Origin string
	Force  bool
}

Request is one explicit run.

Jump to

Keyboard shortcuts

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