diff --git a/mcp-bridge/lib/api-clients.js b/mcp-bridge/lib/api-clients.js index 3261ffa0..0b392f4a 100644 --- a/mcp-bridge/lib/api-clients.js +++ b/mcp-bridge/lib/api-clients.js @@ -20,7 +20,11 @@ const GITLAB_BASE = env.get("GITLAB_URL") ?? "https://gitlab.com"; // BoJ REST API wrappers // =================================================================== -/** @returns {Promise} */ +/** + * Report backend liveness: the REST /health payload plus per-cartridge status, + * or a structured "rest-unavailable" result when the backend cannot be reached. + * @returns {Promise} + */ async function fetchHealth() { try { const res = await fetch(`${BOJ_BASE}/health`); @@ -52,7 +56,7 @@ async function fetchHealth() { return { status: "rest-unavailable", mode: "stdio-only", - message: "BoJ REST API is not currently deployed — pending Elixir rewrite. The systemd unit `boj-server.service` starts the stdio MCP bridge, not a REST server on " + BOJ_BASE + ". Offline-capable tools (menu, cartridges, cartridge-info) still work via static fallbacks; REST-only tools (health, invoke, research, codeseeker) will return this error until the Elixir port ships.", + message: "BoJ REST backend is not reachable at " + BOJ_BASE + ". It is the Elixir app in elixir/ (boj_rest): start it with `just run` (cd elixir && mix run --no-halt) or install the `boj-rest.service` user unit with `just install-service`; set BOJ_URL if it listens elsewhere. Offline-capable tools (menu, cartridges, cartridge-info, github, gitlab) still work; backend-only tools (invoke, research, codeseeker, cloud, comms, browser) fail until it is up.", base_url_probed: BOJ_BASE, }; } diff --git a/mcp-bridge/lib/dispatcher.js b/mcp-bridge/lib/dispatcher.js index a6df0037..b535586e 100644 --- a/mcp-bridge/lib/dispatcher.js +++ b/mcp-bridge/lib/dispatcher.js @@ -38,8 +38,7 @@ import * as pathClaims from "./path-claims.js"; import { info, warn, error as logError, setLevel as setLogLevel } from "./logger.js"; import * as otel from "./otel.js"; -const SERVER_NAME = "boj-server"; -const SERVER_VERSION = "0.4.7"; +import { SERVER_NAME, SERVER_VERSION } from "./version.js"; const LOCAL_COORD_URL = env.get("COORD_BACKEND_URL") ?? "http://127.0.0.1:7745"; const ENVELOPE_CARRYING_TOOLS = new Set(["coord_send", "coord_send_gated"]);