From 14dcbc4804ff70b50278a0654006a0c1927dd586 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sun, 8 Mar 2026 21:22:48 +0000 Subject: fix(cli): register scripts in serve command Restore the script registry in internal/cli/serve.go which was lost during the gemini merge. This fixes the 'Start Next Task' button in the web UI which relies on the /api/scripts/start-next-task endpoint. --- internal/cli/serve.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'internal/cli/serve.go') diff --git a/internal/cli/serve.go b/internal/cli/serve.go index 36a53b5..e90c3e2 100644 --- a/internal/cli/serve.go +++ b/internal/cli/serve.go @@ -6,6 +6,7 @@ import ( "net/http" "os" "os/signal" + "path/filepath" "syscall" "time" @@ -75,6 +76,14 @@ func serve(addr string) error { if cfg.WebhookURL != "" { srv.SetNotifier(notify.NewWebhookNotifier(cfg.WebhookURL, logger)) } + + // Register scripts. + wd, _ := os.Getwd() + srv.SetScripts(api.ScriptRegistry{ + "start-next-task": filepath.Join(wd, "scripts", "start-next-task"), + "deploy": filepath.Join(wd, "scripts", "deploy"), + }) + srv.StartHub() httpSrv := &http.Server{ -- cgit v1.2.3