@daghis/teamcity-mcp 2.3.0 → 2.3.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.3.2](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v2.3.1...teamcity-mcp-v2.3.2) (2026-03-10)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * write snapshot dependency options as properties, not XML options ([#406](https://github.com/Daghis/teamcity-mcp/issues/406)) ([#419](https://github.com/Daghis/teamcity-mcp/issues/419)) ([e13fa2d](https://github.com/Daghis/teamcity-mcp/commit/e13fa2dd1be5c387efd9b4fc0e38cb5e15634be4))
9
+
10
+ ## [2.3.1](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v2.3.0...teamcity-mcp-v2.3.1) (2026-03-10)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * use toBuildLocator() for all build URL templates in api-client ([#416](https://github.com/Daghis/teamcity-mcp/issues/416)) ([2a10312](https://github.com/Daghis/teamcity-mcp/commit/2a10312e1469ed9d7c9b9e47caaddaac693df400))
16
+
3
17
  ## [2.3.0](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v2.2.3...teamcity-mcp-v2.3.0) (2026-03-10)
4
18
 
5
19
 
package/CLAUDE.md CHANGED
@@ -64,7 +64,7 @@ Type support includes: `password`, `text`, `checkbox`, `select` with spec format
64
64
 
65
65
  When Marc says he wants to "check-in with GitHub", run these steps:
66
66
 
67
- 1. Pull latest pulse stats (via project-pulse MCP, repo: `Daghis/teamcity-mcp`, npm: `@daghis/teamcity-mcp`)
67
+ 1. Snapshot pulse stats (via project-pulse MCP `snapshot_stats`, name: `teamcity-mcp`, repo: `Daghis/teamcity-mcp`, npm: `@daghis/teamcity-mcp`) — this records a data point for trend tracking
68
68
  2. Check new issues
69
69
  3. Check new PRs
70
70
  4. Check security alerts
package/dist/index.js CHANGED
@@ -1205,7 +1205,7 @@ function debug2(message, meta) {
1205
1205
  // package.json
1206
1206
  var package_default = {
1207
1207
  name: "@daghis/teamcity-mcp",
1208
- version: "2.3.0",
1208
+ version: "2.3.2",
1209
1209
  description: "Model Control Protocol server for TeamCity CI/CD integration with AI coding assistants",
1210
1210
  mcpName: "io.github.Daghis/teamcity",
1211
1211
  main: "dist/index.js",
@@ -1214,7 +1214,7 @@ var package_default = {
1214
1214
  "teamcity-mcp": "dist/index.js"
1215
1215
  },
1216
1216
  engines: {
1217
- node: ">=20.10.0"
1217
+ node: ">=20.19.0"
1218
1218
  },
1219
1219
  scripts: {
1220
1220
  dev: "node ./node_modules/tsx/dist/cli.mjs watch src/index.ts",
@@ -1280,18 +1280,18 @@ var package_default = {
1280
1280
  devDependencies: {
1281
1281
  "@codecov/bundler-plugin-core": "^1.9.1",
1282
1282
  "@esbuild-plugins/tsconfig-paths": "^0.1.2",
1283
+ "@eslint/js": "^10.0.1",
1283
1284
  "@trivago/prettier-plugin-sort-imports": "^6.0.1",
1284
1285
  "@types/jest": "^30.0.0",
1285
1286
  "@types/js-yaml": "^4.0.9",
1286
1287
  "@types/node": "^25.0.2",
1287
- "@typescript-eslint/eslint-plugin": "^8.51.0",
1288
- "@typescript-eslint/parser": "^8.51.0",
1288
+ "@typescript-eslint/eslint-plugin": "^8.57.0",
1289
+ "@typescript-eslint/parser": "^8.57.0",
1289
1290
  esbuild: "^0.27.0",
1290
- eslint: "^9.39.1",
1291
+ eslint: "^10.0.3",
1291
1292
  "eslint-config-prettier": "^10.1.8",
1292
- "eslint-import-resolver-typescript": "^4.4.4",
1293
- "eslint-plugin-import": "^2.32.0",
1294
1293
  "eslint-plugin-prettier": "^5.0.1",
1294
+ globals: "^17.4.0",
1295
1295
  jest: "^30.1.3",
1296
1296
  "jest-junit": "^16.0.0",
1297
1297
  "js-yaml": "^4.1.1",
@@ -1562,13 +1562,13 @@ var ArtifactManager = class _ArtifactManager {
1562
1562
  } catch (error3) {
1563
1563
  const err = error3;
1564
1564
  if (err.response?.status === 401) {
1565
- throw new Error("Authentication failed: Invalid TeamCity token");
1565
+ throw new Error("Authentication failed: Invalid TeamCity token", { cause: error3 });
1566
1566
  }
1567
1567
  if (err.response?.status === 404) {
1568
- throw new Error(`Build not found: ${buildId}`);
1568
+ throw new Error(`Build not found: ${buildId}`, { cause: error3 });
1569
1569
  }
1570
1570
  const errMsg = err.message ?? String(error3);
1571
- throw new Error(`Failed to fetch artifacts: ${errMsg}`);
1571
+ throw new Error(`Failed to fetch artifacts: ${errMsg}`, { cause: error3 });
1572
1572
  }
1573
1573
  }
1574
1574
  /**
@@ -1708,7 +1708,7 @@ var ArtifactManager = class _ArtifactManager {
1708
1708
  } else {
1709
1709
  errMsg = error3 instanceof Error ? error3.message : "Unknown error";
1710
1710
  }
1711
- throw new Error(`Failed to download artifact: ${errMsg}`);
1711
+ throw new Error(`Failed to download artifact: ${errMsg}`, { cause: error3 });
1712
1712
  }
1713
1713
  }
1714
1714
  /**
@@ -2033,7 +2033,7 @@ var BuildConfigurationCloneManager = class {
2033
2033
  return null;
2034
2034
  }
2035
2035
  if (axiosError.response?.status === 403) {
2036
- throw new Error("Permission denied: No access to source configuration");
2036
+ throw new Error("Permission denied: No access to source configuration", { cause: err });
2037
2037
  }
2038
2038
  throw err;
2039
2039
  }
@@ -2107,7 +2107,7 @@ var BuildConfigurationCloneManager = class {
2107
2107
  return { id: newId, name: newName };
2108
2108
  } catch (err) {
2109
2109
  error2("Failed to clone VCS root", err);
2110
- throw new Error(`Failed to clone VCS root: ${err.message}`);
2110
+ throw new Error(`Failed to clone VCS root: ${err.message}`, { cause: err });
2111
2111
  }
2112
2112
  }
2113
2113
  /**
@@ -2237,14 +2237,14 @@ var BuildConfigurationCloneManager = class {
2237
2237
  } catch (err) {
2238
2238
  const error3 = err;
2239
2239
  if (error3.response?.status === 409) {
2240
- throw new Error(`Build configuration already exists with ID: ${configId}`);
2240
+ throw new Error(`Build configuration already exists with ID: ${configId}`, { cause: err });
2241
2241
  }
2242
2242
  if (error3.response?.status === 403) {
2243
- throw new Error("Permission denied: You need project edit permissions");
2243
+ throw new Error("Permission denied: You need project edit permissions", { cause: err });
2244
2244
  }
2245
2245
  if (error3.response?.status === 400) {
2246
2246
  const message = error3.response?.data?.message ?? "Invalid configuration";
2247
- throw new Error(`Invalid configuration: ${message}`);
2247
+ throw new Error(`Invalid configuration: ${message}`, { cause: err });
2248
2248
  }
2249
2249
  error2(
2250
2250
  "Failed to clone build configuration",
@@ -2429,7 +2429,7 @@ var BuildConfigurationUpdateManager = class {
2429
2429
  return null;
2430
2430
  }
2431
2431
  if (err != null && typeof err === "object" && "response" in err && err.response?.status === 403) {
2432
- throw new Error("Permission denied: No access to build configuration");
2432
+ throw new Error("Permission denied: No access to build configuration", { cause: err });
2433
2433
  }
2434
2434
  throw err;
2435
2435
  }
@@ -2622,17 +2622,17 @@ var BuildConfigurationUpdateManager = class {
2622
2622
  } catch (err) {
2623
2623
  const error3 = err;
2624
2624
  if (error3.response?.status === 409) {
2625
- throw new Error("Configuration was modified by another user");
2625
+ throw new Error("Configuration was modified by another user", { cause: err });
2626
2626
  }
2627
2627
  if (error3.response?.status === 403) {
2628
- throw new Error("Permission denied: You need project edit permissions");
2628
+ throw new Error("Permission denied: You need project edit permissions", { cause: err });
2629
2629
  }
2630
2630
  if (error3.response?.status === 400) {
2631
2631
  const message = error3.response?.data?.message ?? "Invalid configuration";
2632
- throw new Error(`Invalid update: ${message}`);
2632
+ throw new Error(`Invalid update: ${message}`, { cause: err });
2633
2633
  }
2634
2634
  error2("Failed to apply updates", error3);
2635
- throw new Error("Partial update failure");
2635
+ throw new Error("Partial update failure", { cause: err });
2636
2636
  }
2637
2637
  }
2638
2638
  /**
@@ -2735,7 +2735,7 @@ var BuildConfigurationUpdateManager = class {
2735
2735
  info2("Rollback completed successfully", { configId });
2736
2736
  } catch (err) {
2737
2737
  error2("Failed to rollback changes", err);
2738
- throw new Error("Rollback failed: Manual intervention may be required");
2738
+ throw new Error("Rollback failed: Manual intervention may be required", { cause: err });
2739
2739
  }
2740
2740
  }
2741
2741
  /**
@@ -2780,13 +2780,6 @@ var defaultTypeFor = (dependencyType) => {
2780
2780
  return void 0;
2781
2781
  }
2782
2782
  };
2783
- var SNAPSHOT_DEPENDENCY_OPTION_KEYS = /* @__PURE__ */ new Set([
2784
- "run-build-on-the-same-agent",
2785
- "sync-revisions",
2786
- "take-successful-builds-only",
2787
- "take-started-build-with-same-revisions",
2788
- "do-not-run-new-build-if-there-is-a-suitable-one"
2789
- ]);
2790
2783
  var toStringRecord2 = (input) => {
2791
2784
  if (!input) {
2792
2785
  return {};
@@ -2841,15 +2834,6 @@ var optionsToRecord = (options) => {
2841
2834
  }
2842
2835
  return map;
2843
2836
  };
2844
- var recordToOptions = (record) => {
2845
- const entries = Object.entries(record);
2846
- if (entries.length === 0) {
2847
- return void 0;
2848
- }
2849
- return {
2850
- option: entries.map(([name, value]) => ({ name, value }))
2851
- };
2852
- };
2853
2837
  var mergeRecords2 = (base, override) => {
2854
2838
  const merged = { ...base };
2855
2839
  for (const [key, value] of Object.entries(override)) {
@@ -2881,25 +2865,6 @@ var propertiesToXml2 = (properties) => {
2881
2865
  }
2882
2866
  return `<properties>${nodes.join("")}</properties>`;
2883
2867
  };
2884
- var optionsToXml = (options) => {
2885
- if (!options) {
2886
- return void 0;
2887
- }
2888
- const entries = options.option;
2889
- const list = Array.isArray(entries) ? entries : entries != null ? [entries] : [];
2890
- if (list.length === 0) {
2891
- return void 0;
2892
- }
2893
- const nodes = list.filter((item) => item?.name).map((item) => {
2894
- const name = item?.name ?? "";
2895
- const value = item?.value != null ? String(item.value) : "";
2896
- return `<option name="${escapeXml2(name)}" value="${escapeXml2(value)}"/>`;
2897
- });
2898
- if (nodes.length === 0) {
2899
- return void 0;
2900
- }
2901
- return `<options>${nodes.join("")}</options>`;
2902
- };
2903
2868
  var sourceBuildTypeToXml = (source) => {
2904
2869
  if (!source || typeof source !== "object") {
2905
2870
  return void 0;
@@ -2946,10 +2911,6 @@ var dependencyToXml = (dependencyType, payload) => {
2946
2911
  if (propertiesXml) {
2947
2912
  fragments.push(propertiesXml);
2948
2913
  }
2949
- const optionsXml = optionsToXml(payload.options);
2950
- if (optionsXml) {
2951
- fragments.push(optionsXml);
2952
- }
2953
2914
  return `<${root}${attributesToString2(attributes)}>${fragments.join("")}</${root}>`;
2954
2915
  };
2955
2916
  var prepareArtifactRequest = (payload) => ({
@@ -3076,42 +3037,19 @@ var BuildDependencyManager = class {
3076
3037
  }
3077
3038
  }
3078
3039
  buildPayload(dependencyType, existing, input) {
3079
- const existingSnapshot = existing;
3080
3040
  const baseProperties = propertiesToRecord2(existing?.properties);
3081
- const inputPropertyRecord = toStringRecord2(input.properties);
3082
- const inputExplicitOptions = toStringRecord2(input.options);
3083
- let optionOverrides = {};
3084
- let propertyOverrides = inputPropertyRecord;
3085
- let baseOptions = {};
3086
3041
  if (dependencyType === "snapshot") {
3087
- baseOptions = optionsToRecord(existingSnapshot?.options);
3088
- const knownOptionKeys = /* @__PURE__ */ new Set([
3089
- ...Object.keys(baseOptions),
3090
- ...Object.keys(inputExplicitOptions)
3091
- ]);
3092
- for (const key of SNAPSHOT_DEPENDENCY_OPTION_KEYS) {
3093
- knownOptionKeys.add(key);
3094
- }
3095
- const derivedOptionOverrides = { ...inputExplicitOptions };
3096
- const derivedPropertyOverrides = {};
3097
- for (const [key, value] of Object.entries(inputPropertyRecord)) {
3098
- if (knownOptionKeys.has(key)) {
3099
- derivedOptionOverrides[key] = value;
3100
- } else {
3101
- derivedPropertyOverrides[key] = value;
3102
- }
3103
- }
3104
- optionOverrides = derivedOptionOverrides;
3105
- propertyOverrides = derivedPropertyOverrides;
3106
- } else if (Object.keys(inputExplicitOptions).length > 0) {
3107
- optionOverrides = inputExplicitOptions;
3042
+ const existingOptions = optionsToRecord(
3043
+ existing?.options
3044
+ );
3045
+ Object.assign(baseProperties, existingOptions);
3108
3046
  }
3109
- const mergedProps = mergeRecords2(baseProperties, propertyOverrides);
3047
+ const inputOverrides = mergeRecords2(
3048
+ toStringRecord2(input.properties),
3049
+ toStringRecord2(input.options)
3050
+ );
3051
+ const mergedProps = mergeRecords2(baseProperties, inputOverrides);
3110
3052
  const properties = recordToProperties2(mergedProps);
3111
- let mergedOptions = {};
3112
- if (dependencyType === "snapshot") {
3113
- mergedOptions = mergeRecords2(baseOptions, optionOverrides);
3114
- }
3115
3053
  const resolvedType = input.type ?? existing?.type ?? defaultTypeFor(dependencyType);
3116
3054
  const payload = {
3117
3055
  ...existing ?? {},
@@ -3125,14 +3063,6 @@ var BuildDependencyManager = class {
3125
3063
  } else {
3126
3064
  delete payload.properties;
3127
3065
  }
3128
- if (dependencyType === "snapshot") {
3129
- const options = recordToOptions(mergedOptions);
3130
- if (options) {
3131
- payload.options = options;
3132
- } else {
3133
- delete payload.options;
3134
- }
3135
- }
3136
3066
  const dependsOn = input.dependsOn ?? existing?.["source-buildType"]?.id;
3137
3067
  if (dependsOn) {
3138
3068
  payload["source-buildType"] = { id: dependsOn };
@@ -38652,12 +38582,15 @@ var TeamCityAPI = class _TeamCityAPI {
38652
38582
  });
38653
38583
  return response.data;
38654
38584
  } catch (primaryError) {
38655
- const response = await this.axiosInstance.get(`/app/rest/builds/id:${buildId}/log`, {
38656
- params: { plain: true },
38657
- headers: { Accept: "text/plain" },
38658
- responseType: "text",
38659
- transformResponse: [(data) => data]
38660
- });
38585
+ const response = await this.axiosInstance.get(
38586
+ `/app/rest/builds/${toBuildLocator(buildId)}/log`,
38587
+ {
38588
+ params: { plain: true },
38589
+ headers: { Accept: "text/plain" },
38590
+ responseType: "text",
38591
+ transformResponse: [(data) => data]
38592
+ }
38593
+ );
38661
38594
  return response.data;
38662
38595
  }
38663
38596
  }
@@ -38669,16 +38602,19 @@ var TeamCityAPI = class _TeamCityAPI {
38669
38602
  const startLine = options?.startLine ?? 0;
38670
38603
  const lineCount = options?.lineCount ?? 500;
38671
38604
  try {
38672
- const response = await this.axiosInstance.get(`/app/rest/builds/id:${buildId}/log`, {
38673
- params: {
38674
- plain: true,
38675
- start: startLine,
38676
- count: lineCount
38677
- },
38678
- headers: { Accept: "text/plain" },
38679
- responseType: "text",
38680
- transformResponse: [(data) => data]
38681
- });
38605
+ const response = await this.axiosInstance.get(
38606
+ `/app/rest/builds/${toBuildLocator(buildId)}/log`,
38607
+ {
38608
+ params: {
38609
+ plain: true,
38610
+ start: startLine,
38611
+ count: lineCount
38612
+ },
38613
+ headers: { Accept: "text/plain" },
38614
+ responseType: "text",
38615
+ transformResponse: [(data) => data]
38616
+ }
38617
+ );
38682
38618
  const text = response.data ?? "";
38683
38619
  const lines = text.replace(/\r\n/g, "\n").replace(/\r/g, "\n").split("\n");
38684
38620
  if (lines.length > 0 && lines[lines.length - 1] === "") lines.pop();
@@ -38712,7 +38648,9 @@ var TeamCityAPI = class _TeamCityAPI {
38712
38648
  return response.data;
38713
38649
  }
38714
38650
  async listTestFailures(buildId) {
38715
- const response = await this.tests.getAllTestOccurrences(`build:(id:${buildId}),status:FAILURE`);
38651
+ const response = await this.tests.getAllTestOccurrences(
38652
+ `build:(${toBuildLocator(buildId)}),status:FAILURE`
38653
+ );
38716
38654
  return response.data;
38717
38655
  }
38718
38656
  async listBuildArtifacts(buildId, options) {
@@ -38732,7 +38670,7 @@ var TeamCityAPI = class _TeamCityAPI {
38732
38670
  responseType: options?.responseType ?? "arraybuffer"
38733
38671
  };
38734
38672
  return this.axiosInstance.get(
38735
- `/app/rest/builds/id:${buildId}/artifacts/content/${normalizedPath}`,
38673
+ `/app/rest/builds/${toBuildLocator(buildId)}/artifacts/content/${normalizedPath}`,
38736
38674
  requestOptions
38737
38675
  );
38738
38676
  }
@@ -38754,13 +38692,16 @@ var TeamCityAPI = class _TeamCityAPI {
38754
38692
  responseType: options?.responseType ?? "text",
38755
38693
  transformResponse: options?.transformResponse ?? [(data) => data]
38756
38694
  };
38757
- return this.axiosInstance.get(`/app/rest/builds/id:${buildId}/log`, requestOptions);
38695
+ return this.axiosInstance.get(
38696
+ `/app/rest/builds/${toBuildLocator(buildId)}/log`,
38697
+ requestOptions
38698
+ );
38758
38699
  }
38759
38700
  async getBuildStatistics(buildId, fields) {
38760
38701
  return this.builds.getBuildStatisticValues(toBuildLocator(buildId), fields);
38761
38702
  }
38762
38703
  async listChangesForBuild(buildId, fields) {
38763
- return this.changes.getAllChanges(`build:(id:${buildId})`, fields);
38704
+ return this.changes.getAllChanges(`build:(${toBuildLocator(buildId)})`, fields);
38764
38705
  }
38765
38706
  async listSnapshotDependencies(buildId) {
38766
38707
  const response = await this.builds.getBuild(toBuildLocator(buildId), "snapshot-dependencies");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daghis/teamcity-mcp",
3
- "version": "2.3.0",
3
+ "version": "2.3.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",
@@ -9,7 +9,7 @@
9
9
  "teamcity-mcp": "dist/index.js"
10
10
  },
11
11
  "engines": {
12
- "node": ">=20.10.0"
12
+ "node": ">=20.19.0"
13
13
  },
14
14
  "scripts": {
15
15
  "dev": "node ./node_modules/tsx/dist/cli.mjs watch src/index.ts",
@@ -75,18 +75,18 @@
75
75
  "devDependencies": {
76
76
  "@codecov/bundler-plugin-core": "^1.9.1",
77
77
  "@esbuild-plugins/tsconfig-paths": "^0.1.2",
78
+ "@eslint/js": "^10.0.1",
78
79
  "@trivago/prettier-plugin-sort-imports": "^6.0.1",
79
80
  "@types/jest": "^30.0.0",
80
81
  "@types/js-yaml": "^4.0.9",
81
82
  "@types/node": "^25.0.2",
82
- "@typescript-eslint/eslint-plugin": "^8.51.0",
83
- "@typescript-eslint/parser": "^8.51.0",
83
+ "@typescript-eslint/eslint-plugin": "^8.57.0",
84
+ "@typescript-eslint/parser": "^8.57.0",
84
85
  "esbuild": "^0.27.0",
85
- "eslint": "^9.39.1",
86
+ "eslint": "^10.0.3",
86
87
  "eslint-config-prettier": "^10.1.8",
87
- "eslint-import-resolver-typescript": "^4.4.4",
88
- "eslint-plugin-import": "^2.32.0",
89
88
  "eslint-plugin-prettier": "^5.0.1",
89
+ "globals": "^17.4.0",
90
90
  "jest": "^30.1.3",
91
91
  "jest-junit": "^16.0.0",
92
92
  "js-yaml": "^4.1.1",
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.3.0",
10
+ "version": "2.3.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.3.0",
16
+ "version": "2.3.2",
17
17
  "runtimeHint": "npx",
18
18
  "runtimeArguments": [
19
19
  {