Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Require guarded agent HTTP execution in the API contract

pulse-triage[bot]55e109aabc51
diff --git a/internal/api/contract_test.go b/internal/api/contract_test.go
index 7810a6c452..61e462c11e 100644
--- a/internal/api/contract_test.go
+++ b/internal/api/contract_test.go
@@ -20791,6 +20791,7 @@ func TestContract_PulseMCPAdapterProjectsAgentCapabilitiesManifest(t *testing.T)
`Manifest: manifest`,
`agentcapabilities.FetchManifest(context.Background(), manifestClient, *baseURL)`,
`agentcapabilities.StreamMCPEventNotifications(ctx, pulseMCPAgentSurfaceHTTPDoer{}, s.baseURL, path, s.token, func(notification agentcapabilities.JSONRPCRequest) error`,
+ `agentcapabilities.DoAgentHTTPRequest(client, req)`,
}
for _, fragment := range required {
if !strings.Contains(src, fragment) {
@@ -21476,7 +21477,8 @@ func TestContract_PulseMCPAdapterProjectsAgentCapabilitiesManifest(t *testing.T)
`func StreamAgentSSERecords(`,
`NewAgentHTTPRequest(ctx, http.MethodGet, baseURL, path, token, nil)`,
`req.Header.Set("Accept", AgentSSEAccept)`,
- `httpClient(client).Do(req)`,
+ // SSE must use the same redirect-origin boundary as manifest and tool reads.
+ `DoAgentHTTPRequest(client, req)`,
`ScanSSERecords(resp.Body, handle)`,
`func IsActionableSSERecord(`,
`func StreamAgentActionableSSERecords(`,
@@ -21573,6 +21575,8 @@ func TestContract_PulseMCPAdapterProjectsAgentCapabilitiesManifest(t *testing.T)
`func FetchManifest(`,
`func BuildCapabilityHTTPRequest(`,
`func CallCapabilityHTTP(`,
+ `func DoAgentHTTPRequest(`,
+ `DoAgentHTTPRequest(client, req)`,
`func CallCapabilityHTTPByName(`,
`func CallRequestResponseCapabilityHTTPByName(`,
`func (r HTTPCallResponse) FailureError() error`,