Documentation
¶
Index ¶
Constants ¶
const BuiltinJobName = "reflect-review"
BuiltinJobName is the scheduler builtin name reflect registers under. Exported so gateway wiring and operational tooling refer to one source.
Variables ¶
This section is empty.
Functions ¶
func NewBuiltinHandler ¶ added in v0.38.0
NewBuiltinHandler returns a scheduler.OnJobFunc that runs one reflect review cycle per fire. Cycle-level failures (store errors, ctx cancellation) surface as errors so the scheduler marks the run errored. Per-agent failures are still logged inside the service and do not fail the run.
Types ¶
type Config ¶
type Config struct {
StateStore pkgplugins.StateStore
Memory memory.Provider
Store Store
SkillStore pkgplugins.SkillStore
Notifier pkgplugins.Notifier
Workspace string
Log *slog.Logger
Providers func(api, apiKey, baseURL string) (providers.StreamFunc, error)
// Services provides per-agent session registries for review candidate listing.
// When set, reflect uses Registry.ListForReview and Registry.MemoryScope
// instead of calling memory.SessionManager directly.
Services agent.ServiceManager
}
Config holds dependencies for the reflect service.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service runs background conversation review.
func (*Service) ReviewNow ¶
ReviewNow triggers an immediate review cycle for a single agent. Returns the number of sessions reviewed.
type Store ¶ added in v0.38.0
type Store interface {
ListEnabledAgents(ctx context.Context) ([]config.Agent, error)
Snapshot(ctx context.Context, agentID string) (*config.Snapshot, error)
}
Store is the read-only subset of config.Store reflect needs to run a review cycle. Narrowed from config.Store so dispatcher tests can supply a fake without implementing the full config surface; satisfied by config.Store via structural typing.