@remixhq/mcp 0.1.10 → 0.1.12
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/dist/cli.js +19 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.js +19 -3
- package/dist/index.js.map +1 -1
- package/dist/server.js +19 -3
- package/dist/server.js.map +1 -1
- package/package.json +2 -2
package/dist/server.js
CHANGED
|
@@ -74,6 +74,7 @@ var ERROR_CODES = {
|
|
|
74
74
|
DIRTY_WORKTREE: "DIRTY_WORKTREE",
|
|
75
75
|
DETACHED_HEAD: "DETACHED_HEAD",
|
|
76
76
|
PREFERRED_BRANCH_MISMATCH: "PREFERRED_BRANCH_MISMATCH",
|
|
77
|
+
FAMILY_SELECTION_AMBIGUOUS: "FAMILY_SELECTION_AMBIGUOUS",
|
|
77
78
|
MISSING_HEAD: "MISSING_HEAD",
|
|
78
79
|
REPO_LOCK_HELD: "REPO_LOCK_HELD",
|
|
79
80
|
REPO_LOCK_TIMEOUT: "REPO_LOCK_TIMEOUT",
|
|
@@ -202,7 +203,7 @@ function normalizeByMessage(err) {
|
|
|
202
203
|
category: "local_state"
|
|
203
204
|
});
|
|
204
205
|
}
|
|
205
|
-
if (code === ERROR_CODES.PREFERRED_BRANCH_MISMATCH || message.includes("preferred branch")) {
|
|
206
|
+
if (code === ERROR_CODES.PREFERRED_BRANCH_MISMATCH || message.includes("preferred branch") || message.includes("bound branch")) {
|
|
206
207
|
return makeNormalized({
|
|
207
208
|
code: ERROR_CODES.PREFERRED_BRANCH_MISMATCH,
|
|
208
209
|
message,
|
|
@@ -210,6 +211,14 @@ function normalizeByMessage(err) {
|
|
|
210
211
|
category: "local_state"
|
|
211
212
|
});
|
|
212
213
|
}
|
|
214
|
+
if (message.includes("Multiple canonical Remix families") || message.includes("family selection is ambiguous")) {
|
|
215
|
+
return makeNormalized({
|
|
216
|
+
code: ERROR_CODES.FAMILY_SELECTION_AMBIGUOUS,
|
|
217
|
+
message,
|
|
218
|
+
hint,
|
|
219
|
+
category: "local_state"
|
|
220
|
+
});
|
|
221
|
+
}
|
|
213
222
|
if (message.includes("Failed to resolve local HEAD")) {
|
|
214
223
|
return makeNormalized({
|
|
215
224
|
code: ERROR_CODES.MISSING_HEAD,
|
|
@@ -621,7 +630,9 @@ var initDataSchema = z2.object({
|
|
|
621
630
|
dashboardUrl: z2.string().url(),
|
|
622
631
|
upstreamAppId: z2.string(),
|
|
623
632
|
bindingPath: z2.string(),
|
|
624
|
-
repoRoot: z2.string()
|
|
633
|
+
repoRoot: z2.string(),
|
|
634
|
+
bindingMode: z2.enum(["legacy", "lane", "explicit_root"]).optional(),
|
|
635
|
+
createdCanonicalFamily: z2.boolean().optional()
|
|
625
636
|
});
|
|
626
637
|
var listDataSchema = z2.object({
|
|
627
638
|
apps: genericArraySchema,
|
|
@@ -773,6 +784,7 @@ import {
|
|
|
773
784
|
import { findGitRoot, getHeadCommitHash, listUntrackedFiles } from "@remixhq/core/repo";
|
|
774
785
|
function getRiskLevel(status) {
|
|
775
786
|
if (status.recommendedAction === "reconcile") return "high";
|
|
787
|
+
if (status.recommendedAction === "choose_family") return "medium";
|
|
776
788
|
if (status.recommendedAction === "sync" || status.remote.incomingOpenMergeRequestCount) return "medium";
|
|
777
789
|
if (status.repo.branchMismatch || !status.repo.isGitRepo || !status.binding.isBound || !status.repo.worktree.isClean) return "medium";
|
|
778
790
|
return "low";
|
|
@@ -780,7 +792,7 @@ function getRiskLevel(status) {
|
|
|
780
792
|
function getRecommendedNextActions(status) {
|
|
781
793
|
if (status.repo.branchMismatch) {
|
|
782
794
|
return [
|
|
783
|
-
`Switch to the
|
|
795
|
+
`Switch to the bound branch (${status.binding.branchName ?? "configured in the binding"}) before using Remix mutation tools, or rerun with allowBranchMismatch=true if this deviation is intentional.`
|
|
784
796
|
];
|
|
785
797
|
}
|
|
786
798
|
switch (status.recommendedAction) {
|
|
@@ -792,6 +804,10 @@ function getRecommendedNextActions(status) {
|
|
|
792
804
|
return ["Run remix_collab_reconcile_preview before attempting remix_collab_reconcile_apply. Reconcile is the explicit Remix recovery path when fast-forward sync is no longer possible."];
|
|
793
805
|
case "review_queue":
|
|
794
806
|
return ["Run remix_collab_review_queue to inspect reviewable merge requests instead of using local git merge flows."];
|
|
807
|
+
case "choose_family":
|
|
808
|
+
return [
|
|
809
|
+
"This checkout is ambiguous across multiple canonical Remix families. Continue from a checkout already bound to the intended family, or run remix_collab_init with forceNew=true to create and bind a new canonical family."
|
|
810
|
+
];
|
|
795
811
|
default:
|
|
796
812
|
return [];
|
|
797
813
|
}
|