@ateam-ai/mcp 0.4.63 → 0.4.65

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 +42 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ateam-ai/mcp",
3
- "version": "0.4.63",
3
+ "version": "0.4.65",
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
@@ -1038,8 +1038,15 @@ export const tools = [
1038
1038
  "A building agent starts every run empty — it does not know which tool " +
1039
1039
  "misled the last run or the workaround that got past it. Log a lesson the " +
1040
1040
  "moment a tool misleads you AND you find a way through.\n\n" +
1041
- "APPEND-ONLY. You cannot edit or delete earlier lessons, and you do not " +
1042
- "supply the timestamp, job or actor — the server stamps those.\n\n" +
1041
+ "APPEND-ONLY. You cannot edit or delete earlier lessons, and you do not supply " +
1042
+ "the timestamp — the server stamps it, so it cannot be forged.\n\n" +
1043
+ "PROVENANCE CAVEAT, stated because the earlier wording over-promised: `job_id` " +
1044
+ "and `actor` are recorded ONLY when the caller supplies x-adas-job-id / " +
1045
+ "x-adas-actor-id. An agent calling this tool does not, so those fields are " +
1046
+ "usually null — a lesson cannot currently be traced back to the run that " +
1047
+ "produced it, and the file cannot tell 'three runs hit this' from 'one run hit " +
1048
+ "it three times'. Do not put a job id in `error` to compensate; keep that field " +
1049
+ "verbatim.\n\n" +
1043
1050
  "LOG ONLY WHAT YOU OBSERVED. Quote the error VERBATIM; never paraphrase it " +
1044
1051
  "and never write a theory about platform internals. A wrong lesson is worse " +
1045
1052
  "than no lesson, because the next run cannot check it and will act on it.\n\n" +
@@ -1423,6 +1430,14 @@ export const tools = [
1423
1430
  type: "string",
1424
1431
  description: "Optional: get detailed trace for a specific job ID",
1425
1432
  },
1433
+ chain_id: {
1434
+ type: "string",
1435
+ description: "The CHAIN id — what ateam_conversation returns and ateam_chain_status takes. Prefer this: it is the id you actually hold. Resolved to the underlying job for you.",
1436
+ },
1437
+ actor_id: {
1438
+ type: "string",
1439
+ description: "The actor whose job this is. REQUIRED for per-job detail: a job belongs to an actor and Core refuses the detail endpoint without one (the list form does not check). Use the same actor_id you passed to ateam_conversation.",
1440
+ },
1426
1441
  limit: {
1427
1442
  type: "number",
1428
1443
  description: "Max jobs to return (default: 10, max: 50)",
@@ -4317,10 +4332,33 @@ const handlers = {
4317
4332
 
4318
4333
  // ─── Developer Tools ────────────────────────────────────────────
4319
4334
 
4320
- ateam_get_execution_logs: async ({ solution_id, skill_id, job_id, limit }, sid) => {
4335
+ ateam_get_execution_logs: async ({ solution_id, skill_id, job_id, chain_id, actor_id, limit }, sid) => {
4336
+ // CALLERS HOLD A CHAIN ID, NOT A JOB ID. ateam_conversation returns
4337
+ // chain_id, ateam_chain_status takes chain_id — but this tool wanted the
4338
+ // inner job id, which nobody ever sees. Accept the chain id and resolve it
4339
+ // through the LIST form, which already returns chainId per job. No new
4340
+ // mechanism: the mapping is in data we were already fetching.
4341
+ let resolvedJobId = job_id;
4342
+ if (!resolvedJobId && chain_id) {
4343
+ const listed = await get(`/deploy/solutions/${solution_id}/logs?limit=50`, sid);
4344
+ const match = (listed?.jobs || []).find((j) => j?.chainId === chain_id || j?.id === chain_id);
4345
+ if (!match) {
4346
+ return {
4347
+ ok: false,
4348
+ error: `No job found for chain "${chain_id}" in solution "${solution_id}".`,
4349
+ hint: "The chain may belong to another solution, or be older than the last 50 jobs. Call this tool without chain_id/job_id to list what exists.",
4350
+ };
4351
+ }
4352
+ resolvedJobId = match.id;
4353
+ }
4354
+
4321
4355
  const qs = new URLSearchParams();
4322
4356
  if (skill_id) qs.set("skill_id", skill_id);
4323
- if (job_id) qs.set("job_id", job_id);
4357
+ if (resolvedJobId) qs.set("job_id", resolvedJobId);
4358
+ // A job belongs to an ACTOR and Core enforces that on the detail endpoint.
4359
+ // Without it every job_id lookup is refused — including for a job this same
4360
+ // call just listed. The tenant key alone is nobody.
4361
+ if (actor_id) qs.set("actor_id", actor_id);
4324
4362
  if (limit) qs.set("limit", String(limit));
4325
4363
  const qsStr = qs.toString() ? `?${qs}` : "";
4326
4364
  return get(`/deploy/solutions/${solution_id}/logs${qsStr}`, sid);