Remove workspace-root configuration and use client run directories

This commit is contained in:
2026-10-09 00:32:00 +01:00
parent 4697bb4465
commit c5a5521015
17 changed files with 97 additions and 116 deletions
-10
View File
@@ -17,22 +17,12 @@ import (
// Handler serves the persistent connection. Canceling ctx stops active clients.
func Handler(ctx context.Context, stores ...*pipeline.Store) http.Handler {
return handler(ctx, nil, stores...)
}
// HandlerForWorkspaces permits run workspaces only below explicitly configured roots.
func HandlerForWorkspaces(ctx context.Context, store *pipeline.Store, roots []string) http.Handler {
return handler(ctx, roots, store)
}
func handler(ctx context.Context, roots []string, stores ...*pipeline.Store) http.Handler {
mux := http.NewServeMux()
var runs *runner
var runErr error
if len(stores) > 0 {
runs, runErr = newRunner(ctx, stores[0])
if runErr == nil {
runs.workspaceRoots = append([]string(nil), roots...)
runs.schedulerWG.Add(1)
go runs.scheduleLoop()
}