@daghis/teamcity-mcp 2.4.3 → 2.6.0
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 +14 -0
- package/dist/index.js +113 -1
- package/package.json +1 -1
- package/server.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.6.0](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v2.5.0...teamcity-mcp-v2.6.0) (2026-03-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add remove_agent tool to delete stale build agents ([#444](https://github.com/Daghis/teamcity-mcp/issues/444)) ([c32824b](https://github.com/Daghis/teamcity-mcp/commit/c32824b8952d862349b3f39d99f1ca2c306f1493)), closes [#439](https://github.com/Daghis/teamcity-mcp/issues/439)
|
|
9
|
+
|
|
10
|
+
## [2.5.0](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v2.4.3...teamcity-mcp-v2.5.0) (2026-03-18)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add wait_for_build tool to poll until build completes ([#430](https://github.com/Daghis/teamcity-mcp/issues/430)) ([#433](https://github.com/Daghis/teamcity-mcp/issues/433)) ([a83e6cf](https://github.com/Daghis/teamcity-mcp/commit/a83e6cf99e4c523103bf894ee3d58c91734853f6))
|
|
16
|
+
|
|
3
17
|
## [2.4.3](https://github.com/Daghis/teamcity-mcp/compare/teamcity-mcp-v2.4.2...teamcity-mcp-v2.4.3) (2026-03-18)
|
|
4
18
|
|
|
5
19
|
|
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.
|
|
1208
|
+
version: "2.6.0",
|
|
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",
|
|
@@ -4140,6 +4140,11 @@ async function fetchAllPages(fetchFn, options = {}) {
|
|
|
4140
4140
|
return allItems;
|
|
4141
4141
|
}
|
|
4142
4142
|
|
|
4143
|
+
// src/utils/async/index.ts
|
|
4144
|
+
function sleep(ms) {
|
|
4145
|
+
return new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
4146
|
+
}
|
|
4147
|
+
|
|
4143
4148
|
// src/utils/list-builds-locator.ts
|
|
4144
4149
|
var SIMPLE_BRANCH_VALUES = /* @__PURE__ */ new Set([
|
|
4145
4150
|
"default:true",
|
|
@@ -39622,6 +39627,95 @@ var DEV_TOOLS = [
|
|
|
39622
39627
|
);
|
|
39623
39628
|
}
|
|
39624
39629
|
},
|
|
39630
|
+
{
|
|
39631
|
+
name: "wait_for_build",
|
|
39632
|
+
description: "Wait for a build to complete by polling until it reaches a terminal state (finished, canceled, failed) or timeout",
|
|
39633
|
+
inputSchema: {
|
|
39634
|
+
type: "object",
|
|
39635
|
+
properties: {
|
|
39636
|
+
buildId: { type: "string", description: "Build ID to wait for" },
|
|
39637
|
+
buildNumber: {
|
|
39638
|
+
type: "string",
|
|
39639
|
+
description: "Human build number (requires buildTypeId)"
|
|
39640
|
+
},
|
|
39641
|
+
buildTypeId: {
|
|
39642
|
+
type: "string",
|
|
39643
|
+
description: "Build configuration ID (required with buildNumber)"
|
|
39644
|
+
},
|
|
39645
|
+
timeout: {
|
|
39646
|
+
type: "number",
|
|
39647
|
+
description: "Max seconds to wait (default 600, max 3600)"
|
|
39648
|
+
},
|
|
39649
|
+
pollInterval: {
|
|
39650
|
+
type: "number",
|
|
39651
|
+
description: "Seconds between polls (default 15, min 5)"
|
|
39652
|
+
},
|
|
39653
|
+
includeTests: { type: "boolean", description: "Include test summary in result" },
|
|
39654
|
+
includeProblems: { type: "boolean", description: "Include build problems in result" }
|
|
39655
|
+
}
|
|
39656
|
+
},
|
|
39657
|
+
handler: async (args) => {
|
|
39658
|
+
const schema = import_zod4.z.object({
|
|
39659
|
+
buildId: import_zod4.z.string().min(1).optional(),
|
|
39660
|
+
buildNumber: import_zod4.z.string().min(1).optional(),
|
|
39661
|
+
buildTypeId: import_zod4.z.string().min(1).optional(),
|
|
39662
|
+
timeout: import_zod4.z.coerce.number().int().min(1).max(3600).default(600),
|
|
39663
|
+
pollInterval: import_zod4.z.coerce.number().int().min(5).max(300).default(15),
|
|
39664
|
+
includeTests: import_zod4.z.boolean().optional(),
|
|
39665
|
+
includeProblems: import_zod4.z.boolean().optional()
|
|
39666
|
+
}).superRefine((value, ctx) => {
|
|
39667
|
+
if (!value.buildId && !value.buildNumber) {
|
|
39668
|
+
ctx.addIssue({
|
|
39669
|
+
code: import_zod4.z.ZodIssueCode.custom,
|
|
39670
|
+
path: ["buildId"],
|
|
39671
|
+
message: "Either buildId or buildNumber must be provided"
|
|
39672
|
+
});
|
|
39673
|
+
}
|
|
39674
|
+
if (value.buildNumber && !value.buildTypeId) {
|
|
39675
|
+
ctx.addIssue({
|
|
39676
|
+
code: import_zod4.z.ZodIssueCode.custom,
|
|
39677
|
+
path: ["buildTypeId"],
|
|
39678
|
+
message: "buildTypeId is required when querying by buildNumber"
|
|
39679
|
+
});
|
|
39680
|
+
}
|
|
39681
|
+
});
|
|
39682
|
+
return runTool(
|
|
39683
|
+
"wait_for_build",
|
|
39684
|
+
schema,
|
|
39685
|
+
async (typed) => {
|
|
39686
|
+
const adapter = createAdapterFromTeamCityAPI(TeamCityAPI.getInstance());
|
|
39687
|
+
const statusManager = new (await Promise.resolve().then(() => (init_build_status_manager(), build_status_manager_exports))).BuildStatusManager(adapter);
|
|
39688
|
+
const deadline = Date.now() + typed.timeout * 1e3;
|
|
39689
|
+
const terminalStates = /* @__PURE__ */ new Set(["finished", "canceled", "failed"]);
|
|
39690
|
+
let pollCount = 0;
|
|
39691
|
+
const startTime = Date.now();
|
|
39692
|
+
while (true) {
|
|
39693
|
+
pollCount++;
|
|
39694
|
+
const result = await statusManager.getBuildStatus({
|
|
39695
|
+
buildId: typed.buildId,
|
|
39696
|
+
buildNumber: typed.buildNumber,
|
|
39697
|
+
buildTypeId: typed.buildTypeId,
|
|
39698
|
+
includeTests: typed.includeTests,
|
|
39699
|
+
includeProblems: typed.includeProblems,
|
|
39700
|
+
forceRefresh: true
|
|
39701
|
+
});
|
|
39702
|
+
const waitSeconds = Math.round((Date.now() - startTime) / 1e3);
|
|
39703
|
+
debug2(
|
|
39704
|
+
`wait_for_build poll #${pollCount}: state=${result.state} (${waitSeconds}s elapsed)`
|
|
39705
|
+
);
|
|
39706
|
+
if (terminalStates.has(result.state)) {
|
|
39707
|
+
return json({ ...result, pollCount, waitSeconds });
|
|
39708
|
+
}
|
|
39709
|
+
if (Date.now() >= deadline) {
|
|
39710
|
+
return json({ ...result, timedOut: true, pollCount, waitSeconds });
|
|
39711
|
+
}
|
|
39712
|
+
await sleep(typed.pollInterval * 1e3);
|
|
39713
|
+
}
|
|
39714
|
+
},
|
|
39715
|
+
args
|
|
39716
|
+
);
|
|
39717
|
+
}
|
|
39718
|
+
},
|
|
39625
39719
|
{
|
|
39626
39720
|
name: "fetch_build_log",
|
|
39627
39721
|
description: "Fetch build log with pagination (by lines)",
|
|
@@ -43127,6 +43221,24 @@ var FULL_MODE_TOOLS = [
|
|
|
43127
43221
|
},
|
|
43128
43222
|
mode: "full"
|
|
43129
43223
|
},
|
|
43224
|
+
{
|
|
43225
|
+
name: "remove_agent",
|
|
43226
|
+
description: "Remove (delete) a build agent from the TeamCity server. Use this to clean up disconnected or ghost agent entries.",
|
|
43227
|
+
inputSchema: {
|
|
43228
|
+
type: "object",
|
|
43229
|
+
properties: {
|
|
43230
|
+
agentId: { type: "string", description: "Agent ID to remove" }
|
|
43231
|
+
},
|
|
43232
|
+
required: ["agentId"]
|
|
43233
|
+
},
|
|
43234
|
+
handler: async (args) => {
|
|
43235
|
+
const typedArgs = args;
|
|
43236
|
+
const adapter = createAdapterFromTeamCityAPI(TeamCityAPI.getInstance());
|
|
43237
|
+
await adapter.modules.agents.deleteAgent(typedArgs.agentId);
|
|
43238
|
+
return json({ success: true, action: "remove_agent", agentId: typedArgs.agentId });
|
|
43239
|
+
},
|
|
43240
|
+
mode: "full"
|
|
43241
|
+
},
|
|
43130
43242
|
// === Build Step Management ===
|
|
43131
43243
|
{
|
|
43132
43244
|
name: "manage_build_steps",
|
package/package.json
CHANGED
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.
|
|
10
|
+
"version": "2.6.0",
|
|
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.
|
|
16
|
+
"version": "2.6.0",
|
|
17
17
|
"runtimeHint": "npx",
|
|
18
18
|
"runtimeArguments": [
|
|
19
19
|
{
|