refactor(agentic): wire service runtime directly

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-02 08:44:48 +00:00
parent ce6f016d63
commit 8b159abd17

View file

@ -14,10 +14,10 @@ import (
// )
// prep := c.Service("agentic")
func Register(c *core.Core) core.Result {
subsystem := NewPrep()
subsystem.SetCore(c)
prep := NewPrep()
prep.ServiceRuntime = core.NewServiceRuntime(c, AgentOptions{})
config := subsystem.loadAgentsConfig()
config := prep.loadAgentsConfig()
c.Config().Set("agents.concurrency", config.Concurrency)
c.Config().Set("agents.rates", config.Rates)
c.Config().Set("agents.dispatch", config.Dispatch)
@ -30,7 +30,7 @@ func Register(c *core.Core) core.Result {
c.Config().Enable("auto-pr")
c.Config().Enable("auto-merge")
c.Config().Enable("auto-ingest")
RegisterHandlers(c, subsystem)
RegisterHandlers(c, prep)
return core.Result{Value: subsystem, OK: true}
return core.Result{Value: prep, OK: true}
}