@ateam-ai/mcp 0.4.23 → 0.4.24

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 +32 -18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ateam-ai/mcp",
3
- "version": "0.4.23",
3
+ "version": "0.4.24",
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
@@ -4179,18 +4179,26 @@ const handlers = {
4179
4179
  return del(`/deploy/solutions/${solution_id}/connectors/${connector_id}`, sid);
4180
4180
  },
4181
4181
 
4182
- ateam_upload_connector: async ({ solution_id, connector_id, github, files, ref, replace }, sid) =>
4183
- post(
4184
- `/deploy/solutions/${solution_id}/connectors/${connector_id}/upload`,
4185
- {
4186
- github,
4187
- files,
4188
- ...(ref ? { ref } : {}),
4189
- ...(replace === true ? { replace: true } : {}),
4190
- },
4191
- sid,
4192
- { timeoutMs: 300_000, retries: 1 },
4193
- ),
4182
+ ateam_upload_connector: async ({ solution_id, connector_id, github, files, ref, replace }, sid) => {
4183
+ // Async-first: this runs npm install + build in Core (up to ~7min) and is a
4184
+ // prime Cloudflare-524 culprit. Kick async → poll /deploy/jobs; fall back to
4185
+ // sync for older backends that don't honor async. Mirrors ateam_github_pull.
4186
+ const body = {
4187
+ github,
4188
+ files,
4189
+ ...(ref ? { ref } : {}),
4190
+ ...(replace === true ? { replace: true } : {}),
4191
+ };
4192
+ const url = `/deploy/solutions/${solution_id}/connectors/${connector_id}/upload`;
4193
+ let kicked;
4194
+ try {
4195
+ kicked = await post(url, { ...body, async: true }, sid, { timeoutMs: 30_000 });
4196
+ } catch (err) {
4197
+ return await post(url, body, sid, { timeoutMs: 300_000, retries: 1 });
4198
+ }
4199
+ if (!kicked?.async || !kicked.job_id) return kicked; // backend didn't honor async
4200
+ return await pollDeployJob(kicked.job_id, sid, { label: 'connector-upload', maxMs: 15 * 60_000, intervalMs: 2000 });
4201
+ },
4194
4202
 
4195
4203
  // ── Phase 9 strip: focused minimal responses ────────────────────────
4196
4204
  ateam_show_skill_minimal: async ({ solution_id, skill_id }, sid) => {
@@ -4303,12 +4311,18 @@ const handlers = {
4303
4311
  pluginName: plugin_name,
4304
4312
  kind: k,
4305
4313
  });
4306
- const result = await post(
4307
- `/deploy/solutions/${solution_id}/connectors/${connector_id}/upload`,
4308
- { files },
4309
- sid,
4310
- { timeoutMs: 120_000, retries: 1 },
4311
- );
4314
+ // Async-first upload npm install+build can exceed Cloudflare's 100s → 524.
4315
+ // Kick async → poll /deploy/jobs; fall back to sync for older backends.
4316
+ const _uploadUrl = `/deploy/solutions/${solution_id}/connectors/${connector_id}/upload`;
4317
+ let result;
4318
+ try {
4319
+ const kicked = await post(_uploadUrl, { files, async: true }, sid, { timeoutMs: 30_000 });
4320
+ result = (kicked?.async && kicked.job_id)
4321
+ ? await pollDeployJob(kicked.job_id, sid, { label: 'create-plugin', maxMs: 15 * 60_000, intervalMs: 2000 })
4322
+ : kicked;
4323
+ } catch (err) {
4324
+ result = await post(_uploadUrl, { files }, sid, { timeoutMs: 120_000, retries: 1 });
4325
+ }
4312
4326
 
4313
4327
  // Verify the plugin actually became RENDERABLE — poll Core's live catalog
4314
4328
  // (which calls the connector's ui.listPlugins) for this plugin id. The