feat(core-agent): register setup service
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
f4736bf759
commit
8c9ee8f2bd
2 changed files with 7 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ import (
|
|||
"dappco.re/go/agent/pkg/brain"
|
||||
"dappco.re/go/agent/pkg/monitor"
|
||||
"dappco.re/go/agent/pkg/runner"
|
||||
"dappco.re/go/agent/pkg/setup"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
@ -33,6 +34,7 @@ func newCoreAgent() *core.Core {
|
|||
core.WithService(runner.Register),
|
||||
core.WithService(monitor.Register),
|
||||
core.WithService(brain.Register),
|
||||
core.WithService(setup.Register),
|
||||
core.WithService(registerMCPService),
|
||||
)
|
||||
coreApp.App().Version = applicationVersion()
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import (
|
|||
"dappco.re/go/agent/pkg/brain"
|
||||
"dappco.re/go/agent/pkg/monitor"
|
||||
"dappco.re/go/agent/pkg/runner"
|
||||
"dappco.re/go/agent/pkg/setup"
|
||||
"dappco.re/go/core"
|
||||
"forge.lthn.ai/core/mcp/pkg/mcp"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
|
@ -34,6 +35,7 @@ func TestMain_NewCoreAgent_Good(t *testing.T) {
|
|||
assert.Contains(t, c.Services(), "runner")
|
||||
assert.Contains(t, c.Services(), "monitor")
|
||||
assert.Contains(t, c.Services(), "brain")
|
||||
assert.Contains(t, c.Services(), "setup")
|
||||
assert.Contains(t, c.Services(), "mcp")
|
||||
assert.Contains(t, c.Commands(), "version")
|
||||
assert.Contains(t, c.Commands(), "check")
|
||||
|
|
@ -54,6 +56,9 @@ func TestMain_NewCoreAgent_Good(t *testing.T) {
|
|||
service = c.Service("brain")
|
||||
assert.True(t, service.OK)
|
||||
assert.IsType(t, &brain.DirectSubsystem{}, service.Value)
|
||||
service = c.Service("setup")
|
||||
assert.True(t, service.OK)
|
||||
assert.IsType(t, &setup.Service{}, service.Value)
|
||||
service = c.Service("mcp")
|
||||
assert.True(t, service.OK)
|
||||
assert.IsType(t, &mcp.Service{}, service.Value)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue