Documentation
¶
Overview ¶
Package reflexivecapture wires reflexive knowledge activation (#635) into the platform: it observes Trino query errors and mints a "misconception + fix" correction memory when a later related query succeeds in the same session. It lives in its own package so the platform facade stays within its size budget and the wiring is cohesive and independently testable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Wire ¶
func Wire(d Deps) *middleware.SessionErrorTracker
Wire registers the reflexive-capture middleware when enabled and the memory subsystem is available, returning the session error tracker so the caller can Stop it on shutdown (nil when not wired).
Types ¶
type Config ¶
type Config struct {
Enabled *bool `yaml:"enabled"`
}
Config is the reflexive-capture YAML config block.
type Deps ¶
type Deps struct {
Enabled bool
Server *mcp.Server
Toolkit *memorykit.Toolkit
// BuildURN entity-keys a correction to the dataset it concerns. The
// platform owns the one builder (connection -> platform and catalog
// mapping -> URN); nil leaves corrections unkeyed.
BuildURN middleware.URNBuilder
// PersonaAllowsTool gates capture on the memory_capture grant. Nil means no
// persona gating is configured (allow), matching the tools/list visibility
// middleware when no authorizer is wired.
PersonaAllowsTool PersonaToolCheck
}
Deps carries the platform primitives Wire needs, kept as plain values and closures so this package never imports the platform package (which would cycle).