@ateam-ai/mcp 0.4.23 → 0.4.25
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 +38 -33
package/package.json
CHANGED
package/src/tools.js
CHANGED
|
@@ -2653,22 +2653,13 @@ const handlers = {
|
|
|
2653
2653
|
// Design-time capability advisor. Proxies to the Builder's /spec/advisor
|
|
2654
2654
|
// (LLM over the curated capability catalog). Public endpoint (auth-exempt),
|
|
2655
2655
|
// but we forward the session so a base override is honored.
|
|
2656
|
-
ateam_design_advisor: async ({ goal, design_state
|
|
2656
|
+
ateam_design_advisor: async ({ goal, design_state }, sid) => {
|
|
2657
2657
|
if (!goal || typeof goal !== "string") throw new Error("goal required (a string describing what you're building)");
|
|
2658
|
-
//
|
|
2659
|
-
//
|
|
2660
|
-
//
|
|
2661
|
-
//
|
|
2662
|
-
|
|
2663
|
-
const r = await post(
|
|
2664
|
-
`/deploy/solutions/${encodeURIComponent(sol)}/connectors/sysSpecSearch-mcp/call`,
|
|
2665
|
-
{ tool: "sysSpecSearch.advise", args: { goal, design_state: design_state || {} } },
|
|
2666
|
-
sid,
|
|
2667
|
-
{ timeoutMs: 90_000, retries: 1 },
|
|
2668
|
-
);
|
|
2669
|
-
const text = r?.result?.content?.[0]?.text;
|
|
2670
|
-
if (text) { try { return JSON.parse(text); } catch { return { ok: true, raw: text }; } }
|
|
2671
|
-
return r?.result ?? r;
|
|
2658
|
+
// Direct call to the Builder's /spec/advisor. The session's X-ADAS-TENANT
|
|
2659
|
+
// header rides along (post() sets it), so the Builder resolves this tenant's
|
|
2660
|
+
// LLM via Core's sys.llm gateway (stage→tier→model, transparent — no keys in
|
|
2661
|
+
// the Builder). Reachable externally on prod: the relay forwards /spec/*.
|
|
2662
|
+
return post("/spec/advisor", { goal, design_state: design_state || {} }, sid, { timeoutMs: 90_000, retries: 1 });
|
|
2672
2663
|
},
|
|
2673
2664
|
|
|
2674
2665
|
// Semantic search over the full /spec corpus. Reaches the sysSpecSearch-mcp
|
|
@@ -4179,18 +4170,26 @@ const handlers = {
|
|
|
4179
4170
|
return del(`/deploy/solutions/${solution_id}/connectors/${connector_id}`, sid);
|
|
4180
4171
|
},
|
|
4181
4172
|
|
|
4182
|
-
ateam_upload_connector: async ({ solution_id, connector_id, github, files, ref, replace }, sid) =>
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
},
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4173
|
+
ateam_upload_connector: async ({ solution_id, connector_id, github, files, ref, replace }, sid) => {
|
|
4174
|
+
// Async-first: this runs npm install + build in Core (up to ~7min) and is a
|
|
4175
|
+
// prime Cloudflare-524 culprit. Kick async → poll /deploy/jobs; fall back to
|
|
4176
|
+
// sync for older backends that don't honor async. Mirrors ateam_github_pull.
|
|
4177
|
+
const body = {
|
|
4178
|
+
github,
|
|
4179
|
+
files,
|
|
4180
|
+
...(ref ? { ref } : {}),
|
|
4181
|
+
...(replace === true ? { replace: true } : {}),
|
|
4182
|
+
};
|
|
4183
|
+
const url = `/deploy/solutions/${solution_id}/connectors/${connector_id}/upload`;
|
|
4184
|
+
let kicked;
|
|
4185
|
+
try {
|
|
4186
|
+
kicked = await post(url, { ...body, async: true }, sid, { timeoutMs: 30_000 });
|
|
4187
|
+
} catch (err) {
|
|
4188
|
+
return await post(url, body, sid, { timeoutMs: 300_000, retries: 1 });
|
|
4189
|
+
}
|
|
4190
|
+
if (!kicked?.async || !kicked.job_id) return kicked; // backend didn't honor async
|
|
4191
|
+
return await pollDeployJob(kicked.job_id, sid, { label: 'connector-upload', maxMs: 15 * 60_000, intervalMs: 2000 });
|
|
4192
|
+
},
|
|
4194
4193
|
|
|
4195
4194
|
// ── Phase 9 strip: focused minimal responses ────────────────────────
|
|
4196
4195
|
ateam_show_skill_minimal: async ({ solution_id, skill_id }, sid) => {
|
|
@@ -4303,12 +4302,18 @@ const handlers = {
|
|
|
4303
4302
|
pluginName: plugin_name,
|
|
4304
4303
|
kind: k,
|
|
4305
4304
|
});
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4305
|
+
// Async-first upload — npm install+build can exceed Cloudflare's 100s → 524.
|
|
4306
|
+
// Kick async → poll /deploy/jobs; fall back to sync for older backends.
|
|
4307
|
+
const _uploadUrl = `/deploy/solutions/${solution_id}/connectors/${connector_id}/upload`;
|
|
4308
|
+
let result;
|
|
4309
|
+
try {
|
|
4310
|
+
const kicked = await post(_uploadUrl, { files, async: true }, sid, { timeoutMs: 30_000 });
|
|
4311
|
+
result = (kicked?.async && kicked.job_id)
|
|
4312
|
+
? await pollDeployJob(kicked.job_id, sid, { label: 'create-plugin', maxMs: 15 * 60_000, intervalMs: 2000 })
|
|
4313
|
+
: kicked;
|
|
4314
|
+
} catch (err) {
|
|
4315
|
+
result = await post(_uploadUrl, { files }, sid, { timeoutMs: 120_000, retries: 1 });
|
|
4316
|
+
}
|
|
4312
4317
|
|
|
4313
4318
|
// Verify the plugin actually became RENDERABLE — poll Core's live catalog
|
|
4314
4319
|
// (which calls the connector's ui.listPlugins) for this plugin id. The
|