Move Foundry HTTP APIs onto /v1

This commit is contained in:
Nathan Flurry 2026-03-12 19:53:52 -07:00
parent 58b19c2253
commit 9a2c60bf30
16 changed files with 62 additions and 51 deletions

View file

@ -22,7 +22,7 @@ function run(cmd: string, opts?: { cwd?: string; env?: NodeJS.ProcessEnv }) {
console.log("\n=== Building frontend for desktop ===\n");
run("pnpm --filter @sandbox-agent/foundry-frontend build", {
env: {
VITE_HF_BACKEND_ENDPOINT: "http://127.0.0.1:7741/api/rivet",
VITE_HF_BACKEND_ENDPOINT: "http://127.0.0.1:7741/v1/rivet",
},
});

View file

@ -14,7 +14,7 @@ fn get_backend_url() -> String {
#[tauri::command]
async fn backend_health() -> Result<bool, String> {
match reqwest::get("http://127.0.0.1:7741/api/rivet/metadata").await {
match reqwest::get("http://127.0.0.1:7741/v1/rivet/metadata").await {
Ok(resp) => Ok(resp.status().is_success()),
Err(_) => Ok(false),
}
@ -32,7 +32,7 @@ async fn wait_for_backend(timeout_secs: u64) -> Result<(), String> {
));
}
match reqwest::get("http://127.0.0.1:7741/api/rivet/metadata").await {
match reqwest::get("http://127.0.0.1:7741/v1/rivet/metadata").await {
Ok(resp) if resp.status().is_success() => return Ok(()),
_ => {}
}