@remixhq/mcp 0.1.2 → 0.1.5
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 +193 -54
- package/dist/cli.js.map +1 -1
- package/dist/index.js +193 -54
- package/dist/index.js.map +1 -1
- package/dist/server.js +193 -54
- package/dist/server.js.map +1 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -408,6 +408,14 @@ function makeErrorResult(envelope) {
|
|
|
408
408
|
// src/contracts/collab.ts
|
|
409
409
|
var genericRecordSchema = z2.record(z2.string(), z2.unknown());
|
|
410
410
|
var genericArraySchema = z2.array(genericRecordSchema);
|
|
411
|
+
var mergeRequestQueueSchema = z2.enum([
|
|
412
|
+
"reviewable",
|
|
413
|
+
"created_by_me",
|
|
414
|
+
"app_reviewable",
|
|
415
|
+
"app_outgoing",
|
|
416
|
+
"app_related_visible"
|
|
417
|
+
]);
|
|
418
|
+
var appScopedMergeRequestQueueSchema = z2.enum(["app_reviewable", "app_outgoing", "app_related_visible"]);
|
|
411
419
|
var statusInputSchema = {
|
|
412
420
|
...commonRequestFieldsSchema,
|
|
413
421
|
includeRemote: z2.boolean().optional()
|
|
@@ -455,10 +463,24 @@ var applyInputSchema = {
|
|
|
455
463
|
var requestMergeInputSchema = {
|
|
456
464
|
...commonRequestFieldsSchema
|
|
457
465
|
};
|
|
458
|
-
var
|
|
466
|
+
var reviewQueueInputSchema = {
|
|
459
467
|
requestId: z2.string().trim().min(1).optional(),
|
|
460
468
|
outputMode: z2.enum(["summary", "full"]).optional(),
|
|
461
|
-
status: z2.string().trim().min(1).optional()
|
|
469
|
+
status: z2.string().trim().min(1).optional(),
|
|
470
|
+
kind: z2.enum(["merge", "sync", "all"]).optional()
|
|
471
|
+
};
|
|
472
|
+
var myMergeRequestsInputSchema = {
|
|
473
|
+
requestId: z2.string().trim().min(1).optional(),
|
|
474
|
+
outputMode: z2.enum(["summary", "full"]).optional(),
|
|
475
|
+
status: z2.string().trim().min(1).optional(),
|
|
476
|
+
kind: z2.enum(["merge", "sync", "all"]).optional()
|
|
477
|
+
};
|
|
478
|
+
var appMergeRequestsInputSchema = {
|
|
479
|
+
...commonRequestFieldsSchema,
|
|
480
|
+
queue: appScopedMergeRequestQueueSchema,
|
|
481
|
+
appId: z2.string().trim().min(1).optional(),
|
|
482
|
+
status: z2.string().trim().min(1).optional(),
|
|
483
|
+
kind: z2.enum(["merge", "sync", "all"]).optional()
|
|
462
484
|
};
|
|
463
485
|
var viewMergeRequestInputSchema = {
|
|
464
486
|
requestId: z2.string().trim().min(1).optional(),
|
|
@@ -515,7 +537,9 @@ var addDataSchema = z2.object({
|
|
|
515
537
|
var recordTurnDataSchema = genericRecordSchema;
|
|
516
538
|
var syncDataSchema = genericRecordSchema;
|
|
517
539
|
var requestMergeDataSchema = genericRecordSchema;
|
|
518
|
-
var
|
|
540
|
+
var mergeRequestQueueDataSchema = z2.object({
|
|
541
|
+
queue: mergeRequestQueueSchema,
|
|
542
|
+
appId: z2.string().nullable(),
|
|
519
543
|
mergeRequests: z2.array(genericRecordSchema)
|
|
520
544
|
});
|
|
521
545
|
var viewMergeRequestDataSchema = genericRecordSchema;
|
|
@@ -532,7 +556,7 @@ var addSuccessSchema = makeSuccessSchema(addDataSchema);
|
|
|
532
556
|
var recordTurnSuccessSchema = makeSuccessSchema(recordTurnDataSchema);
|
|
533
557
|
var syncSuccessSchema = makeSuccessSchema(syncDataSchema);
|
|
534
558
|
var requestMergeSuccessSchema = makeSuccessSchema(requestMergeDataSchema);
|
|
535
|
-
var
|
|
559
|
+
var mergeRequestQueueSuccessSchema = makeSuccessSchema(mergeRequestQueueDataSchema);
|
|
536
560
|
var viewMergeRequestSuccessSchema = makeSuccessSchema(viewMergeRequestDataSchema);
|
|
537
561
|
var approveSuccessSchema = makeSuccessSchema(approveDataSchema);
|
|
538
562
|
var rejectSuccessSchema = makeSuccessSchema(rejectDataSchema);
|
|
@@ -545,7 +569,7 @@ import {
|
|
|
545
569
|
collabAdd as coreCollabAdd,
|
|
546
570
|
collabRecordTurn as coreCollabRecordTurn,
|
|
547
571
|
collabApprove as coreCollabApprove,
|
|
548
|
-
|
|
572
|
+
collabListMergeRequests as coreCollabListMergeRequests,
|
|
549
573
|
collabInit as coreCollabInit,
|
|
550
574
|
collabInvite as coreCollabInvite,
|
|
551
575
|
collabReconcile as coreCollabReconcile,
|
|
@@ -565,13 +589,6 @@ function unwrapResponseObject(resp, label) {
|
|
|
565
589
|
}
|
|
566
590
|
return obj;
|
|
567
591
|
}
|
|
568
|
-
function normalizeMergeRequestsPayload(payload) {
|
|
569
|
-
if (Array.isArray(payload)) return payload;
|
|
570
|
-
if (!payload || typeof payload !== "object") return [];
|
|
571
|
-
return Object.values(payload).flatMap(
|
|
572
|
-
(value) => Array.isArray(value) ? value : []
|
|
573
|
-
);
|
|
574
|
-
}
|
|
575
592
|
function getRiskLevel(status) {
|
|
576
593
|
if (status.recommendedAction === "reconcile") return "high";
|
|
577
594
|
if (status.recommendedAction === "sync" || status.remote.incomingOpenMergeRequestCount) return "medium";
|
|
@@ -581,18 +598,18 @@ function getRiskLevel(status) {
|
|
|
581
598
|
function getRecommendedNextActions(status) {
|
|
582
599
|
if (status.repo.branchMismatch) {
|
|
583
600
|
return [
|
|
584
|
-
`Switch to the preferred branch (${status.binding.preferredBranch ?? "configured in the binding"}) before
|
|
601
|
+
`Switch to the preferred branch (${status.binding.preferredBranch ?? "configured in the binding"}) before using Remix mutation tools, or rerun with allowBranchMismatch=true if this deviation is intentional.`
|
|
585
602
|
];
|
|
586
603
|
}
|
|
587
604
|
switch (status.recommendedAction) {
|
|
588
605
|
case "init":
|
|
589
|
-
return ["Run remix_collab_init to bind the repository to Remix."];
|
|
606
|
+
return ["Run remix_collab_init to bind the repository to Remix before using any Remix collaboration mutation flow."];
|
|
590
607
|
case "sync":
|
|
591
|
-
return ["Run remix_collab_sync_preview, then remix_collab_sync_apply if the preview is acceptable."];
|
|
608
|
+
return ["Run remix_collab_sync_preview, then remix_collab_sync_apply if the preview is acceptable. Use this instead of raw git pull or rebase for bound-repo alignment."];
|
|
592
609
|
case "reconcile":
|
|
593
|
-
return ["Run remix_collab_reconcile_preview before attempting remix_collab_reconcile_apply."];
|
|
594
|
-
case "
|
|
595
|
-
return ["Run
|
|
610
|
+
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."];
|
|
611
|
+
case "review_queue":
|
|
612
|
+
return ["Run remix_collab_review_queue to inspect reviewable merge requests instead of using local git merge flows."];
|
|
596
613
|
default:
|
|
597
614
|
return [];
|
|
598
615
|
}
|
|
@@ -650,7 +667,7 @@ async function initCollab(params) {
|
|
|
650
667
|
return {
|
|
651
668
|
data: result,
|
|
652
669
|
warnings: collectResultWarnings(result),
|
|
653
|
-
recommendedNextActions: ["Run remix_collab_status to inspect sync and merge readiness."],
|
|
670
|
+
recommendedNextActions: ["Run remix_collab_status to inspect sync, reconcile, and merge-request readiness before mutating bound-repo state."],
|
|
654
671
|
logContext: {
|
|
655
672
|
repoRoot: result.repoRoot,
|
|
656
673
|
appId: result.appId
|
|
@@ -680,7 +697,7 @@ async function remixCollab(params) {
|
|
|
680
697
|
return {
|
|
681
698
|
data: result,
|
|
682
699
|
warnings: collectResultWarnings(result),
|
|
683
|
-
recommendedNextActions: ["Run remix_collab_status inside the remix checkout
|
|
700
|
+
recommendedNextActions: ["Run remix_collab_status inside the remix checkout before using Remix mutation tools there."],
|
|
684
701
|
logContext: {
|
|
685
702
|
repoRoot: result.repoRoot,
|
|
686
703
|
appId: result.appId
|
|
@@ -765,7 +782,7 @@ async function syncCollab(params) {
|
|
|
765
782
|
return {
|
|
766
783
|
data: result,
|
|
767
784
|
warnings: collectResultWarnings(result),
|
|
768
|
-
recommendedNextActions: params.dryRun ? ["Run remix_collab_sync_apply with confirm=true to apply this fast-forward update."] : [],
|
|
785
|
+
recommendedNextActions: params.dryRun ? ["Run remix_collab_sync_apply with confirm=true to apply this fast-forward update instead of using raw git pull or rebase."] : [],
|
|
769
786
|
logContext: {
|
|
770
787
|
repoRoot: result.repoRoot
|
|
771
788
|
}
|
|
@@ -780,25 +797,73 @@ async function requestMerge(params) {
|
|
|
780
797
|
return {
|
|
781
798
|
data: result,
|
|
782
799
|
warnings: [],
|
|
783
|
-
recommendedNextActions: result.id ? [`Run remix_collab_view_merge_request with mrId=${String(result.id)} to inspect the request.`] : [],
|
|
800
|
+
recommendedNextActions: result.id ? [`Run remix_collab_view_merge_request with mrId=${String(result.id)} to inspect the request before deciding whether to approve or reject it.`] : [],
|
|
784
801
|
logContext: {
|
|
785
802
|
mrId: typeof result.id === "string" ? result.id : null
|
|
786
803
|
}
|
|
787
804
|
};
|
|
788
805
|
}
|
|
789
|
-
async function
|
|
806
|
+
async function reviewQueue(params) {
|
|
790
807
|
const api = await createCollabApiClient();
|
|
791
|
-
const result = await
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
808
|
+
const result = await coreCollabListMergeRequests({
|
|
809
|
+
api,
|
|
810
|
+
queue: "reviewable",
|
|
811
|
+
status: params.status ?? "open",
|
|
812
|
+
kind: params.kind ?? "merge"
|
|
813
|
+
});
|
|
814
|
+
return {
|
|
815
|
+
data: {
|
|
816
|
+
queue: result.queue,
|
|
817
|
+
appId: result.appId,
|
|
818
|
+
mergeRequests: result.mergeRequests
|
|
819
|
+
},
|
|
820
|
+
warnings: [],
|
|
821
|
+
recommendedNextActions: [],
|
|
822
|
+
logContext: {}
|
|
823
|
+
};
|
|
824
|
+
}
|
|
825
|
+
async function myMergeRequests(params) {
|
|
826
|
+
const api = await createCollabApiClient();
|
|
827
|
+
const result = await coreCollabListMergeRequests({
|
|
828
|
+
api,
|
|
829
|
+
queue: "created_by_me",
|
|
830
|
+
status: params.status ?? "open",
|
|
831
|
+
kind: params.kind ?? "merge"
|
|
832
|
+
});
|
|
795
833
|
return {
|
|
796
|
-
data: {
|
|
834
|
+
data: {
|
|
835
|
+
queue: result.queue,
|
|
836
|
+
appId: result.appId,
|
|
837
|
+
mergeRequests: result.mergeRequests
|
|
838
|
+
},
|
|
797
839
|
warnings: [],
|
|
798
840
|
recommendedNextActions: [],
|
|
799
841
|
logContext: {}
|
|
800
842
|
};
|
|
801
843
|
}
|
|
844
|
+
async function listAppMergeRequests(params) {
|
|
845
|
+
const api = await createCollabApiClient();
|
|
846
|
+
const result = await coreCollabListMergeRequests({
|
|
847
|
+
api,
|
|
848
|
+
cwd: params.cwd,
|
|
849
|
+
appId: params.appId,
|
|
850
|
+
queue: params.queue,
|
|
851
|
+
status: params.status ?? "open",
|
|
852
|
+
kind: params.kind ?? "merge"
|
|
853
|
+
});
|
|
854
|
+
return {
|
|
855
|
+
data: {
|
|
856
|
+
queue: result.queue,
|
|
857
|
+
appId: result.appId,
|
|
858
|
+
mergeRequests: result.mergeRequests
|
|
859
|
+
},
|
|
860
|
+
warnings: [],
|
|
861
|
+
recommendedNextActions: [],
|
|
862
|
+
logContext: {
|
|
863
|
+
appId: result.appId
|
|
864
|
+
}
|
|
865
|
+
};
|
|
866
|
+
}
|
|
802
867
|
async function viewMergeRequest(params) {
|
|
803
868
|
const api = await createCollabApiClient();
|
|
804
869
|
const review = await coreCollabView({
|
|
@@ -887,7 +952,7 @@ async function reconcile(params) {
|
|
|
887
952
|
return {
|
|
888
953
|
data: result,
|
|
889
954
|
warnings: collectWarnings(result.warnings),
|
|
890
|
-
recommendedNextActions: params.dryRun ? ["Run remix_collab_reconcile_apply with confirm=true only if the preview is acceptable."] : [],
|
|
955
|
+
recommendedNextActions: params.dryRun ? ["Run remix_collab_reconcile_apply with confirm=true only if the preview is acceptable. Do not replace this with raw git history-rewrite commands."] : [],
|
|
891
956
|
risks: params.dryRun ? ["Reconcile apply rewrites local history and creates a backup branch."] : [],
|
|
892
957
|
logContext: {
|
|
893
958
|
repoRoot: result.repoRoot ?? null
|
|
@@ -942,7 +1007,7 @@ function buildSuccessEnvelope(tool, requestId, result) {
|
|
|
942
1007
|
};
|
|
943
1008
|
}
|
|
944
1009
|
function deriveErrorRisks(tool, normalized) {
|
|
945
|
-
if (tool === "remix_collab_add" && normalized.message === "Change step succeeded remotely, but automatic local sync failed.") {
|
|
1010
|
+
if ((tool === "remix_collab_add" || tool === "remix_collab_add_change_step") && normalized.message === "Change step succeeded remotely, but automatic local sync failed.") {
|
|
946
1011
|
return ["The change step succeeded remotely, but the local repository may need manual recovery or a follow-up sync."];
|
|
947
1012
|
}
|
|
948
1013
|
if (normalized.code === "DESTRUCTIVE_OPERATION_BLOCKED") {
|
|
@@ -1022,7 +1087,7 @@ function registerTool(server, context, params) {
|
|
|
1022
1087
|
function registerCollabTools(server, context) {
|
|
1023
1088
|
registerTool(server, context, {
|
|
1024
1089
|
name: "remix_collab_status",
|
|
1025
|
-
description: "
|
|
1090
|
+
description: "Required first read for a bound repository: summarize binding, worktree state, merge request counts, and sync or reconcile readiness before Remix mutations.",
|
|
1026
1091
|
access: "read",
|
|
1027
1092
|
inputSchema: statusInputSchema,
|
|
1028
1093
|
outputSchema: statusSuccessSchema,
|
|
@@ -1081,7 +1146,33 @@ function registerCollabTools(server, context) {
|
|
|
1081
1146
|
});
|
|
1082
1147
|
registerTool(server, context, {
|
|
1083
1148
|
name: "remix_collab_add",
|
|
1084
|
-
description: "
|
|
1149
|
+
description: "Authoritative way to record completed code changes for the current bound repository, using the live worktree diff by default instead of raw git commit or push.",
|
|
1150
|
+
access: "local_write",
|
|
1151
|
+
inputSchema: addInputSchema,
|
|
1152
|
+
outputSchema: addSuccessSchema,
|
|
1153
|
+
run: async (args) => {
|
|
1154
|
+
const input = z3.object(addInputSchema).parse(args);
|
|
1155
|
+
const cwd = resolvePolicyCwd(context.policy, input.cwd);
|
|
1156
|
+
const diffSource = input.diffSource ?? "worktree";
|
|
1157
|
+
if (diffSource === "external") {
|
|
1158
|
+
const externalDiff = input.externalDiff ?? "";
|
|
1159
|
+
assertDiffWithinLimit(context.policy, externalDiff);
|
|
1160
|
+
}
|
|
1161
|
+
return addCollabStep({
|
|
1162
|
+
cwd,
|
|
1163
|
+
prompt: input.prompt,
|
|
1164
|
+
assistantResponse: input.assistantResponse,
|
|
1165
|
+
diffSource,
|
|
1166
|
+
externalDiff: input.externalDiff,
|
|
1167
|
+
allowBranchMismatch: input.allowBranchMismatch ?? false,
|
|
1168
|
+
idempotencyKey: input.idempotencyKey,
|
|
1169
|
+
agent: context.agentMetadata
|
|
1170
|
+
});
|
|
1171
|
+
}
|
|
1172
|
+
});
|
|
1173
|
+
registerTool(server, context, {
|
|
1174
|
+
name: "remix_collab_add_change_step",
|
|
1175
|
+
description: "Alias of remix_collab_add with a more explicit name: record a code-diff change step for the current bound repository.",
|
|
1085
1176
|
access: "local_write",
|
|
1086
1177
|
inputSchema: addInputSchema,
|
|
1087
1178
|
outputSchema: addSuccessSchema,
|
|
@@ -1107,7 +1198,26 @@ function registerCollabTools(server, context) {
|
|
|
1107
1198
|
});
|
|
1108
1199
|
registerTool(server, context, {
|
|
1109
1200
|
name: "remix_collab_record_turn",
|
|
1110
|
-
description: "Record one no-diff collaboration turn for the current bound repository after a completed assistant response.",
|
|
1201
|
+
description: "Record one no-diff collaboration turn for the current bound repository after a completed assistant response. This is for prompt/response history only and will fail if the worktree has code changes.",
|
|
1202
|
+
access: "remote_write",
|
|
1203
|
+
inputSchema: recordTurnInputSchema,
|
|
1204
|
+
outputSchema: recordTurnSuccessSchema,
|
|
1205
|
+
run: async (args) => {
|
|
1206
|
+
const input = z3.object(recordTurnInputSchema).parse(args);
|
|
1207
|
+
const cwd = resolvePolicyCwd(context.policy, input.cwd);
|
|
1208
|
+
return recordCollabTurn({
|
|
1209
|
+
cwd,
|
|
1210
|
+
prompt: input.prompt,
|
|
1211
|
+
assistantResponse: input.assistantResponse,
|
|
1212
|
+
allowBranchMismatch: input.allowBranchMismatch ?? false,
|
|
1213
|
+
idempotencyKey: input.idempotencyKey,
|
|
1214
|
+
agent: context.agentMetadata
|
|
1215
|
+
});
|
|
1216
|
+
}
|
|
1217
|
+
});
|
|
1218
|
+
registerTool(server, context, {
|
|
1219
|
+
name: "remix_collab_record_no_diff_turn",
|
|
1220
|
+
description: "Alias of remix_collab_record_turn with a more explicit name: record a prompt/response turn only when the worktree has no code diff.",
|
|
1111
1221
|
access: "remote_write",
|
|
1112
1222
|
inputSchema: recordTurnInputSchema,
|
|
1113
1223
|
outputSchema: recordTurnSuccessSchema,
|
|
@@ -1126,7 +1236,7 @@ function registerCollabTools(server, context) {
|
|
|
1126
1236
|
});
|
|
1127
1237
|
registerTool(server, context, {
|
|
1128
1238
|
name: "remix_collab_sync_preview",
|
|
1129
|
-
description: "Preview whether the current bound repository can be fast-forward synced to the Remix app state.",
|
|
1239
|
+
description: "Preview whether the current bound repository can be fast-forward synced to the Remix app state. Use this instead of raw git pull or rebase for bound-repo alignment.",
|
|
1130
1240
|
access: "read",
|
|
1131
1241
|
inputSchema: previewInputSchema,
|
|
1132
1242
|
outputSchema: syncSuccessSchema,
|
|
@@ -1138,7 +1248,7 @@ function registerCollabTools(server, context) {
|
|
|
1138
1248
|
});
|
|
1139
1249
|
registerTool(server, context, {
|
|
1140
1250
|
name: "remix_collab_sync_apply",
|
|
1141
|
-
description: "Fast-forward sync the current bound repository to the Remix app state.",
|
|
1251
|
+
description: "Fast-forward sync the current bound repository to the Remix app state. This is the Remix-native replacement for raw git pull or rebase in a bound repo.",
|
|
1142
1252
|
access: "local_write",
|
|
1143
1253
|
inputSchema: applyInputSchema,
|
|
1144
1254
|
outputSchema: syncSuccessSchema,
|
|
@@ -1151,7 +1261,7 @@ function registerCollabTools(server, context) {
|
|
|
1151
1261
|
});
|
|
1152
1262
|
registerTool(server, context, {
|
|
1153
1263
|
name: "remix_collab_request_merge",
|
|
1154
|
-
description: "Open a merge request from the current bound repository to its upstream app.",
|
|
1264
|
+
description: "Open a Remix merge request from the current bound repository to its upstream app instead of merging locally with raw git.",
|
|
1155
1265
|
access: "remote_write",
|
|
1156
1266
|
inputSchema: requestMergeInputSchema,
|
|
1157
1267
|
outputSchema: requestMergeSuccessSchema,
|
|
@@ -1162,19 +1272,48 @@ function registerCollabTools(server, context) {
|
|
|
1162
1272
|
}
|
|
1163
1273
|
});
|
|
1164
1274
|
registerTool(server, context, {
|
|
1165
|
-
name: "
|
|
1166
|
-
description: "List merge requests
|
|
1275
|
+
name: "remix_collab_review_queue",
|
|
1276
|
+
description: "List reviewable merge requests: open requests the current user can actively approve or reject on target apps they administer or maintain. Optional `status` filters the results; optional `kind` defaults to `merge`.",
|
|
1167
1277
|
access: "read",
|
|
1168
|
-
inputSchema:
|
|
1169
|
-
outputSchema:
|
|
1278
|
+
inputSchema: reviewQueueInputSchema,
|
|
1279
|
+
outputSchema: mergeRequestQueueSuccessSchema,
|
|
1170
1280
|
run: async (args) => {
|
|
1171
|
-
const input = z3.object(
|
|
1172
|
-
return
|
|
1281
|
+
const input = z3.object(reviewQueueInputSchema).parse(args);
|
|
1282
|
+
return reviewQueue({ status: input.status, kind: input.kind });
|
|
1283
|
+
}
|
|
1284
|
+
});
|
|
1285
|
+
registerTool(server, context, {
|
|
1286
|
+
name: "remix_collab_my_merge_requests",
|
|
1287
|
+
description: "List merge requests created by the current user across all apps visible to that user, not just the current bound checkout. This still works even when the user is not a reviewer on the target app. Optional `status` filters the results; optional `kind` defaults to `merge`.",
|
|
1288
|
+
access: "read",
|
|
1289
|
+
inputSchema: myMergeRequestsInputSchema,
|
|
1290
|
+
outputSchema: mergeRequestQueueSuccessSchema,
|
|
1291
|
+
run: async (args) => {
|
|
1292
|
+
const input = z3.object(myMergeRequestsInputSchema).parse(args);
|
|
1293
|
+
return myMergeRequests({ status: input.status, kind: input.kind });
|
|
1294
|
+
}
|
|
1295
|
+
});
|
|
1296
|
+
registerTool(server, context, {
|
|
1297
|
+
name: "remix_collab_list_app_merge_requests",
|
|
1298
|
+
description: "List app-scoped merge requests for the current bound checkout or an explicit `appId`. Required `queue` must be one of: `app_reviewable` (incoming requests this app can review), `app_outgoing` (requests created from this app), or `app_related_visible` (all open visible requests where this app is either source or target). Optional `status` filters the results; optional `kind` defaults to `merge`.",
|
|
1299
|
+
access: "read",
|
|
1300
|
+
inputSchema: appMergeRequestsInputSchema,
|
|
1301
|
+
outputSchema: mergeRequestQueueSuccessSchema,
|
|
1302
|
+
run: async (args) => {
|
|
1303
|
+
const input = z3.object(appMergeRequestsInputSchema).parse(args);
|
|
1304
|
+
const cwd = input.cwd ? resolvePolicyCwd(context.policy, input.cwd) : void 0;
|
|
1305
|
+
return listAppMergeRequests({
|
|
1306
|
+
cwd,
|
|
1307
|
+
appId: input.appId,
|
|
1308
|
+
queue: input.queue,
|
|
1309
|
+
status: input.status,
|
|
1310
|
+
kind: input.kind
|
|
1311
|
+
});
|
|
1173
1312
|
}
|
|
1174
1313
|
});
|
|
1175
1314
|
registerTool(server, context, {
|
|
1176
1315
|
name: "remix_collab_view_merge_request",
|
|
1177
|
-
description: "View merge request metadata, prompts, change steps, and optionally a bounded unified diff.",
|
|
1316
|
+
description: "View Remix merge request metadata, prompts, change steps, and optionally a bounded unified diff before approval or rejection.",
|
|
1178
1317
|
access: "read",
|
|
1179
1318
|
inputSchema: viewMergeRequestInputSchema,
|
|
1180
1319
|
outputSchema: viewMergeRequestSuccessSchema,
|
|
@@ -1189,7 +1328,7 @@ function registerCollabTools(server, context) {
|
|
|
1189
1328
|
});
|
|
1190
1329
|
registerTool(server, context, {
|
|
1191
1330
|
name: "remix_collab_approve_remote",
|
|
1192
|
-
description: "Approve a merge request remotely and wait for terminal completion without mutating the local repository.",
|
|
1331
|
+
description: "Approve a merge request remotely and wait for terminal completion without mutating the local repository, preserving Remix as the merge authority.",
|
|
1193
1332
|
access: "remote_write",
|
|
1194
1333
|
inputSchema: approveInputSchema,
|
|
1195
1334
|
outputSchema: approveSuccessSchema,
|
|
@@ -1205,7 +1344,7 @@ function registerCollabTools(server, context) {
|
|
|
1205
1344
|
});
|
|
1206
1345
|
registerTool(server, context, {
|
|
1207
1346
|
name: "remix_collab_approve_and_sync_target",
|
|
1208
|
-
description: "Approve a merge request, wait for completion, and sync the target repository locally.",
|
|
1347
|
+
description: "Approve a merge request, wait for completion, and sync the target repository locally through Remix rather than a local git merge flow.",
|
|
1209
1348
|
access: "local_write",
|
|
1210
1349
|
inputSchema: approveInputSchema,
|
|
1211
1350
|
outputSchema: approveSuccessSchema,
|
|
@@ -1235,7 +1374,7 @@ function registerCollabTools(server, context) {
|
|
|
1235
1374
|
});
|
|
1236
1375
|
registerTool(server, context, {
|
|
1237
1376
|
name: "remix_collab_sync_upstream",
|
|
1238
|
-
description: "Sync upstream changes into the current remix and update the local checkout.",
|
|
1377
|
+
description: "Sync upstream changes into the current remix and update the local checkout through Remix-native lineage management rather than raw git pull or merge.",
|
|
1239
1378
|
access: "local_write",
|
|
1240
1379
|
inputSchema: applyInputSchema,
|
|
1241
1380
|
outputSchema: syncUpstreamSuccessSchema,
|
|
@@ -1248,7 +1387,7 @@ function registerCollabTools(server, context) {
|
|
|
1248
1387
|
});
|
|
1249
1388
|
registerTool(server, context, {
|
|
1250
1389
|
name: "remix_collab_reconcile_preview",
|
|
1251
|
-
description: "Preview reconcile readiness when the local repository cannot be fast-forward synced.",
|
|
1390
|
+
description: "Preview reconcile readiness when the local repository cannot be fast-forward synced. Use this before any explicit Remix history-repair workflow.",
|
|
1252
1391
|
access: "read",
|
|
1253
1392
|
inputSchema: previewInputSchema,
|
|
1254
1393
|
outputSchema: reconcileSuccessSchema,
|
|
@@ -1260,7 +1399,7 @@ function registerCollabTools(server, context) {
|
|
|
1260
1399
|
});
|
|
1261
1400
|
registerTool(server, context, {
|
|
1262
1401
|
name: "remix_collab_reconcile_apply",
|
|
1263
|
-
description: "Reconcile divergent local history against the bound Remix app and update the local checkout.",
|
|
1402
|
+
description: "Reconcile divergent local history against the bound Remix app and update the local checkout. This is the explicit Remix recovery path for divergent history.",
|
|
1264
1403
|
access: "local_write",
|
|
1265
1404
|
inputSchema: applyInputSchema,
|
|
1266
1405
|
outputSchema: reconcileSuccessSchema,
|
|
@@ -1387,7 +1526,7 @@ function buildSearchNextActions(result) {
|
|
|
1387
1526
|
];
|
|
1388
1527
|
}
|
|
1389
1528
|
const actions = [
|
|
1390
|
-
"Review the top matched memory items before
|
|
1529
|
+
"Review the top matched memory items before reaching for raw git so the relevant Remix reasoning context stays in view."
|
|
1391
1530
|
];
|
|
1392
1531
|
const changeStepId = getFirstChangeStepId(result.items);
|
|
1393
1532
|
if (changeStepId) {
|
|
@@ -1422,7 +1561,7 @@ function buildTimelineNextActions(result) {
|
|
|
1422
1561
|
}
|
|
1423
1562
|
function buildChangeStepDiffNextActions(changeStepId) {
|
|
1424
1563
|
return [
|
|
1425
|
-
`Inspect the stored diff for \`changeStepId=${changeStepId}\`, then use raw git only if you still need exact repository-level commit
|
|
1564
|
+
`Inspect the stored diff for \`changeStepId=${changeStepId}\`, then use raw git only if you still need exact repository-level commit, blame, ancestry, or raw patch details.`
|
|
1426
1565
|
];
|
|
1427
1566
|
}
|
|
1428
1567
|
function unwrapResponseObject2(resp, label) {
|
|
@@ -1616,7 +1755,7 @@ function registerTool2(server, context, params) {
|
|
|
1616
1755
|
function registerMemoryTools(server, context) {
|
|
1617
1756
|
registerTool2(server, context, {
|
|
1618
1757
|
name: "remix_collab_memory_summary",
|
|
1619
|
-
description: "First read for a bound app's current collaboration state, recent reasoning context, and merge or reconcile history before deeper inspection.",
|
|
1758
|
+
description: "First read for a bound app's current collaboration state, recent reasoning context, and merge or reconcile history before deeper inspection or any raw git history lookup.",
|
|
1620
1759
|
access: "read",
|
|
1621
1760
|
inputSchema: memorySummaryInputSchema,
|
|
1622
1761
|
outputSchema: memorySummarySuccessSchema,
|
|
@@ -1631,7 +1770,7 @@ function registerMemoryTools(server, context) {
|
|
|
1631
1770
|
});
|
|
1632
1771
|
registerTool2(server, context, {
|
|
1633
1772
|
name: "remix_collab_memory_search",
|
|
1634
|
-
description: "Default tool for why/history/failed-attempt/user-intent questions. Search prompts, diffs, merge activity, reconciles, and other historical context before using raw git
|
|
1773
|
+
description: "Default tool for why/history/failed-attempt/user-intent questions. Search prompts, diffs, merge activity, reconciles, and other historical context before using raw git for exact repository facts.",
|
|
1635
1774
|
access: "read",
|
|
1636
1775
|
inputSchema: memorySearchInputSchema,
|
|
1637
1776
|
outputSchema: memorySearchSuccessSchema,
|
|
@@ -1652,7 +1791,7 @@ function registerMemoryTools(server, context) {
|
|
|
1652
1791
|
});
|
|
1653
1792
|
registerTool2(server, context, {
|
|
1654
1793
|
name: "remix_collab_memory_timeline",
|
|
1655
|
-
description: "Chronological view of collaboration memory for understanding what happened and in what order, with optional filters for bounded historical inspection.",
|
|
1794
|
+
description: "Chronological view of collaboration memory for understanding what happened and in what order, with optional filters for bounded historical inspection before any exact-facts raw git follow-up.",
|
|
1656
1795
|
access: "read",
|
|
1657
1796
|
inputSchema: memoryTimelineInputSchema,
|
|
1658
1797
|
outputSchema: memoryTimelineSuccessSchema,
|
|
@@ -1672,7 +1811,7 @@ function registerMemoryTools(server, context) {
|
|
|
1672
1811
|
});
|
|
1673
1812
|
registerTool2(server, context, {
|
|
1674
1813
|
name: "remix_collab_memory_change_step_diff",
|
|
1675
|
-
description: "Second-hop expansion tool that fetches the full stored diff for a specific change step after memory search, timeline, or review work has identified the relevant `changeStepId
|
|
1814
|
+
description: "Second-hop expansion tool that fetches the full stored diff for a specific change step after memory search, timeline, or review work has identified the relevant `changeStepId`, keeping historical inspection inside Remix before raw git fallback.",
|
|
1676
1815
|
access: "read",
|
|
1677
1816
|
inputSchema: changeStepDiffInputSchema,
|
|
1678
1817
|
outputSchema: changeStepDiffSuccessSchema,
|