@algosuite/vo-mcp 0.2.0-beta.14 → 0.2.0-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -53,7 +53,7 @@ async function resolveBearer(env) {
53
53
  return cachedFirebaseToken;
54
54
  }
55
55
  function createControlPlaneClient({
56
- baseUrl = process.env.VO_CONTROL_PLANE_URL || "",
56
+ baseUrl,
57
57
  env = process.env,
58
58
  fetchImpl = fetch,
59
59
  heartbeatTimeoutMs = Math.min(
@@ -61,10 +61,11 @@ function createControlPlaneClient({
61
61
  6e4
62
62
  )
63
63
  } = {}) {
64
- if (!baseUrl) {
64
+ const resolvedBaseUrl = baseUrl ?? env.VO_CONTROL_PLANE_URL ?? "";
65
+ if (!resolvedBaseUrl) {
65
66
  throw new Error("VO_CONTROL_PLANE_URL is required for the code-runner daemon");
66
67
  }
67
- const root = baseUrl.replace(/\/+$/, "");
68
+ const root = resolvedBaseUrl.replace(/\/+$/, "");
68
69
  async function req(method, path, body, { timeoutMs } = {}) {
69
70
  const bearer = await resolveBearer(env);
70
71
  const controller = timeoutMs ? new AbortController() : null;