Merge branch 'worktree-agent-a37f45fa108430592'

# Conflicts:
#	internal/server/websocket.go
This commit is contained in:
2026-11-10 01:00:49 +00:00
29 changed files with 1471 additions and 101 deletions
+4 -1
View File
@@ -66,6 +66,9 @@ type Options struct {
// False keeps the previous behaviour (tests, embedded servers): a stopping
// server interrupts its runs and the next start marks them interrupted.
DetachSessions bool
// AccessToken, when set, is required on every request (servertoken.Header)
// except the chat-tools MCP endpoint and /healthz (request_boundary.go).
AccessToken string
}
// Handler serves the persistent connection with default options. Canceling ctx
@@ -567,7 +570,7 @@ func HandlerWithOptions(ctx context.Context, options Options, stores ...*pipelin
// runner's collaborators are wired and before any request is served.
runs.reattachRuns()
}
return &runHandler{Handler: mux, runner: runs, hub: hub}
return &runHandler{Handler: guardRequests(mux, options.AccessToken), runner: runs, hub: hub}
}
type runHandler struct {