- agentic.PrepSubsystem implements Startable/Stoppable
- monitor.Subsystem implements Startable/Stoppable (OnStartup/OnShutdown)
- Register factories use c.RegisterService() — auto-discovers interfaces
- Register factories return instances via Result.Value
- main.go uses ServiceFor[T]() instead of ConfigGet — typed retrieval
- No more c.Config().Set("x.instance") workaround
Co-Authored-By: Virgil <virgil@lethean.io>
19 lines
407 B
Go
19 lines
407 B
Go
// SPDX-License-Identifier: EUPL-1.2
|
|
|
|
package brain
|
|
|
|
import (
|
|
core "dappco.re/go/core"
|
|
)
|
|
|
|
// Register is the service factory for core.WithService.
|
|
// Brain is a stateless API proxy — no lifecycle hooks.
|
|
//
|
|
// core.New(
|
|
// core.WithService(brain.Register),
|
|
// )
|
|
func Register(c *core.Core) core.Result {
|
|
brn := NewDirect()
|
|
c.RegisterService("brain", brn)
|
|
return core.Result{Value: brn, OK: true}
|
|
}
|