Each package exposes Register(c *Core) Result for core.WithService(): - agentic.Register: creates PrepSubsystem, wires IPC handlers, lifecycle - monitor.Register: creates Subsystem, wires IPC handler, lifecycle - brain.Register: creates Direct, registers service main.go updated for core.New() returning Result. Ready for core.New(WithService(agentic.Register)) pattern. Co-Authored-By: Virgil <virgil@lethean.io>
22 lines
469 B
Go
22 lines
469 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 has no lifecycle hooks — it's a stateless API proxy.
|
|
//
|
|
// core.New(
|
|
// core.WithService(brain.Register),
|
|
// )
|
|
func Register(c *core.Core) core.Result {
|
|
brn := NewDirect()
|
|
|
|
c.Service("brain", core.Service{})
|
|
|
|
_ = brn // brain instance available for MCP tool registration
|
|
return core.Result{OK: true}
|
|
}
|