53 lines
1.2 KiB
Go
53 lines
1.2 KiB
Go
// SPDX-License-Identifier: EUPL-1.2
|
|
|
|
package main
|
|
|
|
import (
|
|
"dappco.re/go/core"
|
|
|
|
"dappco.re/go/agent/pkg/agentic"
|
|
"dappco.re/go/agent/pkg/brain"
|
|
"dappco.re/go/agent/pkg/monitor"
|
|
"dappco.re/go/agent/pkg/runner"
|
|
)
|
|
|
|
func main() {
|
|
newCoreAgent().Run()
|
|
}
|
|
|
|
// newCoreAgent builds the Core app with services and CLI commands wired for startup.
|
|
//
|
|
// c := newCoreAgent()
|
|
// core.Println(c.App().Name) // "core-agent"
|
|
// core.Println(c.App().Version) // "dev" or linked version
|
|
func newCoreAgent() *core.Core {
|
|
c := core.New(
|
|
core.WithOption("name", "core-agent"),
|
|
core.WithService(agentic.ProcessRegister),
|
|
core.WithService(agentic.Register),
|
|
core.WithService(runner.Register),
|
|
core.WithService(monitor.Register),
|
|
core.WithService(brain.Register),
|
|
core.WithName("mcp", registerMCPService),
|
|
)
|
|
c.App().Version = appVersion()
|
|
|
|
c.Cli().SetBanner(func(_ *core.Cli) string {
|
|
return core.Concat("core-agent ", c.App().Version, " — agentic orchestration for the Core ecosystem")
|
|
})
|
|
|
|
registerAppCommands(c)
|
|
|
|
return c
|
|
}
|
|
|
|
// appVersion resolves the build version injected at link time.
|
|
//
|
|
// version = "0.15.0"
|
|
// appVersion() // "0.15.0"
|
|
func appVersion() string {
|
|
if version != "" {
|
|
return version
|
|
}
|
|
return "dev"
|
|
}
|