@ateam-ai/mcp 0.3.32 → 0.3.33
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 +24 -5
package/package.json
CHANGED
package/src/tools.js
CHANGED
|
@@ -2288,19 +2288,38 @@ const handlers = {
|
|
|
2288
2288
|
}),
|
|
2289
2289
|
};
|
|
2290
2290
|
}
|
|
2291
|
+
// Pull through the underlying error/message instead of fabricating "0/0/0
|
|
2292
|
+
// success-shaped" output. Old wrapper hid backend errors (e.g. validator
|
|
2293
|
+
// failures from sentinel files in user repos) and reported `total: 0` with
|
|
2294
|
+
// no clue why — the agent was left thinking redeploy was a no-op when in
|
|
2295
|
+
// fact it was a hard failure.
|
|
2296
|
+
const failedCount = !result.ok
|
|
2297
|
+
? (result.failed ?? (result.skills?.length ? result.skills.filter(s => s.ok === false).length : 1))
|
|
2298
|
+
: (result.failed || 0);
|
|
2299
|
+
const deployedCount = result.deployed ?? (result.ok ? (skill_id ? 1 : (result.skills?.filter(s => s.ok !== false).length || 0)) : 0);
|
|
2300
|
+
const totalCount = result.total ?? (deployedCount + failedCount);
|
|
2301
|
+
|
|
2291
2302
|
return {
|
|
2292
2303
|
ok: result.ok,
|
|
2293
2304
|
solution_id,
|
|
2294
2305
|
...(skill_id && { skill_id }),
|
|
2295
|
-
deployed:
|
|
2296
|
-
failed:
|
|
2297
|
-
total:
|
|
2306
|
+
deployed: deployedCount,
|
|
2307
|
+
failed: failedCount,
|
|
2308
|
+
total: totalCount,
|
|
2298
2309
|
skills: result.skills || [],
|
|
2310
|
+
// Surface the underlying error when the request failed — the most
|
|
2311
|
+
// common cause is a validator failure (e.g. broken connector source
|
|
2312
|
+
// in the GitHub repo), and hiding it makes diagnosis impossible.
|
|
2313
|
+
...(!result.ok && result.error && { error: result.error }),
|
|
2314
|
+
...(!result.ok && result.details && { details: result.details }),
|
|
2315
|
+
...(!result.ok && result.hint && { hint: result.hint }),
|
|
2299
2316
|
message: result.ok
|
|
2300
2317
|
? skill_id
|
|
2301
2318
|
? `Re-deployed skill "${skill_id}" successfully.`
|
|
2302
|
-
: `Re-deployed ${
|
|
2303
|
-
:
|
|
2319
|
+
: `Re-deployed ${deployedCount} skill(s) successfully.`
|
|
2320
|
+
: (result.error
|
|
2321
|
+
? `Re-deploy failed: ${result.error}${result.hint ? ` — ${result.hint}` : ''}`
|
|
2322
|
+
: `Re-deploy had ${failedCount} failure(s). Check skills array or call the underlying endpoint with verbose:true.`),
|
|
2304
2323
|
};
|
|
2305
2324
|
},
|
|
2306
2325
|
|