@ateam-ai/mcp 0.4.9 → 0.4.10

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 +22 -17
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ateam-ai/mcp",
3
- "version": "0.4.9",
3
+ "version": "0.4.10",
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
@@ -434,7 +434,9 @@ export const tools = [
434
434
  name: "ateam_conversation",
435
435
  core: true,
436
436
  description:
437
- "Send a message to a deployed solution and get the result. No skill_id needed — the system auto-routes to the right skill. Supports multi-turn conversations: pass the actor_id from a previous response to continue the thread (e.g., reply to a confirmation prompt). Each call creates a new job but the same actor_id maintains conversation context.",
437
+ "Send a chat message to a deployed solution. No skill_id needed — the system auto-routes to the right skill.\n\n" +
438
+ "ALWAYS ASYNC: returns a chain id (job_id) immediately — the assistant's reply is NOT in this response (a conversation can run for minutes, so a synchronous wait would hit the 100s edge timeout → 524). Poll for the reply with ateam_get_chain(job_id) — it returns the chain tree + per-job status; the routed worker's terminal job carries the reply.\n\n" +
439
+ "Multi-turn: pass the actor_id from a previous response back in to continue the same thread (e.g. reply to a confirmation prompt). Each call is a new job; the same actor_id maintains conversation context.",
438
440
  inputSchema: {
439
441
  type: "object",
440
442
  properties: {
@@ -450,14 +452,6 @@ export const tools = [
450
452
  type: "string",
451
453
  description: "Optional: actor ID from a previous response to continue the conversation. Omit for a new conversation.",
452
454
  },
453
- wait: {
454
- type: "boolean",
455
- description: "If true (default), wait for completion. If false, return job_id immediately for polling.",
456
- },
457
- timeout_ms: {
458
- type: "number",
459
- description: "Optional: max wait time in ms (default: 60000, max: 300000).",
460
- },
461
455
  },
462
456
  required: ["solution_id", "message"],
463
457
  },
@@ -3161,15 +3155,26 @@ const handlers = {
3161
3155
  },
3162
3156
 
3163
3157
  ateam_conversation: async ({ solution_id, message, actor_id, wait, timeout_ms }, sid) => {
3164
- const asyncMode = wait === false;
3165
- const body = {
3166
- message,
3167
- ...(actor_id ? { actor_id } : {}),
3168
- ...(asyncMode ? { async: true } : {}),
3169
- ...(timeout_ms ? { timeout_ms } : {}),
3158
+ // ALWAYS async on the wire. A conversation can run for minutes (auto-route
3159
+ // worker → sub-skills), and a synchronous hold would blow past the 100s
3160
+ // Cloudflare edge limit → 524. So we kick off, return the chain id (job_id)
3161
+ // immediately, and the caller polls a SLIM status. `wait`/`timeout_ms` are
3162
+ // accepted for back-compat but no longer hold the HTTP request open.
3163
+ const body = { message, async: true, ...(actor_id ? { actor_id } : {}) };
3164
+ const kickoff = await post(`/deploy/solutions/${solution_id}/test`, body, sid, { timeoutMs: 15_000 });
3165
+ const jobId = kickoff?.job_id || kickoff?.jobId || null;
3166
+ return {
3167
+ ...kickoff,
3168
+ job_id: jobId,
3169
+ chain_id: jobId,
3170
+ _poll: jobId
3171
+ ? {
3172
+ _note: "Conversation started (async). Poll for the reply — do NOT expect it in this response.",
3173
+ slim: `ateam_get_chain(job_id: "${jobId}") → chain tree + per-job status`,
3174
+ continue: kickoff?.actor_id ? `ateam_conversation(actor_id: "${kickoff.actor_id}", ...) to continue the thread` : undefined,
3175
+ }
3176
+ : undefined,
3170
3177
  };
3171
- const timeoutMs = asyncMode ? 15_000 : Math.min((timeout_ms || 60_000) + 30_000, 330_000);
3172
- return post(`/deploy/solutions/${solution_id}/test`, body, sid, { timeoutMs });
3173
3178
  },
3174
3179
 
3175
3180
  ateam_test_skill: async ({ solution_id, skill_id, message, wait, wait_for, chain_timeout_ms, actor_id }, sid) => {