@azure-devops/mcp 2.9.0-nightly.20260811 → 2.9.0-nightly.20260813
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/index.js +1 -1
- package/dist/tools/repositories.js +18 -2
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -93,7 +93,7 @@ async function main() {
|
|
|
93
93
|
server.server.oninitialized = () => {
|
|
94
94
|
userAgentComposer.appendMcpClientInfo(server.server.getClientVersion());
|
|
95
95
|
};
|
|
96
|
-
const tenantId = (await getOrgTenant(orgName))
|
|
96
|
+
const tenantId = argv.tenant ?? (await getOrgTenant(orgName));
|
|
97
97
|
const authenticator = createAuthenticator(argv.authentication, tenantId);
|
|
98
98
|
if (argv.authentication === "pat") {
|
|
99
99
|
const basicValue = await authenticator();
|
|
@@ -32,6 +32,7 @@ function trimPullRequestThread(thread) {
|
|
|
32
32
|
status: thread.status,
|
|
33
33
|
comments: trimComments(thread.comments),
|
|
34
34
|
threadContext: thread.threadContext,
|
|
35
|
+
pullRequestThreadContext: thread.pullRequestThreadContext,
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
function trimComments(comments) {
|
|
@@ -222,6 +223,8 @@ function configureRepoTools(server, tokenProvider, connectionProvider, userAgent
|
|
|
222
223
|
changedFilesSummary: {
|
|
223
224
|
changeEntries: changes?.changeEntries ?? [],
|
|
224
225
|
fileCount: changes?.changeEntries?.length ?? 0,
|
|
226
|
+
firstComparingIteration: Math.max(0, latestIteration.id - 1),
|
|
227
|
+
secondComparingIteration: latestIteration.id,
|
|
225
228
|
nextSkip: changes?.nextSkip,
|
|
226
229
|
nextTop: changes?.nextTop,
|
|
227
230
|
},
|
|
@@ -765,7 +768,10 @@ function configureRepoTools(server, tokenProvider, connectionProvider, userAgent
|
|
|
765
768
|
rightFileStartOffset: z.number().optional().describe("Start character offset in the right file. Used for create."),
|
|
766
769
|
rightFileEndLine: z.number().optional().describe("End line in the right file. Used for create."),
|
|
767
770
|
rightFileEndOffset: z.number().optional().describe("End character offset in the right file. Used for create."),
|
|
768
|
-
|
|
771
|
+
changeTrackingId: z.coerce.number().int().min(1).optional().describe("The file change tracking ID from the pull request iteration changes. Used for create."),
|
|
772
|
+
firstComparingIteration: z.coerce.number().int().min(0).optional().describe("The iteration on the left side of the diff. Used for create."),
|
|
773
|
+
secondComparingIteration: z.coerce.number().int().min(1).optional().describe("The iteration on the right side of the diff. Used for create."),
|
|
774
|
+
}, async ({ action, repositoryId, pullRequestId, project, threadId, content, status, filePath, fullResponse, rightFileStartLine, rightFileStartOffset, rightFileEndLine, rightFileEndOffset, changeTrackingId, firstComparingIteration, secondComparingIteration, }) => {
|
|
769
775
|
try {
|
|
770
776
|
const connection = await connectionProvider();
|
|
771
777
|
const gitApi = await connection.getGitApi();
|
|
@@ -815,7 +821,17 @@ function configureRepoTools(server, tokenProvider, connectionProvider, userAgent
|
|
|
815
821
|
return { content: [{ type: "text", text: "rightFileEndOffset must be greater than or equal to rightFileStartOffset when both are on the same line." }], isError: true };
|
|
816
822
|
}
|
|
817
823
|
}
|
|
818
|
-
const
|
|
824
|
+
const iterationContextValues = [changeTrackingId, firstComparingIteration, secondComparingIteration];
|
|
825
|
+
if (iterationContextValues.some((value) => value !== undefined) && iterationContextValues.some((value) => value === undefined)) {
|
|
826
|
+
return {
|
|
827
|
+
content: [{ type: "text", text: "changeTrackingId, firstComparingIteration, and secondComparingIteration must all be specified together." }],
|
|
828
|
+
isError: true,
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
const pullRequestThreadContext = changeTrackingId !== undefined && firstComparingIteration !== undefined && secondComparingIteration !== undefined
|
|
832
|
+
? { changeTrackingId, iterationContext: { firstComparingIteration, secondComparingIteration } }
|
|
833
|
+
: undefined;
|
|
834
|
+
const thread = await gitApi.createThread({ comments: [{ content, commentType: 1 }], threadContext, pullRequestThreadContext, status: CommentThreadStatus[status] }, repositoryId, pullRequestId, project);
|
|
819
835
|
return { content: [{ type: "text", text: JSON.stringify(trimPullRequestThread(thread), null, 2) }] };
|
|
820
836
|
}
|
|
821
837
|
if (action === "reply") {
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageVersion = "2.9.0-nightly.
|
|
1
|
+
export const packageVersion = "2.9.0-nightly.20260813";
|