Add confirm-gated resume API with resumable flag, Phase 5 finalize fault and rolling-restart replay tests, Mermaid strict mode, request body limits, and optional Runner Bearer auth between app and pi-agent. Co-authored-by: Cursor <cursoragent@cursor.com>
14 lines
323 B
Go
14 lines
323 B
Go
package agent
|
||
|
||
import "net/http"
|
||
|
||
const runnerAuthHeader = "Authorization"
|
||
|
||
// ApplyRunnerAuth 为 Runner HTTP 请求附加 Bearer token(token 为空时不设置)。
|
||
func ApplyRunnerAuth(req *http.Request, token string) {
|
||
if req == nil || token == "" {
|
||
return
|
||
}
|
||
req.Header.Set(runnerAuthHeader, "Bearer "+token)
|
||
}
|