Merge branch 'worktree-agent-a37f45fa108430592'
# Conflicts: # internal/server/websocket.go
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user