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 ¶
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 (*Engine) Enabled ¶
Enabled reports whether memory.synthesis.enabled is on in the live configuration.
type JobOneShot ¶
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 ¶
func (o JobOneShot) Run(ctx context.Context, r memorysynthesis.OneShotRequest) (string, error)