summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-08 21:22:48 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-08 21:22:48 +0000
commit14dcbc4804ff70b50278a0654006a0c1927dd586 (patch)
tree90ec6cc7a6122154ec0e1e8f32a1c4d22e18ea59
parentc6e4f9bbfdaa83efc7b6931fb9cc8c39efe44fd3 (diff)
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.
-rw-r--r--internal/cli/serve.go9
1 files changed, 9 insertions, 0 deletions
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{