From 96f46e53cb42d508b95a0f2b4afd3c00c43b3504 Mon Sep 17 00:00:00 2001 From: Snider Date: Thu, 26 Mar 2026 07:54:42 +0000 Subject: [PATCH] fix: OnStartup/OnShutdown return core.Result (v0.8.0 Startable interface) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Was returning error — Core didn't recognise it as Startable so mcp/serve commands were never registered. One-line fix per method. Co-Authored-By: Virgil --- pkg/mcp/register.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkg/mcp/register.go b/pkg/mcp/register.go index 8616af6..062c71d 100644 --- a/pkg/mcp/register.go +++ b/pkg/mcp/register.go @@ -45,10 +45,10 @@ func Register(c *core.Core) core.Result { } // OnStartup implements core.Startable — registers MCP transport commands. -func (s *Service) OnStartup(ctx context.Context) error { +func (s *Service) OnStartup(ctx context.Context) core.Result { c, ok := s.coreRef.(*core.Core) if !ok || c == nil { - return nil + return core.Result{OK: true} } c.Command("mcp", core.Command{ @@ -73,10 +73,13 @@ func (s *Service) OnStartup(ctx context.Context) error { }, }) - return nil + return core.Result{OK: true} } // OnShutdown implements core.Stoppable — stops the MCP transport. -func (s *Service) OnShutdown(ctx context.Context) error { - return s.Shutdown(ctx) +func (s *Service) OnShutdown(ctx context.Context) core.Result { + if err := s.Shutdown(ctx); err != nil { + return core.Result{Value: err, OK: false} + } + return core.Result{OK: true} }