@ateam-ai/mcp 0.4.82 → 0.4.84
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/api.js +21 -1
- package/src/tools.js +12 -0
package/package.json
CHANGED
package/src/api.js
CHANGED
|
@@ -493,8 +493,11 @@ function headers(sessionId) {
|
|
|
493
493
|
|
|
494
494
|
/**
|
|
495
495
|
* Format an API error into a user-friendly message with actionable hints.
|
|
496
|
+
*
|
|
497
|
+
* Exported so the hints can be TESTED as behaviour rather than as source text.
|
|
498
|
+
* A test that greps for the right-looking code passes on code that never runs.
|
|
496
499
|
*/
|
|
497
|
-
function formatError(method, path, status, body, baseUrl) {
|
|
500
|
+
export function formatError(method, path, status, body, baseUrl) {
|
|
498
501
|
const hints = {
|
|
499
502
|
400: "Bad request — see the error details above for what to fix.",
|
|
500
503
|
401: "Your API key may be invalid or expired. Get a valid key at https://mcp.ateam-ai.com/get-api-key then call ateam_auth(api_key: \"your_key\").",
|
|
@@ -532,6 +535,23 @@ function formatError(method, path, status, body, baseUrl) {
|
|
|
532
535
|
}
|
|
533
536
|
}
|
|
534
537
|
|
|
538
|
+
// A 404 ON /spec IS NOT A MISSING SOLUTION.
|
|
539
|
+
//
|
|
540
|
+
// The table answers every 404 with "check the solution_id or skill_id".
|
|
541
|
+
// /spec/* takes neither. Asking for a topic this deployment does not serve —
|
|
542
|
+
// which happens the moment the tool ships ahead of the backend, as
|
|
543
|
+
// device-capabilities did on 2026-09-04 — sent the reader looking for a
|
|
544
|
+
// solution that was never involved. The environment is the whole answer, so
|
|
545
|
+
// name it: the same call against a newer deployment succeeds.
|
|
546
|
+
if (status === 404 && /^\/spec(\/|$)/.test(String(path || ""))) {
|
|
547
|
+
const topic = String(path).replace(/^\/spec\/?/, "") || "(index)";
|
|
548
|
+
hints[404] =
|
|
549
|
+
`Nothing to do with solutions — /spec takes no solution_id or skill_id. The A-Team API at ` +
|
|
550
|
+
`${baseUrl || "this URL"} does not serve the topic "${topic}". Either the topic name is wrong (ateam_get_spec ` +
|
|
551
|
+
`with topic:"overview" lists what this deployment has), or this backend is OLDER than the tool you are ` +
|
|
552
|
+
`calling from and the topic has not been deployed here yet. Retrying will not change either.`;
|
|
553
|
+
}
|
|
554
|
+
|
|
535
555
|
// A 500 THAT NAMES A MISSING CONFIGURATION IS NOT "TRY AGAIN IN A MINUTE".
|
|
536
556
|
//
|
|
537
557
|
// /chat answered 500 {"message":"OPENAI_API_KEY is not set"} and this table
|
package/src/tools.js
CHANGED
|
@@ -3129,6 +3129,18 @@ const handlers = {
|
|
|
3129
3129
|
design_advisor: {
|
|
3130
3130
|
_important: "BEFORE and WHILE you design any skill/solution you MUST consult ateam_design_advisor. You do NOT know which platform capabilities exist or when to use them — the advisor does. Describe your goal to it and it returns pointers to the right capabilities (per-actor storage, widgets, triggers, sub-agents, mobile data, run-scripts, multi-skill handoff, GitHub, …) with the /spec topic to read next and the tool to wire each. It's advisory — you decide and own the design — but skipping it means you'll miss capabilities the platform already provides.",
|
|
3131
3131
|
how: "ateam_design_advisor({ goal: '<what you are building, in your words>', design_state: {} }). Re-call it as the design evolves (pass the current design_state) to get 'what's still missing' hints. Then ateam_get_spec(topic) for any capability it points you to. For anything deeper — details, examples, or topics outside the capability list — ateam_spec_search({ query: '<how do I…>' }) does a semantic search over the FULL spec docs.",
|
|
3132
|
+
// A MANDATE WITH NO FALLBACK IS A SINGLE POINT OF FAILURE, and it failed:
|
|
3133
|
+
// on 2026-09-04 the advisor errored three times for one design and the
|
|
3134
|
+
// agent, told to consult it and given nowhere else to go, fell back to
|
|
3135
|
+
// reading whichever spec topic happened to mention the thing it wanted —
|
|
3136
|
+
// and concluded a capability was absent that had shipped. Name the other
|
|
3137
|
+
// doors here, at the point where the obligation is stated.
|
|
3138
|
+
if_the_advisor_does_not_answer:
|
|
3139
|
+
"It is not the only door and you are NOT stuck. ateam_get_spec(topic:'device-capabilities') is the GENERATED " +
|
|
3140
|
+
"capability matrix (what the phone can do, per API, with status) and ateam_spec_search({query}) searches the full " +
|
|
3141
|
+
"spec corpus — neither has an LLM in the path, so neither fails the way the advisor can. If the advisor answers " +
|
|
3142
|
+
"with `truncated: true`, what you got is CORRECT but INCOMPLETE: use it, and treat a capability's absence as " +
|
|
3143
|
+
"UNKNOWN rather than 'no' — re-ask with a narrower goal, or check the two tools above.",
|
|
3132
3144
|
},
|
|
3133
3145
|
what_is_a_team: {
|
|
3134
3146
|
definition: "A Team is a structured multi-role AI system composed of Skills, Connectors, Governance contracts, and Managed Runtime deployment.",
|