huskies: merge 771

This commit is contained in:
dave
2026-04-28 12:03:16 +00:00
parent e879d6f602
commit e9ed58502a
5 changed files with 38 additions and 33 deletions
+16 -3
View File
@@ -134,9 +134,22 @@ export const gatewayApi = {
});
},
/// Fetch pipeline status from all registered projects.
getAllProjectsPipeline(): Promise<AllProjectsPipeline> {
return gatewayRequest<AllProjectsPipeline>("/api/gateway/pipeline");
/// Fetch pipeline status from all registered projects via the pipeline.get read-RPC.
async getAllProjectsPipeline(): Promise<AllProjectsPipeline> {
const res = await fetch("/mcp", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "pipeline.get", params: {} }),
});
if (!res.ok) {
const text = await res.text();
throw new Error(text || `Request failed (${res.status})`);
}
const rpc = await res.json() as { result?: AllProjectsPipeline; error?: { message: string } };
if (rpc.error) {
throw new Error(rpc.error.message);
}
return rpc.result!;
},
/// Switch the active project.