@ateam-ai/mcp 0.4.17 → 0.4.19

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.17",
3
+ "version": "0.4.19",
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
@@ -393,7 +393,7 @@ function headers(sessionId) {
393
393
  /**
394
394
  * Format an API error into a user-friendly message with actionable hints.
395
395
  */
396
- function formatError(method, path, status, body) {
396
+ function formatError(method, path, status, body, baseUrl) {
397
397
  const hints = {
398
398
  400: "Bad request — see the error details above for what to fix.",
399
399
  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\").",
@@ -434,7 +434,12 @@ function formatError(method, path, status, body) {
434
434
  const hint = hints[status] || "";
435
435
  const detail = typeof body === "string" && body.length > 0 && body.length < 2000 ? body : "";
436
436
 
437
- let msg = `A-Team API error: ${method} ${path} returned ${status}`;
437
+ // Always show the FULL URL actually hit — ateam-mcp is a PUBLIC MCP with a
438
+ // configurable base (prod default, dev/self-host overrides), so a bare
439
+ // "POST /deploy/..." 404 is ambiguous: is the route missing, or did the
440
+ // request go to the wrong base? The full URL disambiguates instantly.
441
+ const target = baseUrl ? `${baseUrl}${path}` : path;
442
+ let msg = `A-Team API error: ${method} ${target} returned ${status}`;
438
443
  if (detail) msg += ` — ${detail}`;
439
444
  if (hint) msg += `\nHint: ${hint}`;
440
445
 
@@ -486,7 +491,7 @@ async function request(method, path, body, sessionId, opts = {}) {
486
491
 
487
492
  if (!res.ok) {
488
493
  const text = await res.text().catch(() => "");
489
- throw new Error(formatError(method, path, res.status, text));
494
+ throw new Error(formatError(method, path, res.status, text, baseUrl));
490
495
  }
491
496
 
492
497
  return res.json();
package/src/tools.js CHANGED
@@ -362,6 +362,26 @@ export const tools = [
362
362
  required: ["type"],
363
363
  },
364
364
  },
365
+ {
366
+ name: "ateam_design_advisor",
367
+ core: true,
368
+ description:
369
+ "CONSULT THIS DURING DESIGN — before and while you design a skill/solution. Describe what you're building; it returns POINTERS to the platform capabilities that fit (per-actor storage, widgets, triggers, sub-agents, mobile data, run-scripts, multi-skill, GitHub, …), each with the /spec topic to read next (via ateam_get_spec) and the tool to wire it. Also returns 'missing' hints (capabilities your goal implies but the design hasn't wired) and lifecycle hints (e.g. connect GitHub when the project will iterate). ADVISORY ONLY — you decide and own the design. Stateless: pass the current design_state each call; consult it as often as you like as the design evolves.",
370
+ inputSchema: {
371
+ type: "object",
372
+ properties: {
373
+ goal: {
374
+ type: "string",
375
+ description: "What you're trying to build, in your own words (e.g. 'a coach that tracks each user's meals from photos and shows a dashboard').",
376
+ },
377
+ design_state: {
378
+ type: "object",
379
+ description: "Optional. The design so far (skills, connectors, capabilities already wired) so the advisor can point at what's still missing. Pass {} at the start.",
380
+ },
381
+ },
382
+ required: ["goal"],
383
+ },
384
+ },
365
385
  {
366
386
  name: "ateam_build_and_run",
367
387
  core: true,
@@ -2181,10 +2201,10 @@ export default {
2181
2201
  // ui.listPlugins is generated from ui-dist/<plugin>/manifest.json pick it up
2182
2202
  // automatically, and for connectors with a HARDCODED plugin list (e.g.
2183
2203
  // personal-assistant-ui-mcp) copy this render block into their ui.getPlugin.
2184
- const mode = k === "iframe" ? "iframe" : k === "rn" ? "react-native" : "adaptive";
2204
+ const mode = kind === "iframe" ? "iframe" : kind === "rn" ? "react-native" : "adaptive";
2185
2205
  const render = { mode };
2186
- if (k === "iframe" || k === "adaptive") render.iframeUrl = `/ui/${pluginName}/index.html`;
2187
- if (k === "rn" || k === "adaptive") render.reactNative = { component: pluginName };
2206
+ if (kind === "iframe" || kind === "adaptive") render.iframeUrl = `/ui/${pluginName}/index.html`;
2207
+ if (kind === "rn" || kind === "adaptive") render.reactNative = { component: pluginName };
2188
2208
  const prettyName = pluginName.replace(/-/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
2189
2209
  files.push({
2190
2210
  path: `ui-dist/${pluginName}/manifest.json`,
@@ -2209,6 +2229,10 @@ const handlers = {
2209
2229
  category: "AI Team Solution Platform",
2210
2230
  summary: "A-Team is a platform for building governed AI Teams as complete operational solutions.",
2211
2231
  },
2232
+ design_advisor: {
2233
+ _important: "BEFORE and WHILE you design any skill/solution you MUST consult ateam_design_advisor. You do NOT know which platform capabilities exist or when to use them — the advisor does. Describe your goal to it and it returns pointers to the right capabilities (per-actor storage, widgets, triggers, sub-agents, mobile data, run-scripts, multi-skill handoff, GitHub, …) with the /spec topic to read next and the tool to wire each. It's advisory — you decide and own the design — but skipping it means you'll miss capabilities the platform already provides.",
2234
+ how: "ateam_design_advisor({ goal: '<what you are building, in your words>', design_state: {} }). Re-call it as the design evolves (pass the current design_state) to get 'what's still missing' hints. Then ateam_get_spec(topic) for any capability it points you to.",
2235
+ },
2212
2236
  what_is_a_team: {
2213
2237
  definition: "A Team is a structured multi-role AI system composed of Skills, Connectors, Governance contracts, and Managed Runtime deployment.",
2214
2238
  core_components: {
@@ -2568,6 +2592,14 @@ const handlers = {
2568
2592
 
2569
2593
  ateam_get_examples: async ({ type }, sid) => get(EXAMPLE_PATHS[type], sid),
2570
2594
 
2595
+ // Design-time capability advisor. Proxies to the Builder's /spec/advisor
2596
+ // (LLM over the curated capability catalog). Public endpoint (auth-exempt),
2597
+ // but we forward the session so a base override is honored.
2598
+ ateam_design_advisor: async ({ goal, design_state }, sid) => {
2599
+ if (!goal || typeof goal !== "string") throw new Error("goal required (a string describing what you're building)");
2600
+ return post("/spec/advisor", { goal, design_state: design_state || {} }, sid, { timeoutMs: 90_000, retries: 1 });
2601
+ },
2602
+
2571
2603
  // ─── Composite: Build & Run ────────────────────────────────────────
2572
2604
  // Validates → Deploys → Health-checks → Optionally tests
2573
2605
  // One call replaces: validate_solution + deploy_solution + get_solution(health)