@ateam-ai/mcp 0.4.1 → 0.4.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ateam-ai/mcp",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
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
@@ -364,6 +364,30 @@ function formatError(method, path, status, body) {
364
364
  503: "A-Team API is temporarily unavailable. Try again in a minute.",
365
365
  };
366
366
 
367
+ // Special-case: GitHub App not connected for this tenant. This is the wall a
368
+ // user hits the first time they iterate on CONNECTOR CODE (github_patch /
369
+ // github_write / github_push / build_and_run auto-pull). The raw
370
+ // "github_not_connected" code + a generic 409 hint tells them nothing — so
371
+ // guide them explicitly to the one-time connect step and note the repo-less
372
+ // escape hatch for definition edits.
373
+ const bodyStr = typeof body === "string" ? body : (body ? JSON.stringify(body) : "");
374
+ if (/github_not_connected/i.test(bodyStr)) {
375
+ return [
376
+ `A-Team API error: ${method} ${path} — GitHub isn't connected for this tenant.`,
377
+ "",
378
+ "Versioned connector-code changes (edit, push, promote, deploy-from-repo) need a",
379
+ "GitHub repo, and this tenant hasn't connected one yet.",
380
+ "",
381
+ "Connect it once (takes ~30s):",
382
+ " 1. Open Tenant Admin → GitHub (https://app.ateam-ai.com → pick your tenant → GitHub).",
383
+ " 2. Click \"Connect GitHub\" and approve the A-Team GitHub App.",
384
+ " 3. Retry this step — the repo is auto-created on the next deploy.",
385
+ "",
386
+ "No GitHub yet? Skill/solution DEFINITION edits still work without a repo via",
387
+ "ateam_patch(..., source:\"local\"). Only connector CODE iteration needs GitHub.",
388
+ ].join("\n");
389
+ }
390
+
367
391
  const hint = hints[status] || "";
368
392
  const detail = typeof body === "string" && body.length > 0 && body.length < 2000 ? body : "";
369
393
 
package/src/http.js CHANGED
@@ -417,9 +417,16 @@ function seedCredentials(req, sessionId) {
417
417
  return;
418
418
  }
419
419
 
420
- // Default: use the bearer token itself as credentials
420
+ // Default: use the bearer token itself as credentials.
421
+ // `explicit: true` — a Bearer is a per-connection credential the user
422
+ // deliberately configured (OAuth authorize page, or the plugin's userConfig
423
+ // key injected as `Authorization: Bearer`). Unlike an ambient ADAS_API_KEY
424
+ // env var baked into shared MCP config, it carries explicit tenant intent, so
425
+ // it satisfies isExplicitlyAuthenticated and tenant tools work without a
426
+ // redundant ateam_auth call. (The env-var guard in tools.js is unaffected —
427
+ // env creds never flow through here; this path only fires for a real Bearer.)
421
428
  const parsed = parseApiKey(token);
422
429
  if (parsed.isValid) {
423
- setSessionCredentials(sessionId, { tenant: parsed.tenant, apiKey: token });
430
+ setSessionCredentials(sessionId, { tenant: parsed.tenant, apiKey: token, explicit: true });
424
431
  }
425
432
  }