@ateam-ai/mcp 0.4.64 → 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.
- package/package.json +1 -1
- package/src/tools.js +33 -2
package/package.json
CHANGED
package/src/tools.js
CHANGED
|
@@ -1430,6 +1430,14 @@ export const tools = [
|
|
|
1430
1430
|
type: "string",
|
|
1431
1431
|
description: "Optional: get detailed trace for a specific job ID",
|
|
1432
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
|
+
},
|
|
1433
1441
|
limit: {
|
|
1434
1442
|
type: "number",
|
|
1435
1443
|
description: "Max jobs to return (default: 10, max: 50)",
|
|
@@ -4324,10 +4332,33 @@ const handlers = {
|
|
|
4324
4332
|
|
|
4325
4333
|
// ─── Developer Tools ────────────────────────────────────────────
|
|
4326
4334
|
|
|
4327
|
-
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
|
+
|
|
4328
4355
|
const qs = new URLSearchParams();
|
|
4329
4356
|
if (skill_id) qs.set("skill_id", skill_id);
|
|
4330
|
-
if (
|
|
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);
|
|
4331
4362
|
if (limit) qs.set("limit", String(limit));
|
|
4332
4363
|
const qsStr = qs.toString() ? `?${qs}` : "";
|
|
4333
4364
|
return get(`/deploy/solutions/${solution_id}/logs${qsStr}`, sid);
|