@daghis/teamcity-mcp 1.10.0 → 1.10.1

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.
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "1.10.0"
2
+ ".": "1.10.1"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.10.1](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v1.10.0...teamcity-mcp-v1.10.1) (2025-09-27)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **tools:** support get_build_status buildNumber (209) ([#219](https://github.com/Daghis/teamcity-mcp/issues/219)) ([efb9a00](https://github.com/Daghis/teamcity-mcp/commit/efb9a00ad697335239e7cd87c9436259df27a49c))
9
+
3
10
  ## [1.10.0](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v1.9.6...teamcity-mcp-v1.10.0) (2025-09-27)
4
11
 
5
12
 
package/dist/index.js CHANGED
@@ -261,17 +261,11 @@ var init_build_status_manager = __esm({
261
261
  buildData = response.data;
262
262
  } else {
263
263
  const locator = this.buildLocator(options);
264
- const response = await this.client.builds.getMultipleBuilds(
264
+ const response = await this.client.builds.getBuild(
265
265
  locator,
266
266
  this.getFieldSelection(options)
267
267
  );
268
- const data = response.data;
269
- if (!Array.isArray(data.build) || data.build.length === 0) {
270
- throw new BuildNotFoundError(
271
- `No build found for number ${options.buildNumber} in ${options.buildTypeId}`
272
- );
273
- }
274
- buildData = data.build[0];
268
+ buildData = response.data;
275
269
  }
276
270
  if (buildData == null) {
277
271
  throw new BuildNotFoundError("Build data is undefined");
@@ -38262,6 +38256,14 @@ var DEV_TOOLS = [
38262
38256
  type: "object",
38263
38257
  properties: {
38264
38258
  buildId: { type: "string", description: "Build ID" },
38259
+ buildNumber: {
38260
+ type: "string",
38261
+ description: "Human build number (requires buildTypeId when provided)"
38262
+ },
38263
+ buildTypeId: {
38264
+ type: "string",
38265
+ description: "Build configuration identifier (required when using buildNumber)"
38266
+ },
38265
38267
  includeTests: { type: "boolean", description: "Include test summary" },
38266
38268
  includeProblems: { type: "boolean", description: "Include build problems" },
38267
38269
  includeQueueTotals: {
@@ -38272,16 +38274,32 @@ var DEV_TOOLS = [
38272
38274
  type: "boolean",
38273
38275
  description: "Include waitReason for the queued item (extra API call when queued)"
38274
38276
  }
38275
- },
38276
- required: ["buildId"]
38277
+ }
38277
38278
  },
38278
38279
  handler: async (args) => {
38279
38280
  const schema = import_zod4.z.object({
38280
- buildId: import_zod4.z.string().min(1),
38281
+ buildId: import_zod4.z.string().min(1).optional(),
38282
+ buildNumber: import_zod4.z.string().min(1).optional(),
38283
+ buildTypeId: import_zod4.z.string().min(1).optional(),
38281
38284
  includeTests: import_zod4.z.boolean().optional(),
38282
38285
  includeProblems: import_zod4.z.boolean().optional(),
38283
38286
  includeQueueTotals: import_zod4.z.boolean().optional(),
38284
38287
  includeQueueReason: import_zod4.z.boolean().optional()
38288
+ }).superRefine((value, ctx) => {
38289
+ if (!value.buildId && !value.buildNumber) {
38290
+ ctx.addIssue({
38291
+ code: import_zod4.z.ZodIssueCode.custom,
38292
+ path: ["buildId"],
38293
+ message: "Either buildId or buildNumber must be provided"
38294
+ });
38295
+ }
38296
+ if (value.buildNumber && !value.buildTypeId) {
38297
+ ctx.addIssue({
38298
+ code: import_zod4.z.ZodIssueCode.custom,
38299
+ path: ["buildTypeId"],
38300
+ message: "buildTypeId is required when querying by buildNumber"
38301
+ });
38302
+ }
38285
38303
  });
38286
38304
  return runTool(
38287
38305
  "get_build_status",
@@ -38291,6 +38309,8 @@ var DEV_TOOLS = [
38291
38309
  const statusManager = new (await Promise.resolve().then(() => (init_build_status_manager(), build_status_manager_exports))).BuildStatusManager(adapter);
38292
38310
  const result = await statusManager.getBuildStatus({
38293
38311
  buildId: typed.buildId,
38312
+ buildNumber: typed.buildNumber,
38313
+ buildTypeId: typed.buildTypeId,
38294
38314
  includeTests: typed.includeTests,
38295
38315
  includeProblems: typed.includeProblems
38296
38316
  });
@@ -38311,8 +38331,11 @@ var DEV_TOOLS = [
38311
38331
  }
38312
38332
  if (typed.includeQueueReason) {
38313
38333
  try {
38314
- const qb = await adapter.modules.buildQueue.getQueuedBuild(typed.buildId);
38315
- enrich.waitReason = qb.data.waitReason;
38334
+ const targetBuildId = typed.buildId ?? result.buildId;
38335
+ if (targetBuildId) {
38336
+ const qb = await adapter.modules.buildQueue.getQueuedBuild(targetBuildId);
38337
+ enrich.waitReason = qb.data.waitReason;
38338
+ }
38316
38339
  } catch {
38317
38340
  }
38318
38341
  }