@ateam-ai/mcp 0.3.32 → 0.3.34

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/tools.js +31 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ateam-ai/mcp",
3
- "version": "0.3.32",
3
+ "version": "0.3.34",
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/tools.js CHANGED
@@ -1643,7 +1643,13 @@ const handlers = {
1643
1643
  phases.push({ phase: "deploy", status: job.status });
1644
1644
  break;
1645
1645
  }
1646
- } catch { /* keep polling */ }
1646
+ } catch (err) {
1647
+ // #4 Silent-catch audit: poll errors are usually transient
1648
+ // (network blip, restart). Logging at debug level so they
1649
+ // don't drown the console but ARE visible if you bump the
1650
+ // log level after a stuck deploy.
1651
+ if (process.env.MCP_DEBUG_POLLS) console.warn(`[ateam_build_and_run] poll ${jobId} error (will retry): ${err.message}`);
1652
+ }
1647
1653
  }
1648
1654
  if (!deploy) {
1649
1655
  return { ok: false, phase: "deployment", phases, error: "Async deploy timed out after 10 minutes", validation_warnings: validation.warnings || [],
@@ -2288,19 +2294,38 @@ const handlers = {
2288
2294
  }),
2289
2295
  };
2290
2296
  }
2297
+ // Pull through the underlying error/message instead of fabricating "0/0/0
2298
+ // success-shaped" output. Old wrapper hid backend errors (e.g. validator
2299
+ // failures from sentinel files in user repos) and reported `total: 0` with
2300
+ // no clue why — the agent was left thinking redeploy was a no-op when in
2301
+ // fact it was a hard failure.
2302
+ const failedCount = !result.ok
2303
+ ? (result.failed ?? (result.skills?.length ? result.skills.filter(s => s.ok === false).length : 1))
2304
+ : (result.failed || 0);
2305
+ const deployedCount = result.deployed ?? (result.ok ? (skill_id ? 1 : (result.skills?.filter(s => s.ok !== false).length || 0)) : 0);
2306
+ const totalCount = result.total ?? (deployedCount + failedCount);
2307
+
2291
2308
  return {
2292
2309
  ok: result.ok,
2293
2310
  solution_id,
2294
2311
  ...(skill_id && { skill_id }),
2295
- deployed: result.deployed || (result.ok ? 1 : 0),
2296
- failed: result.failed || 0,
2297
- total: result.total || (result.ok ? 1 : 0),
2312
+ deployed: deployedCount,
2313
+ failed: failedCount,
2314
+ total: totalCount,
2298
2315
  skills: result.skills || [],
2316
+ // Surface the underlying error when the request failed — the most
2317
+ // common cause is a validator failure (e.g. broken connector source
2318
+ // in the GitHub repo), and hiding it makes diagnosis impossible.
2319
+ ...(!result.ok && result.error && { error: result.error }),
2320
+ ...(!result.ok && result.details && { details: result.details }),
2321
+ ...(!result.ok && result.hint && { hint: result.hint }),
2299
2322
  message: result.ok
2300
2323
  ? skill_id
2301
2324
  ? `Re-deployed skill "${skill_id}" successfully.`
2302
- : `Re-deployed ${result.deployed || 0} skill(s) successfully.`
2303
- : `Re-deploy had ${result.failed || 0} failure(s). Check skills array for details.`,
2325
+ : `Re-deployed ${deployedCount} skill(s) successfully.`
2326
+ : (result.error
2327
+ ? `Re-deploy failed: ${result.error}${result.hint ? ` — ${result.hint}` : ''}`
2328
+ : `Re-deploy had ${failedCount} failure(s). Check skills array or call the underlying endpoint with verbose:true.`),
2304
2329
  };
2305
2330
  },
2306
2331