@ateam-ai/mcp 0.3.47 → 0.3.49

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tools.js +127 -28
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ateam-ai/mcp",
3
- "version": "0.3.47",
3
+ "version": "0.3.49",
4
4
  "mcpName": "io.github.ariekogan/ateam-mcp",
5
5
  "description": "A-Team MCP Server — build, validate, and deploy multi-agent solutions from any AI environment",
6
6
  "type": "module",
package/src/tools.js CHANGED
@@ -188,22 +188,29 @@ export const tools = [
188
188
  name: "ateam_build_and_run",
189
189
  core: true,
190
190
  description:
191
- "Build and deploy a governed AI Team solution in one step. ⚠️ HEAVIEST OPERATION (60-180s): validates solution+skills → deploys all connectors+skills to A-Team Core (regenerates MCP servers) → health-checks → optionally runs a warm test → auto-pushes to GitHub. AUTO-DETECTS GitHub repo: if you omit mcp_store and a repo exists, connector code is pulled from GitHub automatically. First deploy requires mcp_store. After that, write files via ateam_github_write, then just call build_and_run without mcp_store. For small changes to an already-deployed solution, prefer ateam_patch (faster, incremental). Requires authentication.",
191
+ "DEPLOY THE CURRENT MAIN BRANCH TO A-TEAM CORE. ⚠️ HEAVIEST OPERATION (60-180s): validates solution+skills → deploys all connectors+skills to Core (regenerates MCP servers) → health-checks → optionally runs a warm test → auto-pushes to GitHub.\n\n" +
192
+ "🌳 DEV/PROD WORKFLOW:\n" +
193
+ " 1. Edit files → ateam_github_patch (writes to `dev` branch by default)\n" +
194
+ " 2. (Optional) Preview what's about to ship → ateam_github_diff\n" +
195
+ " 3. Ship dev → main → ateam_github_promote (merges + auto-tags `prod-YYYY-MM-DD-NNN`)\n" +
196
+ " 4. Deploy main to Core → ateam_build_and_run\n\n" +
197
+ "This tool ALWAYS deploys the `main` branch — there is no `ref` parameter. To deploy in-progress dev work, first promote it.\n\n" +
198
+ "AUTO-DETECTS GitHub repo: if you omit mcp_store and a repo exists, connector code is pulled from main automatically. First deploy requires mcp_store. After that, edit via ateam_github_patch + promote, then build_and_run. For small changes prefer ateam_patch (faster, incremental). Requires authentication.",
192
199
  inputSchema: {
193
200
  type: "object",
194
201
  properties: {
195
202
  solution_id: {
196
203
  type: "string",
197
- description: "The solution ID. Use this INSTEAD of passing the full solution object — the solution definition is auto-pulled from GitHub. Required if solution object is omitted.",
204
+ description: "The solution ID. Use this INSTEAD of passing the full solution object — the solution definition is auto-pulled from main. Required if solution object is omitted.",
198
205
  },
199
206
  solution: {
200
207
  type: "object",
201
- description: "Full solution definition. Required on first deploy. After first deploy, just pass solution_id instead — everything is auto-pulled from GitHub.",
208
+ description: "Full solution definition. Required on first deploy. After first deploy, just pass solution_id instead — everything is auto-pulled from GitHub main.",
202
209
  },
203
210
  skills: {
204
211
  type: "array",
205
212
  items: { type: "object" },
206
- description: "Optional after first deploy: skill definitions. If omitted, auto-pulled from GitHub repo (skills/{id}/skill.json).",
213
+ description: "Optional after first deploy: skill definitions. If omitted, auto-pulled from main (skills/{id}/skill.json).",
207
214
  },
208
215
  connectors: {
209
216
  type: "array",
@@ -216,7 +223,7 @@ export const tools = [
216
223
  },
217
224
  github: {
218
225
  type: "boolean",
219
- description: "Optional: if true, pull connector source code from the solution's GitHub repo. AUTO-DETECTED: if you omit both mcp_store and github, the system checks if a repo exists and pulls from it automatically. You rarely need to set this explicitly.",
226
+ description: "Optional: if true, pull connector source code from main. AUTO-DETECTED: if you omit both mcp_store and github, the system checks if a repo exists and pulls from main automatically.",
220
227
  },
221
228
  test_message: {
222
229
  type: "string",
@@ -1068,7 +1075,8 @@ export const tools = [
1068
1075
  name: "ateam_github_read",
1069
1076
  core: true,
1070
1077
  description:
1071
- "Read any file from a solution's GitHub repo. Returns the file content. Use this to read connector source code, skill definitions, or any versioned file. Great for reviewing previous versions or understanding what's in the repo.",
1078
+ "Read any file from a solution's GitHub repo. Returns the file content. Use this to read connector source code, skill definitions, or any versioned file. " +
1079
+ "Default reads from `main` (deployed/prod state). Pass `ref: 'dev'` to read in-progress work.",
1072
1080
  inputSchema: {
1073
1081
  type: "object",
1074
1082
  properties: {
@@ -1080,6 +1088,11 @@ export const tools = [
1080
1088
  type: "string",
1081
1089
  description: "File path in the repo (e.g. 'connectors/home-assistant-mcp/server.js', 'solution.json', 'skills/order-support/skill.json')",
1082
1090
  },
1091
+ ref: {
1092
+ type: "string",
1093
+ description: "Branch, tag, or commit SHA to read from. Default: 'main' (prod). Use 'dev' to read in-progress work.",
1094
+ default: "main",
1095
+ },
1083
1096
  },
1084
1097
  required: ["solution_id", "path"],
1085
1098
  },
@@ -1091,7 +1104,8 @@ export const tools = [
1091
1104
  "Edit a file in the solution's GitHub repo and commit. Two modes:\n" +
1092
1105
  "1. FULL FILE: provide `content` — replaces entire file (good for new files or small files)\n" +
1093
1106
  "2. SEARCH/REPLACE: provide `search` + `replace` — surgical edit without sending full file (preferred for large files like server.js)\n" +
1094
- "Always use search/replace for large files (>5KB). Always read the file first with ateam_github_read to get the exact text to search for.",
1107
+ "Always use search/replace for large files (>5KB). Always read the file first with ateam_github_read to get the exact text to search for.\n\n" +
1108
+ "DEFAULTS TO `dev` BRANCH — writes don't touch prod. Use ateam_github_promote to ship dev→main when ready. Pass ref:'main' only for emergency hotfixes.",
1095
1109
  inputSchema: {
1096
1110
  type: "object",
1097
1111
  properties: {
@@ -1119,6 +1133,11 @@ export const tools = [
1119
1133
  type: "string",
1120
1134
  description: "Optional commit message (default: 'Update <path>')",
1121
1135
  },
1136
+ ref: {
1137
+ type: "string",
1138
+ description: "Target branch. Default: 'dev' (safe — won't touch prod). Use 'main' only for emergency hotfixes.",
1139
+ default: "dev",
1140
+ },
1122
1141
  },
1123
1142
  required: ["solution_id", "path"],
1124
1143
  },
@@ -1147,7 +1166,8 @@ export const tools = [
1147
1166
  description:
1148
1167
  "Write a file to the solution's GitHub repo. Use this to create new connector files or replace existing ones — one file per call. " +
1149
1168
  "This is the PRIMARY way to write connector code after first deploy. " +
1150
- "Write each file individually (server.js, package.json, UI assets), then call ateam_build_and_run() to deploy.",
1169
+ "Write each file individually (server.js, package.json, UI assets), then call ateam_github_promote() to ship to prod (dev→main), then ateam_build_and_run() to deploy.\n\n" +
1170
+ "DEFAULTS TO `dev` BRANCH.",
1151
1171
  inputSchema: {
1152
1172
  type: "object",
1153
1173
  properties: {
@@ -1167,6 +1187,11 @@ export const tools = [
1167
1187
  type: "string",
1168
1188
  description: "Optional commit message (default: 'Write <path>')",
1169
1189
  },
1190
+ ref: {
1191
+ type: "string",
1192
+ description: "Target branch. Default: 'dev'.",
1193
+ default: "dev",
1194
+ },
1170
1195
  },
1171
1196
  required: ["solution_id", "path", "content"],
1172
1197
  },
@@ -1175,7 +1200,8 @@ export const tools = [
1175
1200
  name: "ateam_github_log",
1176
1201
  core: true,
1177
1202
  description:
1178
- "View commit history for a solution's GitHub repo. Shows recent commits with messages, SHAs, timestamps, and links. Use this to see what changes have been made and when.",
1203
+ "View commit history for a solution's GitHub repo. Shows recent commits with messages, SHAs, timestamps, and links. " +
1204
+ "Default reads from `main` (prod). Pass `ref: 'dev'` to see in-progress work.",
1179
1205
  inputSchema: {
1180
1206
  type: "object",
1181
1207
  properties: {
@@ -1187,6 +1213,48 @@ export const tools = [
1187
1213
  type: "number",
1188
1214
  description: "Max commits to return (default: 10)",
1189
1215
  },
1216
+ ref: {
1217
+ type: "string",
1218
+ description: "Branch to read commits from. Default: 'main'.",
1219
+ default: "main",
1220
+ },
1221
+ },
1222
+ required: ["solution_id"],
1223
+ },
1224
+ },
1225
+ {
1226
+ name: "ateam_github_diff",
1227
+ core: true,
1228
+ description:
1229
+ "PRE-FLIGHT BEFORE PROMOTE. Compares `dev` (head) vs `main` (base) by default — shows exactly which commits and files are about to ship if you call ateam_github_promote() next.\n\n" +
1230
+ "Use this when you want to:\n" +
1231
+ " • Review changes before promoting to prod\n" +
1232
+ " • See if dev is ahead of main at all (returns ahead_by: 0 if nothing to promote)\n" +
1233
+ " • Inspect arbitrary branch/tag/commit comparisons (override base/head)",
1234
+ inputSchema: {
1235
+ type: "object",
1236
+ properties: {
1237
+ solution_id: { type: "string", description: "The solution ID" },
1238
+ base: { type: "string", description: "Base branch/tag/sha (the target — what you're comparing TO). Default: 'main'.", default: "main" },
1239
+ head: { type: "string", description: "Head branch/tag/sha (the source — what you're comparing FROM). Default: 'dev'.", default: "dev" },
1240
+ },
1241
+ required: ["solution_id"],
1242
+ },
1243
+ },
1244
+ {
1245
+ name: "ateam_verify_consistency",
1246
+ core: true,
1247
+ description:
1248
+ "Check that the Builder filesystem state and GitHub state are in sync for a solution. Read-only probe — does NOT trigger a deploy.\n\n" +
1249
+ "Returns:\n" +
1250
+ " • ok: true + drifts: [] if everything matches\n" +
1251
+ " • ok: false + drifts: [{path, kind}] listing files that differ (kinds: fs_missing, gh_missing, content_differs)\n\n" +
1252
+ "Drift can creep in when GitHub writes happen but Builder FS doesn't get the mirror update (network blip, container restart mid-write). Boot sync heals most of it on next backend restart; this tool surfaces drift earlier.\n\n" +
1253
+ "Run after a series of ateam_github_patch calls to confirm the Builder backend is consistent with GitHub before you ateam_build_and_run.",
1254
+ inputSchema: {
1255
+ type: "object",
1256
+ properties: {
1257
+ solution_id: { type: "string", description: "The solution ID to verify" },
1190
1258
  },
1191
1259
  required: ["solution_id"],
1192
1260
  },
@@ -1200,7 +1268,10 @@ export const tools = [
1200
1268
  name: "ateam_github_promote",
1201
1269
  core: true,
1202
1270
  description:
1203
- "Create a checkpoint (safe point) on the current main branch. Tags the current state with safe-YYYY-MM-DD-NNN so you can rollback to it later. Use this before risky changes or when the solution is in a known-good state.",
1271
+ "SHIP DEV TO PROD. Merges the `dev` branch into `main` and auto-tags the new main HEAD as safe-YYYY-MM-DD-NNN. " +
1272
+ "Use after testing your dev work, when you're ready to deploy changes to production.\n\n" +
1273
+ "Workflow: 1) ateam_github_patch (writes to dev) → 2) ateam_github_promote (merges dev→main) → 3) ateam_build_and_run (deploys main).\n\n" +
1274
+ "Pass dry_run:true to see what's about to ship without merging. On merge conflict the call returns 409 — resolve manually on GitHub (open a PR or use the web UI), then retry.",
1204
1275
  inputSchema: {
1205
1276
  type: "object",
1206
1277
  properties: {
@@ -1210,7 +1281,15 @@ export const tools = [
1210
1281
  },
1211
1282
  label: {
1212
1283
  type: "string",
1213
- description: "Optional: human-readable label for this checkpoint (e.g., 'before refactor', 'v2 stable')",
1284
+ description: "Optional: human-readable label for the auto-tag (e.g., 'v2 stable', 'before refactor')",
1285
+ },
1286
+ dry_run: {
1287
+ type: "boolean",
1288
+ description: "If true: show the diff (commits + files about to ship) without merging. Default: false.",
1289
+ },
1290
+ skip_tag: {
1291
+ type: "boolean",
1292
+ description: "If true: merge without creating an auto-tag. Default: false (auto-tag enabled).",
1214
1293
  },
1215
1294
  },
1216
1295
  required: ["solution_id"],
@@ -1220,7 +1299,9 @@ export const tools = [
1220
1299
  name: "ateam_github_rollback",
1221
1300
  core: true,
1222
1301
  description:
1223
- "Rollback main branch to a previous checkpoint (safe-* tag). Resets main to the specified checkpoint commit. ⚠️ DESTRUCTIVE — use with caution. Use ateam_github_list_versions to find available checkpoints first.",
1302
+ "Roll prod (`main` branch) back to a previous state.\n\n" +
1303
+ "ADDITIVE — does NOT destroy history. Creates a new commit on top of main whose tree matches the target's tree. The history of everything between target and current main is preserved (you can roll back the rollback).\n\n" +
1304
+ "Workflow: 1) ateam_github_list_versions (find a safe-* tag) → 2) ateam_github_rollback(target: 'safe-...') → 3) ateam_build_and_run (deploys the reverted state).",
1224
1305
  inputSchema: {
1225
1306
  type: "object",
1226
1307
  properties: {
@@ -1228,12 +1309,12 @@ export const tools = [
1228
1309
  type: "string",
1229
1310
  description: "The solution ID",
1230
1311
  },
1231
- tag: {
1312
+ target: {
1232
1313
  type: "string",
1233
- description: "Required: checkpoint tag to rollback to (e.g., 'safe-2026-03-11-001')",
1314
+ description: "Tag (e.g., 'safe-2026-05-19-001') or commit SHA to revert main to. Use ateam_github_list_versions to find safe-* tags.",
1234
1315
  },
1235
1316
  },
1236
- required: ["solution_id", "tag"],
1317
+ required: ["solution_id", "target"],
1237
1318
  },
1238
1319
  },
1239
1320
  {
@@ -2794,25 +2875,43 @@ const handlers = {
2794
2875
  ateam_github_status: async ({ solution_id }, sid) =>
2795
2876
  get(`/deploy/solutions/${solution_id}/github/status`, sid),
2796
2877
 
2797
- ateam_github_read: async ({ solution_id, path: filePath }, sid) =>
2798
- get(`/deploy/solutions/${solution_id}/github/read?path=${encodeURIComponent(filePath)}`, sid),
2878
+ ateam_github_read: async ({ solution_id, path: filePath, ref }, sid) => {
2879
+ const qs = new URLSearchParams({ path: filePath });
2880
+ if (ref) qs.set('branch', ref);
2881
+ return get(`/deploy/solutions/${solution_id}/github/read?${qs.toString()}`, sid);
2882
+ },
2799
2883
 
2800
- ateam_github_patch: async ({ solution_id, path: filePath, content, search, replace, message }, sid) =>
2801
- post(`/deploy/solutions/${solution_id}/github/patch`, { path: filePath, content, search, replace, message }, sid),
2884
+ ateam_github_patch: async ({ solution_id, path: filePath, content, search, replace, message, ref }, sid) =>
2885
+ post(`/deploy/solutions/${solution_id}/github/patch`, { path: filePath, content, search, replace, message, ref }, sid),
2802
2886
 
2803
- ateam_github_write: async ({ solution_id, path: filePath, content, message }, sid) =>
2804
- post(`/deploy/solutions/${solution_id}/github/patch`, { path: filePath, content, message }, sid),
2887
+ ateam_github_write: async ({ solution_id, path: filePath, content, message, ref }, sid) =>
2888
+ post(`/deploy/solutions/${solution_id}/github/patch`, { path: filePath, content, message, ref }, sid),
2889
+
2890
+ ateam_github_log: async ({ solution_id, limit, ref }, sid) => {
2891
+ const qs = new URLSearchParams();
2892
+ if (limit) qs.set('limit', String(limit));
2893
+ if (ref) qs.set('branch', ref);
2894
+ const q = qs.toString();
2895
+ return get(`/deploy/solutions/${solution_id}/github/log${q ? '?' + q : ''}`, sid);
2896
+ },
2805
2897
 
2806
- ateam_github_log: async ({ solution_id, limit }, sid) => {
2807
- const qs = limit ? `?limit=${limit}` : "";
2808
- return get(`/deploy/solutions/${solution_id}/github/log${qs}`, sid);
2898
+ ateam_github_diff: async ({ solution_id, base, head }, sid) => {
2899
+ const qs = new URLSearchParams();
2900
+ if (base) qs.set('base', base);
2901
+ if (head) qs.set('head', head);
2902
+ const q = qs.toString();
2903
+ return get(`/deploy/solutions/${solution_id}/github/diff${q ? '?' + q : ''}`, sid);
2809
2904
  },
2810
2905
 
2811
- ateam_github_promote: async ({ solution_id, label }, sid) =>
2812
- post(`/deploy/solutions/${solution_id}/promote`, label ? { label } : {}, sid),
2906
+ ateam_verify_consistency: async ({ solution_id }, sid) =>
2907
+ get(`/deploy/solutions/${solution_id}/verify`, sid),
2908
+
2909
+ ateam_github_promote: async ({ solution_id, label, dry_run, skip_tag }, sid) =>
2910
+ post(`/deploy/solutions/${solution_id}/promote`, { label, dry_run, skip_tag }, sid),
2813
2911
 
2814
- ateam_github_rollback: async ({ solution_id, tag }, sid) =>
2815
- post(`/deploy/solutions/${solution_id}/rollback`, { tag }, sid),
2912
+ ateam_github_rollback: async ({ solution_id, target, tag }, sid) =>
2913
+ // Accept both `target` (new spec) and `tag` (legacy callers)
2914
+ post(`/deploy/solutions/${solution_id}/rollback`, { target: target || tag }, sid),
2816
2915
 
2817
2916
  ateam_github_list_versions: async ({ solution_id }, sid) =>
2818
2917
  get(`/deploy/solutions/${solution_id}/versions/dev`, sid),