@ateam-ai/mcp 0.3.2 → 0.3.3

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 +52 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ateam-ai/mcp",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
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
@@ -1079,15 +1079,24 @@ const handlers = {
1079
1079
  { name: "Enterprise Compliance Platform", description: "Approval flows, audit logs, policy enforcement" },
1080
1080
  ],
1081
1081
  developer_loop: {
1082
- _note: "This is the recommended build loop. 5 steps from definition to running skill with GitHub version control.",
1082
+ _note: "This is the recommended build loop. 6 steps from definition to running skill with GitHub version control.",
1083
1083
  steps: [
1084
1084
  { step: 1, action: "Learn", description: "Get the spec and study examples", tools: ["ateam_get_spec", "ateam_get_examples"] },
1085
1085
  { step: 2, action: "Build & Run", description: "Define your solution + skills + connector code, then validate, deploy, and health-check in one call. Include mcp_store with connector source code on the first deploy.", tools: ["ateam_build_and_run"] },
1086
- { step: 3, action: "Version", description: "Every deploy auto-pushes to GitHub. The repo (tenant--solution-id) is the source of truth for connector code.", tools: ["ateam_github_status", "ateam_github_log"] },
1087
- { step: 4, action: "Iterate", description: "Edit connector code via ateam_github_patch, then redeploy with ateam_build_and_run(github:true). For skill definition changes (intents, tools, policy), use ateam_patch.", tools: ["ateam_github_patch", "ateam_build_and_run", "ateam_patch"] },
1086
+ { step: 3, action: "Version", description: "Every deploy auto-pushes to the 'dev' branch on GitHub. The repo (tenant--solution-id) is the source of truth for connector code.", tools: ["ateam_github_status", "ateam_github_log"] },
1087
+ { step: 4, action: "Iterate", description: "Edit connector code via ateam_github_patch (commits to dev), then redeploy with ateam_build_and_run(github:true). For skill definition changes, use ateam_patch (also pushes to dev).", tools: ["ateam_github_patch", "ateam_build_and_run", "ateam_patch"] },
1088
1088
  { step: 5, action: "Test & Debug", description: "Test the decision pipeline or full execution, then diagnose with logs and metrics. For voice-enabled solutions, use ateam_test_voice to simulate phone conversations.", tools: ["ateam_test_pipeline", "ateam_test_skill", "ateam_test_voice", "ateam_get_execution_logs", "ateam_get_metrics"] },
1089
+ { step: 6, action: "Promote", description: "When stable, promote the dev branch to main (production). This creates a production tag and merges dev → main.", tools: ["ateam_github_promote"] },
1089
1090
  ],
1090
1091
  },
1092
+ branching: {
1093
+ _important: "ALL changes go to the 'dev' branch. The 'main' branch is production — only updated via explicit promote.",
1094
+ dev: "Staging branch. Every build_and_run, patch, and github_patch commits here automatically.",
1095
+ main: "Production branch. Updated ONLY via ateam_github_promote(). First deploy also pushes to main as baseline.",
1096
+ workflow: "Build → iterate on dev → test → promote to main when stable.",
1097
+ promote: "ateam_github_promote(solution_id) — merges latest dev tag to main, creates prod tag.",
1098
+ rollback: "ateam_github_rollback(solution_id) — reverts main to previous production tag.",
1099
+ },
1091
1100
  first_questions: [
1092
1101
  { id: "goal", question: "What do you want your Team to accomplish?", type: "text" },
1093
1102
  { id: "domain", question: "Which domain fits best?", type: "enum", options: ["ecommerce", "logistics", "enterprise_ops", "other"] },
@@ -1095,24 +1104,31 @@ const handlers = {
1095
1104
  { id: "security", question: "What environment constraints?", type: "enum", options: ["sandbox", "controlled", "regulated"] },
1096
1105
  ],
1097
1106
  github_tools: {
1098
- _note: "Version control for solutions. Every deploy auto-pushes to GitHub. The repo is the source of truth for connector code.",
1099
- tools: ["ateam_github_push", "ateam_github_pull", "ateam_github_status", "ateam_github_read", "ateam_github_patch", "ateam_github_log"],
1107
+ _note: "Version control for solutions. ALL operations target the 'dev' branch. Promote to 'main' (production) explicitly.",
1108
+ tools: ["ateam_github_push", "ateam_github_pull", "ateam_github_status", "ateam_github_read", "ateam_github_patch", "ateam_github_log", "ateam_github_promote", "ateam_github_rollback"],
1100
1109
  repo_structure: {
1101
1110
  "solution.json": "Full solution definition",
1102
1111
  "skills/{skill-id}/skill.json": "Individual skill definitions",
1103
1112
  "connectors/{connector-id}/server.js": "Connector MCP server code",
1104
1113
  "connectors/{connector-id}/package.json": "Connector dependencies",
1105
1114
  },
1115
+ branches: {
1116
+ dev: "All changes land here (auto-push on build/patch). This is the working branch.",
1117
+ main: "Production snapshot. Only updated via ateam_github_promote(). Safe rollback target.",
1118
+ },
1106
1119
  iteration_workflow: {
1107
- code_changes: "ateam_github_patch (edit connector files) → ateam_build_and_run(github:true) (redeploy from repo)",
1108
- definition_changes: "ateam_patch (edit skill/solution definitions directly in Builder)",
1109
- first_deploy: "Must include mcp_store — this creates the GitHub repo",
1120
+ code_changes: "ateam_github_patch (commits to dev) → ateam_build_and_run(github:true) (pulls from dev, redeploys)",
1121
+ definition_changes: "ateam_patch (updates + redeploys + auto-pushes to dev)",
1122
+ first_deploy: "Must include mcp_store — this creates the GitHub repo with both dev and main branches",
1123
+ promote: "ateam_github_promote(solution_id) — when solution is stable, merge dev → main",
1110
1124
  },
1111
1125
  when_to_use_what: {
1112
- ateam_github_patch: "Edit connector source code (server.js, utils, package.json, UI assets)",
1113
- ateam_patch: "Edit skill definitions (intents, tools, policy) or solution definitions (grants, handoffs, routing)",
1114
- "ateam_build_and_run(github:true)": "Redeploy solution pulling latest connector code from GitHub",
1126
+ ateam_github_patch: "Edit connector source code on dev branch (server.js, utils, package.json, UI assets)",
1127
+ ateam_patch: "Edit skill definitions (intents, tools, policy) auto-pushes to dev",
1128
+ "ateam_build_and_run(github:true)": "Redeploy solution pulling latest connector code from dev branch",
1115
1129
  "ateam_build_and_run(mcp_store)": "First deploy or when you want to pass connector code inline",
1130
+ ateam_github_promote: "Promote dev → main when stable (creates production tag)",
1131
+ ateam_github_rollback: "Revert main to previous production tag",
1116
1132
  },
1117
1133
  },
1118
1134
  advanced_tools: {
@@ -1157,12 +1173,15 @@ const handlers = {
1157
1173
  "Use ateam_github_patch + ateam_build_and_run(github:true) for connector code changes after first deploy",
1158
1174
  "Study the connector example (ateam_get_examples type='connector') before writing connector code",
1159
1175
  "Ask discovery questions if goal unclear",
1176
+ "ALL changes go to the dev branch — remind user to ateam_github_promote() when ready for production",
1177
+ "After every build/patch, tell the user: 'Deployed to Core ✅ | Pushed to dev branch | Promote to main: ateam_github_promote()'",
1160
1178
  ],
1161
1179
  never: [
1162
1180
  "Call validate + deploy + health separately when ateam_build_and_run does it in one step",
1163
1181
  "Call update + redeploy separately when ateam_patch does it in one step",
1164
1182
  "Dump raw spec unless requested",
1165
1183
  "Write connector code that starts a web server — connectors MUST use stdio transport",
1184
+ "Assume changes are on main — they are always on dev until explicitly promoted",
1166
1185
  ],
1167
1186
  },
1168
1187
  }),
@@ -1386,6 +1405,7 @@ const handlers = {
1386
1405
  return {
1387
1406
  ok: true,
1388
1407
  solution_id: solution.id,
1408
+ branch: 'dev',
1389
1409
  phases,
1390
1410
  deploy: {
1391
1411
  skills_deployed: deploy.import?.skills || [],
@@ -1397,6 +1417,8 @@ const handlers = {
1397
1417
  ...(test_result && { test_result }),
1398
1418
  ...(github_result && !github_result.error && !github_result.skipped && { github: github_result }),
1399
1419
  ...(validation.warnings?.length > 0 && { validation_warnings: validation.warnings }),
1420
+ _status: '✅ Deployed to Core + pushed to dev branch.',
1421
+ _next: 'To promote to production (main branch): ateam_github_promote(solution_id)',
1400
1422
  };
1401
1423
  },
1402
1424
 
@@ -1463,13 +1485,32 @@ const handlers = {
1463
1485
  }
1464
1486
  }
1465
1487
 
1488
+ // Phase 4: Auto-push to dev branch (non-blocking)
1489
+ let github_result;
1490
+ try {
1491
+ github_result = await post(
1492
+ `/deploy/solutions/${solution_id}/github/push`,
1493
+ { message: `Patch: ${target}${skill_id ? ` ${skill_id}` : ''} — ${Object.keys(updates || {}).join(', ')}` },
1494
+ sid,
1495
+ { timeoutMs: 60_000 },
1496
+ );
1497
+ phases.push({ phase: 'github', status: github_result.skipped ? 'skipped' : 'done' });
1498
+ } catch (err) {
1499
+ github_result = { error: err.message };
1500
+ phases.push({ phase: 'github', status: 'error', error: err.message });
1501
+ }
1502
+
1466
1503
  return {
1467
1504
  ok: true,
1468
1505
  solution_id,
1506
+ branch: 'dev',
1469
1507
  phases,
1470
1508
  patch: patchResult,
1471
1509
  redeploy: redeployResult,
1472
1510
  ...(test_result && { test_result }),
1511
+ ...(github_result && !github_result.error && !github_result.skipped && { github: github_result }),
1512
+ _status: '✅ Patched + redeployed + pushed to dev branch.',
1513
+ _next: 'To promote to production (main branch): ateam_github_promote(solution_id)',
1473
1514
  };
1474
1515
  },
1475
1516