@ateam-ai/mcp 0.4.82 → 0.4.83

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/api.js +21 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ateam-ai/mcp",
3
- "version": "0.4.82",
3
+ "version": "0.4.83",
4
4
  "mcpName": "io.github.ariekogan/ateam-mcp",
5
5
  "description": "A-Team MCP Server — build, validate, and deploy multi-agent solutions from any AI environment",
6
6
  "type": "module",
package/src/api.js CHANGED
@@ -493,8 +493,11 @@ function headers(sessionId) {
493
493
 
494
494
  /**
495
495
  * Format an API error into a user-friendly message with actionable hints.
496
+ *
497
+ * Exported so the hints can be TESTED as behaviour rather than as source text.
498
+ * A test that greps for the right-looking code passes on code that never runs.
496
499
  */
497
- function formatError(method, path, status, body, baseUrl) {
500
+ export function formatError(method, path, status, body, baseUrl) {
498
501
  const hints = {
499
502
  400: "Bad request — see the error details above for what to fix.",
500
503
  401: "Your API key may be invalid or expired. Get a valid key at https://mcp.ateam-ai.com/get-api-key then call ateam_auth(api_key: \"your_key\").",
@@ -532,6 +535,23 @@ function formatError(method, path, status, body, baseUrl) {
532
535
  }
533
536
  }
534
537
 
538
+ // A 404 ON /spec IS NOT A MISSING SOLUTION.
539
+ //
540
+ // The table answers every 404 with "check the solution_id or skill_id".
541
+ // /spec/* takes neither. Asking for a topic this deployment does not serve —
542
+ // which happens the moment the tool ships ahead of the backend, as
543
+ // device-capabilities did on 2026-09-04 — sent the reader looking for a
544
+ // solution that was never involved. The environment is the whole answer, so
545
+ // name it: the same call against a newer deployment succeeds.
546
+ if (status === 404 && /^\/spec(\/|$)/.test(String(path || ""))) {
547
+ const topic = String(path).replace(/^\/spec\/?/, "") || "(index)";
548
+ hints[404] =
549
+ `Nothing to do with solutions — /spec takes no solution_id or skill_id. The A-Team API at ` +
550
+ `${baseUrl || "this URL"} does not serve the topic "${topic}". Either the topic name is wrong (ateam_get_spec ` +
551
+ `with topic:"overview" lists what this deployment has), or this backend is OLDER than the tool you are ` +
552
+ `calling from and the topic has not been deployed here yet. Retrying will not change either.`;
553
+ }
554
+
535
555
  // A 500 THAT NAMES A MISSING CONFIGURATION IS NOT "TRY AGAIN IN A MINUTE".
536
556
  //
537
557
  // /chat answered 500 {"message":"OPENAI_API_KEY is not set"} and this table