@ateam-ai/mcp 0.3.6 → 0.3.8
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 +80 -19
package/package.json
CHANGED
package/src/tools.js
CHANGED
|
@@ -674,6 +674,34 @@ export const tools = [
|
|
|
674
674
|
required: ["solution_id", "skill_id", "job_id"],
|
|
675
675
|
},
|
|
676
676
|
},
|
|
677
|
+
{
|
|
678
|
+
name: "ateam_test_connector",
|
|
679
|
+
core: true,
|
|
680
|
+
description:
|
|
681
|
+
"Call a tool on a running connector and get the result. Use this to test individual connector tools (e.g., triggers.list, entities.list, google.command) without deploying to a client. The connector must be connected and running.",
|
|
682
|
+
inputSchema: {
|
|
683
|
+
type: "object",
|
|
684
|
+
properties: {
|
|
685
|
+
solution_id: {
|
|
686
|
+
type: "string",
|
|
687
|
+
description: "The solution ID",
|
|
688
|
+
},
|
|
689
|
+
connector_id: {
|
|
690
|
+
type: "string",
|
|
691
|
+
description: "The connector ID (e.g., 'home-assistant-mcp', 'google-home-mcp')",
|
|
692
|
+
},
|
|
693
|
+
tool: {
|
|
694
|
+
type: "string",
|
|
695
|
+
description: "The tool name to call (e.g., 'triggers.list', 'entities.list', 'google.devices')",
|
|
696
|
+
},
|
|
697
|
+
args: {
|
|
698
|
+
type: "object",
|
|
699
|
+
description: "Optional: arguments to pass to the tool",
|
|
700
|
+
},
|
|
701
|
+
},
|
|
702
|
+
required: ["solution_id", "connector_id", "tool"],
|
|
703
|
+
},
|
|
704
|
+
},
|
|
677
705
|
{
|
|
678
706
|
name: "ateam_get_connector_source",
|
|
679
707
|
core: true,
|
|
@@ -1451,11 +1479,35 @@ const handlers = {
|
|
|
1451
1479
|
};
|
|
1452
1480
|
}
|
|
1453
1481
|
|
|
1482
|
+
// Phase 2.5: Restart connectors that have source code (upload triggers stop+start)
|
|
1483
|
+
if (effectiveMcpStore && Object.keys(effectiveMcpStore).length > 0) {
|
|
1484
|
+
const connectorResults = [];
|
|
1485
|
+
for (const [connId, files] of Object.entries(effectiveMcpStore)) {
|
|
1486
|
+
if (!Array.isArray(files) || files.length === 0) continue;
|
|
1487
|
+
try {
|
|
1488
|
+
const uploadResult = await post(
|
|
1489
|
+
`/deploy/solutions/${solutionId}/connectors/${connId}/upload`,
|
|
1490
|
+
{ files },
|
|
1491
|
+
sid,
|
|
1492
|
+
{ timeoutMs: 120_000 },
|
|
1493
|
+
);
|
|
1494
|
+
connectorResults.push({ id: connId, ok: true, tools: uploadResult.tools || 0 });
|
|
1495
|
+
} catch (err) {
|
|
1496
|
+
connectorResults.push({ id: connId, ok: false, error: err.message });
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
phases.push({
|
|
1500
|
+
phase: "connector_restart",
|
|
1501
|
+
status: connectorResults.every(r => r.ok) ? "done" : "partial",
|
|
1502
|
+
connectors: connectorResults,
|
|
1503
|
+
});
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1454
1506
|
// Phase 3: Health check (with brief wait for propagation)
|
|
1455
1507
|
let health;
|
|
1456
1508
|
try {
|
|
1457
1509
|
await sleep(2000);
|
|
1458
|
-
health = await get(`/deploy/solutions/${
|
|
1510
|
+
health = await get(`/deploy/solutions/${solutionId}/health`, sid);
|
|
1459
1511
|
phases.push({ phase: "health", status: "done" });
|
|
1460
1512
|
} catch (err) {
|
|
1461
1513
|
health = { error: err.message };
|
|
@@ -1469,7 +1521,7 @@ const handlers = {
|
|
|
1469
1521
|
if (skillId) {
|
|
1470
1522
|
try {
|
|
1471
1523
|
test_result = await post(
|
|
1472
|
-
`/deploy/solutions/${
|
|
1524
|
+
`/deploy/solutions/${solutionId}/skills/${skillId}/test`,
|
|
1473
1525
|
{ message: test_message },
|
|
1474
1526
|
sid,
|
|
1475
1527
|
{ timeoutMs: 90_000 },
|
|
@@ -1482,28 +1534,34 @@ const handlers = {
|
|
|
1482
1534
|
}
|
|
1483
1535
|
}
|
|
1484
1536
|
|
|
1485
|
-
// Phase 5: GitHub push (
|
|
1537
|
+
// Phase 5: GitHub push (skip if we just pulled from GitHub — don't overwrite source of truth)
|
|
1486
1538
|
let github_result;
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1539
|
+
if (github) {
|
|
1540
|
+
// We pulled from GitHub → GitHub IS the source of truth. Don't push stale Core state back.
|
|
1541
|
+
github_result = { skipped: true, reason: 'Deployed from GitHub — skipping push-back to avoid overwriting source of truth.' };
|
|
1542
|
+
phases.push({ phase: "github", status: "skipped", reason: "pulled_from_github" });
|
|
1543
|
+
} else {
|
|
1544
|
+
try {
|
|
1545
|
+
github_result = await post(
|
|
1546
|
+
`/deploy/solutions/${solutionId}/github/push`,
|
|
1547
|
+
{ message: `Deploy: ${solution.name || solutionId}` },
|
|
1548
|
+
sid,
|
|
1549
|
+
{ timeoutMs: 60_000 },
|
|
1550
|
+
);
|
|
1551
|
+
phases.push({
|
|
1552
|
+
phase: "github",
|
|
1553
|
+
status: github_result.skipped ? "skipped" : "done",
|
|
1554
|
+
...(github_result.repo_url && { repo_url: github_result.repo_url }),
|
|
1555
|
+
});
|
|
1556
|
+
} catch (err) {
|
|
1557
|
+
github_result = { error: err.message };
|
|
1558
|
+
phases.push({ phase: "github", status: "error", error: err.message });
|
|
1559
|
+
}
|
|
1502
1560
|
}
|
|
1503
1561
|
|
|
1504
1562
|
return {
|
|
1505
1563
|
ok: true,
|
|
1506
|
-
solution_id:
|
|
1564
|
+
solution_id: solutionId,
|
|
1507
1565
|
branch: 'main',
|
|
1508
1566
|
phases,
|
|
1509
1567
|
deploy: {
|
|
@@ -1679,6 +1737,9 @@ const handlers = {
|
|
|
1679
1737
|
ateam_solution_chat: async ({ solution_id, message }, sid) =>
|
|
1680
1738
|
post(`/deploy/solutions/${solution_id}/chat`, { message }, sid),
|
|
1681
1739
|
|
|
1740
|
+
ateam_test_connector: async ({ solution_id, connector_id, tool, args }, sid) =>
|
|
1741
|
+
post(`/deploy/solutions/${solution_id}/connectors/${connector_id}/call`, { tool, args }, sid, { timeoutMs: 30_000 }),
|
|
1742
|
+
|
|
1682
1743
|
// ─── Developer Tools ────────────────────────────────────────────
|
|
1683
1744
|
|
|
1684
1745
|
ateam_get_execution_logs: async ({ solution_id, skill_id, job_id, limit }, sid) => {
|