@ateam-ai/mcp 0.4.30 → 0.4.31
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 +14 -3
package/package.json
CHANGED
package/src/tools.js
CHANGED
|
@@ -3160,6 +3160,7 @@ const handlers = {
|
|
|
3160
3160
|
const phases = [];
|
|
3161
3161
|
let isNewSkill = false;
|
|
3162
3162
|
let _connectorToolPush = null;
|
|
3163
|
+
let writeBranch = "dev"; // github/patch default; overwritten by the actual response branch
|
|
3163
3164
|
const _diff = { arrays_merged: [], arrays_replaced: [], scalars_changed: [], sections_replaced: [] };
|
|
3164
3165
|
|
|
3165
3166
|
// Two backing stores, chosen EXPLICITLY by `source` (never inferred):
|
|
@@ -3416,12 +3417,17 @@ const handlers = {
|
|
|
3416
3417
|
phases.push({ phase: "local_write", status: "done" });
|
|
3417
3418
|
}
|
|
3418
3419
|
} else {
|
|
3419
|
-
|
|
3420
|
+
// github/patch writes to `dev` by default (agents don't edit prod
|
|
3421
|
+
// directly). Capture the ACTUAL branch it committed to — do NOT assume
|
|
3422
|
+
// 'main'; mislabeling it strands the change off `main` until an explicit
|
|
3423
|
+
// ateam_github_promote (was: the result hardcoded branch:"main").
|
|
3424
|
+
const ghResp = await post(`/deploy/solutions/${solution_id}/github/patch`, {
|
|
3420
3425
|
path: filePath,
|
|
3421
3426
|
content: JSON.stringify(patched, null, 2),
|
|
3422
3427
|
message,
|
|
3423
3428
|
}, sid, { timeoutMs: 30_000 });
|
|
3424
|
-
|
|
3429
|
+
writeBranch = ghResp?.branch || writeBranch;
|
|
3430
|
+
phases.push({ phase: "github_write", status: "done", branch: writeBranch });
|
|
3425
3431
|
}
|
|
3426
3432
|
} catch (err) {
|
|
3427
3433
|
const store = isLocal ? "Builder store (local)" : "GitHub";
|
|
@@ -3520,7 +3526,12 @@ const handlers = {
|
|
|
3520
3526
|
ok: true,
|
|
3521
3527
|
solution_id,
|
|
3522
3528
|
source: isLocal ? "local" : "github",
|
|
3523
|
-
...(isLocal ? {} : {
|
|
3529
|
+
...(isLocal ? {} : {
|
|
3530
|
+
branch: writeBranch,
|
|
3531
|
+
// Be explicit: a github write lands on `dev`, not prod. The change is
|
|
3532
|
+
// NOT on `main` until an explicit ateam_github_promote(dev→main).
|
|
3533
|
+
...(writeBranch !== "main" && { _branch_note: `Committed to "${writeBranch}" (not main). Run ateam_github_promote(solution_id) to ship dev→main; otherwise a future build_and_run(main) won't include this.` }),
|
|
3534
|
+
}),
|
|
3524
3535
|
phases,
|
|
3525
3536
|
// The full patched definition can be 10s of KB and pushes the rest of the
|
|
3526
3537
|
// result (redeploy status, widget_health) past the ~50KB output ceiling,
|