@algosuite/vo-mcp 0.2.0-beta.46 → 0.2.0-beta.49

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.
@@ -105467,7 +105467,7 @@ function normalizePr(pr = {}) {
105467
105467
  function isSafeDependencyOverlapFile(path3 = "") {
105468
105468
  return SAFE_DEPENDENCY_OVERLAP_FILE_RE.test(String(path3 || "").trim());
105469
105469
  }
105470
- var EXEMPT_OVERLAP_FILE_RE = /^docs\/vo\/.*roadmap.*\.md$|^\.github\/workflows\/ci\.yml$/i;
105470
+ var EXEMPT_OVERLAP_FILE_RE = /^docs\/vo\/.*roadmap.*\.md$|^\.github\/workflows\/ci\.yml$|^(?:public|cloud-run\/vo-control-plane\/data)\/roadmap-progress\.json$/i;
105471
105471
  function isExemptOverlapFile(path3 = "") {
105472
105472
  return EXEMPT_OVERLAP_FILE_RE.test(String(path3 || "").trim());
105473
105473
  }
@@ -105756,15 +105756,35 @@ function quotedValues(line) {
105756
105756
  }
105757
105757
  return values;
105758
105758
  }
105759
+ function helperFromLauncher(launcherPath, fallbackCli, { readFile = readFileSync, pathExists = existsSync } = {}) {
105760
+ const rootDir = dirname(String(launcherPath));
105761
+ try {
105762
+ const cur = JSON.parse(readText(join(rootDir, "current.json"), readFile) || "null");
105763
+ const ids = cur && cur.schema_version === 1 ? [cur.active?.slot_id, cur.previous?.slot_id] : [];
105764
+ for (const id of ids) {
105765
+ if (typeof id !== "string" || !/^vo-mcp-[0-9A-Za-z._-]{1,96}$/u.test(id)) continue;
105766
+ const helper = join(rootDir, "slots", id, "node_modules", "@algosuite", "vo-mcp", "dist", "supervisor-credential-helper.js");
105767
+ if (pathExists(helper)) return helper;
105768
+ }
105769
+ } catch {
105770
+ }
105771
+ return typeof fallbackCli === "string" && /[\\/]cli\.js$/i.test(fallbackCli) ? join(dirname(fallbackCli), "supervisor-credential-helper.js") : "";
105772
+ }
105773
+ var LAUNCHER_RE = /[\\/]vo-mcp-launcher\.mjs$/i;
105759
105774
  function codexConfig(raw) {
105760
105775
  const section = String(raw).match(
105761
105776
  /\[mcp_servers\.algohq\]([\s\S]*?)(?=\n\s*\[(?!mcp_servers\.algohq\.env\])|$)/
105762
105777
  )?.[1] || "";
105763
- const cli = section.split(/\r?\n/).flatMap(quotedValues).find((value) => /[\\/]dist[\\/]cli\.js$/i.test(value));
105778
+ const values = String(section).split(/\r?\n/).flatMap(quotedValues);
105779
+ const cli = values.find((value) => /[\\/]dist[\\/]cli\.js$/i.test(value));
105780
+ const launcher = values.find((value) => LAUNCHER_RE.test(value));
105764
105781
  const envSection = String(raw).match(/\[mcp_servers\.algohq\.env\]([\s\S]*?)(?=\n\s*\[|$)/)?.[1] || "";
105765
105782
  const urlLine = envSection.split(/\r?\n/).find((line) => /^\s*VO_CONTROL_PLANE_URL\s*=/.test(line));
105783
+ const fallbackLine = envSection.split(/\r?\n/).find((line) => /^\s*VO_MCP_FALLBACK_CLI\s*=/.test(line));
105766
105784
  return {
105767
105785
  helper: cli ? join(dirname(cli), "supervisor-credential-helper.js") : "",
105786
+ launcher: launcher || "",
105787
+ fallbackCli: fallbackLine ? quotedValues(fallbackLine)[0] || "" : "",
105768
105788
  url: urlLine ? quotedValues(urlLine)[0] || "" : ""
105769
105789
  };
105770
105790
  }
@@ -105772,17 +105792,19 @@ function claudeConfig(raw) {
105772
105792
  try {
105773
105793
  const parsed = JSON.parse(raw);
105774
105794
  const servers = parsed?.mcpServers;
105775
- if (!servers || typeof servers !== "object") return { helper: "", url: "" };
105795
+ if (!servers || typeof servers !== "object") return { helper: "", launcher: "", fallbackCli: "", url: "" };
105776
105796
  const entry = servers.algohq || servers["vo-mcp"] || servers.vo;
105777
- const cli = Array.isArray(entry?.args) ? entry.args.find(
105778
- (value) => typeof value === "string" && /[\\/]dist[\\/]cli\.js$/i.test(value)
105779
- ) : "";
105797
+ const args = Array.isArray(entry?.args) ? entry.args.filter((value) => typeof value === "string") : [];
105798
+ const cli = args.find((value) => /[\\/]dist[\\/]cli\.js$/i.test(value)) || "";
105799
+ const launcher = args.find((value) => LAUNCHER_RE.test(value)) || "";
105780
105800
  return {
105781
105801
  helper: cli ? join(dirname(cli), "supervisor-credential-helper.js") : "",
105802
+ launcher,
105803
+ fallbackCli: typeof entry?.env?.VO_MCP_FALLBACK_CLI === "string" ? entry.env.VO_MCP_FALLBACK_CLI : "",
105782
105804
  url: typeof entry?.env?.VO_CONTROL_PLANE_URL === "string" ? entry.env.VO_CONTROL_PLANE_URL : ""
105783
105805
  };
105784
105806
  } catch {
105785
- return { helper: "", url: "" };
105807
+ return { helper: "", launcher: "", fallbackCli: "", url: "" };
105786
105808
  }
105787
105809
  }
105788
105810
  function resolveControlPlaneRuntime({
@@ -105796,7 +105818,8 @@ function resolveControlPlaneRuntime({
105796
105818
  const desktop = claudeConfig(
105797
105819
  readText(join(env.APPDATA || "", "Claude", "claude_desktop_config.json"), readFile)
105798
105820
  );
105799
- const candidates = [env.VO_MCP_AUTH_HELPER_PATH, codex.helper, claude.helper, desktop.helper];
105821
+ const launcherHelpers = [codex, claude, desktop].filter((cfg) => cfg.launcher).map((cfg) => helperFromLauncher(cfg.launcher, cfg.fallbackCli, { readFile, pathExists }));
105822
+ const candidates = [env.VO_MCP_AUTH_HELPER_PATH, codex.helper, claude.helper, desktop.helper, ...launcherHelpers];
105800
105823
  const helperPath = candidates.find(
105801
105824
  (value) => typeof value === "string" && value.trim() && pathExists(value.trim())
105802
105825
  );
package/dist/cli.js CHANGED
@@ -8424,11 +8424,13 @@ function readKey(EntryCtor, account) {
8424
8424
  return null;
8425
8425
  }
8426
8426
  }
8427
+ var SKIP_KEYCHAIN_ENV = "VO_MCP_SKIP_KEYCHAIN";
8427
8428
  function withLocalConsensusCredentials(baseEnv = process.env, options = {}) {
8428
8429
  const env = { ...baseEnv };
8429
8430
  if (!env.OPENAI_API_KEY?.trim() && env.CODEX_API_KEY?.trim()) {
8430
8431
  env.OPENAI_API_KEY = env.CODEX_API_KEY;
8431
8432
  }
8433
+ if (env[SKIP_KEYCHAIN_ENV]?.trim() === "1") return env;
8432
8434
  const EntryCtor = options.EntryCtor === void 0 ? loadEntryCtor() : options.EntryCtor;
8433
8435
  if (!EntryCtor) return env;
8434
8436
  for (const target of KEYCHAIN_TARGETS) {