@daghis/teamcity-mcp 2.0.0 → 2.0.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.2](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v2.0.1...teamcity-mcp-v2.0.2) (2026-01-05)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * resolve HTTP 406 when updating build configuration fields ([#339](https://github.com/Daghis/teamcity-mcp/issues/339)) ([#341](https://github.com/Daghis/teamcity-mcp/issues/341)) ([16b1dd2](https://github.com/Daghis/teamcity-mcp/commit/16b1dd207978d63ad9824c9b7eecbbd4a9badc94))
9
+
10
+ ## [2.0.1](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v2.0.0...teamcity-mcp-v2.0.1) (2025-12-23)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * resolve HTTP 400 when updating artifactRules via update_build_config ([#335](https://github.com/Daghis/teamcity-mcp/issues/335)) ([21614ad](https://github.com/Daghis/teamcity-mcp/commit/21614ad9af4e7a519a0ece0d7c41b90a10f74a73))
16
+
3
17
  ## [2.0.0](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v1.13.1...teamcity-mcp-v2.0.0) (2025-12-22)
4
18
 
5
19
 
package/dist/index.js CHANGED
@@ -1195,7 +1195,7 @@ function debug2(message, meta) {
1195
1195
  // package.json
1196
1196
  var package_default = {
1197
1197
  name: "@daghis/teamcity-mcp",
1198
- version: "2.0.0",
1198
+ version: "2.0.2",
1199
1199
  description: "Model Control Protocol server for TeamCity CI/CD integration with AI coding assistants",
1200
1200
  mcpName: "io.github.Daghis/teamcity",
1201
1201
  main: "dist/index.js",
@@ -2327,8 +2327,6 @@ var BuildConfigurationCloneManager = class {
2327
2327
  };
2328
2328
 
2329
2329
  // src/teamcity/build-configuration-update-manager.ts
2330
- var ARTIFACT_RULES_SETTINGS_FIELD = "settings/artifactRules";
2331
- var ARTIFACT_RULES_LEGACY_FIELD = "artifactRules";
2332
2330
  var isArtifactRulesRetryableError = (error3) => {
2333
2331
  if (error3 == null || typeof error3 !== "object") return false;
2334
2332
  if (!("response" in error3)) return false;
@@ -2336,9 +2334,12 @@ var isArtifactRulesRetryableError = (error3) => {
2336
2334
  const status = response?.status;
2337
2335
  return status === 400 || status === 404;
2338
2336
  };
2339
- var setArtifactRulesWithFallback = async (api, buildTypeId, artifactRules) => {
2337
+ var setArtifactRulesWithFallback = async (http, buildTypeId, artifactRules) => {
2338
+ const encodedId = encodeURIComponent(buildTypeId);
2340
2339
  try {
2341
- await api.setBuildTypeField(buildTypeId, ARTIFACT_RULES_SETTINGS_FIELD, artifactRules);
2340
+ await http.put(`/app/rest/buildTypes/${encodedId}/settings/artifactRules`, artifactRules, {
2341
+ headers: { "Content-Type": "text/plain", Accept: "text/plain" }
2342
+ });
2342
2343
  } catch (err) {
2343
2344
  if (!isArtifactRulesRetryableError(err)) {
2344
2345
  throw err;
@@ -2349,7 +2350,9 @@ var setArtifactRulesWithFallback = async (api, buildTypeId, artifactRules) => {
2349
2350
  status
2350
2351
  });
2351
2352
  try {
2352
- await api.setBuildTypeField(buildTypeId, ARTIFACT_RULES_LEGACY_FIELD, artifactRules);
2353
+ await http.put(`/app/rest/buildTypes/${encodedId}/artifactRules`, artifactRules, {
2354
+ headers: { "Content-Type": "text/plain", Accept: "text/plain" }
2355
+ });
2353
2356
  } catch (fallbackError) {
2354
2357
  debug2("Legacy artifact rules update failed", {
2355
2358
  buildTypeId,
@@ -2555,31 +2558,30 @@ var BuildConfigurationUpdateManager = class {
2555
2558
  await this.client.modules.buildTypes.setBuildTypeField(
2556
2559
  currentConfig.id,
2557
2560
  "name",
2558
- updates.name
2561
+ updates.name,
2562
+ { headers: { "Content-Type": "text/plain", Accept: "text/plain" } }
2559
2563
  );
2560
2564
  }
2561
2565
  if (updates.description !== void 0) {
2562
2566
  await this.client.modules.buildTypes.setBuildTypeField(
2563
2567
  currentConfig.id,
2564
2568
  "description",
2565
- updates.description ?? ""
2569
+ updates.description ?? "",
2570
+ { headers: { "Content-Type": "text/plain", Accept: "text/plain" } }
2566
2571
  );
2567
2572
  }
2568
2573
  }
2569
2574
  if (settings.length > 0) {
2570
2575
  for (const setting of settings) {
2571
2576
  if (setting.name === "artifactRules") {
2572
- await setArtifactRulesWithFallback(
2573
- this.client.modules.buildTypes,
2574
- currentConfig.id,
2575
- setting.value
2576
- );
2577
+ await setArtifactRulesWithFallback(this.client.http, currentConfig.id, setting.value);
2577
2578
  continue;
2578
2579
  }
2579
2580
  await this.client.modules.buildTypes.setBuildTypeField(
2580
2581
  currentConfig.id,
2581
2582
  `settings/${setting.name}`,
2582
- setting.value
2583
+ setting.value,
2584
+ { headers: { "Content-Type": "text/plain", Accept: "text/plain" } }
2583
2585
  );
2584
2586
  }
2585
2587
  }
@@ -2600,7 +2602,8 @@ var BuildConfigurationUpdateManager = class {
2600
2602
  await this.client.modules.buildTypes.setBuildTypeField(
2601
2603
  currentConfig.id,
2602
2604
  `parameters/${name}`,
2603
- value
2605
+ value,
2606
+ { headers: { "Content-Type": "text/plain", Accept: "text/plain" } }
2604
2607
  );
2605
2608
  }
2606
2609
  }
@@ -42013,19 +42016,21 @@ var FULL_MODE_TOOLS = [
42013
42016
  await adapter.modules.buildTypes.setBuildTypeField(
42014
42017
  typedArgs.buildTypeId,
42015
42018
  "name",
42016
- typedArgs.name
42019
+ typedArgs.name,
42020
+ { headers: { "Content-Type": "text/plain", Accept: "text/plain" } }
42017
42021
  );
42018
42022
  }
42019
42023
  if (typedArgs.description !== void 0) {
42020
42024
  await adapter.modules.buildTypes.setBuildTypeField(
42021
42025
  typedArgs.buildTypeId,
42022
42026
  "description",
42023
- typedArgs.description
42027
+ typedArgs.description,
42028
+ { headers: { "Content-Type": "text/plain", Accept: "text/plain" } }
42024
42029
  );
42025
42030
  }
42026
42031
  if (typedArgs.artifactRules !== void 0) {
42027
42032
  await setArtifactRulesWithFallback(
42028
- adapter.modules.buildTypes,
42033
+ adapter.http,
42029
42034
  typedArgs.buildTypeId,
42030
42035
  typedArgs.artifactRules
42031
42036
  );
@@ -42036,19 +42041,21 @@ var FULL_MODE_TOOLS = [
42036
42041
  await adapter.modules.buildTypes.setBuildTypeField(
42037
42042
  typedArgs.buildTypeId,
42038
42043
  "name",
42039
- typedArgs.name
42044
+ typedArgs.name,
42045
+ { headers: { "Content-Type": "text/plain", Accept: "text/plain" } }
42040
42046
  );
42041
42047
  }
42042
42048
  if (typedArgs.description !== void 0) {
42043
42049
  await adapter.modules.buildTypes.setBuildTypeField(
42044
42050
  typedArgs.buildTypeId,
42045
42051
  "description",
42046
- typedArgs.description
42052
+ typedArgs.description,
42053
+ { headers: { "Content-Type": "text/plain", Accept: "text/plain" } }
42047
42054
  );
42048
42055
  }
42049
42056
  if (typedArgs.artifactRules !== void 0) {
42050
42057
  await setArtifactRulesWithFallback(
42051
- adapter.modules.buildTypes,
42058
+ adapter.http,
42052
42059
  typedArgs.buildTypeId,
42053
42060
  typedArgs.artifactRules
42054
42061
  );
@@ -42058,7 +42065,8 @@ var FULL_MODE_TOOLS = [
42058
42065
  await adapter.modules.buildTypes.setBuildTypeField(
42059
42066
  typedArgs.buildTypeId,
42060
42067
  "paused",
42061
- String(typedArgs.paused)
42068
+ String(typedArgs.paused),
42069
+ { headers: { "Content-Type": "text/plain", Accept: "text/plain" } }
42062
42070
  );
42063
42071
  }
42064
42072
  return json({ success: true, action: "update_build_config", id: typedArgs.buildTypeId });
@@ -42442,7 +42450,7 @@ var FULL_MODE_TOOLS = [
42442
42450
  {
42443
42451
  headers: {
42444
42452
  "Content-Type": "text/plain",
42445
- Accept: "application/json"
42453
+ Accept: "text/plain"
42446
42454
  }
42447
42455
  }
42448
42456
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daghis/teamcity-mcp",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Model Control Protocol server for TeamCity CI/CD integration with AI coding assistants",
5
5
  "mcpName": "io.github.Daghis/teamcity",
6
6
  "main": "dist/index.js",
package/server.json CHANGED
@@ -7,13 +7,13 @@
7
7
  "source": "github"
8
8
  },
9
9
  "websiteUrl": "https://github.com/Daghis/teamcity-mcp",
10
- "version": "2.0.0",
10
+ "version": "2.0.2",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "registryBaseUrl": "https://registry.npmjs.org",
15
15
  "identifier": "@daghis/teamcity-mcp",
16
- "version": "2.0.0",
16
+ "version": "2.0.2",
17
17
  "runtimeHint": "npx",
18
18
  "runtimeArguments": [
19
19
  {