Merge pull request 'Update MCP SDK migration plan' (#13) from agent/update-the-migration-plan-at-docs-plans into dev

Reviewed-on: #13
This commit is contained in:
Snider 2026-03-24 11:43:22 +00:00
commit 18ccaec720
4 changed files with 696 additions and 333 deletions

File diff suppressed because it is too large Load diff

3
go.mod
View file

@ -3,9 +3,9 @@ module forge.lthn.ai/core/mcp
go 1.26.0
require (
dappco.re/go/core v0.4.7
forge.lthn.ai/core/api v0.1.5
forge.lthn.ai/core/cli v0.3.7
forge.lthn.ai/core/go v0.3.3
forge.lthn.ai/core/go-ai v0.1.12
forge.lthn.ai/core/go-io v0.1.7
forge.lthn.ai/core/go-log v0.0.4
@ -21,6 +21,7 @@ require (
)
require (
forge.lthn.ai/core/go v0.3.3 // indirect
forge.lthn.ai/core/go-i18n v0.1.7 // indirect
forge.lthn.ai/core/go-inference v0.1.6 // indirect
github.com/99designs/gqlgen v0.17.88 // indirect

2
go.sum
View file

@ -1,3 +1,5 @@
dappco.re/go/core v0.4.7 h1:KmIA/2lo6rl1NMtLrKqCWfMlUqpDZYH3q0/d10dTtGA=
dappco.re/go/core v0.4.7/go.mod h1:f2/tBZ3+3IqDrg2F5F598llv0nmb/4gJVCFzM5geE4A=
forge.lthn.ai/core/api v0.1.5 h1:NwZrcOyBjaiz5/cn0n0tnlMUodi8Or6FHMx59C7Kv2o=
forge.lthn.ai/core/api v0.1.5/go.mod h1:PBnaWyOVXSOGy+0x2XAPUFMYJxQ2CNhppia/D06ZPII=
forge.lthn.ai/core/cli v0.3.7 h1:1GrbaGg0wDGHr6+klSbbGyN/9sSbHvFbdySJznymhwg=

View file

@ -8,34 +8,36 @@ import (
"testing"
"time"
"dappco.re/go/core"
"forge.lthn.ai/core/go-process"
core "forge.lthn.ai/core/go/pkg/core"
)
// newTestProcessService creates a real process.Service backed by a core.Core for CI tests.
func newTestProcessService(t *testing.T) *process.Service {
t.Helper()
c, err := core.New(
core.WithName("process", process.NewService(process.Options{})),
)
c := core.New()
raw, err := process.NewService(process.Options{})(c)
if err != nil {
t.Fatalf("Failed to create process service: %v", err)
}
svc := raw.(*process.Service)
svc, err := core.ServiceFor[*process.Service](c, "process")
if err != nil {
t.Fatalf("Failed to get process service: %v", err)
resultFrom := func(err error) core.Result {
if err != nil {
return core.Result{Value: err}
}
return core.Result{OK: true}
}
if err := svc.OnStartup(context.Background()); err != nil {
t.Fatalf("Failed to start process service: %v", err)
}
t.Cleanup(func() {
_ = svc.OnShutdown(context.Background())
core.ClearInstance()
c.Service("process", core.Service{
OnStart: func() core.Result { return resultFrom(svc.OnStartup(context.Background())) },
OnStop: func() core.Result { return resultFrom(svc.OnShutdown(context.Background())) },
})
if r := c.ServiceStartup(context.Background(), nil); !r.OK {
t.Fatalf("Failed to start core: %v", r.Value)
}
t.Cleanup(func() { c.ServiceShutdown(context.Background()) })
return svc
}