@daghis/teamcity-mcp 1.7.0 → 1.8.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 +7 -0
- package/dist/index.js +23 -3
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.8.0](https://github.com/Daghis/teamcity-mcp/compare/v1.7.0...v1.8.0) (2025-09-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **tools:** support streaming artifacts in get_build_results ([#173](https://github.com/Daghis/teamcity-mcp/issues/173)) ([f95c5e4](https://github.com/Daghis/teamcity-mcp/commit/f95c5e4da9ffa80adc8b8f322c127a440c4524b5)), closes [#169](https://github.com/Daghis/teamcity-mcp/issues/169)
|
|
9
|
+
|
|
3
10
|
## [1.7.0](https://github.com/Daghis/teamcity-mcp/compare/v1.6.0...v1.7.0) (2025-09-20)
|
|
4
11
|
|
|
5
12
|
|
package/dist/index.js
CHANGED
|
@@ -1771,6 +1771,7 @@ var BuildResultsManager = class _BuildResultsManager {
|
|
|
1771
1771
|
*/
|
|
1772
1772
|
async fetchArtifacts(buildId, options) {
|
|
1773
1773
|
try {
|
|
1774
|
+
const encoding = options.artifactEncoding ?? "base64";
|
|
1774
1775
|
const response = await this.client.modules.builds.getFilesListOfBuild(
|
|
1775
1776
|
toBuildLocator(buildId)
|
|
1776
1777
|
);
|
|
@@ -1783,6 +1784,7 @@ var BuildResultsManager = class _BuildResultsManager {
|
|
|
1783
1784
|
artifacts.map(async (artifact) => {
|
|
1784
1785
|
const artifactPath = artifact.fullName ?? artifact.name;
|
|
1785
1786
|
const downloadHref = artifact.content?.href ?? `/app/rest/builds/id:${buildId}/artifacts/content/${artifactPath}`;
|
|
1787
|
+
const shouldInlineContent = encoding === "base64" && (options.downloadArtifacts?.length ? options.downloadArtifacts.includes(artifact.name) || options.downloadArtifacts.includes(artifactPath) : true);
|
|
1786
1788
|
const artifactData = {
|
|
1787
1789
|
name: artifact.name,
|
|
1788
1790
|
path: artifactPath,
|
|
@@ -1790,7 +1792,7 @@ var BuildResultsManager = class _BuildResultsManager {
|
|
|
1790
1792
|
modificationTime: artifact.modificationTime ?? "",
|
|
1791
1793
|
downloadUrl: this.buildAbsoluteUrl(downloadHref)
|
|
1792
1794
|
};
|
|
1793
|
-
if (
|
|
1795
|
+
if (shouldInlineContent) {
|
|
1794
1796
|
const maxSize = options.maxArtifactSize ?? _BuildResultsManager.defaultMaxArtifactSize;
|
|
1795
1797
|
if ((artifact.size ?? 0) <= maxSize) {
|
|
1796
1798
|
try {
|
|
@@ -1799,6 +1801,16 @@ var BuildResultsManager = class _BuildResultsManager {
|
|
|
1799
1801
|
} catch (err) {
|
|
1800
1802
|
}
|
|
1801
1803
|
}
|
|
1804
|
+
} else if (encoding === "stream") {
|
|
1805
|
+
artifactData.downloadHandle = {
|
|
1806
|
+
tool: "download_build_artifact",
|
|
1807
|
+
args: {
|
|
1808
|
+
buildId,
|
|
1809
|
+
artifactPath,
|
|
1810
|
+
encoding: "stream",
|
|
1811
|
+
...options.maxArtifactSize ? { maxSize: options.maxArtifactSize } : {}
|
|
1812
|
+
}
|
|
1813
|
+
};
|
|
1802
1814
|
}
|
|
1803
1815
|
return artifactData;
|
|
1804
1816
|
})
|
|
@@ -38349,6 +38361,12 @@ var DEV_TOOLS = [
|
|
|
38349
38361
|
maxArtifactSize: {
|
|
38350
38362
|
type: "number",
|
|
38351
38363
|
description: "Max artifact content size (bytes) when inlining"
|
|
38364
|
+
},
|
|
38365
|
+
artifactEncoding: {
|
|
38366
|
+
type: "string",
|
|
38367
|
+
description: "Encoding mode for artifacts when includeArtifacts is true",
|
|
38368
|
+
enum: ["base64", "stream"],
|
|
38369
|
+
default: "base64"
|
|
38352
38370
|
}
|
|
38353
38371
|
},
|
|
38354
38372
|
required: ["buildId"]
|
|
@@ -38361,7 +38379,8 @@ var DEV_TOOLS = [
|
|
|
38361
38379
|
includeChanges: import_zod4.z.boolean().optional(),
|
|
38362
38380
|
includeDependencies: import_zod4.z.boolean().optional(),
|
|
38363
38381
|
artifactFilter: import_zod4.z.string().min(1).optional(),
|
|
38364
|
-
maxArtifactSize: import_zod4.z.number().int().min(1).optional()
|
|
38382
|
+
maxArtifactSize: import_zod4.z.number().int().min(1).optional(),
|
|
38383
|
+
artifactEncoding: import_zod4.z.enum(["base64", "stream"]).default("base64")
|
|
38365
38384
|
});
|
|
38366
38385
|
return runTool(
|
|
38367
38386
|
"get_build_results",
|
|
@@ -38375,7 +38394,8 @@ var DEV_TOOLS = [
|
|
|
38375
38394
|
includeChanges: typed.includeChanges,
|
|
38376
38395
|
includeDependencies: typed.includeDependencies,
|
|
38377
38396
|
artifactFilter: typed.artifactFilter,
|
|
38378
|
-
maxArtifactSize: typed.maxArtifactSize
|
|
38397
|
+
maxArtifactSize: typed.maxArtifactSize,
|
|
38398
|
+
artifactEncoding: typed.artifactEncoding
|
|
38379
38399
|
});
|
|
38380
38400
|
return json(result);
|
|
38381
38401
|
},
|